@vtj/parser 0.12.55 → 0.12.57
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 +27 -8
- package/dist/index.mjs +1159 -709
- package/package.json +5 -3
- package/types/index.d.ts +1 -0
- package/types/shared/utils.d.ts +2 -0
- package/types/tools/fixer.d.ts +7 -0
- package/types/tools/icons.d.ts +4 -0
- package/types/tools/index.d.ts +2 -0
- package/types/tools/state.d.ts +14 -0
- package/types/tools/validator.d.ts +16 -0
- package/types/version.d.ts +2 -2
- package/types/vue/utils.d.ts +2 -2
package/dist/index.mjs
CHANGED
@@ -1,38 +1,40 @@
|
|
1
|
-
import { parse as
|
2
|
-
import {
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import
|
10
|
-
import
|
1
|
+
import { parse as Wu, compileTemplate as Ju } from "@vue/compiler-sfc";
|
2
|
+
import { transformSync as zu } from "@babel/core";
|
3
|
+
import { parse as Xu } from "@babel/parser";
|
4
|
+
import pu from "@babel/traverse";
|
5
|
+
import mu from "@babel/generator";
|
6
|
+
import { BlockModel as Qu } from "@vtj/core";
|
7
|
+
import { tsFormatter as xu } from "@vtj/coder";
|
8
|
+
import { NodeTypes as h } from "@vue/compiler-core";
|
9
|
+
import { upperFirstCamelCase as Zu, unBase64 as Ku, uid as eu } from "@vtj/base";
|
10
|
+
import Yu from "postcss";
|
11
|
+
import * as ue from "sass";
|
12
|
+
import * as T from "@babel/types";
|
11
13
|
/**!
|
12
14
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
13
15
|
* @name @vtj/parser
|
14
16
|
* @author CHC chenhuachun1549@dingtalk.com
|
15
|
-
* @version 0.12.
|
17
|
+
* @version 0.12.57
|
16
18
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
17
19
|
*/
|
18
|
-
const
|
19
|
-
function
|
20
|
-
const { descriptor: u } =
|
20
|
+
const x0 = "0.12.57";
|
21
|
+
function D(e) {
|
22
|
+
const { descriptor: u } = Wu(e), t = u.template?.content || "", a = (u.scriptSetup || u.script)?.content || "", i = u.styles.map((c) => c.content);
|
21
23
|
return {
|
22
24
|
template: t,
|
23
25
|
script: a,
|
24
26
|
styles: i
|
25
27
|
};
|
26
28
|
}
|
27
|
-
function
|
28
|
-
return
|
29
|
+
function cu(e) {
|
30
|
+
return Xu(e, { sourceType: "module", plugins: ["typescript"] });
|
29
31
|
}
|
30
|
-
function
|
31
|
-
return (
|
32
|
+
function su(e, u) {
|
33
|
+
return (pu.default || pu)(e, u);
|
32
34
|
}
|
33
|
-
function
|
35
|
+
function M(e) {
|
34
36
|
try {
|
35
|
-
return (
|
37
|
+
return (mu.default || mu)(e, {
|
36
38
|
comments: !1,
|
37
39
|
concise: !0,
|
38
40
|
retainLines: !1,
|
@@ -44,76 +46,81 @@ function L(e) {
|
|
44
46
|
return console.error("代码生成错误", u), "";
|
45
47
|
}
|
46
48
|
}
|
47
|
-
function
|
49
|
+
function nu(e) {
|
48
50
|
return !!e && e.type === "JSExpression";
|
49
51
|
}
|
50
|
-
function
|
52
|
+
function ee(e) {
|
51
53
|
return typeof e == "object" && !!e && e.type === "JSFunction";
|
52
54
|
}
|
53
|
-
function
|
54
|
-
return !!
|
55
|
+
function ru(e) {
|
56
|
+
return !!nu(e) || !!ee(e);
|
55
57
|
}
|
56
|
-
function
|
57
|
-
return !!e && !
|
58
|
+
function te(e) {
|
59
|
+
return !!e && !nu(e) && typeof e != "string";
|
58
60
|
}
|
59
|
-
function
|
60
|
-
|
61
|
-
|
61
|
+
function Nu(e, u) {
|
62
|
+
return zu(e, {
|
63
|
+
plugins: [() => ({ visitor: u })]
|
64
|
+
})?.code || "";
|
65
|
+
}
|
66
|
+
function g0(e) {
|
67
|
+
const u = D(e), t = cu(u.script), a = {};
|
68
|
+
return u.styles && (a.css = u.styles[0] || ""), su(t, {
|
62
69
|
CallExpression(i) {
|
63
|
-
const
|
64
|
-
if (
|
65
|
-
const
|
66
|
-
|
70
|
+
const c = i.node.callee?.name;
|
71
|
+
if (c) {
|
72
|
+
const s = M(i.node.arguments[0]);
|
73
|
+
s && (a[c] = {
|
67
74
|
type: "JSFunction",
|
68
|
-
value:
|
75
|
+
value: s
|
69
76
|
});
|
70
77
|
}
|
71
78
|
}
|
72
79
|
}), a;
|
73
80
|
}
|
74
|
-
function
|
75
|
-
const a = new RegExp(`${u}`, "g"), i = /(\@|\_|\-|\$|\.|\,|\w|\{\s)$/,
|
76
|
-
return e.replace(a, (d,
|
77
|
-
const
|
78
|
-
return i.test(
|
79
|
-
}).replace(
|
81
|
+
function J(e, u, t) {
|
82
|
+
const a = new RegExp(`${u}`, "g"), i = /(\@|\_|\-|\$|\.|\,|\w|\{\s)$/, c = /^[\w\_\-\@\$]/, s = new RegExp(`^this.${u}$`, "g");
|
83
|
+
return e.replace(a, (d, r, b) => {
|
84
|
+
const f = b.substring(0, r), I = b.substring(r + u.length);
|
85
|
+
return i.test(f) || c.test(I.trim()) ? d : t;
|
86
|
+
}).replace(s, t);
|
80
87
|
}
|
81
|
-
function
|
88
|
+
function gu(e, u, t) {
|
82
89
|
const {
|
83
90
|
context: a = {},
|
84
91
|
computed: i = [],
|
85
|
-
libs:
|
86
|
-
members:
|
87
|
-
platform:
|
92
|
+
libs: c = {},
|
93
|
+
members: s = [],
|
94
|
+
platform: n
|
88
95
|
} = t || {}, d = Array.from(a[u || ""] || /* @__PURE__ */ new Set());
|
89
96
|
if (d)
|
90
|
-
for (const
|
91
|
-
e =
|
92
|
-
for (const
|
93
|
-
e =
|
94
|
-
for (const [
|
95
|
-
e =
|
96
|
-
for (const
|
97
|
-
e =
|
98
|
-
if (
|
99
|
-
const
|
100
|
-
e = e.replace(
|
97
|
+
for (const r of d)
|
98
|
+
e = J(e, r, `this.context.${r}`);
|
99
|
+
for (const r of i)
|
100
|
+
e = J(e, r, `this.${r}.value`);
|
101
|
+
for (const [r, b] of Object.entries(c))
|
102
|
+
e = J(e, r, `this.$libs.${b}.${r}`);
|
103
|
+
for (const r of s)
|
104
|
+
e = J(e, r, `this.${r}`);
|
105
|
+
if (n === "uniapp") {
|
106
|
+
const r = /\buni\./g;
|
107
|
+
e = e.replace(r, "this.$libs.UniH5.uni.");
|
101
108
|
}
|
102
109
|
return e = e.replace(/_ctx\./g, "this."), e;
|
103
110
|
}
|
104
|
-
function
|
111
|
+
function k(e) {
|
105
112
|
return {
|
106
113
|
type: "JSExpression",
|
107
114
|
value: /^\{[\w\W]*\}$/.test(e) ? `(${e})` : e
|
108
115
|
};
|
109
116
|
}
|
110
|
-
function
|
117
|
+
function ou(e) {
|
111
118
|
return {
|
112
119
|
type: "JSFunction",
|
113
120
|
value: e
|
114
121
|
};
|
115
122
|
}
|
116
|
-
const
|
123
|
+
const ae = [
|
117
124
|
"beforeCreate",
|
118
125
|
"created",
|
119
126
|
"beforeMount",
|
@@ -127,42 +134,46 @@ const Gu = [
|
|
127
134
|
"renderTriggered",
|
128
135
|
"activated",
|
129
136
|
"deactivated"
|
130
|
-
],
|
137
|
+
], ie = "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(
|
131
138
|
","
|
132
|
-
),
|
139
|
+
), ce = "component,slot,template".split(","), se = "view,swiper,progress,icon,text,button,checkbox,editor,form,input,label,picker,radio,slider,switch,textarea,audio,camera,image,video,map,canvas".split(
|
133
140
|
","
|
134
141
|
);
|
135
|
-
function
|
136
|
-
return u === "uniapp" &&
|
142
|
+
function ne(e, u = "web") {
|
143
|
+
return u === "uniapp" && se.includes(e);
|
137
144
|
}
|
138
|
-
function
|
139
|
-
return (
|
145
|
+
function ku(e, u = "web") {
|
146
|
+
return (ie.includes(e) || ce.includes(e)) && !ne(e, u) ? e : Zu(e);
|
140
147
|
}
|
141
|
-
function
|
148
|
+
function Vu(e) {
|
142
149
|
return e.replace(/\s+/g, " ").split(";").reduce((t, a) => {
|
143
|
-
const [i,
|
144
|
-
return i &&
|
150
|
+
const [i, c] = a.split(":").map((s) => s.trim());
|
151
|
+
return i && c && (t[i] = c), t;
|
145
152
|
}, {});
|
146
153
|
}
|
147
|
-
function
|
148
|
-
const u = [];
|
149
|
-
return /保持不变/g.test(e) && u.push("部分保持不变的代码需要完整输出"), u;
|
150
|
-
}
|
151
|
-
function Zu(e, u, t) {
|
154
|
+
function re(e, u, t) {
|
152
155
|
if (t === "ObjectExpression")
|
153
156
|
return `(Object.assign({${e.split(" ").map((i) => `'${i}': true`).join(",")}}, ${u}))`;
|
154
157
|
if (t === "ArrayExpression")
|
155
158
|
return `([${e.split(" ").map((i) => `'${i}'`).join(",")}].concat(${u}))`;
|
156
159
|
}
|
157
|
-
|
160
|
+
function oe(e = "") {
|
161
|
+
const t = e.trim().match(/DataSource:\s*([^\n=]+={0,2})/)?.[1] || "";
|
162
|
+
try {
|
163
|
+
return t ? JSON.parse(Ku(t)) : null;
|
164
|
+
} catch (a) {
|
165
|
+
return console.warn("extractDataSource fail", a), null;
|
166
|
+
}
|
167
|
+
}
|
168
|
+
const de = /* @__PURE__ */ new Uint16Array(
|
158
169
|
// prettier-ignore
|
159
170
|
/* @__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))
|
160
|
-
),
|
171
|
+
), fe = /* @__PURE__ */ new Uint16Array(
|
161
172
|
// prettier-ignore
|
162
173
|
/* @__PURE__ */ "Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e) => e.charCodeAt(0))
|
163
174
|
);
|
164
|
-
var
|
165
|
-
const
|
175
|
+
var Y;
|
176
|
+
const le = /* @__PURE__ */ new Map([
|
166
177
|
[0, 65533],
|
167
178
|
// C1 Unicode control character reference replacements
|
168
179
|
[128, 8364],
|
@@ -192,53 +203,53 @@ const u0 = /* @__PURE__ */ new Map([
|
|
192
203
|
[156, 339],
|
193
204
|
[158, 382],
|
194
205
|
[159, 376]
|
195
|
-
]),
|
206
|
+
]), yu = (
|
196
207
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, n/no-unsupported-features/es-builtins
|
197
|
-
(
|
208
|
+
(Y = String.fromCodePoint) !== null && Y !== void 0 ? Y : function(e) {
|
198
209
|
let u = "";
|
199
210
|
return e > 65535 && (e -= 65536, u += String.fromCharCode(e >>> 10 & 1023 | 55296), e = 56320 | e & 1023), u += String.fromCharCode(e), u;
|
200
211
|
}
|
201
212
|
);
|
202
|
-
function
|
213
|
+
function be(e) {
|
203
214
|
var u;
|
204
|
-
return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (u =
|
215
|
+
return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (u = le.get(e)) !== null && u !== void 0 ? u : e;
|
205
216
|
}
|
206
|
-
var
|
217
|
+
var A;
|
207
218
|
(function(e) {
|
208
219
|
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";
|
209
|
-
})(
|
210
|
-
const
|
211
|
-
var
|
220
|
+
})(A || (A = {}));
|
221
|
+
const he = 32;
|
222
|
+
var F;
|
212
223
|
(function(e) {
|
213
224
|
e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
|
214
|
-
})(
|
215
|
-
function
|
216
|
-
return e >=
|
225
|
+
})(F || (F = {}));
|
226
|
+
function tu(e) {
|
227
|
+
return e >= A.ZERO && e <= A.NINE;
|
217
228
|
}
|
218
|
-
function
|
219
|
-
return e >=
|
229
|
+
function pe(e) {
|
230
|
+
return e >= A.UPPER_A && e <= A.UPPER_F || e >= A.LOWER_A && e <= A.LOWER_F;
|
220
231
|
}
|
221
|
-
function
|
222
|
-
return e >=
|
232
|
+
function me(e) {
|
233
|
+
return e >= A.UPPER_A && e <= A.UPPER_Z || e >= A.LOWER_A && e <= A.LOWER_Z || tu(e);
|
223
234
|
}
|
224
|
-
function
|
225
|
-
return e ===
|
235
|
+
function xe(e) {
|
236
|
+
return e === A.EQUALS || me(e);
|
226
237
|
}
|
227
|
-
var
|
238
|
+
var v;
|
228
239
|
(function(e) {
|
229
240
|
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";
|
230
|
-
})(
|
231
|
-
var
|
241
|
+
})(v || (v = {}));
|
242
|
+
var j;
|
232
243
|
(function(e) {
|
233
244
|
e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
|
234
|
-
})(
|
235
|
-
class
|
245
|
+
})(j || (j = {}));
|
246
|
+
class ge {
|
236
247
|
constructor(u, t, a) {
|
237
|
-
this.decodeTree = u, this.emitCodePoint = t, this.errors = a, this.state =
|
248
|
+
this.decodeTree = u, this.emitCodePoint = t, this.errors = a, this.state = v.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = j.Strict;
|
238
249
|
}
|
239
250
|
/** Resets the instance to make it reusable. */
|
240
251
|
startEntity(u) {
|
241
|
-
this.decodeMode = u, this.state =
|
252
|
+
this.decodeMode = u, this.state = v.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
242
253
|
}
|
243
254
|
/**
|
244
255
|
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
@@ -253,15 +264,15 @@ class c0 {
|
|
253
264
|
*/
|
254
265
|
write(u, t) {
|
255
266
|
switch (this.state) {
|
256
|
-
case
|
257
|
-
return u.charCodeAt(t) ===
|
258
|
-
case
|
267
|
+
case v.EntityStart:
|
268
|
+
return u.charCodeAt(t) === A.NUM ? (this.state = v.NumericStart, this.consumed += 1, this.stateNumericStart(u, t + 1)) : (this.state = v.NamedEntity, this.stateNamedEntity(u, t));
|
269
|
+
case v.NumericStart:
|
259
270
|
return this.stateNumericStart(u, t);
|
260
|
-
case
|
271
|
+
case v.NumericDecimal:
|
261
272
|
return this.stateNumericDecimal(u, t);
|
262
|
-
case
|
273
|
+
case v.NumericHex:
|
263
274
|
return this.stateNumericHex(u, t);
|
264
|
-
case
|
275
|
+
case v.NamedEntity:
|
265
276
|
return this.stateNamedEntity(u, t);
|
266
277
|
}
|
267
278
|
}
|
@@ -275,12 +286,12 @@ class c0 {
|
|
275
286
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
276
287
|
*/
|
277
288
|
stateNumericStart(u, t) {
|
278
|
-
return t >= u.length ? -1 : (u.charCodeAt(t) |
|
289
|
+
return t >= u.length ? -1 : (u.charCodeAt(t) | he) === A.LOWER_X ? (this.state = v.NumericHex, this.consumed += 1, this.stateNumericHex(u, t + 1)) : (this.state = v.NumericDecimal, this.stateNumericDecimal(u, t));
|
279
290
|
}
|
280
291
|
addToNumericResult(u, t, a, i) {
|
281
292
|
if (t !== a) {
|
282
|
-
const
|
283
|
-
this.result = this.result * Math.pow(i,
|
293
|
+
const c = a - t;
|
294
|
+
this.result = this.result * Math.pow(i, c) + Number.parseInt(u.substr(t, c), i), this.consumed += c;
|
284
295
|
}
|
285
296
|
}
|
286
297
|
/**
|
@@ -296,7 +307,7 @@ class c0 {
|
|
296
307
|
const a = t;
|
297
308
|
for (; t < u.length; ) {
|
298
309
|
const i = u.charCodeAt(t);
|
299
|
-
if (
|
310
|
+
if (tu(i) || pe(i))
|
300
311
|
t += 1;
|
301
312
|
else
|
302
313
|
return this.addToNumericResult(u, a, t, 16), this.emitNumericEntity(i, 3);
|
@@ -316,7 +327,7 @@ class c0 {
|
|
316
327
|
const a = t;
|
317
328
|
for (; t < u.length; ) {
|
318
329
|
const i = u.charCodeAt(t);
|
319
|
-
if (
|
330
|
+
if (tu(i))
|
320
331
|
t += 1;
|
321
332
|
else
|
322
333
|
return this.addToNumericResult(u, a, t, 10), this.emitNumericEntity(i, 2);
|
@@ -340,11 +351,11 @@ class c0 {
|
|
340
351
|
var a;
|
341
352
|
if (this.consumed <= t)
|
342
353
|
return (a = this.errors) === null || a === void 0 || a.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
343
|
-
if (u ===
|
354
|
+
if (u === A.SEMI)
|
344
355
|
this.consumed += 1;
|
345
|
-
else if (this.decodeMode ===
|
356
|
+
else if (this.decodeMode === j.Strict)
|
346
357
|
return 0;
|
347
|
-
return this.emitCodePoint(
|
358
|
+
return this.emitCodePoint(be(this.result), this.consumed), this.errors && (u !== A.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
348
359
|
}
|
349
360
|
/**
|
350
361
|
* Parses a named entity.
|
@@ -357,18 +368,18 @@ class c0 {
|
|
357
368
|
*/
|
358
369
|
stateNamedEntity(u, t) {
|
359
370
|
const { decodeTree: a } = this;
|
360
|
-
let i = a[this.treeIndex],
|
371
|
+
let i = a[this.treeIndex], c = (i & F.VALUE_LENGTH) >> 14;
|
361
372
|
for (; t < u.length; t++, this.excess++) {
|
362
|
-
const
|
363
|
-
if (this.treeIndex =
|
373
|
+
const s = u.charCodeAt(t);
|
374
|
+
if (this.treeIndex = ye(a, i, this.treeIndex + Math.max(1, c), s), this.treeIndex < 0)
|
364
375
|
return this.result === 0 || // If we are parsing an attribute
|
365
|
-
this.decodeMode ===
|
366
|
-
(
|
367
|
-
|
368
|
-
if (i = a[this.treeIndex],
|
369
|
-
if (
|
370
|
-
return this.emitNamedEntityData(this.treeIndex,
|
371
|
-
this.decodeMode !==
|
376
|
+
this.decodeMode === j.Attribute && // We shouldn't have consumed any characters after the entity,
|
377
|
+
(c === 0 || // And there should be no invalid characters.
|
378
|
+
xe(s)) ? 0 : this.emitNotTerminatedNamedEntity();
|
379
|
+
if (i = a[this.treeIndex], c = (i & F.VALUE_LENGTH) >> 14, c !== 0) {
|
380
|
+
if (s === A.SEMI)
|
381
|
+
return this.emitNamedEntityData(this.treeIndex, c, this.consumed + this.excess);
|
382
|
+
this.decodeMode !== j.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
372
383
|
}
|
373
384
|
}
|
374
385
|
return -1;
|
@@ -380,7 +391,7 @@ class c0 {
|
|
380
391
|
*/
|
381
392
|
emitNotTerminatedNamedEntity() {
|
382
393
|
var u;
|
383
|
-
const { result: t, decodeTree: a } = this, i = (a[t] &
|
394
|
+
const { result: t, decodeTree: a } = this, i = (a[t] & F.VALUE_LENGTH) >> 14;
|
384
395
|
return this.emitNamedEntityData(t, i, this.consumed), (u = this.errors) === null || u === void 0 || u.missingSemicolonAfterCharacterReference(), this.consumed;
|
385
396
|
}
|
386
397
|
/**
|
@@ -394,7 +405,7 @@ class c0 {
|
|
394
405
|
*/
|
395
406
|
emitNamedEntityData(u, t, a) {
|
396
407
|
const { decodeTree: i } = this;
|
397
|
-
return this.emitCodePoint(t === 1 ? i[u] & ~
|
408
|
+
return this.emitCodePoint(t === 1 ? i[u] & ~F.VALUE_LENGTH : i[u + 1], a), t === 3 && this.emitCodePoint(i[u + 2], a), a;
|
398
409
|
}
|
399
410
|
/**
|
400
411
|
* Signal to the parser that the end of the input was reached.
|
@@ -406,62 +417,62 @@ class c0 {
|
|
406
417
|
end() {
|
407
418
|
var u;
|
408
419
|
switch (this.state) {
|
409
|
-
case
|
410
|
-
return this.result !== 0 && (this.decodeMode !==
|
420
|
+
case v.NamedEntity:
|
421
|
+
return this.result !== 0 && (this.decodeMode !== j.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
411
422
|
// Otherwise, emit a numeric entity if we have one.
|
412
|
-
case
|
423
|
+
case v.NumericDecimal:
|
413
424
|
return this.emitNumericEntity(0, 2);
|
414
|
-
case
|
425
|
+
case v.NumericHex:
|
415
426
|
return this.emitNumericEntity(0, 3);
|
416
|
-
case
|
427
|
+
case v.NumericStart:
|
417
428
|
return (u = this.errors) === null || u === void 0 || u.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
418
|
-
case
|
429
|
+
case v.EntityStart:
|
419
430
|
return 0;
|
420
431
|
}
|
421
432
|
}
|
422
433
|
}
|
423
|
-
function
|
424
|
-
const i = (u &
|
434
|
+
function ye(e, u, t, a) {
|
435
|
+
const i = (u & F.BRANCH_LENGTH) >> 7, c = u & F.JUMP_TABLE;
|
425
436
|
if (i === 0)
|
426
|
-
return
|
427
|
-
if (
|
428
|
-
const d = a -
|
437
|
+
return c !== 0 && a === c ? t : -1;
|
438
|
+
if (c) {
|
439
|
+
const d = a - c;
|
429
440
|
return d < 0 || d >= i ? -1 : e[t + d] - 1;
|
430
441
|
}
|
431
|
-
let
|
432
|
-
for (;
|
433
|
-
const d =
|
434
|
-
if (
|
435
|
-
|
436
|
-
else if (
|
437
|
-
|
442
|
+
let s = t, n = s + i - 1;
|
443
|
+
for (; s <= n; ) {
|
444
|
+
const d = s + n >>> 1, r = e[d];
|
445
|
+
if (r < a)
|
446
|
+
s = d + 1;
|
447
|
+
else if (r > a)
|
448
|
+
n = d - 1;
|
438
449
|
else
|
439
450
|
return e[d + i];
|
440
451
|
}
|
441
452
|
return -1;
|
442
453
|
}
|
443
|
-
var
|
454
|
+
var l;
|
444
455
|
(function(e) {
|
445
456
|
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";
|
446
|
-
})(
|
447
|
-
var
|
457
|
+
})(l || (l = {}));
|
458
|
+
var o;
|
448
459
|
(function(e) {
|
449
460
|
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";
|
450
|
-
})(
|
451
|
-
function
|
452
|
-
return e ===
|
461
|
+
})(o || (o = {}));
|
462
|
+
function L(e) {
|
463
|
+
return e === l.Space || e === l.NewLine || e === l.Tab || e === l.FormFeed || e === l.CarriageReturn;
|
453
464
|
}
|
454
|
-
function
|
455
|
-
return e ===
|
465
|
+
function z(e) {
|
466
|
+
return e === l.Slash || e === l.Gt || L(e);
|
456
467
|
}
|
457
|
-
function
|
458
|
-
return e >=
|
468
|
+
function Se(e) {
|
469
|
+
return e >= l.LowerA && e <= l.LowerZ || e >= l.UpperA && e <= l.UpperZ;
|
459
470
|
}
|
460
|
-
var
|
471
|
+
var R;
|
461
472
|
(function(e) {
|
462
473
|
e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double";
|
463
|
-
})(
|
464
|
-
const
|
474
|
+
})(R || (R = {}));
|
475
|
+
const E = {
|
465
476
|
Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
|
466
477
|
// CDATA[
|
467
478
|
CdataEnd: new Uint8Array([93, 93, 62]),
|
@@ -490,12 +501,12 @@ const g = {
|
|
490
501
|
XmpEnd: new Uint8Array([60, 47, 120, 109, 112])
|
491
502
|
// `</xmp`
|
492
503
|
};
|
493
|
-
class
|
504
|
+
class Ie {
|
494
505
|
constructor({ xmlMode: u = !1, decodeEntities: t = !0 }, a) {
|
495
|
-
this.cbs = a, this.state =
|
506
|
+
this.cbs = a, this.state = o.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = o.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 ge(u ? fe : de, (i, c) => this.emitCodePoint(i, c));
|
496
507
|
}
|
497
508
|
reset() {
|
498
|
-
this.state =
|
509
|
+
this.state = o.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = o.Text, this.currentSequence = void 0, this.running = !0, this.offset = 0;
|
499
510
|
}
|
500
511
|
write(u) {
|
501
512
|
this.offset += this.buffer.length, this.buffer = u, this.parse();
|
@@ -510,13 +521,13 @@ class d0 {
|
|
510
521
|
this.running = !0, this.index < this.buffer.length + this.offset && this.parse();
|
511
522
|
}
|
512
523
|
stateText(u) {
|
513
|
-
u ===
|
524
|
+
u === l.Lt || !this.decodeEntities && this.fastForwardTo(l.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = o.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && u === l.Amp && this.startEntity();
|
514
525
|
}
|
515
526
|
stateSpecialStartSequence(u) {
|
516
527
|
const t = this.sequenceIndex === this.currentSequence.length;
|
517
528
|
if (!(t ? (
|
518
529
|
// If we are at the end of the sequence, make sure the tag name has ended
|
519
|
-
|
530
|
+
z(u)
|
520
531
|
) : (
|
521
532
|
// Otherwise, do a case-insensitive comparison
|
522
533
|
(u | 32) === this.currentSequence[this.sequenceIndex]
|
@@ -526,12 +537,12 @@ class d0 {
|
|
526
537
|
this.sequenceIndex++;
|
527
538
|
return;
|
528
539
|
}
|
529
|
-
this.sequenceIndex = 0, this.state =
|
540
|
+
this.sequenceIndex = 0, this.state = o.InTagName, this.stateInTagName(u);
|
530
541
|
}
|
531
542
|
/** Look for an end tag. For <title> tags, also decode entities. */
|
532
543
|
stateInSpecialTag(u) {
|
533
544
|
if (this.sequenceIndex === this.currentSequence.length) {
|
534
|
-
if (u ===
|
545
|
+
if (u === l.Gt || L(u)) {
|
535
546
|
const t = this.index - this.currentSequence.length;
|
536
547
|
if (this.sectionStart < t) {
|
537
548
|
const a = this.index;
|
@@ -542,10 +553,10 @@ class d0 {
|
|
542
553
|
}
|
543
554
|
this.sequenceIndex = 0;
|
544
555
|
}
|
545
|
-
(u | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence ===
|
556
|
+
(u | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === E.TitleEnd ? this.decodeEntities && u === l.Amp && this.startEntity() : this.fastForwardTo(l.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(u === l.Lt);
|
546
557
|
}
|
547
558
|
stateCDATASequence(u) {
|
548
|
-
u ===
|
559
|
+
u === E.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === E.Cdata.length && (this.state = o.InCommentLike, this.currentSequence = E.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = o.InDeclaration, this.stateInDeclaration(u));
|
549
560
|
}
|
550
561
|
/**
|
551
562
|
* When we wait for one specific character, we can speed things up
|
@@ -568,7 +579,7 @@ class d0 {
|
|
568
579
|
* - All characters but the start character of the sequence can be skipped.
|
569
580
|
*/
|
570
581
|
stateInCommentLike(u) {
|
571
|
-
u === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence ===
|
582
|
+
u === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === E.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 = o.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : u !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
|
572
583
|
}
|
573
584
|
/**
|
574
585
|
* HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
|
@@ -577,99 +588,99 @@ class d0 {
|
|
577
588
|
* We allow anything that wouldn't end the tag.
|
578
589
|
*/
|
579
590
|
isTagStartChar(u) {
|
580
|
-
return this.xmlMode ? !
|
591
|
+
return this.xmlMode ? !z(u) : Se(u);
|
581
592
|
}
|
582
593
|
startSpecial(u, t) {
|
583
|
-
this.isSpecial = !0, this.currentSequence = u, this.sequenceIndex = t, this.state =
|
594
|
+
this.isSpecial = !0, this.currentSequence = u, this.sequenceIndex = t, this.state = o.SpecialStartSequence;
|
584
595
|
}
|
585
596
|
stateBeforeTagName(u) {
|
586
|
-
if (u ===
|
587
|
-
this.state =
|
588
|
-
else if (u ===
|
589
|
-
this.state =
|
597
|
+
if (u === l.ExclamationMark)
|
598
|
+
this.state = o.BeforeDeclaration, this.sectionStart = this.index + 1;
|
599
|
+
else if (u === l.Questionmark)
|
600
|
+
this.state = o.InProcessingInstruction, this.sectionStart = this.index + 1;
|
590
601
|
else if (this.isTagStartChar(u)) {
|
591
602
|
const t = u | 32;
|
592
|
-
this.sectionStart = this.index, this.xmlMode ? this.state =
|
593
|
-
} else u ===
|
603
|
+
this.sectionStart = this.index, this.xmlMode ? this.state = o.InTagName : t === E.ScriptEnd[2] ? this.state = o.BeforeSpecialS : t === E.TitleEnd[2] || t === E.XmpEnd[2] ? this.state = o.BeforeSpecialT : this.state = o.InTagName;
|
604
|
+
} else u === l.Slash ? this.state = o.BeforeClosingTagName : (this.state = o.Text, this.stateText(u));
|
594
605
|
}
|
595
606
|
stateInTagName(u) {
|
596
|
-
|
607
|
+
z(u) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = o.BeforeAttributeName, this.stateBeforeAttributeName(u));
|
597
608
|
}
|
598
609
|
stateBeforeClosingTagName(u) {
|
599
|
-
|
610
|
+
L(u) || (u === l.Gt ? this.state = o.Text : (this.state = this.isTagStartChar(u) ? o.InClosingTagName : o.InSpecialComment, this.sectionStart = this.index));
|
600
611
|
}
|
601
612
|
stateInClosingTagName(u) {
|
602
|
-
(u ===
|
613
|
+
(u === l.Gt || L(u)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = o.AfterClosingTagName, this.stateAfterClosingTagName(u));
|
603
614
|
}
|
604
615
|
stateAfterClosingTagName(u) {
|
605
|
-
(u ===
|
616
|
+
(u === l.Gt || this.fastForwardTo(l.Gt)) && (this.state = o.Text, this.sectionStart = this.index + 1);
|
606
617
|
}
|
607
618
|
stateBeforeAttributeName(u) {
|
608
|
-
u ===
|
619
|
+
u === l.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = o.InSpecialTag, this.sequenceIndex = 0) : this.state = o.Text, this.sectionStart = this.index + 1) : u === l.Slash ? this.state = o.InSelfClosingTag : L(u) || (this.state = o.InAttributeName, this.sectionStart = this.index);
|
609
620
|
}
|
610
621
|
stateInSelfClosingTag(u) {
|
611
|
-
u ===
|
622
|
+
u === l.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = o.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : L(u) || (this.state = o.BeforeAttributeName, this.stateBeforeAttributeName(u));
|
612
623
|
}
|
613
624
|
stateInAttributeName(u) {
|
614
|
-
(u ===
|
625
|
+
(u === l.Eq || z(u)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = o.AfterAttributeName, this.stateAfterAttributeName(u));
|
615
626
|
}
|
616
627
|
stateAfterAttributeName(u) {
|
617
|
-
u ===
|
628
|
+
u === l.Eq ? this.state = o.BeforeAttributeValue : u === l.Slash || u === l.Gt ? (this.cbs.onattribend(R.NoValue, this.sectionStart), this.sectionStart = -1, this.state = o.BeforeAttributeName, this.stateBeforeAttributeName(u)) : L(u) || (this.cbs.onattribend(R.NoValue, this.sectionStart), this.state = o.InAttributeName, this.sectionStart = this.index);
|
618
629
|
}
|
619
630
|
stateBeforeAttributeValue(u) {
|
620
|
-
u ===
|
631
|
+
u === l.DoubleQuote ? (this.state = o.InAttributeValueDq, this.sectionStart = this.index + 1) : u === l.SingleQuote ? (this.state = o.InAttributeValueSq, this.sectionStart = this.index + 1) : L(u) || (this.sectionStart = this.index, this.state = o.InAttributeValueNq, this.stateInAttributeValueNoQuotes(u));
|
621
632
|
}
|
622
633
|
handleInAttributeValue(u, t) {
|
623
|
-
u === t || !this.decodeEntities && this.fastForwardTo(t) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(t ===
|
634
|
+
u === t || !this.decodeEntities && this.fastForwardTo(t) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(t === l.DoubleQuote ? R.Double : R.Single, this.index + 1), this.state = o.BeforeAttributeName) : this.decodeEntities && u === l.Amp && this.startEntity();
|
624
635
|
}
|
625
636
|
stateInAttributeValueDoubleQuotes(u) {
|
626
|
-
this.handleInAttributeValue(u,
|
637
|
+
this.handleInAttributeValue(u, l.DoubleQuote);
|
627
638
|
}
|
628
639
|
stateInAttributeValueSingleQuotes(u) {
|
629
|
-
this.handleInAttributeValue(u,
|
640
|
+
this.handleInAttributeValue(u, l.SingleQuote);
|
630
641
|
}
|
631
642
|
stateInAttributeValueNoQuotes(u) {
|
632
|
-
|
643
|
+
L(u) || u === l.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(R.Unquoted, this.index), this.state = o.BeforeAttributeName, this.stateBeforeAttributeName(u)) : this.decodeEntities && u === l.Amp && this.startEntity();
|
633
644
|
}
|
634
645
|
stateBeforeDeclaration(u) {
|
635
|
-
u ===
|
646
|
+
u === l.OpeningSquareBracket ? (this.state = o.CDATASequence, this.sequenceIndex = 0) : this.state = u === l.Dash ? o.BeforeComment : o.InDeclaration;
|
636
647
|
}
|
637
648
|
stateInDeclaration(u) {
|
638
|
-
(u ===
|
649
|
+
(u === l.Gt || this.fastForwardTo(l.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = o.Text, this.sectionStart = this.index + 1);
|
639
650
|
}
|
640
651
|
stateInProcessingInstruction(u) {
|
641
|
-
(u ===
|
652
|
+
(u === l.Gt || this.fastForwardTo(l.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = o.Text, this.sectionStart = this.index + 1);
|
642
653
|
}
|
643
654
|
stateBeforeComment(u) {
|
644
|
-
u ===
|
655
|
+
u === l.Dash ? (this.state = o.InCommentLike, this.currentSequence = E.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = o.InDeclaration;
|
645
656
|
}
|
646
657
|
stateInSpecialComment(u) {
|
647
|
-
(u ===
|
658
|
+
(u === l.Gt || this.fastForwardTo(l.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = o.Text, this.sectionStart = this.index + 1);
|
648
659
|
}
|
649
660
|
stateBeforeSpecialS(u) {
|
650
661
|
const t = u | 32;
|
651
|
-
t ===
|
662
|
+
t === E.ScriptEnd[3] ? this.startSpecial(E.ScriptEnd, 4) : t === E.StyleEnd[3] ? this.startSpecial(E.StyleEnd, 4) : (this.state = o.InTagName, this.stateInTagName(u));
|
652
663
|
}
|
653
664
|
stateBeforeSpecialT(u) {
|
654
665
|
switch (u | 32) {
|
655
|
-
case
|
656
|
-
this.startSpecial(
|
666
|
+
case E.TitleEnd[3]: {
|
667
|
+
this.startSpecial(E.TitleEnd, 4);
|
657
668
|
break;
|
658
669
|
}
|
659
|
-
case
|
660
|
-
this.startSpecial(
|
670
|
+
case E.TextareaEnd[3]: {
|
671
|
+
this.startSpecial(E.TextareaEnd, 4);
|
661
672
|
break;
|
662
673
|
}
|
663
|
-
case
|
664
|
-
this.startSpecial(
|
674
|
+
case E.XmpEnd[3]: {
|
675
|
+
this.startSpecial(E.XmpEnd, 4);
|
665
676
|
break;
|
666
677
|
}
|
667
678
|
default:
|
668
|
-
this.state =
|
679
|
+
this.state = o.InTagName, this.stateInTagName(u);
|
669
680
|
}
|
670
681
|
}
|
671
682
|
startEntity() {
|
672
|
-
this.baseState = this.state, this.state =
|
683
|
+
this.baseState = this.state, this.state = o.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? j.Strict : this.baseState === o.Text || this.baseState === o.InSpecialTag ? j.Legacy : j.Attribute);
|
673
684
|
}
|
674
685
|
stateInEntity() {
|
675
686
|
const u = this.entityDecoder.write(this.buffer, this.index - this.offset);
|
@@ -679,7 +690,7 @@ class d0 {
|
|
679
690
|
* Remove data that has already been consumed from the buffer.
|
680
691
|
*/
|
681
692
|
cleanup() {
|
682
|
-
this.running && this.sectionStart !== this.index && (this.state ===
|
693
|
+
this.running && this.sectionStart !== this.index && (this.state === o.Text || this.state === o.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === o.InAttributeValueDq || this.state === o.InAttributeValueSq || this.state === o.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
|
683
694
|
}
|
684
695
|
shouldContinue() {
|
685
696
|
return this.index < this.buffer.length + this.offset && this.running;
|
@@ -693,107 +704,107 @@ class d0 {
|
|
693
704
|
for (; this.shouldContinue(); ) {
|
694
705
|
const u = this.buffer.charCodeAt(this.index - this.offset);
|
695
706
|
switch (this.state) {
|
696
|
-
case
|
707
|
+
case o.Text: {
|
697
708
|
this.stateText(u);
|
698
709
|
break;
|
699
710
|
}
|
700
|
-
case
|
711
|
+
case o.SpecialStartSequence: {
|
701
712
|
this.stateSpecialStartSequence(u);
|
702
713
|
break;
|
703
714
|
}
|
704
|
-
case
|
715
|
+
case o.InSpecialTag: {
|
705
716
|
this.stateInSpecialTag(u);
|
706
717
|
break;
|
707
718
|
}
|
708
|
-
case
|
719
|
+
case o.CDATASequence: {
|
709
720
|
this.stateCDATASequence(u);
|
710
721
|
break;
|
711
722
|
}
|
712
|
-
case
|
723
|
+
case o.InAttributeValueDq: {
|
713
724
|
this.stateInAttributeValueDoubleQuotes(u);
|
714
725
|
break;
|
715
726
|
}
|
716
|
-
case
|
727
|
+
case o.InAttributeName: {
|
717
728
|
this.stateInAttributeName(u);
|
718
729
|
break;
|
719
730
|
}
|
720
|
-
case
|
731
|
+
case o.InCommentLike: {
|
721
732
|
this.stateInCommentLike(u);
|
722
733
|
break;
|
723
734
|
}
|
724
|
-
case
|
735
|
+
case o.InSpecialComment: {
|
725
736
|
this.stateInSpecialComment(u);
|
726
737
|
break;
|
727
738
|
}
|
728
|
-
case
|
739
|
+
case o.BeforeAttributeName: {
|
729
740
|
this.stateBeforeAttributeName(u);
|
730
741
|
break;
|
731
742
|
}
|
732
|
-
case
|
743
|
+
case o.InTagName: {
|
733
744
|
this.stateInTagName(u);
|
734
745
|
break;
|
735
746
|
}
|
736
|
-
case
|
747
|
+
case o.InClosingTagName: {
|
737
748
|
this.stateInClosingTagName(u);
|
738
749
|
break;
|
739
750
|
}
|
740
|
-
case
|
751
|
+
case o.BeforeTagName: {
|
741
752
|
this.stateBeforeTagName(u);
|
742
753
|
break;
|
743
754
|
}
|
744
|
-
case
|
755
|
+
case o.AfterAttributeName: {
|
745
756
|
this.stateAfterAttributeName(u);
|
746
757
|
break;
|
747
758
|
}
|
748
|
-
case
|
759
|
+
case o.InAttributeValueSq: {
|
749
760
|
this.stateInAttributeValueSingleQuotes(u);
|
750
761
|
break;
|
751
762
|
}
|
752
|
-
case
|
763
|
+
case o.BeforeAttributeValue: {
|
753
764
|
this.stateBeforeAttributeValue(u);
|
754
765
|
break;
|
755
766
|
}
|
756
|
-
case
|
767
|
+
case o.BeforeClosingTagName: {
|
757
768
|
this.stateBeforeClosingTagName(u);
|
758
769
|
break;
|
759
770
|
}
|
760
|
-
case
|
771
|
+
case o.AfterClosingTagName: {
|
761
772
|
this.stateAfterClosingTagName(u);
|
762
773
|
break;
|
763
774
|
}
|
764
|
-
case
|
775
|
+
case o.BeforeSpecialS: {
|
765
776
|
this.stateBeforeSpecialS(u);
|
766
777
|
break;
|
767
778
|
}
|
768
|
-
case
|
779
|
+
case o.BeforeSpecialT: {
|
769
780
|
this.stateBeforeSpecialT(u);
|
770
781
|
break;
|
771
782
|
}
|
772
|
-
case
|
783
|
+
case o.InAttributeValueNq: {
|
773
784
|
this.stateInAttributeValueNoQuotes(u);
|
774
785
|
break;
|
775
786
|
}
|
776
|
-
case
|
787
|
+
case o.InSelfClosingTag: {
|
777
788
|
this.stateInSelfClosingTag(u);
|
778
789
|
break;
|
779
790
|
}
|
780
|
-
case
|
791
|
+
case o.InDeclaration: {
|
781
792
|
this.stateInDeclaration(u);
|
782
793
|
break;
|
783
794
|
}
|
784
|
-
case
|
795
|
+
case o.BeforeDeclaration: {
|
785
796
|
this.stateBeforeDeclaration(u);
|
786
797
|
break;
|
787
798
|
}
|
788
|
-
case
|
799
|
+
case o.BeforeComment: {
|
789
800
|
this.stateBeforeComment(u);
|
790
801
|
break;
|
791
802
|
}
|
792
|
-
case
|
803
|
+
case o.InProcessingInstruction: {
|
793
804
|
this.stateInProcessingInstruction(u);
|
794
805
|
break;
|
795
806
|
}
|
796
|
-
case
|
807
|
+
case o.InEntity: {
|
797
808
|
this.stateInEntity();
|
798
809
|
break;
|
799
810
|
}
|
@@ -803,18 +814,18 @@ class d0 {
|
|
803
814
|
this.cleanup();
|
804
815
|
}
|
805
816
|
finish() {
|
806
|
-
this.state ===
|
817
|
+
this.state === o.InEntity && (this.entityDecoder.end(), this.state = this.baseState), this.handleTrailingData(), this.cbs.onend();
|
807
818
|
}
|
808
819
|
/** Handle any trailing data. */
|
809
820
|
handleTrailingData() {
|
810
821
|
const u = this.buffer.length + this.offset;
|
811
|
-
this.sectionStart >= u || (this.state ===
|
822
|
+
this.sectionStart >= u || (this.state === o.InCommentLike ? this.currentSequence === E.CdataEnd ? this.cbs.oncdata(this.sectionStart, u, 0) : this.cbs.oncomment(this.sectionStart, u, 0) : this.state === o.InTagName || this.state === o.BeforeAttributeName || this.state === o.BeforeAttributeValue || this.state === o.AfterAttributeName || this.state === o.InAttributeName || this.state === o.InAttributeValueSq || this.state === o.InAttributeValueDq || this.state === o.InAttributeValueNq || this.state === o.InClosingTagName || this.cbs.ontext(this.sectionStart, u));
|
812
823
|
}
|
813
824
|
emitCodePoint(u, t) {
|
814
|
-
this.baseState !==
|
825
|
+
this.baseState !== o.Text && this.baseState !== o.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));
|
815
826
|
}
|
816
827
|
}
|
817
|
-
const
|
828
|
+
const $ = /* @__PURE__ */ new Set([
|
818
829
|
"input",
|
819
830
|
"option",
|
820
831
|
"optgroup",
|
@@ -822,55 +833,55 @@ const k = /* @__PURE__ */ new Set([
|
|
822
833
|
"button",
|
823
834
|
"datalist",
|
824
835
|
"textarea"
|
825
|
-
]),
|
836
|
+
]), S = /* @__PURE__ */ new Set(["p"]), Su = /* @__PURE__ */ new Set(["thead", "tbody"]), Iu = /* @__PURE__ */ new Set(["dd", "dt"]), wu = /* @__PURE__ */ new Set(["rt", "rp"]), we = /* @__PURE__ */ new Map([
|
826
837
|
["tr", /* @__PURE__ */ new Set(["tr", "th", "td"])],
|
827
838
|
["th", /* @__PURE__ */ new Set(["th"])],
|
828
839
|
["td", /* @__PURE__ */ new Set(["thead", "th", "td"])],
|
829
840
|
["body", /* @__PURE__ */ new Set(["head", "link", "script"])],
|
830
841
|
["li", /* @__PURE__ */ new Set(["li"])],
|
831
|
-
["p",
|
832
|
-
["h1",
|
833
|
-
["h2",
|
834
|
-
["h3",
|
835
|
-
["h4",
|
836
|
-
["h5",
|
837
|
-
["h6",
|
838
|
-
["select",
|
839
|
-
["input",
|
840
|
-
["output",
|
841
|
-
["button",
|
842
|
-
["datalist",
|
843
|
-
["textarea",
|
842
|
+
["p", S],
|
843
|
+
["h1", S],
|
844
|
+
["h2", S],
|
845
|
+
["h3", S],
|
846
|
+
["h4", S],
|
847
|
+
["h5", S],
|
848
|
+
["h6", S],
|
849
|
+
["select", $],
|
850
|
+
["input", $],
|
851
|
+
["output", $],
|
852
|
+
["button", $],
|
853
|
+
["datalist", $],
|
854
|
+
["textarea", $],
|
844
855
|
["option", /* @__PURE__ */ new Set(["option"])],
|
845
856
|
["optgroup", /* @__PURE__ */ new Set(["optgroup", "option"])],
|
846
|
-
["dd",
|
847
|
-
["dt",
|
848
|
-
["address",
|
849
|
-
["article",
|
850
|
-
["aside",
|
851
|
-
["blockquote",
|
852
|
-
["details",
|
853
|
-
["div",
|
854
|
-
["dl",
|
855
|
-
["fieldset",
|
856
|
-
["figcaption",
|
857
|
-
["figure",
|
858
|
-
["footer",
|
859
|
-
["form",
|
860
|
-
["header",
|
861
|
-
["hr",
|
862
|
-
["main",
|
863
|
-
["nav",
|
864
|
-
["ol",
|
865
|
-
["pre",
|
866
|
-
["section",
|
867
|
-
["table",
|
868
|
-
["ul",
|
869
|
-
["rt",
|
870
|
-
["rp",
|
871
|
-
["tbody",
|
872
|
-
["tfoot",
|
873
|
-
]),
|
857
|
+
["dd", Iu],
|
858
|
+
["dt", Iu],
|
859
|
+
["address", S],
|
860
|
+
["article", S],
|
861
|
+
["aside", S],
|
862
|
+
["blockquote", S],
|
863
|
+
["details", S],
|
864
|
+
["div", S],
|
865
|
+
["dl", S],
|
866
|
+
["fieldset", S],
|
867
|
+
["figcaption", S],
|
868
|
+
["figure", S],
|
869
|
+
["footer", S],
|
870
|
+
["form", S],
|
871
|
+
["header", S],
|
872
|
+
["hr", S],
|
873
|
+
["main", S],
|
874
|
+
["nav", S],
|
875
|
+
["ol", S],
|
876
|
+
["pre", S],
|
877
|
+
["section", S],
|
878
|
+
["table", S],
|
879
|
+
["ul", S],
|
880
|
+
["rt", wu],
|
881
|
+
["rp", wu],
|
882
|
+
["tbody", Su],
|
883
|
+
["tfoot", Su]
|
884
|
+
]), Ee = /* @__PURE__ */ new Set([
|
874
885
|
"area",
|
875
886
|
"base",
|
876
887
|
"basefont",
|
@@ -890,7 +901,7 @@ const k = /* @__PURE__ */ new Set([
|
|
890
901
|
"source",
|
891
902
|
"track",
|
892
903
|
"wbr"
|
893
|
-
]),
|
904
|
+
]), Eu = /* @__PURE__ */ new Set(["math", "svg"]), vu = /* @__PURE__ */ new Set([
|
894
905
|
"mi",
|
895
906
|
"mo",
|
896
907
|
"mn",
|
@@ -900,30 +911,30 @@ const k = /* @__PURE__ */ new Set([
|
|
900
911
|
"foreignobject",
|
901
912
|
"desc",
|
902
913
|
"title"
|
903
|
-
]),
|
904
|
-
class
|
914
|
+
]), ve = /\s|\//;
|
915
|
+
class Ae {
|
905
916
|
constructor(u, t = {}) {
|
906
|
-
var a, i,
|
907
|
-
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 = (
|
917
|
+
var a, i, c, s, n, d;
|
918
|
+
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 = (c = t.recognizeSelfClosing) !== null && c !== void 0 ? c : !this.htmlMode, this.tokenizer = new ((s = t.Tokenizer) !== null && s !== void 0 ? s : Ie)(this.options, this), this.foreignContext = [!this.htmlMode], (d = (n = this.cbs).onparserinit) === null || d === void 0 || d.call(n, this);
|
908
919
|
}
|
909
920
|
// Tokenizer event handlers
|
910
921
|
/** @internal */
|
911
922
|
ontext(u, t) {
|
912
923
|
var a, i;
|
913
|
-
const
|
914
|
-
this.endIndex = t - 1, (i = (a = this.cbs).ontext) === null || i === void 0 || i.call(a,
|
924
|
+
const c = this.getSlice(u, t);
|
925
|
+
this.endIndex = t - 1, (i = (a = this.cbs).ontext) === null || i === void 0 || i.call(a, c), this.startIndex = t;
|
915
926
|
}
|
916
927
|
/** @internal */
|
917
928
|
ontextentity(u, t) {
|
918
929
|
var a, i;
|
919
|
-
this.endIndex = t - 1, (i = (a = this.cbs).ontext) === null || i === void 0 || i.call(a,
|
930
|
+
this.endIndex = t - 1, (i = (a = this.cbs).ontext) === null || i === void 0 || i.call(a, yu(u)), this.startIndex = t;
|
920
931
|
}
|
921
932
|
/**
|
922
933
|
* Checks if the current tag is a void element. Override this if you want
|
923
934
|
* to specify your own additional void elements.
|
924
935
|
*/
|
925
936
|
isVoidElement(u) {
|
926
|
-
return this.htmlMode &&
|
937
|
+
return this.htmlMode && Ee.has(u);
|
927
938
|
}
|
928
939
|
/** @internal */
|
929
940
|
onopentagname(u, t) {
|
@@ -932,15 +943,15 @@ class l0 {
|
|
932
943
|
this.lowerCaseTagNames && (a = a.toLowerCase()), this.emitOpenTag(a);
|
933
944
|
}
|
934
945
|
emitOpenTag(u) {
|
935
|
-
var t, a, i,
|
946
|
+
var t, a, i, c;
|
936
947
|
this.openTagStart = this.startIndex, this.tagname = u;
|
937
|
-
const
|
938
|
-
if (
|
939
|
-
for (; this.stack.length > 0 &&
|
940
|
-
const
|
941
|
-
(a = (t = this.cbs).onclosetag) === null || a === void 0 || a.call(t,
|
948
|
+
const s = this.htmlMode && we.get(u);
|
949
|
+
if (s)
|
950
|
+
for (; this.stack.length > 0 && s.has(this.stack[0]); ) {
|
951
|
+
const n = this.stack.shift();
|
952
|
+
(a = (t = this.cbs).onclosetag) === null || a === void 0 || a.call(t, n, !0);
|
942
953
|
}
|
943
|
-
this.isVoidElement(u) || (this.stack.unshift(u), this.htmlMode && (
|
954
|
+
this.isVoidElement(u) || (this.stack.unshift(u), this.htmlMode && (Eu.has(u) ? this.foreignContext.unshift(!0) : vu.has(u) && this.foreignContext.unshift(!1))), (c = (i = this.cbs).onopentagname) === null || c === void 0 || c.call(i, u), this.cbs.onopentag && (this.attribs = {});
|
944
955
|
}
|
945
956
|
endOpenTag(u) {
|
946
957
|
var t, a;
|
@@ -952,19 +963,19 @@ class l0 {
|
|
952
963
|
}
|
953
964
|
/** @internal */
|
954
965
|
onclosetag(u, t) {
|
955
|
-
var a, i,
|
966
|
+
var a, i, c, s, n, d, r, b;
|
956
967
|
this.endIndex = t;
|
957
|
-
let
|
958
|
-
if (this.lowerCaseTagNames && (
|
959
|
-
this.htmlMode &&
|
968
|
+
let f = this.getSlice(u, t);
|
969
|
+
if (this.lowerCaseTagNames && (f = f.toLowerCase()), this.htmlMode && (Eu.has(f) || vu.has(f)) && this.foreignContext.shift(), this.isVoidElement(f))
|
970
|
+
this.htmlMode && f === "br" && ((s = (c = this.cbs).onopentagname) === null || s === void 0 || s.call(c, "br"), (d = (n = this.cbs).onopentag) === null || d === void 0 || d.call(n, "br", {}, !0), (b = (r = this.cbs).onclosetag) === null || b === void 0 || b.call(r, "br", !1));
|
960
971
|
else {
|
961
|
-
const
|
962
|
-
if (
|
963
|
-
for (let
|
964
|
-
const
|
965
|
-
(i = (a = this.cbs).onclosetag) === null || i === void 0 || i.call(a,
|
972
|
+
const I = this.stack.indexOf(f);
|
973
|
+
if (I !== -1)
|
974
|
+
for (let x = 0; x <= I; x++) {
|
975
|
+
const N = this.stack.shift();
|
976
|
+
(i = (a = this.cbs).onclosetag) === null || i === void 0 || i.call(a, N, x !== I);
|
966
977
|
}
|
967
|
-
else this.htmlMode &&
|
978
|
+
else this.htmlMode && f === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(!0));
|
968
979
|
}
|
969
980
|
this.startIndex = t + 1;
|
970
981
|
}
|
@@ -989,15 +1000,15 @@ class l0 {
|
|
989
1000
|
}
|
990
1001
|
/** @internal */
|
991
1002
|
onattribentity(u) {
|
992
|
-
this.attribvalue +=
|
1003
|
+
this.attribvalue += yu(u);
|
993
1004
|
}
|
994
1005
|
/** @internal */
|
995
1006
|
onattribend(u, t) {
|
996
1007
|
var a, i;
|
997
|
-
this.endIndex = t, (i = (a = this.cbs).onattribute) === null || i === void 0 || i.call(a, this.attribname, this.attribvalue, u ===
|
1008
|
+
this.endIndex = t, (i = (a = this.cbs).onattribute) === null || i === void 0 || i.call(a, this.attribname, this.attribvalue, u === R.Double ? '"' : u === R.Single ? "'" : u === R.NoValue ? void 0 : null), this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname) && (this.attribs[this.attribname] = this.attribvalue), this.attribvalue = "";
|
998
1009
|
}
|
999
1010
|
getInstructionName(u) {
|
1000
|
-
const t = u.search(
|
1011
|
+
const t = u.search(ve);
|
1001
1012
|
let a = t < 0 ? u : u.substr(0, t);
|
1002
1013
|
return this.lowerCaseTagNames && (a = a.toLowerCase()), a;
|
1003
1014
|
}
|
@@ -1023,15 +1034,15 @@ class l0 {
|
|
1023
1034
|
}
|
1024
1035
|
/** @internal */
|
1025
1036
|
oncomment(u, t, a) {
|
1026
|
-
var i,
|
1027
|
-
this.endIndex = t, (
|
1037
|
+
var i, c, s, n;
|
1038
|
+
this.endIndex = t, (c = (i = this.cbs).oncomment) === null || c === void 0 || c.call(i, this.getSlice(u, t - a)), (n = (s = this.cbs).oncommentend) === null || n === void 0 || n.call(s), this.startIndex = t + 1;
|
1028
1039
|
}
|
1029
1040
|
/** @internal */
|
1030
1041
|
oncdata(u, t, a) {
|
1031
|
-
var i,
|
1042
|
+
var i, c, s, n, d, r, b, f, I, x;
|
1032
1043
|
this.endIndex = t;
|
1033
|
-
const
|
1034
|
-
!this.htmlMode || this.options.recognizeCDATA ? ((
|
1044
|
+
const N = this.getSlice(u, t - a);
|
1045
|
+
!this.htmlMode || this.options.recognizeCDATA ? ((c = (i = this.cbs).oncdatastart) === null || c === void 0 || c.call(i), (n = (s = this.cbs).ontext) === null || n === void 0 || n.call(s, N), (r = (d = this.cbs).oncdataend) === null || r === void 0 || r.call(d)) : ((f = (b = this.cbs).oncomment) === null || f === void 0 || f.call(b, `[CDATA[${N}]]`), (x = (I = this.cbs).oncommentend) === null || x === void 0 || x.call(I)), this.startIndex = t + 1;
|
1035
1046
|
}
|
1036
1047
|
/** @internal */
|
1037
1048
|
onend() {
|
@@ -1129,134 +1140,134 @@ class l0 {
|
|
1129
1140
|
this.end(u);
|
1130
1141
|
}
|
1131
1142
|
}
|
1132
|
-
function
|
1143
|
+
function Au(e, u = "web") {
|
1133
1144
|
const t = { name: "", children: [] }, a = [t];
|
1134
1145
|
let i = "";
|
1135
|
-
const
|
1146
|
+
const c = new Ae(
|
1136
1147
|
{
|
1137
|
-
onopentag: (
|
1138
|
-
const
|
1139
|
-
i.trim() && (Array.isArray(
|
1148
|
+
onopentag: (s, n, d) => {
|
1149
|
+
const r = a[a.length - 1];
|
1150
|
+
i.trim() && (Array.isArray(r.children) ? r.children.push({
|
1140
1151
|
name: "span",
|
1141
1152
|
children: i.trim()
|
1142
|
-
}) :
|
1143
|
-
const
|
1144
|
-
(
|
1145
|
-
let [
|
1146
|
-
return
|
1153
|
+
}) : r.children = i.trim(), i = "");
|
1154
|
+
const b = Object.entries(n || {}).reduce(
|
1155
|
+
(I, x) => {
|
1156
|
+
let [N = "", V = ""] = x;
|
1157
|
+
return N && (I[N] = V), I;
|
1147
1158
|
},
|
1148
1159
|
{}
|
1149
1160
|
);
|
1150
|
-
|
1151
|
-
const
|
1152
|
-
name:
|
1153
|
-
props:
|
1161
|
+
b.style && (b.style = Vu(b.style));
|
1162
|
+
const f = {
|
1163
|
+
name: ku(s, u),
|
1164
|
+
props: b
|
1154
1165
|
};
|
1155
|
-
Array.isArray(
|
1166
|
+
Array.isArray(r.children) ? r.children.push(f) : r.children ? r.children = [
|
1156
1167
|
{
|
1157
1168
|
name: "span",
|
1158
|
-
children:
|
1169
|
+
children: r.children
|
1159
1170
|
},
|
1160
|
-
|
1161
|
-
] :
|
1171
|
+
f
|
1172
|
+
] : r.children = [f], d || a.push(f);
|
1162
1173
|
},
|
1163
|
-
ontext: (
|
1164
|
-
const
|
1165
|
-
|
1174
|
+
ontext: (s) => {
|
1175
|
+
const n = s.trim();
|
1176
|
+
n && n !== '"' && (i += n);
|
1166
1177
|
},
|
1167
1178
|
onclosetag: () => {
|
1168
|
-
const
|
1169
|
-
i.trim() && (Array.isArray(
|
1179
|
+
const s = a.pop();
|
1180
|
+
i.trim() && (Array.isArray(s?.children) ? s.children.push({
|
1170
1181
|
name: "span",
|
1171
1182
|
children: i.trim()
|
1172
|
-
}) :
|
1183
|
+
}) : s && (s.children = i.trim()), i = "");
|
1173
1184
|
}
|
1174
1185
|
},
|
1175
1186
|
{ decodeEntities: !0 }
|
1176
1187
|
);
|
1177
|
-
return
|
1188
|
+
return c.write(e.replace(/\\"/g, '"')), c.end(), t.children || [];
|
1178
1189
|
}
|
1179
|
-
function
|
1190
|
+
function Te(e, u) {
|
1180
1191
|
const a = {
|
1181
|
-
imports:
|
1192
|
+
imports: Ne(e),
|
1182
1193
|
emits: [],
|
1183
1194
|
errors: []
|
1184
|
-
}, i =
|
1185
|
-
return
|
1186
|
-
ExportDefaultDeclaration(
|
1187
|
-
const
|
1188
|
-
if (
|
1189
|
-
const
|
1190
|
-
if (
|
1191
|
-
const d =
|
1192
|
-
(
|
1193
|
-
),
|
1194
|
-
(
|
1195
|
-
),
|
1196
|
-
(
|
1195
|
+
}, i = cu(e);
|
1196
|
+
return su(i, {
|
1197
|
+
ExportDefaultDeclaration(c) {
|
1198
|
+
const s = c.node.declaration;
|
1199
|
+
if (s.type !== "CallExpression") return;
|
1200
|
+
const n = s.arguments[0];
|
1201
|
+
if (n?.type !== "ObjectExpression") return;
|
1202
|
+
const d = n.properties.filter(
|
1203
|
+
(f) => f.type === "ObjectProperty"
|
1204
|
+
), r = n.properties.filter(
|
1205
|
+
(f) => f.type == "ObjectMethod"
|
1206
|
+
), b = d.find(
|
1207
|
+
(f) => f.key.name === "computed"
|
1197
1208
|
);
|
1198
|
-
|
1199
|
-
for (const
|
1200
|
-
switch (
|
1209
|
+
b && (a.computed = qu(b.value), a.watchers = Le(b.value));
|
1210
|
+
for (const f of d)
|
1211
|
+
switch (f.key.name) {
|
1201
1212
|
case "name":
|
1202
|
-
a.name =
|
1213
|
+
a.name = f.value.value;
|
1203
1214
|
break;
|
1204
1215
|
case "methods":
|
1205
|
-
a.handlers =
|
1206
|
-
|
1216
|
+
a.handlers = Re(f.value), a.methods = je(f.value), a.dataSources = qe(
|
1217
|
+
f.value,
|
1207
1218
|
u
|
1208
1219
|
);
|
1209
1220
|
break;
|
1210
1221
|
case "watch":
|
1211
|
-
a.watch =
|
1212
|
-
|
1222
|
+
a.watch = De(
|
1223
|
+
f.value,
|
1213
1224
|
a.watchers
|
1214
1225
|
);
|
1215
1226
|
break;
|
1216
1227
|
case "props":
|
1217
|
-
a.props =
|
1228
|
+
a.props = Ce(f.value);
|
1218
1229
|
break;
|
1219
1230
|
case "inject":
|
1220
|
-
a.inject =
|
1231
|
+
a.inject = Me(f.value);
|
1221
1232
|
break;
|
1222
1233
|
}
|
1223
|
-
for (const
|
1224
|
-
switch (
|
1234
|
+
for (const f of r)
|
1235
|
+
switch (f.key.name) {
|
1225
1236
|
case "setup":
|
1226
|
-
a.state =
|
1237
|
+
a.state = Ve(f.body);
|
1227
1238
|
break;
|
1228
1239
|
}
|
1229
|
-
a.lifeCycles =
|
1240
|
+
a.lifeCycles = _e(r);
|
1230
1241
|
},
|
1231
|
-
CallExpression(
|
1232
|
-
const
|
1233
|
-
if (
|
1234
|
-
for (let
|
1235
|
-
a.emits?.find((
|
1242
|
+
CallExpression(c) {
|
1243
|
+
const s = Fe(c.node);
|
1244
|
+
if (s.length)
|
1245
|
+
for (let n of s)
|
1246
|
+
a.emits?.find((r) => r.name === n.name) || a.emits?.push(n);
|
1236
1247
|
}
|
1237
1248
|
}), a;
|
1238
1249
|
}
|
1239
|
-
function
|
1250
|
+
function Ne(e) {
|
1240
1251
|
const u = /import\s+{(.+?)}\s+from\s+['"](.+?)['"]/g, t = /import\s+(.+?)\s+from\s+['"](.+?)['"]/g, a = /^{(.+?)}$/, i = [];
|
1241
|
-
let
|
1242
|
-
const
|
1243
|
-
for (; (
|
1244
|
-
const
|
1252
|
+
let c;
|
1253
|
+
const s = e.replace(/\n/g, " ");
|
1254
|
+
for (; (c = u.exec(s)) !== null; ) {
|
1255
|
+
const n = c[2] === "@element-plus/icons-vue" ? "@vtj/icons" : c[2];
|
1245
1256
|
i.push({
|
1246
|
-
from:
|
1247
|
-
imports:
|
1257
|
+
from: n,
|
1258
|
+
imports: c[1].split(",").map((d) => d.trim())
|
1248
1259
|
});
|
1249
1260
|
}
|
1250
|
-
for (; (
|
1251
|
-
const
|
1252
|
-
|
1261
|
+
for (; (c = t.exec(s)) !== null; ) {
|
1262
|
+
const n = c[1], d = c[2];
|
1263
|
+
n && !a.test(n) && i.push({
|
1253
1264
|
from: d,
|
1254
|
-
imports:
|
1265
|
+
imports: n
|
1255
1266
|
});
|
1256
1267
|
}
|
1257
1268
|
return i;
|
1258
1269
|
}
|
1259
|
-
function
|
1270
|
+
function ke(e) {
|
1260
1271
|
for (const u of e.body)
|
1261
1272
|
if (u.type === "VariableDeclaration" && u.kind == "const") {
|
1262
1273
|
const { id: t, init: a } = u.declarations[0];
|
@@ -1265,88 +1276,114 @@ function m0(e) {
|
|
1265
1276
|
}
|
1266
1277
|
return null;
|
1267
1278
|
}
|
1268
|
-
function
|
1269
|
-
const u =
|
1279
|
+
function Ve(e) {
|
1280
|
+
const u = ke(e);
|
1270
1281
|
if (!u) return {};
|
1271
1282
|
const t = {};
|
1272
1283
|
for (const a of u.properties) {
|
1273
|
-
const { key: i, value:
|
1284
|
+
const { key: i, value: c } = a;
|
1274
1285
|
if (i.type === "Identifier") {
|
1275
|
-
const
|
1276
|
-
t[i.name] =
|
1286
|
+
const s = M(c);
|
1287
|
+
t[i.name] = k(s);
|
1277
1288
|
}
|
1278
1289
|
}
|
1279
1290
|
return t;
|
1280
1291
|
}
|
1281
|
-
function
|
1282
|
-
const { key: u, async: t, params: a, body: i } = e,
|
1292
|
+
function O(e) {
|
1293
|
+
const { key: u, async: t, params: a, body: i } = e, c = a?.map((s) => s.type === "ObjectPattern" ? `{${s.properties.map((d) => d.key?.name || d.name).join(",")}}` : s.name).join(", ");
|
1283
1294
|
if (u.type === "Identifier") {
|
1284
|
-
const
|
1285
|
-
let
|
1286
|
-
i && (
|
1295
|
+
const s = u.name;
|
1296
|
+
let n = "{}";
|
1297
|
+
i && (n = M(i) || "{}");
|
1287
1298
|
const d = e.value;
|
1288
1299
|
if (d && d.type === "CallExpression") {
|
1289
|
-
let x =
|
1290
|
-
x = x.replace("function () {", "() => {"),
|
1300
|
+
let x = M(d) || "";
|
1301
|
+
x = x.replace("function () {", "() => {"), n = `{ return (${x})}`;
|
1291
1302
|
}
|
1292
|
-
const
|
1303
|
+
const b = `${t ? "async " : ""}(${c}) => ${n}`, f = s.startsWith("watcher_");
|
1293
1304
|
return {
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1305
|
+
id: f ? s.replace("watcher_", "") : "",
|
1306
|
+
name: s,
|
1307
|
+
watcher: f,
|
1308
|
+
exp: ou(b)
|
1297
1309
|
};
|
1298
1310
|
}
|
1299
1311
|
}
|
1300
|
-
function
|
1312
|
+
function qu(e) {
|
1301
1313
|
if (!e) return {};
|
1302
1314
|
const u = {};
|
1303
1315
|
for (const t of e.properties) {
|
1304
|
-
const a =
|
1305
|
-
a && !a.watcher && !a.exp.value.includes("provider.
|
1316
|
+
const a = O(t);
|
1317
|
+
a && !a.watcher && !a.exp.value.includes("this.provider.createMock") && !a.exp.value.includes("this.provider.createMock") && (u[a.name] = a.exp);
|
1306
1318
|
}
|
1307
1319
|
return u;
|
1308
1320
|
}
|
1309
|
-
function
|
1321
|
+
function qe(e, u) {
|
1310
1322
|
if (!e) return {};
|
1311
1323
|
const t = {}, a = /apis\[\'([\w]*)\'\]/, i = /\.then\(([\w\W]*)\)/;
|
1312
|
-
for (const
|
1313
|
-
const c =
|
1314
|
-
if (
|
1315
|
-
const
|
1316
|
-
if (!d) continue;
|
1317
|
-
const f = q0(u, d);
|
1324
|
+
for (const c of e.properties) {
|
1325
|
+
const s = O(c), n = c.body.body?.[0], d = (n?.leadingComments?.[0].value || "").trim(), r = oe(d);
|
1326
|
+
if (s && s.exp.value.includes("this.provider.apis")) {
|
1327
|
+
const f = (s.exp.value.match(a) || [])[1];
|
1318
1328
|
if (!f) continue;
|
1319
|
-
const
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1329
|
+
const I = Oe(u, f);
|
1330
|
+
if (!I) continue;
|
1331
|
+
const x = s.exp.value.match(i)?.[1];
|
1332
|
+
t[s.name] = {
|
1333
|
+
ref: f,
|
1334
|
+
name: I.name,
|
1335
|
+
test: r?.test || {
|
1324
1336
|
type: "JSFunction",
|
1325
1337
|
value: `() => this.runApi({
|
1326
1338
|
/* 在这里可输入接口参数 */
|
1327
1339
|
})`
|
1328
1340
|
},
|
1329
1341
|
type: "api",
|
1330
|
-
label:
|
1342
|
+
label: I.label,
|
1331
1343
|
transform: {
|
1332
1344
|
type: "JSFunction",
|
1333
|
-
value:
|
1345
|
+
value: x || `(res) => {
|
1346
|
+
return res;
|
1347
|
+
}`
|
1348
|
+
},
|
1349
|
+
mockTemplate: I.mockTemplate
|
1350
|
+
};
|
1351
|
+
}
|
1352
|
+
if (s && s.exp.value.includes("this.provider.createMock")) {
|
1353
|
+
const b = n?.declarations?.[0]?.init?.arguments?.[0], f = s.exp.value.match(i)?.[1];
|
1354
|
+
t[s.name] = {
|
1355
|
+
ref: "",
|
1356
|
+
name: s.name,
|
1357
|
+
test: r?.test || {
|
1358
|
+
type: "JSFunction",
|
1359
|
+
value: `() => this.runApi({
|
1360
|
+
/* 在这里可输入接口参数 */
|
1361
|
+
})`
|
1362
|
+
},
|
1363
|
+
type: "mock",
|
1364
|
+
label: r?.label || "",
|
1365
|
+
transform: r?.transform || {
|
1366
|
+
type: "JSFunction",
|
1367
|
+
value: f || `(res) => {
|
1334
1368
|
return res;
|
1335
1369
|
}`
|
1336
1370
|
},
|
1337
|
-
mockTemplate:
|
1371
|
+
mockTemplate: r?.mockTemplate || {
|
1372
|
+
type: "JSFunction",
|
1373
|
+
value: b ? M(b) : ""
|
1374
|
+
}
|
1338
1375
|
};
|
1339
1376
|
}
|
1340
1377
|
}
|
1341
1378
|
return t;
|
1342
1379
|
}
|
1343
|
-
function
|
1344
|
-
const u =
|
1380
|
+
function je(e) {
|
1381
|
+
const u = qu(e), t = /\_([\w]{5,})$/, a = {};
|
1345
1382
|
for (const i of Object.keys(u))
|
1346
1383
|
t.test(i) || (a[i] = u[i]);
|
1347
1384
|
return a;
|
1348
1385
|
}
|
1349
|
-
function
|
1386
|
+
function Re(e) {
|
1350
1387
|
if (!e) return {};
|
1351
1388
|
const u = {}, t = /\_([\w]{5,})$/;
|
1352
1389
|
for (const a of e.properties) {
|
@@ -1354,122 +1391,123 @@ function E0(e) {
|
|
1354
1391
|
if (t.test(i))
|
1355
1392
|
try {
|
1356
1393
|
if (a.body.body[0]?.argument) {
|
1357
|
-
const
|
1394
|
+
const c = M(
|
1358
1395
|
a.body.body[0].argument.callee.object
|
1359
1396
|
);
|
1360
|
-
u[i] =
|
1397
|
+
u[i] = ou(c);
|
1361
1398
|
} else
|
1362
|
-
u[i] =
|
1363
|
-
} catch (
|
1364
|
-
console.warn(
|
1399
|
+
u[i] = O(a)?.exp;
|
1400
|
+
} catch (c) {
|
1401
|
+
console.warn(c);
|
1365
1402
|
}
|
1366
1403
|
}
|
1367
1404
|
return u;
|
1368
1405
|
}
|
1369
|
-
function
|
1406
|
+
function Le(e) {
|
1370
1407
|
if (!e) return {};
|
1371
1408
|
const u = {};
|
1372
1409
|
for (const t of e.properties) {
|
1373
|
-
const a =
|
1410
|
+
const a = O(t);
|
1374
1411
|
a && a.watcher && (u[a.name] = a.exp);
|
1375
1412
|
}
|
1376
1413
|
return u;
|
1377
1414
|
}
|
1378
|
-
function
|
1379
|
-
return !!
|
1415
|
+
function W(e, u) {
|
1416
|
+
return !!ju(e, u);
|
1380
1417
|
}
|
1381
|
-
function
|
1418
|
+
function ju(e, u) {
|
1382
1419
|
return e.find(
|
1383
1420
|
(a) => a.key?.name === u
|
1384
1421
|
)?.value?.value;
|
1385
1422
|
}
|
1386
|
-
function
|
1423
|
+
function Tu(e, u) {
|
1387
1424
|
const t = e.find(
|
1388
1425
|
(a) => a.key?.name === u
|
1389
1426
|
);
|
1390
1427
|
if (t)
|
1391
|
-
return
|
1428
|
+
return O(t)?.exp;
|
1392
1429
|
}
|
1393
|
-
function
|
1430
|
+
function De(e, u = {}) {
|
1394
1431
|
const t = [];
|
1395
1432
|
for (const a of e.properties) {
|
1396
|
-
const { key: i, value:
|
1397
|
-
if (u[
|
1398
|
-
const
|
1433
|
+
const { key: i, value: c } = a, s = i.value || i.name || "";
|
1434
|
+
if (u[s]) {
|
1435
|
+
const n = c.properties;
|
1399
1436
|
t.push({
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1437
|
+
id: s.replace("watcher_", ""),
|
1438
|
+
source: u[s],
|
1439
|
+
deep: W(n, "deep"),
|
1440
|
+
immediate: W(n, "immediate"),
|
1441
|
+
handler: Tu(n, "handler")
|
1404
1442
|
});
|
1405
1443
|
} else if (a.type === "ObjectMethod" && t.push({
|
1406
|
-
|
1444
|
+
id: eu(),
|
1407
1445
|
source: {
|
1408
1446
|
type: "JSFunction",
|
1409
|
-
value: `this.${
|
1447
|
+
value: `() => { return this.${s}; }`
|
1410
1448
|
},
|
1411
1449
|
deep: !1,
|
1412
1450
|
immediate: !1,
|
1413
|
-
handler:
|
1451
|
+
handler: O(a)?.exp
|
1414
1452
|
}), a.type === "ObjectProperty") {
|
1415
|
-
const
|
1453
|
+
const n = c.properties;
|
1416
1454
|
t.push({
|
1417
|
-
|
1455
|
+
id: eu(),
|
1418
1456
|
source: {
|
1419
1457
|
type: "JSFunction",
|
1420
|
-
value: `this.${
|
1458
|
+
value: `() => { return this.${s}; }`
|
1421
1459
|
},
|
1422
|
-
deep:
|
1423
|
-
immediate:
|
1424
|
-
handler:
|
1460
|
+
deep: W(n, "deep"),
|
1461
|
+
immediate: W(n, "immediate"),
|
1462
|
+
handler: Tu(n, "handler")
|
1425
1463
|
});
|
1426
1464
|
}
|
1427
1465
|
}
|
1428
1466
|
return t;
|
1429
1467
|
}
|
1430
|
-
function
|
1468
|
+
function _e(e) {
|
1431
1469
|
const u = {};
|
1432
1470
|
for (const t of e) {
|
1433
1471
|
const a = t.key.name;
|
1434
|
-
if (
|
1435
|
-
const i =
|
1472
|
+
if (ae.includes(a)) {
|
1473
|
+
const i = O(t);
|
1436
1474
|
i && (u[i.name] = i.exp);
|
1437
1475
|
}
|
1438
1476
|
}
|
1439
1477
|
return u;
|
1440
1478
|
}
|
1441
|
-
function
|
1479
|
+
function Be(e) {
|
1442
1480
|
const u = e.find(
|
1443
1481
|
(t) => t.key?.name === "type"
|
1444
1482
|
);
|
1445
1483
|
if (u)
|
1446
1484
|
return u.value.type === "ArrayExpression" ? u.value.elements.map((t) => t.name) : u.value.name;
|
1447
1485
|
}
|
1448
|
-
function
|
1486
|
+
function Ru(e) {
|
1449
1487
|
const u = e.find(
|
1450
1488
|
(t) => t.key?.name === "default"
|
1451
1489
|
);
|
1452
1490
|
if (u)
|
1453
|
-
return
|
1491
|
+
return k(M(u.value));
|
1454
1492
|
}
|
1455
|
-
function
|
1493
|
+
function Ce(e) {
|
1456
1494
|
if (!e) return [];
|
1457
1495
|
let u = [];
|
1458
1496
|
return e.type === "ArrayExpression" ? u = e.elements.map((t) => t.value) : e.type === "ObjectExpression" && (u = e.properties.map((t) => {
|
1459
|
-
const { key: a, value: i } = t,
|
1497
|
+
const { key: a, value: i } = t, c = i.properties || [];
|
1460
1498
|
return {
|
1461
1499
|
name: a.name,
|
1462
|
-
required:
|
1463
|
-
type:
|
1464
|
-
default:
|
1500
|
+
required: W(c, "required"),
|
1501
|
+
type: Be(c),
|
1502
|
+
default: Ru(c)
|
1465
1503
|
};
|
1466
1504
|
})), u;
|
1467
1505
|
}
|
1468
|
-
function
|
1506
|
+
function Fe(e) {
|
1469
1507
|
const u = [];
|
1470
1508
|
if (e.callee.type === "MemberExpression" && e.callee.property?.name === "$emit") {
|
1471
1509
|
const [a, ...i] = (e.arguments || []).map(
|
1472
|
-
(
|
1510
|
+
(c) => c.value || c.name
|
1473
1511
|
);
|
1474
1512
|
a && u.push({
|
1475
1513
|
name: a,
|
@@ -1478,163 +1516,163 @@ function I0(e) {
|
|
1478
1516
|
}
|
1479
1517
|
return u;
|
1480
1518
|
}
|
1481
|
-
function
|
1519
|
+
function Me(e) {
|
1482
1520
|
let u = [];
|
1483
1521
|
return e.type === "ObjectExpression" && (u = e.properties.map((t) => {
|
1484
|
-
const { key: a, value: i } = t,
|
1522
|
+
const { key: a, value: i } = t, c = i.properties, s = a.name, n = ju(c, "from"), d = Ru(c);
|
1485
1523
|
return {
|
1486
|
-
name:
|
1487
|
-
from:
|
1524
|
+
name: s,
|
1525
|
+
from: n || s,
|
1488
1526
|
default: d
|
1489
1527
|
};
|
1490
1528
|
})), u;
|
1491
1529
|
}
|
1492
|
-
function
|
1530
|
+
function Oe(e, u) {
|
1493
1531
|
return (e.apis || []).find((t) => t.id === u);
|
1494
1532
|
}
|
1495
|
-
let
|
1496
|
-
function
|
1497
|
-
return
|
1498
|
-
nodes: (
|
1533
|
+
let au = [], X = {}, Lu = {}, Du = {}, Q = "web", _u = [];
|
1534
|
+
function Pe(e, u, t = "", a) {
|
1535
|
+
return au = [], X = {}, Lu = a?.handlers || {}, Du = a?.styles || {}, Q = a?.platform || "web", _u = a?.imports || [], {
|
1536
|
+
nodes: (Ju({
|
1499
1537
|
id: e,
|
1500
1538
|
filename: u,
|
1501
1539
|
source: t,
|
1502
1540
|
isProd: !0,
|
1503
1541
|
slotted: !0
|
1504
|
-
}).ast?.children || []).map((
|
1505
|
-
slots:
|
1506
|
-
context:
|
1542
|
+
}).ast?.children || []).map((n) => U(n)).filter((n) => !!n),
|
1543
|
+
slots: au,
|
1544
|
+
context: X
|
1507
1545
|
};
|
1508
1546
|
}
|
1509
|
-
function
|
1547
|
+
function $e(e) {
|
1510
1548
|
if (e.name === "slot") {
|
1511
1549
|
let u = "default";
|
1512
1550
|
const t = [];
|
1513
1551
|
for (const [a, i] of Object.entries(e.props || {}))
|
1514
1552
|
a === "name" ? u = i : t.push(a);
|
1515
|
-
|
1553
|
+
au.push({
|
1516
1554
|
name: u,
|
1517
1555
|
params: t
|
1518
1556
|
});
|
1519
1557
|
}
|
1520
1558
|
}
|
1521
|
-
function
|
1559
|
+
function Ue(e) {
|
1522
1560
|
const u = {};
|
1523
1561
|
for (const t of e) {
|
1524
|
-
if (t.type ===
|
1562
|
+
if (t.type === h.ATTRIBUTE)
|
1525
1563
|
if (t.name === "class") {
|
1526
|
-
const a = t.value?.content || "", i = /[\w]+_[\w]{5,}/,
|
1527
|
-
|
1564
|
+
const a = t.value?.content || "", i = /[\w]+_[\w]{5,}/, c = a.match(i)?.[0] || "", s = a.split(" ").filter((d) => d !== c), n = Du[`.${c}`];
|
1565
|
+
n && (u.style = n), s.length && (u.class = s.join(" "));
|
1528
1566
|
} else if (t.name === "style") {
|
1529
1567
|
const a = t.value?.content || "";
|
1530
|
-
a && (u.style =
|
1568
|
+
a && (u.style = Vu(a));
|
1531
1569
|
} else
|
1532
1570
|
u[t.name] = t.value?.content || "";
|
1533
|
-
if (t.type ===
|
1571
|
+
if (t.type === h.DIRECTIVE && t.name === "bind" && (t.exp?.type === h.SIMPLE_EXPRESSION && t.arg?.type === h.SIMPLE_EXPRESSION && (u[t.arg.content] = k(`(${t.exp.content})`)), t.exp?.type === h.COMPOUND_EXPRESSION && t.arg?.type === h.SIMPLE_EXPRESSION))
|
1534
1572
|
if (t.arg.content === "class" && u.class) {
|
1535
|
-
const a = t.exp.ast.type, i =
|
1573
|
+
const a = t.exp.ast.type, i = re(
|
1536
1574
|
u.class,
|
1537
1575
|
t.exp.loc.source,
|
1538
1576
|
a
|
1539
1577
|
);
|
1540
|
-
i && (u[t.arg.content] =
|
1578
|
+
i && (u[t.arg.content] = k(i));
|
1541
1579
|
} else
|
1542
|
-
u[t.arg.content] =
|
1580
|
+
u[t.arg.content] = k(
|
1543
1581
|
`(${t.exp.loc.source})`
|
1544
1582
|
);
|
1545
1583
|
}
|
1546
1584
|
return u;
|
1547
1585
|
}
|
1548
|
-
function
|
1586
|
+
function He(e, u = {}) {
|
1549
1587
|
const t = {};
|
1550
1588
|
for (const a of e)
|
1551
|
-
if (a.type ===
|
1589
|
+
if (a.type === h.DIRECTIVE && a.name === "on" && a.arg?.type === h.SIMPLE_EXPRESSION) {
|
1552
1590
|
const i = a.modifiers.reduce(
|
1553
|
-
(
|
1591
|
+
(b, f) => (b[f.content] = !0, b),
|
1554
1592
|
{}
|
1555
1593
|
);
|
1556
|
-
let
|
1557
|
-
/\)$/.test(
|
1558
|
-
const
|
1559
|
-
if (d &&
|
1594
|
+
let c = a.exp?.loc.source || "";
|
1595
|
+
/\)$/.test(c) && (c = `($event) => { ${c} } `);
|
1596
|
+
const n = new RegExp(`${a.arg.content}_[\\w]{5,}`), d = c.match(n)?.[0] || "", r = u[d];
|
1597
|
+
if (d && r)
|
1560
1598
|
t[a.arg.content] = {
|
1561
1599
|
name: a.arg.content,
|
1562
|
-
handler:
|
1600
|
+
handler: r,
|
1563
1601
|
modifiers: i
|
1564
1602
|
};
|
1565
1603
|
else {
|
1566
|
-
const
|
1604
|
+
const b = a.exp?.ast?.type === "AssignmentExpression";
|
1567
1605
|
t[a.arg.content] = {
|
1568
1606
|
name: a.arg.content,
|
1569
|
-
handler:
|
1607
|
+
handler: ou(b ? `()=> {${c}}` : `(${c})`),
|
1570
1608
|
modifiers: i
|
1571
1609
|
};
|
1572
1610
|
}
|
1573
1611
|
}
|
1574
1612
|
return t;
|
1575
1613
|
}
|
1576
|
-
function
|
1614
|
+
function du(e, u) {
|
1577
1615
|
const t = [];
|
1578
|
-
if (u && (e.type ===
|
1616
|
+
if (u && (e.type === h.IF_BRANCH || e.type === h.IF) && u.forEach((a, i) => {
|
1579
1617
|
if (e === a) {
|
1580
|
-
const
|
1618
|
+
const c = i === 0 ? "vIf" : a.condition ? "vElseIf" : "vElse", s = a.condition?.loc.source || "";
|
1581
1619
|
t.push({
|
1582
|
-
name:
|
1583
|
-
value:
|
1620
|
+
name: c,
|
1621
|
+
value: c === "vElse" ? !0 : k(s)
|
1584
1622
|
});
|
1585
1623
|
}
|
1586
|
-
}), e.type ===
|
1624
|
+
}), e.type === h.FOR && t.push({
|
1587
1625
|
name: "vFor",
|
1588
|
-
value:
|
1626
|
+
value: k(e.source.loc.source),
|
1589
1627
|
iterator: {
|
1590
1628
|
item: e.valueAlias?.loc.source || "item",
|
1591
1629
|
index: e.keyAlias?.loc.source || "index"
|
1592
1630
|
}
|
1593
|
-
}), e.type ===
|
1631
|
+
}), e.type === h.ELEMENT) {
|
1594
1632
|
const a = e.props.filter(
|
1595
|
-
(d) => d.type ===
|
1633
|
+
(d) => d.type === h.DIRECTIVE
|
1596
1634
|
), i = a.filter((d) => d.name === "model");
|
1597
1635
|
i.length && i.forEach((d) => {
|
1598
1636
|
t.push({
|
1599
1637
|
name: "vModel",
|
1600
1638
|
arg: d.arg?.content,
|
1601
|
-
value:
|
1639
|
+
value: k(d.exp?.loc.source || "")
|
1602
1640
|
});
|
1603
1641
|
});
|
1604
|
-
const
|
1605
|
-
|
1642
|
+
const c = a.find((d) => d.name === "show");
|
1643
|
+
c && t.push({
|
1606
1644
|
name: "vShow",
|
1607
|
-
value:
|
1645
|
+
value: k(c.exp?.loc.source || "")
|
1608
1646
|
});
|
1609
|
-
const
|
1610
|
-
|
1647
|
+
const s = a.find((d) => d.name === "bind" && !d.arg);
|
1648
|
+
s && t.push({
|
1611
1649
|
name: "vBind",
|
1612
|
-
value:
|
1650
|
+
value: k(s.exp?.loc.source || "")
|
1613
1651
|
});
|
1614
|
-
const
|
1615
|
-
|
1652
|
+
const n = a.find((d) => d.name === "html");
|
1653
|
+
n && t.push({
|
1616
1654
|
name: "vHtml",
|
1617
|
-
value:
|
1655
|
+
value: k(n.exp?.loc.source || "")
|
1618
1656
|
});
|
1619
1657
|
}
|
1620
1658
|
return t;
|
1621
1659
|
}
|
1622
|
-
function
|
1660
|
+
function Bu(e) {
|
1623
1661
|
let u = "";
|
1624
|
-
const { name: t, props: a, events: i = {} } = e,
|
1625
|
-
if (typeof
|
1626
|
-
const
|
1627
|
-
|
1662
|
+
const { name: t, props: a, events: i = {} } = e, c = a?.class || "";
|
1663
|
+
if (typeof c == "string") {
|
1664
|
+
const s = new RegExp(`${t}_([\\w]+)`), n = c.match(s);
|
1665
|
+
n && n[1] && (u = n[1]);
|
1628
1666
|
}
|
1629
|
-
for (const { name:
|
1630
|
-
const d = new RegExp(`${
|
1631
|
-
|
1667
|
+
for (const { name: s, handler: n } of Object.values(i)) {
|
1668
|
+
const d = new RegExp(`${s}_([\\w]+)`), r = n.value.match(d);
|
1669
|
+
r && r[1] && (u = r[1]);
|
1632
1670
|
}
|
1633
|
-
return u ||
|
1671
|
+
return u || eu();
|
1634
1672
|
}
|
1635
|
-
function
|
1673
|
+
function Ge(e) {
|
1636
1674
|
const u = /\.\/(.+?)\.vue/;
|
1637
|
-
for (const { from: t, imports: a } of
|
1675
|
+
for (const { from: t, imports: a } of _u) {
|
1638
1676
|
if (Array.isArray(a) && a.includes(e))
|
1639
1677
|
return t;
|
1640
1678
|
if (a === e) {
|
@@ -1647,140 +1685,140 @@ function B0(e) {
|
|
1647
1685
|
}
|
1648
1686
|
}
|
1649
1687
|
}
|
1650
|
-
function
|
1651
|
-
const t = new Set(u?.id ?
|
1688
|
+
function iu(e, u) {
|
1689
|
+
const t = new Set(u?.id ? X[u.id] : []), a = (e.directives || []).find((s) => s.name === "vFor");
|
1652
1690
|
let i = new Set(Array.from(t));
|
1653
1691
|
if (a) {
|
1654
|
-
const { item:
|
1655
|
-
i = /* @__PURE__ */ new Set([
|
1692
|
+
const { item: s = "item", index: n = "index" } = a.iterator || {};
|
1693
|
+
i = /* @__PURE__ */ new Set([s, n, ...Array.from(i)]);
|
1656
1694
|
}
|
1657
|
-
const
|
1658
|
-
if (
|
1659
|
-
const
|
1660
|
-
i = /* @__PURE__ */ new Set([...
|
1695
|
+
const c = e.slot;
|
1696
|
+
if (c) {
|
1697
|
+
const s = typeof c == "string" ? [] : c.params || [], n = s.length ? s : [`scope_${u?.id}`];
|
1698
|
+
i = /* @__PURE__ */ new Set([...n, ...Array.from(i)]);
|
1661
1699
|
}
|
1662
|
-
|
1700
|
+
X[e.id] = i;
|
1663
1701
|
}
|
1664
|
-
function
|
1702
|
+
function uu(e, u, t, a) {
|
1665
1703
|
const i = {
|
1666
|
-
name:
|
1667
|
-
from:
|
1668
|
-
props:
|
1669
|
-
events:
|
1670
|
-
directives:
|
1704
|
+
name: ku(e.tag, Q),
|
1705
|
+
from: Ge(e.tag),
|
1706
|
+
props: Ue(e.props),
|
1707
|
+
events: He(e.props, Lu),
|
1708
|
+
directives: du(t || e, a)
|
1671
1709
|
};
|
1672
|
-
i.id =
|
1673
|
-
const
|
1674
|
-
return
|
1675
|
-
}
|
1676
|
-
function
|
1677
|
-
return e.map((t) =>
|
1678
|
-
}
|
1679
|
-
function
|
1680
|
-
if (e.type ===
|
1681
|
-
return
|
1682
|
-
if (e.type ===
|
1683
|
-
return
|
1684
|
-
if (t && e.type ===
|
1685
|
-
const a = e.children.find((i) => i.type ===
|
1686
|
-
if (a && a.type ===
|
1687
|
-
return
|
1688
|
-
}
|
1689
|
-
if (e.type ===
|
1710
|
+
i.id = Bu(i), iu(i, u);
|
1711
|
+
const c = fu(i, e.children);
|
1712
|
+
return iu(i, u), $e(c), c;
|
1713
|
+
}
|
1714
|
+
function We(e, u) {
|
1715
|
+
return e.map((t) => U(t, u, e));
|
1716
|
+
}
|
1717
|
+
function U(e, u, t) {
|
1718
|
+
if (e.type === h.ELEMENT)
|
1719
|
+
return uu(e, u);
|
1720
|
+
if (e.type === h.IF)
|
1721
|
+
return ze(e);
|
1722
|
+
if (t && e.type === h.IF_BRANCH) {
|
1723
|
+
const a = e.children.find((i) => i.type === h.ELEMENT);
|
1724
|
+
if (a && a.type === h.ELEMENT)
|
1725
|
+
return uu(a, u, e, t);
|
1726
|
+
}
|
1727
|
+
if (e.type === h.FOR) {
|
1690
1728
|
const a = e.children[0];
|
1691
|
-
if (e.children.length > 1 || a.type !==
|
1692
|
-
const
|
1693
|
-
return
|
1729
|
+
if (e.children.length > 1 || a.type !== h.ELEMENT) {
|
1730
|
+
const c = { name: "span", directives: du(e) };
|
1731
|
+
return fu(c, e.children);
|
1694
1732
|
} else
|
1695
|
-
return
|
1733
|
+
return uu(a, u, e);
|
1696
1734
|
}
|
1697
|
-
if (e.type ===
|
1698
|
-
return e.content.type ==
|
1699
|
-
if (e.type ===
|
1735
|
+
if (e.type === h.TEXT_CALL)
|
1736
|
+
return e.content.type == h.TEXT ? e.content.content : e.content.type === h.INTERPOLATION ? k(e.content.content.loc.source) : "";
|
1737
|
+
if (e.type === h.TEXT)
|
1700
1738
|
return e.content;
|
1701
|
-
if (e.type ===
|
1702
|
-
return
|
1703
|
-
if (e.type ===
|
1704
|
-
return
|
1739
|
+
if (e.type === h.INTERPOLATION && (e.content.type === h.SIMPLE_EXPRESSION || e.content.type === h.COMPOUND_EXPRESSION))
|
1740
|
+
return k(e.content.loc.source);
|
1741
|
+
if (e.type === h.COMPOUND_EXPRESSION)
|
1742
|
+
return Je(
|
1705
1743
|
e.children
|
1706
1744
|
);
|
1707
|
-
e.type !==
|
1745
|
+
e.type !== h.COMMENT && console.warn("未处理", e.type);
|
1708
1746
|
}
|
1709
|
-
function
|
1747
|
+
function Je(e = []) {
|
1710
1748
|
const u = e.filter((a) => typeof a != "string"), t = [];
|
1711
1749
|
for (const a of u)
|
1712
1750
|
t.push({
|
1713
1751
|
name: "span",
|
1714
|
-
children: a.type ===
|
1752
|
+
children: a.type === h.TEXT ? a.loc.source : k(a.content?.loc.source)
|
1715
1753
|
});
|
1716
1754
|
return {
|
1717
1755
|
name: "span",
|
1718
1756
|
children: t
|
1719
1757
|
};
|
1720
1758
|
}
|
1721
|
-
function
|
1759
|
+
function fu(e, u = []) {
|
1722
1760
|
const t = [];
|
1723
1761
|
for (const a of u)
|
1724
|
-
if (a.type ===
|
1762
|
+
if (a.type === h.ELEMENT && a.codegenNode?.value?.arguments) {
|
1725
1763
|
const i = a.codegenNode.value.arguments[0];
|
1726
1764
|
if (i) {
|
1727
|
-
const
|
1728
|
-
t.push(...
|
1765
|
+
const c = Au(i, Q);
|
1766
|
+
t.push(...c);
|
1729
1767
|
}
|
1730
|
-
} else if (a.type ===
|
1731
|
-
const i = a.props.find((
|
1732
|
-
for (const
|
1733
|
-
const
|
1768
|
+
} else if (a.type === h.ELEMENT && a.tag === "template") {
|
1769
|
+
const i = a.props.find((c) => c.name === "slot");
|
1770
|
+
for (const c of a.children) {
|
1771
|
+
const s = c.type === h.TEXT || c.type === h.TEXT_CALL ? {
|
1734
1772
|
name: "span",
|
1735
|
-
children:
|
1736
|
-
} :
|
1737
|
-
|
1738
|
-
|
1773
|
+
children: U(c, e)
|
1774
|
+
} : U(c, e);
|
1775
|
+
s && (Array.isArray(s) ? s : [s]).forEach((d) => {
|
1776
|
+
te(d) && i?.type === h.DIRECTIVE && (d.id = Bu(d), d.slot = {
|
1739
1777
|
name: i.arg?.content || "default",
|
1740
1778
|
params: i.exp?.identifiers || []
|
1741
|
-
},
|
1779
|
+
}, iu(d, e)), t.push(d);
|
1742
1780
|
});
|
1743
1781
|
}
|
1744
|
-
} else if (a.type ===
|
1782
|
+
} else if (a.type === h.JS_CALL_EXPRESSION) {
|
1745
1783
|
const i = a.arguments?.[0];
|
1746
1784
|
if (i) {
|
1747
|
-
const
|
1748
|
-
t.push(...
|
1785
|
+
const c = Au(i, Q);
|
1786
|
+
t.push(...c);
|
1749
1787
|
}
|
1750
|
-
} else if (a.type ===
|
1751
|
-
const i =
|
1788
|
+
} else if (a.type === h.TEXT_CALL) {
|
1789
|
+
const i = U(a, e);
|
1752
1790
|
i && (Array.isArray(i) ? t.push(...i) : t.push(i));
|
1753
1791
|
} else {
|
1754
|
-
const i =
|
1792
|
+
const i = U(a, e);
|
1755
1793
|
i && (Array.isArray(i) ? t.push(...i) : t.push(i));
|
1756
1794
|
}
|
1757
1795
|
if (t.length === 1) {
|
1758
1796
|
const a = t[0];
|
1759
|
-
e.children = typeof a == "string" ||
|
1797
|
+
e.children = typeof a == "string" || nu(a) ? a : [a];
|
1760
1798
|
} else
|
1761
1799
|
e.children = t.map((a) => typeof a == "string" ? { name: "span", children: a } : a);
|
1762
1800
|
return e;
|
1763
1801
|
}
|
1764
|
-
function
|
1802
|
+
function ze(e) {
|
1765
1803
|
const u = e.branches || [], t = u[0], a = t.children || [];
|
1766
|
-
if (t?.isTemplateIf || a.length > 1 || a[0].type !==
|
1767
|
-
const
|
1768
|
-
return
|
1804
|
+
if (t?.isTemplateIf || a.length > 1 || a[0].type !== h.ELEMENT) {
|
1805
|
+
const c = { name: "span", directives: du(t, u) };
|
1806
|
+
return fu(c, t.children);
|
1769
1807
|
} else
|
1770
|
-
return
|
1808
|
+
return We(u);
|
1771
1809
|
}
|
1772
|
-
function
|
1810
|
+
function Xe(e) {
|
1773
1811
|
const u = [], t = {}, a = [];
|
1774
1812
|
try {
|
1775
|
-
const i =
|
1776
|
-
for (const
|
1777
|
-
if (
|
1813
|
+
const i = ue.compileString(e, { charset: !1 })?.css || "", c = Yu.parse(i), s = /^.[\w]+_[\w]{5,}/;
|
1814
|
+
for (const n of c.nodes)
|
1815
|
+
if (n.type === "rule") {
|
1778
1816
|
const d = {};
|
1779
|
-
|
1780
|
-
|
1781
|
-
}), t[
|
1817
|
+
s.test(n.selector) ? (n.nodes.forEach((r) => {
|
1818
|
+
r.type === "decl" && (d[r.prop] = r.value);
|
1819
|
+
}), t[n.selector] = d) : a.push(n.toString());
|
1782
1820
|
} else
|
1783
|
-
a.push(
|
1821
|
+
a.push(n.toString());
|
1784
1822
|
} catch (i) {
|
1785
1823
|
u.push(`css解析出错了,错误信息:[ ${i.message} ]
|
1786
1824
|
`);
|
@@ -1792,48 +1830,458 @@ function M0(e) {
|
|
1792
1830
|
`)
|
1793
1831
|
};
|
1794
1832
|
}
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1833
|
+
const Cu = "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(
|
1834
|
+
", "
|
1835
|
+
), Qe = "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(
|
1836
|
+
", "
|
1837
|
+
), Ze = "user", _ = "User";
|
1838
|
+
class Ke {
|
1839
|
+
validate(u) {
|
1840
|
+
const t = {
|
1841
|
+
valid: !0,
|
1842
|
+
errors: [],
|
1843
|
+
illegalVantIcons: [],
|
1844
|
+
illegalVtjIcons: []
|
1845
|
+
};
|
1846
|
+
return this.isCompleteSFC(u) || (t.errors.push("代码不符合Vue3单文件组件规范"), t.valid = !1), this.checkSetup(u) || (t.errors.push("setup不符合低代码模版要求"), t.valid = !1), this.hasUnchangedComment(u) && (t.errors.push("代码不完整,需要输出完整代码,不能有任何省略"), t.valid = !1), t.illegalVantIcons = this.checkVantIcons(u), t.illegalVtjIcons = this.checkVtjIcons(u), t;
|
1847
|
+
}
|
1848
|
+
isCompleteSFC(u) {
|
1849
|
+
try {
|
1850
|
+
const t = D(u);
|
1851
|
+
return !!(t.template && t.script && t.styles);
|
1852
|
+
} catch {
|
1853
|
+
return !1;
|
1854
|
+
}
|
1855
|
+
}
|
1856
|
+
checkSetup(u) {
|
1857
|
+
const t = D(u);
|
1858
|
+
let a = 0;
|
1859
|
+
return Nu(t.script, {
|
1860
|
+
ObjectMethod(i) {
|
1861
|
+
i.node.key.name === "setup" && (a = i.node.body.body.filter(
|
1862
|
+
(s) => !T.isEmptyStatement(s)
|
1863
|
+
).length);
|
1864
|
+
}
|
1865
|
+
}), a === 3;
|
1866
|
+
}
|
1867
|
+
findVantIcons(u) {
|
1868
|
+
const t = D(u), a = /<(?:VanIcon|van-icon)\b[^>]*>/g, i = t.template.match(a) || [], c = [];
|
1869
|
+
return i.forEach((s) => {
|
1870
|
+
const n = s.match(/\bname="([^"]+)"/);
|
1871
|
+
n && c.push(n[1]);
|
1872
|
+
}), [...new Set(c)];
|
1873
|
+
}
|
1874
|
+
checkVantIcons(u) {
|
1875
|
+
const t = this.findVantIcons(u), a = [];
|
1876
|
+
for (const i of t)
|
1877
|
+
Cu.includes(i) || a.push(i);
|
1878
|
+
return a;
|
1879
|
+
}
|
1880
|
+
findVtjIcons(u) {
|
1881
|
+
const t = D(u), a = /import\s*{([^}]+)}\s*from\s*['"]\@vtj\/icons['"]/, i = t.script.match(a);
|
1882
|
+
return !i || !i[1] ? [] : i[1].split(",").map((c) => c.trim()).filter(Boolean);
|
1883
|
+
}
|
1884
|
+
checkVtjIcons(u) {
|
1885
|
+
const t = this.findVtjIcons(u), a = [];
|
1886
|
+
for (const i of t)
|
1887
|
+
Qe.includes(i) || a.push(i);
|
1888
|
+
return a;
|
1889
|
+
}
|
1890
|
+
hasUnchangedComment(u) {
|
1891
|
+
const t = /<!--([\s\S]*?)-->/g, a = /\/\*([\s\S]*?)\*\//g, i = /\/\/(.*)/g;
|
1892
|
+
return [
|
1893
|
+
...u.match(t) || [],
|
1894
|
+
...u.match(a) || [],
|
1895
|
+
...u.match(i) || []
|
1896
|
+
].some(
|
1897
|
+
(s) => /不变/.test(s.replace(/\*/g, ""))
|
1898
|
+
// 移除多行注释的星号避免干扰
|
1899
|
+
);
|
1900
|
+
}
|
1901
|
+
}
|
1902
|
+
function Ye(e) {
|
1903
|
+
const u = [];
|
1904
|
+
let t = e;
|
1905
|
+
const a = D(e);
|
1906
|
+
if (!a.template || !a.script)
|
1907
|
+
return {
|
1908
|
+
fixed: !1,
|
1909
|
+
originalCode: e,
|
1910
|
+
fixedCode: e,
|
1911
|
+
changes: []
|
1912
|
+
};
|
1913
|
+
const i = u0(a.script), c = a.template;
|
1914
|
+
let s = c;
|
1915
|
+
const n = [], d = /\{\{([^}]+)\}\}/g;
|
1916
|
+
let r;
|
1917
|
+
for (; (r = d.exec(c)) !== null; ) {
|
1918
|
+
const m = r[0], y = r[1], g = C(y, i);
|
1919
|
+
if (g !== y) {
|
1920
|
+
const p = B(c, r.index);
|
1921
|
+
n.push({
|
1922
|
+
start: r.index,
|
1923
|
+
end: r.index + m.length,
|
1924
|
+
original: m,
|
1925
|
+
replacement: `{{${g}}}`,
|
1926
|
+
line: p.line,
|
1927
|
+
column: p.column
|
1928
|
+
}), u.push({
|
1929
|
+
line: p.line + 1,
|
1930
|
+
column: p.column,
|
1931
|
+
original: y.trim(),
|
1932
|
+
fixed: g.trim(),
|
1933
|
+
message: "修复插值表达式:添加 state. 前缀"
|
1934
|
+
});
|
1935
|
+
}
|
1936
|
+
}
|
1937
|
+
const b = /:(\w+)="([^"]+)"/g;
|
1938
|
+
for (; (r = b.exec(c)) !== null; ) {
|
1939
|
+
const m = r[0], y = r[1], g = r[2], p = C(g, i);
|
1940
|
+
if (p !== g) {
|
1941
|
+
const w = B(c, r.index);
|
1942
|
+
n.push({
|
1943
|
+
start: r.index,
|
1944
|
+
end: r.index + m.length,
|
1945
|
+
original: m,
|
1946
|
+
replacement: `:${y}="${p}"`,
|
1947
|
+
line: w.line,
|
1948
|
+
column: w.column
|
1949
|
+
}), u.push({
|
1950
|
+
line: w.line + 1,
|
1951
|
+
column: w.column,
|
1952
|
+
original: g,
|
1953
|
+
fixed: p,
|
1954
|
+
message: "修复绑定属性:添加 state. 前缀"
|
1955
|
+
});
|
1956
|
+
}
|
1957
|
+
}
|
1958
|
+
const f = /v-(if|else-if|show)="([^"]+)"/g;
|
1959
|
+
for (; (r = f.exec(c)) !== null; ) {
|
1960
|
+
const m = r[0], y = r[1], g = r[2], p = C(g, i);
|
1961
|
+
if (p !== g) {
|
1962
|
+
const w = B(c, r.index);
|
1963
|
+
n.push({
|
1964
|
+
start: r.index,
|
1965
|
+
end: r.index + m.length,
|
1966
|
+
original: m,
|
1967
|
+
replacement: `v-${y}="${p}"`,
|
1968
|
+
line: w.line,
|
1969
|
+
column: w.column
|
1970
|
+
}), u.push({
|
1971
|
+
line: w.line + 1,
|
1972
|
+
column: w.column,
|
1973
|
+
original: g,
|
1974
|
+
fixed: p,
|
1975
|
+
message: `修复 v-${y} 指令:添加 state. 前缀`
|
1976
|
+
});
|
1977
|
+
}
|
1978
|
+
}
|
1979
|
+
const I = /v-for="([^"]+)"/g;
|
1980
|
+
for (; (r = I.exec(c)) !== null; ) {
|
1981
|
+
const m = r[0], g = r[1].match(/^(.+)\s+in\s+(.+)$/);
|
1982
|
+
if (g) {
|
1983
|
+
const [, p, w] = g, q = C(
|
1984
|
+
w,
|
1985
|
+
i
|
1986
|
+
);
|
1987
|
+
if (q !== w) {
|
1988
|
+
const P = B(c, r.index), K = `v-for="${p} in ${q}"`;
|
1989
|
+
n.push({
|
1990
|
+
start: r.index,
|
1991
|
+
end: r.index + m.length,
|
1992
|
+
original: m,
|
1993
|
+
replacement: K,
|
1994
|
+
line: P.line,
|
1995
|
+
column: P.column
|
1996
|
+
}), u.push({
|
1997
|
+
line: P.line + 1,
|
1998
|
+
column: P.column,
|
1999
|
+
original: w,
|
2000
|
+
fixed: q,
|
2001
|
+
message: "修复 v-for 指令:添加 state. 前缀"
|
2002
|
+
});
|
2003
|
+
}
|
2004
|
+
}
|
2005
|
+
}
|
2006
|
+
const x = /v-model="([^"]+)"/g;
|
2007
|
+
for (; (r = x.exec(c)) !== null; ) {
|
2008
|
+
const m = r[0], y = r[1], g = C(y, i);
|
2009
|
+
if (g !== y) {
|
2010
|
+
const p = B(c, r.index);
|
2011
|
+
n.push({
|
2012
|
+
start: r.index,
|
2013
|
+
end: r.index + m.length,
|
2014
|
+
original: m,
|
2015
|
+
replacement: `v-model="${g}"`,
|
2016
|
+
line: p.line,
|
2017
|
+
column: p.column
|
2018
|
+
}), u.push({
|
2019
|
+
line: p.line + 1,
|
2020
|
+
column: p.column,
|
2021
|
+
original: y,
|
2022
|
+
fixed: g,
|
2023
|
+
message: "修复 v-model 指令:添加 state. 前缀"
|
2024
|
+
});
|
2025
|
+
}
|
2026
|
+
}
|
2027
|
+
const N = /v-bind="([^"]+)"/g;
|
2028
|
+
for (; (r = N.exec(c)) !== null; ) {
|
2029
|
+
const m = r[0], y = r[1], g = C(y, i);
|
2030
|
+
if (g !== y) {
|
2031
|
+
const p = B(c, r.index);
|
2032
|
+
n.push({
|
2033
|
+
start: r.index,
|
2034
|
+
end: r.index + m.length,
|
2035
|
+
original: m,
|
2036
|
+
replacement: `v-bind="${g}"`,
|
2037
|
+
line: p.line,
|
2038
|
+
column: p.column
|
2039
|
+
}), u.push({
|
2040
|
+
line: p.line + 1,
|
2041
|
+
column: p.column,
|
2042
|
+
original: y,
|
2043
|
+
fixed: g,
|
2044
|
+
message: "修复 v-bind 指令:添加 state. 前缀"
|
2045
|
+
});
|
2046
|
+
}
|
2047
|
+
}
|
2048
|
+
const V = /v-(text|html)="([^"]+)"/g;
|
2049
|
+
for (; (r = V.exec(c)) !== null; ) {
|
2050
|
+
const m = r[0], y = r[1], g = r[2], p = C(g, i);
|
2051
|
+
if (p !== g) {
|
2052
|
+
const w = B(c, r.index);
|
2053
|
+
n.push({
|
2054
|
+
start: r.index,
|
2055
|
+
end: r.index + m.length,
|
2056
|
+
original: m,
|
2057
|
+
replacement: `v-${y}="${p}"`,
|
2058
|
+
line: w.line,
|
2059
|
+
column: w.column
|
2060
|
+
}), u.push({
|
2061
|
+
line: w.line + 1,
|
2062
|
+
column: w.column,
|
2063
|
+
original: g,
|
2064
|
+
fixed: p,
|
2065
|
+
message: `修复 v-${y} 指令:添加 state. 前缀`
|
2066
|
+
});
|
2067
|
+
}
|
2068
|
+
}
|
2069
|
+
const Z = /(@|v-on:)(\w+)="([^"]+)"/g;
|
2070
|
+
for (; (r = Z.exec(c)) !== null; ) {
|
2071
|
+
const m = r[0], y = r[1], g = r[2], p = r[3], w = e0(p, i);
|
2072
|
+
if (w !== p) {
|
2073
|
+
const q = B(c, r.index);
|
2074
|
+
n.push({
|
2075
|
+
start: r.index,
|
2076
|
+
end: r.index + m.length,
|
2077
|
+
original: m,
|
2078
|
+
replacement: `${y}${g}="${w}"`,
|
2079
|
+
line: q.line,
|
2080
|
+
column: q.column
|
2081
|
+
}), u.push({
|
2082
|
+
line: q.line + 1,
|
2083
|
+
column: q.column,
|
2084
|
+
original: p,
|
2085
|
+
fixed: w,
|
2086
|
+
message: "修复事件处理器:添加 state. 前缀"
|
2087
|
+
});
|
2088
|
+
}
|
2089
|
+
}
|
2090
|
+
if (n.sort((m, y) => y.start - m.start), n.forEach((m) => {
|
2091
|
+
s = s.substring(0, m.start) + m.replacement + s.substring(m.end);
|
2092
|
+
}), n.length > 0) {
|
2093
|
+
const m = e.indexOf("<template>"), y = e.indexOf("</template>") + 11;
|
2094
|
+
t = e.substring(0, m) + `<template>
|
2095
|
+
` + s + `
|
2096
|
+
</template>` + e.substring(y);
|
2097
|
+
}
|
2098
|
+
return {
|
2099
|
+
fixed: n.length > 0,
|
2100
|
+
originalCode: e,
|
2101
|
+
fixedCode: t,
|
2102
|
+
changes: u
|
2103
|
+
};
|
2104
|
+
}
|
2105
|
+
function u0(e) {
|
2106
|
+
const u = /* @__PURE__ */ new Set();
|
2107
|
+
try {
|
2108
|
+
const t = cu(e);
|
2109
|
+
su(t, {
|
2110
|
+
CallExpression(a) {
|
2111
|
+
if (a.node.callee.type === "Identifier" && a.node.callee.name === "reactive" && a.node.arguments.length > 0 && a.node.arguments[0].type === "ObjectExpression") {
|
2112
|
+
const i = a.parent;
|
2113
|
+
i.type === "VariableDeclarator" && i.id.type === "Identifier" && i.id.name === "state" && a.node.arguments[0].properties.forEach((s) => {
|
2114
|
+
s.type === "ObjectProperty" && s.key.type === "Identifier" && u.add(s.key.name);
|
2115
|
+
});
|
2116
|
+
}
|
2117
|
+
}
|
2118
|
+
});
|
2119
|
+
} catch (t) {
|
2120
|
+
console.error("Failed to parse script:", t);
|
2121
|
+
}
|
2122
|
+
return u;
|
2123
|
+
}
|
2124
|
+
function C(e, u) {
|
2125
|
+
let t = e.trim();
|
2126
|
+
return u.forEach((a) => {
|
2127
|
+
const i = new RegExp(`(?<![\\w.])${a}(?![\\w])`, "g");
|
2128
|
+
i.test(t) && !t.includes(`state.${a}`) && (t = t.replace(i, `state.${a}`));
|
2129
|
+
}), t;
|
2130
|
+
}
|
2131
|
+
function e0(e, u) {
|
2132
|
+
let t = e.trim();
|
2133
|
+
return u.forEach((a) => {
|
2134
|
+
const i = new RegExp(
|
2135
|
+
`(?<![\\w.])${a}(\\+\\+|--|\\s*[+\\-*/]=)`,
|
2136
|
+
"g"
|
2137
|
+
), c = new RegExp(
|
2138
|
+
`(\\+\\+|--)?(?<![\\w.])${a}(?![\\w])`,
|
2139
|
+
"g"
|
2140
|
+
);
|
2141
|
+
t.includes(`state.${a}`) || (t = t.replace(i, `state.${a}$1`), t = t.replace(c, (s, n) => n ? `${n}state.${a}` : s.includes(a) && !s.includes("state.") ? `state.${a}` : s));
|
2142
|
+
}), C(t, u);
|
2143
|
+
}
|
2144
|
+
function B(e, u) {
|
2145
|
+
const t = e.substring(0, u).split(`
|
2146
|
+
`);
|
2147
|
+
return {
|
2148
|
+
line: t.length,
|
2149
|
+
column: t[t.length - 1].length
|
2150
|
+
};
|
2151
|
+
}
|
2152
|
+
class t0 {
|
2153
|
+
fixBasedOnValidation(u, t) {
|
2154
|
+
let a = u;
|
2155
|
+
return t.illegalVantIcons.length && (a = this.fixVantIcons(a)), t.illegalVtjIcons.length && (a = this.fixVtjIcons(a, t.illegalVtjIcons)), Ye(a).fixedCode;
|
2156
|
+
}
|
2157
|
+
fixVantIcons(u) {
|
2158
|
+
const t = D(u), a = t.template.replace(
|
2159
|
+
/<(?:VanIcon|van-icon)\s+[^>]*name="([^"]+)"[^>]*>/g,
|
2160
|
+
(i, c) => Cu.includes(c) ? i : i.replace(c, Ze)
|
2161
|
+
);
|
2162
|
+
return this.reconstructSFC(t, a, t.script);
|
2163
|
+
}
|
2164
|
+
fixVtjIcons(u, t = []) {
|
2165
|
+
const a = D(u);
|
2166
|
+
a.script = Nu(a.script, {
|
2167
|
+
ImportDeclaration(i) {
|
2168
|
+
if (i.node.source.value === "@vtj/icons") {
|
2169
|
+
const c = i.node.specifiers, s = [];
|
2170
|
+
for (const n of c) {
|
2171
|
+
const d = n.imported?.name;
|
2172
|
+
t.includes(d) || s.push(
|
2173
|
+
T.importSpecifier(n.local, n.imported)
|
2174
|
+
);
|
2175
|
+
}
|
2176
|
+
s.push(
|
2177
|
+
T.importSpecifier(
|
2178
|
+
T.identifier(_),
|
2179
|
+
T.identifier(_)
|
2180
|
+
)
|
2181
|
+
), i.node.specifiers = s;
|
2182
|
+
}
|
2183
|
+
},
|
2184
|
+
ObjectMethod(i) {
|
2185
|
+
if (i.node.key.name === "setup") {
|
2186
|
+
const c = i.node.body.body;
|
2187
|
+
for (const s of c)
|
2188
|
+
if (T.isReturnStatement(s) && T.isObjectExpression(s.argument)) {
|
2189
|
+
const n = s.argument.properties || [];
|
2190
|
+
s.argument.properties = n.filter(
|
2191
|
+
(d) => !t.includes(d.key.name)
|
2192
|
+
), s.argument.properties.push(
|
2193
|
+
T.objectProperty(
|
2194
|
+
T.identifier(_),
|
2195
|
+
T.identifier(_),
|
2196
|
+
!1,
|
2197
|
+
!0
|
2198
|
+
)
|
2199
|
+
);
|
2200
|
+
}
|
2201
|
+
}
|
2202
|
+
},
|
2203
|
+
ObjectProperty(i) {
|
2204
|
+
if (T.isIdentifier(i.node.value) && t.includes(i.node.value.name) && (i.node.value = T.identifier(_)), T.isArrayExpression(i.node.value)) {
|
2205
|
+
const c = i.node.value.elements;
|
2206
|
+
i.node.value.elements = c.map((s) => T.isIdentifier(s) && t.includes(s.name) ? T.identifier(_) : s);
|
2207
|
+
}
|
2208
|
+
},
|
2209
|
+
AssignmentExpression(i) {
|
2210
|
+
T.isIdentifier(i.node.right) && t.includes(i.node.right.name) && (i.node.right = T.identifier(_));
|
2211
|
+
}
|
2212
|
+
});
|
2213
|
+
for (const i of t)
|
2214
|
+
a.template = a.template.replace(
|
2215
|
+
new RegExp(`:icon="${i}"`, "g"),
|
2216
|
+
`:icon="${_}"`
|
2217
|
+
);
|
2218
|
+
return this.reconstructSFC(a, a.template, a.script);
|
2219
|
+
}
|
2220
|
+
reconstructSFC(u, t, a) {
|
2221
|
+
let i = "";
|
2222
|
+
return t && u.template && (i += `<template>
|
2223
|
+
${t}
|
2224
|
+
</template>
|
2225
|
+
|
2226
|
+
`), a && u.script && (i += `<script>
|
2227
|
+
${a}
|
2228
|
+
<\/script>
|
2229
|
+
|
2230
|
+
`), u.styles.forEach((c) => {
|
2231
|
+
i += `<style lang="scss" scoped>
|
2232
|
+
`, i += `${c}
|
2233
|
+
`, i += `</style>
|
2234
|
+
|
2235
|
+
`;
|
2236
|
+
}), i;
|
2237
|
+
}
|
2238
|
+
}
|
2239
|
+
async function y0(e) {
|
2240
|
+
const { id: u, name: t, source: a, project: i } = e, { dependencies: c = [], platform: s = "web" } = i || {}, n = new Ke(), d = new t0(), r = n.validate(a);
|
2241
|
+
let b = [];
|
2242
|
+
if (!r.valid)
|
2243
|
+
return b = r.errors, Promise.reject(b);
|
2244
|
+
const f = d.fixBasedOnValidation(a, r), I = D(f), {
|
2245
|
+
styles: x,
|
2246
|
+
css: N,
|
2247
|
+
errors: V
|
2248
|
+
} = Xe(I.styles.join(`
|
2249
|
+
`));
|
2250
|
+
if (b.push(...V), b.length)
|
2251
|
+
return Promise.reject(b);
|
2252
|
+
const {
|
2253
|
+
state: Z,
|
1806
2254
|
watch: m,
|
1807
|
-
lifeCycles:
|
1808
|
-
computed:
|
1809
|
-
methods:
|
1810
|
-
props:
|
1811
|
-
emits:
|
1812
|
-
inject:
|
1813
|
-
handlers:
|
1814
|
-
imports:
|
1815
|
-
dataSources:
|
1816
|
-
} =
|
1817
|
-
platform:
|
1818
|
-
handlers:
|
1819
|
-
styles:
|
1820
|
-
imports:
|
1821
|
-
}),
|
2255
|
+
lifeCycles: y,
|
2256
|
+
computed: g,
|
2257
|
+
methods: p,
|
2258
|
+
props: w,
|
2259
|
+
emits: q,
|
2260
|
+
inject: P,
|
2261
|
+
handlers: K,
|
2262
|
+
imports: lu,
|
2263
|
+
dataSources: Fu
|
2264
|
+
} = Te(I.script, i), { nodes: Mu, slots: Ou, context: Pu } = Pe(u, t, I.template, {
|
2265
|
+
platform: s,
|
2266
|
+
handlers: K,
|
2267
|
+
styles: x,
|
2268
|
+
imports: lu
|
2269
|
+
}), bu = {
|
1822
2270
|
id: u,
|
1823
2271
|
name: t,
|
1824
|
-
inject:
|
1825
|
-
props:
|
1826
|
-
state:
|
2272
|
+
inject: P,
|
2273
|
+
props: w,
|
2274
|
+
state: Z,
|
1827
2275
|
watch: m,
|
1828
|
-
lifeCycles:
|
1829
|
-
computed:
|
1830
|
-
methods:
|
1831
|
-
dataSources:
|
1832
|
-
slots:
|
1833
|
-
emits:
|
1834
|
-
nodes:
|
1835
|
-
css:
|
1836
|
-
},
|
2276
|
+
lifeCycles: y,
|
2277
|
+
computed: g,
|
2278
|
+
methods: p,
|
2279
|
+
dataSources: Fu,
|
2280
|
+
slots: Ou,
|
2281
|
+
emits: q,
|
2282
|
+
nodes: Mu,
|
2283
|
+
css: N
|
2284
|
+
}, $u = Object.keys(g || {}), Uu = [
|
1837
2285
|
"$el",
|
1838
2286
|
"$emit",
|
1839
2287
|
"$nextTick",
|
@@ -1849,110 +2297,112 @@ async function Y0(e) {
|
|
1849
2297
|
"state",
|
1850
2298
|
"$props",
|
1851
2299
|
"props",
|
1852
|
-
...Object.keys(
|
1853
|
-
], { libs:
|
1854
|
-
platform:
|
1855
|
-
context:
|
1856
|
-
computed:
|
1857
|
-
libs:
|
1858
|
-
members:
|
2300
|
+
...Object.keys(p || {})
|
2301
|
+
], { libs: Hu } = c0(lu, c), hu = {
|
2302
|
+
platform: s,
|
2303
|
+
context: Pu,
|
2304
|
+
computed: $u,
|
2305
|
+
libs: Hu,
|
2306
|
+
members: Uu
|
1859
2307
|
};
|
1860
|
-
return await
|
1861
|
-
|
1862
|
-
async (
|
1863
|
-
await
|
1864
|
-
if (G
|
1865
|
-
const
|
1866
|
-
|
2308
|
+
return await a0(
|
2309
|
+
bu,
|
2310
|
+
async (H) => {
|
2311
|
+
await i0(H, async (G) => {
|
2312
|
+
if (ru(G)) {
|
2313
|
+
const Gu = await xu(G.value);
|
2314
|
+
G.value = gu(Gu, H.id, hu);
|
1867
2315
|
}
|
1868
2316
|
});
|
1869
2317
|
},
|
1870
|
-
async (
|
1871
|
-
const
|
1872
|
-
|
2318
|
+
async (H) => {
|
2319
|
+
const G = await xu(H.value);
|
2320
|
+
H.value = gu(G, "", hu);
|
1873
2321
|
}
|
1874
|
-
),
|
1875
|
-
}
|
1876
|
-
async function
|
1877
|
-
const a = async (
|
1878
|
-
if (await u(
|
1879
|
-
for (const
|
1880
|
-
await a(
|
1881
|
-
}, i = async (
|
1882
|
-
if (!
|
1883
|
-
if (Array.isArray(
|
1884
|
-
for (let
|
1885
|
-
await i(
|
2322
|
+
), new Qu(bu).toDsl();
|
2323
|
+
}
|
2324
|
+
async function a0(e, u, t) {
|
2325
|
+
const a = async (x, N) => {
|
2326
|
+
if (await u(x, N), Array.isArray(x.children))
|
2327
|
+
for (const V of x.children)
|
2328
|
+
await a(V, x);
|
2329
|
+
}, i = async (x) => {
|
2330
|
+
if (!x || typeof x != "object") return;
|
2331
|
+
if (Array.isArray(x)) {
|
2332
|
+
for (let V of x)
|
2333
|
+
await i(V);
|
1886
2334
|
return;
|
1887
2335
|
}
|
1888
|
-
const
|
1889
|
-
for (const
|
1890
|
-
|
2336
|
+
const N = Object.values(x);
|
2337
|
+
for (const V of N)
|
2338
|
+
ru(V) ? await t(V) : await i(V);
|
1891
2339
|
}, {
|
1892
|
-
state:
|
1893
|
-
watch:
|
1894
|
-
computed:
|
2340
|
+
state: c,
|
2341
|
+
watch: s,
|
2342
|
+
computed: n,
|
1895
2343
|
props: d,
|
1896
|
-
dataSources:
|
1897
|
-
methods:
|
1898
|
-
lifeCycles:
|
1899
|
-
inject:
|
2344
|
+
dataSources: r,
|
2345
|
+
methods: b,
|
2346
|
+
lifeCycles: f,
|
2347
|
+
inject: I
|
1900
2348
|
} = e;
|
1901
2349
|
if (await i({
|
1902
|
-
state:
|
1903
|
-
watch:
|
1904
|
-
computed:
|
2350
|
+
state: c,
|
2351
|
+
watch: s,
|
2352
|
+
computed: n,
|
1905
2353
|
props: d,
|
1906
|
-
dataSources:
|
1907
|
-
methods:
|
1908
|
-
lifeCycles:
|
1909
|
-
inject:
|
2354
|
+
dataSources: r,
|
2355
|
+
methods: b,
|
2356
|
+
lifeCycles: f,
|
2357
|
+
inject: I
|
1910
2358
|
}), Array.isArray(e.nodes))
|
1911
|
-
for (const
|
1912
|
-
await a(
|
2359
|
+
for (const x of e.nodes)
|
2360
|
+
await a(x);
|
1913
2361
|
}
|
1914
|
-
async function
|
2362
|
+
async function i0(e, u) {
|
1915
2363
|
const t = async (a) => {
|
1916
2364
|
if (!a || typeof a != "object") return;
|
1917
2365
|
if (Array.isArray(a)) {
|
1918
|
-
for (let
|
1919
|
-
await u(
|
2366
|
+
for (let c of a)
|
2367
|
+
await u(c), await t(c);
|
1920
2368
|
return;
|
1921
2369
|
}
|
1922
|
-
if (
|
2370
|
+
if (ru(a)) {
|
1923
2371
|
await u(a);
|
1924
2372
|
return;
|
1925
2373
|
}
|
1926
2374
|
const i = Object.values(a);
|
1927
|
-
for (const
|
1928
|
-
await u(
|
2375
|
+
for (const c of i)
|
2376
|
+
await u(c), await t(c);
|
1929
2377
|
};
|
1930
2378
|
await t(e);
|
1931
2379
|
}
|
1932
|
-
function
|
2380
|
+
function c0(e = [], u = []) {
|
1933
2381
|
const t = {}, a = u.reduce(
|
1934
|
-
(i,
|
2382
|
+
(i, c) => (i[c.package] = c.library, i),
|
1935
2383
|
{}
|
1936
2384
|
);
|
1937
|
-
for (const { from: i, imports:
|
1938
|
-
if (Array.isArray(
|
1939
|
-
|
1940
|
-
const
|
1941
|
-
|
2385
|
+
for (const { from: i, imports: c } of e)
|
2386
|
+
if (Array.isArray(c))
|
2387
|
+
c.forEach((s) => {
|
2388
|
+
const n = a[i];
|
2389
|
+
n && (t[s] = n);
|
1942
2390
|
});
|
1943
2391
|
else {
|
1944
|
-
const
|
1945
|
-
|
2392
|
+
const s = a[i];
|
2393
|
+
s && (t[c] = s);
|
1946
2394
|
}
|
1947
2395
|
return {
|
1948
2396
|
libs: t
|
1949
2397
|
};
|
1950
2398
|
}
|
1951
2399
|
export {
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
2400
|
+
t0 as AutoFixer,
|
2401
|
+
Ke as ComponentValidator,
|
2402
|
+
x0 as VTJ_PARSER_VERSION,
|
2403
|
+
Au as htmlToNodes,
|
2404
|
+
g0 as parseUniApp,
|
2405
|
+
y0 as parseVue,
|
2406
|
+
gu as patchCode,
|
2407
|
+
J as replacer
|
1958
2408
|
};
|