@vtj/parser 0.17.8 → 0.18.0
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 +29 -18
- package/dist/index.mjs +2021 -1168
- package/package.json +8 -6
- package/types/shared/utils.d.ts +6 -0
- package/types/version.d.ts +2 -2
- package/types/vue/composition/index.d.ts +3 -0
- package/types/vue/composition/reverseGlobalApi.d.ts +30 -0
- package/types/vue/composition/reverseSymbolTable.d.ts +35 -0
- package/types/vue/composition/reverseTransformer.d.ts +2 -0
- package/types/vue/compositionPatch.d.ts +46 -0
- package/types/vue/scriptSetup.d.ts +31 -0
- package/types/vue/utils.d.ts +0 -20
package/dist/index.mjs
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { parse as
|
|
2
|
-
import { parse as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { BlockModel as
|
|
6
|
-
import { tsFormatter as
|
|
7
|
-
import { NodeTypes as
|
|
8
|
-
import { upperFirstCamelCase as
|
|
9
|
-
import
|
|
10
|
-
import * as
|
|
11
|
-
import * as
|
|
1
|
+
import { parse as Uu, compileTemplate as Gu } from "@vue/compiler-sfc";
|
|
2
|
+
import { parse as me } from "@babel/parser";
|
|
3
|
+
import vu from "@babel/traverse";
|
|
4
|
+
import Eu from "@babel/generator";
|
|
5
|
+
import { BlockModel as Hu } from "@vtj/core";
|
|
6
|
+
import { GLOBAL_API_MAP as gu, UI_PACKAGES as xe, UI_GLOBAL_API_MAPS as Wu, tsFormatter as au } from "@vtj/coder";
|
|
7
|
+
import { NodeTypes as v } from "@vue/compiler-core";
|
|
8
|
+
import { upperFirstCamelCase as ge, unBase64 as ye, uid as ru } from "@vtj/base";
|
|
9
|
+
import Se from "postcss";
|
|
10
|
+
import * as ve from "sass";
|
|
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.
|
|
16
|
+
* @version 0.18.0
|
|
17
17
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
18
18
|
*/
|
|
19
|
-
const
|
|
20
|
-
function
|
|
21
|
-
const { descriptor: u, errors: t } =
|
|
19
|
+
const d0 = "0.18.0";
|
|
20
|
+
function M(e) {
|
|
21
|
+
const { descriptor: u, errors: t } = Uu(e), a = u.template?.content || "", r = !!u.scriptSetup, n = (u.scriptSetup || u.script)?.content || "", i = u.styles.map((s) => s.content);
|
|
22
22
|
return {
|
|
23
23
|
template: a,
|
|
24
|
-
script:
|
|
25
|
-
styles:
|
|
26
|
-
errors: t
|
|
24
|
+
script: n,
|
|
25
|
+
styles: i,
|
|
26
|
+
errors: t,
|
|
27
|
+
isScriptSetup: r
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
30
|
+
function B(e) {
|
|
31
|
+
return me(e, { sourceType: "module", plugins: ["typescript"] });
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
-
return (
|
|
33
|
+
function J(e, u) {
|
|
34
|
+
return (vu.default || vu)(e, u);
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
+
function A(e) {
|
|
36
37
|
if (!e) return "";
|
|
37
38
|
try {
|
|
38
|
-
return (
|
|
39
|
+
return bu(e), (Eu.default || Eu)(e, {
|
|
39
40
|
comments: !1,
|
|
40
41
|
concise: !0,
|
|
41
42
|
retainLines: !1,
|
|
@@ -47,169 +48,218 @@ function B(e) {
|
|
|
47
48
|
return console.error("代码生成错误", u), "";
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
+
function bu(e) {
|
|
52
|
+
if (!(!e || typeof e != "object")) {
|
|
53
|
+
if (Array.isArray(e)) {
|
|
54
|
+
for (const u of e) bu(u);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
delete e.typeAnnotation, delete e.returnType, delete e.typeParameters, e.type === "Identifier" && delete e.optional;
|
|
58
|
+
for (const u of Object.keys(e))
|
|
59
|
+
u === "type" || u === "loc" || u === "start" || u === "end" || u === "extra" || u === "leadingComments" || u === "trailingComments" || u === "innerComments" || u === "errors" || bu(e[u]);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function nu(e) {
|
|
51
63
|
return !!e && e.type === "JSExpression";
|
|
52
64
|
}
|
|
53
|
-
function
|
|
65
|
+
function Ee(e) {
|
|
54
66
|
return typeof e == "object" && !!e && e.type === "JSFunction";
|
|
55
67
|
}
|
|
56
|
-
function
|
|
57
|
-
return !!
|
|
68
|
+
function ou(e) {
|
|
69
|
+
return !!nu(e) || !!Ee(e);
|
|
58
70
|
}
|
|
59
|
-
function
|
|
60
|
-
return !!e && !
|
|
71
|
+
function we(e) {
|
|
72
|
+
return !!e && !nu(e) && typeof e != "string";
|
|
61
73
|
}
|
|
62
|
-
function
|
|
74
|
+
function Ju(e, u) {
|
|
63
75
|
try {
|
|
64
|
-
const t =
|
|
65
|
-
return
|
|
76
|
+
const t = B(e);
|
|
77
|
+
return J(t, u), A(t) || "";
|
|
66
78
|
} catch {
|
|
67
79
|
return "";
|
|
68
80
|
}
|
|
69
81
|
}
|
|
70
|
-
function
|
|
82
|
+
function Ie(e) {
|
|
83
|
+
if (!e) return "";
|
|
84
|
+
try {
|
|
85
|
+
const u = B(e);
|
|
86
|
+
return J(u, {
|
|
87
|
+
// TS as 断言 / <T> 断言 / 非空断言 → 只保留表达式本身
|
|
88
|
+
TSAsExpression: (t) => {
|
|
89
|
+
t.replaceWith(t.node.expression);
|
|
90
|
+
},
|
|
91
|
+
TSTypeAssertion: (t) => {
|
|
92
|
+
t.replaceWith(t.node.expression);
|
|
93
|
+
},
|
|
94
|
+
TSNonNullExpression: (t) => {
|
|
95
|
+
t.replaceWith(t.node.expression);
|
|
96
|
+
},
|
|
97
|
+
// TS 类型声明整体移除
|
|
98
|
+
TSInterfaceDeclaration: (t) => {
|
|
99
|
+
t.remove();
|
|
100
|
+
},
|
|
101
|
+
TSTypeAliasDeclaration: (t) => {
|
|
102
|
+
t.remove();
|
|
103
|
+
},
|
|
104
|
+
TSModuleDeclaration: (t) => {
|
|
105
|
+
t.remove();
|
|
106
|
+
},
|
|
107
|
+
TSEnumDeclaration: (t) => {
|
|
108
|
+
t.remove();
|
|
109
|
+
},
|
|
110
|
+
// 退出节点时统一删除残留的 TS 属性
|
|
111
|
+
exit: (t) => {
|
|
112
|
+
const a = t.node;
|
|
113
|
+
a && (delete a.typeAnnotation, delete a.returnType, delete a.typeParameters, a.type === "Identifier" && delete a.optional);
|
|
114
|
+
}
|
|
115
|
+
}), A(u) || "";
|
|
116
|
+
} catch {
|
|
117
|
+
return e;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function Ae(e, u) {
|
|
71
121
|
const t = [];
|
|
72
122
|
try {
|
|
73
|
-
const { descriptor: a, errors:
|
|
74
|
-
if (
|
|
75
|
-
const
|
|
123
|
+
const { descriptor: a, errors: r } = Uu(e);
|
|
124
|
+
if (r && r.length > 0 && r.forEach((i) => {
|
|
125
|
+
const s = i.message || String(i), o = i.loc;
|
|
76
126
|
o && o.start ? t.push(
|
|
77
|
-
`Vue SFC 错误: ${
|
|
78
|
-
) : t.push(`Vue SFC 错误: ${
|
|
127
|
+
`Vue SFC 错误: ${s} (位置: ${o.start.line}:${o.start.column})`
|
|
128
|
+
) : t.push(`Vue SFC 错误: ${s}`);
|
|
79
129
|
}), a.template)
|
|
80
130
|
try {
|
|
81
|
-
const
|
|
131
|
+
const i = Gu({
|
|
82
132
|
id: "validation",
|
|
83
133
|
filename: u,
|
|
84
134
|
source: a.template.content,
|
|
85
135
|
isProd: !1
|
|
86
136
|
});
|
|
87
|
-
|
|
88
|
-
const o = typeof
|
|
89
|
-
|
|
90
|
-
`模板编译错误: ${o} (位置: ${
|
|
137
|
+
i.errors && i.errors.length > 0 && i.errors.forEach((s) => {
|
|
138
|
+
const o = typeof s == "string" ? s : s.message, c = typeof s == "string" ? null : s.loc;
|
|
139
|
+
c && c.start ? t.push(
|
|
140
|
+
`模板编译错误: ${o} (位置: ${c.start.line}:${c.start.column})`
|
|
91
141
|
) : t.push(`模板编译错误: ${o}`);
|
|
92
142
|
});
|
|
93
|
-
} catch (
|
|
94
|
-
t.push(`模板编译错误: ${
|
|
143
|
+
} catch (i) {
|
|
144
|
+
t.push(`模板编译错误: ${i.message}`);
|
|
95
145
|
}
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
146
|
+
const n = (a.scriptSetup || a.script)?.content;
|
|
147
|
+
if (n)
|
|
98
148
|
try {
|
|
99
|
-
|
|
100
|
-
} catch (
|
|
101
|
-
t.push(`脚本语法错误: ${
|
|
149
|
+
B(n);
|
|
150
|
+
} catch (i) {
|
|
151
|
+
t.push(`脚本语法错误: ${i.message}`);
|
|
102
152
|
}
|
|
103
153
|
} catch (a) {
|
|
104
154
|
t.push(`Vue SFC 解析错误: ${a.message}`);
|
|
105
155
|
}
|
|
106
156
|
return t.length > 0 ? t : null;
|
|
107
157
|
}
|
|
108
|
-
function
|
|
109
|
-
const u =
|
|
110
|
-
return u.styles && (a.css = u.styles[0] || ""),
|
|
111
|
-
CallExpression(
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
114
|
-
const
|
|
115
|
-
|
|
158
|
+
function f0(e) {
|
|
159
|
+
const u = M(e), t = B(u.script), a = {};
|
|
160
|
+
return u.styles && (a.css = u.styles[0] || ""), J(t, {
|
|
161
|
+
CallExpression(r) {
|
|
162
|
+
const n = r.node.callee?.name;
|
|
163
|
+
if (n) {
|
|
164
|
+
const i = A(r.node.arguments[0]);
|
|
165
|
+
i && (a[n] = {
|
|
116
166
|
type: "JSFunction",
|
|
117
|
-
value:
|
|
167
|
+
value: i
|
|
118
168
|
});
|
|
119
169
|
}
|
|
120
170
|
}
|
|
121
171
|
}), a;
|
|
122
172
|
}
|
|
123
|
-
function
|
|
173
|
+
function R(e, u, t) {
|
|
124
174
|
if (!e.includes(u)) return e;
|
|
125
175
|
try {
|
|
126
|
-
return
|
|
176
|
+
return ke(e, u, t);
|
|
127
177
|
} catch {
|
|
128
178
|
return e;
|
|
129
179
|
}
|
|
130
180
|
}
|
|
131
|
-
function
|
|
132
|
-
let a,
|
|
181
|
+
function ke(e, u, t) {
|
|
182
|
+
let a, r = 0;
|
|
133
183
|
try {
|
|
134
|
-
a =
|
|
184
|
+
a = B(e);
|
|
135
185
|
} catch {
|
|
136
|
-
const
|
|
137
|
-
a =
|
|
186
|
+
const s = "(()=>{", c = s + e + "})";
|
|
187
|
+
a = B(c), r = s.length;
|
|
138
188
|
}
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
Identifier(
|
|
142
|
-
const o =
|
|
189
|
+
const n = [];
|
|
190
|
+
if (J(a, {
|
|
191
|
+
Identifier(s) {
|
|
192
|
+
const o = s.node;
|
|
143
193
|
if (o.name !== u) return;
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
const
|
|
149
|
-
|
|
194
|
+
const c = je(s);
|
|
195
|
+
if (c === "skip") return;
|
|
196
|
+
const d = (o.start ?? 0) - r, f = (o.end ?? 0) - r;
|
|
197
|
+
if (d < 0 || f > e.length) return;
|
|
198
|
+
const p = c === "expand" ? `${u}: ${t}` : t;
|
|
199
|
+
n.some((b) => b.start === d && b.end === f) || n.push({ start: d, end: f, text: p });
|
|
150
200
|
},
|
|
151
|
-
StringLiteral(
|
|
152
|
-
|
|
201
|
+
StringLiteral(s) {
|
|
202
|
+
Te(s, u, t, r, e, n);
|
|
153
203
|
},
|
|
154
|
-
TemplateLiteral(
|
|
155
|
-
|
|
204
|
+
TemplateLiteral(s) {
|
|
205
|
+
Ne(s, u, t, r, e, n);
|
|
156
206
|
},
|
|
157
|
-
MemberExpression(
|
|
158
|
-
|
|
207
|
+
MemberExpression(s) {
|
|
208
|
+
wu(s, u, t, r, e, n);
|
|
159
209
|
},
|
|
160
|
-
OptionalMemberExpression(
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
}),
|
|
164
|
-
|
|
165
|
-
let
|
|
166
|
-
for (const { start:
|
|
167
|
-
|
|
168
|
-
return
|
|
169
|
-
}
|
|
170
|
-
function fe(e, u, t, a, i, r) {
|
|
171
|
-
const s = e.node;
|
|
172
|
-
if (!s.value.includes(u)) return;
|
|
173
|
-
const c = e.parent;
|
|
174
|
-
if (c?.type !== "NewExpression" || c?.callee?.name !== "RegExp")
|
|
175
|
-
return;
|
|
176
|
-
const o = s.value;
|
|
177
|
-
let n = 0;
|
|
178
|
-
for (; n < o.length; ) {
|
|
179
|
-
const f = o.indexOf(u, n);
|
|
180
|
-
if (f === -1) break;
|
|
181
|
-
const l = 1 + f, m = (s.start ?? 0) - a + l, h = m + u.length;
|
|
182
|
-
m >= 0 && h <= i.length && !r.some((I) => I.start === m && I.end === h) && r.push({ start: m, end: h, text: t }), n = f + u.length;
|
|
183
|
-
}
|
|
210
|
+
OptionalMemberExpression(s) {
|
|
211
|
+
wu(s, u, t, r, e, n);
|
|
212
|
+
}
|
|
213
|
+
}), n.length === 0) return e;
|
|
214
|
+
n.sort((s, o) => o.start - s.start);
|
|
215
|
+
let i = e;
|
|
216
|
+
for (const { start: s, end: o, text: c } of n)
|
|
217
|
+
i = i.slice(0, s) + c + i.slice(o);
|
|
218
|
+
return i;
|
|
184
219
|
}
|
|
185
|
-
function
|
|
220
|
+
function Te(e, u, t, a, r, n) {
|
|
221
|
+
const i = e.node;
|
|
222
|
+
if (!i.value.includes(u)) return;
|
|
186
223
|
const s = e.parent;
|
|
187
224
|
if (s?.type !== "NewExpression" || s?.callee?.name !== "RegExp")
|
|
188
225
|
return;
|
|
226
|
+
const o = i.value;
|
|
227
|
+
let c = 0;
|
|
228
|
+
for (; c < o.length; ) {
|
|
229
|
+
const d = o.indexOf(u, c);
|
|
230
|
+
if (d === -1) break;
|
|
231
|
+
const f = 1 + d, p = (i.start ?? 0) - a + f, b = p + u.length;
|
|
232
|
+
p >= 0 && b <= r.length && !n.some((h) => h.start === p && h.end === b) && n.push({ start: p, end: b, text: t }), c = d + u.length;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
function Ne(e, u, t, a, r, n) {
|
|
236
|
+
const i = e.parent;
|
|
237
|
+
if (i?.type !== "NewExpression" || i?.callee?.name !== "RegExp")
|
|
238
|
+
return;
|
|
189
239
|
const o = e.node.quasis ?? [];
|
|
190
|
-
for (const
|
|
191
|
-
const
|
|
192
|
-
if (!
|
|
193
|
-
let
|
|
194
|
-
for (;
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
const
|
|
198
|
-
if (
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
function
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
240
|
+
for (const c of o) {
|
|
241
|
+
const d = c.value?.raw ?? "";
|
|
242
|
+
if (!d.includes(u)) continue;
|
|
243
|
+
let f = 0;
|
|
244
|
+
for (; f < d.length; ) {
|
|
245
|
+
const p = d.indexOf(u, f);
|
|
246
|
+
if (p === -1) break;
|
|
247
|
+
const b = (c.start ?? 0) - a;
|
|
248
|
+
if (b < 0 || b > r.length) break;
|
|
249
|
+
const h = b + p, S = h + u.length;
|
|
250
|
+
h >= 0 && S <= r.length && !n.some((E) => E.start === h && E.end === S) && n.push({ start: h, end: S, text: t }), f = p + u.length;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
function wu(e, u, t, a, r, n) {
|
|
255
|
+
const i = e.node;
|
|
256
|
+
if (i.object?.type !== "ThisExpression" || i.computed || i.property?.type !== "Identifier" || i.property.name !== u)
|
|
207
257
|
return;
|
|
208
|
-
const
|
|
209
|
-
|
|
258
|
+
const s = (i.start ?? 0) - a, o = (i.end ?? 0) - a;
|
|
259
|
+
s < 0 || o > r.length || n.some((c) => c.start === s && c.end === o) || n.push({ start: s, end: o, text: t });
|
|
210
260
|
}
|
|
211
|
-
function
|
|
212
|
-
const t = e.parent, a = t?.type ?? "",
|
|
261
|
+
function je(e, u) {
|
|
262
|
+
const t = e.parent, a = t?.type ?? "", r = e.parentPath?.parent;
|
|
213
263
|
switch (a) {
|
|
214
264
|
// 成员访问 obj.key / obj[key] / obj?.key / obj?.[key]
|
|
215
265
|
case "MemberExpression":
|
|
@@ -223,9 +273,9 @@ function be(e, u) {
|
|
|
223
273
|
// 对象属性 { key: val } / { key } / { [key]: val }
|
|
224
274
|
case "ObjectProperty": {
|
|
225
275
|
if (t.key === e.node)
|
|
226
|
-
return t.computed ? "replace" : t.shorthand ?
|
|
276
|
+
return t.computed ? "replace" : t.shorthand ? r && r?.type === "ObjectPattern" ? "skip" : "expand" : "skip";
|
|
227
277
|
if (t.value === e.node)
|
|
228
|
-
return
|
|
278
|
+
return r && r?.type === "ObjectPattern" ? "skip" : "replace";
|
|
229
279
|
break;
|
|
230
280
|
}
|
|
231
281
|
// 变量声明 const/let/var key = ...
|
|
@@ -315,9 +365,9 @@ function be(e, u) {
|
|
|
315
365
|
break;
|
|
316
366
|
}
|
|
317
367
|
}
|
|
318
|
-
return
|
|
368
|
+
return Ve(e) || qe(e) ? "skip" : "replace";
|
|
319
369
|
}
|
|
320
|
-
function
|
|
370
|
+
function Ve(e) {
|
|
321
371
|
let u = e.parentPath;
|
|
322
372
|
for (; u; ) {
|
|
323
373
|
const t = u.node, a = t?.type ?? "";
|
|
@@ -329,7 +379,7 @@ function he(e) {
|
|
|
329
379
|
}
|
|
330
380
|
return !1;
|
|
331
381
|
}
|
|
332
|
-
function
|
|
382
|
+
function qe(e) {
|
|
333
383
|
let u = e.parentPath;
|
|
334
384
|
for (; u; ) {
|
|
335
385
|
const t = u.node?.type ?? "";
|
|
@@ -340,45 +390,45 @@ function pe(e) {
|
|
|
340
390
|
}
|
|
341
391
|
return !1;
|
|
342
392
|
}
|
|
343
|
-
function
|
|
393
|
+
function Iu(e, u, t) {
|
|
344
394
|
const {
|
|
345
395
|
context: a = {},
|
|
346
|
-
computed:
|
|
347
|
-
libs:
|
|
348
|
-
members:
|
|
349
|
-
props:
|
|
396
|
+
computed: r = [],
|
|
397
|
+
libs: n = {},
|
|
398
|
+
members: i = [],
|
|
399
|
+
props: s = [],
|
|
350
400
|
platform: o
|
|
351
|
-
} = t || {},
|
|
352
|
-
if (
|
|
353
|
-
for (const
|
|
354
|
-
e =
|
|
355
|
-
for (const
|
|
356
|
-
e.includes(`this.${
|
|
357
|
-
for (const
|
|
358
|
-
e =
|
|
359
|
-
for (const [
|
|
360
|
-
e =
|
|
361
|
-
for (const
|
|
362
|
-
e =
|
|
401
|
+
} = t || {}, c = Array.from(a[u || ""] || /* @__PURE__ */ new Set());
|
|
402
|
+
if (c)
|
|
403
|
+
for (const d of c)
|
|
404
|
+
e = R(e, d, `this.context.${d}`);
|
|
405
|
+
for (const d of r)
|
|
406
|
+
e.includes(`this.${d}.value`) || (e = R(e, d, `this.${d}.value`));
|
|
407
|
+
for (const d of s)
|
|
408
|
+
e = R(e, d, `this.${d}`);
|
|
409
|
+
for (const [d, f] of Object.entries(n))
|
|
410
|
+
e = R(e, d, `this.$libs.${f}.${d}`), e = R(e, `this.${d}`, `this.$libs.${f}.${d}`);
|
|
411
|
+
for (const d of i)
|
|
412
|
+
e = R(e, d, `this.${d}`);
|
|
363
413
|
if (o === "uniapp") {
|
|
364
|
-
const
|
|
365
|
-
e = e.replace(
|
|
414
|
+
const d = /\suni\./g;
|
|
415
|
+
e = e.replace(d, "this.$libs.UniH5.uni.");
|
|
366
416
|
}
|
|
367
417
|
return e = e.replace(/_ctx\./g, "this."), e = e.replace(/this\.this\./g, "this."), e;
|
|
368
418
|
}
|
|
369
|
-
function
|
|
419
|
+
function T(e) {
|
|
370
420
|
return {
|
|
371
421
|
type: "JSExpression",
|
|
372
422
|
value: /^\{[\w\W]*\}$/.test(e) ? `(${e})` : e
|
|
373
423
|
};
|
|
374
424
|
}
|
|
375
|
-
function
|
|
425
|
+
function C(e) {
|
|
376
426
|
return {
|
|
377
427
|
type: "JSFunction",
|
|
378
428
|
value: e
|
|
379
429
|
};
|
|
380
430
|
}
|
|
381
|
-
const
|
|
431
|
+
const De = [
|
|
382
432
|
"beforeCreate",
|
|
383
433
|
"created",
|
|
384
434
|
"beforeMount",
|
|
@@ -392,46 +442,46 @@ const me = [
|
|
|
392
442
|
"renderTriggered",
|
|
393
443
|
"activated",
|
|
394
444
|
"deactivated"
|
|
395
|
-
],
|
|
445
|
+
], Re = "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(
|
|
396
446
|
","
|
|
397
|
-
),
|
|
447
|
+
), Ce = "component,slot,template".split(","), Le = "view,swiper,progress,icon,text,button,checkbox,editor,form,input,label,picker,radio,slider,switch,textarea,audio,camera,image,video,map,canvas".split(
|
|
398
448
|
","
|
|
399
449
|
);
|
|
400
|
-
function
|
|
401
|
-
return u === "uniapp" &&
|
|
450
|
+
function _e(e, u = "web") {
|
|
451
|
+
return u === "uniapp" && Le.includes(e);
|
|
402
452
|
}
|
|
403
|
-
function
|
|
404
|
-
return (
|
|
453
|
+
function zu(e, u = "web") {
|
|
454
|
+
return (Re.includes(e) || Ce.includes(e)) && !_e(e, u) ? e : ge(e);
|
|
405
455
|
}
|
|
406
|
-
function
|
|
456
|
+
function Xu(e) {
|
|
407
457
|
return e.replace(/\s+/g, " ").split(";").reduce((t, a) => {
|
|
408
|
-
const [
|
|
409
|
-
return
|
|
458
|
+
const [r, n] = a.split(":").map((i) => i.trim());
|
|
459
|
+
return r && n && (t[r] = n), t;
|
|
410
460
|
}, {});
|
|
411
461
|
}
|
|
412
|
-
function
|
|
462
|
+
function Me(e, u, t) {
|
|
413
463
|
if (t === "ObjectExpression")
|
|
414
|
-
return `(Object.assign({${e.split(" ").map((
|
|
464
|
+
return `(Object.assign({${e.split(" ").map((r) => `'${r}': true`).join(",")}}, ${u}))`;
|
|
415
465
|
if (t === "ArrayExpression")
|
|
416
|
-
return `([${e.split(" ").map((
|
|
466
|
+
return `([${e.split(" ").map((r) => `'${r}'`).join(",")}].concat(${u}))`;
|
|
417
467
|
}
|
|
418
|
-
function
|
|
468
|
+
function Qu(e = "") {
|
|
419
469
|
const t = e.trim().match(/DataSource:\s*([^\n=]+={0,2})/)?.[1] || "";
|
|
420
470
|
try {
|
|
421
|
-
return t ? JSON.parse(
|
|
471
|
+
return t ? JSON.parse(ye(t)) : null;
|
|
422
472
|
} catch (a) {
|
|
423
473
|
return console.warn("extractDataSource fail", a), null;
|
|
424
474
|
}
|
|
425
475
|
}
|
|
426
|
-
const
|
|
476
|
+
const Oe = /* @__PURE__ */ new Uint16Array(
|
|
427
477
|
// prettier-ignore
|
|
428
478
|
/* @__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((e) => e.charCodeAt(0))
|
|
429
|
-
),
|
|
479
|
+
), Pe = /* @__PURE__ */ new Uint16Array(
|
|
430
480
|
// prettier-ignore
|
|
431
481
|
/* @__PURE__ */ "Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e) => e.charCodeAt(0))
|
|
432
482
|
);
|
|
433
|
-
var
|
|
434
|
-
const
|
|
483
|
+
var fu;
|
|
484
|
+
const Be = /* @__PURE__ */ new Map([
|
|
435
485
|
[0, 65533],
|
|
436
486
|
// C1 Unicode control character reference replacements
|
|
437
487
|
[128, 8364],
|
|
@@ -461,53 +511,53 @@ const Ae = /* @__PURE__ */ new Map([
|
|
|
461
511
|
[156, 339],
|
|
462
512
|
[158, 382],
|
|
463
513
|
[159, 376]
|
|
464
|
-
]),
|
|
514
|
+
]), Au = (
|
|
465
515
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, n/no-unsupported-features/es-builtins
|
|
466
|
-
(
|
|
516
|
+
(fu = String.fromCodePoint) !== null && fu !== void 0 ? fu : function(e) {
|
|
467
517
|
let u = "";
|
|
468
518
|
return e > 65535 && (e -= 65536, u += String.fromCharCode(e >>> 10 & 1023 | 55296), e = 56320 | e & 1023), u += String.fromCharCode(e), u;
|
|
469
519
|
}
|
|
470
520
|
);
|
|
471
|
-
function
|
|
521
|
+
function Fe(e) {
|
|
472
522
|
var u;
|
|
473
|
-
return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (u =
|
|
523
|
+
return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (u = Be.get(e)) !== null && u !== void 0 ? u : e;
|
|
474
524
|
}
|
|
475
|
-
var
|
|
525
|
+
var V;
|
|
476
526
|
(function(e) {
|
|
477
527
|
e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
|
|
478
|
-
})(
|
|
479
|
-
const
|
|
480
|
-
var
|
|
528
|
+
})(V || (V = {}));
|
|
529
|
+
const $e = 32;
|
|
530
|
+
var W;
|
|
481
531
|
(function(e) {
|
|
482
532
|
e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
483
|
-
})(
|
|
484
|
-
function
|
|
485
|
-
return e >=
|
|
533
|
+
})(W || (W = {}));
|
|
534
|
+
function pu(e) {
|
|
535
|
+
return e >= V.ZERO && e <= V.NINE;
|
|
486
536
|
}
|
|
487
|
-
function
|
|
488
|
-
return e >=
|
|
537
|
+
function Ue(e) {
|
|
538
|
+
return e >= V.UPPER_A && e <= V.UPPER_F || e >= V.LOWER_A && e <= V.LOWER_F;
|
|
489
539
|
}
|
|
490
|
-
function
|
|
491
|
-
return e >=
|
|
540
|
+
function Ge(e) {
|
|
541
|
+
return e >= V.UPPER_A && e <= V.UPPER_Z || e >= V.LOWER_A && e <= V.LOWER_Z || pu(e);
|
|
492
542
|
}
|
|
493
|
-
function
|
|
494
|
-
return e ===
|
|
543
|
+
function He(e) {
|
|
544
|
+
return e === V.EQUALS || Ge(e);
|
|
495
545
|
}
|
|
496
|
-
var
|
|
546
|
+
var j;
|
|
497
547
|
(function(e) {
|
|
498
548
|
e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity";
|
|
499
|
-
})(
|
|
500
|
-
var
|
|
549
|
+
})(j || (j = {}));
|
|
550
|
+
var O;
|
|
501
551
|
(function(e) {
|
|
502
552
|
e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
|
|
503
|
-
})(
|
|
504
|
-
class
|
|
553
|
+
})(O || (O = {}));
|
|
554
|
+
class We {
|
|
505
555
|
constructor(u, t, a) {
|
|
506
|
-
this.decodeTree = u, this.emitCodePoint = t, this.errors = a, this.state =
|
|
556
|
+
this.decodeTree = u, this.emitCodePoint = t, this.errors = a, this.state = j.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = O.Strict;
|
|
507
557
|
}
|
|
508
558
|
/** Resets the instance to make it reusable. */
|
|
509
559
|
startEntity(u) {
|
|
510
|
-
this.decodeMode = u, this.state =
|
|
560
|
+
this.decodeMode = u, this.state = j.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
|
511
561
|
}
|
|
512
562
|
/**
|
|
513
563
|
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
|
@@ -522,15 +572,15 @@ class je {
|
|
|
522
572
|
*/
|
|
523
573
|
write(u, t) {
|
|
524
574
|
switch (this.state) {
|
|
525
|
-
case
|
|
526
|
-
return u.charCodeAt(t) ===
|
|
527
|
-
case
|
|
575
|
+
case j.EntityStart:
|
|
576
|
+
return u.charCodeAt(t) === V.NUM ? (this.state = j.NumericStart, this.consumed += 1, this.stateNumericStart(u, t + 1)) : (this.state = j.NamedEntity, this.stateNamedEntity(u, t));
|
|
577
|
+
case j.NumericStart:
|
|
528
578
|
return this.stateNumericStart(u, t);
|
|
529
|
-
case
|
|
579
|
+
case j.NumericDecimal:
|
|
530
580
|
return this.stateNumericDecimal(u, t);
|
|
531
|
-
case
|
|
581
|
+
case j.NumericHex:
|
|
532
582
|
return this.stateNumericHex(u, t);
|
|
533
|
-
case
|
|
583
|
+
case j.NamedEntity:
|
|
534
584
|
return this.stateNamedEntity(u, t);
|
|
535
585
|
}
|
|
536
586
|
}
|
|
@@ -544,12 +594,12 @@ class je {
|
|
|
544
594
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
545
595
|
*/
|
|
546
596
|
stateNumericStart(u, t) {
|
|
547
|
-
return t >= u.length ? -1 : (u.charCodeAt(t) |
|
|
597
|
+
return t >= u.length ? -1 : (u.charCodeAt(t) | $e) === V.LOWER_X ? (this.state = j.NumericHex, this.consumed += 1, this.stateNumericHex(u, t + 1)) : (this.state = j.NumericDecimal, this.stateNumericDecimal(u, t));
|
|
548
598
|
}
|
|
549
|
-
addToNumericResult(u, t, a,
|
|
599
|
+
addToNumericResult(u, t, a, r) {
|
|
550
600
|
if (t !== a) {
|
|
551
|
-
const
|
|
552
|
-
this.result = this.result * Math.pow(
|
|
601
|
+
const n = a - t;
|
|
602
|
+
this.result = this.result * Math.pow(r, n) + Number.parseInt(u.substr(t, n), r), this.consumed += n;
|
|
553
603
|
}
|
|
554
604
|
}
|
|
555
605
|
/**
|
|
@@ -564,11 +614,11 @@ class je {
|
|
|
564
614
|
stateNumericHex(u, t) {
|
|
565
615
|
const a = t;
|
|
566
616
|
for (; t < u.length; ) {
|
|
567
|
-
const
|
|
568
|
-
if (
|
|
617
|
+
const r = u.charCodeAt(t);
|
|
618
|
+
if (pu(r) || Ue(r))
|
|
569
619
|
t += 1;
|
|
570
620
|
else
|
|
571
|
-
return this.addToNumericResult(u, a, t, 16), this.emitNumericEntity(
|
|
621
|
+
return this.addToNumericResult(u, a, t, 16), this.emitNumericEntity(r, 3);
|
|
572
622
|
}
|
|
573
623
|
return this.addToNumericResult(u, a, t, 16), -1;
|
|
574
624
|
}
|
|
@@ -584,11 +634,11 @@ class je {
|
|
|
584
634
|
stateNumericDecimal(u, t) {
|
|
585
635
|
const a = t;
|
|
586
636
|
for (; t < u.length; ) {
|
|
587
|
-
const
|
|
588
|
-
if (
|
|
637
|
+
const r = u.charCodeAt(t);
|
|
638
|
+
if (pu(r))
|
|
589
639
|
t += 1;
|
|
590
640
|
else
|
|
591
|
-
return this.addToNumericResult(u, a, t, 10), this.emitNumericEntity(
|
|
641
|
+
return this.addToNumericResult(u, a, t, 10), this.emitNumericEntity(r, 2);
|
|
592
642
|
}
|
|
593
643
|
return this.addToNumericResult(u, a, t, 10), -1;
|
|
594
644
|
}
|
|
@@ -609,11 +659,11 @@ class je {
|
|
|
609
659
|
var a;
|
|
610
660
|
if (this.consumed <= t)
|
|
611
661
|
return (a = this.errors) === null || a === void 0 || a.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
612
|
-
if (u ===
|
|
662
|
+
if (u === V.SEMI)
|
|
613
663
|
this.consumed += 1;
|
|
614
|
-
else if (this.decodeMode ===
|
|
664
|
+
else if (this.decodeMode === O.Strict)
|
|
615
665
|
return 0;
|
|
616
|
-
return this.emitCodePoint(
|
|
666
|
+
return this.emitCodePoint(Fe(this.result), this.consumed), this.errors && (u !== V.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
617
667
|
}
|
|
618
668
|
/**
|
|
619
669
|
* Parses a named entity.
|
|
@@ -626,18 +676,18 @@ class je {
|
|
|
626
676
|
*/
|
|
627
677
|
stateNamedEntity(u, t) {
|
|
628
678
|
const { decodeTree: a } = this;
|
|
629
|
-
let
|
|
679
|
+
let r = a[this.treeIndex], n = (r & W.VALUE_LENGTH) >> 14;
|
|
630
680
|
for (; t < u.length; t++, this.excess++) {
|
|
631
|
-
const
|
|
632
|
-
if (this.treeIndex =
|
|
681
|
+
const i = u.charCodeAt(t);
|
|
682
|
+
if (this.treeIndex = Je(a, r, this.treeIndex + Math.max(1, n), i), this.treeIndex < 0)
|
|
633
683
|
return this.result === 0 || // If we are parsing an attribute
|
|
634
|
-
this.decodeMode ===
|
|
635
|
-
(
|
|
636
|
-
|
|
637
|
-
if (
|
|
638
|
-
if (
|
|
639
|
-
return this.emitNamedEntityData(this.treeIndex,
|
|
640
|
-
this.decodeMode !==
|
|
684
|
+
this.decodeMode === O.Attribute && // We shouldn't have consumed any characters after the entity,
|
|
685
|
+
(n === 0 || // And there should be no invalid characters.
|
|
686
|
+
He(i)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
687
|
+
if (r = a[this.treeIndex], n = (r & W.VALUE_LENGTH) >> 14, n !== 0) {
|
|
688
|
+
if (i === V.SEMI)
|
|
689
|
+
return this.emitNamedEntityData(this.treeIndex, n, this.consumed + this.excess);
|
|
690
|
+
this.decodeMode !== O.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
641
691
|
}
|
|
642
692
|
}
|
|
643
693
|
return -1;
|
|
@@ -649,8 +699,8 @@ class je {
|
|
|
649
699
|
*/
|
|
650
700
|
emitNotTerminatedNamedEntity() {
|
|
651
701
|
var u;
|
|
652
|
-
const { result: t, decodeTree: a } = this,
|
|
653
|
-
return this.emitNamedEntityData(t,
|
|
702
|
+
const { result: t, decodeTree: a } = this, r = (a[t] & W.VALUE_LENGTH) >> 14;
|
|
703
|
+
return this.emitNamedEntityData(t, r, this.consumed), (u = this.errors) === null || u === void 0 || u.missingSemicolonAfterCharacterReference(), this.consumed;
|
|
654
704
|
}
|
|
655
705
|
/**
|
|
656
706
|
* Emit a named entity.
|
|
@@ -662,8 +712,8 @@ class je {
|
|
|
662
712
|
* @returns The number of characters consumed.
|
|
663
713
|
*/
|
|
664
714
|
emitNamedEntityData(u, t, a) {
|
|
665
|
-
const { decodeTree:
|
|
666
|
-
return this.emitCodePoint(t === 1 ?
|
|
715
|
+
const { decodeTree: r } = this;
|
|
716
|
+
return this.emitCodePoint(t === 1 ? r[u] & ~W.VALUE_LENGTH : r[u + 1], a), t === 3 && this.emitCodePoint(r[u + 2], a), a;
|
|
667
717
|
}
|
|
668
718
|
/**
|
|
669
719
|
* Signal to the parser that the end of the input was reached.
|
|
@@ -675,62 +725,62 @@ class je {
|
|
|
675
725
|
end() {
|
|
676
726
|
var u;
|
|
677
727
|
switch (this.state) {
|
|
678
|
-
case
|
|
679
|
-
return this.result !== 0 && (this.decodeMode !==
|
|
728
|
+
case j.NamedEntity:
|
|
729
|
+
return this.result !== 0 && (this.decodeMode !== O.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
680
730
|
// Otherwise, emit a numeric entity if we have one.
|
|
681
|
-
case
|
|
731
|
+
case j.NumericDecimal:
|
|
682
732
|
return this.emitNumericEntity(0, 2);
|
|
683
|
-
case
|
|
733
|
+
case j.NumericHex:
|
|
684
734
|
return this.emitNumericEntity(0, 3);
|
|
685
|
-
case
|
|
735
|
+
case j.NumericStart:
|
|
686
736
|
return (u = this.errors) === null || u === void 0 || u.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
687
|
-
case
|
|
737
|
+
case j.EntityStart:
|
|
688
738
|
return 0;
|
|
689
739
|
}
|
|
690
740
|
}
|
|
691
741
|
}
|
|
692
|
-
function
|
|
693
|
-
const
|
|
694
|
-
if (
|
|
695
|
-
return
|
|
696
|
-
if (
|
|
697
|
-
const o = a -
|
|
698
|
-
return o < 0 || o >=
|
|
742
|
+
function Je(e, u, t, a) {
|
|
743
|
+
const r = (u & W.BRANCH_LENGTH) >> 7, n = u & W.JUMP_TABLE;
|
|
744
|
+
if (r === 0)
|
|
745
|
+
return n !== 0 && a === n ? t : -1;
|
|
746
|
+
if (n) {
|
|
747
|
+
const o = a - n;
|
|
748
|
+
return o < 0 || o >= r ? -1 : e[t + o] - 1;
|
|
699
749
|
}
|
|
700
|
-
let
|
|
701
|
-
for (;
|
|
702
|
-
const o =
|
|
703
|
-
if (
|
|
704
|
-
|
|
705
|
-
else if (
|
|
706
|
-
|
|
750
|
+
let i = t, s = i + r - 1;
|
|
751
|
+
for (; i <= s; ) {
|
|
752
|
+
const o = i + s >>> 1, c = e[o];
|
|
753
|
+
if (c < a)
|
|
754
|
+
i = o + 1;
|
|
755
|
+
else if (c > a)
|
|
756
|
+
s = o - 1;
|
|
707
757
|
else
|
|
708
|
-
return e[o +
|
|
758
|
+
return e[o + r];
|
|
709
759
|
}
|
|
710
760
|
return -1;
|
|
711
761
|
}
|
|
712
|
-
var
|
|
762
|
+
var g;
|
|
713
763
|
(function(e) {
|
|
714
764
|
e[e.Tab = 9] = "Tab", e[e.NewLine = 10] = "NewLine", e[e.FormFeed = 12] = "FormFeed", e[e.CarriageReturn = 13] = "CarriageReturn", e[e.Space = 32] = "Space", e[e.ExclamationMark = 33] = "ExclamationMark", e[e.Number = 35] = "Number", e[e.Amp = 38] = "Amp", e[e.SingleQuote = 39] = "SingleQuote", e[e.DoubleQuote = 34] = "DoubleQuote", e[e.Dash = 45] = "Dash", e[e.Slash = 47] = "Slash", e[e.Zero = 48] = "Zero", e[e.Nine = 57] = "Nine", e[e.Semi = 59] = "Semi", e[e.Lt = 60] = "Lt", e[e.Eq = 61] = "Eq", e[e.Gt = 62] = "Gt", e[e.Questionmark = 63] = "Questionmark", e[e.UpperA = 65] = "UpperA", e[e.LowerA = 97] = "LowerA", e[e.UpperF = 70] = "UpperF", e[e.LowerF = 102] = "LowerF", e[e.UpperZ = 90] = "UpperZ", e[e.LowerZ = 122] = "LowerZ", e[e.LowerX = 120] = "LowerX", e[e.OpeningSquareBracket = 91] = "OpeningSquareBracket";
|
|
715
|
-
})(
|
|
716
|
-
var
|
|
765
|
+
})(g || (g = {}));
|
|
766
|
+
var l;
|
|
717
767
|
(function(e) {
|
|
718
768
|
e[e.Text = 1] = "Text", e[e.BeforeTagName = 2] = "BeforeTagName", e[e.InTagName = 3] = "InTagName", e[e.InSelfClosingTag = 4] = "InSelfClosingTag", e[e.BeforeClosingTagName = 5] = "BeforeClosingTagName", e[e.InClosingTagName = 6] = "InClosingTagName", e[e.AfterClosingTagName = 7] = "AfterClosingTagName", e[e.BeforeAttributeName = 8] = "BeforeAttributeName", e[e.InAttributeName = 9] = "InAttributeName", e[e.AfterAttributeName = 10] = "AfterAttributeName", e[e.BeforeAttributeValue = 11] = "BeforeAttributeValue", e[e.InAttributeValueDq = 12] = "InAttributeValueDq", e[e.InAttributeValueSq = 13] = "InAttributeValueSq", e[e.InAttributeValueNq = 14] = "InAttributeValueNq", e[e.BeforeDeclaration = 15] = "BeforeDeclaration", e[e.InDeclaration = 16] = "InDeclaration", e[e.InProcessingInstruction = 17] = "InProcessingInstruction", e[e.BeforeComment = 18] = "BeforeComment", e[e.CDATASequence = 19] = "CDATASequence", e[e.InSpecialComment = 20] = "InSpecialComment", e[e.InCommentLike = 21] = "InCommentLike", e[e.BeforeSpecialS = 22] = "BeforeSpecialS", e[e.BeforeSpecialT = 23] = "BeforeSpecialT", e[e.SpecialStartSequence = 24] = "SpecialStartSequence", e[e.InSpecialTag = 25] = "InSpecialTag", e[e.InEntity = 26] = "InEntity";
|
|
719
|
-
})(
|
|
720
|
-
function
|
|
721
|
-
return e ===
|
|
769
|
+
})(l || (l = {}));
|
|
770
|
+
function U(e) {
|
|
771
|
+
return e === g.Space || e === g.NewLine || e === g.Tab || e === g.FormFeed || e === g.CarriageReturn;
|
|
722
772
|
}
|
|
723
|
-
function
|
|
724
|
-
return e ===
|
|
773
|
+
function tu(e) {
|
|
774
|
+
return e === g.Slash || e === g.Gt || U(e);
|
|
725
775
|
}
|
|
726
|
-
function
|
|
727
|
-
return e >=
|
|
776
|
+
function ze(e) {
|
|
777
|
+
return e >= g.LowerA && e <= g.LowerZ || e >= g.UpperA && e <= g.UpperZ;
|
|
728
778
|
}
|
|
729
|
-
var
|
|
779
|
+
var P;
|
|
730
780
|
(function(e) {
|
|
731
781
|
e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double";
|
|
732
|
-
})(
|
|
733
|
-
const
|
|
782
|
+
})(P || (P = {}));
|
|
783
|
+
const N = {
|
|
734
784
|
Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
|
|
735
785
|
// CDATA[
|
|
736
786
|
CdataEnd: new Uint8Array([93, 93, 62]),
|
|
@@ -759,12 +809,12 @@ const w = {
|
|
|
759
809
|
XmpEnd: new Uint8Array([60, 47, 120, 109, 112])
|
|
760
810
|
// `</xmp`
|
|
761
811
|
};
|
|
762
|
-
class
|
|
812
|
+
class Xe {
|
|
763
813
|
constructor({ xmlMode: u = !1, decodeEntities: t = !0 }, a) {
|
|
764
|
-
this.cbs = a, this.state =
|
|
814
|
+
this.cbs = a, this.state = l.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = l.Text, this.isSpecial = !1, this.running = !0, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.xmlMode = u, this.decodeEntities = t, this.entityDecoder = new We(u ? Pe : Oe, (r, n) => this.emitCodePoint(r, n));
|
|
765
815
|
}
|
|
766
816
|
reset() {
|
|
767
|
-
this.state =
|
|
817
|
+
this.state = l.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = l.Text, this.currentSequence = void 0, this.running = !0, this.offset = 0;
|
|
768
818
|
}
|
|
769
819
|
write(u) {
|
|
770
820
|
this.offset += this.buffer.length, this.buffer = u, this.parse();
|
|
@@ -779,13 +829,13 @@ class Le {
|
|
|
779
829
|
this.running = !0, this.index < this.buffer.length + this.offset && this.parse();
|
|
780
830
|
}
|
|
781
831
|
stateText(u) {
|
|
782
|
-
u ===
|
|
832
|
+
u === g.Lt || !this.decodeEntities && this.fastForwardTo(g.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = l.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && u === g.Amp && this.startEntity();
|
|
783
833
|
}
|
|
784
834
|
stateSpecialStartSequence(u) {
|
|
785
835
|
const t = this.sequenceIndex === this.currentSequence.length;
|
|
786
836
|
if (!(t ? (
|
|
787
837
|
// If we are at the end of the sequence, make sure the tag name has ended
|
|
788
|
-
|
|
838
|
+
tu(u)
|
|
789
839
|
) : (
|
|
790
840
|
// Otherwise, do a case-insensitive comparison
|
|
791
841
|
(u | 32) === this.currentSequence[this.sequenceIndex]
|
|
@@ -795,12 +845,12 @@ class Le {
|
|
|
795
845
|
this.sequenceIndex++;
|
|
796
846
|
return;
|
|
797
847
|
}
|
|
798
|
-
this.sequenceIndex = 0, this.state =
|
|
848
|
+
this.sequenceIndex = 0, this.state = l.InTagName, this.stateInTagName(u);
|
|
799
849
|
}
|
|
800
850
|
/** Look for an end tag. For <title> tags, also decode entities. */
|
|
801
851
|
stateInSpecialTag(u) {
|
|
802
852
|
if (this.sequenceIndex === this.currentSequence.length) {
|
|
803
|
-
if (u ===
|
|
853
|
+
if (u === g.Gt || U(u)) {
|
|
804
854
|
const t = this.index - this.currentSequence.length;
|
|
805
855
|
if (this.sectionStart < t) {
|
|
806
856
|
const a = this.index;
|
|
@@ -811,10 +861,10 @@ class Le {
|
|
|
811
861
|
}
|
|
812
862
|
this.sequenceIndex = 0;
|
|
813
863
|
}
|
|
814
|
-
(u | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence ===
|
|
864
|
+
(u | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === N.TitleEnd ? this.decodeEntities && u === g.Amp && this.startEntity() : this.fastForwardTo(g.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(u === g.Lt);
|
|
815
865
|
}
|
|
816
866
|
stateCDATASequence(u) {
|
|
817
|
-
u ===
|
|
867
|
+
u === N.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === N.Cdata.length && (this.state = l.InCommentLike, this.currentSequence = N.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = l.InDeclaration, this.stateInDeclaration(u));
|
|
818
868
|
}
|
|
819
869
|
/**
|
|
820
870
|
* When we wait for one specific character, we can speed things up
|
|
@@ -837,7 +887,7 @@ class Le {
|
|
|
837
887
|
* - All characters but the start character of the sequence can be skipped.
|
|
838
888
|
*/
|
|
839
889
|
stateInCommentLike(u) {
|
|
840
|
-
u === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence ===
|
|
890
|
+
u === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === N.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = l.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : u !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
|
|
841
891
|
}
|
|
842
892
|
/**
|
|
843
893
|
* HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
|
|
@@ -846,99 +896,99 @@ class Le {
|
|
|
846
896
|
* We allow anything that wouldn't end the tag.
|
|
847
897
|
*/
|
|
848
898
|
isTagStartChar(u) {
|
|
849
|
-
return this.xmlMode ? !
|
|
899
|
+
return this.xmlMode ? !tu(u) : ze(u);
|
|
850
900
|
}
|
|
851
901
|
startSpecial(u, t) {
|
|
852
|
-
this.isSpecial = !0, this.currentSequence = u, this.sequenceIndex = t, this.state =
|
|
902
|
+
this.isSpecial = !0, this.currentSequence = u, this.sequenceIndex = t, this.state = l.SpecialStartSequence;
|
|
853
903
|
}
|
|
854
904
|
stateBeforeTagName(u) {
|
|
855
|
-
if (u ===
|
|
856
|
-
this.state =
|
|
857
|
-
else if (u ===
|
|
858
|
-
this.state =
|
|
905
|
+
if (u === g.ExclamationMark)
|
|
906
|
+
this.state = l.BeforeDeclaration, this.sectionStart = this.index + 1;
|
|
907
|
+
else if (u === g.Questionmark)
|
|
908
|
+
this.state = l.InProcessingInstruction, this.sectionStart = this.index + 1;
|
|
859
909
|
else if (this.isTagStartChar(u)) {
|
|
860
910
|
const t = u | 32;
|
|
861
|
-
this.sectionStart = this.index, this.xmlMode ? this.state =
|
|
862
|
-
} else u ===
|
|
911
|
+
this.sectionStart = this.index, this.xmlMode ? this.state = l.InTagName : t === N.ScriptEnd[2] ? this.state = l.BeforeSpecialS : t === N.TitleEnd[2] || t === N.XmpEnd[2] ? this.state = l.BeforeSpecialT : this.state = l.InTagName;
|
|
912
|
+
} else u === g.Slash ? this.state = l.BeforeClosingTagName : (this.state = l.Text, this.stateText(u));
|
|
863
913
|
}
|
|
864
914
|
stateInTagName(u) {
|
|
865
|
-
|
|
915
|
+
tu(u) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = l.BeforeAttributeName, this.stateBeforeAttributeName(u));
|
|
866
916
|
}
|
|
867
917
|
stateBeforeClosingTagName(u) {
|
|
868
|
-
|
|
918
|
+
U(u) || (u === g.Gt ? this.state = l.Text : (this.state = this.isTagStartChar(u) ? l.InClosingTagName : l.InSpecialComment, this.sectionStart = this.index));
|
|
869
919
|
}
|
|
870
920
|
stateInClosingTagName(u) {
|
|
871
|
-
(u ===
|
|
921
|
+
(u === g.Gt || U(u)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = l.AfterClosingTagName, this.stateAfterClosingTagName(u));
|
|
872
922
|
}
|
|
873
923
|
stateAfterClosingTagName(u) {
|
|
874
|
-
(u ===
|
|
924
|
+
(u === g.Gt || this.fastForwardTo(g.Gt)) && (this.state = l.Text, this.sectionStart = this.index + 1);
|
|
875
925
|
}
|
|
876
926
|
stateBeforeAttributeName(u) {
|
|
877
|
-
u ===
|
|
927
|
+
u === g.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = l.InSpecialTag, this.sequenceIndex = 0) : this.state = l.Text, this.sectionStart = this.index + 1) : u === g.Slash ? this.state = l.InSelfClosingTag : U(u) || (this.state = l.InAttributeName, this.sectionStart = this.index);
|
|
878
928
|
}
|
|
879
929
|
stateInSelfClosingTag(u) {
|
|
880
|
-
u ===
|
|
930
|
+
u === g.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = l.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : U(u) || (this.state = l.BeforeAttributeName, this.stateBeforeAttributeName(u));
|
|
881
931
|
}
|
|
882
932
|
stateInAttributeName(u) {
|
|
883
|
-
(u ===
|
|
933
|
+
(u === g.Eq || tu(u)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = l.AfterAttributeName, this.stateAfterAttributeName(u));
|
|
884
934
|
}
|
|
885
935
|
stateAfterAttributeName(u) {
|
|
886
|
-
u ===
|
|
936
|
+
u === g.Eq ? this.state = l.BeforeAttributeValue : u === g.Slash || u === g.Gt ? (this.cbs.onattribend(P.NoValue, this.sectionStart), this.sectionStart = -1, this.state = l.BeforeAttributeName, this.stateBeforeAttributeName(u)) : U(u) || (this.cbs.onattribend(P.NoValue, this.sectionStart), this.state = l.InAttributeName, this.sectionStart = this.index);
|
|
887
937
|
}
|
|
888
938
|
stateBeforeAttributeValue(u) {
|
|
889
|
-
u ===
|
|
939
|
+
u === g.DoubleQuote ? (this.state = l.InAttributeValueDq, this.sectionStart = this.index + 1) : u === g.SingleQuote ? (this.state = l.InAttributeValueSq, this.sectionStart = this.index + 1) : U(u) || (this.sectionStart = this.index, this.state = l.InAttributeValueNq, this.stateInAttributeValueNoQuotes(u));
|
|
890
940
|
}
|
|
891
941
|
handleInAttributeValue(u, t) {
|
|
892
|
-
u === t || !this.decodeEntities && this.fastForwardTo(t) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(t ===
|
|
942
|
+
u === t || !this.decodeEntities && this.fastForwardTo(t) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(t === g.DoubleQuote ? P.Double : P.Single, this.index + 1), this.state = l.BeforeAttributeName) : this.decodeEntities && u === g.Amp && this.startEntity();
|
|
893
943
|
}
|
|
894
944
|
stateInAttributeValueDoubleQuotes(u) {
|
|
895
|
-
this.handleInAttributeValue(u,
|
|
945
|
+
this.handleInAttributeValue(u, g.DoubleQuote);
|
|
896
946
|
}
|
|
897
947
|
stateInAttributeValueSingleQuotes(u) {
|
|
898
|
-
this.handleInAttributeValue(u,
|
|
948
|
+
this.handleInAttributeValue(u, g.SingleQuote);
|
|
899
949
|
}
|
|
900
950
|
stateInAttributeValueNoQuotes(u) {
|
|
901
|
-
|
|
951
|
+
U(u) || u === g.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(P.Unquoted, this.index), this.state = l.BeforeAttributeName, this.stateBeforeAttributeName(u)) : this.decodeEntities && u === g.Amp && this.startEntity();
|
|
902
952
|
}
|
|
903
953
|
stateBeforeDeclaration(u) {
|
|
904
|
-
u ===
|
|
954
|
+
u === g.OpeningSquareBracket ? (this.state = l.CDATASequence, this.sequenceIndex = 0) : this.state = u === g.Dash ? l.BeforeComment : l.InDeclaration;
|
|
905
955
|
}
|
|
906
956
|
stateInDeclaration(u) {
|
|
907
|
-
(u ===
|
|
957
|
+
(u === g.Gt || this.fastForwardTo(g.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = l.Text, this.sectionStart = this.index + 1);
|
|
908
958
|
}
|
|
909
959
|
stateInProcessingInstruction(u) {
|
|
910
|
-
(u ===
|
|
960
|
+
(u === g.Gt || this.fastForwardTo(g.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = l.Text, this.sectionStart = this.index + 1);
|
|
911
961
|
}
|
|
912
962
|
stateBeforeComment(u) {
|
|
913
|
-
u ===
|
|
963
|
+
u === g.Dash ? (this.state = l.InCommentLike, this.currentSequence = N.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = l.InDeclaration;
|
|
914
964
|
}
|
|
915
965
|
stateInSpecialComment(u) {
|
|
916
|
-
(u ===
|
|
966
|
+
(u === g.Gt || this.fastForwardTo(g.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = l.Text, this.sectionStart = this.index + 1);
|
|
917
967
|
}
|
|
918
968
|
stateBeforeSpecialS(u) {
|
|
919
969
|
const t = u | 32;
|
|
920
|
-
t ===
|
|
970
|
+
t === N.ScriptEnd[3] ? this.startSpecial(N.ScriptEnd, 4) : t === N.StyleEnd[3] ? this.startSpecial(N.StyleEnd, 4) : (this.state = l.InTagName, this.stateInTagName(u));
|
|
921
971
|
}
|
|
922
972
|
stateBeforeSpecialT(u) {
|
|
923
973
|
switch (u | 32) {
|
|
924
|
-
case
|
|
925
|
-
this.startSpecial(
|
|
974
|
+
case N.TitleEnd[3]: {
|
|
975
|
+
this.startSpecial(N.TitleEnd, 4);
|
|
926
976
|
break;
|
|
927
977
|
}
|
|
928
|
-
case
|
|
929
|
-
this.startSpecial(
|
|
978
|
+
case N.TextareaEnd[3]: {
|
|
979
|
+
this.startSpecial(N.TextareaEnd, 4);
|
|
930
980
|
break;
|
|
931
981
|
}
|
|
932
|
-
case
|
|
933
|
-
this.startSpecial(
|
|
982
|
+
case N.XmpEnd[3]: {
|
|
983
|
+
this.startSpecial(N.XmpEnd, 4);
|
|
934
984
|
break;
|
|
935
985
|
}
|
|
936
986
|
default:
|
|
937
|
-
this.state =
|
|
987
|
+
this.state = l.InTagName, this.stateInTagName(u);
|
|
938
988
|
}
|
|
939
989
|
}
|
|
940
990
|
startEntity() {
|
|
941
|
-
this.baseState = this.state, this.state =
|
|
991
|
+
this.baseState = this.state, this.state = l.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? O.Strict : this.baseState === l.Text || this.baseState === l.InSpecialTag ? O.Legacy : O.Attribute);
|
|
942
992
|
}
|
|
943
993
|
stateInEntity() {
|
|
944
994
|
const u = this.entityDecoder.write(this.buffer, this.index - this.offset);
|
|
@@ -948,7 +998,7 @@ class Le {
|
|
|
948
998
|
* Remove data that has already been consumed from the buffer.
|
|
949
999
|
*/
|
|
950
1000
|
cleanup() {
|
|
951
|
-
this.running && this.sectionStart !== this.index && (this.state ===
|
|
1001
|
+
this.running && this.sectionStart !== this.index && (this.state === l.Text || this.state === l.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === l.InAttributeValueDq || this.state === l.InAttributeValueSq || this.state === l.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
|
|
952
1002
|
}
|
|
953
1003
|
shouldContinue() {
|
|
954
1004
|
return this.index < this.buffer.length + this.offset && this.running;
|
|
@@ -962,107 +1012,107 @@ class Le {
|
|
|
962
1012
|
for (; this.shouldContinue(); ) {
|
|
963
1013
|
const u = this.buffer.charCodeAt(this.index - this.offset);
|
|
964
1014
|
switch (this.state) {
|
|
965
|
-
case
|
|
1015
|
+
case l.Text: {
|
|
966
1016
|
this.stateText(u);
|
|
967
1017
|
break;
|
|
968
1018
|
}
|
|
969
|
-
case
|
|
1019
|
+
case l.SpecialStartSequence: {
|
|
970
1020
|
this.stateSpecialStartSequence(u);
|
|
971
1021
|
break;
|
|
972
1022
|
}
|
|
973
|
-
case
|
|
1023
|
+
case l.InSpecialTag: {
|
|
974
1024
|
this.stateInSpecialTag(u);
|
|
975
1025
|
break;
|
|
976
1026
|
}
|
|
977
|
-
case
|
|
1027
|
+
case l.CDATASequence: {
|
|
978
1028
|
this.stateCDATASequence(u);
|
|
979
1029
|
break;
|
|
980
1030
|
}
|
|
981
|
-
case
|
|
1031
|
+
case l.InAttributeValueDq: {
|
|
982
1032
|
this.stateInAttributeValueDoubleQuotes(u);
|
|
983
1033
|
break;
|
|
984
1034
|
}
|
|
985
|
-
case
|
|
1035
|
+
case l.InAttributeName: {
|
|
986
1036
|
this.stateInAttributeName(u);
|
|
987
1037
|
break;
|
|
988
1038
|
}
|
|
989
|
-
case
|
|
1039
|
+
case l.InCommentLike: {
|
|
990
1040
|
this.stateInCommentLike(u);
|
|
991
1041
|
break;
|
|
992
1042
|
}
|
|
993
|
-
case
|
|
1043
|
+
case l.InSpecialComment: {
|
|
994
1044
|
this.stateInSpecialComment(u);
|
|
995
1045
|
break;
|
|
996
1046
|
}
|
|
997
|
-
case
|
|
1047
|
+
case l.BeforeAttributeName: {
|
|
998
1048
|
this.stateBeforeAttributeName(u);
|
|
999
1049
|
break;
|
|
1000
1050
|
}
|
|
1001
|
-
case
|
|
1051
|
+
case l.InTagName: {
|
|
1002
1052
|
this.stateInTagName(u);
|
|
1003
1053
|
break;
|
|
1004
1054
|
}
|
|
1005
|
-
case
|
|
1055
|
+
case l.InClosingTagName: {
|
|
1006
1056
|
this.stateInClosingTagName(u);
|
|
1007
1057
|
break;
|
|
1008
1058
|
}
|
|
1009
|
-
case
|
|
1059
|
+
case l.BeforeTagName: {
|
|
1010
1060
|
this.stateBeforeTagName(u);
|
|
1011
1061
|
break;
|
|
1012
1062
|
}
|
|
1013
|
-
case
|
|
1063
|
+
case l.AfterAttributeName: {
|
|
1014
1064
|
this.stateAfterAttributeName(u);
|
|
1015
1065
|
break;
|
|
1016
1066
|
}
|
|
1017
|
-
case
|
|
1067
|
+
case l.InAttributeValueSq: {
|
|
1018
1068
|
this.stateInAttributeValueSingleQuotes(u);
|
|
1019
1069
|
break;
|
|
1020
1070
|
}
|
|
1021
|
-
case
|
|
1071
|
+
case l.BeforeAttributeValue: {
|
|
1022
1072
|
this.stateBeforeAttributeValue(u);
|
|
1023
1073
|
break;
|
|
1024
1074
|
}
|
|
1025
|
-
case
|
|
1075
|
+
case l.BeforeClosingTagName: {
|
|
1026
1076
|
this.stateBeforeClosingTagName(u);
|
|
1027
1077
|
break;
|
|
1028
1078
|
}
|
|
1029
|
-
case
|
|
1079
|
+
case l.AfterClosingTagName: {
|
|
1030
1080
|
this.stateAfterClosingTagName(u);
|
|
1031
1081
|
break;
|
|
1032
1082
|
}
|
|
1033
|
-
case
|
|
1083
|
+
case l.BeforeSpecialS: {
|
|
1034
1084
|
this.stateBeforeSpecialS(u);
|
|
1035
1085
|
break;
|
|
1036
1086
|
}
|
|
1037
|
-
case
|
|
1087
|
+
case l.BeforeSpecialT: {
|
|
1038
1088
|
this.stateBeforeSpecialT(u);
|
|
1039
1089
|
break;
|
|
1040
1090
|
}
|
|
1041
|
-
case
|
|
1091
|
+
case l.InAttributeValueNq: {
|
|
1042
1092
|
this.stateInAttributeValueNoQuotes(u);
|
|
1043
1093
|
break;
|
|
1044
1094
|
}
|
|
1045
|
-
case
|
|
1095
|
+
case l.InSelfClosingTag: {
|
|
1046
1096
|
this.stateInSelfClosingTag(u);
|
|
1047
1097
|
break;
|
|
1048
1098
|
}
|
|
1049
|
-
case
|
|
1099
|
+
case l.InDeclaration: {
|
|
1050
1100
|
this.stateInDeclaration(u);
|
|
1051
1101
|
break;
|
|
1052
1102
|
}
|
|
1053
|
-
case
|
|
1103
|
+
case l.BeforeDeclaration: {
|
|
1054
1104
|
this.stateBeforeDeclaration(u);
|
|
1055
1105
|
break;
|
|
1056
1106
|
}
|
|
1057
|
-
case
|
|
1107
|
+
case l.BeforeComment: {
|
|
1058
1108
|
this.stateBeforeComment(u);
|
|
1059
1109
|
break;
|
|
1060
1110
|
}
|
|
1061
|
-
case
|
|
1111
|
+
case l.InProcessingInstruction: {
|
|
1062
1112
|
this.stateInProcessingInstruction(u);
|
|
1063
1113
|
break;
|
|
1064
1114
|
}
|
|
1065
|
-
case
|
|
1115
|
+
case l.InEntity: {
|
|
1066
1116
|
this.stateInEntity();
|
|
1067
1117
|
break;
|
|
1068
1118
|
}
|
|
@@ -1072,18 +1122,18 @@ class Le {
|
|
|
1072
1122
|
this.cleanup();
|
|
1073
1123
|
}
|
|
1074
1124
|
finish() {
|
|
1075
|
-
this.state ===
|
|
1125
|
+
this.state === l.InEntity && (this.entityDecoder.end(), this.state = this.baseState), this.handleTrailingData(), this.cbs.onend();
|
|
1076
1126
|
}
|
|
1077
1127
|
/** Handle any trailing data. */
|
|
1078
1128
|
handleTrailingData() {
|
|
1079
1129
|
const u = this.buffer.length + this.offset;
|
|
1080
|
-
this.sectionStart >= u || (this.state ===
|
|
1130
|
+
this.sectionStart >= u || (this.state === l.InCommentLike ? this.currentSequence === N.CdataEnd ? this.cbs.oncdata(this.sectionStart, u, 0) : this.cbs.oncomment(this.sectionStart, u, 0) : this.state === l.InTagName || this.state === l.BeforeAttributeName || this.state === l.BeforeAttributeValue || this.state === l.AfterAttributeName || this.state === l.InAttributeName || this.state === l.InAttributeValueSq || this.state === l.InAttributeValueDq || this.state === l.InAttributeValueNq || this.state === l.InClosingTagName || this.cbs.ontext(this.sectionStart, u));
|
|
1081
1131
|
}
|
|
1082
1132
|
emitCodePoint(u, t) {
|
|
1083
|
-
this.baseState !==
|
|
1133
|
+
this.baseState !== l.Text && this.baseState !== l.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(u)) : (this.sectionStart < this.entityStart && this.cbs.ontext(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + t, this.index = this.sectionStart - 1, this.cbs.ontextentity(u, this.sectionStart));
|
|
1084
1134
|
}
|
|
1085
1135
|
}
|
|
1086
|
-
const
|
|
1136
|
+
const X = /* @__PURE__ */ new Set([
|
|
1087
1137
|
"input",
|
|
1088
1138
|
"option",
|
|
1089
1139
|
"optgroup",
|
|
@@ -1091,55 +1141,55 @@ const W = /* @__PURE__ */ new Set([
|
|
|
1091
1141
|
"button",
|
|
1092
1142
|
"datalist",
|
|
1093
1143
|
"textarea"
|
|
1094
|
-
]),
|
|
1144
|
+
]), k = /* @__PURE__ */ new Set(["p"]), ku = /* @__PURE__ */ new Set(["thead", "tbody"]), Tu = /* @__PURE__ */ new Set(["dd", "dt"]), Nu = /* @__PURE__ */ new Set(["rt", "rp"]), Qe = /* @__PURE__ */ new Map([
|
|
1095
1145
|
["tr", /* @__PURE__ */ new Set(["tr", "th", "td"])],
|
|
1096
1146
|
["th", /* @__PURE__ */ new Set(["th"])],
|
|
1097
1147
|
["td", /* @__PURE__ */ new Set(["thead", "th", "td"])],
|
|
1098
1148
|
["body", /* @__PURE__ */ new Set(["head", "link", "script"])],
|
|
1099
1149
|
["li", /* @__PURE__ */ new Set(["li"])],
|
|
1100
|
-
["p",
|
|
1101
|
-
["h1",
|
|
1102
|
-
["h2",
|
|
1103
|
-
["h3",
|
|
1104
|
-
["h4",
|
|
1105
|
-
["h5",
|
|
1106
|
-
["h6",
|
|
1107
|
-
["select",
|
|
1108
|
-
["input",
|
|
1109
|
-
["output",
|
|
1110
|
-
["button",
|
|
1111
|
-
["datalist",
|
|
1112
|
-
["textarea",
|
|
1150
|
+
["p", k],
|
|
1151
|
+
["h1", k],
|
|
1152
|
+
["h2", k],
|
|
1153
|
+
["h3", k],
|
|
1154
|
+
["h4", k],
|
|
1155
|
+
["h5", k],
|
|
1156
|
+
["h6", k],
|
|
1157
|
+
["select", X],
|
|
1158
|
+
["input", X],
|
|
1159
|
+
["output", X],
|
|
1160
|
+
["button", X],
|
|
1161
|
+
["datalist", X],
|
|
1162
|
+
["textarea", X],
|
|
1113
1163
|
["option", /* @__PURE__ */ new Set(["option"])],
|
|
1114
1164
|
["optgroup", /* @__PURE__ */ new Set(["optgroup", "option"])],
|
|
1115
|
-
["dd",
|
|
1116
|
-
["dt",
|
|
1117
|
-
["address",
|
|
1118
|
-
["article",
|
|
1119
|
-
["aside",
|
|
1120
|
-
["blockquote",
|
|
1121
|
-
["details",
|
|
1122
|
-
["div",
|
|
1123
|
-
["dl",
|
|
1124
|
-
["fieldset",
|
|
1125
|
-
["figcaption",
|
|
1126
|
-
["figure",
|
|
1127
|
-
["footer",
|
|
1128
|
-
["form",
|
|
1129
|
-
["header",
|
|
1130
|
-
["hr",
|
|
1131
|
-
["main",
|
|
1132
|
-
["nav",
|
|
1133
|
-
["ol",
|
|
1134
|
-
["pre",
|
|
1135
|
-
["section",
|
|
1136
|
-
["table",
|
|
1137
|
-
["ul",
|
|
1138
|
-
["rt",
|
|
1139
|
-
["rp",
|
|
1140
|
-
["tbody",
|
|
1141
|
-
["tfoot",
|
|
1142
|
-
]),
|
|
1165
|
+
["dd", Tu],
|
|
1166
|
+
["dt", Tu],
|
|
1167
|
+
["address", k],
|
|
1168
|
+
["article", k],
|
|
1169
|
+
["aside", k],
|
|
1170
|
+
["blockquote", k],
|
|
1171
|
+
["details", k],
|
|
1172
|
+
["div", k],
|
|
1173
|
+
["dl", k],
|
|
1174
|
+
["fieldset", k],
|
|
1175
|
+
["figcaption", k],
|
|
1176
|
+
["figure", k],
|
|
1177
|
+
["footer", k],
|
|
1178
|
+
["form", k],
|
|
1179
|
+
["header", k],
|
|
1180
|
+
["hr", k],
|
|
1181
|
+
["main", k],
|
|
1182
|
+
["nav", k],
|
|
1183
|
+
["ol", k],
|
|
1184
|
+
["pre", k],
|
|
1185
|
+
["section", k],
|
|
1186
|
+
["table", k],
|
|
1187
|
+
["ul", k],
|
|
1188
|
+
["rt", Nu],
|
|
1189
|
+
["rp", Nu],
|
|
1190
|
+
["tbody", ku],
|
|
1191
|
+
["tfoot", ku]
|
|
1192
|
+
]), Ze = /* @__PURE__ */ new Set([
|
|
1143
1193
|
"area",
|
|
1144
1194
|
"base",
|
|
1145
1195
|
"basefont",
|
|
@@ -1159,7 +1209,7 @@ const W = /* @__PURE__ */ new Set([
|
|
|
1159
1209
|
"source",
|
|
1160
1210
|
"track",
|
|
1161
1211
|
"wbr"
|
|
1162
|
-
]),
|
|
1212
|
+
]), ju = /* @__PURE__ */ new Set(["math", "svg"]), Vu = /* @__PURE__ */ new Set([
|
|
1163
1213
|
"mi",
|
|
1164
1214
|
"mo",
|
|
1165
1215
|
"mn",
|
|
@@ -1169,30 +1219,30 @@ const W = /* @__PURE__ */ new Set([
|
|
|
1169
1219
|
"foreignobject",
|
|
1170
1220
|
"desc",
|
|
1171
1221
|
"title"
|
|
1172
|
-
]),
|
|
1173
|
-
class
|
|
1222
|
+
]), Ke = /\s|\//;
|
|
1223
|
+
class Ye {
|
|
1174
1224
|
constructor(u, t = {}) {
|
|
1175
|
-
var a,
|
|
1176
|
-
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 = u ?? {}, this.htmlMode = !this.options.xmlMode, this.lowerCaseTagNames = (a = t.lowerCaseTags) !== null && a !== void 0 ? a : this.htmlMode, this.lowerCaseAttributeNames = (
|
|
1225
|
+
var a, r, n, i, s, o;
|
|
1226
|
+
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 = u ?? {}, this.htmlMode = !this.options.xmlMode, this.lowerCaseTagNames = (a = t.lowerCaseTags) !== null && a !== void 0 ? a : this.htmlMode, this.lowerCaseAttributeNames = (r = t.lowerCaseAttributeNames) !== null && r !== void 0 ? r : this.htmlMode, this.recognizeSelfClosing = (n = t.recognizeSelfClosing) !== null && n !== void 0 ? n : !this.htmlMode, this.tokenizer = new ((i = t.Tokenizer) !== null && i !== void 0 ? i : Xe)(this.options, this), this.foreignContext = [!this.htmlMode], (o = (s = this.cbs).onparserinit) === null || o === void 0 || o.call(s, this);
|
|
1177
1227
|
}
|
|
1178
1228
|
// Tokenizer event handlers
|
|
1179
1229
|
/** @internal */
|
|
1180
1230
|
ontext(u, t) {
|
|
1181
|
-
var a,
|
|
1182
|
-
const
|
|
1183
|
-
this.endIndex = t - 1, (
|
|
1231
|
+
var a, r;
|
|
1232
|
+
const n = this.getSlice(u, t);
|
|
1233
|
+
this.endIndex = t - 1, (r = (a = this.cbs).ontext) === null || r === void 0 || r.call(a, n), this.startIndex = t;
|
|
1184
1234
|
}
|
|
1185
1235
|
/** @internal */
|
|
1186
1236
|
ontextentity(u, t) {
|
|
1187
|
-
var a,
|
|
1188
|
-
this.endIndex = t - 1, (
|
|
1237
|
+
var a, r;
|
|
1238
|
+
this.endIndex = t - 1, (r = (a = this.cbs).ontext) === null || r === void 0 || r.call(a, Au(u)), this.startIndex = t;
|
|
1189
1239
|
}
|
|
1190
1240
|
/**
|
|
1191
1241
|
* Checks if the current tag is a void element. Override this if you want
|
|
1192
1242
|
* to specify your own additional void elements.
|
|
1193
1243
|
*/
|
|
1194
1244
|
isVoidElement(u) {
|
|
1195
|
-
return this.htmlMode &&
|
|
1245
|
+
return this.htmlMode && Ze.has(u);
|
|
1196
1246
|
}
|
|
1197
1247
|
/** @internal */
|
|
1198
1248
|
onopentagname(u, t) {
|
|
@@ -1201,15 +1251,15 @@ class Pe {
|
|
|
1201
1251
|
this.lowerCaseTagNames && (a = a.toLowerCase()), this.emitOpenTag(a);
|
|
1202
1252
|
}
|
|
1203
1253
|
emitOpenTag(u) {
|
|
1204
|
-
var t, a,
|
|
1254
|
+
var t, a, r, n;
|
|
1205
1255
|
this.openTagStart = this.startIndex, this.tagname = u;
|
|
1206
|
-
const
|
|
1207
|
-
if (
|
|
1208
|
-
for (; this.stack.length > 0 &&
|
|
1209
|
-
const
|
|
1210
|
-
(a = (t = this.cbs).onclosetag) === null || a === void 0 || a.call(t,
|
|
1256
|
+
const i = this.htmlMode && Qe.get(u);
|
|
1257
|
+
if (i)
|
|
1258
|
+
for (; this.stack.length > 0 && i.has(this.stack[0]); ) {
|
|
1259
|
+
const s = this.stack.shift();
|
|
1260
|
+
(a = (t = this.cbs).onclosetag) === null || a === void 0 || a.call(t, s, !0);
|
|
1211
1261
|
}
|
|
1212
|
-
this.isVoidElement(u) || (this.stack.unshift(u), this.htmlMode && (
|
|
1262
|
+
this.isVoidElement(u) || (this.stack.unshift(u), this.htmlMode && (ju.has(u) ? this.foreignContext.unshift(!0) : Vu.has(u) && this.foreignContext.unshift(!1))), (n = (r = this.cbs).onopentagname) === null || n === void 0 || n.call(r, u), this.cbs.onopentag && (this.attribs = {});
|
|
1213
1263
|
}
|
|
1214
1264
|
endOpenTag(u) {
|
|
1215
1265
|
var t, a;
|
|
@@ -1221,19 +1271,19 @@ class Pe {
|
|
|
1221
1271
|
}
|
|
1222
1272
|
/** @internal */
|
|
1223
1273
|
onclosetag(u, t) {
|
|
1224
|
-
var a,
|
|
1274
|
+
var a, r, n, i, s, o, c, d;
|
|
1225
1275
|
this.endIndex = t;
|
|
1226
|
-
let
|
|
1227
|
-
if (this.lowerCaseTagNames && (
|
|
1228
|
-
this.htmlMode &&
|
|
1276
|
+
let f = this.getSlice(u, t);
|
|
1277
|
+
if (this.lowerCaseTagNames && (f = f.toLowerCase()), this.htmlMode && (ju.has(f) || Vu.has(f)) && this.foreignContext.shift(), this.isVoidElement(f))
|
|
1278
|
+
this.htmlMode && f === "br" && ((i = (n = this.cbs).onopentagname) === null || i === void 0 || i.call(n, "br"), (o = (s = this.cbs).onopentag) === null || o === void 0 || o.call(s, "br", {}, !0), (d = (c = this.cbs).onclosetag) === null || d === void 0 || d.call(c, "br", !1));
|
|
1229
1279
|
else {
|
|
1230
|
-
const
|
|
1231
|
-
if (
|
|
1232
|
-
for (let
|
|
1233
|
-
const
|
|
1234
|
-
(
|
|
1280
|
+
const p = this.stack.indexOf(f);
|
|
1281
|
+
if (p !== -1)
|
|
1282
|
+
for (let b = 0; b <= p; b++) {
|
|
1283
|
+
const h = this.stack.shift();
|
|
1284
|
+
(r = (a = this.cbs).onclosetag) === null || r === void 0 || r.call(a, h, b !== p);
|
|
1235
1285
|
}
|
|
1236
|
-
else this.htmlMode &&
|
|
1286
|
+
else this.htmlMode && f === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(!0));
|
|
1237
1287
|
}
|
|
1238
1288
|
this.startIndex = t + 1;
|
|
1239
1289
|
}
|
|
@@ -1243,8 +1293,8 @@ class Pe {
|
|
|
1243
1293
|
}
|
|
1244
1294
|
closeCurrentTag(u) {
|
|
1245
1295
|
var t, a;
|
|
1246
|
-
const
|
|
1247
|
-
this.endOpenTag(u), this.stack[0] ===
|
|
1296
|
+
const r = this.tagname;
|
|
1297
|
+
this.endOpenTag(u), this.stack[0] === r && ((a = (t = this.cbs).onclosetag) === null || a === void 0 || a.call(t, r, !u), this.stack.shift());
|
|
1248
1298
|
}
|
|
1249
1299
|
/** @internal */
|
|
1250
1300
|
onattribname(u, t) {
|
|
@@ -1258,15 +1308,15 @@ class Pe {
|
|
|
1258
1308
|
}
|
|
1259
1309
|
/** @internal */
|
|
1260
1310
|
onattribentity(u) {
|
|
1261
|
-
this.attribvalue +=
|
|
1311
|
+
this.attribvalue += Au(u);
|
|
1262
1312
|
}
|
|
1263
1313
|
/** @internal */
|
|
1264
1314
|
onattribend(u, t) {
|
|
1265
|
-
var a,
|
|
1266
|
-
this.endIndex = t, (
|
|
1315
|
+
var a, r;
|
|
1316
|
+
this.endIndex = t, (r = (a = this.cbs).onattribute) === null || r === void 0 || r.call(a, this.attribname, this.attribvalue, u === P.Double ? '"' : u === P.Single ? "'" : u === P.NoValue ? void 0 : null), this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname) && (this.attribs[this.attribname] = this.attribvalue), this.attribvalue = "";
|
|
1267
1317
|
}
|
|
1268
1318
|
getInstructionName(u) {
|
|
1269
|
-
const t = u.search(
|
|
1319
|
+
const t = u.search(Ke);
|
|
1270
1320
|
let a = t < 0 ? u : u.substr(0, t);
|
|
1271
1321
|
return this.lowerCaseTagNames && (a = a.toLowerCase()), a;
|
|
1272
1322
|
}
|
|
@@ -1275,8 +1325,8 @@ class Pe {
|
|
|
1275
1325
|
this.endIndex = t;
|
|
1276
1326
|
const a = this.getSlice(u, t);
|
|
1277
1327
|
if (this.cbs.onprocessinginstruction) {
|
|
1278
|
-
const
|
|
1279
|
-
this.cbs.onprocessinginstruction(`!${
|
|
1328
|
+
const r = this.getInstructionName(a);
|
|
1329
|
+
this.cbs.onprocessinginstruction(`!${r}`, `!${a}`);
|
|
1280
1330
|
}
|
|
1281
1331
|
this.startIndex = t + 1;
|
|
1282
1332
|
}
|
|
@@ -1285,22 +1335,22 @@ class Pe {
|
|
|
1285
1335
|
this.endIndex = t;
|
|
1286
1336
|
const a = this.getSlice(u, t);
|
|
1287
1337
|
if (this.cbs.onprocessinginstruction) {
|
|
1288
|
-
const
|
|
1289
|
-
this.cbs.onprocessinginstruction(`?${
|
|
1338
|
+
const r = this.getInstructionName(a);
|
|
1339
|
+
this.cbs.onprocessinginstruction(`?${r}`, `?${a}`);
|
|
1290
1340
|
}
|
|
1291
1341
|
this.startIndex = t + 1;
|
|
1292
1342
|
}
|
|
1293
1343
|
/** @internal */
|
|
1294
1344
|
oncomment(u, t, a) {
|
|
1295
|
-
var
|
|
1296
|
-
this.endIndex = t, (
|
|
1345
|
+
var r, n, i, s;
|
|
1346
|
+
this.endIndex = t, (n = (r = this.cbs).oncomment) === null || n === void 0 || n.call(r, this.getSlice(u, t - a)), (s = (i = this.cbs).oncommentend) === null || s === void 0 || s.call(i), this.startIndex = t + 1;
|
|
1297
1347
|
}
|
|
1298
1348
|
/** @internal */
|
|
1299
1349
|
oncdata(u, t, a) {
|
|
1300
|
-
var
|
|
1350
|
+
var r, n, i, s, o, c, d, f, p, b;
|
|
1301
1351
|
this.endIndex = t;
|
|
1302
|
-
const
|
|
1303
|
-
!this.htmlMode || this.options.recognizeCDATA ? ((
|
|
1352
|
+
const h = this.getSlice(u, t - a);
|
|
1353
|
+
!this.htmlMode || this.options.recognizeCDATA ? ((n = (r = this.cbs).oncdatastart) === null || n === void 0 || n.call(r), (s = (i = this.cbs).ontext) === null || s === void 0 || s.call(i, h), (c = (o = this.cbs).oncdataend) === null || c === void 0 || c.call(o)) : ((f = (d = this.cbs).oncomment) === null || f === void 0 || f.call(d, `[CDATA[${h}]]`), (b = (p = this.cbs).oncommentend) === null || b === void 0 || b.call(p)), this.startIndex = t + 1;
|
|
1304
1354
|
}
|
|
1305
1355
|
/** @internal */
|
|
1306
1356
|
onend() {
|
|
@@ -1316,8 +1366,8 @@ class Pe {
|
|
|
1316
1366
|
* Resets the parser to a blank state, ready to parse a new HTML document
|
|
1317
1367
|
*/
|
|
1318
1368
|
reset() {
|
|
1319
|
-
var u, t, a,
|
|
1320
|
-
(t = (u = this.cbs).onreset) === null || t === void 0 || t.call(u), this.tokenizer.reset(), this.tagname = "", this.attribname = "", this.attribs = null, this.stack.length = 0, this.startIndex = 0, this.endIndex = 0, (
|
|
1369
|
+
var u, t, a, r;
|
|
1370
|
+
(t = (u = this.cbs).onreset) === null || t === void 0 || t.call(u), this.tokenizer.reset(), this.tagname = "", this.attribname = "", this.attribs = null, this.stack.length = 0, this.startIndex = 0, this.endIndex = 0, (r = (a = this.cbs).onparserinit) === null || r === void 0 || r.call(a, this), this.buffers.length = 0, this.foreignContext.length = 0, this.foreignContext.unshift(!this.htmlMode), this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1;
|
|
1321
1371
|
}
|
|
1322
1372
|
/**
|
|
1323
1373
|
* Resets the parser, then parses a complete document and
|
|
@@ -1398,140 +1448,140 @@ class Pe {
|
|
|
1398
1448
|
this.end(u);
|
|
1399
1449
|
}
|
|
1400
1450
|
}
|
|
1401
|
-
function
|
|
1451
|
+
function qu(e, u = "web") {
|
|
1402
1452
|
const t = { name: "", children: [] }, a = [t];
|
|
1403
|
-
let
|
|
1404
|
-
const
|
|
1453
|
+
let r = "";
|
|
1454
|
+
const n = new Ye(
|
|
1405
1455
|
{
|
|
1406
|
-
onopentag: (
|
|
1407
|
-
const
|
|
1408
|
-
|
|
1456
|
+
onopentag: (i, s, o) => {
|
|
1457
|
+
const c = a[a.length - 1];
|
|
1458
|
+
r.trim() && (Array.isArray(c.children) ? c.children.push({
|
|
1409
1459
|
name: "span",
|
|
1410
|
-
children:
|
|
1411
|
-
}) :
|
|
1412
|
-
const
|
|
1413
|
-
(
|
|
1414
|
-
let [
|
|
1415
|
-
return
|
|
1460
|
+
children: r.trim()
|
|
1461
|
+
}) : c.children = r.trim(), r = "");
|
|
1462
|
+
const d = Object.entries(s || {}).reduce(
|
|
1463
|
+
(p, b) => {
|
|
1464
|
+
let [h = "", S = ""] = b;
|
|
1465
|
+
return h && (p[h] = S), p;
|
|
1416
1466
|
},
|
|
1417
1467
|
{}
|
|
1418
1468
|
);
|
|
1419
|
-
|
|
1420
|
-
const
|
|
1421
|
-
name:
|
|
1422
|
-
props:
|
|
1469
|
+
d.style && (d.style = Xu(d.style));
|
|
1470
|
+
const f = {
|
|
1471
|
+
name: zu(i, u),
|
|
1472
|
+
props: d
|
|
1423
1473
|
};
|
|
1424
|
-
Array.isArray(
|
|
1474
|
+
Array.isArray(c.children) ? c.children.push(f) : c.children ? c.children = [
|
|
1425
1475
|
{
|
|
1426
1476
|
name: "span",
|
|
1427
|
-
children:
|
|
1477
|
+
children: c.children
|
|
1428
1478
|
},
|
|
1429
|
-
|
|
1430
|
-
] :
|
|
1479
|
+
f
|
|
1480
|
+
] : c.children = [f], o || a.push(f);
|
|
1431
1481
|
},
|
|
1432
|
-
ontext: (
|
|
1433
|
-
const
|
|
1434
|
-
|
|
1482
|
+
ontext: (i) => {
|
|
1483
|
+
const s = i.trim();
|
|
1484
|
+
s && s !== '"' && (r += s);
|
|
1435
1485
|
},
|
|
1436
1486
|
onclosetag: () => {
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1487
|
+
const i = a.pop();
|
|
1488
|
+
r.trim() && (Array.isArray(i?.children) ? i.children.push({
|
|
1439
1489
|
name: "span",
|
|
1440
|
-
children:
|
|
1441
|
-
}) :
|
|
1490
|
+
children: r.trim()
|
|
1491
|
+
}) : i && (i.children = r.trim()), r = "");
|
|
1442
1492
|
}
|
|
1443
1493
|
},
|
|
1444
1494
|
{ decodeEntities: !0 }
|
|
1445
1495
|
);
|
|
1446
|
-
return
|
|
1496
|
+
return n.write(e.replace(/\\"/g, '"')), n.end(), t.children || [];
|
|
1447
1497
|
}
|
|
1448
|
-
function
|
|
1498
|
+
function ut(e, u) {
|
|
1449
1499
|
const a = {
|
|
1450
|
-
imports:
|
|
1500
|
+
imports: et(e),
|
|
1451
1501
|
emits: [],
|
|
1452
1502
|
errors: []
|
|
1453
|
-
},
|
|
1454
|
-
return
|
|
1455
|
-
ExportDefaultDeclaration(
|
|
1456
|
-
const
|
|
1457
|
-
if (
|
|
1458
|
-
const
|
|
1459
|
-
if (
|
|
1460
|
-
const o =
|
|
1461
|
-
(
|
|
1462
|
-
),
|
|
1463
|
-
(
|
|
1464
|
-
),
|
|
1465
|
-
(
|
|
1503
|
+
}, r = B(e);
|
|
1504
|
+
return J(r, {
|
|
1505
|
+
ExportDefaultDeclaration(n) {
|
|
1506
|
+
const i = n.node.declaration;
|
|
1507
|
+
if (i.type !== "CallExpression") return;
|
|
1508
|
+
const s = i.arguments[0];
|
|
1509
|
+
if (s?.type !== "ObjectExpression") return;
|
|
1510
|
+
const o = s.properties.filter(
|
|
1511
|
+
(f) => f.type === "ObjectProperty"
|
|
1512
|
+
), c = s.properties.filter(
|
|
1513
|
+
(f) => f.type == "ObjectMethod"
|
|
1514
|
+
), d = o.find(
|
|
1515
|
+
(f) => f.key.name === "computed"
|
|
1466
1516
|
);
|
|
1467
|
-
|
|
1468
|
-
for (const
|
|
1469
|
-
switch (
|
|
1517
|
+
d && (a.computed = Zu(d.value), a.watchers = st(d.value));
|
|
1518
|
+
for (const f of o)
|
|
1519
|
+
switch (f.key.name) {
|
|
1470
1520
|
case "name":
|
|
1471
|
-
a.name =
|
|
1521
|
+
a.name = f.value.value;
|
|
1472
1522
|
break;
|
|
1473
1523
|
case "methods":
|
|
1474
|
-
a.handlers =
|
|
1475
|
-
|
|
1524
|
+
a.handlers = it(f.value), a.methods = nt(f.value), a.dataSources = rt(
|
|
1525
|
+
f.value,
|
|
1476
1526
|
u
|
|
1477
1527
|
);
|
|
1478
1528
|
break;
|
|
1479
1529
|
case "watch":
|
|
1480
|
-
a.watch =
|
|
1481
|
-
|
|
1530
|
+
a.watch = ct(
|
|
1531
|
+
f.value,
|
|
1482
1532
|
a.watchers
|
|
1483
1533
|
);
|
|
1484
1534
|
break;
|
|
1485
1535
|
case "props":
|
|
1486
|
-
a.props =
|
|
1536
|
+
a.props = ft(f.value);
|
|
1487
1537
|
break;
|
|
1488
1538
|
case "inject":
|
|
1489
|
-
a.inject =
|
|
1539
|
+
a.inject = bt(f.value);
|
|
1490
1540
|
break;
|
|
1491
1541
|
case "expose":
|
|
1492
|
-
a.expose =
|
|
1542
|
+
a.expose = pt(f.value);
|
|
1493
1543
|
break;
|
|
1494
1544
|
case "directives":
|
|
1495
|
-
a.directives =
|
|
1545
|
+
a.directives = mt(f.value);
|
|
1496
1546
|
break;
|
|
1497
1547
|
}
|
|
1498
|
-
for (const
|
|
1499
|
-
switch (
|
|
1548
|
+
for (const f of c)
|
|
1549
|
+
switch (f.key.name) {
|
|
1500
1550
|
case "setup":
|
|
1501
|
-
a.state =
|
|
1551
|
+
a.state = at(f.body);
|
|
1502
1552
|
break;
|
|
1503
1553
|
}
|
|
1504
|
-
a.lifeCycles =
|
|
1554
|
+
a.lifeCycles = ot(c);
|
|
1505
1555
|
},
|
|
1506
|
-
CallExpression(
|
|
1507
|
-
const
|
|
1508
|
-
if (
|
|
1509
|
-
for (let
|
|
1510
|
-
a.emits?.find((
|
|
1556
|
+
CallExpression(n) {
|
|
1557
|
+
const i = lt(n.node);
|
|
1558
|
+
if (i.length)
|
|
1559
|
+
for (let s of i)
|
|
1560
|
+
a.emits?.find((c) => c.name === s.name) || a.emits?.push(s);
|
|
1511
1561
|
}
|
|
1512
1562
|
}), a;
|
|
1513
1563
|
}
|
|
1514
|
-
function
|
|
1515
|
-
const u = /import\s+{(.+?)}\s+from\s+['"](.+?)['"]/g, t = /import\s+(.+?)\s+from\s+['"](.+?)['"]/g, a = /^{(.+?)}$/,
|
|
1516
|
-
let
|
|
1517
|
-
const
|
|
1518
|
-
for (; (
|
|
1519
|
-
const
|
|
1520
|
-
|
|
1521
|
-
from:
|
|
1522
|
-
imports:
|
|
1564
|
+
function et(e) {
|
|
1565
|
+
const u = /import\s+{(.+?)}\s+from\s+['"](.+?)['"]/g, t = /import\s+(.+?)\s+from\s+['"](.+?)['"]/g, a = /^{(.+?)}$/, r = [];
|
|
1566
|
+
let n;
|
|
1567
|
+
const i = e.replace(/\n/g, " ");
|
|
1568
|
+
for (; (n = u.exec(i)) !== null; ) {
|
|
1569
|
+
const s = n[2] === "@element-plus/icons-vue" ? "@vtj/icons" : n[2];
|
|
1570
|
+
r.push({
|
|
1571
|
+
from: s,
|
|
1572
|
+
imports: n[1].split(",").map((o) => o.trim())
|
|
1523
1573
|
});
|
|
1524
1574
|
}
|
|
1525
|
-
for (; (
|
|
1526
|
-
const
|
|
1527
|
-
|
|
1575
|
+
for (; (n = t.exec(i)) !== null; ) {
|
|
1576
|
+
const s = n[1], o = n[2];
|
|
1577
|
+
s && !a.test(s) && r.push({
|
|
1528
1578
|
from: o,
|
|
1529
|
-
imports:
|
|
1579
|
+
imports: s
|
|
1530
1580
|
});
|
|
1531
1581
|
}
|
|
1532
|
-
return
|
|
1582
|
+
return r;
|
|
1533
1583
|
}
|
|
1534
|
-
function
|
|
1584
|
+
function tt(e) {
|
|
1535
1585
|
for (const u of e.body)
|
|
1536
1586
|
if (u.type === "VariableDeclaration" && u.kind == "const") {
|
|
1537
1587
|
const { id: t, init: a } = u.declarations[0];
|
|
@@ -1540,617 +1590,1139 @@ function Me(e) {
|
|
|
1540
1590
|
}
|
|
1541
1591
|
return null;
|
|
1542
1592
|
}
|
|
1543
|
-
function
|
|
1544
|
-
const u =
|
|
1593
|
+
function at(e) {
|
|
1594
|
+
const u = tt(e);
|
|
1545
1595
|
if (!u) return {};
|
|
1546
1596
|
const t = {};
|
|
1547
1597
|
for (const a of u.properties)
|
|
1548
1598
|
if (a.type === "ObjectProperty") {
|
|
1549
|
-
const { key:
|
|
1550
|
-
if (
|
|
1551
|
-
const
|
|
1552
|
-
t[
|
|
1599
|
+
const { key: r, value: n } = a;
|
|
1600
|
+
if (r.type === "Identifier") {
|
|
1601
|
+
const i = A(n);
|
|
1602
|
+
t[r.name] = T(i);
|
|
1553
1603
|
}
|
|
1554
1604
|
} else if (a.type === "ObjectMethod") {
|
|
1555
|
-
const { key:
|
|
1556
|
-
if (
|
|
1557
|
-
const
|
|
1558
|
-
t[
|
|
1605
|
+
const { key: r, params: n, body: i } = a;
|
|
1606
|
+
if (r.type === "Identifier") {
|
|
1607
|
+
const s = A(i), c = `(${n.map((d) => d.name || "none").join(",")}) => ${s}`;
|
|
1608
|
+
t[r.name] = T(c);
|
|
1559
1609
|
}
|
|
1560
1610
|
}
|
|
1561
1611
|
return t;
|
|
1562
1612
|
}
|
|
1563
|
-
function
|
|
1564
|
-
const { key: u, async: t, params: a, body:
|
|
1613
|
+
function z(e) {
|
|
1614
|
+
const { key: u, async: t, params: a, body: r } = e, n = a?.map((i) => i.type === "ObjectPattern" ? `{${i.properties.map((o) => o.key?.name || o.name).join(",")}}` : i.type === "AssignmentPattern" ? i.left.name + "=" + (i.right?.extra?.raw || "null") : i.name).join(", ");
|
|
1565
1615
|
if (u.type === "Identifier") {
|
|
1566
|
-
const
|
|
1567
|
-
let
|
|
1568
|
-
|
|
1616
|
+
const i = u.name;
|
|
1617
|
+
let s = "{}";
|
|
1618
|
+
r && (s = A(r) || "{}");
|
|
1569
1619
|
const o = e.value;
|
|
1570
1620
|
if (o && o.type === "CallExpression") {
|
|
1571
|
-
let
|
|
1572
|
-
|
|
1621
|
+
let b = A(o) || "";
|
|
1622
|
+
b = b.replace("function () {", "() => {"), s = `{ return (${b})}`;
|
|
1573
1623
|
}
|
|
1574
|
-
const
|
|
1624
|
+
const d = `${t ? "async " : ""}(${n}) => ${s}`, f = i.startsWith("watcher_");
|
|
1575
1625
|
return {
|
|
1576
|
-
id:
|
|
1577
|
-
name:
|
|
1578
|
-
watcher:
|
|
1579
|
-
exp:
|
|
1626
|
+
id: f ? i.replace("watcher_", "") : "",
|
|
1627
|
+
name: i,
|
|
1628
|
+
watcher: f,
|
|
1629
|
+
exp: C(d)
|
|
1580
1630
|
};
|
|
1581
1631
|
}
|
|
1582
1632
|
}
|
|
1583
|
-
function
|
|
1633
|
+
function Zu(e) {
|
|
1584
1634
|
if (!e) return {};
|
|
1585
1635
|
const u = {};
|
|
1586
1636
|
for (const t of e.properties) {
|
|
1587
|
-
const a =
|
|
1637
|
+
const a = z(t);
|
|
1588
1638
|
a && !a.watcher && !a.exp.value.includes("this.provider.createMock") && !a.exp.value.includes("this.provider.apis") && (u[a.name] = a.exp);
|
|
1589
1639
|
}
|
|
1590
1640
|
return u;
|
|
1591
1641
|
}
|
|
1592
|
-
function
|
|
1642
|
+
function rt(e, u) {
|
|
1593
1643
|
if (!e) return {};
|
|
1594
|
-
const t = {}, a = /apis\[
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1644
|
+
const t = {}, a = /apis\['([\w]*)'\]/, r = (n) => {
|
|
1645
|
+
const i = n.indexOf(".then(");
|
|
1646
|
+
if (i === -1) return null;
|
|
1647
|
+
let s = 1, o = i + 6;
|
|
1648
|
+
for (; o < n.length && s > 0; ) {
|
|
1649
|
+
const c = n[o];
|
|
1650
|
+
c === "(" ? s++ : c === ")" && s--, o++;
|
|
1651
|
+
}
|
|
1652
|
+
return n.substring(i + 6, o - 1).trim();
|
|
1653
|
+
};
|
|
1654
|
+
for (const n of e.properties) {
|
|
1655
|
+
const i = z(n), s = n.body.body?.[0], o = (s?.leadingComments?.[0].value || "").trim(), c = Qu(o);
|
|
1656
|
+
if (i && i.exp.value.includes("this.provider.apis")) {
|
|
1657
|
+
const f = (i.exp.value.match(a) || [])[1];
|
|
1658
|
+
if (!f) continue;
|
|
1659
|
+
const p = ht(u, f);
|
|
1660
|
+
if (!p) continue;
|
|
1661
|
+
const b = r(i.exp.value);
|
|
1662
|
+
t[i.name] = {
|
|
1663
|
+
ref: f,
|
|
1664
|
+
name: i.name,
|
|
1665
|
+
test: c?.test || {
|
|
1607
1666
|
type: "JSFunction",
|
|
1608
1667
|
value: `() => this.runApi({
|
|
1609
1668
|
/* 在这里可输入接口参数 */
|
|
1610
1669
|
})`
|
|
1611
1670
|
},
|
|
1612
1671
|
type: "api",
|
|
1613
|
-
label:
|
|
1672
|
+
label: p.label,
|
|
1614
1673
|
transform: {
|
|
1615
1674
|
type: "JSFunction",
|
|
1616
|
-
value:
|
|
1675
|
+
value: b || `(res) => {
|
|
1617
1676
|
return res;
|
|
1618
1677
|
}`
|
|
1619
1678
|
},
|
|
1620
|
-
mockTemplate:
|
|
1679
|
+
mockTemplate: p.mockTemplate
|
|
1621
1680
|
};
|
|
1622
1681
|
}
|
|
1623
|
-
if (
|
|
1624
|
-
const
|
|
1625
|
-
t[
|
|
1682
|
+
if (i && i.exp.value.includes("this.provider.createMock")) {
|
|
1683
|
+
const d = s?.declarations?.[0]?.init?.arguments?.[0], f = r(i.exp.value);
|
|
1684
|
+
t[i.name] = {
|
|
1626
1685
|
ref: "",
|
|
1627
|
-
name:
|
|
1628
|
-
test:
|
|
1686
|
+
name: i.name,
|
|
1687
|
+
test: c?.test || {
|
|
1629
1688
|
type: "JSFunction",
|
|
1630
1689
|
value: `() => this.runApi({
|
|
1631
1690
|
/* 在这里可输入接口参数 */
|
|
1632
1691
|
})`
|
|
1633
1692
|
},
|
|
1634
1693
|
type: "mock",
|
|
1635
|
-
label:
|
|
1636
|
-
transform:
|
|
1694
|
+
label: c?.label || "",
|
|
1695
|
+
transform: c?.transform || {
|
|
1637
1696
|
type: "JSFunction",
|
|
1638
|
-
value:
|
|
1697
|
+
value: f || `(res) => {
|
|
1639
1698
|
return res;
|
|
1640
1699
|
}`
|
|
1641
1700
|
},
|
|
1642
|
-
mockTemplate:
|
|
1701
|
+
mockTemplate: c?.mockTemplate || {
|
|
1643
1702
|
type: "JSFunction",
|
|
1644
|
-
value:
|
|
1703
|
+
value: d ? A(d) : ""
|
|
1645
1704
|
}
|
|
1646
1705
|
};
|
|
1647
1706
|
}
|
|
1648
1707
|
}
|
|
1649
1708
|
return t;
|
|
1650
1709
|
}
|
|
1651
|
-
function
|
|
1652
|
-
const u =
|
|
1653
|
-
for (const
|
|
1654
|
-
t.test(
|
|
1710
|
+
function nt(e) {
|
|
1711
|
+
const u = Zu(e), t = /\_([\w]{5,})$/, a = {};
|
|
1712
|
+
for (const r of Object.keys(u))
|
|
1713
|
+
t.test(r) || (a[r] = u[r]);
|
|
1655
1714
|
return a;
|
|
1656
1715
|
}
|
|
1657
|
-
function
|
|
1716
|
+
function it(e) {
|
|
1658
1717
|
if (!e) return {};
|
|
1659
1718
|
const u = {}, t = /\_([\w]{5,})$/;
|
|
1660
1719
|
for (const a of e.properties) {
|
|
1661
|
-
const
|
|
1662
|
-
if (t.test(
|
|
1720
|
+
const r = a.key.name;
|
|
1721
|
+
if (t.test(r))
|
|
1663
1722
|
try {
|
|
1664
1723
|
if (a.body.body[0]?.argument) {
|
|
1665
|
-
const
|
|
1724
|
+
const n = A(
|
|
1666
1725
|
a.body.body[0].argument.callee.object
|
|
1667
1726
|
);
|
|
1668
|
-
u[
|
|
1727
|
+
u[r] = C(n);
|
|
1669
1728
|
} else
|
|
1670
|
-
u[
|
|
1671
|
-
} catch (
|
|
1672
|
-
console.warn(
|
|
1729
|
+
u[r] = z(a)?.exp;
|
|
1730
|
+
} catch (n) {
|
|
1731
|
+
console.warn(n);
|
|
1673
1732
|
}
|
|
1674
1733
|
}
|
|
1675
1734
|
return u;
|
|
1676
1735
|
}
|
|
1677
|
-
function
|
|
1736
|
+
function st(e) {
|
|
1678
1737
|
if (!e) return {};
|
|
1679
1738
|
const u = {};
|
|
1680
1739
|
for (const t of e.properties) {
|
|
1681
|
-
const a =
|
|
1740
|
+
const a = z(t);
|
|
1682
1741
|
a && a.watcher && (u[a.name] = a.exp);
|
|
1683
1742
|
}
|
|
1684
1743
|
return u;
|
|
1685
1744
|
}
|
|
1686
|
-
function
|
|
1687
|
-
return !!
|
|
1745
|
+
function Y(e, u) {
|
|
1746
|
+
return !!Ku(e, u);
|
|
1688
1747
|
}
|
|
1689
|
-
function
|
|
1748
|
+
function Ku(e, u) {
|
|
1690
1749
|
return e?.find(
|
|
1691
1750
|
(a) => a.key?.name === u
|
|
1692
1751
|
)?.value?.value;
|
|
1693
1752
|
}
|
|
1694
|
-
function
|
|
1753
|
+
function Du(e, u) {
|
|
1695
1754
|
const t = e?.find(
|
|
1696
1755
|
(a) => a.key?.name === u
|
|
1697
1756
|
);
|
|
1698
1757
|
if (t)
|
|
1699
|
-
return
|
|
1758
|
+
return z(t)?.exp;
|
|
1700
1759
|
}
|
|
1701
|
-
function
|
|
1760
|
+
function ct(e, u = {}) {
|
|
1702
1761
|
const t = [];
|
|
1703
1762
|
for (const a of e.properties) {
|
|
1704
|
-
const { key:
|
|
1705
|
-
if (u[
|
|
1706
|
-
const
|
|
1763
|
+
const { key: r, value: n } = a, i = r.value || r.name || "";
|
|
1764
|
+
if (u[i]) {
|
|
1765
|
+
const s = n.properties;
|
|
1707
1766
|
t.push({
|
|
1708
|
-
id:
|
|
1709
|
-
source: u[
|
|
1710
|
-
deep:
|
|
1711
|
-
immediate:
|
|
1712
|
-
handler:
|
|
1767
|
+
id: i.replace("watcher_", ""),
|
|
1768
|
+
source: u[i],
|
|
1769
|
+
deep: Y(s, "deep"),
|
|
1770
|
+
immediate: Y(s, "immediate"),
|
|
1771
|
+
handler: Du(s, "handler")
|
|
1713
1772
|
});
|
|
1714
1773
|
} else if (a.type === "ObjectMethod" && t.push({
|
|
1715
1774
|
id: ru(),
|
|
1716
1775
|
source: {
|
|
1717
1776
|
type: "JSFunction",
|
|
1718
|
-
value: `() => { return this.${
|
|
1777
|
+
value: `() => { return this.${i}; }`
|
|
1719
1778
|
},
|
|
1720
1779
|
deep: !1,
|
|
1721
1780
|
immediate: !1,
|
|
1722
|
-
handler:
|
|
1781
|
+
handler: z(a)?.exp
|
|
1723
1782
|
}), a.type === "ObjectProperty") {
|
|
1724
|
-
const
|
|
1783
|
+
const s = n.properties;
|
|
1725
1784
|
t.push({
|
|
1726
1785
|
id: ru(),
|
|
1727
1786
|
source: {
|
|
1728
1787
|
type: "JSFunction",
|
|
1729
|
-
value: `() => { return this.${
|
|
1788
|
+
value: `() => { return this.${i}; }`
|
|
1730
1789
|
},
|
|
1731
|
-
deep:
|
|
1732
|
-
immediate:
|
|
1733
|
-
handler:
|
|
1790
|
+
deep: Y(s, "deep"),
|
|
1791
|
+
immediate: Y(s, "immediate"),
|
|
1792
|
+
handler: Du(s, "handler")
|
|
1734
1793
|
});
|
|
1735
1794
|
}
|
|
1736
1795
|
}
|
|
1737
1796
|
return t;
|
|
1738
1797
|
}
|
|
1739
|
-
function
|
|
1798
|
+
function ot(e) {
|
|
1740
1799
|
const u = {};
|
|
1741
1800
|
for (const t of e) {
|
|
1742
1801
|
const a = t.key.name;
|
|
1743
|
-
if (
|
|
1744
|
-
const
|
|
1745
|
-
|
|
1802
|
+
if (De.includes(a)) {
|
|
1803
|
+
const r = z(t);
|
|
1804
|
+
r && (u[r.name] = r.exp);
|
|
1746
1805
|
}
|
|
1747
1806
|
}
|
|
1748
1807
|
return u;
|
|
1749
1808
|
}
|
|
1750
|
-
function
|
|
1809
|
+
function dt(e) {
|
|
1751
1810
|
const u = e?.find(
|
|
1752
1811
|
(t) => t.key?.name === "type"
|
|
1753
1812
|
);
|
|
1754
1813
|
if (u)
|
|
1755
1814
|
return u.value.type === "ArrayExpression" ? u.value.elements.map((t) => t.name) : u.value.name;
|
|
1756
1815
|
}
|
|
1757
|
-
function
|
|
1816
|
+
function Yu(e) {
|
|
1758
1817
|
const u = e?.find(
|
|
1759
1818
|
(t) => t.key?.name === "default"
|
|
1760
1819
|
);
|
|
1761
1820
|
if (u)
|
|
1762
|
-
return
|
|
1821
|
+
return T(A(u.value));
|
|
1763
1822
|
}
|
|
1764
|
-
function
|
|
1823
|
+
function ft(e) {
|
|
1765
1824
|
if (!e) return [];
|
|
1766
1825
|
let u = [];
|
|
1767
1826
|
return e.type === "ArrayExpression" ? u = e.elements.map((t) => t.value) : e.type === "ObjectExpression" && (u = e.properties?.map((t) => {
|
|
1768
|
-
const { key: a, value:
|
|
1827
|
+
const { key: a, value: r } = t, n = r.properties || [];
|
|
1769
1828
|
return {
|
|
1770
1829
|
name: a.name,
|
|
1771
|
-
required:
|
|
1772
|
-
type:
|
|
1773
|
-
default:
|
|
1830
|
+
required: Y(n, "required"),
|
|
1831
|
+
type: dt(n),
|
|
1832
|
+
default: Yu(n)
|
|
1774
1833
|
};
|
|
1775
1834
|
})), u;
|
|
1776
1835
|
}
|
|
1777
|
-
function
|
|
1836
|
+
function lt(e) {
|
|
1778
1837
|
const u = [];
|
|
1779
1838
|
if (e.callee.type === "MemberExpression" && e.callee.property?.name === "$emit") {
|
|
1780
|
-
const [a, ...
|
|
1781
|
-
(
|
|
1839
|
+
const [a, ...r] = (e.arguments || []).map(
|
|
1840
|
+
(n) => n.value || n.name
|
|
1782
1841
|
);
|
|
1783
1842
|
a && u.push({
|
|
1784
1843
|
name: a,
|
|
1785
|
-
params:
|
|
1844
|
+
params: r.filter((n) => !!n)
|
|
1786
1845
|
});
|
|
1787
1846
|
}
|
|
1788
1847
|
return u;
|
|
1789
1848
|
}
|
|
1790
|
-
function
|
|
1849
|
+
function bt(e) {
|
|
1791
1850
|
let u = [];
|
|
1792
1851
|
return e.type === "ObjectExpression" && (u = e.properties?.map((t) => {
|
|
1793
|
-
const { key: a, value:
|
|
1852
|
+
const { key: a, value: r } = t, n = r.properties, i = a.name, s = Ku(n, "from"), o = Yu(n);
|
|
1794
1853
|
return {
|
|
1795
|
-
name:
|
|
1796
|
-
from:
|
|
1854
|
+
name: i,
|
|
1855
|
+
from: s || i,
|
|
1797
1856
|
default: o
|
|
1798
1857
|
};
|
|
1799
1858
|
})), u;
|
|
1800
1859
|
}
|
|
1801
|
-
function
|
|
1860
|
+
function pt(e) {
|
|
1802
1861
|
return e && e.elements ? e.elements.map((u) => u?.type === "StringLiteral" ? u.value : "").filter((u) => !!u) : [];
|
|
1803
1862
|
}
|
|
1804
|
-
function
|
|
1863
|
+
function ht(e, u) {
|
|
1805
1864
|
return (e.apis || []).find((t) => t.id === u || t.name === u);
|
|
1806
1865
|
}
|
|
1807
|
-
function
|
|
1866
|
+
function mt(e) {
|
|
1808
1867
|
if (!e?.properties) return {};
|
|
1809
1868
|
const u = {};
|
|
1810
1869
|
for (const t of e.properties) {
|
|
1811
|
-
const { key: a, value:
|
|
1812
|
-
a?.name &&
|
|
1870
|
+
const { key: a, value: r } = t;
|
|
1871
|
+
a?.name && r?.name && (u[a.name] = u[a.name.toLowerCase()] = {
|
|
1813
1872
|
type: "JSExpression",
|
|
1814
|
-
value:
|
|
1873
|
+
value: r.name
|
|
1815
1874
|
});
|
|
1816
1875
|
}
|
|
1817
1876
|
return u;
|
|
1818
1877
|
}
|
|
1819
|
-
let
|
|
1820
|
-
function
|
|
1821
|
-
|
|
1822
|
-
const
|
|
1878
|
+
let hu = [], iu = {}, ue = {}, ee = {}, te = {}, su = "web", ae = [];
|
|
1879
|
+
function re(e, u, t = "", a) {
|
|
1880
|
+
hu = [], iu = {}, ue = a?.handlers || {}, te = a?.styles || {}, su = a?.platform || "web", ae = a?.imports || [], ee = a?.directives || {};
|
|
1881
|
+
const n = Gu({
|
|
1823
1882
|
id: e,
|
|
1824
1883
|
filename: u,
|
|
1825
1884
|
source: t,
|
|
1826
1885
|
isProd: !0,
|
|
1827
1886
|
slotted: !0
|
|
1828
|
-
}).ast?.children || [],
|
|
1829
|
-
for (const
|
|
1830
|
-
const o =
|
|
1831
|
-
Array.isArray(o) ?
|
|
1887
|
+
}).ast?.children || [], i = [];
|
|
1888
|
+
for (const s of n) {
|
|
1889
|
+
const o = Q(s);
|
|
1890
|
+
Array.isArray(o) ? i.push(...o) : i.push(o);
|
|
1832
1891
|
}
|
|
1833
1892
|
return {
|
|
1834
|
-
nodes:
|
|
1835
|
-
slots:
|
|
1836
|
-
context:
|
|
1893
|
+
nodes: i.filter((s) => !!s),
|
|
1894
|
+
slots: hu,
|
|
1895
|
+
context: iu
|
|
1837
1896
|
};
|
|
1838
1897
|
}
|
|
1839
|
-
function
|
|
1898
|
+
function xt(e) {
|
|
1840
1899
|
if (e.name === "slot") {
|
|
1841
1900
|
let u = "default";
|
|
1842
1901
|
const t = [];
|
|
1843
|
-
for (const [a,
|
|
1844
|
-
a === "name" ? u =
|
|
1845
|
-
|
|
1902
|
+
for (const [a, r] of Object.entries(e.props || {}))
|
|
1903
|
+
a === "name" ? u = r : t.push(a);
|
|
1904
|
+
hu.push({
|
|
1846
1905
|
name: u,
|
|
1847
1906
|
params: t
|
|
1848
1907
|
});
|
|
1849
1908
|
}
|
|
1850
1909
|
}
|
|
1851
|
-
function
|
|
1910
|
+
function gt(e) {
|
|
1852
1911
|
const u = {};
|
|
1853
1912
|
for (const t of e) {
|
|
1854
|
-
if (t.type ===
|
|
1913
|
+
if (t.type === v.ATTRIBUTE)
|
|
1855
1914
|
if (t.name === "class") {
|
|
1856
|
-
const a = t.value?.content || "",
|
|
1857
|
-
|
|
1915
|
+
const a = t.value?.content || "", r = /[\w]+_[\w]{5,}/, n = a.match(r)?.[0] || "", i = a.split(" ").filter((o) => o !== n), s = te[`.${n}`];
|
|
1916
|
+
s && (u.style = s), i.length && (u.class = i.join(" "));
|
|
1858
1917
|
} else if (t.name === "style") {
|
|
1859
1918
|
const a = t.value?.content || "";
|
|
1860
|
-
a && (u.style =
|
|
1919
|
+
a && (u.style = Xu(a));
|
|
1861
1920
|
} else
|
|
1862
1921
|
u[t.name] = t.value?.content || "";
|
|
1863
|
-
if (t.type ===
|
|
1922
|
+
if (t.type === v.DIRECTIVE && t.name === "bind" && (t.exp?.type === v.SIMPLE_EXPRESSION && t.arg?.type === v.SIMPLE_EXPRESSION && (u[t.arg.content] = T(`(${t.exp.content})`)), t.exp?.type === v.COMPOUND_EXPRESSION && t.arg?.type === v.SIMPLE_EXPRESSION))
|
|
1864
1923
|
if (t.arg.content === "class" && u.class) {
|
|
1865
|
-
const a = t.exp.ast.type,
|
|
1924
|
+
const a = t.exp.ast.type, r = Me(
|
|
1866
1925
|
u.class,
|
|
1867
1926
|
t.exp.loc.source,
|
|
1868
1927
|
a
|
|
1869
1928
|
);
|
|
1870
|
-
|
|
1929
|
+
r && (u[t.arg.content] = T(r));
|
|
1871
1930
|
} else
|
|
1872
|
-
u[t.arg.content] =
|
|
1931
|
+
u[t.arg.content] = T(
|
|
1873
1932
|
`(${t.exp.loc.source})`
|
|
1874
1933
|
);
|
|
1875
1934
|
}
|
|
1876
1935
|
return u;
|
|
1877
1936
|
}
|
|
1878
|
-
function
|
|
1937
|
+
function yt(e = {}) {
|
|
1879
1938
|
const u = {};
|
|
1880
1939
|
for (const [t, a] of Object.entries(e))
|
|
1881
1940
|
u[t === "tap" ? "click" : t] = a;
|
|
1882
1941
|
return u;
|
|
1883
1942
|
}
|
|
1884
|
-
function
|
|
1943
|
+
function St(e, u = {}) {
|
|
1885
1944
|
const t = {};
|
|
1886
1945
|
for (const a of e)
|
|
1887
|
-
if (a.type ===
|
|
1888
|
-
const
|
|
1889
|
-
(
|
|
1946
|
+
if (a.type === v.DIRECTIVE && a.name === "on" && a.arg?.type === v.SIMPLE_EXPRESSION) {
|
|
1947
|
+
const r = a.modifiers.reduce(
|
|
1948
|
+
(c, d) => (d.content && (c[d.content] = !0), c),
|
|
1890
1949
|
{}
|
|
1891
1950
|
);
|
|
1892
|
-
let
|
|
1893
|
-
|
|
1894
|
-
const
|
|
1895
|
-
if (
|
|
1951
|
+
let n = a.exp?.loc.source || "";
|
|
1952
|
+
n || (n = "() => {}");
|
|
1953
|
+
const i = new RegExp(`${a.arg.content}_[\\w]{5,}`), s = n.match(i)?.[0] || "", o = u[s];
|
|
1954
|
+
if (s && o)
|
|
1896
1955
|
t[a.arg.content] = {
|
|
1897
1956
|
name: a.arg.content,
|
|
1898
1957
|
handler: o,
|
|
1899
|
-
modifiers:
|
|
1958
|
+
modifiers: r
|
|
1900
1959
|
};
|
|
1901
1960
|
else {
|
|
1902
|
-
const
|
|
1961
|
+
const c = a.exp?.ast?.type === "CallExpression";
|
|
1903
1962
|
t[a.arg.content] = {
|
|
1904
1963
|
name: a.arg.content,
|
|
1905
|
-
handler:
|
|
1906
|
-
modifiers:
|
|
1964
|
+
handler: c ? T(n) : C(n),
|
|
1965
|
+
modifiers: r
|
|
1907
1966
|
};
|
|
1908
1967
|
}
|
|
1909
1968
|
}
|
|
1910
|
-
return
|
|
1969
|
+
return yt(t);
|
|
1911
1970
|
}
|
|
1912
|
-
function
|
|
1971
|
+
function eu(e, u) {
|
|
1913
1972
|
const t = [], a = ["if", "for", "model", "show", "bind", "html"];
|
|
1914
|
-
if (u && (e.type ===
|
|
1915
|
-
if (e ===
|
|
1916
|
-
const
|
|
1973
|
+
if (u && (e.type === v.IF_BRANCH || e.type === v.IF) && u.forEach((r, n) => {
|
|
1974
|
+
if (e === r) {
|
|
1975
|
+
const i = n === 0 ? "vIf" : r.condition ? "vElseIf" : "vElse", s = r.condition?.loc.source || "";
|
|
1917
1976
|
t.push({
|
|
1918
|
-
name:
|
|
1919
|
-
value:
|
|
1977
|
+
name: i,
|
|
1978
|
+
value: i === "vElse" ? !0 : T(s)
|
|
1920
1979
|
});
|
|
1921
1980
|
const o = e.children?.[0];
|
|
1922
1981
|
if (o) {
|
|
1923
|
-
const
|
|
1924
|
-
t.push(...
|
|
1982
|
+
const c = eu(o);
|
|
1983
|
+
t.push(...c);
|
|
1925
1984
|
}
|
|
1926
1985
|
}
|
|
1927
|
-
}), e.type ===
|
|
1986
|
+
}), e.type === v.FOR && t.push({
|
|
1928
1987
|
name: "vFor",
|
|
1929
|
-
value:
|
|
1988
|
+
value: T(e.source.loc.source),
|
|
1930
1989
|
iterator: {
|
|
1931
1990
|
item: e.valueAlias?.loc.source || "item",
|
|
1932
1991
|
index: e.keyAlias?.loc.source || "index"
|
|
1933
1992
|
}
|
|
1934
|
-
}), e.type ===
|
|
1935
|
-
const
|
|
1936
|
-
(
|
|
1937
|
-
),
|
|
1938
|
-
|
|
1993
|
+
}), e.type === v.ELEMENT) {
|
|
1994
|
+
const r = e.props.filter(
|
|
1995
|
+
(d) => d.type === v.DIRECTIVE
|
|
1996
|
+
), n = r.filter((d) => d.name === "model");
|
|
1997
|
+
n.length && n.forEach((d) => {
|
|
1939
1998
|
t.push({
|
|
1940
1999
|
name: "vModel",
|
|
1941
|
-
arg:
|
|
1942
|
-
value:
|
|
2000
|
+
arg: d.arg?.content,
|
|
2001
|
+
value: T(d.exp?.loc.source || "")
|
|
1943
2002
|
});
|
|
1944
2003
|
});
|
|
1945
|
-
const
|
|
1946
|
-
|
|
2004
|
+
const i = r.find((d) => d.name === "show");
|
|
2005
|
+
i && t.push({
|
|
1947
2006
|
name: "vShow",
|
|
1948
|
-
value:
|
|
2007
|
+
value: T(i.exp?.loc.source || "")
|
|
1949
2008
|
});
|
|
1950
|
-
const
|
|
1951
|
-
|
|
2009
|
+
const s = r.find((d) => d.name === "bind" && !d.arg);
|
|
2010
|
+
s && t.push({
|
|
1952
2011
|
name: "vBind",
|
|
1953
|
-
value:
|
|
2012
|
+
value: T(s.exp?.loc.source || "")
|
|
1954
2013
|
});
|
|
1955
|
-
const o =
|
|
2014
|
+
const o = r.find((d) => d.name === "html");
|
|
1956
2015
|
o && t.push({
|
|
1957
2016
|
name: "vHtml",
|
|
1958
|
-
value:
|
|
2017
|
+
value: T(o.exp?.loc.source || "")
|
|
1959
2018
|
});
|
|
1960
|
-
const
|
|
1961
|
-
for (const
|
|
1962
|
-
const
|
|
1963
|
-
(
|
|
2019
|
+
const c = r.filter((d) => !a.includes(d.name));
|
|
2020
|
+
for (const d of c) {
|
|
2021
|
+
const f = (d.modifiers || []).reduce(
|
|
2022
|
+
(h, S) => (h[S.content] = !0, h),
|
|
1964
2023
|
{}
|
|
1965
|
-
),
|
|
1966
|
-
|
|
1967
|
-
name:
|
|
1968
|
-
value:
|
|
1969
|
-
arg:
|
|
1970
|
-
modifiers:
|
|
2024
|
+
), p = d.arg?.content || void 0, b = ee[d.name];
|
|
2025
|
+
b && t.push({
|
|
2026
|
+
name: b,
|
|
2027
|
+
value: T(d.exp?.loc.source || ""),
|
|
2028
|
+
arg: p,
|
|
2029
|
+
modifiers: f
|
|
1971
2030
|
});
|
|
1972
2031
|
}
|
|
1973
2032
|
}
|
|
1974
2033
|
return t;
|
|
1975
2034
|
}
|
|
1976
|
-
function
|
|
2035
|
+
function ne(e) {
|
|
1977
2036
|
let u = "";
|
|
1978
|
-
if (e.type ===
|
|
2037
|
+
if (e.type === v.ELEMENT) {
|
|
1979
2038
|
const { props: t = [], tag: a } = e;
|
|
1980
|
-
for (const
|
|
1981
|
-
if (
|
|
1982
|
-
const
|
|
1983
|
-
u =
|
|
1984
|
-
} else if (
|
|
1985
|
-
const
|
|
1986
|
-
u =
|
|
2039
|
+
for (const r of t)
|
|
2040
|
+
if (r.name === "class") {
|
|
2041
|
+
const n = r.value?.content || "", i = new RegExp(`${a}_([\\w]+)`);
|
|
2042
|
+
u = n.match(i)?.[1] || "";
|
|
2043
|
+
} else if (r.type === v.DIRECTIVE && r.name === "on") {
|
|
2044
|
+
const n = r.arg?.loc?.source || "", i = r.exp?.loc?.source || "", s = new RegExp(`${n}_([\\w]+)`);
|
|
2045
|
+
u = i.match(s)?.[1] || "";
|
|
1987
2046
|
}
|
|
1988
2047
|
}
|
|
1989
2048
|
return u || ru();
|
|
1990
2049
|
}
|
|
1991
|
-
function
|
|
2050
|
+
function vt(e) {
|
|
1992
2051
|
const u = /\.\/(.+?)\.vue/;
|
|
1993
|
-
for (const { from: t, imports: a } of
|
|
2052
|
+
for (const { from: t, imports: a } of ae) {
|
|
1994
2053
|
if (Array.isArray(a) && a.includes(e))
|
|
1995
2054
|
return t;
|
|
1996
2055
|
if (a === e) {
|
|
1997
|
-
const
|
|
1998
|
-
if (
|
|
2056
|
+
const r = t.match(u)?.[1];
|
|
2057
|
+
if (r)
|
|
1999
2058
|
return {
|
|
2000
2059
|
type: "Schema",
|
|
2001
|
-
id:
|
|
2060
|
+
id: r
|
|
2002
2061
|
};
|
|
2003
2062
|
}
|
|
2004
2063
|
}
|
|
2005
2064
|
}
|
|
2006
|
-
function
|
|
2007
|
-
const t = new Set(u?.id ?
|
|
2008
|
-
let
|
|
2065
|
+
function mu(e, u) {
|
|
2066
|
+
const t = new Set(u?.id ? iu[u.id] : []), a = (e.directives || []).find((i) => i.name === "vFor");
|
|
2067
|
+
let r = new Set(Array.from(t));
|
|
2009
2068
|
if (a) {
|
|
2010
|
-
const { item:
|
|
2011
|
-
|
|
2012
|
-
}
|
|
2013
|
-
const
|
|
2014
|
-
if (
|
|
2015
|
-
const
|
|
2016
|
-
|
|
2017
|
-
}
|
|
2018
|
-
|
|
2019
|
-
}
|
|
2020
|
-
function
|
|
2021
|
-
const
|
|
2022
|
-
name:
|
|
2023
|
-
from:
|
|
2024
|
-
props:
|
|
2025
|
-
events:
|
|
2026
|
-
directives:
|
|
2069
|
+
const { item: i = "item", index: s = "index" } = a.iterator || {};
|
|
2070
|
+
r = /* @__PURE__ */ new Set([i, s, ...Array.from(r)]);
|
|
2071
|
+
}
|
|
2072
|
+
const n = e.slot;
|
|
2073
|
+
if (n) {
|
|
2074
|
+
const i = typeof n == "string" ? [] : n.params || [], s = i.length ? i : [`scope_${u?.id}`];
|
|
2075
|
+
r = /* @__PURE__ */ new Set([...s, ...Array.from(r)]);
|
|
2076
|
+
}
|
|
2077
|
+
iu[e.id] = r;
|
|
2078
|
+
}
|
|
2079
|
+
function lu(e, u, t, a) {
|
|
2080
|
+
const r = {
|
|
2081
|
+
name: zu(e.tag, su),
|
|
2082
|
+
from: vt(e.tag),
|
|
2083
|
+
props: gt(e.props),
|
|
2084
|
+
events: St(e.props, ue),
|
|
2085
|
+
directives: eu(t || e, a)
|
|
2027
2086
|
};
|
|
2028
|
-
|
|
2029
|
-
const
|
|
2030
|
-
return
|
|
2031
|
-
}
|
|
2032
|
-
function
|
|
2033
|
-
return e.map((t) =>
|
|
2034
|
-
}
|
|
2035
|
-
function
|
|
2036
|
-
if (e.type ===
|
|
2037
|
-
return
|
|
2038
|
-
if (e.type ===
|
|
2039
|
-
return
|
|
2040
|
-
if (t && e.type ===
|
|
2087
|
+
r.id = ne(e), mu(r, u);
|
|
2088
|
+
const n = cu(r, e.children);
|
|
2089
|
+
return mu(r, u), xt(n), n;
|
|
2090
|
+
}
|
|
2091
|
+
function Et(e = [], u) {
|
|
2092
|
+
return e.map((t) => Q(t, u, e));
|
|
2093
|
+
}
|
|
2094
|
+
function Q(e, u, t) {
|
|
2095
|
+
if (e.type === v.ELEMENT)
|
|
2096
|
+
return lu(e, u);
|
|
2097
|
+
if (e.type === v.IF)
|
|
2098
|
+
return wt(e);
|
|
2099
|
+
if (t && e.type === v.IF_BRANCH) {
|
|
2041
2100
|
const a = e.children.find(
|
|
2042
|
-
(
|
|
2101
|
+
(r) => r.type === v.ELEMENT || r.type === v.FOR
|
|
2043
2102
|
);
|
|
2044
2103
|
if (a) {
|
|
2045
|
-
if (a.type ===
|
|
2046
|
-
return
|
|
2047
|
-
if (a.type ===
|
|
2048
|
-
const
|
|
2049
|
-
return
|
|
2104
|
+
if (a.type === v.ELEMENT)
|
|
2105
|
+
return lu(a, u, e, t);
|
|
2106
|
+
if (a.type === v.FOR) {
|
|
2107
|
+
const n = { name: "div", directives: eu(e) };
|
|
2108
|
+
return cu(n, e.children || []);
|
|
2050
2109
|
}
|
|
2051
2110
|
}
|
|
2052
2111
|
return "";
|
|
2053
2112
|
}
|
|
2054
|
-
if (e.type ===
|
|
2113
|
+
if (e.type === v.FOR) {
|
|
2055
2114
|
const a = e.children[0];
|
|
2056
|
-
if (e.children.length > 1 || a.type !==
|
|
2057
|
-
const
|
|
2058
|
-
return
|
|
2115
|
+
if (e.children.length > 1 || a.type !== v.ELEMENT) {
|
|
2116
|
+
const n = { name: "span", directives: eu(e) };
|
|
2117
|
+
return cu(n, e.children);
|
|
2059
2118
|
} else
|
|
2060
|
-
return
|
|
2119
|
+
return lu(a, u, e);
|
|
2061
2120
|
}
|
|
2062
|
-
if (e.type ===
|
|
2063
|
-
return e.content.type ==
|
|
2121
|
+
if (e.type === v.TEXT_CALL)
|
|
2122
|
+
return e.content.type == v.TEXT ? e.content.content : e.content.type === v.INTERPOLATION ? T(e.content.content.loc.source) : e.content.type === v.COMPOUND_EXPRESSION ? Ru(
|
|
2064
2123
|
e.content.children
|
|
2065
2124
|
) : "";
|
|
2066
|
-
if (e.type ===
|
|
2125
|
+
if (e.type === v.TEXT)
|
|
2067
2126
|
return e.content;
|
|
2068
|
-
if (e.type ===
|
|
2069
|
-
return
|
|
2070
|
-
if (e.type ===
|
|
2071
|
-
return
|
|
2127
|
+
if (e.type === v.INTERPOLATION && (e.content.type === v.SIMPLE_EXPRESSION || e.content.type === v.COMPOUND_EXPRESSION))
|
|
2128
|
+
return T(e.content.loc.source);
|
|
2129
|
+
if (e.type === v.COMPOUND_EXPRESSION)
|
|
2130
|
+
return Ru(
|
|
2072
2131
|
e.children
|
|
2073
2132
|
);
|
|
2074
|
-
e.type !==
|
|
2133
|
+
e.type !== v.COMMENT && console.warn("未处理", e.type);
|
|
2075
2134
|
}
|
|
2076
|
-
function
|
|
2135
|
+
function Ru(e = []) {
|
|
2077
2136
|
const u = e.filter((a) => typeof a != "string"), t = [];
|
|
2078
2137
|
for (const a of u)
|
|
2079
2138
|
t.push({
|
|
2080
2139
|
name: "span",
|
|
2081
|
-
children: a.type ===
|
|
2140
|
+
children: a.type === v.TEXT ? a.loc.source : T(a.content?.loc.source)
|
|
2082
2141
|
});
|
|
2083
2142
|
return {
|
|
2084
2143
|
name: "span",
|
|
2085
2144
|
children: t
|
|
2086
2145
|
};
|
|
2087
2146
|
}
|
|
2088
|
-
function
|
|
2147
|
+
function cu(e, u = []) {
|
|
2089
2148
|
const t = [];
|
|
2090
2149
|
for (const a of u)
|
|
2091
|
-
if (a.type ===
|
|
2092
|
-
const
|
|
2093
|
-
if (
|
|
2094
|
-
const
|
|
2095
|
-
t.push(...
|
|
2150
|
+
if (a.type === v.ELEMENT && a.codegenNode?.value?.arguments) {
|
|
2151
|
+
const r = a.codegenNode.value.arguments[0];
|
|
2152
|
+
if (r) {
|
|
2153
|
+
const n = qu(r, su);
|
|
2154
|
+
t.push(...n);
|
|
2096
2155
|
}
|
|
2097
|
-
} else if (a.type ===
|
|
2098
|
-
const
|
|
2099
|
-
for (const
|
|
2100
|
-
const
|
|
2156
|
+
} else if (a.type === v.ELEMENT && a.tag === "template") {
|
|
2157
|
+
const r = a.props.find((n) => n.name === "slot");
|
|
2158
|
+
for (const n of a.children) {
|
|
2159
|
+
const i = n.type === v.TEXT || n.type === v.TEXT_CALL ? {
|
|
2101
2160
|
name: "span",
|
|
2102
|
-
children:
|
|
2103
|
-
} :
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
name:
|
|
2107
|
-
params:
|
|
2108
|
-
scope:
|
|
2109
|
-
},
|
|
2161
|
+
children: Q(n, e)
|
|
2162
|
+
} : Q(n, e);
|
|
2163
|
+
i && (Array.isArray(i) ? i : [i]).forEach((o) => {
|
|
2164
|
+
we(o) && r?.type === v.DIRECTIVE && (o.id = ne(n), o.slot = {
|
|
2165
|
+
name: r.arg?.content || "default",
|
|
2166
|
+
params: r.exp?.identifiers || [],
|
|
2167
|
+
scope: r.exp?.type === v.SIMPLE_EXPRESSION ? r.exp.content : ""
|
|
2168
|
+
}, mu(o, e)), t.push(o);
|
|
2110
2169
|
});
|
|
2111
2170
|
}
|
|
2112
|
-
} else if (a.type ===
|
|
2113
|
-
const
|
|
2114
|
-
if (
|
|
2115
|
-
const
|
|
2116
|
-
t.push(...
|
|
2171
|
+
} else if (a.type === v.JS_CALL_EXPRESSION) {
|
|
2172
|
+
const r = a.arguments?.[0];
|
|
2173
|
+
if (r) {
|
|
2174
|
+
const n = qu(r, su);
|
|
2175
|
+
t.push(...n);
|
|
2117
2176
|
}
|
|
2118
|
-
} else if (a.type ===
|
|
2119
|
-
const
|
|
2120
|
-
|
|
2177
|
+
} else if (a.type === v.TEXT_CALL) {
|
|
2178
|
+
const r = Q(a, e);
|
|
2179
|
+
r && (Array.isArray(r) ? t.push(...r) : t.push(r));
|
|
2121
2180
|
} else {
|
|
2122
|
-
const
|
|
2123
|
-
|
|
2181
|
+
const r = Q(a, e);
|
|
2182
|
+
r && (Array.isArray(r) ? t.push(...r) : t.push(r));
|
|
2124
2183
|
}
|
|
2125
2184
|
if (t.length === 1) {
|
|
2126
2185
|
const a = t[0];
|
|
2127
|
-
e.children = typeof a == "string" ||
|
|
2186
|
+
e.children = typeof a == "string" || nu(a) ? a : [a];
|
|
2128
2187
|
} else
|
|
2129
|
-
e.children = t.map((a) => typeof a == "string" ? { name: "span", children: a } : a);
|
|
2188
|
+
e.children = t.map((a) => typeof a == "string" || nu(a) ? { name: "span", children: a } : a);
|
|
2130
2189
|
return e;
|
|
2131
2190
|
}
|
|
2132
|
-
function
|
|
2191
|
+
function wt(e) {
|
|
2133
2192
|
const u = e.branches || [], t = u[0], a = t.children || [];
|
|
2134
|
-
if (t?.isTemplateIf || a.length > 1 || a[0].type !==
|
|
2135
|
-
const
|
|
2136
|
-
return
|
|
2193
|
+
if (t?.isTemplateIf || a.length > 1 || a[0].type !== v.ELEMENT) {
|
|
2194
|
+
const n = { name: "span", directives: eu(t, u) };
|
|
2195
|
+
return cu(n, t.children);
|
|
2137
2196
|
} else
|
|
2138
|
-
return
|
|
2197
|
+
return Et(u);
|
|
2198
|
+
}
|
|
2199
|
+
const It = {
|
|
2200
|
+
onBeforeMount: "beforeMount",
|
|
2201
|
+
onMounted: "mounted",
|
|
2202
|
+
onBeforeUpdate: "beforeUpdate",
|
|
2203
|
+
onUpdated: "updated",
|
|
2204
|
+
onBeforeUnmount: "beforeUnmount",
|
|
2205
|
+
onUnmounted: "unmounted",
|
|
2206
|
+
onErrorCaptured: "errorCaptured",
|
|
2207
|
+
onRenderTracked: "renderTracked",
|
|
2208
|
+
onRenderTriggered: "renderTriggered",
|
|
2209
|
+
onActivated: "activated",
|
|
2210
|
+
onDeactivated: "deactivated",
|
|
2211
|
+
// Uniapp 专用生命周期钩子(Composition 名与 Options 名相同)
|
|
2212
|
+
onLoad: "onLoad",
|
|
2213
|
+
onShow: "onShow",
|
|
2214
|
+
onReady: "onReady",
|
|
2215
|
+
onHide: "onHide",
|
|
2216
|
+
onUnload: "onUnload",
|
|
2217
|
+
onResize: "onResize",
|
|
2218
|
+
onPullDownRefresh: "onPullDownRefresh",
|
|
2219
|
+
onReachBottom: "onReachBottom",
|
|
2220
|
+
onTabItemTap: "onTabItemTap",
|
|
2221
|
+
onShareAppMessage: "onShareAppMessage",
|
|
2222
|
+
onPageScroll: "onPageScroll",
|
|
2223
|
+
onNavigationBarButtonTap: "onNavigationBarButtonTap",
|
|
2224
|
+
onBackPress: "onBackPress",
|
|
2225
|
+
onNavigationBarSearchInputChanged: "onNavigationBarSearchInputChanged",
|
|
2226
|
+
onNavigationBarSearchInputConfirmed: "onNavigationBarSearchInputConfirmed",
|
|
2227
|
+
onNavigationBarSearchInputClicked: "onNavigationBarSearchInputClicked",
|
|
2228
|
+
onShareTimeline: "onShareTimeline",
|
|
2229
|
+
onAddToFavorites: "onAddToFavorites"
|
|
2230
|
+
}, At = /* @__PURE__ */ new Set([
|
|
2231
|
+
"vue-router",
|
|
2232
|
+
"pinia",
|
|
2233
|
+
"vue-i18n",
|
|
2234
|
+
"@vtj/renderer"
|
|
2235
|
+
]), kt = new Set(
|
|
2236
|
+
Object.values(gu).map((e) => e.composable).filter((e) => !!e)
|
|
2237
|
+
);
|
|
2238
|
+
function Tt(e, u) {
|
|
2239
|
+
const t = Nt(e), a = jt(t), { dependencies: r = [] } = u || {}, n = r.reduce(
|
|
2240
|
+
(c, d) => (c[d.package] = d.library, c),
|
|
2241
|
+
{}
|
|
2242
|
+
), i = {
|
|
2243
|
+
imports: t,
|
|
2244
|
+
refs: {},
|
|
2245
|
+
reactives: {},
|
|
2246
|
+
state: {},
|
|
2247
|
+
computed: {},
|
|
2248
|
+
methods: {},
|
|
2249
|
+
watch: [],
|
|
2250
|
+
lifeCycles: {},
|
|
2251
|
+
props: [],
|
|
2252
|
+
emits: [],
|
|
2253
|
+
expose: [],
|
|
2254
|
+
inject: [],
|
|
2255
|
+
provide: {},
|
|
2256
|
+
composables: [],
|
|
2257
|
+
setup: void 0,
|
|
2258
|
+
handlers: {},
|
|
2259
|
+
dataSources: {},
|
|
2260
|
+
directives: {}
|
|
2261
|
+
}, s = [], o = B(e);
|
|
2262
|
+
if (J(o, {
|
|
2263
|
+
// 顶层变量声明
|
|
2264
|
+
VariableDeclaration(c) {
|
|
2265
|
+
if (c.parent.type !== "Program") return;
|
|
2266
|
+
const d = c.node;
|
|
2267
|
+
for (const p of d.declarations) {
|
|
2268
|
+
if (!p.init) continue;
|
|
2269
|
+
const b = p.init;
|
|
2270
|
+
if (b.type === "CallExpression") {
|
|
2271
|
+
const h = Cu(b);
|
|
2272
|
+
if (h === "ref") {
|
|
2273
|
+
const E = L(p.id);
|
|
2274
|
+
if (E) {
|
|
2275
|
+
const m = b.arguments[0] ? A(b.arguments[0]) : "undefined";
|
|
2276
|
+
i.refs[E] = T(m);
|
|
2277
|
+
}
|
|
2278
|
+
return;
|
|
2279
|
+
}
|
|
2280
|
+
if (h === "reactive") {
|
|
2281
|
+
const E = L(p.id);
|
|
2282
|
+
if (E)
|
|
2283
|
+
if (E === "__state")
|
|
2284
|
+
i.state = qt(b.arguments[0]);
|
|
2285
|
+
else {
|
|
2286
|
+
const m = b.arguments[0] ? A(b.arguments[0]) : "{}";
|
|
2287
|
+
i.reactives[E] = T(m);
|
|
2288
|
+
}
|
|
2289
|
+
return;
|
|
2290
|
+
}
|
|
2291
|
+
if (h === "computed") {
|
|
2292
|
+
const E = L(p.id);
|
|
2293
|
+
if (E) {
|
|
2294
|
+
const m = b.arguments[0] ? A(b.arguments[0]) : "() => {}";
|
|
2295
|
+
i.computed[E] = C(m);
|
|
2296
|
+
}
|
|
2297
|
+
return;
|
|
2298
|
+
}
|
|
2299
|
+
if (h === "inject") {
|
|
2300
|
+
const E = L(p.id);
|
|
2301
|
+
if (E) {
|
|
2302
|
+
const m = b.arguments[0], y = b.arguments[1], x = m ? _u(m) : E;
|
|
2303
|
+
i.inject.push({
|
|
2304
|
+
name: E,
|
|
2305
|
+
from: x || E,
|
|
2306
|
+
default: y ? T(A(y)) : void 0
|
|
2307
|
+
});
|
|
2308
|
+
}
|
|
2309
|
+
return;
|
|
2310
|
+
}
|
|
2311
|
+
if (h === "defineProps" || h === "withDefaults") {
|
|
2312
|
+
i.props = Mu(b);
|
|
2313
|
+
return;
|
|
2314
|
+
}
|
|
2315
|
+
if (h === "defineEmits") {
|
|
2316
|
+
i.emits = Pu(b);
|
|
2317
|
+
return;
|
|
2318
|
+
}
|
|
2319
|
+
if (h && /^use[A-Z]/.test(h)) {
|
|
2320
|
+
const E = a.get(h);
|
|
2321
|
+
if (Vt(h, E)) {
|
|
2322
|
+
const x = Lu(p.id);
|
|
2323
|
+
x.length > 0 && (i.globalApiDestructured ??= [], i.globalApiDestructured.push({ callee: h, destructure: x }));
|
|
2324
|
+
return;
|
|
2325
|
+
}
|
|
2326
|
+
if (h === "useProvider") return;
|
|
2327
|
+
if (!E)
|
|
2328
|
+
continue;
|
|
2329
|
+
const m = L(p.id), y = Lu(p.id);
|
|
2330
|
+
if (m || y.length) {
|
|
2331
|
+
if (m && i.composables.some((D) => D.name === m))
|
|
2332
|
+
return;
|
|
2333
|
+
let x;
|
|
2334
|
+
const w = n[E];
|
|
2335
|
+
w ? x = `this.$libs.${w}.${h}` : x = h;
|
|
2336
|
+
const I = {
|
|
2337
|
+
name: m || y[0] || h,
|
|
2338
|
+
composable: {
|
|
2339
|
+
type: "JSExpression",
|
|
2340
|
+
value: x
|
|
2341
|
+
}
|
|
2342
|
+
};
|
|
2343
|
+
b.arguments.length > 0 && (I.args = b.arguments.map(
|
|
2344
|
+
(D) => T(A(D))
|
|
2345
|
+
)), y.length > 0 && (I.destructure = y), i.composables.push(I);
|
|
2346
|
+
}
|
|
2347
|
+
return;
|
|
2348
|
+
}
|
|
2349
|
+
const S = L(p.id);
|
|
2350
|
+
if (S && S.startsWith("__") || h === "getCurrentInstance")
|
|
2351
|
+
return;
|
|
2352
|
+
}
|
|
2353
|
+
if (b.type === "ArrowFunctionExpression" || b.type === "FunctionExpression") {
|
|
2354
|
+
const h = L(p.id);
|
|
2355
|
+
if (h) {
|
|
2356
|
+
const S = A(b);
|
|
2357
|
+
if (Bu(S)) {
|
|
2358
|
+
const E = Fu(h, S, u);
|
|
2359
|
+
if (E) {
|
|
2360
|
+
i.dataSources[h] = E;
|
|
2361
|
+
return;
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
i.methods[h] = C(S);
|
|
2365
|
+
}
|
|
2366
|
+
return;
|
|
2367
|
+
}
|
|
2368
|
+
if (b.type === "MemberExpression") {
|
|
2369
|
+
const h = b.object, S = h.type === "Identifier" ? h.name : h.type === "MemberExpression" && h.object.type === "Identifier" ? h.object.name : null;
|
|
2370
|
+
if (S && a.has(S))
|
|
2371
|
+
return;
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
if (d.declarations.some((p) => {
|
|
2375
|
+
const b = L(p.id);
|
|
2376
|
+
return b && b.startsWith("__");
|
|
2377
|
+
}))
|
|
2378
|
+
return;
|
|
2379
|
+
if (d.declarations.every((p) => {
|
|
2380
|
+
const b = p.init;
|
|
2381
|
+
return b && (b.type === "ObjectExpression" || b.type === "ArrayExpression");
|
|
2382
|
+
}) && d.declarations.length > 0) {
|
|
2383
|
+
for (const p of d.declarations) {
|
|
2384
|
+
const b = L(p.id);
|
|
2385
|
+
b && p.init && (i.reactives[b] = T(A(p.init)));
|
|
2386
|
+
}
|
|
2387
|
+
return;
|
|
2388
|
+
}
|
|
2389
|
+
for (const p of d.declarations) {
|
|
2390
|
+
const b = p.init;
|
|
2391
|
+
if (b) {
|
|
2392
|
+
const h = L(p.id) || "(unknown)", S = A(b), E = b.type;
|
|
2393
|
+
throw new Error(
|
|
2394
|
+
`[vtj/parser] 无法处理顶层变量声明 "const ${h} = ${S}":不支持的类型 "${E}"。仅支持 ObjectExpression / ArrayExpression 兜底自动转换为 reactive()。请改用 ref()、reactive()、computed() 或函数声明。`
|
|
2395
|
+
);
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
throw new Error(
|
|
2399
|
+
"[vtj/parser] 无法处理顶层变量声明,请检查语句是否符合 DSL 要求。"
|
|
2400
|
+
);
|
|
2401
|
+
},
|
|
2402
|
+
// 顶层函数声明
|
|
2403
|
+
FunctionDeclaration(c) {
|
|
2404
|
+
if (c.parent.type !== "Program") return;
|
|
2405
|
+
const d = c.node;
|
|
2406
|
+
if (!d.id) return;
|
|
2407
|
+
const f = d.id.name, p = Lt(d);
|
|
2408
|
+
if (Bu(p)) {
|
|
2409
|
+
const b = Fu(f, p, u);
|
|
2410
|
+
if (b) {
|
|
2411
|
+
i.dataSources[f] = b;
|
|
2412
|
+
return;
|
|
2413
|
+
}
|
|
2414
|
+
}
|
|
2415
|
+
i.methods[f] = C(p);
|
|
2416
|
+
},
|
|
2417
|
+
// 顶层类声明 → 禁止,抛出异常
|
|
2418
|
+
ClassDeclaration(c) {
|
|
2419
|
+
if (c.parent.type !== "Program") return;
|
|
2420
|
+
const f = c.node.id?.name || "(anonymous)";
|
|
2421
|
+
throw new Error(
|
|
2422
|
+
`[vtj/parser] 无法处理顶层类声明 "class ${f}":DSL 不支持顶层 class 声明,请改用 ref()、reactive() 或函数声明。`
|
|
2423
|
+
);
|
|
2424
|
+
},
|
|
2425
|
+
// 顶层表达式语句
|
|
2426
|
+
ExpressionStatement(c) {
|
|
2427
|
+
if (c.parent.type !== "Program") return;
|
|
2428
|
+
const d = c.node, f = d.expression;
|
|
2429
|
+
if (f.type !== "CallExpression") {
|
|
2430
|
+
const h = A(d);
|
|
2431
|
+
throw new Error(
|
|
2432
|
+
`[vtj/parser] 无法处理顶层表达式语句 "${h}":DSL 不支持游离的顶层表达式,请改用生命周期钩子(如 onMounted)或声明确赋值。`
|
|
2433
|
+
);
|
|
2434
|
+
}
|
|
2435
|
+
const p = Cu(f);
|
|
2436
|
+
if (p === "watch") {
|
|
2437
|
+
const h = Ct(f);
|
|
2438
|
+
h && i.watch.push(h);
|
|
2439
|
+
return;
|
|
2440
|
+
}
|
|
2441
|
+
if (p && p in It) {
|
|
2442
|
+
const h = f.arguments[0];
|
|
2443
|
+
h && (i.lifeCycles[p] = C(A(h)));
|
|
2444
|
+
return;
|
|
2445
|
+
}
|
|
2446
|
+
if (p === "provide") {
|
|
2447
|
+
const h = f.arguments[0], S = f.arguments[1];
|
|
2448
|
+
if (h && S) {
|
|
2449
|
+
const E = _u(h);
|
|
2450
|
+
if (E) {
|
|
2451
|
+
const m = A(S);
|
|
2452
|
+
S.type === "ArrowFunctionExpression" || S.type === "FunctionExpression" ? i.provide[E] = C(m) : i.provide[E] = T(m);
|
|
2453
|
+
}
|
|
2454
|
+
}
|
|
2455
|
+
return;
|
|
2456
|
+
}
|
|
2457
|
+
if (p === "defineExpose") {
|
|
2458
|
+
i.expose = Rt(f);
|
|
2459
|
+
return;
|
|
2460
|
+
}
|
|
2461
|
+
if (p === "defineProps" || p === "withDefaults") {
|
|
2462
|
+
i.props = Mu(f);
|
|
2463
|
+
return;
|
|
2464
|
+
}
|
|
2465
|
+
if (p === "defineEmits") {
|
|
2466
|
+
i.emits = Pu(f);
|
|
2467
|
+
return;
|
|
2468
|
+
}
|
|
2469
|
+
const b = A(d);
|
|
2470
|
+
throw new Error(
|
|
2471
|
+
`[vtj/parser] 无法处理顶层调用语句 "${b}":DSL 不支持游离的顶层函数调用,请改用生命周期钩子(如 onMounted)或归类到方法声明中。`
|
|
2472
|
+
);
|
|
2473
|
+
}
|
|
2474
|
+
}), s.length > 0) {
|
|
2475
|
+
const d = s.some((f) => /\bawait\b/.test(f)) ? "async () =>" : "() =>";
|
|
2476
|
+
i.setup = C(
|
|
2477
|
+
`${d} {
|
|
2478
|
+
${s.join(`
|
|
2479
|
+
`)}
|
|
2480
|
+
}`
|
|
2481
|
+
);
|
|
2482
|
+
}
|
|
2483
|
+
return i;
|
|
2139
2484
|
}
|
|
2140
|
-
function
|
|
2485
|
+
function Nt(e) {
|
|
2486
|
+
const u = /import\s+{(.+?)}\s+from\s+['"](.+?)['"]/g, t = /import\s+(.+?)\s+from\s+['"](.+?)['"]/g, a = /^{(.+?)}$/, r = [];
|
|
2487
|
+
let n;
|
|
2488
|
+
const i = e.replace(/\n/g, " ");
|
|
2489
|
+
for (; (n = u.exec(i)) !== null; ) {
|
|
2490
|
+
const s = n[2] === "@element-plus/icons-vue" ? "@vtj/icons" : n[2];
|
|
2491
|
+
r.push({
|
|
2492
|
+
from: s,
|
|
2493
|
+
imports: n[1].split(",").map((o) => o.trim())
|
|
2494
|
+
});
|
|
2495
|
+
}
|
|
2496
|
+
for (; (n = t.exec(i)) !== null; ) {
|
|
2497
|
+
const s = n[1], o = n[2];
|
|
2498
|
+
s && !a.test(s) && r.push({
|
|
2499
|
+
from: o,
|
|
2500
|
+
imports: s
|
|
2501
|
+
});
|
|
2502
|
+
}
|
|
2503
|
+
return r;
|
|
2504
|
+
}
|
|
2505
|
+
function jt(e) {
|
|
2506
|
+
const u = /* @__PURE__ */ new Map();
|
|
2507
|
+
for (const t of e)
|
|
2508
|
+
if (Array.isArray(t.imports))
|
|
2509
|
+
for (const a of t.imports) {
|
|
2510
|
+
const r = a.match(/^\S+\s+as\s+(\S+)$/), n = r ? r[1] : a;
|
|
2511
|
+
u.set(n, t.from);
|
|
2512
|
+
}
|
|
2513
|
+
else
|
|
2514
|
+
u.set(t.imports, t.from);
|
|
2515
|
+
return u;
|
|
2516
|
+
}
|
|
2517
|
+
function Vt(e, u) {
|
|
2518
|
+
return u && At.has(u) ? !0 : kt.has(e);
|
|
2519
|
+
}
|
|
2520
|
+
function Cu(e) {
|
|
2521
|
+
return e.callee.type === "Identifier" ? e.callee.name : null;
|
|
2522
|
+
}
|
|
2523
|
+
function L(e) {
|
|
2524
|
+
return e?.type === "Identifier" ? e.name : null;
|
|
2525
|
+
}
|
|
2526
|
+
function Lu(e) {
|
|
2527
|
+
return e?.type === "ObjectPattern" ? e.properties.map((u) => u.type === "ObjectProperty" && u.key?.type === "Identifier" ? u.key.name : u.type === "RestElement" && u.argument?.type === "Identifier" ? u.argument.name : null).filter(Boolean) : e?.type === "ArrayPattern" ? e.elements.map((u) => u?.type === "Identifier" ? u.name : null).filter(Boolean) : [];
|
|
2528
|
+
}
|
|
2529
|
+
function _u(e) {
|
|
2530
|
+
return e.type === "StringLiteral" ? e.value : null;
|
|
2531
|
+
}
|
|
2532
|
+
function qt(e) {
|
|
2533
|
+
if (!e || e.type !== "ObjectExpression") return {};
|
|
2534
|
+
const u = {};
|
|
2535
|
+
for (const t of e.properties)
|
|
2536
|
+
if (t.type === "ObjectProperty") {
|
|
2537
|
+
const a = t.key?.name;
|
|
2538
|
+
a && (u[a] = T(A(t.value)));
|
|
2539
|
+
} else if (t.type === "ObjectMethod") {
|
|
2540
|
+
const a = t.key?.name;
|
|
2541
|
+
if (a) {
|
|
2542
|
+
const r = A(t.body), n = t.params.map((i) => i.name || "none").join(",");
|
|
2543
|
+
u[a] = T(`(${n}) => ${r}`);
|
|
2544
|
+
}
|
|
2545
|
+
}
|
|
2546
|
+
return u;
|
|
2547
|
+
}
|
|
2548
|
+
function Mu(e) {
|
|
2549
|
+
if (e.callee.type === "Identifier" && e.callee.name === "withDefaults") {
|
|
2550
|
+
const u = e.arguments[0];
|
|
2551
|
+
if (u?.type === "CallExpression") {
|
|
2552
|
+
const t = Ou(u), a = e.arguments[1];
|
|
2553
|
+
return a?.type === "ObjectExpression" && Dt(t, a), t;
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
return Ou(e);
|
|
2557
|
+
}
|
|
2558
|
+
function Ou(e) {
|
|
2559
|
+
const u = e.arguments[0];
|
|
2560
|
+
return u ? u.type === "ArrayExpression" ? u.elements.map((t) => t?.type === "StringLiteral" ? t.value : "").filter(Boolean) : u.type === "ObjectExpression" ? u.properties.map((t) => {
|
|
2561
|
+
if (t.type !== "ObjectProperty") return null;
|
|
2562
|
+
const a = t.key?.name;
|
|
2563
|
+
if (!a) return null;
|
|
2564
|
+
if (t.value?.type === "Identifier")
|
|
2565
|
+
return { name: a, type: t.value.name };
|
|
2566
|
+
if (t.value?.type === "ObjectExpression") {
|
|
2567
|
+
const r = t.value.properties;
|
|
2568
|
+
return {
|
|
2569
|
+
name: a,
|
|
2570
|
+
type: _t(r),
|
|
2571
|
+
required: xu(r, "required"),
|
|
2572
|
+
default: Mt(r)
|
|
2573
|
+
};
|
|
2574
|
+
}
|
|
2575
|
+
return a;
|
|
2576
|
+
}).filter(Boolean) : [] : [];
|
|
2577
|
+
}
|
|
2578
|
+
function Dt(e, u) {
|
|
2579
|
+
for (const t of u.properties) {
|
|
2580
|
+
if (t.type !== "ObjectProperty") continue;
|
|
2581
|
+
const a = t.key?.name;
|
|
2582
|
+
if (!a) continue;
|
|
2583
|
+
const r = e.findIndex(
|
|
2584
|
+
(n) => typeof n == "string" ? n === a : n.name === a
|
|
2585
|
+
);
|
|
2586
|
+
if (r >= 0) {
|
|
2587
|
+
const n = e[r];
|
|
2588
|
+
typeof n == "string" ? e[r] = {
|
|
2589
|
+
name: a,
|
|
2590
|
+
default: T(A(t.value))
|
|
2591
|
+
} : n.default = T(A(t.value));
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
function Pu(e) {
|
|
2596
|
+
const u = e.arguments[0];
|
|
2597
|
+
return u ? u.type === "ArrayExpression" ? u.elements.map((t) => t?.type === "StringLiteral" ? { name: t.value, params: [] } : null).filter(Boolean) : [] : [];
|
|
2598
|
+
}
|
|
2599
|
+
function Rt(e) {
|
|
2600
|
+
const u = e.arguments[0];
|
|
2601
|
+
return !u || u.type !== "ObjectExpression" ? [] : u.properties.map((t) => (t.type === "ObjectProperty" || t.type === "ObjectMethod") && t.key?.name || "").filter(Boolean);
|
|
2602
|
+
}
|
|
2603
|
+
function Ct(e) {
|
|
2604
|
+
const [u, t, a] = e.arguments;
|
|
2605
|
+
if (!u || !t) return null;
|
|
2606
|
+
const r = A(u), n = A(t);
|
|
2607
|
+
let i = !1, s = !1;
|
|
2608
|
+
if (a?.type === "ObjectExpression") {
|
|
2609
|
+
const o = a.properties;
|
|
2610
|
+
i = xu(o, "deep"), s = xu(o, "immediate");
|
|
2611
|
+
}
|
|
2612
|
+
return {
|
|
2613
|
+
id: ru(),
|
|
2614
|
+
source: C(
|
|
2615
|
+
u.type === "ArrowFunctionExpression" || u.type === "FunctionExpression" ? r : `() => { return ${r}; }`
|
|
2616
|
+
),
|
|
2617
|
+
handler: C(n),
|
|
2618
|
+
deep: i,
|
|
2619
|
+
immediate: s
|
|
2620
|
+
};
|
|
2621
|
+
}
|
|
2622
|
+
function Lt(e) {
|
|
2623
|
+
const u = e.async ? "async " : "", t = e.params.map((r) => r.type === "ObjectPattern" ? `{${r.properties.map((i) => i.key?.name || i.name).join(",")}}` : r.type === "AssignmentPattern" ? r.left.name + "=" + (r.right?.extra?.raw || "null") : r.name).join(", "), a = A(e.body) || "{}";
|
|
2624
|
+
return `${u}(${t}) => ${a}`;
|
|
2625
|
+
}
|
|
2626
|
+
function Bu(e) {
|
|
2627
|
+
return e.includes("__provider.apis") || e.includes("__provider.createMock");
|
|
2628
|
+
}
|
|
2629
|
+
function Fu(e, u, t) {
|
|
2630
|
+
const a = /apis\['([\w]*)'\]/, n = Qu(""), i = (s) => {
|
|
2631
|
+
const o = s.indexOf(".then(");
|
|
2632
|
+
if (o === -1) return null;
|
|
2633
|
+
let c = 1, d = o + 6;
|
|
2634
|
+
for (; d < s.length && c > 0; ) {
|
|
2635
|
+
const f = s[d];
|
|
2636
|
+
f === "(" ? c++ : f === ")" && c--, d++;
|
|
2637
|
+
}
|
|
2638
|
+
return s.substring(o + 6, d - 1).trim();
|
|
2639
|
+
};
|
|
2640
|
+
if (u.includes("__provider.apis")) {
|
|
2641
|
+
const o = (u.match(a) || [])[1];
|
|
2642
|
+
if (!o) return null;
|
|
2643
|
+
const c = (t.apis || []).find((f) => f.id === o || f.name === o);
|
|
2644
|
+
if (!c) return null;
|
|
2645
|
+
const d = i(u);
|
|
2646
|
+
return {
|
|
2647
|
+
ref: o,
|
|
2648
|
+
name: e,
|
|
2649
|
+
test: n?.test || {
|
|
2650
|
+
type: "JSFunction",
|
|
2651
|
+
value: `() => this.runApi({
|
|
2652
|
+
/* 在这里可输入接口参数 */
|
|
2653
|
+
})`
|
|
2654
|
+
},
|
|
2655
|
+
type: "api",
|
|
2656
|
+
label: c.label,
|
|
2657
|
+
transform: {
|
|
2658
|
+
type: "JSFunction",
|
|
2659
|
+
value: d || `(res) => {
|
|
2660
|
+
return res;
|
|
2661
|
+
}`
|
|
2662
|
+
},
|
|
2663
|
+
mockTemplate: c.mockTemplate
|
|
2664
|
+
};
|
|
2665
|
+
}
|
|
2666
|
+
if (u.includes("__provider.createMock")) {
|
|
2667
|
+
const s = i(u);
|
|
2668
|
+
return {
|
|
2669
|
+
ref: "",
|
|
2670
|
+
name: e,
|
|
2671
|
+
test: n?.test || {
|
|
2672
|
+
type: "JSFunction",
|
|
2673
|
+
value: `() => this.runApi({
|
|
2674
|
+
/* 在这里可输入接口参数 */
|
|
2675
|
+
})`
|
|
2676
|
+
},
|
|
2677
|
+
type: "mock",
|
|
2678
|
+
label: n?.label || "",
|
|
2679
|
+
transform: n?.transform || {
|
|
2680
|
+
type: "JSFunction",
|
|
2681
|
+
value: s || `(res) => {
|
|
2682
|
+
return res;
|
|
2683
|
+
}`
|
|
2684
|
+
},
|
|
2685
|
+
mockTemplate: n?.mockTemplate || {
|
|
2686
|
+
type: "JSFunction",
|
|
2687
|
+
value: ""
|
|
2688
|
+
}
|
|
2689
|
+
};
|
|
2690
|
+
}
|
|
2691
|
+
return null;
|
|
2692
|
+
}
|
|
2693
|
+
function xu(e, u) {
|
|
2694
|
+
return !!e?.find(
|
|
2695
|
+
(a) => a.key?.name === u
|
|
2696
|
+
)?.value?.value;
|
|
2697
|
+
}
|
|
2698
|
+
function _t(e) {
|
|
2699
|
+
const u = e?.find(
|
|
2700
|
+
(t) => t.key?.name === "type"
|
|
2701
|
+
);
|
|
2702
|
+
if (u)
|
|
2703
|
+
return u.value.type === "ArrayExpression" ? u.value.elements.map((t) => t.name) : u.value.name;
|
|
2704
|
+
}
|
|
2705
|
+
function Mt(e) {
|
|
2706
|
+
const u = e?.find(
|
|
2707
|
+
(t) => t.key?.name === "default"
|
|
2708
|
+
);
|
|
2709
|
+
if (u)
|
|
2710
|
+
return T(A(u.value));
|
|
2711
|
+
}
|
|
2712
|
+
function Ot(e) {
|
|
2141
2713
|
const u = [], t = {}, a = [];
|
|
2142
2714
|
try {
|
|
2143
|
-
const
|
|
2144
|
-
for (const
|
|
2145
|
-
if (
|
|
2715
|
+
const r = ve.compileString(e, { charset: !1 })?.css || "", n = Se.parse(r), i = /^.[\w]+_[\w]{5,}/;
|
|
2716
|
+
for (const s of n.nodes)
|
|
2717
|
+
if (s.type === "rule") {
|
|
2146
2718
|
const o = {};
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
}), t[
|
|
2719
|
+
i.test(s.selector) ? (s.nodes.forEach((c) => {
|
|
2720
|
+
c.type === "decl" && (o[c.prop] = c.value);
|
|
2721
|
+
}), t[s.selector] = o) : a.push(s.toString());
|
|
2150
2722
|
} else
|
|
2151
|
-
a.push(
|
|
2152
|
-
} catch (
|
|
2153
|
-
u.push(`css解析出错了,错误信息:[ ${
|
|
2723
|
+
a.push(s.toString());
|
|
2724
|
+
} catch (r) {
|
|
2725
|
+
u.push(`css解析出错了,错误信息:[ ${r.message} ]
|
|
2154
2726
|
`);
|
|
2155
2727
|
}
|
|
2156
2728
|
return {
|
|
@@ -2160,12 +2732,194 @@ function dt(e) {
|
|
|
2160
2732
|
`)
|
|
2161
2733
|
};
|
|
2162
2734
|
}
|
|
2163
|
-
|
|
2735
|
+
function uu(e, u, t) {
|
|
2736
|
+
let a = "", r = 0;
|
|
2737
|
+
const n = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`/g;
|
|
2738
|
+
let i;
|
|
2739
|
+
for (; (i = n.exec(e)) !== null; ) {
|
|
2740
|
+
const s = e.slice(r, i.index);
|
|
2741
|
+
a += s.replace(u, t);
|
|
2742
|
+
const o = i[0];
|
|
2743
|
+
o.startsWith("`") ? a += Pt(o, u, t) : a += o, r = i.index + i[0].length;
|
|
2744
|
+
}
|
|
2745
|
+
return a += e.slice(r).replace(u, t), a;
|
|
2746
|
+
}
|
|
2747
|
+
function Pt(e, u, t) {
|
|
2748
|
+
let a = "", r = 0;
|
|
2749
|
+
const n = /\$\{([^}]*)\}/g;
|
|
2750
|
+
let i;
|
|
2751
|
+
for (; (i = n.exec(e)) !== null; ) {
|
|
2752
|
+
a += e.slice(r, i.index);
|
|
2753
|
+
const o = i[1].replace(u, t);
|
|
2754
|
+
a += "${" + o + "}", r = i.index + i[0].length;
|
|
2755
|
+
}
|
|
2756
|
+
return a += e.slice(r), a;
|
|
2757
|
+
}
|
|
2758
|
+
function Bt(e, u) {
|
|
2759
|
+
if (!e) return e;
|
|
2760
|
+
let t = e;
|
|
2761
|
+
const a = [...u.refs, ...u.computed];
|
|
2762
|
+
for (const r of a)
|
|
2763
|
+
t = uu(
|
|
2764
|
+
t,
|
|
2765
|
+
new RegExp(`(?<!\\.)\\b${Z(r)}\\.value\\b`, "g"),
|
|
2766
|
+
`this.${r}.value`
|
|
2767
|
+
);
|
|
2768
|
+
for (const r of a)
|
|
2769
|
+
t = uu(
|
|
2770
|
+
t,
|
|
2771
|
+
new RegExp(
|
|
2772
|
+
`(?<!this\\.)(?:(?<=_ctx\\.)|(?<!\\.))\\b${Z(r)}\\b(?!\\.value)`,
|
|
2773
|
+
"g"
|
|
2774
|
+
),
|
|
2775
|
+
`this.${r}.value`
|
|
2776
|
+
);
|
|
2777
|
+
t = uu(
|
|
2778
|
+
t,
|
|
2779
|
+
/__instance\.proxy\.\$forceUpdate\./g,
|
|
2780
|
+
"__instance.proxy."
|
|
2781
|
+
);
|
|
2782
|
+
for (const [r, n] of Object.entries(
|
|
2783
|
+
u.reverseMemberApiMap || {}
|
|
2784
|
+
))
|
|
2785
|
+
for (const [i, s] of Object.entries(n)) {
|
|
2786
|
+
const o = new RegExp(
|
|
2787
|
+
`\\b${Z(r)}\\.${Z(i)}\\b`,
|
|
2788
|
+
"g"
|
|
2789
|
+
);
|
|
2790
|
+
t = uu(t, o, `this.${s}`);
|
|
2791
|
+
}
|
|
2792
|
+
for (const r of u.props)
|
|
2793
|
+
t = Ft(t, "__props", r, `this.${r}`);
|
|
2794
|
+
for (const r of u.props)
|
|
2795
|
+
t = R(t, r, `this.${r}`);
|
|
2796
|
+
for (const [r, n] of Object.entries(u.reverseApiMap))
|
|
2797
|
+
t = R(t, r, `this.${n}`);
|
|
2798
|
+
u.hasState && (t = R(t, "__state", "this.state"));
|
|
2799
|
+
for (const r of u.reactives)
|
|
2800
|
+
t = R(t, r, `this.${r}`);
|
|
2801
|
+
for (const r of u.methods)
|
|
2802
|
+
t = R(t, r, `this.${r}`);
|
|
2803
|
+
for (const r of u.composables)
|
|
2804
|
+
t = R(t, r, `this.${r}`);
|
|
2805
|
+
for (const r of u.injects)
|
|
2806
|
+
t = R(t, r, `this.${r}`);
|
|
2807
|
+
for (const r of u.dataSources)
|
|
2808
|
+
t = R(t, r, `this.${r}`);
|
|
2809
|
+
return t = t.replace(/this\.this\./g, "this."), t;
|
|
2810
|
+
}
|
|
2811
|
+
function Z(e) {
|
|
2812
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2813
|
+
}
|
|
2814
|
+
function Ft(e, u, t, a) {
|
|
2815
|
+
const r = new RegExp(
|
|
2816
|
+
`\\b${Z(u)}\\.${Z(t)}\\b`,
|
|
2817
|
+
"g"
|
|
2818
|
+
);
|
|
2819
|
+
return uu(e, r, a);
|
|
2820
|
+
}
|
|
2821
|
+
function ie(e) {
|
|
2822
|
+
const u = {}, t = {};
|
|
2823
|
+
for (const [a, r] of Object.entries(gu))
|
|
2824
|
+
if (r.replace)
|
|
2825
|
+
if (r.replace.includes(".")) {
|
|
2826
|
+
const n = r.replace.lastIndexOf("."), i = r.replace.substring(0, n), s = r.replace.substring(n + 1);
|
|
2827
|
+
t[i] || (t[i] = {}), t[i][s] = a, u[a] = a;
|
|
2828
|
+
} else
|
|
2829
|
+
u[r.replace] = a;
|
|
2830
|
+
if (e) {
|
|
2831
|
+
const a = Wu[e];
|
|
2832
|
+
if (a) {
|
|
2833
|
+
for (const [r, n] of Object.entries(a))
|
|
2834
|
+
if (n.replace)
|
|
2835
|
+
if (n.replace.includes(".")) {
|
|
2836
|
+
const i = n.replace.lastIndexOf("."), s = n.replace.substring(0, i), o = n.replace.substring(i + 1);
|
|
2837
|
+
t[s] || (t[s] = {}), t[s][o] = r, u[r] = r;
|
|
2838
|
+
} else
|
|
2839
|
+
u[n.replace] = r;
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
return { simple: u, member: t };
|
|
2843
|
+
}
|
|
2844
|
+
function $t(e) {
|
|
2845
|
+
for (const u of e)
|
|
2846
|
+
if (xe.includes(u.from)) return u.from;
|
|
2847
|
+
}
|
|
2848
|
+
function Ut(e) {
|
|
2849
|
+
const u = {}, t = (a) => {
|
|
2850
|
+
for (const [r, n] of Object.entries(a)) {
|
|
2851
|
+
if (!n.composable || !n.replace || !n.replace.includes("."))
|
|
2852
|
+
continue;
|
|
2853
|
+
u[n.composable] || (u[n.composable] = {});
|
|
2854
|
+
const i = n.replace.substring(n.replace.lastIndexOf(".") + 1);
|
|
2855
|
+
u[n.composable][i] = r;
|
|
2856
|
+
}
|
|
2857
|
+
};
|
|
2858
|
+
if (t(gu), e) {
|
|
2859
|
+
const a = Wu[e];
|
|
2860
|
+
a && t(a);
|
|
2861
|
+
}
|
|
2862
|
+
return u;
|
|
2863
|
+
}
|
|
2864
|
+
function $u(e, u) {
|
|
2865
|
+
if (!e) return e;
|
|
2866
|
+
const t = {
|
|
2867
|
+
refs: new Set(u.refs),
|
|
2868
|
+
reactives: new Set(u.reactives),
|
|
2869
|
+
computed: new Set(u.computed),
|
|
2870
|
+
methods: new Set(u.methods),
|
|
2871
|
+
props: new Set(u.props),
|
|
2872
|
+
composables: new Set(u.composables),
|
|
2873
|
+
injects: new Set(u.injects),
|
|
2874
|
+
dataSources: new Set(u.dataSources),
|
|
2875
|
+
hasState: u.hasState,
|
|
2876
|
+
reverseApiMap: u.globalApiVars,
|
|
2877
|
+
reverseMemberApiMap: u.reverseMemberApiMap || ie().member
|
|
2878
|
+
};
|
|
2879
|
+
let a = Bt(e, t);
|
|
2880
|
+
a = a.replace(/_ctx\./g, "this."), a = a.replace(/this\.this\./g, "this.");
|
|
2881
|
+
for (const [r, n] of Object.entries(u.libs || {}))
|
|
2882
|
+
a = R(a, r, `this.$libs.${n}.${r}`);
|
|
2883
|
+
return a;
|
|
2884
|
+
}
|
|
2885
|
+
function Gt(e) {
|
|
2886
|
+
const u = $t(e.imports || []), { simple: t, member: a } = ie(u);
|
|
2887
|
+
if (e.globalApiDestructured && e.globalApiDestructured.length > 0) {
|
|
2888
|
+
const n = Ut(u);
|
|
2889
|
+
for (const { callee: i, destructure: s } of e.globalApiDestructured) {
|
|
2890
|
+
const o = n[i];
|
|
2891
|
+
if (o)
|
|
2892
|
+
for (const c of s)
|
|
2893
|
+
o[c] && (t[c] = o[c]);
|
|
2894
|
+
}
|
|
2895
|
+
}
|
|
2896
|
+
const r = /* @__PURE__ */ new Set();
|
|
2897
|
+
for (const n of e.composables || [])
|
|
2898
|
+
if (n.destructure && n.destructure.length > 0)
|
|
2899
|
+
for (const i of n.destructure) r.add(i);
|
|
2900
|
+
else n.name && r.add(n.name);
|
|
2901
|
+
return {
|
|
2902
|
+
refs: new Set(Object.keys(e.refs || {})),
|
|
2903
|
+
reactives: new Set(Object.keys(e.reactives || {})),
|
|
2904
|
+
computed: new Set(Object.keys(e.computed || {})),
|
|
2905
|
+
methods: new Set(Object.keys(e.methods || {})),
|
|
2906
|
+
props: new Set(
|
|
2907
|
+
(e.props || []).map((n) => typeof n == "string" ? n : n.name)
|
|
2908
|
+
),
|
|
2909
|
+
composables: r,
|
|
2910
|
+
injects: new Set((e.inject || []).map((n) => n.name)),
|
|
2911
|
+
dataSources: new Set(Object.keys(e.dataSources || {})),
|
|
2912
|
+
hasState: Object.keys(e.state || {}).length > 0,
|
|
2913
|
+
reverseApiMap: t,
|
|
2914
|
+
reverseMemberApiMap: a
|
|
2915
|
+
};
|
|
2916
|
+
}
|
|
2917
|
+
const se = "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(
|
|
2164
2918
|
", "
|
|
2165
|
-
),
|
|
2919
|
+
), Ht = "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(
|
|
2166
2920
|
", "
|
|
2167
|
-
),
|
|
2168
|
-
class
|
|
2921
|
+
), Wt = "user", _ = "User";
|
|
2922
|
+
class Jt {
|
|
2169
2923
|
validate(u) {
|
|
2170
2924
|
const t = {
|
|
2171
2925
|
valid: !0,
|
|
@@ -2179,7 +2933,7 @@ class bt {
|
|
|
2179
2933
|
}
|
|
2180
2934
|
isCompleteSFC(u) {
|
|
2181
2935
|
try {
|
|
2182
|
-
const t =
|
|
2936
|
+
const t = M(u);
|
|
2183
2937
|
return !!(t.template && t.script && t.styles);
|
|
2184
2938
|
} catch {
|
|
2185
2939
|
return !1;
|
|
@@ -2188,63 +2942,65 @@ class bt {
|
|
|
2188
2942
|
checkSyntax(u) {
|
|
2189
2943
|
let t = "";
|
|
2190
2944
|
try {
|
|
2191
|
-
const a =
|
|
2192
|
-
|
|
2945
|
+
const a = M(u);
|
|
2946
|
+
B(a.script);
|
|
2193
2947
|
} catch (a) {
|
|
2194
2948
|
a instanceof SyntaxError && (t = a.message);
|
|
2195
2949
|
}
|
|
2196
2950
|
return t;
|
|
2197
2951
|
}
|
|
2198
2952
|
checkSetup(u) {
|
|
2199
|
-
const t =
|
|
2953
|
+
const t = M(u);
|
|
2954
|
+
if (t.isScriptSetup)
|
|
2955
|
+
return !0;
|
|
2200
2956
|
let a = 0;
|
|
2201
|
-
return
|
|
2202
|
-
ObjectMethod(
|
|
2203
|
-
|
|
2204
|
-
(
|
|
2957
|
+
return Ju(t.script, {
|
|
2958
|
+
ObjectMethod(r) {
|
|
2959
|
+
r.node.key.name === "setup" && (a = r.node.body.body.filter(
|
|
2960
|
+
(i) => !q.isEmptyStatement(i)
|
|
2205
2961
|
).length);
|
|
2206
2962
|
}
|
|
2207
2963
|
}), a === 3;
|
|
2208
2964
|
}
|
|
2209
2965
|
findVantIcons(u) {
|
|
2210
|
-
const t =
|
|
2211
|
-
return
|
|
2212
|
-
const
|
|
2213
|
-
|
|
2214
|
-
}), [...new Set(
|
|
2966
|
+
const t = M(u), a = /<(?:VanIcon|van-icon)\b[^>]*>/g, r = t.template.match(a) || [], n = [];
|
|
2967
|
+
return r.forEach((i) => {
|
|
2968
|
+
const s = i.match(/\bname="([^"]+)"/);
|
|
2969
|
+
s && n.push(s[1]);
|
|
2970
|
+
}), [...new Set(n)];
|
|
2215
2971
|
}
|
|
2216
2972
|
checkVantIcons(u) {
|
|
2217
2973
|
const t = this.findVantIcons(u), a = [];
|
|
2218
|
-
for (const
|
|
2219
|
-
|
|
2974
|
+
for (const r of t)
|
|
2975
|
+
se.includes(r) || a.push(r);
|
|
2220
2976
|
return a;
|
|
2221
2977
|
}
|
|
2222
2978
|
findVtjIcons(u) {
|
|
2223
|
-
const t =
|
|
2224
|
-
return !
|
|
2979
|
+
const t = M(u), a = /import\s*{([^}]+)}\s*from\s*['"]\@vtj\/icons['"]/, r = t.script.match(a);
|
|
2980
|
+
return !r || !r[1] ? [] : r[1].split(",").map((n) => n.trim()).filter(Boolean);
|
|
2225
2981
|
}
|
|
2226
2982
|
checkVtjIcons(u) {
|
|
2227
2983
|
const t = this.findVtjIcons(u), a = [];
|
|
2228
|
-
for (const
|
|
2229
|
-
|
|
2984
|
+
for (const r of t)
|
|
2985
|
+
Ht.includes(r) || a.push(r);
|
|
2230
2986
|
return a;
|
|
2231
2987
|
}
|
|
2232
2988
|
hasUnchangedComment(u) {
|
|
2233
|
-
const t = /<!--([\s\S]*?)-->/g, a = /\/\*([\s\S]*?)\*\//g,
|
|
2989
|
+
const t = /<!--([\s\S]*?)-->/g, a = /\/\*([\s\S]*?)\*\//g, r = /\/\/(.*)/g;
|
|
2234
2990
|
return [
|
|
2235
2991
|
...u.match(t) || [],
|
|
2236
2992
|
...u.match(a) || [],
|
|
2237
|
-
...u.match(
|
|
2993
|
+
...u.match(r) || []
|
|
2238
2994
|
].some(
|
|
2239
|
-
(
|
|
2995
|
+
(i) => /不变/.test(i.replace(/\*/g, ""))
|
|
2240
2996
|
// 移除多行注释的星号避免干扰
|
|
2241
2997
|
);
|
|
2242
2998
|
}
|
|
2243
2999
|
}
|
|
2244
|
-
function
|
|
3000
|
+
function zt(e) {
|
|
2245
3001
|
const u = [];
|
|
2246
3002
|
let t = e;
|
|
2247
|
-
const a =
|
|
3003
|
+
const a = M(e);
|
|
2248
3004
|
if (!a.template || !a.script)
|
|
2249
3005
|
return {
|
|
2250
3006
|
fixed: !1,
|
|
@@ -2252,208 +3008,208 @@ function ht(e) {
|
|
|
2252
3008
|
fixedCode: e,
|
|
2253
3009
|
changes: []
|
|
2254
3010
|
};
|
|
2255
|
-
const
|
|
2256
|
-
let
|
|
2257
|
-
const
|
|
2258
|
-
let
|
|
2259
|
-
for (; (
|
|
2260
|
-
const
|
|
2261
|
-
if (
|
|
2262
|
-
const
|
|
2263
|
-
|
|
2264
|
-
start:
|
|
2265
|
-
end:
|
|
2266
|
-
original:
|
|
2267
|
-
replacement: `{{${
|
|
2268
|
-
line:
|
|
2269
|
-
column:
|
|
3011
|
+
const r = Xt(a.script), n = a.template;
|
|
3012
|
+
let i = n;
|
|
3013
|
+
const s = [], o = /\{\{([^}]+)\}\}/g;
|
|
3014
|
+
let c;
|
|
3015
|
+
for (; (c = o.exec(n)) !== null; ) {
|
|
3016
|
+
const m = c[0], y = c[1], x = H(y, r);
|
|
3017
|
+
if (x !== y) {
|
|
3018
|
+
const w = G(n, c.index);
|
|
3019
|
+
s.push({
|
|
3020
|
+
start: c.index,
|
|
3021
|
+
end: c.index + m.length,
|
|
3022
|
+
original: m,
|
|
3023
|
+
replacement: `{{${x}}}`,
|
|
3024
|
+
line: w.line,
|
|
3025
|
+
column: w.column
|
|
2270
3026
|
}), u.push({
|
|
2271
|
-
line:
|
|
2272
|
-
column:
|
|
2273
|
-
original:
|
|
2274
|
-
fixed:
|
|
3027
|
+
line: w.line + 1,
|
|
3028
|
+
column: w.column,
|
|
3029
|
+
original: y.trim(),
|
|
3030
|
+
fixed: x.trim(),
|
|
2275
3031
|
message: "修复插值表达式:添加 state. 前缀"
|
|
2276
3032
|
});
|
|
2277
3033
|
}
|
|
2278
3034
|
}
|
|
2279
|
-
const
|
|
2280
|
-
for (; (
|
|
2281
|
-
const
|
|
2282
|
-
if (
|
|
2283
|
-
const
|
|
2284
|
-
|
|
2285
|
-
start:
|
|
2286
|
-
end:
|
|
2287
|
-
original:
|
|
2288
|
-
replacement: `:${
|
|
2289
|
-
line:
|
|
2290
|
-
column:
|
|
3035
|
+
const d = /:(\w+)="([^"]+)"/g;
|
|
3036
|
+
for (; (c = d.exec(n)) !== null; ) {
|
|
3037
|
+
const m = c[0], y = c[1], x = c[2], w = H(x, r);
|
|
3038
|
+
if (w !== x) {
|
|
3039
|
+
const I = G(n, c.index);
|
|
3040
|
+
s.push({
|
|
3041
|
+
start: c.index,
|
|
3042
|
+
end: c.index + m.length,
|
|
3043
|
+
original: m,
|
|
3044
|
+
replacement: `:${y}="${w}"`,
|
|
3045
|
+
line: I.line,
|
|
3046
|
+
column: I.column
|
|
2291
3047
|
}), u.push({
|
|
2292
|
-
line:
|
|
2293
|
-
column:
|
|
2294
|
-
original:
|
|
2295
|
-
fixed:
|
|
3048
|
+
line: I.line + 1,
|
|
3049
|
+
column: I.column,
|
|
3050
|
+
original: x,
|
|
3051
|
+
fixed: w,
|
|
2296
3052
|
message: "修复绑定属性:添加 state. 前缀"
|
|
2297
3053
|
});
|
|
2298
3054
|
}
|
|
2299
3055
|
}
|
|
2300
|
-
const
|
|
2301
|
-
for (; (
|
|
2302
|
-
const
|
|
2303
|
-
if (
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2306
|
-
start:
|
|
2307
|
-
end:
|
|
2308
|
-
original:
|
|
2309
|
-
replacement: `v-${
|
|
2310
|
-
line:
|
|
2311
|
-
column:
|
|
3056
|
+
const f = /v-(if|else-if|show)="([^"]+)"/g;
|
|
3057
|
+
for (; (c = f.exec(n)) !== null; ) {
|
|
3058
|
+
const m = c[0], y = c[1], x = c[2], w = H(x, r);
|
|
3059
|
+
if (w !== x) {
|
|
3060
|
+
const I = G(n, c.index);
|
|
3061
|
+
s.push({
|
|
3062
|
+
start: c.index,
|
|
3063
|
+
end: c.index + m.length,
|
|
3064
|
+
original: m,
|
|
3065
|
+
replacement: `v-${y}="${w}"`,
|
|
3066
|
+
line: I.line,
|
|
3067
|
+
column: I.column
|
|
2312
3068
|
}), u.push({
|
|
2313
|
-
line:
|
|
2314
|
-
column:
|
|
2315
|
-
original:
|
|
2316
|
-
fixed:
|
|
2317
|
-
message: `修复 v-${
|
|
3069
|
+
line: I.line + 1,
|
|
3070
|
+
column: I.column,
|
|
3071
|
+
original: x,
|
|
3072
|
+
fixed: w,
|
|
3073
|
+
message: `修复 v-${y} 指令:添加 state. 前缀`
|
|
2318
3074
|
});
|
|
2319
3075
|
}
|
|
2320
3076
|
}
|
|
2321
|
-
const
|
|
2322
|
-
for (; (
|
|
2323
|
-
const
|
|
2324
|
-
if (
|
|
2325
|
-
const [,
|
|
2326
|
-
|
|
2327
|
-
|
|
3077
|
+
const p = /v-for="([^"]+)"/g;
|
|
3078
|
+
for (; (c = p.exec(n)) !== null; ) {
|
|
3079
|
+
const m = c[0], x = c[1].match(/^(.+)\s+in\s+(.+)$/);
|
|
3080
|
+
if (x) {
|
|
3081
|
+
const [, w, I] = x, D = H(
|
|
3082
|
+
I,
|
|
3083
|
+
r
|
|
2328
3084
|
);
|
|
2329
|
-
if (
|
|
2330
|
-
const
|
|
2331
|
-
|
|
2332
|
-
start:
|
|
2333
|
-
end:
|
|
2334
|
-
original:
|
|
2335
|
-
replacement:
|
|
2336
|
-
line:
|
|
2337
|
-
column:
|
|
3085
|
+
if (D !== I) {
|
|
3086
|
+
const F = G(n, c.index), du = `v-for="${w} in ${D}"`;
|
|
3087
|
+
s.push({
|
|
3088
|
+
start: c.index,
|
|
3089
|
+
end: c.index + m.length,
|
|
3090
|
+
original: m,
|
|
3091
|
+
replacement: du,
|
|
3092
|
+
line: F.line,
|
|
3093
|
+
column: F.column
|
|
2338
3094
|
}), u.push({
|
|
2339
|
-
line:
|
|
2340
|
-
column:
|
|
2341
|
-
original:
|
|
2342
|
-
fixed:
|
|
3095
|
+
line: F.line + 1,
|
|
3096
|
+
column: F.column,
|
|
3097
|
+
original: I,
|
|
3098
|
+
fixed: D,
|
|
2343
3099
|
message: "修复 v-for 指令:添加 state. 前缀"
|
|
2344
3100
|
});
|
|
2345
3101
|
}
|
|
2346
3102
|
}
|
|
2347
3103
|
}
|
|
2348
|
-
const
|
|
2349
|
-
for (; (
|
|
2350
|
-
const
|
|
2351
|
-
if (
|
|
2352
|
-
const
|
|
2353
|
-
|
|
2354
|
-
start:
|
|
2355
|
-
end:
|
|
2356
|
-
original:
|
|
2357
|
-
replacement: `v-model="${
|
|
2358
|
-
line:
|
|
2359
|
-
column:
|
|
3104
|
+
const b = /v-model="([^"]+)"/g;
|
|
3105
|
+
for (; (c = b.exec(n)) !== null; ) {
|
|
3106
|
+
const m = c[0], y = c[1], x = H(y, r);
|
|
3107
|
+
if (x !== y) {
|
|
3108
|
+
const w = G(n, c.index);
|
|
3109
|
+
s.push({
|
|
3110
|
+
start: c.index,
|
|
3111
|
+
end: c.index + m.length,
|
|
3112
|
+
original: m,
|
|
3113
|
+
replacement: `v-model="${x}"`,
|
|
3114
|
+
line: w.line,
|
|
3115
|
+
column: w.column
|
|
2360
3116
|
}), u.push({
|
|
2361
|
-
line:
|
|
2362
|
-
column:
|
|
2363
|
-
original:
|
|
2364
|
-
fixed:
|
|
3117
|
+
line: w.line + 1,
|
|
3118
|
+
column: w.column,
|
|
3119
|
+
original: y,
|
|
3120
|
+
fixed: x,
|
|
2365
3121
|
message: "修复 v-model 指令:添加 state. 前缀"
|
|
2366
3122
|
});
|
|
2367
3123
|
}
|
|
2368
3124
|
}
|
|
2369
|
-
const
|
|
2370
|
-
for (; (
|
|
2371
|
-
const
|
|
2372
|
-
if (
|
|
2373
|
-
const
|
|
2374
|
-
|
|
2375
|
-
start:
|
|
2376
|
-
end:
|
|
2377
|
-
original:
|
|
2378
|
-
replacement: `v-bind="${
|
|
2379
|
-
line:
|
|
2380
|
-
column:
|
|
3125
|
+
const h = /v-bind="([^"]+)"/g;
|
|
3126
|
+
for (; (c = h.exec(n)) !== null; ) {
|
|
3127
|
+
const m = c[0], y = c[1], x = H(y, r);
|
|
3128
|
+
if (x !== y) {
|
|
3129
|
+
const w = G(n, c.index);
|
|
3130
|
+
s.push({
|
|
3131
|
+
start: c.index,
|
|
3132
|
+
end: c.index + m.length,
|
|
3133
|
+
original: m,
|
|
3134
|
+
replacement: `v-bind="${x}"`,
|
|
3135
|
+
line: w.line,
|
|
3136
|
+
column: w.column
|
|
2381
3137
|
}), u.push({
|
|
2382
|
-
line:
|
|
2383
|
-
column:
|
|
2384
|
-
original:
|
|
2385
|
-
fixed:
|
|
3138
|
+
line: w.line + 1,
|
|
3139
|
+
column: w.column,
|
|
3140
|
+
original: y,
|
|
3141
|
+
fixed: x,
|
|
2386
3142
|
message: "修复 v-bind 指令:添加 state. 前缀"
|
|
2387
3143
|
});
|
|
2388
3144
|
}
|
|
2389
3145
|
}
|
|
2390
|
-
const
|
|
2391
|
-
for (; (
|
|
2392
|
-
const
|
|
2393
|
-
if (
|
|
2394
|
-
const
|
|
2395
|
-
|
|
2396
|
-
start:
|
|
2397
|
-
end:
|
|
2398
|
-
original:
|
|
2399
|
-
replacement: `v-${
|
|
2400
|
-
line:
|
|
2401
|
-
column:
|
|
3146
|
+
const S = /v-(text|html)="([^"]+)"/g;
|
|
3147
|
+
for (; (c = S.exec(n)) !== null; ) {
|
|
3148
|
+
const m = c[0], y = c[1], x = c[2], w = H(x, r);
|
|
3149
|
+
if (w !== x) {
|
|
3150
|
+
const I = G(n, c.index);
|
|
3151
|
+
s.push({
|
|
3152
|
+
start: c.index,
|
|
3153
|
+
end: c.index + m.length,
|
|
3154
|
+
original: m,
|
|
3155
|
+
replacement: `v-${y}="${w}"`,
|
|
3156
|
+
line: I.line,
|
|
3157
|
+
column: I.column
|
|
2402
3158
|
}), u.push({
|
|
2403
|
-
line:
|
|
2404
|
-
column:
|
|
2405
|
-
original:
|
|
2406
|
-
fixed:
|
|
2407
|
-
message: `修复 v-${
|
|
3159
|
+
line: I.line + 1,
|
|
3160
|
+
column: I.column,
|
|
3161
|
+
original: x,
|
|
3162
|
+
fixed: w,
|
|
3163
|
+
message: `修复 v-${y} 指令:添加 state. 前缀`
|
|
2408
3164
|
});
|
|
2409
3165
|
}
|
|
2410
3166
|
}
|
|
2411
|
-
const
|
|
2412
|
-
for (; (
|
|
2413
|
-
const
|
|
2414
|
-
if (
|
|
2415
|
-
const
|
|
2416
|
-
|
|
2417
|
-
start:
|
|
2418
|
-
end:
|
|
2419
|
-
original:
|
|
2420
|
-
replacement: `${
|
|
2421
|
-
line:
|
|
2422
|
-
column:
|
|
3167
|
+
const E = /(@|v-on:)(\w+)="([^"]+)"/g;
|
|
3168
|
+
for (; (c = E.exec(n)) !== null; ) {
|
|
3169
|
+
const m = c[0], y = c[1], x = c[2], w = c[3], I = Qt(w, r);
|
|
3170
|
+
if (I !== w) {
|
|
3171
|
+
const D = G(n, c.index);
|
|
3172
|
+
s.push({
|
|
3173
|
+
start: c.index,
|
|
3174
|
+
end: c.index + m.length,
|
|
3175
|
+
original: m,
|
|
3176
|
+
replacement: `${y}${x}="${I}"`,
|
|
3177
|
+
line: D.line,
|
|
3178
|
+
column: D.column
|
|
2423
3179
|
}), u.push({
|
|
2424
|
-
line:
|
|
2425
|
-
column:
|
|
2426
|
-
original:
|
|
2427
|
-
fixed:
|
|
3180
|
+
line: D.line + 1,
|
|
3181
|
+
column: D.column,
|
|
3182
|
+
original: w,
|
|
3183
|
+
fixed: I,
|
|
2428
3184
|
message: "修复事件处理器:添加 state. 前缀"
|
|
2429
3185
|
});
|
|
2430
3186
|
}
|
|
2431
3187
|
}
|
|
2432
|
-
if (
|
|
2433
|
-
|
|
2434
|
-
}),
|
|
2435
|
-
const
|
|
2436
|
-
t = e.substring(0,
|
|
2437
|
-
` +
|
|
2438
|
-
</template>` + e.substring(
|
|
3188
|
+
if (s.sort((m, y) => y.start - m.start), s.forEach((m) => {
|
|
3189
|
+
i = i.substring(0, m.start) + m.replacement + i.substring(m.end);
|
|
3190
|
+
}), s.length > 0) {
|
|
3191
|
+
const m = e.indexOf("<template>"), y = e.lastIndexOf("</template>") + 11;
|
|
3192
|
+
t = e.substring(0, m) + `<template>
|
|
3193
|
+
` + i + `
|
|
3194
|
+
</template>` + e.substring(y);
|
|
2439
3195
|
}
|
|
2440
3196
|
return {
|
|
2441
|
-
fixed:
|
|
3197
|
+
fixed: s.length > 0,
|
|
2442
3198
|
originalCode: e,
|
|
2443
3199
|
fixedCode: t,
|
|
2444
3200
|
changes: u
|
|
2445
3201
|
};
|
|
2446
3202
|
}
|
|
2447
|
-
function
|
|
3203
|
+
function Xt(e) {
|
|
2448
3204
|
const u = /* @__PURE__ */ new Set();
|
|
2449
3205
|
try {
|
|
2450
|
-
const t =
|
|
2451
|
-
|
|
3206
|
+
const t = B(e);
|
|
3207
|
+
J(t, {
|
|
2452
3208
|
CallExpression(a) {
|
|
2453
3209
|
if (a.node.callee.type === "Identifier" && a.node.callee.name === "reactive" && a.node.arguments.length > 0 && a.node.arguments[0].type === "ObjectExpression") {
|
|
2454
|
-
const
|
|
2455
|
-
|
|
2456
|
-
|
|
3210
|
+
const r = a.parent;
|
|
3211
|
+
r.type === "VariableDeclarator" && r.id.type === "Identifier" && r.id.name === "state" && a.node.arguments[0].properties.forEach((i) => {
|
|
3212
|
+
i.type === "ObjectProperty" && i.key.type === "Identifier" && u.add(i.key.name);
|
|
2457
3213
|
});
|
|
2458
3214
|
}
|
|
2459
3215
|
}
|
|
@@ -2463,27 +3219,27 @@ function pt(e) {
|
|
|
2463
3219
|
}
|
|
2464
3220
|
return u;
|
|
2465
3221
|
}
|
|
2466
|
-
function
|
|
3222
|
+
function H(e, u) {
|
|
2467
3223
|
let t = e.trim();
|
|
2468
3224
|
return u.forEach((a) => {
|
|
2469
|
-
const
|
|
2470
|
-
|
|
3225
|
+
const r = new RegExp(`(?<![\\w.])${a}(?![\\w])`, "g");
|
|
3226
|
+
r.test(t) && !t.includes(`state.${a}`) && (t = t.replace(r, `state.${a}`));
|
|
2471
3227
|
}), t;
|
|
2472
3228
|
}
|
|
2473
|
-
function
|
|
3229
|
+
function Qt(e, u) {
|
|
2474
3230
|
let t = e.trim();
|
|
2475
3231
|
return u.forEach((a) => {
|
|
2476
|
-
const
|
|
3232
|
+
const r = new RegExp(
|
|
2477
3233
|
`(?<![\\w.])${a}(\\+\\+|--|\\s*[+\\-*/]=)`,
|
|
2478
3234
|
"g"
|
|
2479
|
-
),
|
|
3235
|
+
), n = new RegExp(
|
|
2480
3236
|
`(\\+\\+|--)?(?<![\\w.])${a}(?![\\w])`,
|
|
2481
3237
|
"g"
|
|
2482
3238
|
);
|
|
2483
|
-
t.includes(`state.${a}`) || (t = t.replace(
|
|
2484
|
-
}),
|
|
3239
|
+
t.includes(`state.${a}`) || (t = t.replace(r, `state.${a}$1`), t = t.replace(n, (i, s) => s ? `${s}state.${a}` : i.includes(a) && !i.includes("state.") ? `state.${a}` : i));
|
|
3240
|
+
}), H(t, u);
|
|
2485
3241
|
}
|
|
2486
|
-
function
|
|
3242
|
+
function G(e, u) {
|
|
2487
3243
|
const t = e.substring(0, u).split(`
|
|
2488
3244
|
`);
|
|
2489
3245
|
return {
|
|
@@ -2491,51 +3247,52 @@ function P(e, u) {
|
|
|
2491
3247
|
column: t[t.length - 1].length
|
|
2492
3248
|
};
|
|
2493
3249
|
}
|
|
2494
|
-
class
|
|
3250
|
+
class Zt {
|
|
2495
3251
|
fixBasedOnValidation(u, t) {
|
|
2496
3252
|
let a = u;
|
|
2497
|
-
return t.illegalVantIcons.length && (a = this.fixVantIcons(a)), t.illegalVtjIcons.length && (a = this.fixVtjIcons(a, t.illegalVtjIcons)),
|
|
3253
|
+
return t.illegalVantIcons.length && (a = this.fixVantIcons(a)), t.illegalVtjIcons.length && (a = this.fixVtjIcons(a, t.illegalVtjIcons)), zt(a).fixedCode;
|
|
2498
3254
|
}
|
|
2499
3255
|
fixVantIcons(u) {
|
|
2500
|
-
const t =
|
|
3256
|
+
const t = M(u), a = t.template.replace(
|
|
2501
3257
|
/<(?:VanIcon|van-icon)\s+[^>]*name="([^"]+)"[^>]*>/g,
|
|
2502
|
-
(
|
|
3258
|
+
(r, n) => r.includes(":name=") || r.includes("v-bind:name=") || se.includes(n) ? r : r.replace(n, Wt)
|
|
2503
3259
|
);
|
|
2504
3260
|
return this.reconstructSFC(t, a, t.script);
|
|
2505
3261
|
}
|
|
2506
3262
|
fixVtjIcons(u, t = []) {
|
|
2507
|
-
const a =
|
|
2508
|
-
|
|
3263
|
+
const a = M(u);
|
|
3264
|
+
let r = !1;
|
|
3265
|
+
a.script = Ju(a.script, {
|
|
2509
3266
|
ImportDeclaration(s) {
|
|
2510
3267
|
if (s.node.source.value === "@vtj/icons") {
|
|
2511
|
-
const
|
|
2512
|
-
let
|
|
2513
|
-
for (const f of
|
|
2514
|
-
const
|
|
2515
|
-
|
|
2516
|
-
|
|
3268
|
+
const o = s.node.specifiers, c = [];
|
|
3269
|
+
let d = !1;
|
|
3270
|
+
for (const f of o) {
|
|
3271
|
+
const p = f.imported?.name;
|
|
3272
|
+
p === _ && (d = !0, r = !0), t.includes(p) || c.push(
|
|
3273
|
+
q.importSpecifier(f.local, f.imported)
|
|
2517
3274
|
);
|
|
2518
3275
|
}
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
3276
|
+
!d && !r && (r = !0, c.push(
|
|
3277
|
+
q.importSpecifier(
|
|
3278
|
+
q.identifier(_),
|
|
3279
|
+
q.identifier(_)
|
|
2523
3280
|
)
|
|
2524
|
-
), s.node.specifiers =
|
|
3281
|
+
)), s.node.specifiers = c;
|
|
2525
3282
|
}
|
|
2526
3283
|
},
|
|
2527
3284
|
ObjectMethod(s) {
|
|
2528
3285
|
if (s.node.key.name === "setup") {
|
|
2529
|
-
const
|
|
2530
|
-
for (const
|
|
2531
|
-
if (
|
|
2532
|
-
const
|
|
2533
|
-
|
|
3286
|
+
const o = s.node.body.body;
|
|
3287
|
+
for (const c of o)
|
|
3288
|
+
if (q.isReturnStatement(c) && q.isObjectExpression(c.argument)) {
|
|
3289
|
+
const d = c.argument.properties || [];
|
|
3290
|
+
c.argument.properties = d.filter(
|
|
2534
3291
|
(f) => !t.includes(f.key.name)
|
|
2535
|
-
),
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
3292
|
+
), c.argument.properties.push(
|
|
3293
|
+
q.objectProperty(
|
|
3294
|
+
q.identifier(_),
|
|
3295
|
+
q.identifier(_),
|
|
2539
3296
|
!1,
|
|
2540
3297
|
!0
|
|
2541
3298
|
)
|
|
@@ -2544,104 +3301,127 @@ class xt {
|
|
|
2544
3301
|
}
|
|
2545
3302
|
},
|
|
2546
3303
|
ObjectProperty(s) {
|
|
2547
|
-
if (
|
|
2548
|
-
const
|
|
2549
|
-
s.node.value.elements =
|
|
3304
|
+
if (q.isIdentifier(s.node.value) && t.includes(s.node.value.name) && (s.node.value = q.identifier(_)), q.isArrayExpression(s.node.value)) {
|
|
3305
|
+
const o = s.node.value.elements;
|
|
3306
|
+
s.node.value.elements = o.map((c) => q.isIdentifier(c) && t.includes(c.name) ? q.identifier(_) : c);
|
|
2550
3307
|
}
|
|
2551
3308
|
},
|
|
2552
3309
|
AssignmentExpression(s) {
|
|
2553
|
-
|
|
3310
|
+
q.isIdentifier(s.node.right) && t.includes(s.node.right.name) && (s.node.right = q.identifier(_));
|
|
2554
3311
|
}
|
|
2555
3312
|
});
|
|
2556
|
-
const
|
|
2557
|
-
if (
|
|
2558
|
-
for (const s of
|
|
2559
|
-
let
|
|
2560
|
-
for (const
|
|
2561
|
-
|
|
2562
|
-
a.template = a.template.replace(s,
|
|
3313
|
+
const n = /:icon\s*=\s*["']([^"']+)["']/g, i = a.template.match(n);
|
|
3314
|
+
if (i)
|
|
3315
|
+
for (const s of i) {
|
|
3316
|
+
let o = s;
|
|
3317
|
+
for (const c of t)
|
|
3318
|
+
o = o.replace(new RegExp(c, "g"), _);
|
|
3319
|
+
a.template = a.template.replace(s, o);
|
|
2563
3320
|
}
|
|
2564
3321
|
for (const s of t)
|
|
2565
3322
|
a.template = a.template.replace(
|
|
2566
3323
|
new RegExp(`:icon="${s}"`, "g"),
|
|
2567
|
-
`:icon="${
|
|
3324
|
+
`:icon="${_}"`
|
|
2568
3325
|
);
|
|
2569
3326
|
return this.reconstructSFC(a, a.template, a.script);
|
|
2570
3327
|
}
|
|
2571
3328
|
reconstructSFC(u, t, a) {
|
|
2572
|
-
let
|
|
2573
|
-
|
|
3329
|
+
let r = "";
|
|
3330
|
+
if (t && u.template && (r += `<template>
|
|
2574
3331
|
${t}
|
|
2575
3332
|
</template>
|
|
2576
3333
|
|
|
2577
|
-
`), a && u.script
|
|
3334
|
+
`), a && u.script) {
|
|
3335
|
+
const n = u.isScriptSetup ? " setup" : "";
|
|
3336
|
+
r += `<script${n}>
|
|
2578
3337
|
${a}
|
|
2579
3338
|
<\/script>
|
|
2580
3339
|
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
3340
|
+
`;
|
|
3341
|
+
}
|
|
3342
|
+
return u.styles.forEach((n) => {
|
|
3343
|
+
r += `<style lang="scss" scoped>
|
|
3344
|
+
`, r += `${n}
|
|
3345
|
+
`, r += `</style>
|
|
2585
3346
|
|
|
2586
3347
|
`;
|
|
2587
|
-
}),
|
|
2588
|
-
}
|
|
2589
|
-
}
|
|
2590
|
-
async function
|
|
2591
|
-
const { id: u, name: t, source: a, project:
|
|
2592
|
-
if (
|
|
2593
|
-
return Promise.reject(
|
|
2594
|
-
const { dependencies:
|
|
2595
|
-
let
|
|
2596
|
-
if (!
|
|
2597
|
-
return
|
|
2598
|
-
const
|
|
2599
|
-
|
|
2600
|
-
css: A,
|
|
2601
|
-
errors: H
|
|
2602
|
-
} = dt(h.styles.join(`
|
|
2603
|
-
`));
|
|
2604
|
-
if (l.push(...H), l.length)
|
|
2605
|
-
return Promise.reject(l);
|
|
3348
|
+
}), r;
|
|
3349
|
+
}
|
|
3350
|
+
}
|
|
3351
|
+
async function l0(e) {
|
|
3352
|
+
const { id: u, name: t, source: a, project: r } = e, n = Ae(a, t);
|
|
3353
|
+
if (n)
|
|
3354
|
+
return Promise.reject(n);
|
|
3355
|
+
const { dependencies: i = [], platform: s = "web" } = r || {}, o = new Jt(), c = new Zt(), d = o.validate(a);
|
|
3356
|
+
let f = [];
|
|
3357
|
+
if (!d.valid)
|
|
3358
|
+
return f = d.errors, Promise.reject(f);
|
|
3359
|
+
const p = c.fixBasedOnValidation(a, d), b = M(p);
|
|
3360
|
+
b.script = Ie(b.script);
|
|
2606
3361
|
const {
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
}
|
|
2621
|
-
platform: c,
|
|
2622
|
-
handlers: Hu,
|
|
2623
|
-
styles: I,
|
|
2624
|
-
imports: lu,
|
|
2625
|
-
directives: Wu
|
|
2626
|
-
}), bu = {
|
|
3362
|
+
styles: h,
|
|
3363
|
+
css: S,
|
|
3364
|
+
errors: E
|
|
3365
|
+
} = Ot(b.styles.join(`
|
|
3366
|
+
`));
|
|
3367
|
+
return f.push(...E), f.length ? Promise.reject(f) : b.isScriptSetup ? Yt(b, {
|
|
3368
|
+
id: u,
|
|
3369
|
+
name: t,
|
|
3370
|
+
project: r,
|
|
3371
|
+
platform: s,
|
|
3372
|
+
dependencies: i,
|
|
3373
|
+
styles: h,
|
|
3374
|
+
css: S
|
|
3375
|
+
}) : Kt(b, {
|
|
2627
3376
|
id: u,
|
|
2628
3377
|
name: t,
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
3378
|
+
project: r,
|
|
3379
|
+
platform: s,
|
|
3380
|
+
dependencies: i,
|
|
3381
|
+
styles: h,
|
|
3382
|
+
css: S
|
|
3383
|
+
});
|
|
3384
|
+
}
|
|
3385
|
+
async function Kt(e, u) {
|
|
3386
|
+
const { id: t, name: a, project: r, platform: n, dependencies: i, styles: s, css: o } = u, {
|
|
3387
|
+
state: c,
|
|
3388
|
+
watch: d,
|
|
3389
|
+
lifeCycles: f,
|
|
3390
|
+
computed: p,
|
|
3391
|
+
methods: b,
|
|
3392
|
+
props: h,
|
|
3393
|
+
emits: S,
|
|
3394
|
+
expose: E,
|
|
3395
|
+
inject: m,
|
|
3396
|
+
handlers: y,
|
|
3397
|
+
imports: x,
|
|
3398
|
+
dataSources: w,
|
|
3399
|
+
directives: I
|
|
3400
|
+
} = ut(e.script, r), { nodes: D, slots: F, context: du } = re(t, a, e.template, {
|
|
3401
|
+
platform: n,
|
|
3402
|
+
handlers: y,
|
|
3403
|
+
styles: s,
|
|
3404
|
+
imports: x,
|
|
3405
|
+
directives: I
|
|
3406
|
+
}), yu = {
|
|
3407
|
+
id: t,
|
|
3408
|
+
name: a,
|
|
3409
|
+
inject: m,
|
|
3410
|
+
props: h,
|
|
3411
|
+
state: c,
|
|
3412
|
+
watch: d,
|
|
3413
|
+
lifeCycles: f,
|
|
3414
|
+
computed: p,
|
|
3415
|
+
methods: b,
|
|
3416
|
+
dataSources: w,
|
|
3417
|
+
slots: F,
|
|
3418
|
+
emits: S,
|
|
3419
|
+
expose: E,
|
|
3420
|
+
nodes: D,
|
|
3421
|
+
css: o
|
|
3422
|
+
}, fe = Object.keys(p || {}), le = (h || []).map(
|
|
3423
|
+
($) => typeof $ == "string" ? $ : $.name
|
|
3424
|
+
), be = [
|
|
2645
3425
|
"$el",
|
|
2646
3426
|
"$emit",
|
|
2647
3427
|
"$nextTick",
|
|
@@ -2657,113 +3437,186 @@ async function Dt(e) {
|
|
|
2657
3437
|
"state",
|
|
2658
3438
|
"$props",
|
|
2659
3439
|
"props",
|
|
2660
|
-
...Object.keys(
|
|
2661
|
-
], { libs:
|
|
2662
|
-
platform:
|
|
2663
|
-
context:
|
|
2664
|
-
computed:
|
|
2665
|
-
libs:
|
|
2666
|
-
members:
|
|
2667
|
-
props:
|
|
3440
|
+
...Object.keys(b || {})
|
|
3441
|
+
], { libs: pe } = de(x, i), Su = {
|
|
3442
|
+
platform: n,
|
|
3443
|
+
context: du,
|
|
3444
|
+
computed: fe,
|
|
3445
|
+
libs: pe,
|
|
3446
|
+
members: be,
|
|
3447
|
+
props: le
|
|
3448
|
+
};
|
|
3449
|
+
return await ce(
|
|
3450
|
+
yu,
|
|
3451
|
+
async ($) => {
|
|
3452
|
+
await oe($, async (K) => {
|
|
3453
|
+
if (ou(K)) {
|
|
3454
|
+
const he = await au(K.value);
|
|
3455
|
+
K.value = Iu(he, $.id, Su);
|
|
3456
|
+
}
|
|
3457
|
+
});
|
|
3458
|
+
},
|
|
3459
|
+
async ($) => {
|
|
3460
|
+
const K = await au($.value);
|
|
3461
|
+
$.value = Iu(K, "", Su);
|
|
3462
|
+
}
|
|
3463
|
+
), new Hu(yu).toDsl();
|
|
3464
|
+
}
|
|
3465
|
+
async function Yt(e, u) {
|
|
3466
|
+
const { id: t, name: a, project: r, platform: n, styles: i, css: s, dependencies: o } = u, c = Tt(e.script, r), { nodes: d, slots: f, context: p } = re(t, a, e.template, {
|
|
3467
|
+
platform: n,
|
|
3468
|
+
handlers: c.handlers,
|
|
3469
|
+
styles: i,
|
|
3470
|
+
imports: c.imports,
|
|
3471
|
+
directives: c.directives
|
|
3472
|
+
}), b = {
|
|
3473
|
+
id: t,
|
|
3474
|
+
name: a,
|
|
3475
|
+
apiMode: "composition",
|
|
3476
|
+
inject: c.inject,
|
|
3477
|
+
props: c.props,
|
|
3478
|
+
state: c.state,
|
|
3479
|
+
refs: c.refs,
|
|
3480
|
+
reactives: c.reactives,
|
|
3481
|
+
composables: c.composables,
|
|
3482
|
+
setup: c.setup,
|
|
3483
|
+
provide: c.provide,
|
|
3484
|
+
watch: c.watch,
|
|
3485
|
+
lifeCycles: c.lifeCycles,
|
|
3486
|
+
computed: c.computed,
|
|
3487
|
+
methods: c.methods,
|
|
3488
|
+
dataSources: c.dataSources,
|
|
3489
|
+
slots: f,
|
|
3490
|
+
emits: c.emits,
|
|
3491
|
+
expose: c.expose,
|
|
3492
|
+
nodes: d,
|
|
3493
|
+
css: s
|
|
3494
|
+
}, { libs: h } = de(c.imports, o), S = Gt(c), E = {
|
|
3495
|
+
refs: Array.from(S.refs),
|
|
3496
|
+
reactives: Array.from(S.reactives),
|
|
3497
|
+
hasState: S.hasState,
|
|
3498
|
+
computed: Array.from(S.computed),
|
|
3499
|
+
methods: Array.from(S.methods),
|
|
3500
|
+
props: Array.from(S.props),
|
|
3501
|
+
composables: Array.from(S.composables),
|
|
3502
|
+
injects: Array.from(S.injects),
|
|
3503
|
+
dataSources: Array.from(S.dataSources),
|
|
3504
|
+
globalApiVars: S.reverseApiMap,
|
|
3505
|
+
reverseMemberApiMap: S.reverseMemberApiMap,
|
|
3506
|
+
libs: h
|
|
2668
3507
|
};
|
|
2669
|
-
return await
|
|
2670
|
-
|
|
2671
|
-
async (
|
|
2672
|
-
await
|
|
2673
|
-
if (
|
|
2674
|
-
const
|
|
2675
|
-
|
|
3508
|
+
return await ce(
|
|
3509
|
+
b,
|
|
3510
|
+
async (y) => {
|
|
3511
|
+
await oe(y, async (x) => {
|
|
3512
|
+
if (ou(x)) {
|
|
3513
|
+
const w = await au(x.value);
|
|
3514
|
+
let I = $u(w, E);
|
|
3515
|
+
const D = Array.from(
|
|
3516
|
+
p[y.id] || /* @__PURE__ */ new Set()
|
|
3517
|
+
);
|
|
3518
|
+
for (const F of D)
|
|
3519
|
+
I = R(I, F, `this.context.${F}`);
|
|
3520
|
+
x.value = I;
|
|
2676
3521
|
}
|
|
2677
3522
|
});
|
|
2678
3523
|
},
|
|
2679
|
-
async (
|
|
2680
|
-
const
|
|
2681
|
-
|
|
2682
|
-
}
|
|
2683
|
-
), new
|
|
2684
|
-
}
|
|
2685
|
-
async function
|
|
2686
|
-
const a = async (
|
|
2687
|
-
if (await u(
|
|
2688
|
-
for (const
|
|
2689
|
-
await a(
|
|
2690
|
-
},
|
|
2691
|
-
if (!
|
|
2692
|
-
if (Array.isArray(
|
|
2693
|
-
for (let
|
|
2694
|
-
await
|
|
3524
|
+
async (y) => {
|
|
3525
|
+
const x = await au(y.value);
|
|
3526
|
+
y.value = $u(x, E);
|
|
3527
|
+
}
|
|
3528
|
+
), new Hu(b).toDsl();
|
|
3529
|
+
}
|
|
3530
|
+
async function ce(e, u, t) {
|
|
3531
|
+
const a = async (m, y) => {
|
|
3532
|
+
if (await u(m, y), Array.isArray(m?.children))
|
|
3533
|
+
for (const x of m?.children || [])
|
|
3534
|
+
await a(x, m);
|
|
3535
|
+
}, r = async (m) => {
|
|
3536
|
+
if (!m || typeof m != "object") return;
|
|
3537
|
+
if (Array.isArray(m)) {
|
|
3538
|
+
for (let x of m)
|
|
3539
|
+
await r(x);
|
|
2695
3540
|
return;
|
|
2696
3541
|
}
|
|
2697
|
-
const
|
|
2698
|
-
for (const
|
|
2699
|
-
|
|
3542
|
+
const y = Object.values(m);
|
|
3543
|
+
for (const x of y)
|
|
3544
|
+
ou(x) ? await t(x) : await r(x);
|
|
2700
3545
|
}, {
|
|
2701
|
-
state:
|
|
2702
|
-
watch:
|
|
2703
|
-
computed:
|
|
3546
|
+
state: n,
|
|
3547
|
+
watch: i,
|
|
3548
|
+
computed: s,
|
|
2704
3549
|
props: o,
|
|
2705
|
-
dataSources:
|
|
2706
|
-
methods:
|
|
2707
|
-
lifeCycles:
|
|
2708
|
-
inject:
|
|
3550
|
+
dataSources: c,
|
|
3551
|
+
methods: d,
|
|
3552
|
+
lifeCycles: f,
|
|
3553
|
+
inject: p,
|
|
3554
|
+
setup: b,
|
|
3555
|
+
provide: h,
|
|
3556
|
+
refs: S,
|
|
3557
|
+
reactives: E
|
|
2709
3558
|
} = e;
|
|
2710
|
-
if (await
|
|
2711
|
-
state:
|
|
2712
|
-
watch:
|
|
2713
|
-
computed:
|
|
3559
|
+
if (await r({
|
|
3560
|
+
state: n,
|
|
3561
|
+
watch: i,
|
|
3562
|
+
computed: s,
|
|
2714
3563
|
props: o,
|
|
2715
|
-
dataSources:
|
|
2716
|
-
methods:
|
|
2717
|
-
lifeCycles:
|
|
2718
|
-
inject:
|
|
3564
|
+
dataSources: c,
|
|
3565
|
+
methods: d,
|
|
3566
|
+
lifeCycles: f,
|
|
3567
|
+
inject: p,
|
|
3568
|
+
setup: b,
|
|
3569
|
+
provide: h,
|
|
3570
|
+
refs: S,
|
|
3571
|
+
reactives: E
|
|
2719
3572
|
}), Array.isArray(e.nodes))
|
|
2720
|
-
for (const
|
|
2721
|
-
await a(
|
|
3573
|
+
for (const m of e.nodes)
|
|
3574
|
+
await a(m);
|
|
2722
3575
|
}
|
|
2723
|
-
async function
|
|
3576
|
+
async function oe(e, u) {
|
|
2724
3577
|
const t = async (a) => {
|
|
2725
3578
|
if (!a || typeof a != "object") return;
|
|
2726
3579
|
if (Array.isArray(a)) {
|
|
2727
|
-
for (let
|
|
2728
|
-
await u(
|
|
3580
|
+
for (let n of a)
|
|
3581
|
+
await u(n), await t(n);
|
|
2729
3582
|
return;
|
|
2730
3583
|
}
|
|
2731
|
-
if (
|
|
3584
|
+
if (ou(a)) {
|
|
2732
3585
|
await u(a);
|
|
2733
3586
|
return;
|
|
2734
3587
|
}
|
|
2735
|
-
const
|
|
2736
|
-
for (const
|
|
2737
|
-
await u(
|
|
3588
|
+
const r = Object.values(a);
|
|
3589
|
+
for (const n of r)
|
|
3590
|
+
await u(n), await t(n);
|
|
2738
3591
|
};
|
|
2739
3592
|
await t(e);
|
|
2740
3593
|
}
|
|
2741
|
-
function
|
|
3594
|
+
function de(e = [], u = []) {
|
|
2742
3595
|
const t = {}, a = u.reduce(
|
|
2743
|
-
(
|
|
3596
|
+
(r, n) => (r[n.package] = n.library, r),
|
|
2744
3597
|
{}
|
|
2745
3598
|
);
|
|
2746
|
-
for (const { from:
|
|
2747
|
-
if (Array.isArray(
|
|
2748
|
-
|
|
2749
|
-
const
|
|
2750
|
-
|
|
3599
|
+
for (const { from: r, imports: n } of e)
|
|
3600
|
+
if (Array.isArray(n))
|
|
3601
|
+
n.forEach((i) => {
|
|
3602
|
+
const s = a[r];
|
|
3603
|
+
s && (t[i] = s);
|
|
2751
3604
|
});
|
|
2752
3605
|
else {
|
|
2753
|
-
const
|
|
2754
|
-
|
|
3606
|
+
const i = a[r];
|
|
3607
|
+
i && (t[n] = i);
|
|
2755
3608
|
}
|
|
2756
3609
|
return {
|
|
2757
3610
|
libs: t
|
|
2758
3611
|
};
|
|
2759
3612
|
}
|
|
2760
3613
|
export {
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
3614
|
+
Zt as AutoFixer,
|
|
3615
|
+
Jt as ComponentValidator,
|
|
3616
|
+
d0 as VTJ_PARSER_VERSION,
|
|
3617
|
+
qu as htmlToNodes,
|
|
3618
|
+
f0 as parseUniApp,
|
|
3619
|
+
l0 as parseVue,
|
|
3620
|
+
Iu as patchCode,
|
|
3621
|
+
R as replacer
|
|
2769
3622
|
};
|