@vtj/parser 0.16.30 → 0.16.32
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 +15 -15
- package/dist/index.mjs +1069 -1052
- package/package.json +3 -3
- package/types/version.d.ts +2 -2
- package/types/vue/utils.d.ts +13 -1
package/dist/index.mjs
CHANGED
|
@@ -4,35 +4,35 @@ import pu from "@babel/traverse";
|
|
|
4
4
|
import mu from "@babel/generator";
|
|
5
5
|
import { BlockModel as te } from "@vtj/core";
|
|
6
6
|
import { tsFormatter as xu } from "@vtj/coder";
|
|
7
|
-
import { NodeTypes as
|
|
8
|
-
import { upperFirstCamelCase as ae, unBase64 as ie, uid as
|
|
9
|
-
import
|
|
10
|
-
import * as
|
|
11
|
-
import * as
|
|
7
|
+
import { NodeTypes as p } from "@vue/compiler-core";
|
|
8
|
+
import { upperFirstCamelCase as ae, unBase64 as ie, uid as ru } from "@vtj/base";
|
|
9
|
+
import re from "postcss";
|
|
10
|
+
import * as se from "sass";
|
|
11
|
+
import * as N 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.
|
|
16
|
+
* @version 0.16.32
|
|
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 } = Vu(e), a = u.template?.content || "", i = (u.scriptSetup || u.script)?.content || "",
|
|
19
|
+
const jt = "0.16.32";
|
|
20
|
+
function R(e) {
|
|
21
|
+
const { descriptor: u, errors: t } = Vu(e), a = u.template?.content || "", i = (u.scriptSetup || u.script)?.content || "", r = u.styles.map((s) => s.content);
|
|
22
22
|
return {
|
|
23
23
|
template: a,
|
|
24
24
|
script: i,
|
|
25
|
-
styles:
|
|
25
|
+
styles: r,
|
|
26
26
|
errors: t
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function O(e) {
|
|
30
30
|
return ee(e, { sourceType: "module", plugins: ["typescript"] });
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Z(e, u) {
|
|
33
33
|
return (pu.default || pu)(e, u);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function M(e) {
|
|
36
36
|
try {
|
|
37
37
|
return (mu.default || mu)(e, {
|
|
38
38
|
comments: !1,
|
|
@@ -58,10 +58,10 @@ function du(e) {
|
|
|
58
58
|
function ne(e) {
|
|
59
59
|
return !!e && !ou(e) && typeof e != "string";
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function ju(e, u) {
|
|
62
62
|
try {
|
|
63
|
-
const t =
|
|
64
|
-
return
|
|
63
|
+
const t = O(e);
|
|
64
|
+
return Z(t, u), M(t) || "";
|
|
65
65
|
} catch {
|
|
66
66
|
return "";
|
|
67
67
|
}
|
|
@@ -70,291 +70,302 @@ function oe(e, u) {
|
|
|
70
70
|
const t = [];
|
|
71
71
|
try {
|
|
72
72
|
const { descriptor: a, errors: i } = Vu(e);
|
|
73
|
-
if (i && i.length > 0 && i.forEach((
|
|
74
|
-
const
|
|
73
|
+
if (i && i.length > 0 && i.forEach((s) => {
|
|
74
|
+
const c = s.message || String(s), o = s.loc;
|
|
75
75
|
o && o.start ? t.push(
|
|
76
|
-
`Vue SFC 错误: ${
|
|
77
|
-
) : t.push(`Vue SFC 错误: ${
|
|
76
|
+
`Vue SFC 错误: ${c} (位置: ${o.start.line}:${o.start.column})`
|
|
77
|
+
) : t.push(`Vue SFC 错误: ${c}`);
|
|
78
78
|
}), a.template)
|
|
79
79
|
try {
|
|
80
|
-
const
|
|
80
|
+
const s = qu({
|
|
81
81
|
id: "validation",
|
|
82
82
|
filename: u,
|
|
83
83
|
source: a.template.content,
|
|
84
84
|
isProd: !1
|
|
85
85
|
});
|
|
86
|
-
|
|
87
|
-
const o = typeof
|
|
88
|
-
|
|
89
|
-
`模板编译错误: ${o} (位置: ${
|
|
86
|
+
s.errors && s.errors.length > 0 && s.errors.forEach((c) => {
|
|
87
|
+
const o = typeof c == "string" ? c : c.message, n = typeof c == "string" ? null : c.loc;
|
|
88
|
+
n && n.start ? t.push(
|
|
89
|
+
`模板编译错误: ${o} (位置: ${n.start.line}:${n.start.column})`
|
|
90
90
|
) : t.push(`模板编译错误: ${o}`);
|
|
91
91
|
});
|
|
92
|
-
} catch (
|
|
93
|
-
t.push(`模板编译错误: ${
|
|
92
|
+
} catch (s) {
|
|
93
|
+
t.push(`模板编译错误: ${s.message}`);
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
if (
|
|
95
|
+
const r = (a.scriptSetup || a.script)?.content;
|
|
96
|
+
if (r)
|
|
97
97
|
try {
|
|
98
|
-
|
|
99
|
-
} catch (
|
|
100
|
-
t.push(`脚本语法错误: ${
|
|
98
|
+
O(r);
|
|
99
|
+
} catch (s) {
|
|
100
|
+
t.push(`脚本语法错误: ${s.message}`);
|
|
101
101
|
}
|
|
102
102
|
} catch (a) {
|
|
103
103
|
t.push(`Vue SFC 解析错误: ${a.message}`);
|
|
104
104
|
}
|
|
105
105
|
return t.length > 0 ? t : null;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
const u =
|
|
109
|
-
return u.styles && (a.css = u.styles[0] || ""),
|
|
107
|
+
function Rt(e) {
|
|
108
|
+
const u = R(e), t = O(u.script), a = {};
|
|
109
|
+
return u.styles && (a.css = u.styles[0] || ""), Z(t, {
|
|
110
110
|
CallExpression(i) {
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
const
|
|
114
|
-
|
|
111
|
+
const r = i.node.callee?.name;
|
|
112
|
+
if (r) {
|
|
113
|
+
const s = M(i.node.arguments[0]);
|
|
114
|
+
s && (a[r] = {
|
|
115
115
|
type: "JSFunction",
|
|
116
|
-
value:
|
|
116
|
+
value: s
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
}), a;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
y--;
|
|
162
|
-
if (y >= 0) {
|
|
163
|
-
let b = y;
|
|
164
|
-
for (; y >= 0 && /[a-zA-Z0-9_$]/.test(a.charAt(y)); )
|
|
165
|
-
y--;
|
|
166
|
-
if (m = a.slice(y + 1, b + 1), m && m !== "function" && m !== "class") {
|
|
167
|
-
const S = a.slice(0, y + 1);
|
|
168
|
-
if (!S.endsWith("=>") && !S.match(/[a-zA-Z0-9_$]\s*=>\s*$/))
|
|
169
|
-
return !1;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
122
|
+
function $(e, u, t) {
|
|
123
|
+
if (!e.includes(u)) return e;
|
|
124
|
+
try {
|
|
125
|
+
return de(e, u, t);
|
|
126
|
+
} catch {
|
|
127
|
+
return e;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
function de(e, u, t) {
|
|
131
|
+
let a, i = 0;
|
|
132
|
+
try {
|
|
133
|
+
a = O(e);
|
|
134
|
+
} catch {
|
|
135
|
+
const c = "(()=>{", n = c + e + "})";
|
|
136
|
+
a = O(n), i = c.length;
|
|
137
|
+
}
|
|
138
|
+
const r = [];
|
|
139
|
+
if (Z(a, {
|
|
140
|
+
Identifier(c) {
|
|
141
|
+
const o = c.node;
|
|
142
|
+
if (o.name !== u) return;
|
|
143
|
+
const n = be(c);
|
|
144
|
+
if (n === "skip") return;
|
|
145
|
+
const f = (o.start ?? 0) - i, l = (o.end ?? 0) - i;
|
|
146
|
+
if (f < 0 || l > e.length) return;
|
|
147
|
+
const m = n === "expand" ? `${u}: ${t}` : t;
|
|
148
|
+
r.some((h) => h.start === f && h.end === l) || r.push({ start: f, end: l, text: m });
|
|
149
|
+
},
|
|
150
|
+
StringLiteral(c) {
|
|
151
|
+
fe(c, u, t, i, e, r);
|
|
152
|
+
},
|
|
153
|
+
TemplateLiteral(c) {
|
|
154
|
+
le(c, u, t, i, e, r);
|
|
155
|
+
},
|
|
156
|
+
MemberExpression(c) {
|
|
157
|
+
gu(c, u, t, i, e, r);
|
|
158
|
+
},
|
|
159
|
+
OptionalMemberExpression(c) {
|
|
160
|
+
gu(c, u, t, i, e, r);
|
|
172
161
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
162
|
+
}), r.length === 0) return e;
|
|
163
|
+
r.sort((c, o) => o.start - c.start);
|
|
164
|
+
let s = e;
|
|
165
|
+
for (const { start: c, end: o, text: n } of r)
|
|
166
|
+
s = s.slice(0, c) + n + s.slice(o);
|
|
167
|
+
return s;
|
|
168
|
+
}
|
|
169
|
+
function fe(e, u, t, a, i, r) {
|
|
170
|
+
const s = e.node;
|
|
171
|
+
if (!s.value.includes(u)) return;
|
|
172
|
+
const c = e.parent;
|
|
173
|
+
if (c?.type !== "NewExpression" || c?.callee?.name !== "RegExp")
|
|
174
|
+
return;
|
|
175
|
+
const o = s.value;
|
|
176
|
+
let n = 0;
|
|
177
|
+
for (; n < o.length; ) {
|
|
178
|
+
const f = o.indexOf(u, n);
|
|
179
|
+
if (f === -1) break;
|
|
180
|
+
const l = 1 + f, m = (s.start ?? 0) - a + l, h = m + u.length;
|
|
181
|
+
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;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
function le(e, u, t, a, i, r) {
|
|
185
|
+
const s = e.parent;
|
|
186
|
+
if (s?.type !== "NewExpression" || s?.callee?.name !== "RegExp")
|
|
187
|
+
return;
|
|
188
|
+
const o = e.node.quasis ?? [];
|
|
189
|
+
for (const n of o) {
|
|
190
|
+
const f = n.value?.raw ?? "";
|
|
191
|
+
if (!f.includes(u)) continue;
|
|
192
|
+
let l = 0;
|
|
193
|
+
for (; l < f.length; ) {
|
|
194
|
+
const m = f.indexOf(u, l);
|
|
195
|
+
if (m === -1) break;
|
|
196
|
+
const h = (n.start ?? 0) - a;
|
|
197
|
+
if (h < 0 || h > i.length) break;
|
|
198
|
+
const I = h + m, A = I + u.length;
|
|
199
|
+
I >= 0 && A <= i.length && !r.some((H) => H.start === I && H.end === A) && r.push({ start: I, end: A, text: t }), l = m + u.length;
|
|
189
200
|
}
|
|
190
201
|
}
|
|
191
|
-
const c = u > 0 ? e.charAt(u - 1) : "";
|
|
192
|
-
if (!/[a-zA-Z0-9_$@-]/.test(c) && s.includes("=>")) {
|
|
193
|
-
const l = s.indexOf("=>"), m = s.slice(0, l).trim();
|
|
194
|
-
if (m === "" || m === ",")
|
|
195
|
-
return !0;
|
|
196
|
-
}
|
|
197
|
-
return !1;
|
|
198
202
|
}
|
|
199
|
-
function gu(e, u, t) {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
203
|
+
function gu(e, u, t, a, i, r) {
|
|
204
|
+
const s = e.node;
|
|
205
|
+
if (s.object?.type !== "ThisExpression" || s.computed || s.property?.type !== "Identifier" || s.property.name !== u)
|
|
206
|
+
return;
|
|
207
|
+
const c = (s.start ?? 0) - a, o = (s.end ?? 0) - a;
|
|
208
|
+
c < 0 || o > i.length || r.some((n) => n.start === c && n.end === o) || r.push({ start: c, end: o, text: t });
|
|
209
|
+
}
|
|
210
|
+
function be(e, u) {
|
|
211
|
+
const t = e.parent, a = t?.type ?? "", i = e.parentPath?.parent;
|
|
212
|
+
switch (a) {
|
|
213
|
+
// 成员访问 obj.key / obj[key] / obj?.key / obj?.[key]
|
|
214
|
+
case "MemberExpression":
|
|
215
|
+
case "OptionalMemberExpression": {
|
|
216
|
+
if (t.property === e.node)
|
|
217
|
+
return t.computed ? "replace" : "skip";
|
|
218
|
+
if (t.object === e.node)
|
|
219
|
+
return "replace";
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
// 对象属性 { key: val } / { key } / { [key]: val }
|
|
223
|
+
case "ObjectProperty": {
|
|
224
|
+
if (t.key === e.node)
|
|
225
|
+
return t.computed ? "replace" : t.shorthand ? i && i?.type === "ObjectPattern" ? "skip" : "expand" : "skip";
|
|
226
|
+
if (t.value === e.node)
|
|
227
|
+
return i && i?.type === "ObjectPattern" ? "skip" : "replace";
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
// 变量声明 const/let/var key = ...
|
|
231
|
+
case "VariableDeclarator": {
|
|
232
|
+
if (t.id === e.node)
|
|
233
|
+
return "skip";
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
// 函数声明 function key() { }
|
|
237
|
+
case "FunctionDeclaration": {
|
|
238
|
+
if (t.id === e.node)
|
|
239
|
+
return "skip";
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
// 类声明 class key { }
|
|
243
|
+
case "ClassDeclaration": {
|
|
244
|
+
if (t.id === e.node)
|
|
245
|
+
return "skip";
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
// 类表达式 const X = class key { }
|
|
249
|
+
case "ClassExpression": {
|
|
250
|
+
if (t.id === e.node)
|
|
251
|
+
return "skip";
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
// 异常捕获 catch(key) { }
|
|
255
|
+
case "CatchClause": {
|
|
256
|
+
if (t.param === e.node)
|
|
257
|
+
return "skip";
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
// import key from; import * as key; import { key }
|
|
261
|
+
case "ImportDefaultSpecifier":
|
|
262
|
+
case "ImportNamespaceSpecifier":
|
|
263
|
+
case "ImportSpecifier":
|
|
264
|
+
return "skip";
|
|
265
|
+
// ES6 export 导出名
|
|
266
|
+
case "ExportSpecifier":
|
|
267
|
+
return "skip";
|
|
268
|
+
// 标签语句 key: for(...)
|
|
269
|
+
case "LabeledStatement": {
|
|
270
|
+
if (t.label === e.node)
|
|
271
|
+
return "skip";
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
// 默认参数 function(key = val)
|
|
275
|
+
case "AssignmentPattern": {
|
|
276
|
+
if (t.left === e.node)
|
|
277
|
+
return "skip";
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
// 展开运算符 ...key
|
|
281
|
+
case "SpreadElement": {
|
|
282
|
+
if (t.argument === e.node)
|
|
283
|
+
return "replace";
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
// 对象方法 { key() {} }
|
|
287
|
+
case "ObjectMethod": {
|
|
288
|
+
if (t.key === e.node && !t.computed)
|
|
289
|
+
return "skip";
|
|
290
|
+
break;
|
|
291
|
+
}
|
|
292
|
+
// Rest 元素 function(...key)
|
|
293
|
+
case "RestElement": {
|
|
294
|
+
if (t.argument === e.node)
|
|
295
|
+
return "skip";
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
298
|
+
// 枚举声明 enum key { }
|
|
299
|
+
case "TSEnumDeclaration": {
|
|
300
|
+
if (t.id === e.node)
|
|
301
|
+
return "skip";
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
// 类型别名 type key = ...
|
|
305
|
+
case "TSTypeAliasDeclaration": {
|
|
306
|
+
if (t.id === e.node)
|
|
307
|
+
return "skip";
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
// 接口声明 interface key { }
|
|
311
|
+
case "TSInterfaceDeclaration": {
|
|
312
|
+
if (t.id === e.node)
|
|
313
|
+
return "skip";
|
|
314
|
+
break;
|
|
220
315
|
}
|
|
221
316
|
}
|
|
222
|
-
|
|
223
|
-
for (; s < e.length && /\s/.test(e[s]); ) s++;
|
|
224
|
-
if (s >= e.length) return !1;
|
|
225
|
-
const r = e[s];
|
|
226
|
-
return r === "," || r === "}";
|
|
317
|
+
return he(e) || pe(e) ? "skip" : "replace";
|
|
227
318
|
}
|
|
228
|
-
function
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
// 是否在正则表达式字面量中
|
|
238
|
-
regexDepth: 0
|
|
239
|
-
// 正则表达式括号深度(用于处理字符类)
|
|
240
|
-
}, r = /[a-zA-Z0-9_$@-]/;
|
|
241
|
-
function n(c) {
|
|
242
|
-
for (let d = 0; d < c.length; d++) {
|
|
243
|
-
const l = c[d];
|
|
244
|
-
if (!s.inString && !s.inRegex) {
|
|
245
|
-
if (l === "'" || l === '"' || l === "`")
|
|
246
|
-
s.inString = !0, s.quoteChar = l;
|
|
247
|
-
else if (l === "/") {
|
|
248
|
-
let m = d - 1;
|
|
249
|
-
for (; m >= 0 && /\s/.test(c[m]); )
|
|
250
|
-
m--;
|
|
251
|
-
if (m < 0)
|
|
252
|
-
s.inRegex = !0, s.regexDepth = 0;
|
|
253
|
-
else {
|
|
254
|
-
const p = c[m], v = /[=+*%!&|?:;,()[\]{}<>]/.test(p), A = /[a-zA-Z0-9_$)]/.test(p);
|
|
255
|
-
if (p === "-") {
|
|
256
|
-
let y = m - 1;
|
|
257
|
-
for (; y >= 0 && /\s/.test(c[y]); )
|
|
258
|
-
y--;
|
|
259
|
-
y >= 0 && /[a-zA-Z0-9_$)]/.test(c[y]) ? s.inRegex = !1 : (s.inRegex = !0, s.regexDepth = 0);
|
|
260
|
-
} else if (p === "=" && m > 0) {
|
|
261
|
-
const y = c[m - 1];
|
|
262
|
-
/[+\-*/%]/.test(y) ? s.inRegex = !1 : (s.inRegex = !0, s.regexDepth = 0);
|
|
263
|
-
} else if (p === "/" || p === "*")
|
|
264
|
-
s.inRegex = !1;
|
|
265
|
-
else if (A && !v) {
|
|
266
|
-
let y = m;
|
|
267
|
-
for (; y > 0 && /[a-zA-Z0-9_$]/.test(c[y - 1]); )
|
|
268
|
-
y--;
|
|
269
|
-
const b = c.slice(y, m + 1);
|
|
270
|
-
[
|
|
271
|
-
"if",
|
|
272
|
-
"else",
|
|
273
|
-
"for",
|
|
274
|
-
"while",
|
|
275
|
-
"do",
|
|
276
|
-
"switch",
|
|
277
|
-
"case",
|
|
278
|
-
"return",
|
|
279
|
-
"typeof",
|
|
280
|
-
"instanceof",
|
|
281
|
-
"void",
|
|
282
|
-
"delete",
|
|
283
|
-
"new",
|
|
284
|
-
"in",
|
|
285
|
-
"of",
|
|
286
|
-
"await",
|
|
287
|
-
"yield",
|
|
288
|
-
"throw",
|
|
289
|
-
"try",
|
|
290
|
-
"catch",
|
|
291
|
-
"finally"
|
|
292
|
-
].includes(b) ? (s.inRegex = !0, s.regexDepth = 0) : s.inRegex = !1;
|
|
293
|
-
} else
|
|
294
|
-
s.inRegex = !0, s.regexDepth = 0;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
} else s.inString ? l === s.quoteChar ? s.quoteChar === "`" && s.inTemplateExpr > 0 || (s.inString = !1, s.quoteChar = "", s.inTemplateExpr = 0) : s.quoteChar === "`" && (l === "$" && d + 1 < c.length && c[d + 1] === "{" ? (s.inTemplateExpr++, d++) : l === "}" && s.inTemplateExpr > 0 && s.inTemplateExpr--) : s.inRegex && (l === "[" ? s.regexDepth++ : l === "]" && s.regexDepth > 0 ? s.regexDepth-- : l === "/" && s.regexDepth === 0 && (d === 0 || c[d - 1] !== "\\") && (s.inRegex = !1, s.regexDepth = 0));
|
|
298
|
-
}
|
|
319
|
+
function he(e) {
|
|
320
|
+
let u = e.parentPath;
|
|
321
|
+
for (; u; ) {
|
|
322
|
+
const t = u.node, a = t?.type ?? "";
|
|
323
|
+
if (a === "FunctionDeclaration" || a === "FunctionExpression" || a === "ArrowFunctionExpression" || a === "ClassMethod" || a === "ObjectMethod" || a === "TSDeclareFunction")
|
|
324
|
+
return (t.params ?? []).includes(e.node);
|
|
325
|
+
if (a === "Program" || a === "BlockStatement" || a === "ObjectExpression" || a === "ArrayExpression" || a === "StaticBlock")
|
|
326
|
+
break;
|
|
327
|
+
u = u.parentPath;
|
|
299
328
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
const d = c > 0 ? e.charAt(c - 1) : "", l = c + u.length < e.length ? e.charAt(c + u.length) : "";
|
|
313
|
-
if (r.test(d) || r.test(l))
|
|
314
|
-
return !1;
|
|
315
|
-
const m = e.slice(0, c);
|
|
316
|
-
return m.match(/(const|let|var|function)\s+$/) ? !1 : m.match(/\{\s*$/) && !/\$\{\s*$/.test(m) ? !!(c > 0 && e.charAt(c - 1) === "[" || gu(e, c, u)) : de(
|
|
317
|
-
e,
|
|
318
|
-
c,
|
|
319
|
-
u,
|
|
320
|
-
m
|
|
321
|
-
) ? !1 : (m.endsWith("${"), !0);
|
|
322
|
-
}
|
|
323
|
-
for (; i < e.length; ) {
|
|
324
|
-
const c = e.indexOf(u, i);
|
|
325
|
-
if (c === -1) break;
|
|
326
|
-
const d = e.slice(i, c);
|
|
327
|
-
a.push(d), n(d), i = c, o(i) ? gu(e, i, u) ? a.push(u + ": " + t) : a.push(t) : a.push(u), i += u.length;
|
|
328
|
-
}
|
|
329
|
-
return i < e.length && a.push(e.slice(i)), a.join("");
|
|
329
|
+
return !1;
|
|
330
|
+
}
|
|
331
|
+
function pe(e) {
|
|
332
|
+
let u = e.parentPath;
|
|
333
|
+
for (; u; ) {
|
|
334
|
+
const t = u.node?.type ?? "";
|
|
335
|
+
if (t === "ObjectPattern") return !0;
|
|
336
|
+
if (t === "FunctionDeclaration" || t === "FunctionExpression" || t === "ArrowFunctionExpression" || t === "Program")
|
|
337
|
+
break;
|
|
338
|
+
u = u.parentPath;
|
|
339
|
+
}
|
|
340
|
+
return !1;
|
|
330
341
|
}
|
|
331
342
|
function yu(e, u, t) {
|
|
332
343
|
const {
|
|
333
344
|
context: a = {},
|
|
334
345
|
computed: i = [],
|
|
335
|
-
libs:
|
|
336
|
-
members:
|
|
337
|
-
props:
|
|
346
|
+
libs: r = {},
|
|
347
|
+
members: s = [],
|
|
348
|
+
props: c = [],
|
|
338
349
|
platform: o
|
|
339
|
-
} = t || {},
|
|
340
|
-
if (
|
|
341
|
-
for (const
|
|
342
|
-
e =
|
|
343
|
-
for (const
|
|
344
|
-
e
|
|
345
|
-
for (const
|
|
346
|
-
e =
|
|
347
|
-
for (const [
|
|
348
|
-
e =
|
|
349
|
-
for (const
|
|
350
|
-
e =
|
|
350
|
+
} = t || {}, n = Array.from(a[u || ""] || /* @__PURE__ */ new Set());
|
|
351
|
+
if (n)
|
|
352
|
+
for (const f of n)
|
|
353
|
+
e = $(e, f, `this.context.${f}`);
|
|
354
|
+
for (const f of i)
|
|
355
|
+
e.includes(`this.${f}.value`) || (e = $(e, f, `this.${f}.value`));
|
|
356
|
+
for (const f of c)
|
|
357
|
+
e = $(e, f, `this.props.${f}`), e = $(e, `this.${f}`, `this.props.${f}`);
|
|
358
|
+
for (const [f, l] of Object.entries(r))
|
|
359
|
+
e = $(e, f, `this.$libs.${l}.${f}`), e = $(e, `this.${f}`, `this.$libs.${l}.${f}`);
|
|
360
|
+
for (const f of s)
|
|
361
|
+
e = $(e, f, `this.${f}`);
|
|
351
362
|
if (o === "uniapp") {
|
|
352
|
-
const
|
|
353
|
-
e = e.replace(
|
|
363
|
+
const f = /\suni\./g;
|
|
364
|
+
e = e.replace(f, "this.$libs.UniH5.uni.");
|
|
354
365
|
}
|
|
355
366
|
return e = e.replace(/_ctx\./g, "this."), e = e.replace(/this\.this\./g, "this."), e;
|
|
356
367
|
}
|
|
357
|
-
function
|
|
368
|
+
function V(e) {
|
|
358
369
|
return {
|
|
359
370
|
type: "JSExpression",
|
|
360
371
|
value: /^\{[\w\W]*\}$/.test(e) ? `(${e})` : e
|
|
@@ -366,7 +377,7 @@ function fu(e) {
|
|
|
366
377
|
value: e
|
|
367
378
|
};
|
|
368
379
|
}
|
|
369
|
-
const
|
|
380
|
+
const me = [
|
|
370
381
|
"beforeCreate",
|
|
371
382
|
"created",
|
|
372
383
|
"beforeMount",
|
|
@@ -380,30 +391,30 @@ const fe = [
|
|
|
380
391
|
"renderTriggered",
|
|
381
392
|
"activated",
|
|
382
393
|
"deactivated"
|
|
383
|
-
],
|
|
394
|
+
], xe = "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(
|
|
384
395
|
","
|
|
385
|
-
),
|
|
396
|
+
), ge = "component,slot,template".split(","), ye = "view,swiper,progress,icon,text,button,checkbox,editor,form,input,label,picker,radio,slider,switch,textarea,audio,camera,image,video,map,canvas".split(
|
|
386
397
|
","
|
|
387
398
|
);
|
|
388
|
-
function
|
|
389
|
-
return u === "uniapp" &&
|
|
399
|
+
function Se(e, u = "web") {
|
|
400
|
+
return u === "uniapp" && ye.includes(e);
|
|
390
401
|
}
|
|
391
|
-
function
|
|
392
|
-
return (
|
|
402
|
+
function Ru(e, u = "web") {
|
|
403
|
+
return (xe.includes(e) || ge.includes(e)) && !Se(e, u) ? e : ae(e);
|
|
393
404
|
}
|
|
394
405
|
function Du(e) {
|
|
395
406
|
return e.replace(/\s+/g, " ").split(";").reduce((t, a) => {
|
|
396
|
-
const [i,
|
|
397
|
-
return i &&
|
|
407
|
+
const [i, r] = a.split(":").map((s) => s.trim());
|
|
408
|
+
return i && r && (t[i] = r), t;
|
|
398
409
|
}, {});
|
|
399
410
|
}
|
|
400
|
-
function
|
|
411
|
+
function Ee(e, u, t) {
|
|
401
412
|
if (t === "ObjectExpression")
|
|
402
413
|
return `(Object.assign({${e.split(" ").map((i) => `'${i}': true`).join(",")}}, ${u}))`;
|
|
403
414
|
if (t === "ArrayExpression")
|
|
404
415
|
return `([${e.split(" ").map((i) => `'${i}'`).join(",")}].concat(${u}))`;
|
|
405
416
|
}
|
|
406
|
-
function
|
|
417
|
+
function Ie(e = "") {
|
|
407
418
|
const t = e.trim().match(/DataSource:\s*([^\n=]+={0,2})/)?.[1] || "";
|
|
408
419
|
try {
|
|
409
420
|
return t ? JSON.parse(ie(t)) : null;
|
|
@@ -411,15 +422,15 @@ function xe(e = "") {
|
|
|
411
422
|
return console.warn("extractDataSource fail", a), null;
|
|
412
423
|
}
|
|
413
424
|
}
|
|
414
|
-
const
|
|
425
|
+
const ve = /* @__PURE__ */ new Uint16Array(
|
|
415
426
|
// prettier-ignore
|
|
416
427
|
/* @__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))
|
|
417
|
-
),
|
|
428
|
+
), we = /* @__PURE__ */ new Uint16Array(
|
|
418
429
|
// prettier-ignore
|
|
419
430
|
/* @__PURE__ */ "Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e) => e.charCodeAt(0))
|
|
420
431
|
);
|
|
421
432
|
var au;
|
|
422
|
-
const
|
|
433
|
+
const Ae = /* @__PURE__ */ new Map([
|
|
423
434
|
[0, 65533],
|
|
424
435
|
// C1 Unicode control character reference replacements
|
|
425
436
|
[128, 8364],
|
|
@@ -456,46 +467,46 @@ const Se = /* @__PURE__ */ new Map([
|
|
|
456
467
|
return e > 65535 && (e -= 65536, u += String.fromCharCode(e >>> 10 & 1023 | 55296), e = 56320 | e & 1023), u += String.fromCharCode(e), u;
|
|
457
468
|
}
|
|
458
469
|
);
|
|
459
|
-
function
|
|
470
|
+
function ke(e) {
|
|
460
471
|
var u;
|
|
461
|
-
return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (u =
|
|
472
|
+
return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (u = Ae.get(e)) !== null && u !== void 0 ? u : e;
|
|
462
473
|
}
|
|
463
|
-
var
|
|
474
|
+
var T;
|
|
464
475
|
(function(e) {
|
|
465
476
|
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";
|
|
466
|
-
})(
|
|
467
|
-
const
|
|
468
|
-
var
|
|
477
|
+
})(T || (T = {}));
|
|
478
|
+
const Te = 32;
|
|
479
|
+
var P;
|
|
469
480
|
(function(e) {
|
|
470
481
|
e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
471
|
-
})(
|
|
472
|
-
function
|
|
473
|
-
return e >=
|
|
482
|
+
})(P || (P = {}));
|
|
483
|
+
function su(e) {
|
|
484
|
+
return e >= T.ZERO && e <= T.NINE;
|
|
474
485
|
}
|
|
475
|
-
function
|
|
476
|
-
return e >=
|
|
486
|
+
function Ne(e) {
|
|
487
|
+
return e >= T.UPPER_A && e <= T.UPPER_F || e >= T.LOWER_A && e <= T.LOWER_F;
|
|
477
488
|
}
|
|
478
|
-
function
|
|
479
|
-
return e >=
|
|
489
|
+
function Ve(e) {
|
|
490
|
+
return e >= T.UPPER_A && e <= T.UPPER_Z || e >= T.LOWER_A && e <= T.LOWER_Z || su(e);
|
|
480
491
|
}
|
|
481
|
-
function
|
|
482
|
-
return e ===
|
|
492
|
+
function qe(e) {
|
|
493
|
+
return e === T.EQUALS || Ve(e);
|
|
483
494
|
}
|
|
484
|
-
var
|
|
495
|
+
var k;
|
|
485
496
|
(function(e) {
|
|
486
497
|
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";
|
|
487
|
-
})(
|
|
488
|
-
var
|
|
498
|
+
})(k || (k = {}));
|
|
499
|
+
var D;
|
|
489
500
|
(function(e) {
|
|
490
501
|
e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
|
|
491
|
-
})(
|
|
492
|
-
class
|
|
502
|
+
})(D || (D = {}));
|
|
503
|
+
class je {
|
|
493
504
|
constructor(u, t, a) {
|
|
494
|
-
this.decodeTree = u, this.emitCodePoint = t, this.errors = a, this.state =
|
|
505
|
+
this.decodeTree = u, this.emitCodePoint = t, this.errors = a, this.state = k.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = D.Strict;
|
|
495
506
|
}
|
|
496
507
|
/** Resets the instance to make it reusable. */
|
|
497
508
|
startEntity(u) {
|
|
498
|
-
this.decodeMode = u, this.state =
|
|
509
|
+
this.decodeMode = u, this.state = k.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
|
499
510
|
}
|
|
500
511
|
/**
|
|
501
512
|
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
|
@@ -510,15 +521,15 @@ class Te {
|
|
|
510
521
|
*/
|
|
511
522
|
write(u, t) {
|
|
512
523
|
switch (this.state) {
|
|
513
|
-
case
|
|
514
|
-
return u.charCodeAt(t) ===
|
|
515
|
-
case
|
|
524
|
+
case k.EntityStart:
|
|
525
|
+
return u.charCodeAt(t) === T.NUM ? (this.state = k.NumericStart, this.consumed += 1, this.stateNumericStart(u, t + 1)) : (this.state = k.NamedEntity, this.stateNamedEntity(u, t));
|
|
526
|
+
case k.NumericStart:
|
|
516
527
|
return this.stateNumericStart(u, t);
|
|
517
|
-
case
|
|
528
|
+
case k.NumericDecimal:
|
|
518
529
|
return this.stateNumericDecimal(u, t);
|
|
519
|
-
case
|
|
530
|
+
case k.NumericHex:
|
|
520
531
|
return this.stateNumericHex(u, t);
|
|
521
|
-
case
|
|
532
|
+
case k.NamedEntity:
|
|
522
533
|
return this.stateNamedEntity(u, t);
|
|
523
534
|
}
|
|
524
535
|
}
|
|
@@ -532,12 +543,12 @@ class Te {
|
|
|
532
543
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
533
544
|
*/
|
|
534
545
|
stateNumericStart(u, t) {
|
|
535
|
-
return t >= u.length ? -1 : (u.charCodeAt(t) |
|
|
546
|
+
return t >= u.length ? -1 : (u.charCodeAt(t) | Te) === T.LOWER_X ? (this.state = k.NumericHex, this.consumed += 1, this.stateNumericHex(u, t + 1)) : (this.state = k.NumericDecimal, this.stateNumericDecimal(u, t));
|
|
536
547
|
}
|
|
537
548
|
addToNumericResult(u, t, a, i) {
|
|
538
549
|
if (t !== a) {
|
|
539
|
-
const
|
|
540
|
-
this.result = this.result * Math.pow(i,
|
|
550
|
+
const r = a - t;
|
|
551
|
+
this.result = this.result * Math.pow(i, r) + Number.parseInt(u.substr(t, r), i), this.consumed += r;
|
|
541
552
|
}
|
|
542
553
|
}
|
|
543
554
|
/**
|
|
@@ -553,7 +564,7 @@ class Te {
|
|
|
553
564
|
const a = t;
|
|
554
565
|
for (; t < u.length; ) {
|
|
555
566
|
const i = u.charCodeAt(t);
|
|
556
|
-
if (
|
|
567
|
+
if (su(i) || Ne(i))
|
|
557
568
|
t += 1;
|
|
558
569
|
else
|
|
559
570
|
return this.addToNumericResult(u, a, t, 16), this.emitNumericEntity(i, 3);
|
|
@@ -573,7 +584,7 @@ class Te {
|
|
|
573
584
|
const a = t;
|
|
574
585
|
for (; t < u.length; ) {
|
|
575
586
|
const i = u.charCodeAt(t);
|
|
576
|
-
if (
|
|
587
|
+
if (su(i))
|
|
577
588
|
t += 1;
|
|
578
589
|
else
|
|
579
590
|
return this.addToNumericResult(u, a, t, 10), this.emitNumericEntity(i, 2);
|
|
@@ -597,11 +608,11 @@ class Te {
|
|
|
597
608
|
var a;
|
|
598
609
|
if (this.consumed <= t)
|
|
599
610
|
return (a = this.errors) === null || a === void 0 || a.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
600
|
-
if (u ===
|
|
611
|
+
if (u === T.SEMI)
|
|
601
612
|
this.consumed += 1;
|
|
602
|
-
else if (this.decodeMode ===
|
|
613
|
+
else if (this.decodeMode === D.Strict)
|
|
603
614
|
return 0;
|
|
604
|
-
return this.emitCodePoint(
|
|
615
|
+
return this.emitCodePoint(ke(this.result), this.consumed), this.errors && (u !== T.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
605
616
|
}
|
|
606
617
|
/**
|
|
607
618
|
* Parses a named entity.
|
|
@@ -614,18 +625,18 @@ class Te {
|
|
|
614
625
|
*/
|
|
615
626
|
stateNamedEntity(u, t) {
|
|
616
627
|
const { decodeTree: a } = this;
|
|
617
|
-
let i = a[this.treeIndex],
|
|
628
|
+
let i = a[this.treeIndex], r = (i & P.VALUE_LENGTH) >> 14;
|
|
618
629
|
for (; t < u.length; t++, this.excess++) {
|
|
619
|
-
const
|
|
620
|
-
if (this.treeIndex =
|
|
630
|
+
const s = u.charCodeAt(t);
|
|
631
|
+
if (this.treeIndex = Re(a, i, this.treeIndex + Math.max(1, r), s), this.treeIndex < 0)
|
|
621
632
|
return this.result === 0 || // If we are parsing an attribute
|
|
622
|
-
this.decodeMode ===
|
|
623
|
-
(
|
|
624
|
-
|
|
625
|
-
if (i = a[this.treeIndex],
|
|
626
|
-
if (
|
|
627
|
-
return this.emitNamedEntityData(this.treeIndex,
|
|
628
|
-
this.decodeMode !==
|
|
633
|
+
this.decodeMode === D.Attribute && // We shouldn't have consumed any characters after the entity,
|
|
634
|
+
(r === 0 || // And there should be no invalid characters.
|
|
635
|
+
qe(s)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
636
|
+
if (i = a[this.treeIndex], r = (i & P.VALUE_LENGTH) >> 14, r !== 0) {
|
|
637
|
+
if (s === T.SEMI)
|
|
638
|
+
return this.emitNamedEntityData(this.treeIndex, r, this.consumed + this.excess);
|
|
639
|
+
this.decodeMode !== D.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
629
640
|
}
|
|
630
641
|
}
|
|
631
642
|
return -1;
|
|
@@ -637,7 +648,7 @@ class Te {
|
|
|
637
648
|
*/
|
|
638
649
|
emitNotTerminatedNamedEntity() {
|
|
639
650
|
var u;
|
|
640
|
-
const { result: t, decodeTree: a } = this, i = (a[t] &
|
|
651
|
+
const { result: t, decodeTree: a } = this, i = (a[t] & P.VALUE_LENGTH) >> 14;
|
|
641
652
|
return this.emitNamedEntityData(t, i, this.consumed), (u = this.errors) === null || u === void 0 || u.missingSemicolonAfterCharacterReference(), this.consumed;
|
|
642
653
|
}
|
|
643
654
|
/**
|
|
@@ -651,7 +662,7 @@ class Te {
|
|
|
651
662
|
*/
|
|
652
663
|
emitNamedEntityData(u, t, a) {
|
|
653
664
|
const { decodeTree: i } = this;
|
|
654
|
-
return this.emitCodePoint(t === 1 ? i[u] & ~
|
|
665
|
+
return this.emitCodePoint(t === 1 ? i[u] & ~P.VALUE_LENGTH : i[u + 1], a), t === 3 && this.emitCodePoint(i[u + 2], a), a;
|
|
655
666
|
}
|
|
656
667
|
/**
|
|
657
668
|
* Signal to the parser that the end of the input was reached.
|
|
@@ -663,62 +674,62 @@ class Te {
|
|
|
663
674
|
end() {
|
|
664
675
|
var u;
|
|
665
676
|
switch (this.state) {
|
|
666
|
-
case
|
|
667
|
-
return this.result !== 0 && (this.decodeMode !==
|
|
677
|
+
case k.NamedEntity:
|
|
678
|
+
return this.result !== 0 && (this.decodeMode !== D.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
668
679
|
// Otherwise, emit a numeric entity if we have one.
|
|
669
|
-
case
|
|
680
|
+
case k.NumericDecimal:
|
|
670
681
|
return this.emitNumericEntity(0, 2);
|
|
671
|
-
case
|
|
682
|
+
case k.NumericHex:
|
|
672
683
|
return this.emitNumericEntity(0, 3);
|
|
673
|
-
case
|
|
684
|
+
case k.NumericStart:
|
|
674
685
|
return (u = this.errors) === null || u === void 0 || u.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
675
|
-
case
|
|
686
|
+
case k.EntityStart:
|
|
676
687
|
return 0;
|
|
677
688
|
}
|
|
678
689
|
}
|
|
679
690
|
}
|
|
680
|
-
function
|
|
681
|
-
const i = (u &
|
|
691
|
+
function Re(e, u, t, a) {
|
|
692
|
+
const i = (u & P.BRANCH_LENGTH) >> 7, r = u & P.JUMP_TABLE;
|
|
682
693
|
if (i === 0)
|
|
683
|
-
return
|
|
684
|
-
if (
|
|
685
|
-
const o = a -
|
|
694
|
+
return r !== 0 && a === r ? t : -1;
|
|
695
|
+
if (r) {
|
|
696
|
+
const o = a - r;
|
|
686
697
|
return o < 0 || o >= i ? -1 : e[t + o] - 1;
|
|
687
698
|
}
|
|
688
|
-
let
|
|
689
|
-
for (;
|
|
690
|
-
const o =
|
|
691
|
-
if (
|
|
692
|
-
|
|
693
|
-
else if (
|
|
694
|
-
|
|
699
|
+
let s = t, c = s + i - 1;
|
|
700
|
+
for (; s <= c; ) {
|
|
701
|
+
const o = s + c >>> 1, n = e[o];
|
|
702
|
+
if (n < a)
|
|
703
|
+
s = o + 1;
|
|
704
|
+
else if (n > a)
|
|
705
|
+
c = o - 1;
|
|
695
706
|
else
|
|
696
707
|
return e[o + i];
|
|
697
708
|
}
|
|
698
709
|
return -1;
|
|
699
710
|
}
|
|
700
|
-
var
|
|
711
|
+
var b;
|
|
701
712
|
(function(e) {
|
|
702
713
|
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";
|
|
703
|
-
})(
|
|
704
|
-
var
|
|
714
|
+
})(b || (b = {}));
|
|
715
|
+
var d;
|
|
705
716
|
(function(e) {
|
|
706
717
|
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";
|
|
707
|
-
})(
|
|
708
|
-
function
|
|
709
|
-
return e ===
|
|
718
|
+
})(d || (d = {}));
|
|
719
|
+
function C(e) {
|
|
720
|
+
return e === b.Space || e === b.NewLine || e === b.Tab || e === b.FormFeed || e === b.CarriageReturn;
|
|
710
721
|
}
|
|
711
|
-
function
|
|
712
|
-
return e ===
|
|
722
|
+
function K(e) {
|
|
723
|
+
return e === b.Slash || e === b.Gt || C(e);
|
|
713
724
|
}
|
|
714
|
-
function
|
|
715
|
-
return e >=
|
|
725
|
+
function De(e) {
|
|
726
|
+
return e >= b.LowerA && e <= b.LowerZ || e >= b.UpperA && e <= b.UpperZ;
|
|
716
727
|
}
|
|
717
728
|
var L;
|
|
718
729
|
(function(e) {
|
|
719
730
|
e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double";
|
|
720
731
|
})(L || (L = {}));
|
|
721
|
-
const
|
|
732
|
+
const w = {
|
|
722
733
|
Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
|
|
723
734
|
// CDATA[
|
|
724
735
|
CdataEnd: new Uint8Array([93, 93, 62]),
|
|
@@ -747,12 +758,12 @@ const T = {
|
|
|
747
758
|
XmpEnd: new Uint8Array([60, 47, 120, 109, 112])
|
|
748
759
|
// `</xmp`
|
|
749
760
|
};
|
|
750
|
-
class
|
|
761
|
+
class Le {
|
|
751
762
|
constructor({ xmlMode: u = !1, decodeEntities: t = !0 }, a) {
|
|
752
|
-
this.cbs = a, this.state =
|
|
763
|
+
this.cbs = a, this.state = d.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = d.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 je(u ? we : ve, (i, r) => this.emitCodePoint(i, r));
|
|
753
764
|
}
|
|
754
765
|
reset() {
|
|
755
|
-
this.state =
|
|
766
|
+
this.state = d.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = d.Text, this.currentSequence = void 0, this.running = !0, this.offset = 0;
|
|
756
767
|
}
|
|
757
768
|
write(u) {
|
|
758
769
|
this.offset += this.buffer.length, this.buffer = u, this.parse();
|
|
@@ -767,13 +778,13 @@ class Ve {
|
|
|
767
778
|
this.running = !0, this.index < this.buffer.length + this.offset && this.parse();
|
|
768
779
|
}
|
|
769
780
|
stateText(u) {
|
|
770
|
-
u ===
|
|
781
|
+
u === b.Lt || !this.decodeEntities && this.fastForwardTo(b.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = d.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && u === b.Amp && this.startEntity();
|
|
771
782
|
}
|
|
772
783
|
stateSpecialStartSequence(u) {
|
|
773
784
|
const t = this.sequenceIndex === this.currentSequence.length;
|
|
774
785
|
if (!(t ? (
|
|
775
786
|
// If we are at the end of the sequence, make sure the tag name has ended
|
|
776
|
-
|
|
787
|
+
K(u)
|
|
777
788
|
) : (
|
|
778
789
|
// Otherwise, do a case-insensitive comparison
|
|
779
790
|
(u | 32) === this.currentSequence[this.sequenceIndex]
|
|
@@ -783,12 +794,12 @@ class Ve {
|
|
|
783
794
|
this.sequenceIndex++;
|
|
784
795
|
return;
|
|
785
796
|
}
|
|
786
|
-
this.sequenceIndex = 0, this.state =
|
|
797
|
+
this.sequenceIndex = 0, this.state = d.InTagName, this.stateInTagName(u);
|
|
787
798
|
}
|
|
788
799
|
/** Look for an end tag. For <title> tags, also decode entities. */
|
|
789
800
|
stateInSpecialTag(u) {
|
|
790
801
|
if (this.sequenceIndex === this.currentSequence.length) {
|
|
791
|
-
if (u ===
|
|
802
|
+
if (u === b.Gt || C(u)) {
|
|
792
803
|
const t = this.index - this.currentSequence.length;
|
|
793
804
|
if (this.sectionStart < t) {
|
|
794
805
|
const a = this.index;
|
|
@@ -799,10 +810,10 @@ class Ve {
|
|
|
799
810
|
}
|
|
800
811
|
this.sequenceIndex = 0;
|
|
801
812
|
}
|
|
802
|
-
(u | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence ===
|
|
813
|
+
(u | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === w.TitleEnd ? this.decodeEntities && u === b.Amp && this.startEntity() : this.fastForwardTo(b.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(u === b.Lt);
|
|
803
814
|
}
|
|
804
815
|
stateCDATASequence(u) {
|
|
805
|
-
u ===
|
|
816
|
+
u === w.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === w.Cdata.length && (this.state = d.InCommentLike, this.currentSequence = w.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = d.InDeclaration, this.stateInDeclaration(u));
|
|
806
817
|
}
|
|
807
818
|
/**
|
|
808
819
|
* When we wait for one specific character, we can speed things up
|
|
@@ -825,7 +836,7 @@ class Ve {
|
|
|
825
836
|
* - All characters but the start character of the sequence can be skipped.
|
|
826
837
|
*/
|
|
827
838
|
stateInCommentLike(u) {
|
|
828
|
-
u === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence ===
|
|
839
|
+
u === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === w.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 = d.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : u !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
|
|
829
840
|
}
|
|
830
841
|
/**
|
|
831
842
|
* HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
|
|
@@ -834,99 +845,99 @@ class Ve {
|
|
|
834
845
|
* We allow anything that wouldn't end the tag.
|
|
835
846
|
*/
|
|
836
847
|
isTagStartChar(u) {
|
|
837
|
-
return this.xmlMode ? !
|
|
848
|
+
return this.xmlMode ? !K(u) : De(u);
|
|
838
849
|
}
|
|
839
850
|
startSpecial(u, t) {
|
|
840
|
-
this.isSpecial = !0, this.currentSequence = u, this.sequenceIndex = t, this.state =
|
|
851
|
+
this.isSpecial = !0, this.currentSequence = u, this.sequenceIndex = t, this.state = d.SpecialStartSequence;
|
|
841
852
|
}
|
|
842
853
|
stateBeforeTagName(u) {
|
|
843
|
-
if (u ===
|
|
844
|
-
this.state =
|
|
845
|
-
else if (u ===
|
|
846
|
-
this.state =
|
|
854
|
+
if (u === b.ExclamationMark)
|
|
855
|
+
this.state = d.BeforeDeclaration, this.sectionStart = this.index + 1;
|
|
856
|
+
else if (u === b.Questionmark)
|
|
857
|
+
this.state = d.InProcessingInstruction, this.sectionStart = this.index + 1;
|
|
847
858
|
else if (this.isTagStartChar(u)) {
|
|
848
859
|
const t = u | 32;
|
|
849
|
-
this.sectionStart = this.index, this.xmlMode ? this.state =
|
|
850
|
-
} else u ===
|
|
860
|
+
this.sectionStart = this.index, this.xmlMode ? this.state = d.InTagName : t === w.ScriptEnd[2] ? this.state = d.BeforeSpecialS : t === w.TitleEnd[2] || t === w.XmpEnd[2] ? this.state = d.BeforeSpecialT : this.state = d.InTagName;
|
|
861
|
+
} else u === b.Slash ? this.state = d.BeforeClosingTagName : (this.state = d.Text, this.stateText(u));
|
|
851
862
|
}
|
|
852
863
|
stateInTagName(u) {
|
|
853
|
-
|
|
864
|
+
K(u) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = d.BeforeAttributeName, this.stateBeforeAttributeName(u));
|
|
854
865
|
}
|
|
855
866
|
stateBeforeClosingTagName(u) {
|
|
856
|
-
|
|
867
|
+
C(u) || (u === b.Gt ? this.state = d.Text : (this.state = this.isTagStartChar(u) ? d.InClosingTagName : d.InSpecialComment, this.sectionStart = this.index));
|
|
857
868
|
}
|
|
858
869
|
stateInClosingTagName(u) {
|
|
859
|
-
(u ===
|
|
870
|
+
(u === b.Gt || C(u)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = d.AfterClosingTagName, this.stateAfterClosingTagName(u));
|
|
860
871
|
}
|
|
861
872
|
stateAfterClosingTagName(u) {
|
|
862
|
-
(u ===
|
|
873
|
+
(u === b.Gt || this.fastForwardTo(b.Gt)) && (this.state = d.Text, this.sectionStart = this.index + 1);
|
|
863
874
|
}
|
|
864
875
|
stateBeforeAttributeName(u) {
|
|
865
|
-
u ===
|
|
876
|
+
u === b.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = d.InSpecialTag, this.sequenceIndex = 0) : this.state = d.Text, this.sectionStart = this.index + 1) : u === b.Slash ? this.state = d.InSelfClosingTag : C(u) || (this.state = d.InAttributeName, this.sectionStart = this.index);
|
|
866
877
|
}
|
|
867
878
|
stateInSelfClosingTag(u) {
|
|
868
|
-
u ===
|
|
879
|
+
u === b.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = d.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : C(u) || (this.state = d.BeforeAttributeName, this.stateBeforeAttributeName(u));
|
|
869
880
|
}
|
|
870
881
|
stateInAttributeName(u) {
|
|
871
|
-
(u ===
|
|
882
|
+
(u === b.Eq || K(u)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = d.AfterAttributeName, this.stateAfterAttributeName(u));
|
|
872
883
|
}
|
|
873
884
|
stateAfterAttributeName(u) {
|
|
874
|
-
u ===
|
|
885
|
+
u === b.Eq ? this.state = d.BeforeAttributeValue : u === b.Slash || u === b.Gt ? (this.cbs.onattribend(L.NoValue, this.sectionStart), this.sectionStart = -1, this.state = d.BeforeAttributeName, this.stateBeforeAttributeName(u)) : C(u) || (this.cbs.onattribend(L.NoValue, this.sectionStart), this.state = d.InAttributeName, this.sectionStart = this.index);
|
|
875
886
|
}
|
|
876
887
|
stateBeforeAttributeValue(u) {
|
|
877
|
-
u ===
|
|
888
|
+
u === b.DoubleQuote ? (this.state = d.InAttributeValueDq, this.sectionStart = this.index + 1) : u === b.SingleQuote ? (this.state = d.InAttributeValueSq, this.sectionStart = this.index + 1) : C(u) || (this.sectionStart = this.index, this.state = d.InAttributeValueNq, this.stateInAttributeValueNoQuotes(u));
|
|
878
889
|
}
|
|
879
890
|
handleInAttributeValue(u, t) {
|
|
880
|
-
u === t || !this.decodeEntities && this.fastForwardTo(t) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(t ===
|
|
891
|
+
u === t || !this.decodeEntities && this.fastForwardTo(t) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(t === b.DoubleQuote ? L.Double : L.Single, this.index + 1), this.state = d.BeforeAttributeName) : this.decodeEntities && u === b.Amp && this.startEntity();
|
|
881
892
|
}
|
|
882
893
|
stateInAttributeValueDoubleQuotes(u) {
|
|
883
|
-
this.handleInAttributeValue(u,
|
|
894
|
+
this.handleInAttributeValue(u, b.DoubleQuote);
|
|
884
895
|
}
|
|
885
896
|
stateInAttributeValueSingleQuotes(u) {
|
|
886
|
-
this.handleInAttributeValue(u,
|
|
897
|
+
this.handleInAttributeValue(u, b.SingleQuote);
|
|
887
898
|
}
|
|
888
899
|
stateInAttributeValueNoQuotes(u) {
|
|
889
|
-
|
|
900
|
+
C(u) || u === b.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(L.Unquoted, this.index), this.state = d.BeforeAttributeName, this.stateBeforeAttributeName(u)) : this.decodeEntities && u === b.Amp && this.startEntity();
|
|
890
901
|
}
|
|
891
902
|
stateBeforeDeclaration(u) {
|
|
892
|
-
u ===
|
|
903
|
+
u === b.OpeningSquareBracket ? (this.state = d.CDATASequence, this.sequenceIndex = 0) : this.state = u === b.Dash ? d.BeforeComment : d.InDeclaration;
|
|
893
904
|
}
|
|
894
905
|
stateInDeclaration(u) {
|
|
895
|
-
(u ===
|
|
906
|
+
(u === b.Gt || this.fastForwardTo(b.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = d.Text, this.sectionStart = this.index + 1);
|
|
896
907
|
}
|
|
897
908
|
stateInProcessingInstruction(u) {
|
|
898
|
-
(u ===
|
|
909
|
+
(u === b.Gt || this.fastForwardTo(b.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = d.Text, this.sectionStart = this.index + 1);
|
|
899
910
|
}
|
|
900
911
|
stateBeforeComment(u) {
|
|
901
|
-
u ===
|
|
912
|
+
u === b.Dash ? (this.state = d.InCommentLike, this.currentSequence = w.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = d.InDeclaration;
|
|
902
913
|
}
|
|
903
914
|
stateInSpecialComment(u) {
|
|
904
|
-
(u ===
|
|
915
|
+
(u === b.Gt || this.fastForwardTo(b.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = d.Text, this.sectionStart = this.index + 1);
|
|
905
916
|
}
|
|
906
917
|
stateBeforeSpecialS(u) {
|
|
907
918
|
const t = u | 32;
|
|
908
|
-
t ===
|
|
919
|
+
t === w.ScriptEnd[3] ? this.startSpecial(w.ScriptEnd, 4) : t === w.StyleEnd[3] ? this.startSpecial(w.StyleEnd, 4) : (this.state = d.InTagName, this.stateInTagName(u));
|
|
909
920
|
}
|
|
910
921
|
stateBeforeSpecialT(u) {
|
|
911
922
|
switch (u | 32) {
|
|
912
|
-
case
|
|
913
|
-
this.startSpecial(
|
|
923
|
+
case w.TitleEnd[3]: {
|
|
924
|
+
this.startSpecial(w.TitleEnd, 4);
|
|
914
925
|
break;
|
|
915
926
|
}
|
|
916
|
-
case
|
|
917
|
-
this.startSpecial(
|
|
927
|
+
case w.TextareaEnd[3]: {
|
|
928
|
+
this.startSpecial(w.TextareaEnd, 4);
|
|
918
929
|
break;
|
|
919
930
|
}
|
|
920
|
-
case
|
|
921
|
-
this.startSpecial(
|
|
931
|
+
case w.XmpEnd[3]: {
|
|
932
|
+
this.startSpecial(w.XmpEnd, 4);
|
|
922
933
|
break;
|
|
923
934
|
}
|
|
924
935
|
default:
|
|
925
|
-
this.state =
|
|
936
|
+
this.state = d.InTagName, this.stateInTagName(u);
|
|
926
937
|
}
|
|
927
938
|
}
|
|
928
939
|
startEntity() {
|
|
929
|
-
this.baseState = this.state, this.state =
|
|
940
|
+
this.baseState = this.state, this.state = d.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? D.Strict : this.baseState === d.Text || this.baseState === d.InSpecialTag ? D.Legacy : D.Attribute);
|
|
930
941
|
}
|
|
931
942
|
stateInEntity() {
|
|
932
943
|
const u = this.entityDecoder.write(this.buffer, this.index - this.offset);
|
|
@@ -936,7 +947,7 @@ class Ve {
|
|
|
936
947
|
* Remove data that has already been consumed from the buffer.
|
|
937
948
|
*/
|
|
938
949
|
cleanup() {
|
|
939
|
-
this.running && this.sectionStart !== this.index && (this.state ===
|
|
950
|
+
this.running && this.sectionStart !== this.index && (this.state === d.Text || this.state === d.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === d.InAttributeValueDq || this.state === d.InAttributeValueSq || this.state === d.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
|
|
940
951
|
}
|
|
941
952
|
shouldContinue() {
|
|
942
953
|
return this.index < this.buffer.length + this.offset && this.running;
|
|
@@ -950,107 +961,107 @@ class Ve {
|
|
|
950
961
|
for (; this.shouldContinue(); ) {
|
|
951
962
|
const u = this.buffer.charCodeAt(this.index - this.offset);
|
|
952
963
|
switch (this.state) {
|
|
953
|
-
case
|
|
964
|
+
case d.Text: {
|
|
954
965
|
this.stateText(u);
|
|
955
966
|
break;
|
|
956
967
|
}
|
|
957
|
-
case
|
|
968
|
+
case d.SpecialStartSequence: {
|
|
958
969
|
this.stateSpecialStartSequence(u);
|
|
959
970
|
break;
|
|
960
971
|
}
|
|
961
|
-
case
|
|
972
|
+
case d.InSpecialTag: {
|
|
962
973
|
this.stateInSpecialTag(u);
|
|
963
974
|
break;
|
|
964
975
|
}
|
|
965
|
-
case
|
|
976
|
+
case d.CDATASequence: {
|
|
966
977
|
this.stateCDATASequence(u);
|
|
967
978
|
break;
|
|
968
979
|
}
|
|
969
|
-
case
|
|
980
|
+
case d.InAttributeValueDq: {
|
|
970
981
|
this.stateInAttributeValueDoubleQuotes(u);
|
|
971
982
|
break;
|
|
972
983
|
}
|
|
973
|
-
case
|
|
984
|
+
case d.InAttributeName: {
|
|
974
985
|
this.stateInAttributeName(u);
|
|
975
986
|
break;
|
|
976
987
|
}
|
|
977
|
-
case
|
|
988
|
+
case d.InCommentLike: {
|
|
978
989
|
this.stateInCommentLike(u);
|
|
979
990
|
break;
|
|
980
991
|
}
|
|
981
|
-
case
|
|
992
|
+
case d.InSpecialComment: {
|
|
982
993
|
this.stateInSpecialComment(u);
|
|
983
994
|
break;
|
|
984
995
|
}
|
|
985
|
-
case
|
|
996
|
+
case d.BeforeAttributeName: {
|
|
986
997
|
this.stateBeforeAttributeName(u);
|
|
987
998
|
break;
|
|
988
999
|
}
|
|
989
|
-
case
|
|
1000
|
+
case d.InTagName: {
|
|
990
1001
|
this.stateInTagName(u);
|
|
991
1002
|
break;
|
|
992
1003
|
}
|
|
993
|
-
case
|
|
1004
|
+
case d.InClosingTagName: {
|
|
994
1005
|
this.stateInClosingTagName(u);
|
|
995
1006
|
break;
|
|
996
1007
|
}
|
|
997
|
-
case
|
|
1008
|
+
case d.BeforeTagName: {
|
|
998
1009
|
this.stateBeforeTagName(u);
|
|
999
1010
|
break;
|
|
1000
1011
|
}
|
|
1001
|
-
case
|
|
1012
|
+
case d.AfterAttributeName: {
|
|
1002
1013
|
this.stateAfterAttributeName(u);
|
|
1003
1014
|
break;
|
|
1004
1015
|
}
|
|
1005
|
-
case
|
|
1016
|
+
case d.InAttributeValueSq: {
|
|
1006
1017
|
this.stateInAttributeValueSingleQuotes(u);
|
|
1007
1018
|
break;
|
|
1008
1019
|
}
|
|
1009
|
-
case
|
|
1020
|
+
case d.BeforeAttributeValue: {
|
|
1010
1021
|
this.stateBeforeAttributeValue(u);
|
|
1011
1022
|
break;
|
|
1012
1023
|
}
|
|
1013
|
-
case
|
|
1024
|
+
case d.BeforeClosingTagName: {
|
|
1014
1025
|
this.stateBeforeClosingTagName(u);
|
|
1015
1026
|
break;
|
|
1016
1027
|
}
|
|
1017
|
-
case
|
|
1028
|
+
case d.AfterClosingTagName: {
|
|
1018
1029
|
this.stateAfterClosingTagName(u);
|
|
1019
1030
|
break;
|
|
1020
1031
|
}
|
|
1021
|
-
case
|
|
1032
|
+
case d.BeforeSpecialS: {
|
|
1022
1033
|
this.stateBeforeSpecialS(u);
|
|
1023
1034
|
break;
|
|
1024
1035
|
}
|
|
1025
|
-
case
|
|
1036
|
+
case d.BeforeSpecialT: {
|
|
1026
1037
|
this.stateBeforeSpecialT(u);
|
|
1027
1038
|
break;
|
|
1028
1039
|
}
|
|
1029
|
-
case
|
|
1040
|
+
case d.InAttributeValueNq: {
|
|
1030
1041
|
this.stateInAttributeValueNoQuotes(u);
|
|
1031
1042
|
break;
|
|
1032
1043
|
}
|
|
1033
|
-
case
|
|
1044
|
+
case d.InSelfClosingTag: {
|
|
1034
1045
|
this.stateInSelfClosingTag(u);
|
|
1035
1046
|
break;
|
|
1036
1047
|
}
|
|
1037
|
-
case
|
|
1048
|
+
case d.InDeclaration: {
|
|
1038
1049
|
this.stateInDeclaration(u);
|
|
1039
1050
|
break;
|
|
1040
1051
|
}
|
|
1041
|
-
case
|
|
1052
|
+
case d.BeforeDeclaration: {
|
|
1042
1053
|
this.stateBeforeDeclaration(u);
|
|
1043
1054
|
break;
|
|
1044
1055
|
}
|
|
1045
|
-
case
|
|
1056
|
+
case d.BeforeComment: {
|
|
1046
1057
|
this.stateBeforeComment(u);
|
|
1047
1058
|
break;
|
|
1048
1059
|
}
|
|
1049
|
-
case
|
|
1060
|
+
case d.InProcessingInstruction: {
|
|
1050
1061
|
this.stateInProcessingInstruction(u);
|
|
1051
1062
|
break;
|
|
1052
1063
|
}
|
|
1053
|
-
case
|
|
1064
|
+
case d.InEntity: {
|
|
1054
1065
|
this.stateInEntity();
|
|
1055
1066
|
break;
|
|
1056
1067
|
}
|
|
@@ -1060,18 +1071,18 @@ class Ve {
|
|
|
1060
1071
|
this.cleanup();
|
|
1061
1072
|
}
|
|
1062
1073
|
finish() {
|
|
1063
|
-
this.state ===
|
|
1074
|
+
this.state === d.InEntity && (this.entityDecoder.end(), this.state = this.baseState), this.handleTrailingData(), this.cbs.onend();
|
|
1064
1075
|
}
|
|
1065
1076
|
/** Handle any trailing data. */
|
|
1066
1077
|
handleTrailingData() {
|
|
1067
1078
|
const u = this.buffer.length + this.offset;
|
|
1068
|
-
this.sectionStart >= u || (this.state ===
|
|
1079
|
+
this.sectionStart >= u || (this.state === d.InCommentLike ? this.currentSequence === w.CdataEnd ? this.cbs.oncdata(this.sectionStart, u, 0) : this.cbs.oncomment(this.sectionStart, u, 0) : this.state === d.InTagName || this.state === d.BeforeAttributeName || this.state === d.BeforeAttributeValue || this.state === d.AfterAttributeName || this.state === d.InAttributeName || this.state === d.InAttributeValueSq || this.state === d.InAttributeValueDq || this.state === d.InAttributeValueNq || this.state === d.InClosingTagName || this.cbs.ontext(this.sectionStart, u));
|
|
1069
1080
|
}
|
|
1070
1081
|
emitCodePoint(u, t) {
|
|
1071
|
-
this.baseState !==
|
|
1082
|
+
this.baseState !== d.Text && this.baseState !== d.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));
|
|
1072
1083
|
}
|
|
1073
1084
|
}
|
|
1074
|
-
const
|
|
1085
|
+
const W = /* @__PURE__ */ new Set([
|
|
1075
1086
|
"input",
|
|
1076
1087
|
"option",
|
|
1077
1088
|
"optgroup",
|
|
@@ -1079,7 +1090,7 @@ const G = /* @__PURE__ */ new Set([
|
|
|
1079
1090
|
"button",
|
|
1080
1091
|
"datalist",
|
|
1081
1092
|
"textarea"
|
|
1082
|
-
]), E = /* @__PURE__ */ new Set(["p"]),
|
|
1093
|
+
]), E = /* @__PURE__ */ new Set(["p"]), Eu = /* @__PURE__ */ new Set(["thead", "tbody"]), Iu = /* @__PURE__ */ new Set(["dd", "dt"]), vu = /* @__PURE__ */ new Set(["rt", "rp"]), _e = /* @__PURE__ */ new Map([
|
|
1083
1094
|
["tr", /* @__PURE__ */ new Set(["tr", "th", "td"])],
|
|
1084
1095
|
["th", /* @__PURE__ */ new Set(["th"])],
|
|
1085
1096
|
["td", /* @__PURE__ */ new Set(["thead", "th", "td"])],
|
|
@@ -1092,16 +1103,16 @@ const G = /* @__PURE__ */ new Set([
|
|
|
1092
1103
|
["h4", E],
|
|
1093
1104
|
["h5", E],
|
|
1094
1105
|
["h6", E],
|
|
1095
|
-
["select",
|
|
1096
|
-
["input",
|
|
1097
|
-
["output",
|
|
1098
|
-
["button",
|
|
1099
|
-
["datalist",
|
|
1100
|
-
["textarea",
|
|
1106
|
+
["select", W],
|
|
1107
|
+
["input", W],
|
|
1108
|
+
["output", W],
|
|
1109
|
+
["button", W],
|
|
1110
|
+
["datalist", W],
|
|
1111
|
+
["textarea", W],
|
|
1101
1112
|
["option", /* @__PURE__ */ new Set(["option"])],
|
|
1102
1113
|
["optgroup", /* @__PURE__ */ new Set(["optgroup", "option"])],
|
|
1103
|
-
["dd",
|
|
1104
|
-
["dt",
|
|
1114
|
+
["dd", Iu],
|
|
1115
|
+
["dt", Iu],
|
|
1105
1116
|
["address", E],
|
|
1106
1117
|
["article", E],
|
|
1107
1118
|
["aside", E],
|
|
@@ -1125,9 +1136,9 @@ const G = /* @__PURE__ */ new Set([
|
|
|
1125
1136
|
["ul", E],
|
|
1126
1137
|
["rt", vu],
|
|
1127
1138
|
["rp", vu],
|
|
1128
|
-
["tbody",
|
|
1129
|
-
["tfoot",
|
|
1130
|
-
]),
|
|
1139
|
+
["tbody", Eu],
|
|
1140
|
+
["tfoot", Eu]
|
|
1141
|
+
]), Ce = /* @__PURE__ */ new Set([
|
|
1131
1142
|
"area",
|
|
1132
1143
|
"base",
|
|
1133
1144
|
"basefont",
|
|
@@ -1157,18 +1168,18 @@ const G = /* @__PURE__ */ new Set([
|
|
|
1157
1168
|
"foreignobject",
|
|
1158
1169
|
"desc",
|
|
1159
1170
|
"title"
|
|
1160
|
-
]),
|
|
1161
|
-
class
|
|
1171
|
+
]), Be = /\s|\//;
|
|
1172
|
+
class Fe {
|
|
1162
1173
|
constructor(u, t = {}) {
|
|
1163
|
-
var a, i,
|
|
1164
|
-
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 = (i = t.lowerCaseAttributeNames) !== null && i !== void 0 ? i : this.htmlMode, this.recognizeSelfClosing = (
|
|
1174
|
+
var a, i, r, s, c, o;
|
|
1175
|
+
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 = (i = t.lowerCaseAttributeNames) !== null && i !== void 0 ? i : this.htmlMode, this.recognizeSelfClosing = (r = t.recognizeSelfClosing) !== null && r !== void 0 ? r : !this.htmlMode, this.tokenizer = new ((s = t.Tokenizer) !== null && s !== void 0 ? s : Le)(this.options, this), this.foreignContext = [!this.htmlMode], (o = (c = this.cbs).onparserinit) === null || o === void 0 || o.call(c, this);
|
|
1165
1176
|
}
|
|
1166
1177
|
// Tokenizer event handlers
|
|
1167
1178
|
/** @internal */
|
|
1168
1179
|
ontext(u, t) {
|
|
1169
1180
|
var a, i;
|
|
1170
|
-
const
|
|
1171
|
-
this.endIndex = t - 1, (i = (a = this.cbs).ontext) === null || i === void 0 || i.call(a,
|
|
1181
|
+
const r = this.getSlice(u, t);
|
|
1182
|
+
this.endIndex = t - 1, (i = (a = this.cbs).ontext) === null || i === void 0 || i.call(a, r), this.startIndex = t;
|
|
1172
1183
|
}
|
|
1173
1184
|
/** @internal */
|
|
1174
1185
|
ontextentity(u, t) {
|
|
@@ -1180,7 +1191,7 @@ class De {
|
|
|
1180
1191
|
* to specify your own additional void elements.
|
|
1181
1192
|
*/
|
|
1182
1193
|
isVoidElement(u) {
|
|
1183
|
-
return this.htmlMode &&
|
|
1194
|
+
return this.htmlMode && Ce.has(u);
|
|
1184
1195
|
}
|
|
1185
1196
|
/** @internal */
|
|
1186
1197
|
onopentagname(u, t) {
|
|
@@ -1189,15 +1200,15 @@ class De {
|
|
|
1189
1200
|
this.lowerCaseTagNames && (a = a.toLowerCase()), this.emitOpenTag(a);
|
|
1190
1201
|
}
|
|
1191
1202
|
emitOpenTag(u) {
|
|
1192
|
-
var t, a, i,
|
|
1203
|
+
var t, a, i, r;
|
|
1193
1204
|
this.openTagStart = this.startIndex, this.tagname = u;
|
|
1194
|
-
const
|
|
1195
|
-
if (
|
|
1196
|
-
for (; this.stack.length > 0 &&
|
|
1197
|
-
const
|
|
1198
|
-
(a = (t = this.cbs).onclosetag) === null || a === void 0 || a.call(t,
|
|
1205
|
+
const s = this.htmlMode && _e.get(u);
|
|
1206
|
+
if (s)
|
|
1207
|
+
for (; this.stack.length > 0 && s.has(this.stack[0]); ) {
|
|
1208
|
+
const c = this.stack.shift();
|
|
1209
|
+
(a = (t = this.cbs).onclosetag) === null || a === void 0 || a.call(t, c, !0);
|
|
1199
1210
|
}
|
|
1200
|
-
this.isVoidElement(u) || (this.stack.unshift(u), this.htmlMode && (wu.has(u) ? this.foreignContext.unshift(!0) : Au.has(u) && this.foreignContext.unshift(!1))), (
|
|
1211
|
+
this.isVoidElement(u) || (this.stack.unshift(u), this.htmlMode && (wu.has(u) ? this.foreignContext.unshift(!0) : Au.has(u) && this.foreignContext.unshift(!1))), (r = (i = this.cbs).onopentagname) === null || r === void 0 || r.call(i, u), this.cbs.onopentag && (this.attribs = {});
|
|
1201
1212
|
}
|
|
1202
1213
|
endOpenTag(u) {
|
|
1203
1214
|
var t, a;
|
|
@@ -1209,17 +1220,17 @@ class De {
|
|
|
1209
1220
|
}
|
|
1210
1221
|
/** @internal */
|
|
1211
1222
|
onclosetag(u, t) {
|
|
1212
|
-
var a, i,
|
|
1223
|
+
var a, i, r, s, c, o, n, f;
|
|
1213
1224
|
this.endIndex = t;
|
|
1214
1225
|
let l = this.getSlice(u, t);
|
|
1215
1226
|
if (this.lowerCaseTagNames && (l = l.toLowerCase()), this.htmlMode && (wu.has(l) || Au.has(l)) && this.foreignContext.shift(), this.isVoidElement(l))
|
|
1216
|
-
this.htmlMode && l === "br" && ((
|
|
1227
|
+
this.htmlMode && l === "br" && ((s = (r = this.cbs).onopentagname) === null || s === void 0 || s.call(r, "br"), (o = (c = this.cbs).onopentag) === null || o === void 0 || o.call(c, "br", {}, !0), (f = (n = this.cbs).onclosetag) === null || f === void 0 || f.call(n, "br", !1));
|
|
1217
1228
|
else {
|
|
1218
1229
|
const m = this.stack.indexOf(l);
|
|
1219
1230
|
if (m !== -1)
|
|
1220
|
-
for (let
|
|
1221
|
-
const
|
|
1222
|
-
(i = (a = this.cbs).onclosetag) === null || i === void 0 || i.call(a,
|
|
1231
|
+
for (let h = 0; h <= m; h++) {
|
|
1232
|
+
const I = this.stack.shift();
|
|
1233
|
+
(i = (a = this.cbs).onclosetag) === null || i === void 0 || i.call(a, I, h !== m);
|
|
1223
1234
|
}
|
|
1224
1235
|
else this.htmlMode && l === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(!0));
|
|
1225
1236
|
}
|
|
@@ -1254,7 +1265,7 @@ class De {
|
|
|
1254
1265
|
this.endIndex = t, (i = (a = this.cbs).onattribute) === null || i === void 0 || i.call(a, this.attribname, this.attribvalue, u === L.Double ? '"' : u === L.Single ? "'" : u === L.NoValue ? void 0 : null), this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname) && (this.attribs[this.attribname] = this.attribvalue), this.attribvalue = "";
|
|
1255
1266
|
}
|
|
1256
1267
|
getInstructionName(u) {
|
|
1257
|
-
const t = u.search(
|
|
1268
|
+
const t = u.search(Be);
|
|
1258
1269
|
let a = t < 0 ? u : u.substr(0, t);
|
|
1259
1270
|
return this.lowerCaseTagNames && (a = a.toLowerCase()), a;
|
|
1260
1271
|
}
|
|
@@ -1280,15 +1291,15 @@ class De {
|
|
|
1280
1291
|
}
|
|
1281
1292
|
/** @internal */
|
|
1282
1293
|
oncomment(u, t, a) {
|
|
1283
|
-
var i,
|
|
1284
|
-
this.endIndex = t, (
|
|
1294
|
+
var i, r, s, c;
|
|
1295
|
+
this.endIndex = t, (r = (i = this.cbs).oncomment) === null || r === void 0 || r.call(i, this.getSlice(u, t - a)), (c = (s = this.cbs).oncommentend) === null || c === void 0 || c.call(s), this.startIndex = t + 1;
|
|
1285
1296
|
}
|
|
1286
1297
|
/** @internal */
|
|
1287
1298
|
oncdata(u, t, a) {
|
|
1288
|
-
var i,
|
|
1299
|
+
var i, r, s, c, o, n, f, l, m, h;
|
|
1289
1300
|
this.endIndex = t;
|
|
1290
|
-
const
|
|
1291
|
-
!this.htmlMode || this.options.recognizeCDATA ? ((
|
|
1301
|
+
const I = this.getSlice(u, t - a);
|
|
1302
|
+
!this.htmlMode || this.options.recognizeCDATA ? ((r = (i = this.cbs).oncdatastart) === null || r === void 0 || r.call(i), (c = (s = this.cbs).ontext) === null || c === void 0 || c.call(s, I), (n = (o = this.cbs).oncdataend) === null || n === void 0 || n.call(o)) : ((l = (f = this.cbs).oncomment) === null || l === void 0 || l.call(f, `[CDATA[${I}]]`), (h = (m = this.cbs).oncommentend) === null || h === void 0 || h.call(m)), this.startIndex = t + 1;
|
|
1292
1303
|
}
|
|
1293
1304
|
/** @internal */
|
|
1294
1305
|
onend() {
|
|
@@ -1386,140 +1397,140 @@ class De {
|
|
|
1386
1397
|
this.end(u);
|
|
1387
1398
|
}
|
|
1388
1399
|
}
|
|
1389
|
-
function
|
|
1400
|
+
function ku(e, u = "web") {
|
|
1390
1401
|
const t = { name: "", children: [] }, a = [t];
|
|
1391
1402
|
let i = "";
|
|
1392
|
-
const
|
|
1403
|
+
const r = new Fe(
|
|
1393
1404
|
{
|
|
1394
|
-
onopentag: (
|
|
1395
|
-
const
|
|
1396
|
-
i.trim() && (Array.isArray(
|
|
1405
|
+
onopentag: (s, c, o) => {
|
|
1406
|
+
const n = a[a.length - 1];
|
|
1407
|
+
i.trim() && (Array.isArray(n.children) ? n.children.push({
|
|
1397
1408
|
name: "span",
|
|
1398
1409
|
children: i.trim()
|
|
1399
|
-
}) :
|
|
1400
|
-
const
|
|
1401
|
-
(m,
|
|
1402
|
-
let [
|
|
1403
|
-
return
|
|
1410
|
+
}) : n.children = i.trim(), i = "");
|
|
1411
|
+
const f = Object.entries(c || {}).reduce(
|
|
1412
|
+
(m, h) => {
|
|
1413
|
+
let [I = "", A = ""] = h;
|
|
1414
|
+
return I && (m[I] = A), m;
|
|
1404
1415
|
},
|
|
1405
1416
|
{}
|
|
1406
1417
|
);
|
|
1407
|
-
|
|
1418
|
+
f.style && (f.style = Du(f.style));
|
|
1408
1419
|
const l = {
|
|
1409
|
-
name:
|
|
1410
|
-
props:
|
|
1420
|
+
name: Ru(s, u),
|
|
1421
|
+
props: f
|
|
1411
1422
|
};
|
|
1412
|
-
Array.isArray(
|
|
1423
|
+
Array.isArray(n.children) ? n.children.push(l) : n.children ? n.children = [
|
|
1413
1424
|
{
|
|
1414
1425
|
name: "span",
|
|
1415
|
-
children:
|
|
1426
|
+
children: n.children
|
|
1416
1427
|
},
|
|
1417
1428
|
l
|
|
1418
|
-
] :
|
|
1429
|
+
] : n.children = [l], o || a.push(l);
|
|
1419
1430
|
},
|
|
1420
|
-
ontext: (
|
|
1421
|
-
const
|
|
1422
|
-
|
|
1431
|
+
ontext: (s) => {
|
|
1432
|
+
const c = s.trim();
|
|
1433
|
+
c && c !== '"' && (i += c);
|
|
1423
1434
|
},
|
|
1424
1435
|
onclosetag: () => {
|
|
1425
|
-
const
|
|
1426
|
-
i.trim() && (Array.isArray(
|
|
1436
|
+
const s = a.pop();
|
|
1437
|
+
i.trim() && (Array.isArray(s?.children) ? s.children.push({
|
|
1427
1438
|
name: "span",
|
|
1428
1439
|
children: i.trim()
|
|
1429
|
-
}) :
|
|
1440
|
+
}) : s && (s.children = i.trim()), i = "");
|
|
1430
1441
|
}
|
|
1431
1442
|
},
|
|
1432
1443
|
{ decodeEntities: !0 }
|
|
1433
1444
|
);
|
|
1434
|
-
return
|
|
1445
|
+
return r.write(e.replace(/\\"/g, '"')), r.end(), t.children || [];
|
|
1435
1446
|
}
|
|
1436
|
-
function
|
|
1447
|
+
function Pe(e, u) {
|
|
1437
1448
|
const a = {
|
|
1438
|
-
imports:
|
|
1449
|
+
imports: Oe(e),
|
|
1439
1450
|
emits: [],
|
|
1440
1451
|
errors: []
|
|
1441
|
-
}, i =
|
|
1442
|
-
return
|
|
1443
|
-
ExportDefaultDeclaration(
|
|
1444
|
-
const
|
|
1445
|
-
if (
|
|
1446
|
-
const
|
|
1447
|
-
if (
|
|
1448
|
-
const o =
|
|
1452
|
+
}, i = O(e);
|
|
1453
|
+
return Z(i, {
|
|
1454
|
+
ExportDefaultDeclaration(r) {
|
|
1455
|
+
const s = r.node.declaration;
|
|
1456
|
+
if (s.type !== "CallExpression") return;
|
|
1457
|
+
const c = s.arguments[0];
|
|
1458
|
+
if (c?.type !== "ObjectExpression") return;
|
|
1459
|
+
const o = c.properties.filter(
|
|
1449
1460
|
(l) => l.type === "ObjectProperty"
|
|
1450
|
-
),
|
|
1461
|
+
), n = c.properties.filter(
|
|
1451
1462
|
(l) => l.type == "ObjectMethod"
|
|
1452
|
-
),
|
|
1463
|
+
), f = o.find(
|
|
1453
1464
|
(l) => l.key.name === "computed"
|
|
1454
1465
|
);
|
|
1455
|
-
|
|
1466
|
+
f && (a.computed = Lu(f.value), a.watchers = We(f.value));
|
|
1456
1467
|
for (const l of o)
|
|
1457
1468
|
switch (l.key.name) {
|
|
1458
1469
|
case "name":
|
|
1459
1470
|
a.name = l.value.value;
|
|
1460
1471
|
break;
|
|
1461
1472
|
case "methods":
|
|
1462
|
-
a.handlers =
|
|
1473
|
+
a.handlers = Ge(l.value), a.methods = He(l.value), a.dataSources = Ue(
|
|
1463
1474
|
l.value,
|
|
1464
1475
|
u
|
|
1465
1476
|
);
|
|
1466
1477
|
break;
|
|
1467
1478
|
case "watch":
|
|
1468
|
-
a.watch =
|
|
1479
|
+
a.watch = Je(
|
|
1469
1480
|
l.value,
|
|
1470
1481
|
a.watchers
|
|
1471
1482
|
);
|
|
1472
1483
|
break;
|
|
1473
1484
|
case "props":
|
|
1474
|
-
a.props =
|
|
1485
|
+
a.props = Qe(l.value);
|
|
1475
1486
|
break;
|
|
1476
1487
|
case "inject":
|
|
1477
|
-
a.inject =
|
|
1488
|
+
a.inject = Ke(l.value);
|
|
1478
1489
|
break;
|
|
1479
1490
|
case "expose":
|
|
1480
|
-
a.expose =
|
|
1491
|
+
a.expose = Ye(l.value);
|
|
1481
1492
|
break;
|
|
1482
1493
|
case "directives":
|
|
1483
|
-
a.directives =
|
|
1494
|
+
a.directives = et(l.value);
|
|
1484
1495
|
break;
|
|
1485
1496
|
}
|
|
1486
|
-
for (const l of
|
|
1497
|
+
for (const l of n)
|
|
1487
1498
|
switch (l.key.name) {
|
|
1488
1499
|
case "setup":
|
|
1489
|
-
a.state =
|
|
1500
|
+
a.state = $e(l.body);
|
|
1490
1501
|
break;
|
|
1491
1502
|
}
|
|
1492
|
-
a.lifeCycles =
|
|
1503
|
+
a.lifeCycles = Xe(n);
|
|
1493
1504
|
},
|
|
1494
|
-
CallExpression(
|
|
1495
|
-
const
|
|
1496
|
-
if (
|
|
1497
|
-
for (let
|
|
1498
|
-
a.emits?.find((
|
|
1505
|
+
CallExpression(r) {
|
|
1506
|
+
const s = Ze(r.node);
|
|
1507
|
+
if (s.length)
|
|
1508
|
+
for (let c of s)
|
|
1509
|
+
a.emits?.find((n) => n.name === c.name) || a.emits?.push(c);
|
|
1499
1510
|
}
|
|
1500
1511
|
}), a;
|
|
1501
1512
|
}
|
|
1502
|
-
function
|
|
1513
|
+
function Oe(e) {
|
|
1503
1514
|
const u = /import\s+{(.+?)}\s+from\s+['"](.+?)['"]/g, t = /import\s+(.+?)\s+from\s+['"](.+?)['"]/g, a = /^{(.+?)}$/, i = [];
|
|
1504
|
-
let
|
|
1505
|
-
const
|
|
1506
|
-
for (; (
|
|
1507
|
-
const
|
|
1515
|
+
let r;
|
|
1516
|
+
const s = e.replace(/\n/g, " ");
|
|
1517
|
+
for (; (r = u.exec(s)) !== null; ) {
|
|
1518
|
+
const c = r[2] === "@element-plus/icons-vue" ? "@vtj/icons" : r[2];
|
|
1508
1519
|
i.push({
|
|
1509
|
-
from:
|
|
1510
|
-
imports:
|
|
1520
|
+
from: c,
|
|
1521
|
+
imports: r[1].split(",").map((o) => o.trim())
|
|
1511
1522
|
});
|
|
1512
1523
|
}
|
|
1513
|
-
for (; (
|
|
1514
|
-
const
|
|
1515
|
-
|
|
1524
|
+
for (; (r = t.exec(s)) !== null; ) {
|
|
1525
|
+
const c = r[1], o = r[2];
|
|
1526
|
+
c && !a.test(c) && i.push({
|
|
1516
1527
|
from: o,
|
|
1517
|
-
imports:
|
|
1528
|
+
imports: c
|
|
1518
1529
|
});
|
|
1519
1530
|
}
|
|
1520
1531
|
return i;
|
|
1521
1532
|
}
|
|
1522
|
-
function
|
|
1533
|
+
function Me(e) {
|
|
1523
1534
|
for (const u of e.body)
|
|
1524
1535
|
if (u.type === "VariableDeclaration" && u.kind == "const") {
|
|
1525
1536
|
const { id: t, init: a } = u.declarations[0];
|
|
@@ -1528,40 +1539,40 @@ function _e(e) {
|
|
|
1528
1539
|
}
|
|
1529
1540
|
return null;
|
|
1530
1541
|
}
|
|
1531
|
-
function
|
|
1532
|
-
const u =
|
|
1542
|
+
function $e(e) {
|
|
1543
|
+
const u = Me(e);
|
|
1533
1544
|
if (!u) return {};
|
|
1534
1545
|
const t = {};
|
|
1535
1546
|
for (const a of u.properties) {
|
|
1536
|
-
const { key: i, value:
|
|
1547
|
+
const { key: i, value: r } = a;
|
|
1537
1548
|
if (i.type === "Identifier") {
|
|
1538
|
-
const
|
|
1539
|
-
t[i.name] =
|
|
1549
|
+
const s = M(r);
|
|
1550
|
+
t[i.name] = V(s);
|
|
1540
1551
|
}
|
|
1541
1552
|
}
|
|
1542
1553
|
return t;
|
|
1543
1554
|
}
|
|
1544
1555
|
function U(e) {
|
|
1545
|
-
const { key: u, async: t, params: a, body: i } = e,
|
|
1556
|
+
const { key: u, async: t, params: a, body: i } = e, r = a?.map((s) => s.type === "ObjectPattern" ? `{${s.properties.map((o) => o.key?.name || o.name).join(",")}}` : s.type === "AssignmentPattern" ? s.left.name + "=" + (s.right?.extra?.raw || "null") : s.name).join(", ");
|
|
1546
1557
|
if (u.type === "Identifier") {
|
|
1547
|
-
const
|
|
1548
|
-
let
|
|
1549
|
-
i && (
|
|
1558
|
+
const s = u.name;
|
|
1559
|
+
let c = "{}";
|
|
1560
|
+
i && (c = M(i) || "{}");
|
|
1550
1561
|
const o = e.value;
|
|
1551
1562
|
if (o && o.type === "CallExpression") {
|
|
1552
|
-
let
|
|
1553
|
-
|
|
1563
|
+
let h = M(o) || "";
|
|
1564
|
+
h = h.replace("function () {", "() => {"), c = `{ return (${h})}`;
|
|
1554
1565
|
}
|
|
1555
|
-
const
|
|
1566
|
+
const f = `${t ? "async " : ""}(${r}) => ${c}`, l = s.startsWith("watcher_");
|
|
1556
1567
|
return {
|
|
1557
|
-
id: l ?
|
|
1558
|
-
name:
|
|
1568
|
+
id: l ? s.replace("watcher_", "") : "",
|
|
1569
|
+
name: s,
|
|
1559
1570
|
watcher: l,
|
|
1560
|
-
exp: fu(
|
|
1571
|
+
exp: fu(f)
|
|
1561
1572
|
};
|
|
1562
1573
|
}
|
|
1563
1574
|
}
|
|
1564
|
-
function
|
|
1575
|
+
function Lu(e) {
|
|
1565
1576
|
if (!e) return {};
|
|
1566
1577
|
const u = {};
|
|
1567
1578
|
for (const t of e.properties) {
|
|
@@ -1570,21 +1581,21 @@ function Cu(e) {
|
|
|
1570
1581
|
}
|
|
1571
1582
|
return u;
|
|
1572
1583
|
}
|
|
1573
|
-
function
|
|
1584
|
+
function Ue(e, u) {
|
|
1574
1585
|
if (!e) return {};
|
|
1575
1586
|
const t = {}, a = /apis\[\'([\w]*)\'\]/, i = /\.then\(([\w\W]*)\)/;
|
|
1576
|
-
for (const
|
|
1577
|
-
const
|
|
1578
|
-
if (
|
|
1579
|
-
const l = (
|
|
1587
|
+
for (const r of e.properties) {
|
|
1588
|
+
const s = U(r), c = r.body.body?.[0], o = (c?.leadingComments?.[0].value || "").trim(), n = Ie(o);
|
|
1589
|
+
if (s && s.exp.value.includes("this.provider.apis")) {
|
|
1590
|
+
const l = (s.exp.value.match(a) || [])[1];
|
|
1580
1591
|
if (!l) continue;
|
|
1581
|
-
const m =
|
|
1592
|
+
const m = ut(u, l);
|
|
1582
1593
|
if (!m) continue;
|
|
1583
|
-
const
|
|
1584
|
-
t[
|
|
1594
|
+
const h = s.exp.value.match(i)?.[1];
|
|
1595
|
+
t[s.name] = {
|
|
1585
1596
|
ref: l,
|
|
1586
|
-
name:
|
|
1587
|
-
test:
|
|
1597
|
+
name: s.name,
|
|
1598
|
+
test: n?.test || {
|
|
1588
1599
|
type: "JSFunction",
|
|
1589
1600
|
value: `() => this.runApi({
|
|
1590
1601
|
/* 在这里可输入接口参数 */
|
|
@@ -1594,48 +1605,48 @@ function Fe(e, u) {
|
|
|
1594
1605
|
label: m.label,
|
|
1595
1606
|
transform: {
|
|
1596
1607
|
type: "JSFunction",
|
|
1597
|
-
value:
|
|
1608
|
+
value: h || `(res) => {
|
|
1598
1609
|
return res;
|
|
1599
1610
|
}`
|
|
1600
1611
|
},
|
|
1601
1612
|
mockTemplate: m.mockTemplate
|
|
1602
1613
|
};
|
|
1603
1614
|
}
|
|
1604
|
-
if (
|
|
1605
|
-
const
|
|
1606
|
-
t[
|
|
1615
|
+
if (s && s.exp.value.includes("this.provider.createMock")) {
|
|
1616
|
+
const f = c?.declarations?.[0]?.init?.arguments?.[0], l = s.exp.value.match(i)?.[1];
|
|
1617
|
+
t[s.name] = {
|
|
1607
1618
|
ref: "",
|
|
1608
|
-
name:
|
|
1609
|
-
test:
|
|
1619
|
+
name: s.name,
|
|
1620
|
+
test: n?.test || {
|
|
1610
1621
|
type: "JSFunction",
|
|
1611
1622
|
value: `() => this.runApi({
|
|
1612
1623
|
/* 在这里可输入接口参数 */
|
|
1613
1624
|
})`
|
|
1614
1625
|
},
|
|
1615
1626
|
type: "mock",
|
|
1616
|
-
label:
|
|
1617
|
-
transform:
|
|
1627
|
+
label: n?.label || "",
|
|
1628
|
+
transform: n?.transform || {
|
|
1618
1629
|
type: "JSFunction",
|
|
1619
1630
|
value: l || `(res) => {
|
|
1620
1631
|
return res;
|
|
1621
1632
|
}`
|
|
1622
1633
|
},
|
|
1623
|
-
mockTemplate:
|
|
1634
|
+
mockTemplate: n?.mockTemplate || {
|
|
1624
1635
|
type: "JSFunction",
|
|
1625
|
-
value:
|
|
1636
|
+
value: f ? M(f) : ""
|
|
1626
1637
|
}
|
|
1627
1638
|
};
|
|
1628
1639
|
}
|
|
1629
1640
|
}
|
|
1630
1641
|
return t;
|
|
1631
1642
|
}
|
|
1632
|
-
function
|
|
1633
|
-
const u =
|
|
1643
|
+
function He(e) {
|
|
1644
|
+
const u = Lu(e), t = /\_([\w]{5,})$/, a = {};
|
|
1634
1645
|
for (const i of Object.keys(u))
|
|
1635
1646
|
t.test(i) || (a[i] = u[i]);
|
|
1636
1647
|
return a;
|
|
1637
1648
|
}
|
|
1638
|
-
function
|
|
1649
|
+
function Ge(e) {
|
|
1639
1650
|
if (!e) return {};
|
|
1640
1651
|
const u = {}, t = /\_([\w]{5,})$/;
|
|
1641
1652
|
for (const a of e.properties) {
|
|
@@ -1643,19 +1654,19 @@ function Oe(e) {
|
|
|
1643
1654
|
if (t.test(i))
|
|
1644
1655
|
try {
|
|
1645
1656
|
if (a.body.body[0]?.argument) {
|
|
1646
|
-
const
|
|
1657
|
+
const r = M(
|
|
1647
1658
|
a.body.body[0].argument.callee.object
|
|
1648
1659
|
);
|
|
1649
|
-
u[i] = fu(
|
|
1660
|
+
u[i] = fu(r);
|
|
1650
1661
|
} else
|
|
1651
1662
|
u[i] = U(a)?.exp;
|
|
1652
|
-
} catch (
|
|
1653
|
-
console.warn(
|
|
1663
|
+
} catch (r) {
|
|
1664
|
+
console.warn(r);
|
|
1654
1665
|
}
|
|
1655
1666
|
}
|
|
1656
1667
|
return u;
|
|
1657
1668
|
}
|
|
1658
|
-
function
|
|
1669
|
+
function We(e) {
|
|
1659
1670
|
if (!e) return {};
|
|
1660
1671
|
const u = {};
|
|
1661
1672
|
for (const t of e.properties) {
|
|
@@ -1664,128 +1675,128 @@ function Me(e) {
|
|
|
1664
1675
|
}
|
|
1665
1676
|
return u;
|
|
1666
1677
|
}
|
|
1667
|
-
function
|
|
1668
|
-
return !!
|
|
1678
|
+
function z(e, u) {
|
|
1679
|
+
return !!_u(e, u);
|
|
1669
1680
|
}
|
|
1670
|
-
function
|
|
1681
|
+
function _u(e, u) {
|
|
1671
1682
|
return e?.find(
|
|
1672
1683
|
(a) => a.key?.name === u
|
|
1673
1684
|
)?.value?.value;
|
|
1674
1685
|
}
|
|
1675
|
-
function
|
|
1686
|
+
function Tu(e, u) {
|
|
1676
1687
|
const t = e?.find(
|
|
1677
1688
|
(a) => a.key?.name === u
|
|
1678
1689
|
);
|
|
1679
1690
|
if (t)
|
|
1680
1691
|
return U(t)?.exp;
|
|
1681
1692
|
}
|
|
1682
|
-
function
|
|
1693
|
+
function Je(e, u = {}) {
|
|
1683
1694
|
const t = [];
|
|
1684
1695
|
for (const a of e.properties) {
|
|
1685
|
-
const { key: i, value:
|
|
1686
|
-
if (u[
|
|
1687
|
-
const
|
|
1696
|
+
const { key: i, value: r } = a, s = i.value || i.name || "";
|
|
1697
|
+
if (u[s]) {
|
|
1698
|
+
const c = r.properties;
|
|
1688
1699
|
t.push({
|
|
1689
|
-
id:
|
|
1690
|
-
source: u[
|
|
1691
|
-
deep:
|
|
1692
|
-
immediate:
|
|
1693
|
-
handler:
|
|
1700
|
+
id: s.replace("watcher_", ""),
|
|
1701
|
+
source: u[s],
|
|
1702
|
+
deep: z(c, "deep"),
|
|
1703
|
+
immediate: z(c, "immediate"),
|
|
1704
|
+
handler: Tu(c, "handler")
|
|
1694
1705
|
});
|
|
1695
1706
|
} else if (a.type === "ObjectMethod" && t.push({
|
|
1696
|
-
id:
|
|
1707
|
+
id: ru(),
|
|
1697
1708
|
source: {
|
|
1698
1709
|
type: "JSFunction",
|
|
1699
|
-
value: `() => { return this.${
|
|
1710
|
+
value: `() => { return this.${s}; }`
|
|
1700
1711
|
},
|
|
1701
1712
|
deep: !1,
|
|
1702
1713
|
immediate: !1,
|
|
1703
1714
|
handler: U(a)?.exp
|
|
1704
1715
|
}), a.type === "ObjectProperty") {
|
|
1705
|
-
const
|
|
1716
|
+
const c = r.properties;
|
|
1706
1717
|
t.push({
|
|
1707
|
-
id:
|
|
1718
|
+
id: ru(),
|
|
1708
1719
|
source: {
|
|
1709
1720
|
type: "JSFunction",
|
|
1710
|
-
value: `() => { return this.${
|
|
1721
|
+
value: `() => { return this.${s}; }`
|
|
1711
1722
|
},
|
|
1712
|
-
deep:
|
|
1713
|
-
immediate:
|
|
1714
|
-
handler:
|
|
1723
|
+
deep: z(c, "deep"),
|
|
1724
|
+
immediate: z(c, "immediate"),
|
|
1725
|
+
handler: Tu(c, "handler")
|
|
1715
1726
|
});
|
|
1716
1727
|
}
|
|
1717
1728
|
}
|
|
1718
1729
|
return t;
|
|
1719
1730
|
}
|
|
1720
|
-
function
|
|
1731
|
+
function Xe(e) {
|
|
1721
1732
|
const u = {};
|
|
1722
1733
|
for (const t of e) {
|
|
1723
1734
|
const a = t.key.name;
|
|
1724
|
-
if (
|
|
1735
|
+
if (me.includes(a)) {
|
|
1725
1736
|
const i = U(t);
|
|
1726
1737
|
i && (u[i.name] = i.exp);
|
|
1727
1738
|
}
|
|
1728
1739
|
}
|
|
1729
1740
|
return u;
|
|
1730
1741
|
}
|
|
1731
|
-
function
|
|
1742
|
+
function ze(e) {
|
|
1732
1743
|
const u = e?.find(
|
|
1733
1744
|
(t) => t.key?.name === "type"
|
|
1734
1745
|
);
|
|
1735
1746
|
if (u)
|
|
1736
1747
|
return u.value.type === "ArrayExpression" ? u.value.elements.map((t) => t.name) : u.value.name;
|
|
1737
1748
|
}
|
|
1738
|
-
function
|
|
1749
|
+
function Cu(e) {
|
|
1739
1750
|
const u = e?.find(
|
|
1740
1751
|
(t) => t.key?.name === "default"
|
|
1741
1752
|
);
|
|
1742
1753
|
if (u)
|
|
1743
|
-
return
|
|
1754
|
+
return V(M(u.value));
|
|
1744
1755
|
}
|
|
1745
|
-
function
|
|
1756
|
+
function Qe(e) {
|
|
1746
1757
|
if (!e) return [];
|
|
1747
1758
|
let u = [];
|
|
1748
1759
|
return e.type === "ArrayExpression" ? u = e.elements.map((t) => t.value) : e.type === "ObjectExpression" && (u = e.properties?.map((t) => {
|
|
1749
|
-
const { key: a, value: i } = t,
|
|
1760
|
+
const { key: a, value: i } = t, r = i.properties || [];
|
|
1750
1761
|
return {
|
|
1751
1762
|
name: a.name,
|
|
1752
|
-
required:
|
|
1753
|
-
type:
|
|
1754
|
-
default:
|
|
1763
|
+
required: z(r, "required"),
|
|
1764
|
+
type: ze(r),
|
|
1765
|
+
default: Cu(r)
|
|
1755
1766
|
};
|
|
1756
1767
|
})), u;
|
|
1757
1768
|
}
|
|
1758
|
-
function
|
|
1769
|
+
function Ze(e) {
|
|
1759
1770
|
const u = [];
|
|
1760
1771
|
if (e.callee.type === "MemberExpression" && e.callee.property?.name === "$emit") {
|
|
1761
1772
|
const [a, ...i] = (e.arguments || []).map(
|
|
1762
|
-
(
|
|
1773
|
+
(r) => r.value || r.name
|
|
1763
1774
|
);
|
|
1764
1775
|
a && u.push({
|
|
1765
1776
|
name: a,
|
|
1766
|
-
params: i.filter((
|
|
1777
|
+
params: i.filter((r) => !!r)
|
|
1767
1778
|
});
|
|
1768
1779
|
}
|
|
1769
1780
|
return u;
|
|
1770
1781
|
}
|
|
1771
|
-
function
|
|
1782
|
+
function Ke(e) {
|
|
1772
1783
|
let u = [];
|
|
1773
1784
|
return e.type === "ObjectExpression" && (u = e.properties?.map((t) => {
|
|
1774
|
-
const { key: a, value: i } = t,
|
|
1785
|
+
const { key: a, value: i } = t, r = i.properties, s = a.name, c = _u(r, "from"), o = Cu(r);
|
|
1775
1786
|
return {
|
|
1776
|
-
name:
|
|
1777
|
-
from:
|
|
1787
|
+
name: s,
|
|
1788
|
+
from: c || s,
|
|
1778
1789
|
default: o
|
|
1779
1790
|
};
|
|
1780
1791
|
})), u;
|
|
1781
1792
|
}
|
|
1782
|
-
function
|
|
1793
|
+
function Ye(e) {
|
|
1783
1794
|
return e && e.elements ? e.elements.map((u) => u?.type === "StringLiteral" ? u.value : "").filter((u) => !!u) : [];
|
|
1784
1795
|
}
|
|
1785
|
-
function
|
|
1796
|
+
function ut(e, u) {
|
|
1786
1797
|
return (e.apis || []).find((t) => t.id === u || t.name === u);
|
|
1787
1798
|
}
|
|
1788
|
-
function
|
|
1799
|
+
function et(e) {
|
|
1789
1800
|
if (!e?.properties) return {};
|
|
1790
1801
|
const u = {};
|
|
1791
1802
|
for (const t of e.properties) {
|
|
@@ -1797,21 +1808,27 @@ function Ze(e) {
|
|
|
1797
1808
|
}
|
|
1798
1809
|
return u;
|
|
1799
1810
|
}
|
|
1800
|
-
let cu = [],
|
|
1801
|
-
function
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1811
|
+
let cu = [], Y = {}, Bu = {}, Fu = {}, Pu = {}, uu = "web", Ou = [];
|
|
1812
|
+
function tt(e, u, t = "", a) {
|
|
1813
|
+
cu = [], Y = {}, Bu = a?.handlers || {}, Pu = a?.styles || {}, uu = a?.platform || "web", Ou = a?.imports || [], Fu = a?.directives || {};
|
|
1814
|
+
const r = qu({
|
|
1815
|
+
id: e,
|
|
1816
|
+
filename: u,
|
|
1817
|
+
source: t,
|
|
1818
|
+
isProd: !0,
|
|
1819
|
+
slotted: !0
|
|
1820
|
+
}).ast?.children || [], s = [];
|
|
1821
|
+
for (const c of r) {
|
|
1822
|
+
const o = J(c);
|
|
1823
|
+
Array.isArray(o) ? s.push(...o) : s.push(o);
|
|
1824
|
+
}
|
|
1825
|
+
return {
|
|
1826
|
+
nodes: s.filter((c) => !!c),
|
|
1810
1827
|
slots: cu,
|
|
1811
|
-
context:
|
|
1828
|
+
context: Y
|
|
1812
1829
|
};
|
|
1813
1830
|
}
|
|
1814
|
-
function
|
|
1831
|
+
function at(e) {
|
|
1815
1832
|
if (e.name === "slot") {
|
|
1816
1833
|
let u = "default";
|
|
1817
1834
|
const t = [];
|
|
@@ -1823,124 +1840,124 @@ function Ke(e) {
|
|
|
1823
1840
|
});
|
|
1824
1841
|
}
|
|
1825
1842
|
}
|
|
1826
|
-
function
|
|
1843
|
+
function it(e) {
|
|
1827
1844
|
const u = {};
|
|
1828
1845
|
for (const t of e) {
|
|
1829
|
-
if (t.type ===
|
|
1846
|
+
if (t.type === p.ATTRIBUTE)
|
|
1830
1847
|
if (t.name === "class") {
|
|
1831
|
-
const a = t.value?.content || "", i = /[\w]+_[\w]{5,}/,
|
|
1832
|
-
|
|
1848
|
+
const a = t.value?.content || "", i = /[\w]+_[\w]{5,}/, r = a.match(i)?.[0] || "", s = a.split(" ").filter((o) => o !== r), c = Pu[`.${r}`];
|
|
1849
|
+
c && (u.style = c), s.length && (u.class = s.join(" "));
|
|
1833
1850
|
} else if (t.name === "style") {
|
|
1834
1851
|
const a = t.value?.content || "";
|
|
1835
1852
|
a && (u.style = Du(a));
|
|
1836
1853
|
} else
|
|
1837
1854
|
u[t.name] = t.value?.content || "";
|
|
1838
|
-
if (t.type ===
|
|
1855
|
+
if (t.type === p.DIRECTIVE && t.name === "bind" && (t.exp?.type === p.SIMPLE_EXPRESSION && t.arg?.type === p.SIMPLE_EXPRESSION && (u[t.arg.content] = V(`(${t.exp.content})`)), t.exp?.type === p.COMPOUND_EXPRESSION && t.arg?.type === p.SIMPLE_EXPRESSION))
|
|
1839
1856
|
if (t.arg.content === "class" && u.class) {
|
|
1840
|
-
const a = t.exp.ast.type, i =
|
|
1857
|
+
const a = t.exp.ast.type, i = Ee(
|
|
1841
1858
|
u.class,
|
|
1842
1859
|
t.exp.loc.source,
|
|
1843
1860
|
a
|
|
1844
1861
|
);
|
|
1845
|
-
i && (u[t.arg.content] =
|
|
1862
|
+
i && (u[t.arg.content] = V(i));
|
|
1846
1863
|
} else
|
|
1847
|
-
u[t.arg.content] =
|
|
1864
|
+
u[t.arg.content] = V(
|
|
1848
1865
|
`(${t.exp.loc.source})`
|
|
1849
1866
|
);
|
|
1850
1867
|
}
|
|
1851
1868
|
return u;
|
|
1852
1869
|
}
|
|
1853
|
-
function
|
|
1870
|
+
function rt(e = {}) {
|
|
1854
1871
|
const u = {};
|
|
1855
1872
|
for (const [t, a] of Object.entries(e))
|
|
1856
1873
|
u[t === "tap" ? "click" : t] = a;
|
|
1857
1874
|
return u;
|
|
1858
1875
|
}
|
|
1859
|
-
function
|
|
1876
|
+
function st(e, u = {}) {
|
|
1860
1877
|
const t = {};
|
|
1861
1878
|
for (const a of e)
|
|
1862
|
-
if (a.type ===
|
|
1879
|
+
if (a.type === p.DIRECTIVE && a.name === "on" && a.arg?.type === p.SIMPLE_EXPRESSION) {
|
|
1863
1880
|
const i = a.modifiers.reduce(
|
|
1864
|
-
(
|
|
1881
|
+
(n, f) => (f.content && (n[f.content] = !0), n),
|
|
1865
1882
|
{}
|
|
1866
1883
|
);
|
|
1867
|
-
let
|
|
1868
|
-
|
|
1869
|
-
const
|
|
1870
|
-
if (
|
|
1884
|
+
let r = a.exp?.loc.source || "";
|
|
1885
|
+
r || (r = "() => {}");
|
|
1886
|
+
const s = new RegExp(`${a.arg.content}_[\\w]{5,}`), c = r.match(s)?.[0] || "", o = u[c];
|
|
1887
|
+
if (c && o)
|
|
1871
1888
|
t[a.arg.content] = {
|
|
1872
1889
|
name: a.arg.content,
|
|
1873
1890
|
handler: o,
|
|
1874
1891
|
modifiers: i
|
|
1875
1892
|
};
|
|
1876
1893
|
else {
|
|
1877
|
-
const
|
|
1894
|
+
const n = a.exp?.ast?.type === "CallExpression";
|
|
1878
1895
|
t[a.arg.content] = {
|
|
1879
1896
|
name: a.arg.content,
|
|
1880
|
-
handler:
|
|
1897
|
+
handler: n ? V(r) : fu(r),
|
|
1881
1898
|
modifiers: i
|
|
1882
1899
|
};
|
|
1883
1900
|
}
|
|
1884
1901
|
}
|
|
1885
|
-
return
|
|
1902
|
+
return rt(t);
|
|
1886
1903
|
}
|
|
1887
|
-
function
|
|
1904
|
+
function Q(e, u) {
|
|
1888
1905
|
const t = [], a = ["if", "for", "model", "show", "bind", "html"];
|
|
1889
|
-
if (u && (e.type ===
|
|
1906
|
+
if (u && (e.type === p.IF_BRANCH || e.type === p.IF) && u.forEach((i, r) => {
|
|
1890
1907
|
if (e === i) {
|
|
1891
|
-
const
|
|
1908
|
+
const s = r === 0 ? "vIf" : i.condition ? "vElseIf" : "vElse", c = i.condition?.loc.source || "";
|
|
1892
1909
|
t.push({
|
|
1893
|
-
name:
|
|
1894
|
-
value:
|
|
1910
|
+
name: s,
|
|
1911
|
+
value: s === "vElse" ? !0 : V(c)
|
|
1895
1912
|
});
|
|
1896
1913
|
const o = e.children?.[0];
|
|
1897
1914
|
if (o) {
|
|
1898
|
-
const
|
|
1899
|
-
t.push(...
|
|
1915
|
+
const n = Q(o);
|
|
1916
|
+
t.push(...n);
|
|
1900
1917
|
}
|
|
1901
1918
|
}
|
|
1902
|
-
}), e.type ===
|
|
1919
|
+
}), e.type === p.FOR && t.push({
|
|
1903
1920
|
name: "vFor",
|
|
1904
|
-
value:
|
|
1921
|
+
value: V(e.source.loc.source),
|
|
1905
1922
|
iterator: {
|
|
1906
1923
|
item: e.valueAlias?.loc.source || "item",
|
|
1907
1924
|
index: e.keyAlias?.loc.source || "index"
|
|
1908
1925
|
}
|
|
1909
|
-
}), e.type ===
|
|
1926
|
+
}), e.type === p.ELEMENT) {
|
|
1910
1927
|
const i = e.props.filter(
|
|
1911
|
-
(
|
|
1912
|
-
),
|
|
1913
|
-
|
|
1928
|
+
(f) => f.type === p.DIRECTIVE
|
|
1929
|
+
), r = i.filter((f) => f.name === "model");
|
|
1930
|
+
r.length && r.forEach((f) => {
|
|
1914
1931
|
t.push({
|
|
1915
1932
|
name: "vModel",
|
|
1916
|
-
arg:
|
|
1917
|
-
value:
|
|
1933
|
+
arg: f.arg?.content,
|
|
1934
|
+
value: V(f.exp?.loc.source || "")
|
|
1918
1935
|
});
|
|
1919
1936
|
});
|
|
1920
|
-
const
|
|
1921
|
-
|
|
1937
|
+
const s = i.find((f) => f.name === "show");
|
|
1938
|
+
s && t.push({
|
|
1922
1939
|
name: "vShow",
|
|
1923
|
-
value:
|
|
1940
|
+
value: V(s.exp?.loc.source || "")
|
|
1924
1941
|
});
|
|
1925
|
-
const
|
|
1926
|
-
|
|
1942
|
+
const c = i.find((f) => f.name === "bind" && !f.arg);
|
|
1943
|
+
c && t.push({
|
|
1927
1944
|
name: "vBind",
|
|
1928
|
-
value:
|
|
1945
|
+
value: V(c.exp?.loc.source || "")
|
|
1929
1946
|
});
|
|
1930
|
-
const o = i.find((
|
|
1947
|
+
const o = i.find((f) => f.name === "html");
|
|
1931
1948
|
o && t.push({
|
|
1932
1949
|
name: "vHtml",
|
|
1933
|
-
value:
|
|
1950
|
+
value: V(o.exp?.loc.source || "")
|
|
1934
1951
|
});
|
|
1935
|
-
const
|
|
1936
|
-
for (const
|
|
1937
|
-
const l = (
|
|
1938
|
-
(
|
|
1952
|
+
const n = i.filter((f) => !a.includes(f.name));
|
|
1953
|
+
for (const f of n) {
|
|
1954
|
+
const l = (f.modifiers || []).reduce(
|
|
1955
|
+
(I, A) => (I[A.content] = !0, I),
|
|
1939
1956
|
{}
|
|
1940
|
-
), m =
|
|
1941
|
-
|
|
1942
|
-
name:
|
|
1943
|
-
value:
|
|
1957
|
+
), m = f.arg?.content || void 0, h = Fu[f.name];
|
|
1958
|
+
h && t.push({
|
|
1959
|
+
name: h,
|
|
1960
|
+
value: V(f.exp?.loc.source || ""),
|
|
1944
1961
|
arg: m,
|
|
1945
1962
|
modifiers: l
|
|
1946
1963
|
});
|
|
@@ -1950,20 +1967,20 @@ function Z(e, u) {
|
|
|
1950
1967
|
}
|
|
1951
1968
|
function Mu(e) {
|
|
1952
1969
|
let u = "";
|
|
1953
|
-
if (e.type ===
|
|
1970
|
+
if (e.type === p.ELEMENT) {
|
|
1954
1971
|
const { props: t = [], tag: a } = e;
|
|
1955
1972
|
for (const i of t)
|
|
1956
1973
|
if (i.name === "class") {
|
|
1957
|
-
const
|
|
1958
|
-
u =
|
|
1959
|
-
} else if (i.type ===
|
|
1960
|
-
const
|
|
1961
|
-
u =
|
|
1974
|
+
const r = i.value?.content || "", s = new RegExp(`${a}_([\\w]+)`);
|
|
1975
|
+
u = r.match(s)?.[1] || "";
|
|
1976
|
+
} else if (i.type === p.DIRECTIVE && i.name === "on") {
|
|
1977
|
+
const r = i.arg?.loc?.source || "", s = i.exp?.loc?.source || "", c = new RegExp(`${r}_([\\w]+)`);
|
|
1978
|
+
u = s.match(c)?.[1] || "";
|
|
1962
1979
|
}
|
|
1963
1980
|
}
|
|
1964
|
-
return u ||
|
|
1981
|
+
return u || ru();
|
|
1965
1982
|
}
|
|
1966
|
-
function
|
|
1983
|
+
function ct(e) {
|
|
1967
1984
|
const u = /\.\/(.+?)\.vue/;
|
|
1968
1985
|
for (const { from: t, imports: a } of Ou) {
|
|
1969
1986
|
if (Array.isArray(a) && a.includes(e))
|
|
@@ -1979,122 +1996,122 @@ function t0(e) {
|
|
|
1979
1996
|
}
|
|
1980
1997
|
}
|
|
1981
1998
|
function nu(e, u) {
|
|
1982
|
-
const t = new Set(u?.id ?
|
|
1999
|
+
const t = new Set(u?.id ? Y[u.id] : []), a = (e.directives || []).find((s) => s.name === "vFor");
|
|
1983
2000
|
let i = new Set(Array.from(t));
|
|
1984
2001
|
if (a) {
|
|
1985
|
-
const { item:
|
|
1986
|
-
i = /* @__PURE__ */ new Set([
|
|
2002
|
+
const { item: s = "item", index: c = "index" } = a.iterator || {};
|
|
2003
|
+
i = /* @__PURE__ */ new Set([s, c, ...Array.from(i)]);
|
|
1987
2004
|
}
|
|
1988
|
-
const
|
|
1989
|
-
if (
|
|
1990
|
-
const
|
|
1991
|
-
i = /* @__PURE__ */ new Set([...
|
|
2005
|
+
const r = e.slot;
|
|
2006
|
+
if (r) {
|
|
2007
|
+
const s = typeof r == "string" ? [] : r.params || [], c = s.length ? s : [`scope_${u?.id}`];
|
|
2008
|
+
i = /* @__PURE__ */ new Set([...c, ...Array.from(i)]);
|
|
1992
2009
|
}
|
|
1993
|
-
|
|
2010
|
+
Y[e.id] = i;
|
|
1994
2011
|
}
|
|
1995
2012
|
function iu(e, u, t, a) {
|
|
1996
2013
|
const i = {
|
|
1997
|
-
name:
|
|
1998
|
-
from:
|
|
1999
|
-
props:
|
|
2000
|
-
events:
|
|
2001
|
-
directives:
|
|
2014
|
+
name: Ru(e.tag, uu),
|
|
2015
|
+
from: ct(e.tag),
|
|
2016
|
+
props: it(e.props),
|
|
2017
|
+
events: st(e.props, Bu),
|
|
2018
|
+
directives: Q(t || e, a)
|
|
2002
2019
|
};
|
|
2003
2020
|
i.id = Mu(e), nu(i, u);
|
|
2004
|
-
const
|
|
2005
|
-
return nu(i, u),
|
|
2021
|
+
const r = eu(i, e.children);
|
|
2022
|
+
return nu(i, u), at(r), r;
|
|
2006
2023
|
}
|
|
2007
|
-
function
|
|
2008
|
-
return e.map((t) =>
|
|
2024
|
+
function nt(e = [], u) {
|
|
2025
|
+
return e.map((t) => J(t, u, e));
|
|
2009
2026
|
}
|
|
2010
|
-
function
|
|
2011
|
-
if (e.type ===
|
|
2027
|
+
function J(e, u, t) {
|
|
2028
|
+
if (e.type === p.ELEMENT)
|
|
2012
2029
|
return iu(e, u);
|
|
2013
|
-
if (e.type ===
|
|
2014
|
-
return
|
|
2015
|
-
if (t && e.type ===
|
|
2030
|
+
if (e.type === p.IF)
|
|
2031
|
+
return ot(e);
|
|
2032
|
+
if (t && e.type === p.IF_BRANCH) {
|
|
2016
2033
|
const a = e.children.find(
|
|
2017
|
-
(i) => i.type ===
|
|
2034
|
+
(i) => i.type === p.ELEMENT || i.type === p.FOR
|
|
2018
2035
|
);
|
|
2019
2036
|
if (a) {
|
|
2020
|
-
if (a.type ===
|
|
2037
|
+
if (a.type === p.ELEMENT)
|
|
2021
2038
|
return iu(a, u, e, t);
|
|
2022
|
-
if (a.type ===
|
|
2023
|
-
const
|
|
2024
|
-
return
|
|
2039
|
+
if (a.type === p.FOR) {
|
|
2040
|
+
const r = { name: "div", directives: Q(e) };
|
|
2041
|
+
return eu(r, e.children || []);
|
|
2025
2042
|
}
|
|
2026
2043
|
}
|
|
2027
2044
|
return "";
|
|
2028
2045
|
}
|
|
2029
|
-
if (e.type ===
|
|
2046
|
+
if (e.type === p.FOR) {
|
|
2030
2047
|
const a = e.children[0];
|
|
2031
|
-
if (e.children.length > 1 || a.type !==
|
|
2032
|
-
const
|
|
2033
|
-
return
|
|
2048
|
+
if (e.children.length > 1 || a.type !== p.ELEMENT) {
|
|
2049
|
+
const r = { name: "span", directives: Q(e) };
|
|
2050
|
+
return eu(r, e.children);
|
|
2034
2051
|
} else
|
|
2035
2052
|
return iu(a, u, e);
|
|
2036
2053
|
}
|
|
2037
|
-
if (e.type ===
|
|
2038
|
-
return e.content.type ==
|
|
2054
|
+
if (e.type === p.TEXT_CALL)
|
|
2055
|
+
return e.content.type == p.TEXT ? e.content.content : e.content.type === p.INTERPOLATION ? V(e.content.content.loc.source) : e.content.type === p.COMPOUND_EXPRESSION ? Nu(
|
|
2039
2056
|
e.content.children
|
|
2040
2057
|
) : "";
|
|
2041
|
-
if (e.type ===
|
|
2058
|
+
if (e.type === p.TEXT)
|
|
2042
2059
|
return e.content;
|
|
2043
|
-
if (e.type ===
|
|
2044
|
-
return
|
|
2045
|
-
if (e.type ===
|
|
2046
|
-
return
|
|
2060
|
+
if (e.type === p.INTERPOLATION && (e.content.type === p.SIMPLE_EXPRESSION || e.content.type === p.COMPOUND_EXPRESSION))
|
|
2061
|
+
return V(e.content.loc.source);
|
|
2062
|
+
if (e.type === p.COMPOUND_EXPRESSION)
|
|
2063
|
+
return Nu(
|
|
2047
2064
|
e.children
|
|
2048
2065
|
);
|
|
2049
|
-
e.type !==
|
|
2066
|
+
e.type !== p.COMMENT && console.warn("未处理", e.type);
|
|
2050
2067
|
}
|
|
2051
|
-
function
|
|
2068
|
+
function Nu(e = []) {
|
|
2052
2069
|
const u = e.filter((a) => typeof a != "string"), t = [];
|
|
2053
2070
|
for (const a of u)
|
|
2054
2071
|
t.push({
|
|
2055
2072
|
name: "span",
|
|
2056
|
-
children: a.type ===
|
|
2073
|
+
children: a.type === p.TEXT ? a.loc.source : V(a.content?.loc.source)
|
|
2057
2074
|
});
|
|
2058
2075
|
return {
|
|
2059
2076
|
name: "span",
|
|
2060
2077
|
children: t
|
|
2061
2078
|
};
|
|
2062
2079
|
}
|
|
2063
|
-
function
|
|
2080
|
+
function eu(e, u = []) {
|
|
2064
2081
|
const t = [];
|
|
2065
2082
|
for (const a of u)
|
|
2066
|
-
if (a.type ===
|
|
2083
|
+
if (a.type === p.ELEMENT && a.codegenNode?.value?.arguments) {
|
|
2067
2084
|
const i = a.codegenNode.value.arguments[0];
|
|
2068
2085
|
if (i) {
|
|
2069
|
-
const
|
|
2070
|
-
t.push(...
|
|
2086
|
+
const r = ku(i, uu);
|
|
2087
|
+
t.push(...r);
|
|
2071
2088
|
}
|
|
2072
|
-
} else if (a.type ===
|
|
2073
|
-
const i = a.props.find((
|
|
2074
|
-
for (const
|
|
2075
|
-
const
|
|
2089
|
+
} else if (a.type === p.ELEMENT && a.tag === "template") {
|
|
2090
|
+
const i = a.props.find((r) => r.name === "slot");
|
|
2091
|
+
for (const r of a.children) {
|
|
2092
|
+
const s = r.type === p.TEXT || r.type === p.TEXT_CALL ? {
|
|
2076
2093
|
name: "span",
|
|
2077
|
-
children:
|
|
2078
|
-
} :
|
|
2079
|
-
|
|
2080
|
-
ne(o) && i?.type ===
|
|
2094
|
+
children: J(r, e)
|
|
2095
|
+
} : J(r, e);
|
|
2096
|
+
s && (Array.isArray(s) ? s : [s]).forEach((o) => {
|
|
2097
|
+
ne(o) && i?.type === p.DIRECTIVE && (o.id = Mu(r), o.slot = {
|
|
2081
2098
|
name: i.arg?.content || "default",
|
|
2082
2099
|
params: i.exp?.identifiers || [],
|
|
2083
|
-
scope: i.exp?.type ===
|
|
2100
|
+
scope: i.exp?.type === p.SIMPLE_EXPRESSION ? i.exp.content : ""
|
|
2084
2101
|
}, nu(o, e)), t.push(o);
|
|
2085
2102
|
});
|
|
2086
2103
|
}
|
|
2087
|
-
} else if (a.type ===
|
|
2104
|
+
} else if (a.type === p.JS_CALL_EXPRESSION) {
|
|
2088
2105
|
const i = a.arguments?.[0];
|
|
2089
2106
|
if (i) {
|
|
2090
|
-
const
|
|
2091
|
-
t.push(...
|
|
2107
|
+
const r = ku(i, uu);
|
|
2108
|
+
t.push(...r);
|
|
2092
2109
|
}
|
|
2093
|
-
} else if (a.type ===
|
|
2094
|
-
const i =
|
|
2110
|
+
} else if (a.type === p.TEXT_CALL) {
|
|
2111
|
+
const i = J(a, e);
|
|
2095
2112
|
i && (Array.isArray(i) ? t.push(...i) : t.push(i));
|
|
2096
2113
|
} else {
|
|
2097
|
-
const i =
|
|
2114
|
+
const i = J(a, e);
|
|
2098
2115
|
i && (Array.isArray(i) ? t.push(...i) : t.push(i));
|
|
2099
2116
|
}
|
|
2100
2117
|
if (t.length === 1) {
|
|
@@ -2104,26 +2121,26 @@ function uu(e, u = []) {
|
|
|
2104
2121
|
e.children = t.map((a) => typeof a == "string" ? { name: "span", children: a } : a);
|
|
2105
2122
|
return e;
|
|
2106
2123
|
}
|
|
2107
|
-
function
|
|
2124
|
+
function ot(e) {
|
|
2108
2125
|
const u = e.branches || [], t = u[0], a = t.children || [];
|
|
2109
|
-
if (t?.isTemplateIf || a.length > 1 || a[0].type !==
|
|
2110
|
-
const
|
|
2111
|
-
return
|
|
2126
|
+
if (t?.isTemplateIf || a.length > 1 || a[0].type !== p.ELEMENT) {
|
|
2127
|
+
const r = { name: "span", directives: Q(t, u) };
|
|
2128
|
+
return eu(r, t.children);
|
|
2112
2129
|
} else
|
|
2113
|
-
return
|
|
2130
|
+
return nt(u);
|
|
2114
2131
|
}
|
|
2115
|
-
function
|
|
2132
|
+
function dt(e) {
|
|
2116
2133
|
const u = [], t = {}, a = [];
|
|
2117
2134
|
try {
|
|
2118
|
-
const i =
|
|
2119
|
-
for (const
|
|
2120
|
-
if (
|
|
2135
|
+
const i = se.compileString(e, { charset: !1 })?.css || "", r = re.parse(i), s = /^.[\w]+_[\w]{5,}/;
|
|
2136
|
+
for (const c of r.nodes)
|
|
2137
|
+
if (c.type === "rule") {
|
|
2121
2138
|
const o = {};
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
}), t[
|
|
2139
|
+
s.test(c.selector) ? (c.nodes.forEach((n) => {
|
|
2140
|
+
n.type === "decl" && (o[n.prop] = n.value);
|
|
2141
|
+
}), t[c.selector] = o) : a.push(c.toString());
|
|
2125
2142
|
} else
|
|
2126
|
-
a.push(
|
|
2143
|
+
a.push(c.toString());
|
|
2127
2144
|
} catch (i) {
|
|
2128
2145
|
u.push(`css解析出错了,错误信息:[ ${i.message} ]
|
|
2129
2146
|
`);
|
|
@@ -2135,12 +2152,12 @@ function s0(e) {
|
|
|
2135
2152
|
`)
|
|
2136
2153
|
};
|
|
2137
2154
|
}
|
|
2138
|
-
const
|
|
2155
|
+
const $u = "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(
|
|
2139
2156
|
", "
|
|
2140
|
-
),
|
|
2157
|
+
), ft = "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(
|
|
2141
2158
|
", "
|
|
2142
|
-
),
|
|
2143
|
-
class
|
|
2159
|
+
), lt = "user", j = "User";
|
|
2160
|
+
class bt {
|
|
2144
2161
|
validate(u) {
|
|
2145
2162
|
const t = {
|
|
2146
2163
|
valid: !0,
|
|
@@ -2154,7 +2171,7 @@ class n0 {
|
|
|
2154
2171
|
}
|
|
2155
2172
|
isCompleteSFC(u) {
|
|
2156
2173
|
try {
|
|
2157
|
-
const t =
|
|
2174
|
+
const t = R(u);
|
|
2158
2175
|
return !!(t.template && t.script && t.styles);
|
|
2159
2176
|
} catch {
|
|
2160
2177
|
return !1;
|
|
@@ -2163,45 +2180,45 @@ class n0 {
|
|
|
2163
2180
|
checkSyntax(u) {
|
|
2164
2181
|
let t = "";
|
|
2165
2182
|
try {
|
|
2166
|
-
const a =
|
|
2167
|
-
|
|
2183
|
+
const a = R(u);
|
|
2184
|
+
O(a.script);
|
|
2168
2185
|
} catch (a) {
|
|
2169
2186
|
a instanceof SyntaxError && (t = a.message);
|
|
2170
2187
|
}
|
|
2171
2188
|
return t;
|
|
2172
2189
|
}
|
|
2173
2190
|
checkSetup(u) {
|
|
2174
|
-
const t =
|
|
2191
|
+
const t = R(u);
|
|
2175
2192
|
let a = 0;
|
|
2176
|
-
return
|
|
2193
|
+
return ju(t.script, {
|
|
2177
2194
|
ObjectMethod(i) {
|
|
2178
2195
|
i.node.key.name === "setup" && (a = i.node.body.body.filter(
|
|
2179
|
-
(
|
|
2196
|
+
(s) => !N.isEmptyStatement(s)
|
|
2180
2197
|
).length);
|
|
2181
2198
|
}
|
|
2182
2199
|
}), a === 3;
|
|
2183
2200
|
}
|
|
2184
2201
|
findVantIcons(u) {
|
|
2185
|
-
const t =
|
|
2186
|
-
return i.forEach((
|
|
2187
|
-
const
|
|
2188
|
-
|
|
2189
|
-
}), [...new Set(
|
|
2202
|
+
const t = R(u), a = /<(?:VanIcon|van-icon)\b[^>]*>/g, i = t.template.match(a) || [], r = [];
|
|
2203
|
+
return i.forEach((s) => {
|
|
2204
|
+
const c = s.match(/\bname="([^"]+)"/);
|
|
2205
|
+
c && r.push(c[1]);
|
|
2206
|
+
}), [...new Set(r)];
|
|
2190
2207
|
}
|
|
2191
2208
|
checkVantIcons(u) {
|
|
2192
2209
|
const t = this.findVantIcons(u), a = [];
|
|
2193
2210
|
for (const i of t)
|
|
2194
|
-
|
|
2211
|
+
$u.includes(i) || a.push(i);
|
|
2195
2212
|
return a;
|
|
2196
2213
|
}
|
|
2197
2214
|
findVtjIcons(u) {
|
|
2198
|
-
const t =
|
|
2199
|
-
return !i || !i[1] ? [] : i[1].split(",").map((
|
|
2215
|
+
const t = R(u), a = /import\s*{([^}]+)}\s*from\s*['"]\@vtj\/icons['"]/, i = t.script.match(a);
|
|
2216
|
+
return !i || !i[1] ? [] : i[1].split(",").map((r) => r.trim()).filter(Boolean);
|
|
2200
2217
|
}
|
|
2201
2218
|
checkVtjIcons(u) {
|
|
2202
2219
|
const t = this.findVtjIcons(u), a = [];
|
|
2203
2220
|
for (const i of t)
|
|
2204
|
-
|
|
2221
|
+
ft.includes(i) || a.push(i);
|
|
2205
2222
|
return a;
|
|
2206
2223
|
}
|
|
2207
2224
|
hasUnchangedComment(u) {
|
|
@@ -2211,15 +2228,15 @@ class n0 {
|
|
|
2211
2228
|
...u.match(a) || [],
|
|
2212
2229
|
...u.match(i) || []
|
|
2213
2230
|
].some(
|
|
2214
|
-
(
|
|
2231
|
+
(s) => /不变/.test(s.replace(/\*/g, ""))
|
|
2215
2232
|
// 移除多行注释的星号避免干扰
|
|
2216
2233
|
);
|
|
2217
2234
|
}
|
|
2218
2235
|
}
|
|
2219
|
-
function
|
|
2236
|
+
function ht(e) {
|
|
2220
2237
|
const u = [];
|
|
2221
2238
|
let t = e;
|
|
2222
|
-
const a =
|
|
2239
|
+
const a = R(e);
|
|
2223
2240
|
if (!a.template || !a.script)
|
|
2224
2241
|
return {
|
|
2225
2242
|
fixed: !1,
|
|
@@ -2227,208 +2244,208 @@ function o0(e) {
|
|
|
2227
2244
|
fixedCode: e,
|
|
2228
2245
|
changes: []
|
|
2229
2246
|
};
|
|
2230
|
-
const i =
|
|
2231
|
-
let
|
|
2232
|
-
const
|
|
2233
|
-
let
|
|
2234
|
-
for (; (
|
|
2235
|
-
const
|
|
2236
|
-
if (
|
|
2237
|
-
const
|
|
2238
|
-
|
|
2239
|
-
start:
|
|
2240
|
-
end:
|
|
2241
|
-
original:
|
|
2242
|
-
replacement: `{{${
|
|
2243
|
-
line:
|
|
2244
|
-
column:
|
|
2247
|
+
const i = pt(a.script), r = a.template;
|
|
2248
|
+
let s = r;
|
|
2249
|
+
const c = [], o = /\{\{([^}]+)\}\}/g;
|
|
2250
|
+
let n;
|
|
2251
|
+
for (; (n = o.exec(r)) !== null; ) {
|
|
2252
|
+
const g = n[0], S = n[1], y = F(S, i);
|
|
2253
|
+
if (y !== S) {
|
|
2254
|
+
const x = B(r, n.index);
|
|
2255
|
+
c.push({
|
|
2256
|
+
start: n.index,
|
|
2257
|
+
end: n.index + g.length,
|
|
2258
|
+
original: g,
|
|
2259
|
+
replacement: `{{${y}}}`,
|
|
2260
|
+
line: x.line,
|
|
2261
|
+
column: x.column
|
|
2245
2262
|
}), u.push({
|
|
2246
|
-
line:
|
|
2247
|
-
column:
|
|
2263
|
+
line: x.line + 1,
|
|
2264
|
+
column: x.column,
|
|
2248
2265
|
original: S.trim(),
|
|
2249
|
-
fixed:
|
|
2266
|
+
fixed: y.trim(),
|
|
2250
2267
|
message: "修复插值表达式:添加 state. 前缀"
|
|
2251
2268
|
});
|
|
2252
2269
|
}
|
|
2253
2270
|
}
|
|
2254
|
-
const
|
|
2255
|
-
for (; (
|
|
2256
|
-
const
|
|
2257
|
-
if (
|
|
2258
|
-
const
|
|
2259
|
-
|
|
2260
|
-
start:
|
|
2261
|
-
end:
|
|
2262
|
-
original:
|
|
2263
|
-
replacement: `:${S}="${
|
|
2264
|
-
line:
|
|
2265
|
-
column:
|
|
2271
|
+
const f = /:(\w+)="([^"]+)"/g;
|
|
2272
|
+
for (; (n = f.exec(r)) !== null; ) {
|
|
2273
|
+
const g = n[0], S = n[1], y = n[2], x = F(y, i);
|
|
2274
|
+
if (x !== y) {
|
|
2275
|
+
const v = B(r, n.index);
|
|
2276
|
+
c.push({
|
|
2277
|
+
start: n.index,
|
|
2278
|
+
end: n.index + g.length,
|
|
2279
|
+
original: g,
|
|
2280
|
+
replacement: `:${S}="${x}"`,
|
|
2281
|
+
line: v.line,
|
|
2282
|
+
column: v.column
|
|
2266
2283
|
}), u.push({
|
|
2267
|
-
line:
|
|
2268
|
-
column:
|
|
2269
|
-
original:
|
|
2270
|
-
fixed:
|
|
2284
|
+
line: v.line + 1,
|
|
2285
|
+
column: v.column,
|
|
2286
|
+
original: y,
|
|
2287
|
+
fixed: x,
|
|
2271
2288
|
message: "修复绑定属性:添加 state. 前缀"
|
|
2272
2289
|
});
|
|
2273
2290
|
}
|
|
2274
2291
|
}
|
|
2275
2292
|
const l = /v-(if|else-if|show)="([^"]+)"/g;
|
|
2276
|
-
for (; (
|
|
2277
|
-
const
|
|
2278
|
-
if (
|
|
2279
|
-
const
|
|
2280
|
-
|
|
2281
|
-
start:
|
|
2282
|
-
end:
|
|
2283
|
-
original:
|
|
2284
|
-
replacement: `v-${S}="${
|
|
2285
|
-
line:
|
|
2286
|
-
column:
|
|
2293
|
+
for (; (n = l.exec(r)) !== null; ) {
|
|
2294
|
+
const g = n[0], S = n[1], y = n[2], x = F(y, i);
|
|
2295
|
+
if (x !== y) {
|
|
2296
|
+
const v = B(r, n.index);
|
|
2297
|
+
c.push({
|
|
2298
|
+
start: n.index,
|
|
2299
|
+
end: n.index + g.length,
|
|
2300
|
+
original: g,
|
|
2301
|
+
replacement: `v-${S}="${x}"`,
|
|
2302
|
+
line: v.line,
|
|
2303
|
+
column: v.column
|
|
2287
2304
|
}), u.push({
|
|
2288
|
-
line:
|
|
2289
|
-
column:
|
|
2290
|
-
original:
|
|
2291
|
-
fixed:
|
|
2305
|
+
line: v.line + 1,
|
|
2306
|
+
column: v.column,
|
|
2307
|
+
original: y,
|
|
2308
|
+
fixed: x,
|
|
2292
2309
|
message: `修复 v-${S} 指令:添加 state. 前缀`
|
|
2293
2310
|
});
|
|
2294
2311
|
}
|
|
2295
2312
|
}
|
|
2296
2313
|
const m = /v-for="([^"]+)"/g;
|
|
2297
|
-
for (; (
|
|
2298
|
-
const
|
|
2299
|
-
if (
|
|
2300
|
-
const [,
|
|
2301
|
-
|
|
2314
|
+
for (; (n = m.exec(r)) !== null; ) {
|
|
2315
|
+
const g = n[0], y = n[1].match(/^(.+)\s+in\s+(.+)$/);
|
|
2316
|
+
if (y) {
|
|
2317
|
+
const [, x, v] = y, q = F(
|
|
2318
|
+
v,
|
|
2302
2319
|
i
|
|
2303
2320
|
);
|
|
2304
|
-
if (
|
|
2305
|
-
const
|
|
2306
|
-
|
|
2307
|
-
start:
|
|
2308
|
-
end:
|
|
2309
|
-
original:
|
|
2321
|
+
if (q !== v) {
|
|
2322
|
+
const G = B(r, n.index), tu = `v-for="${x} in ${q}"`;
|
|
2323
|
+
c.push({
|
|
2324
|
+
start: n.index,
|
|
2325
|
+
end: n.index + g.length,
|
|
2326
|
+
original: g,
|
|
2310
2327
|
replacement: tu,
|
|
2311
|
-
line:
|
|
2312
|
-
column:
|
|
2328
|
+
line: G.line,
|
|
2329
|
+
column: G.column
|
|
2313
2330
|
}), u.push({
|
|
2314
|
-
line:
|
|
2315
|
-
column:
|
|
2316
|
-
original:
|
|
2317
|
-
fixed:
|
|
2331
|
+
line: G.line + 1,
|
|
2332
|
+
column: G.column,
|
|
2333
|
+
original: v,
|
|
2334
|
+
fixed: q,
|
|
2318
2335
|
message: "修复 v-for 指令:添加 state. 前缀"
|
|
2319
2336
|
});
|
|
2320
2337
|
}
|
|
2321
2338
|
}
|
|
2322
2339
|
}
|
|
2323
|
-
const
|
|
2324
|
-
for (; (
|
|
2325
|
-
const
|
|
2326
|
-
if (
|
|
2327
|
-
const
|
|
2328
|
-
|
|
2329
|
-
start:
|
|
2330
|
-
end:
|
|
2331
|
-
original:
|
|
2332
|
-
replacement: `v-model="${
|
|
2333
|
-
line:
|
|
2334
|
-
column:
|
|
2340
|
+
const h = /v-model="([^"]+)"/g;
|
|
2341
|
+
for (; (n = h.exec(r)) !== null; ) {
|
|
2342
|
+
const g = n[0], S = n[1], y = F(S, i);
|
|
2343
|
+
if (y !== S) {
|
|
2344
|
+
const x = B(r, n.index);
|
|
2345
|
+
c.push({
|
|
2346
|
+
start: n.index,
|
|
2347
|
+
end: n.index + g.length,
|
|
2348
|
+
original: g,
|
|
2349
|
+
replacement: `v-model="${y}"`,
|
|
2350
|
+
line: x.line,
|
|
2351
|
+
column: x.column
|
|
2335
2352
|
}), u.push({
|
|
2336
|
-
line:
|
|
2337
|
-
column:
|
|
2353
|
+
line: x.line + 1,
|
|
2354
|
+
column: x.column,
|
|
2338
2355
|
original: S,
|
|
2339
|
-
fixed:
|
|
2356
|
+
fixed: y,
|
|
2340
2357
|
message: "修复 v-model 指令:添加 state. 前缀"
|
|
2341
2358
|
});
|
|
2342
2359
|
}
|
|
2343
2360
|
}
|
|
2344
|
-
const
|
|
2345
|
-
for (; (
|
|
2346
|
-
const
|
|
2347
|
-
if (
|
|
2348
|
-
const
|
|
2349
|
-
|
|
2350
|
-
start:
|
|
2351
|
-
end:
|
|
2352
|
-
original:
|
|
2353
|
-
replacement: `v-bind="${
|
|
2354
|
-
line:
|
|
2355
|
-
column:
|
|
2361
|
+
const I = /v-bind="([^"]+)"/g;
|
|
2362
|
+
for (; (n = I.exec(r)) !== null; ) {
|
|
2363
|
+
const g = n[0], S = n[1], y = F(S, i);
|
|
2364
|
+
if (y !== S) {
|
|
2365
|
+
const x = B(r, n.index);
|
|
2366
|
+
c.push({
|
|
2367
|
+
start: n.index,
|
|
2368
|
+
end: n.index + g.length,
|
|
2369
|
+
original: g,
|
|
2370
|
+
replacement: `v-bind="${y}"`,
|
|
2371
|
+
line: x.line,
|
|
2372
|
+
column: x.column
|
|
2356
2373
|
}), u.push({
|
|
2357
|
-
line:
|
|
2358
|
-
column:
|
|
2374
|
+
line: x.line + 1,
|
|
2375
|
+
column: x.column,
|
|
2359
2376
|
original: S,
|
|
2360
|
-
fixed:
|
|
2377
|
+
fixed: y,
|
|
2361
2378
|
message: "修复 v-bind 指令:添加 state. 前缀"
|
|
2362
2379
|
});
|
|
2363
2380
|
}
|
|
2364
2381
|
}
|
|
2365
2382
|
const A = /v-(text|html)="([^"]+)"/g;
|
|
2366
|
-
for (; (
|
|
2367
|
-
const
|
|
2368
|
-
if (
|
|
2369
|
-
const
|
|
2370
|
-
|
|
2371
|
-
start:
|
|
2372
|
-
end:
|
|
2373
|
-
original:
|
|
2374
|
-
replacement: `v-${S}="${
|
|
2375
|
-
line:
|
|
2376
|
-
column:
|
|
2383
|
+
for (; (n = A.exec(r)) !== null; ) {
|
|
2384
|
+
const g = n[0], S = n[1], y = n[2], x = F(y, i);
|
|
2385
|
+
if (x !== y) {
|
|
2386
|
+
const v = B(r, n.index);
|
|
2387
|
+
c.push({
|
|
2388
|
+
start: n.index,
|
|
2389
|
+
end: n.index + g.length,
|
|
2390
|
+
original: g,
|
|
2391
|
+
replacement: `v-${S}="${x}"`,
|
|
2392
|
+
line: v.line,
|
|
2393
|
+
column: v.column
|
|
2377
2394
|
}), u.push({
|
|
2378
|
-
line:
|
|
2379
|
-
column:
|
|
2380
|
-
original:
|
|
2381
|
-
fixed:
|
|
2395
|
+
line: v.line + 1,
|
|
2396
|
+
column: v.column,
|
|
2397
|
+
original: y,
|
|
2398
|
+
fixed: x,
|
|
2382
2399
|
message: `修复 v-${S} 指令:添加 state. 前缀`
|
|
2383
2400
|
});
|
|
2384
2401
|
}
|
|
2385
2402
|
}
|
|
2386
|
-
const
|
|
2387
|
-
for (; (
|
|
2388
|
-
const
|
|
2389
|
-
if (
|
|
2390
|
-
const
|
|
2391
|
-
|
|
2392
|
-
start:
|
|
2393
|
-
end:
|
|
2394
|
-
original: b,
|
|
2395
|
-
replacement: `${S}${I}="${w}"`,
|
|
2396
|
-
line: R.line,
|
|
2397
|
-
column: R.column
|
|
2398
|
-
}), u.push({
|
|
2399
|
-
line: R.line + 1,
|
|
2400
|
-
column: R.column,
|
|
2403
|
+
const H = /(@|v-on:)(\w+)="([^"]+)"/g;
|
|
2404
|
+
for (; (n = H.exec(r)) !== null; ) {
|
|
2405
|
+
const g = n[0], S = n[1], y = n[2], x = n[3], v = mt(x, i);
|
|
2406
|
+
if (v !== x) {
|
|
2407
|
+
const q = B(r, n.index);
|
|
2408
|
+
c.push({
|
|
2409
|
+
start: n.index,
|
|
2410
|
+
end: n.index + g.length,
|
|
2401
2411
|
original: g,
|
|
2402
|
-
|
|
2412
|
+
replacement: `${S}${y}="${v}"`,
|
|
2413
|
+
line: q.line,
|
|
2414
|
+
column: q.column
|
|
2415
|
+
}), u.push({
|
|
2416
|
+
line: q.line + 1,
|
|
2417
|
+
column: q.column,
|
|
2418
|
+
original: x,
|
|
2419
|
+
fixed: v,
|
|
2403
2420
|
message: "修复事件处理器:添加 state. 前缀"
|
|
2404
2421
|
});
|
|
2405
2422
|
}
|
|
2406
2423
|
}
|
|
2407
|
-
if (
|
|
2408
|
-
|
|
2409
|
-
}),
|
|
2410
|
-
const
|
|
2411
|
-
t = e.substring(0,
|
|
2412
|
-
` +
|
|
2424
|
+
if (c.sort((g, S) => S.start - g.start), c.forEach((g) => {
|
|
2425
|
+
s = s.substring(0, g.start) + g.replacement + s.substring(g.end);
|
|
2426
|
+
}), c.length > 0) {
|
|
2427
|
+
const g = e.indexOf("<template>"), S = e.lastIndexOf("</template>") + 11;
|
|
2428
|
+
t = e.substring(0, g) + `<template>
|
|
2429
|
+
` + s + `
|
|
2413
2430
|
</template>` + e.substring(S);
|
|
2414
2431
|
}
|
|
2415
2432
|
return {
|
|
2416
|
-
fixed:
|
|
2433
|
+
fixed: c.length > 0,
|
|
2417
2434
|
originalCode: e,
|
|
2418
2435
|
fixedCode: t,
|
|
2419
2436
|
changes: u
|
|
2420
2437
|
};
|
|
2421
2438
|
}
|
|
2422
|
-
function
|
|
2439
|
+
function pt(e) {
|
|
2423
2440
|
const u = /* @__PURE__ */ new Set();
|
|
2424
2441
|
try {
|
|
2425
|
-
const t =
|
|
2426
|
-
|
|
2442
|
+
const t = O(e);
|
|
2443
|
+
Z(t, {
|
|
2427
2444
|
CallExpression(a) {
|
|
2428
2445
|
if (a.node.callee.type === "Identifier" && a.node.callee.name === "reactive" && a.node.arguments.length > 0 && a.node.arguments[0].type === "ObjectExpression") {
|
|
2429
2446
|
const i = a.parent;
|
|
2430
|
-
i.type === "VariableDeclarator" && i.id.type === "Identifier" && i.id.name === "state" && a.node.arguments[0].properties.forEach((
|
|
2431
|
-
|
|
2447
|
+
i.type === "VariableDeclarator" && i.id.type === "Identifier" && i.id.name === "state" && a.node.arguments[0].properties.forEach((s) => {
|
|
2448
|
+
s.type === "ObjectProperty" && s.key.type === "Identifier" && u.add(s.key.name);
|
|
2432
2449
|
});
|
|
2433
2450
|
}
|
|
2434
2451
|
}
|
|
@@ -2438,27 +2455,27 @@ function d0(e) {
|
|
|
2438
2455
|
}
|
|
2439
2456
|
return u;
|
|
2440
2457
|
}
|
|
2441
|
-
function
|
|
2458
|
+
function F(e, u) {
|
|
2442
2459
|
let t = e.trim();
|
|
2443
2460
|
return u.forEach((a) => {
|
|
2444
2461
|
const i = new RegExp(`(?<![\\w.])${a}(?![\\w])`, "g");
|
|
2445
2462
|
i.test(t) && !t.includes(`state.${a}`) && (t = t.replace(i, `state.${a}`));
|
|
2446
2463
|
}), t;
|
|
2447
2464
|
}
|
|
2448
|
-
function
|
|
2465
|
+
function mt(e, u) {
|
|
2449
2466
|
let t = e.trim();
|
|
2450
2467
|
return u.forEach((a) => {
|
|
2451
2468
|
const i = new RegExp(
|
|
2452
2469
|
`(?<![\\w.])${a}(\\+\\+|--|\\s*[+\\-*/]=)`,
|
|
2453
2470
|
"g"
|
|
2454
|
-
),
|
|
2471
|
+
), r = new RegExp(
|
|
2455
2472
|
`(\\+\\+|--)?(?<![\\w.])${a}(?![\\w])`,
|
|
2456
2473
|
"g"
|
|
2457
2474
|
);
|
|
2458
|
-
t.includes(`state.${a}`) || (t = t.replace(i, `state.${a}$1`), t = t.replace(
|
|
2459
|
-
}),
|
|
2475
|
+
t.includes(`state.${a}`) || (t = t.replace(i, `state.${a}$1`), t = t.replace(r, (s, c) => c ? `${c}state.${a}` : s.includes(a) && !s.includes("state.") ? `state.${a}` : s));
|
|
2476
|
+
}), F(t, u);
|
|
2460
2477
|
}
|
|
2461
|
-
function
|
|
2478
|
+
function B(e, u) {
|
|
2462
2479
|
const t = e.substring(0, u).split(`
|
|
2463
2480
|
`);
|
|
2464
2481
|
return {
|
|
@@ -2466,51 +2483,51 @@ function $(e, u) {
|
|
|
2466
2483
|
column: t[t.length - 1].length
|
|
2467
2484
|
};
|
|
2468
2485
|
}
|
|
2469
|
-
class
|
|
2486
|
+
class xt {
|
|
2470
2487
|
fixBasedOnValidation(u, t) {
|
|
2471
2488
|
let a = u;
|
|
2472
|
-
return t.illegalVantIcons.length && (a = this.fixVantIcons(a)), t.illegalVtjIcons.length && (a = this.fixVtjIcons(a, t.illegalVtjIcons)),
|
|
2489
|
+
return t.illegalVantIcons.length && (a = this.fixVantIcons(a)), t.illegalVtjIcons.length && (a = this.fixVtjIcons(a, t.illegalVtjIcons)), ht(a).fixedCode;
|
|
2473
2490
|
}
|
|
2474
2491
|
fixVantIcons(u) {
|
|
2475
|
-
const t =
|
|
2492
|
+
const t = R(u), a = t.template.replace(
|
|
2476
2493
|
/<(?:VanIcon|van-icon)\s+[^>]*name="([^"]+)"[^>]*>/g,
|
|
2477
|
-
(i,
|
|
2494
|
+
(i, r) => $u.includes(r) ? i : i.replace(r, lt)
|
|
2478
2495
|
);
|
|
2479
2496
|
return this.reconstructSFC(t, a, t.script);
|
|
2480
2497
|
}
|
|
2481
2498
|
fixVtjIcons(u, t = []) {
|
|
2482
|
-
const a =
|
|
2483
|
-
a.script =
|
|
2484
|
-
ImportDeclaration(
|
|
2485
|
-
if (
|
|
2486
|
-
const
|
|
2487
|
-
let
|
|
2488
|
-
for (const
|
|
2489
|
-
const l =
|
|
2490
|
-
l === j && (
|
|
2491
|
-
|
|
2499
|
+
const a = R(u);
|
|
2500
|
+
a.script = ju(a.script, {
|
|
2501
|
+
ImportDeclaration(s) {
|
|
2502
|
+
if (s.node.source.value === "@vtj/icons") {
|
|
2503
|
+
const c = s.node.specifiers, o = [];
|
|
2504
|
+
let n = !1;
|
|
2505
|
+
for (const f of c) {
|
|
2506
|
+
const l = f.imported?.name;
|
|
2507
|
+
l === j && (n = !0), t.includes(l) || o.push(
|
|
2508
|
+
N.importSpecifier(f.local, f.imported)
|
|
2492
2509
|
);
|
|
2493
2510
|
}
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2511
|
+
n || o.push(
|
|
2512
|
+
N.importSpecifier(
|
|
2513
|
+
N.identifier(j),
|
|
2514
|
+
N.identifier(j)
|
|
2498
2515
|
)
|
|
2499
|
-
),
|
|
2516
|
+
), s.node.specifiers = o;
|
|
2500
2517
|
}
|
|
2501
2518
|
},
|
|
2502
|
-
ObjectMethod(
|
|
2503
|
-
if (
|
|
2504
|
-
const
|
|
2505
|
-
for (const o of
|
|
2506
|
-
if (
|
|
2507
|
-
const
|
|
2508
|
-
o.argument.properties =
|
|
2509
|
-
(
|
|
2519
|
+
ObjectMethod(s) {
|
|
2520
|
+
if (s.node.key.name === "setup") {
|
|
2521
|
+
const c = s.node.body.body;
|
|
2522
|
+
for (const o of c)
|
|
2523
|
+
if (N.isReturnStatement(o) && N.isObjectExpression(o.argument)) {
|
|
2524
|
+
const n = o.argument.properties || [];
|
|
2525
|
+
o.argument.properties = n.filter(
|
|
2526
|
+
(f) => !t.includes(f.key.name)
|
|
2510
2527
|
), o.argument.properties.push(
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2528
|
+
N.objectProperty(
|
|
2529
|
+
N.identifier(j),
|
|
2530
|
+
N.identifier(j),
|
|
2514
2531
|
!1,
|
|
2515
2532
|
!0
|
|
2516
2533
|
)
|
|
@@ -2518,27 +2535,27 @@ class l0 {
|
|
|
2518
2535
|
}
|
|
2519
2536
|
}
|
|
2520
2537
|
},
|
|
2521
|
-
ObjectProperty(
|
|
2522
|
-
if (
|
|
2523
|
-
const
|
|
2524
|
-
|
|
2538
|
+
ObjectProperty(s) {
|
|
2539
|
+
if (N.isIdentifier(s.node.value) && t.includes(s.node.value.name) && (s.node.value = N.identifier(j)), N.isArrayExpression(s.node.value)) {
|
|
2540
|
+
const c = s.node.value.elements;
|
|
2541
|
+
s.node.value.elements = c.map((o) => N.isIdentifier(o) && t.includes(o.name) ? N.identifier(j) : o);
|
|
2525
2542
|
}
|
|
2526
2543
|
},
|
|
2527
|
-
AssignmentExpression(
|
|
2528
|
-
|
|
2544
|
+
AssignmentExpression(s) {
|
|
2545
|
+
N.isIdentifier(s.node.right) && t.includes(s.node.right.name) && (s.node.right = N.identifier(j));
|
|
2529
2546
|
}
|
|
2530
2547
|
});
|
|
2531
|
-
const i = /:icon\s*=\s*["']([^"']+)["']/g,
|
|
2532
|
-
if (
|
|
2533
|
-
for (const
|
|
2534
|
-
let
|
|
2548
|
+
const i = /:icon\s*=\s*["']([^"']+)["']/g, r = a.template.match(i);
|
|
2549
|
+
if (r)
|
|
2550
|
+
for (const s of r) {
|
|
2551
|
+
let c = s;
|
|
2535
2552
|
for (const o of t)
|
|
2536
|
-
|
|
2537
|
-
a.template = a.template.replace(
|
|
2553
|
+
c = c.replace(new RegExp(o, "g"), j);
|
|
2554
|
+
a.template = a.template.replace(s, c);
|
|
2538
2555
|
}
|
|
2539
|
-
for (const
|
|
2556
|
+
for (const s of t)
|
|
2540
2557
|
a.template = a.template.replace(
|
|
2541
|
-
new RegExp(`:icon="${
|
|
2558
|
+
new RegExp(`:icon="${s}"`, "g"),
|
|
2542
2559
|
`:icon="${j}"`
|
|
2543
2560
|
);
|
|
2544
2561
|
return this.reconstructSFC(a, a.template, a.script);
|
|
@@ -2553,68 +2570,68 @@ ${t}
|
|
|
2553
2570
|
${a}
|
|
2554
2571
|
<\/script>
|
|
2555
2572
|
|
|
2556
|
-
`), u.styles.forEach((
|
|
2573
|
+
`), u.styles.forEach((r) => {
|
|
2557
2574
|
i += `<style lang="scss" scoped>
|
|
2558
|
-
`, i += `${
|
|
2575
|
+
`, i += `${r}
|
|
2559
2576
|
`, i += `</style>
|
|
2560
2577
|
|
|
2561
2578
|
`;
|
|
2562
2579
|
}), i;
|
|
2563
2580
|
}
|
|
2564
2581
|
}
|
|
2565
|
-
async function
|
|
2566
|
-
const { id: u, name: t, source: a, project: i } = e,
|
|
2567
|
-
if (
|
|
2568
|
-
return Promise.reject(
|
|
2569
|
-
const { dependencies:
|
|
2582
|
+
async function Dt(e) {
|
|
2583
|
+
const { id: u, name: t, source: a, project: i } = e, r = oe(a, t);
|
|
2584
|
+
if (r)
|
|
2585
|
+
return Promise.reject(r);
|
|
2586
|
+
const { dependencies: s = [], platform: c = "web" } = i || {}, o = new bt(), n = new xt(), f = o.validate(a);
|
|
2570
2587
|
let l = [];
|
|
2571
|
-
if (!
|
|
2572
|
-
return l =
|
|
2573
|
-
const m =
|
|
2574
|
-
styles:
|
|
2588
|
+
if (!f.valid)
|
|
2589
|
+
return l = f.errors, Promise.reject(l);
|
|
2590
|
+
const m = n.fixBasedOnValidation(a, f), h = R(m), {
|
|
2591
|
+
styles: I,
|
|
2575
2592
|
css: A,
|
|
2576
|
-
errors:
|
|
2577
|
-
} =
|
|
2593
|
+
errors: H
|
|
2594
|
+
} = dt(h.styles.join(`
|
|
2578
2595
|
`));
|
|
2579
|
-
if (l.push(...
|
|
2596
|
+
if (l.push(...H), l.length)
|
|
2580
2597
|
return Promise.reject(l);
|
|
2581
2598
|
const {
|
|
2582
|
-
state:
|
|
2599
|
+
state: g,
|
|
2583
2600
|
watch: S,
|
|
2584
|
-
lifeCycles:
|
|
2585
|
-
computed:
|
|
2586
|
-
methods:
|
|
2587
|
-
props:
|
|
2588
|
-
emits:
|
|
2601
|
+
lifeCycles: y,
|
|
2602
|
+
computed: x,
|
|
2603
|
+
methods: v,
|
|
2604
|
+
props: q,
|
|
2605
|
+
emits: G,
|
|
2589
2606
|
expose: tu,
|
|
2590
2607
|
inject: Uu,
|
|
2591
2608
|
handlers: Hu,
|
|
2592
2609
|
imports: lu,
|
|
2593
2610
|
dataSources: Gu,
|
|
2594
2611
|
directives: Wu
|
|
2595
|
-
} =
|
|
2596
|
-
platform:
|
|
2612
|
+
} = Pe(h.script, i), { nodes: Ju, slots: Xu, context: zu } = tt(u, t, h.template, {
|
|
2613
|
+
platform: c,
|
|
2597
2614
|
handlers: Hu,
|
|
2598
|
-
styles:
|
|
2615
|
+
styles: I,
|
|
2599
2616
|
imports: lu,
|
|
2600
2617
|
directives: Wu
|
|
2601
2618
|
}), bu = {
|
|
2602
2619
|
id: u,
|
|
2603
2620
|
name: t,
|
|
2604
2621
|
inject: Uu,
|
|
2605
|
-
props:
|
|
2606
|
-
state:
|
|
2622
|
+
props: q,
|
|
2623
|
+
state: g,
|
|
2607
2624
|
watch: S,
|
|
2608
|
-
lifeCycles:
|
|
2609
|
-
computed:
|
|
2610
|
-
methods:
|
|
2625
|
+
lifeCycles: y,
|
|
2626
|
+
computed: x,
|
|
2627
|
+
methods: v,
|
|
2611
2628
|
dataSources: Gu,
|
|
2612
|
-
slots:
|
|
2613
|
-
emits:
|
|
2629
|
+
slots: Xu,
|
|
2630
|
+
emits: G,
|
|
2614
2631
|
expose: tu,
|
|
2615
|
-
nodes:
|
|
2632
|
+
nodes: Ju,
|
|
2616
2633
|
css: A
|
|
2617
|
-
},
|
|
2634
|
+
}, Qu = Object.keys(x || {}), Zu = (q || []).map(
|
|
2618
2635
|
(_) => typeof _ == "string" ? _ : _.name
|
|
2619
2636
|
), Ku = [
|
|
2620
2637
|
"$el",
|
|
@@ -2632,75 +2649,75 @@ async function k0(e) {
|
|
|
2632
2649
|
"state",
|
|
2633
2650
|
"$props",
|
|
2634
2651
|
"props",
|
|
2635
|
-
...Object.keys(
|
|
2636
|
-
], { libs: Yu } =
|
|
2637
|
-
platform:
|
|
2638
|
-
context:
|
|
2639
|
-
computed:
|
|
2652
|
+
...Object.keys(v || {})
|
|
2653
|
+
], { libs: Yu } = St(lu, s), hu = {
|
|
2654
|
+
platform: c,
|
|
2655
|
+
context: zu,
|
|
2656
|
+
computed: Qu,
|
|
2640
2657
|
libs: Yu,
|
|
2641
2658
|
members: Ku,
|
|
2642
|
-
props:
|
|
2659
|
+
props: Zu
|
|
2643
2660
|
};
|
|
2644
|
-
return await
|
|
2661
|
+
return await gt(
|
|
2645
2662
|
bu,
|
|
2646
2663
|
async (_) => {
|
|
2647
|
-
await
|
|
2648
|
-
if (du(
|
|
2649
|
-
const ue = await xu(
|
|
2650
|
-
|
|
2664
|
+
await yt(_, async (X) => {
|
|
2665
|
+
if (du(X)) {
|
|
2666
|
+
const ue = await xu(X.value);
|
|
2667
|
+
X.value = yu(ue, _.id, hu);
|
|
2651
2668
|
}
|
|
2652
2669
|
});
|
|
2653
2670
|
},
|
|
2654
2671
|
async (_) => {
|
|
2655
|
-
const
|
|
2656
|
-
_.value = yu(
|
|
2672
|
+
const X = await xu(_.value);
|
|
2673
|
+
_.value = yu(X, "", hu);
|
|
2657
2674
|
}
|
|
2658
2675
|
), new te(bu).toDsl();
|
|
2659
2676
|
}
|
|
2660
|
-
async function
|
|
2661
|
-
const a = async (
|
|
2662
|
-
if (await u(
|
|
2663
|
-
for (const A of
|
|
2664
|
-
await a(A,
|
|
2665
|
-
}, i = async (
|
|
2666
|
-
if (!
|
|
2667
|
-
if (Array.isArray(
|
|
2668
|
-
for (let A of
|
|
2677
|
+
async function gt(e, u, t) {
|
|
2678
|
+
const a = async (h, I) => {
|
|
2679
|
+
if (await u(h, I), Array.isArray(h?.children))
|
|
2680
|
+
for (const A of h?.children || [])
|
|
2681
|
+
await a(A, h);
|
|
2682
|
+
}, i = async (h) => {
|
|
2683
|
+
if (!h || typeof h != "object") return;
|
|
2684
|
+
if (Array.isArray(h)) {
|
|
2685
|
+
for (let A of h)
|
|
2669
2686
|
await i(A);
|
|
2670
2687
|
return;
|
|
2671
2688
|
}
|
|
2672
|
-
const
|
|
2673
|
-
for (const A of
|
|
2689
|
+
const I = Object.values(h);
|
|
2690
|
+
for (const A of I)
|
|
2674
2691
|
du(A) ? await t(A) : await i(A);
|
|
2675
2692
|
}, {
|
|
2676
|
-
state:
|
|
2677
|
-
watch:
|
|
2678
|
-
computed:
|
|
2693
|
+
state: r,
|
|
2694
|
+
watch: s,
|
|
2695
|
+
computed: c,
|
|
2679
2696
|
props: o,
|
|
2680
|
-
dataSources:
|
|
2681
|
-
methods:
|
|
2697
|
+
dataSources: n,
|
|
2698
|
+
methods: f,
|
|
2682
2699
|
lifeCycles: l,
|
|
2683
2700
|
inject: m
|
|
2684
2701
|
} = e;
|
|
2685
2702
|
if (await i({
|
|
2686
|
-
state:
|
|
2687
|
-
watch:
|
|
2688
|
-
computed:
|
|
2703
|
+
state: r,
|
|
2704
|
+
watch: s,
|
|
2705
|
+
computed: c,
|
|
2689
2706
|
props: o,
|
|
2690
|
-
dataSources:
|
|
2691
|
-
methods:
|
|
2707
|
+
dataSources: n,
|
|
2708
|
+
methods: f,
|
|
2692
2709
|
lifeCycles: l,
|
|
2693
2710
|
inject: m
|
|
2694
2711
|
}), Array.isArray(e.nodes))
|
|
2695
|
-
for (const
|
|
2696
|
-
await a(
|
|
2712
|
+
for (const h of e.nodes)
|
|
2713
|
+
await a(h);
|
|
2697
2714
|
}
|
|
2698
|
-
async function
|
|
2715
|
+
async function yt(e, u) {
|
|
2699
2716
|
const t = async (a) => {
|
|
2700
2717
|
if (!a || typeof a != "object") return;
|
|
2701
2718
|
if (Array.isArray(a)) {
|
|
2702
|
-
for (let
|
|
2703
|
-
await u(
|
|
2719
|
+
for (let r of a)
|
|
2720
|
+
await u(r), await t(r);
|
|
2704
2721
|
return;
|
|
2705
2722
|
}
|
|
2706
2723
|
if (du(a)) {
|
|
@@ -2708,37 +2725,37 @@ async function h0(e, u) {
|
|
|
2708
2725
|
return;
|
|
2709
2726
|
}
|
|
2710
2727
|
const i = Object.values(a);
|
|
2711
|
-
for (const
|
|
2712
|
-
await u(
|
|
2728
|
+
for (const r of i)
|
|
2729
|
+
await u(r), await t(r);
|
|
2713
2730
|
};
|
|
2714
2731
|
await t(e);
|
|
2715
2732
|
}
|
|
2716
|
-
function
|
|
2733
|
+
function St(e = [], u = []) {
|
|
2717
2734
|
const t = {}, a = u.reduce(
|
|
2718
|
-
(i,
|
|
2735
|
+
(i, r) => (i[r.package] = r.library, i),
|
|
2719
2736
|
{}
|
|
2720
2737
|
);
|
|
2721
|
-
for (const { from: i, imports:
|
|
2722
|
-
if (Array.isArray(
|
|
2723
|
-
|
|
2724
|
-
const
|
|
2725
|
-
|
|
2738
|
+
for (const { from: i, imports: r } of e)
|
|
2739
|
+
if (Array.isArray(r))
|
|
2740
|
+
r.forEach((s) => {
|
|
2741
|
+
const c = a[i];
|
|
2742
|
+
c && (t[s] = c);
|
|
2726
2743
|
});
|
|
2727
2744
|
else {
|
|
2728
|
-
const
|
|
2729
|
-
|
|
2745
|
+
const s = a[i];
|
|
2746
|
+
s && (t[r] = s);
|
|
2730
2747
|
}
|
|
2731
2748
|
return {
|
|
2732
2749
|
libs: t
|
|
2733
2750
|
};
|
|
2734
2751
|
}
|
|
2735
2752
|
export {
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2753
|
+
xt as AutoFixer,
|
|
2754
|
+
bt as ComponentValidator,
|
|
2755
|
+
jt as VTJ_PARSER_VERSION,
|
|
2756
|
+
ku as htmlToNodes,
|
|
2757
|
+
Rt as parseUniApp,
|
|
2758
|
+
Dt as parseVue,
|
|
2742
2759
|
yu as patchCode,
|
|
2743
|
-
|
|
2760
|
+
$ as replacer
|
|
2744
2761
|
};
|