@vtj/renderer 0.18.10 → 0.18.12
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 +13 -13
- package/dist/index.mjs +969 -958
- package/package.json +5 -5
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Base as
|
|
2
|
-
import { url as
|
|
1
|
+
import { Base as si, BUILT_IN_COMPONENTS as ii, ProjectModel as $e, HistoryModel as as } from "@vtj/core";
|
|
2
|
+
import { url as he, isUrl as dt, dedupArray as ri, isFunction as z, isString as ee, logger as ge, storage as rt, cookie as nt, toArray as qt, unRSA as Wt, delay as Ie, createRequest as os, jsonp as us, merge as ni, pathToRegexp as ai, pathToRegexpMatch as oi, formDataToJson as ui, isEqual as at, Queue as ci, cloneDeep as Kt, camelCase as X, upperFirstCamelCase as li, pick as hi, request as mt, loadScript as zt, debounce as pi, Storage as fi, mapToObject as kt } from "@vtj/utils";
|
|
3
3
|
import * as xe from "vue";
|
|
4
|
-
import { inject as
|
|
5
|
-
import { useRoute as
|
|
4
|
+
import { inject as It, defineComponent as cs, h as gt, ref as xt, watchEffect as di, defineAsyncComponent as Jt } from "vue";
|
|
5
|
+
import { useRoute as ls } from "vue-router";
|
|
6
6
|
/**!
|
|
7
7
|
* Copyright (c) 2026, VTJ.PRO All rights reserved.
|
|
8
8
|
* @name @vtj/renderer
|
|
9
9
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
10
|
-
* @version 0.18.
|
|
10
|
+
* @version 0.18.12
|
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const we = "0.18.12";
|
|
14
14
|
var P = /* @__PURE__ */ ((t) => (t.Runtime = "Runtime", t.Design = "Design", t.Raw = "Raw", t.VNode = "VNode", t))(P || {});
|
|
15
|
-
const
|
|
15
|
+
const Qt = [
|
|
16
16
|
"$el",
|
|
17
17
|
"$emit",
|
|
18
18
|
"$nextTick",
|
|
@@ -24,7 +24,7 @@ const zt = [
|
|
|
24
24
|
"$props",
|
|
25
25
|
"$options",
|
|
26
26
|
"$forceUpdate"
|
|
27
|
-
],
|
|
27
|
+
], wn = [
|
|
28
28
|
"beforeCreate",
|
|
29
29
|
"created",
|
|
30
30
|
"beforeMount",
|
|
@@ -38,7 +38,7 @@ const zt = [
|
|
|
38
38
|
"renderTriggered",
|
|
39
39
|
"activated",
|
|
40
40
|
"deactivated"
|
|
41
|
-
],
|
|
41
|
+
], En = [
|
|
42
42
|
"onBeforeMount",
|
|
43
43
|
"onMounted",
|
|
44
44
|
"onBeforeUpdate",
|
|
@@ -50,7 +50,7 @@ const zt = [
|
|
|
50
50
|
"onRenderTriggered",
|
|
51
51
|
"onActivated",
|
|
52
52
|
"onDeactivated"
|
|
53
|
-
],
|
|
53
|
+
], mi = [
|
|
54
54
|
"vIf",
|
|
55
55
|
"vElseIf",
|
|
56
56
|
"vElse",
|
|
@@ -59,7 +59,7 @@ const zt = [
|
|
|
59
59
|
"vFor",
|
|
60
60
|
"vBind",
|
|
61
61
|
"vHtml"
|
|
62
|
-
],
|
|
62
|
+
], gi = {
|
|
63
63
|
String,
|
|
64
64
|
Number,
|
|
65
65
|
Boolean,
|
|
@@ -67,9 +67,9 @@ const zt = [
|
|
|
67
67
|
Object,
|
|
68
68
|
Function,
|
|
69
69
|
Date
|
|
70
|
-
},
|
|
70
|
+
}, Ee = "VtjPage", He = "VtjHomepage", hs = "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".split(
|
|
71
71
|
","
|
|
72
|
-
),
|
|
72
|
+
), xi = "component,slot".split(","), kn = [
|
|
73
73
|
"h",
|
|
74
74
|
"t",
|
|
75
75
|
"t",
|
|
@@ -89,7 +89,7 @@ const zt = [
|
|
|
89
89
|
"p",
|
|
90
90
|
"r",
|
|
91
91
|
"o"
|
|
92
|
-
].join(""),
|
|
92
|
+
].join(""), In = {
|
|
93
93
|
auth: [
|
|
94
94
|
"h",
|
|
95
95
|
"t",
|
|
@@ -149,62 +149,62 @@ const zt = [
|
|
|
149
149
|
].join(""),
|
|
150
150
|
privateKey: "MIIBOgIBAAJBAKoIzmn1FYQ1YOhOBw9EhABxZ+PySAIaydI+zdhoKflrdgJ4A5E4/5gbQmRpk09hPWG8nvX7h+l/QLU8kXxAIBECAwEAAQJAAlgpxQY6sByLsXqzJcthC8LSGsLf2JEJkHwlnpwFqlEV8UCkoINpuZ2Wzl+aftURu5rIfAzRCQBvHmeOTW9/zQIhAO5ufWDmnSLyfAAsNo5JRNpVuLFCFodR8Xm+ulDlosR/AiEAtpAltyP9wmCABKG/v/hrtTr3mcvFNGCjoGa9bUAok28CIHbrVs9w1ijrBlvTsXYwJw46uP539uKRRT4ymZzlm9QjAiB+1KH/G9f9pEEL9rtaSOG7JF5D0JcOjlze4MGVFs+ZrQIhALKOUFBNr2zEsyJIjw2PlvEucdlG77UniszjXTROHSPd"
|
|
151
151
|
};
|
|
152
|
-
function
|
|
153
|
-
return t.map((s) =>
|
|
152
|
+
function Me(t, e) {
|
|
153
|
+
return t.map((s) => dt(s) || s.startsWith("/") ? s : `${e}${s}`);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Ke(t) {
|
|
156
156
|
return /\.css$/.test(t);
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function ze(t) {
|
|
159
159
|
return /\.js$/.test(t);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function vi(t) {
|
|
162
162
|
return /\.json$/.test(t);
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function An(t) {
|
|
165
165
|
return t.map(
|
|
166
|
-
(e) => `<script src="${
|
|
166
|
+
(e) => `<script src="${he.append(e, { v: we })}"><\/script>`
|
|
167
167
|
).join("");
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Pn(t = []) {
|
|
170
170
|
return t.map(
|
|
171
|
-
(e) => `<link rel="stylesheet" href="${
|
|
171
|
+
(e) => `<link rel="stylesheet" href="${he.append(e, { v: we })}" />`
|
|
172
172
|
).join("");
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function bi(t, e = !1) {
|
|
175
175
|
return e && t.endsWith(".prod.js") ? t.replace(".prod.js", ".js") : t;
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function yi(t, e, s = !1) {
|
|
178
178
|
const i = t.filter((f) => !!f.enabled), r = [], n = [], a = [], u = [], c = {}, l = {}, h = [], p = {};
|
|
179
179
|
return i.forEach(
|
|
180
180
|
({ urls: f, assetsUrl: d, library: m, assetsLibrary: g, localeLibrary: x }) => {
|
|
181
|
-
f?.forEach((
|
|
182
|
-
|
|
183
|
-
}), m && (u.push(m), c[m] =
|
|
181
|
+
f?.forEach((S) => {
|
|
182
|
+
ze(S) && r.push(bi(S, s)), Ke(S) && n.push(S);
|
|
183
|
+
}), m && (u.push(m), c[m] = Me(f || [], e), x && (l[m] = x)), d && a.push(d), g && h.push(g), m && g && (p[g] = m);
|
|
184
184
|
}
|
|
185
185
|
), {
|
|
186
|
-
scripts:
|
|
187
|
-
css:
|
|
188
|
-
materials:
|
|
186
|
+
scripts: Me(r, e),
|
|
187
|
+
css: Me(n, e),
|
|
188
|
+
materials: Me(a, e),
|
|
189
189
|
libraryExports: u,
|
|
190
|
-
materialExports:
|
|
190
|
+
materialExports: ri(h),
|
|
191
191
|
materialMapLibrary: p,
|
|
192
192
|
libraryMap: c,
|
|
193
193
|
libraryLocaleMap: l
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function _i(t, e) {
|
|
197
197
|
const { name: s, parent: i, alias: r } = t;
|
|
198
198
|
return i ? e[i]?.[r || s] : e[r || s];
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
const e = t.filter((i) =>
|
|
200
|
+
function Si(t = []) {
|
|
201
|
+
const e = t.filter((i) => Ke(i)), s = t.filter((i) => ze(i));
|
|
202
202
|
return {
|
|
203
203
|
css: e,
|
|
204
204
|
js: s
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function Ci(t, e) {
|
|
208
208
|
const s = (l) => {
|
|
209
209
|
const h = [];
|
|
210
210
|
let p = 0;
|
|
@@ -214,33 +214,33 @@ function Si(t, e) {
|
|
|
214
214
|
continue;
|
|
215
215
|
}
|
|
216
216
|
if (l.substring(p, p + 2) === "/*") {
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
p =
|
|
217
|
+
const S = l.indexOf("*/", p + 2);
|
|
218
|
+
if (S !== -1) {
|
|
219
|
+
p = S + 2;
|
|
220
220
|
continue;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
if (l[p] === "@") {
|
|
224
|
-
const
|
|
224
|
+
const S = p;
|
|
225
225
|
for (; p < l.length && l[p] !== "{" && l[p] !== ";"; )
|
|
226
226
|
p++;
|
|
227
|
-
const
|
|
227
|
+
const I = l.substring(S, p).trim(), N = I.includes("@keyframes");
|
|
228
228
|
if (l[p] === ";")
|
|
229
229
|
h.push({
|
|
230
230
|
type: "simple-at-rule",
|
|
231
|
-
content: l.substring(
|
|
231
|
+
content: l.substring(S, p + 1)
|
|
232
232
|
}), p++;
|
|
233
233
|
else if (l[p] === "{") {
|
|
234
|
-
const
|
|
235
|
-
let
|
|
236
|
-
for (p++; p < l.length &&
|
|
237
|
-
l[p] === "{" ?
|
|
238
|
-
const
|
|
234
|
+
const w = p + 1;
|
|
235
|
+
let D = 1;
|
|
236
|
+
for (p++; p < l.length && D > 0; )
|
|
237
|
+
l[p] === "{" ? D++ : l[p] === "}" && D--, p++;
|
|
238
|
+
const ye = l.substring(S, p), _e = l.substring(w, p - 1);
|
|
239
239
|
h.push({
|
|
240
|
-
type:
|
|
241
|
-
rule:
|
|
242
|
-
content:
|
|
243
|
-
inner:
|
|
240
|
+
type: N ? "keyframes" : "at-rule",
|
|
241
|
+
rule: I,
|
|
242
|
+
content: ye,
|
|
243
|
+
inner: _e
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
continue;
|
|
@@ -318,21 +318,21 @@ function Si(t, e) {
|
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
|
-
const
|
|
322
|
-
function
|
|
321
|
+
const wi = 750;
|
|
322
|
+
function Ei(t, e, s) {
|
|
323
323
|
let i;
|
|
324
324
|
typeof t < "u" ? i = t.innerWidth || t.document.documentElement.clientWidth : (console.warn("无法获取屏幕宽度,使用默认值375"), i = 375);
|
|
325
|
-
const r = s ||
|
|
325
|
+
const r = s || wi;
|
|
326
326
|
return e * i / r;
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function ki(t, e) {
|
|
329
329
|
let s = !1, i = !1, r = !1, n = "";
|
|
330
330
|
for (let a = 0; a < e.length; a++) {
|
|
331
331
|
const u = e[a];
|
|
332
332
|
if (u === "'" && !i && !r ? s = !s : u === '"' && !s && !r ? i = !i : e.substr(a, 4).toLowerCase() === "url(" && !s && !i ? r = !0 : u === ")" && r && (r = !1), !s && !i && !r) {
|
|
333
333
|
const c = e.substr(a).match(/^(-?\d+(?:\.\d+)?)\s*rpx/);
|
|
334
334
|
if (c) {
|
|
335
|
-
const l = c[1], h = parseFloat(l), f = `${
|
|
335
|
+
const l = c[1], h = parseFloat(l), f = `${Ei(t, h).toFixed(6).replace(/\.?0+$/, "")}px`;
|
|
336
336
|
n += f, a += c[0].length - 1;
|
|
337
337
|
continue;
|
|
338
338
|
}
|
|
@@ -341,11 +341,11 @@ function Ei(t, e) {
|
|
|
341
341
|
}
|
|
342
342
|
return n;
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
return
|
|
344
|
+
function ps(t) {
|
|
345
|
+
return ee(t) ? t : JSON.stringify(t);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
const r = t.CSSStyleSheet, n = i ? `data-v-${e}` : e, a = t.__uniConfig ?
|
|
347
|
+
function At(t, e, s, i = !1) {
|
|
348
|
+
const r = t.CSSStyleSheet, n = i ? `data-v-${e}` : e, a = t.__uniConfig ? ki(t, s) : s, u = i ? Ci(a, n) : a, c = !!t.__uniConfig;
|
|
349
349
|
if (r.prototype.replaceSync && !c) {
|
|
350
350
|
const l = new r();
|
|
351
351
|
l.id = e, l.replaceSync(u);
|
|
@@ -359,7 +359,7 @@ function wt(t, e, s, i = !1) {
|
|
|
359
359
|
h ? h.innerHTML = u : (h = l.createElement("style"), h.id = e, h.innerHTML = u, l.head.appendChild(h));
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Tn(t) {
|
|
363
363
|
const e = t.adoptedStyleSheets || [];
|
|
364
364
|
let s = "";
|
|
365
365
|
if (e.forEach((i) => {
|
|
@@ -375,11 +375,11 @@ function Pn(t) {
|
|
|
375
375
|
i.textContent = s, t.head.appendChild(i);
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
-
async function
|
|
378
|
+
async function Ii(t, e) {
|
|
379
379
|
const s = await globalThis.fetch(e).then((i) => i.text()).catch(() => "");
|
|
380
|
-
s &&
|
|
380
|
+
s && At(globalThis, t, s);
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function fs(t, e = globalThis) {
|
|
383
383
|
const s = e.document, i = e.document.head;
|
|
384
384
|
for (const r of t)
|
|
385
385
|
if (!s.getElementById(r)) {
|
|
@@ -387,7 +387,7 @@ function ls(t, e = globalThis) {
|
|
|
387
387
|
a.rel = "stylesheet", a.id = r, a.href = r, i.appendChild(a);
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
async function
|
|
390
|
+
async function ds(t, e, s = globalThis) {
|
|
391
391
|
const i = s.document, r = s.document.head;
|
|
392
392
|
let n = s[e];
|
|
393
393
|
return n ? n.default || n : new Promise((a, u) => {
|
|
@@ -401,50 +401,50 @@ async function hs(t, e, s = globalThis) {
|
|
|
401
401
|
}
|
|
402
402
|
});
|
|
403
403
|
}
|
|
404
|
-
function Ii(t) {
|
|
405
|
-
return z(t) && Object.getOwnPropertyNames(t.prototype || {}).length === 0 || z(t?.install);
|
|
406
|
-
}
|
|
407
404
|
function Ai(t) {
|
|
408
|
-
return
|
|
405
|
+
return z(t) && Object.getOwnPropertyNames(t.prototype || {}).length === 0 || z(t?.install);
|
|
409
406
|
}
|
|
410
407
|
function Pi(t) {
|
|
411
|
-
return
|
|
408
|
+
return xi.includes(t);
|
|
412
409
|
}
|
|
413
|
-
function
|
|
410
|
+
function Ti(t) {
|
|
411
|
+
return hs.includes(t);
|
|
412
|
+
}
|
|
413
|
+
function Ae(t = globalThis) {
|
|
414
414
|
const e = globalThis?.Mock;
|
|
415
415
|
if (e) return e;
|
|
416
416
|
const s = t?.Mock;
|
|
417
417
|
if (s && globalThis)
|
|
418
418
|
return globalThis.Mock = s, s;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function Nn(t, e, s) {
|
|
421
421
|
Object.assign(e.meta, s.meta);
|
|
422
422
|
const i = t?._container;
|
|
423
423
|
s?.type === "page" && i.classList.add("is-page"), s?.pure && i.classList.add("is-pure");
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function Ni(t) {
|
|
426
426
|
return /^\([\s\S]*\)/.test(t.trim());
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function Ri(t) {
|
|
429
429
|
return /\w+\([\s\S]*\)$/.test(t.trim());
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function Vi(t) {
|
|
432
432
|
return t.includes("=");
|
|
433
433
|
}
|
|
434
|
-
var
|
|
434
|
+
var ot = {
|
|
435
435
|
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
|
|
436
436
|
5: "class enum extends super const export import",
|
|
437
437
|
6: "enum",
|
|
438
438
|
strict: "implements interface let package private protected public static yield",
|
|
439
439
|
strictBind: "eval arguments"
|
|
440
|
-
},
|
|
441
|
-
5:
|
|
442
|
-
"5module":
|
|
443
|
-
6:
|
|
444
|
-
},
|
|
445
|
-
|
|
446
|
-
var
|
|
447
|
-
function
|
|
440
|
+
}, ut = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", Oi = {
|
|
441
|
+
5: ut,
|
|
442
|
+
"5module": ut + " export import",
|
|
443
|
+
6: ut + " const class extends export import super"
|
|
444
|
+
}, Fi = /^in(stanceof)?$/, Pt = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", ms = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_", Li = new RegExp("[" + Pt + "]"), ji = new RegExp("[" + Pt + ms + "]");
|
|
445
|
+
Pt = ms = null;
|
|
446
|
+
var gs = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938], Mi = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
447
|
+
function vt(t, e) {
|
|
448
448
|
for (var s = 65536, i = 0; i < e.length; i += 2) {
|
|
449
449
|
if (s += e[i], s > t)
|
|
450
450
|
return !1;
|
|
@@ -453,20 +453,20 @@ function ft(t, e) {
|
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
function ne(t, e) {
|
|
456
|
-
return t < 65 ? t === 36 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 &&
|
|
456
|
+
return t < 65 ? t === 36 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && Li.test(String.fromCharCode(t)) : e === !1 ? !1 : vt(t, gs);
|
|
457
457
|
}
|
|
458
458
|
function ve(t, e) {
|
|
459
|
-
return t < 48 ? t === 36 : t < 58 ? !0 : t < 65 ? !1 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 &&
|
|
459
|
+
return t < 48 ? t === 36 : t < 58 ? !0 : t < 65 ? !1 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && ji.test(String.fromCharCode(t)) : e === !1 ? !1 : vt(t, gs) || vt(t, Mi);
|
|
460
460
|
}
|
|
461
461
|
var E = function(e, s) {
|
|
462
462
|
s === void 0 && (s = {}), this.label = e, this.keyword = s.keyword, this.beforeExpr = !!s.beforeExpr, this.startsExpr = !!s.startsExpr, this.isLoop = !!s.isLoop, this.isAssign = !!s.isAssign, this.prefix = !!s.prefix, this.postfix = !!s.postfix, this.binop = s.binop || null, this.updateContext = null;
|
|
463
463
|
};
|
|
464
|
-
function
|
|
464
|
+
function B(t, e) {
|
|
465
465
|
return new E(t, { beforeExpr: !0, binop: e });
|
|
466
466
|
}
|
|
467
|
-
var
|
|
468
|
-
function
|
|
469
|
-
return e === void 0 && (e = {}), e.keyword = t,
|
|
467
|
+
var H = { beforeExpr: !0 }, M = { startsExpr: !0 }, Tt = {};
|
|
468
|
+
function C(t, e) {
|
|
469
|
+
return e === void 0 && (e = {}), e.keyword = t, Tt[t] = new E(t, e);
|
|
470
470
|
}
|
|
471
471
|
var o = {
|
|
472
472
|
num: new E("num", M),
|
|
@@ -481,16 +481,16 @@ var o = {
|
|
|
481
481
|
braceR: new E("}"),
|
|
482
482
|
parenL: new E("(", { beforeExpr: !0, startsExpr: !0 }),
|
|
483
483
|
parenR: new E(")"),
|
|
484
|
-
comma: new E(",",
|
|
485
|
-
semi: new E(";",
|
|
486
|
-
colon: new E(":",
|
|
484
|
+
comma: new E(",", H),
|
|
485
|
+
semi: new E(";", H),
|
|
486
|
+
colon: new E(":", H),
|
|
487
487
|
dot: new E("."),
|
|
488
|
-
question: new E("?",
|
|
488
|
+
question: new E("?", H),
|
|
489
489
|
questionDot: new E("?."),
|
|
490
|
-
arrow: new E("=>",
|
|
490
|
+
arrow: new E("=>", H),
|
|
491
491
|
template: new E("template"),
|
|
492
492
|
invalidTemplate: new E("invalidTemplate"),
|
|
493
|
-
ellipsis: new E("...",
|
|
493
|
+
ellipsis: new E("...", H),
|
|
494
494
|
backQuote: new E("`", M),
|
|
495
495
|
dollarBraceL: new E("${", { beforeExpr: !0, startsExpr: !0 }),
|
|
496
496
|
// Operators. These carry several kinds of properties to help the
|
|
@@ -510,90 +510,90 @@ var o = {
|
|
|
510
510
|
assign: new E("_=", { beforeExpr: !0, isAssign: !0 }),
|
|
511
511
|
incDec: new E("++/--", { prefix: !0, postfix: !0, startsExpr: !0 }),
|
|
512
512
|
prefix: new E("!/~", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
513
|
-
logicalOR:
|
|
514
|
-
logicalAND:
|
|
515
|
-
bitwiseOR:
|
|
516
|
-
bitwiseXOR:
|
|
517
|
-
bitwiseAND:
|
|
518
|
-
equality:
|
|
519
|
-
relational:
|
|
520
|
-
bitShift:
|
|
513
|
+
logicalOR: B("||", 1),
|
|
514
|
+
logicalAND: B("&&", 2),
|
|
515
|
+
bitwiseOR: B("|", 3),
|
|
516
|
+
bitwiseXOR: B("^", 4),
|
|
517
|
+
bitwiseAND: B("&", 5),
|
|
518
|
+
equality: B("==/!=/===/!==", 6),
|
|
519
|
+
relational: B("</>/<=/>=", 7),
|
|
520
|
+
bitShift: B("<</>>/>>>", 8),
|
|
521
521
|
plusMin: new E("+/-", { beforeExpr: !0, binop: 9, prefix: !0, startsExpr: !0 }),
|
|
522
|
-
modulo:
|
|
523
|
-
star:
|
|
524
|
-
slash:
|
|
522
|
+
modulo: B("%", 10),
|
|
523
|
+
star: B("*", 10),
|
|
524
|
+
slash: B("/", 10),
|
|
525
525
|
starstar: new E("**", { beforeExpr: !0 }),
|
|
526
|
-
coalesce:
|
|
526
|
+
coalesce: B("??", 1),
|
|
527
527
|
// Keyword token types.
|
|
528
|
-
_break:
|
|
529
|
-
_case:
|
|
530
|
-
_catch:
|
|
531
|
-
_continue:
|
|
532
|
-
_debugger:
|
|
533
|
-
_default:
|
|
534
|
-
_do:
|
|
535
|
-
_else:
|
|
536
|
-
_finally:
|
|
537
|
-
_for:
|
|
538
|
-
_function:
|
|
539
|
-
_if:
|
|
540
|
-
_return:
|
|
541
|
-
_switch:
|
|
542
|
-
_throw:
|
|
543
|
-
_try:
|
|
544
|
-
_var:
|
|
545
|
-
_const:
|
|
546
|
-
_while:
|
|
547
|
-
_with:
|
|
548
|
-
_new:
|
|
549
|
-
_this:
|
|
550
|
-
_super:
|
|
551
|
-
_class:
|
|
552
|
-
_extends:
|
|
553
|
-
_export:
|
|
554
|
-
_import:
|
|
555
|
-
_null:
|
|
556
|
-
_true:
|
|
557
|
-
_false:
|
|
558
|
-
_in:
|
|
559
|
-
_instanceof:
|
|
560
|
-
_typeof:
|
|
561
|
-
_void:
|
|
562
|
-
_delete:
|
|
563
|
-
},
|
|
564
|
-
function
|
|
528
|
+
_break: C("break"),
|
|
529
|
+
_case: C("case", H),
|
|
530
|
+
_catch: C("catch"),
|
|
531
|
+
_continue: C("continue"),
|
|
532
|
+
_debugger: C("debugger"),
|
|
533
|
+
_default: C("default", H),
|
|
534
|
+
_do: C("do", { isLoop: !0, beforeExpr: !0 }),
|
|
535
|
+
_else: C("else", H),
|
|
536
|
+
_finally: C("finally"),
|
|
537
|
+
_for: C("for", { isLoop: !0 }),
|
|
538
|
+
_function: C("function", M),
|
|
539
|
+
_if: C("if"),
|
|
540
|
+
_return: C("return", H),
|
|
541
|
+
_switch: C("switch"),
|
|
542
|
+
_throw: C("throw", H),
|
|
543
|
+
_try: C("try"),
|
|
544
|
+
_var: C("var"),
|
|
545
|
+
_const: C("const"),
|
|
546
|
+
_while: C("while", { isLoop: !0 }),
|
|
547
|
+
_with: C("with"),
|
|
548
|
+
_new: C("new", { beforeExpr: !0, startsExpr: !0 }),
|
|
549
|
+
_this: C("this", M),
|
|
550
|
+
_super: C("super", M),
|
|
551
|
+
_class: C("class", M),
|
|
552
|
+
_extends: C("extends", H),
|
|
553
|
+
_export: C("export"),
|
|
554
|
+
_import: C("import", M),
|
|
555
|
+
_null: C("null", M),
|
|
556
|
+
_true: C("true", M),
|
|
557
|
+
_false: C("false", M),
|
|
558
|
+
_in: C("in", { beforeExpr: !0, binop: 7 }),
|
|
559
|
+
_instanceof: C("instanceof", { beforeExpr: !0, binop: 7 }),
|
|
560
|
+
_typeof: C("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
561
|
+
_void: C("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
562
|
+
_delete: C("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
563
|
+
}, U = /\r\n?|\n|\u2028|\u2029/, Pe = new RegExp(U.source, "g");
|
|
564
|
+
function Ve(t, e) {
|
|
565
565
|
return t === 10 || t === 13 || !e && (t === 8232 || t === 8233);
|
|
566
566
|
}
|
|
567
|
-
var
|
|
568
|
-
function
|
|
569
|
-
return
|
|
567
|
+
var xs = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, $ = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, vs = Object.prototype, Di = vs.hasOwnProperty, Bi = vs.toString;
|
|
568
|
+
function Je(t, e) {
|
|
569
|
+
return Di.call(t, e);
|
|
570
570
|
}
|
|
571
|
-
var
|
|
572
|
-
return
|
|
571
|
+
var Yt = Array.isArray || (function(t) {
|
|
572
|
+
return Bi.call(t) === "[object Array]";
|
|
573
573
|
});
|
|
574
|
-
function
|
|
574
|
+
function le(t) {
|
|
575
575
|
return new RegExp("^(?:" + t.replace(/ /g, "|") + ")$");
|
|
576
576
|
}
|
|
577
|
-
var
|
|
577
|
+
var Te = function(e, s) {
|
|
578
578
|
this.line = e, this.column = s;
|
|
579
579
|
};
|
|
580
|
-
|
|
581
|
-
return new
|
|
580
|
+
Te.prototype.offset = function(e) {
|
|
581
|
+
return new Te(this.line, this.column + e);
|
|
582
582
|
};
|
|
583
|
-
var
|
|
583
|
+
var Qe = function(e, s, i) {
|
|
584
584
|
this.start = s, this.end = i, e.sourceFile !== null && (this.source = e.sourceFile);
|
|
585
585
|
};
|
|
586
|
-
function
|
|
586
|
+
function bs(t, e) {
|
|
587
587
|
for (var s = 1, i = 0; ; ) {
|
|
588
|
-
|
|
589
|
-
var r =
|
|
588
|
+
Pe.lastIndex = i;
|
|
589
|
+
var r = Pe.exec(t);
|
|
590
590
|
if (r && r.index < e)
|
|
591
591
|
++s, i = r.index + r[0].length;
|
|
592
592
|
else
|
|
593
|
-
return new
|
|
593
|
+
return new Te(s, e - i);
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
var
|
|
596
|
+
var bt = {
|
|
597
597
|
// `ecmaVersion` indicates the ECMAScript version to parse. Must be
|
|
598
598
|
// either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10
|
|
599
599
|
// (2019). This influences support for strict mode, the set of
|
|
@@ -677,19 +677,19 @@ var dt = {
|
|
|
677
677
|
// (non-standard) ParenthesizedExpression nodes
|
|
678
678
|
preserveParens: !1
|
|
679
679
|
};
|
|
680
|
-
function
|
|
680
|
+
function Hi(t) {
|
|
681
681
|
var e = {};
|
|
682
|
-
for (var s in
|
|
683
|
-
e[s] = t &&
|
|
684
|
-
if (e.ecmaVersion >= 2015 && (e.ecmaVersion -= 2009), e.allowReserved == null && (e.allowReserved = e.ecmaVersion < 5),
|
|
682
|
+
for (var s in bt)
|
|
683
|
+
e[s] = t && Je(t, s) ? t[s] : bt[s];
|
|
684
|
+
if (e.ecmaVersion >= 2015 && (e.ecmaVersion -= 2009), e.allowReserved == null && (e.allowReserved = e.ecmaVersion < 5), Yt(e.onToken)) {
|
|
685
685
|
var i = e.onToken;
|
|
686
686
|
e.onToken = function(r) {
|
|
687
687
|
return i.push(r);
|
|
688
688
|
};
|
|
689
689
|
}
|
|
690
|
-
return
|
|
690
|
+
return Yt(e.onComment) && (e.onComment = $i(e, e.onComment)), e;
|
|
691
691
|
}
|
|
692
|
-
function
|
|
692
|
+
function $i(t, e) {
|
|
693
693
|
return function(s, i, r, n, a, u) {
|
|
694
694
|
var c = {
|
|
695
695
|
type: s ? "Block" : "Line",
|
|
@@ -697,81 +697,81 @@ function Hi(t, e) {
|
|
|
697
697
|
start: r,
|
|
698
698
|
end: n
|
|
699
699
|
};
|
|
700
|
-
t.locations && (c.loc = new
|
|
700
|
+
t.locations && (c.loc = new Qe(this, a, u)), t.ranges && (c.range = [r, n]), e.push(c);
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
|
-
var
|
|
704
|
-
function
|
|
705
|
-
return
|
|
703
|
+
var Ne = 1, Oe = 2, Nt = Ne | Oe, ys = 4, _s = 8, Ss = 16, Cs = 32, ws = 64, Es = 128;
|
|
704
|
+
function Rt(t, e) {
|
|
705
|
+
return Oe | (t ? ys : 0) | (e ? _s : 0);
|
|
706
706
|
}
|
|
707
|
-
var
|
|
708
|
-
this.options = e =
|
|
707
|
+
var Xt = 0, Vt = 1, Z = 2, ks = 3, Is = 4, As = 5, A = function(e, s, i) {
|
|
708
|
+
this.options = e = Hi(e), this.sourceFile = e.sourceFile, this.keywords = le(Oi[e.ecmaVersion >= 6 ? 6 : e.sourceType === "module" ? "5module" : 5]);
|
|
709
709
|
var r = "";
|
|
710
710
|
if (e.allowReserved !== !0) {
|
|
711
|
-
for (var n = e.ecmaVersion; !(r =
|
|
711
|
+
for (var n = e.ecmaVersion; !(r = ot[n]); n--)
|
|
712
712
|
;
|
|
713
713
|
e.sourceType === "module" && (r += " await");
|
|
714
714
|
}
|
|
715
|
-
this.reservedWords =
|
|
716
|
-
var a = (r ? r + " " : "") +
|
|
717
|
-
this.reservedWordsStrict =
|
|
718
|
-
`, i - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(
|
|
719
|
-
},
|
|
720
|
-
|
|
715
|
+
this.reservedWords = le(r);
|
|
716
|
+
var a = (r ? r + " " : "") + ot.strict;
|
|
717
|
+
this.reservedWordsStrict = le(a), this.reservedWordsStrictBind = le(a + " " + ot.strictBind), this.input = String(s), this.containsEsc = !1, i ? (this.pos = i, this.lineStart = this.input.lastIndexOf(`
|
|
718
|
+
`, i - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(U).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = o.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = e.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = {}, this.pos === 0 && e.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(Ne), this.regexpState = null;
|
|
719
|
+
}, pe = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 } };
|
|
720
|
+
A.prototype.parse = function() {
|
|
721
721
|
var e = this.options.program || this.startNode();
|
|
722
722
|
return this.nextToken(), this.parseTopLevel(e);
|
|
723
723
|
};
|
|
724
|
-
|
|
725
|
-
return (this.currentVarScope().flags &
|
|
724
|
+
pe.inFunction.get = function() {
|
|
725
|
+
return (this.currentVarScope().flags & Oe) > 0;
|
|
726
726
|
};
|
|
727
|
-
|
|
728
|
-
return (this.currentVarScope().flags &
|
|
727
|
+
pe.inGenerator.get = function() {
|
|
728
|
+
return (this.currentVarScope().flags & _s) > 0;
|
|
729
729
|
};
|
|
730
|
-
|
|
731
|
-
return (this.currentVarScope().flags &
|
|
730
|
+
pe.inAsync.get = function() {
|
|
731
|
+
return (this.currentVarScope().flags & ys) > 0;
|
|
732
732
|
};
|
|
733
|
-
|
|
734
|
-
return (this.currentThisScope().flags &
|
|
733
|
+
pe.allowSuper.get = function() {
|
|
734
|
+
return (this.currentThisScope().flags & ws) > 0;
|
|
735
735
|
};
|
|
736
|
-
|
|
737
|
-
return (this.currentThisScope().flags &
|
|
736
|
+
pe.allowDirectSuper.get = function() {
|
|
737
|
+
return (this.currentThisScope().flags & Es) > 0;
|
|
738
738
|
};
|
|
739
|
-
|
|
739
|
+
pe.treatFunctionsAsVar.get = function() {
|
|
740
740
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
741
741
|
};
|
|
742
|
-
|
|
743
|
-
return (this.currentThisScope().flags &
|
|
742
|
+
A.prototype.inNonArrowFunction = function() {
|
|
743
|
+
return (this.currentThisScope().flags & Oe) > 0;
|
|
744
744
|
};
|
|
745
|
-
|
|
745
|
+
A.extend = function() {
|
|
746
746
|
for (var e = [], s = arguments.length; s--; ) e[s] = arguments[s];
|
|
747
747
|
for (var i = this, r = 0; r < e.length; r++)
|
|
748
748
|
i = e[r](i);
|
|
749
749
|
return i;
|
|
750
750
|
};
|
|
751
|
-
|
|
751
|
+
A.parse = function(e, s) {
|
|
752
752
|
return new this(s, e).parse();
|
|
753
753
|
};
|
|
754
|
-
|
|
754
|
+
A.parseExpressionAt = function(e, s, i) {
|
|
755
755
|
var r = new this(i, e, s);
|
|
756
756
|
return r.nextToken(), r.parseExpression();
|
|
757
757
|
};
|
|
758
|
-
|
|
758
|
+
A.tokenizer = function(e, s) {
|
|
759
759
|
return new this(s, e);
|
|
760
760
|
};
|
|
761
|
-
Object.defineProperties(
|
|
762
|
-
var F =
|
|
761
|
+
Object.defineProperties(A.prototype, pe);
|
|
762
|
+
var F = A.prototype, Ui = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
|
|
763
763
|
F.strictDirective = function(t) {
|
|
764
764
|
for (; ; ) {
|
|
765
|
-
|
|
766
|
-
var e =
|
|
765
|
+
$.lastIndex = t, t += $.exec(this.input)[0].length;
|
|
766
|
+
var e = Ui.exec(this.input.slice(t));
|
|
767
767
|
if (!e)
|
|
768
768
|
return !1;
|
|
769
769
|
if ((e[1] || e[2]) === "use strict") {
|
|
770
|
-
|
|
771
|
-
var s =
|
|
772
|
-
return r === ";" || r === "}" ||
|
|
770
|
+
$.lastIndex = t + e[0].length;
|
|
771
|
+
var s = $.exec(this.input), i = s.index + s[0].length, r = this.input.charAt(i);
|
|
772
|
+
return r === ";" || r === "}" || U.test(s[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(r) || r === "!" && this.input.charAt(i + 1) === "=");
|
|
773
773
|
}
|
|
774
|
-
t += e[0].length,
|
|
774
|
+
t += e[0].length, $.lastIndex = t, t += $.exec(this.input)[0].length, this.input[t] === ";" && t++;
|
|
775
775
|
}
|
|
776
776
|
};
|
|
777
777
|
F.eat = function(t) {
|
|
@@ -787,7 +787,7 @@ F.expectContextual = function(t) {
|
|
|
787
787
|
this.eatContextual(t) || this.unexpected();
|
|
788
788
|
};
|
|
789
789
|
F.canInsertSemicolon = function() {
|
|
790
|
-
return this.type === o.eof || this.type === o.braceR ||
|
|
790
|
+
return this.type === o.eof || this.type === o.braceR || U.test(this.input.slice(this.lastTokEnd, this.start));
|
|
791
791
|
};
|
|
792
792
|
F.insertSemicolon = function() {
|
|
793
793
|
if (this.canInsertSemicolon())
|
|
@@ -806,7 +806,7 @@ F.expect = function(t) {
|
|
|
806
806
|
F.unexpected = function(t) {
|
|
807
807
|
this.raise(t ?? this.start, "Unexpected token");
|
|
808
808
|
};
|
|
809
|
-
function
|
|
809
|
+
function Ye() {
|
|
810
810
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
811
811
|
}
|
|
812
812
|
F.checkPatternErrors = function(t, e) {
|
|
@@ -830,7 +830,7 @@ F.checkYieldAwaitInDefaultParams = function() {
|
|
|
830
830
|
F.isSimpleAssignTarget = function(t) {
|
|
831
831
|
return t.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(t.expression) : t.type === "Identifier" || t.type === "MemberExpression";
|
|
832
832
|
};
|
|
833
|
-
var b =
|
|
833
|
+
var b = A.prototype;
|
|
834
834
|
b.parseTopLevel = function(t) {
|
|
835
835
|
var e = {};
|
|
836
836
|
for (t.body || (t.body = []); this.type !== o.eof; ) {
|
|
@@ -844,12 +844,12 @@ b.parseTopLevel = function(t) {
|
|
|
844
844
|
}
|
|
845
845
|
return this.adaptDirectivePrologue(t.body), this.next(), t.sourceType = this.options.sourceType, this.finishNode(t, "Program");
|
|
846
846
|
};
|
|
847
|
-
var
|
|
847
|
+
var Ot = { kind: "loop" }, Gi = { kind: "switch" };
|
|
848
848
|
b.isLet = function(t) {
|
|
849
849
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
850
850
|
return !1;
|
|
851
|
-
|
|
852
|
-
var e =
|
|
851
|
+
$.lastIndex = this.pos;
|
|
852
|
+
var e = $.exec(this.input), s = this.pos + e[0].length, i = this.input.charCodeAt(s);
|
|
853
853
|
if (i === 91)
|
|
854
854
|
return !0;
|
|
855
855
|
if (t)
|
|
@@ -860,7 +860,7 @@ b.isLet = function(t) {
|
|
|
860
860
|
for (var r = s + 1; ve(this.input.charCodeAt(r), !0); )
|
|
861
861
|
++r;
|
|
862
862
|
var n = this.input.slice(s, r);
|
|
863
|
-
if (!
|
|
863
|
+
if (!Fi.test(n))
|
|
864
864
|
return !0;
|
|
865
865
|
}
|
|
866
866
|
return !1;
|
|
@@ -868,9 +868,9 @@ b.isLet = function(t) {
|
|
|
868
868
|
b.isAsyncFunction = function() {
|
|
869
869
|
if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
|
|
870
870
|
return !1;
|
|
871
|
-
|
|
872
|
-
var t =
|
|
873
|
-
return
|
|
871
|
+
$.lastIndex = this.pos;
|
|
872
|
+
var t = $.exec(this.input), e = this.pos + t[0].length;
|
|
873
|
+
return !U.test(this.input.slice(this.pos, e)) && this.input.slice(e, e + 8) === "function" && (e + 8 === this.input.length || !ve(this.input.charAt(e + 8)));
|
|
874
874
|
};
|
|
875
875
|
b.parseStatement = function(t, e, s) {
|
|
876
876
|
var i = this.type, r = this.startNode(), n;
|
|
@@ -912,8 +912,8 @@ b.parseStatement = function(t, e, s) {
|
|
|
912
912
|
case o._export:
|
|
913
913
|
case o._import:
|
|
914
914
|
if (this.options.ecmaVersion > 10 && i === o._import) {
|
|
915
|
-
|
|
916
|
-
var a =
|
|
915
|
+
$.lastIndex = this.pos;
|
|
916
|
+
var a = $.exec(this.input), u = this.pos + a[0].length, c = this.input.charCodeAt(u);
|
|
917
917
|
if (c === 40 || c === 46)
|
|
918
918
|
return this.parseExpressionStatement(r, this.parseExpression());
|
|
919
919
|
}
|
|
@@ -944,23 +944,23 @@ b.parseDebuggerStatement = function(t) {
|
|
|
944
944
|
return this.next(), this.semicolon(), this.finishNode(t, "DebuggerStatement");
|
|
945
945
|
};
|
|
946
946
|
b.parseDoStatement = function(t) {
|
|
947
|
-
return this.next(), this.labels.push(
|
|
947
|
+
return this.next(), this.labels.push(Ot), t.body = this.parseStatement("do"), this.labels.pop(), this.expect(o._while), t.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(o.semi) : this.semicolon(), this.finishNode(t, "DoWhileStatement");
|
|
948
948
|
};
|
|
949
949
|
b.parseForStatement = function(t) {
|
|
950
950
|
this.next();
|
|
951
951
|
var e = this.options.ecmaVersion >= 9 && (this.inAsync || !this.inFunction && this.options.allowAwaitOutsideFunction) && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
952
|
-
if (this.labels.push(
|
|
952
|
+
if (this.labels.push(Ot), this.enterScope(0), this.expect(o.parenL), this.type === o.semi)
|
|
953
953
|
return e > -1 && this.unexpected(e), this.parseFor(t, null);
|
|
954
954
|
var s = this.isLet();
|
|
955
955
|
if (this.type === o._var || this.type === o._const || s) {
|
|
956
956
|
var i = this.startNode(), r = s ? "let" : this.value;
|
|
957
957
|
return this.next(), this.parseVar(i, !0, r), this.finishNode(i, "VariableDeclaration"), (this.type === o._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && i.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === o._in ? e > -1 && this.unexpected(e) : t.await = e > -1), this.parseForIn(t, i)) : (e > -1 && this.unexpected(e), this.parseFor(t, i));
|
|
958
958
|
}
|
|
959
|
-
var n = new
|
|
959
|
+
var n = new Ye(), a = this.parseExpression(!0, n);
|
|
960
960
|
return this.type === o._in || this.options.ecmaVersion >= 6 && this.isContextual("of") ? (this.options.ecmaVersion >= 9 && (this.type === o._in ? e > -1 && this.unexpected(e) : t.await = e > -1), this.toAssignable(a, !1, n), this.checkLVal(a), this.parseForIn(t, a)) : (this.checkExpressionErrors(n, !0), e > -1 && this.unexpected(e), this.parseFor(t, a));
|
|
961
961
|
};
|
|
962
962
|
b.parseFunctionStatement = function(t, e, s) {
|
|
963
|
-
return this.next(), this.parseFunction(t,
|
|
963
|
+
return this.next(), this.parseFunction(t, ke | (s ? 0 : yt), !1, e);
|
|
964
964
|
};
|
|
965
965
|
b.parseIfStatement = function(t) {
|
|
966
966
|
return this.next(), t.test = this.parseParenExpression(), t.consequent = this.parseStatement("if"), t.alternate = this.eat(o._else) ? this.parseStatement("if") : null, this.finishNode(t, "IfStatement");
|
|
@@ -969,7 +969,7 @@ b.parseReturnStatement = function(t) {
|
|
|
969
969
|
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(o.semi) || this.insertSemicolon() ? t.argument = null : (t.argument = this.parseExpression(), this.semicolon()), this.finishNode(t, "ReturnStatement");
|
|
970
970
|
};
|
|
971
971
|
b.parseSwitchStatement = function(t) {
|
|
972
|
-
this.next(), t.discriminant = this.parseParenExpression(), t.cases = [], this.expect(o.braceL), this.labels.push(
|
|
972
|
+
this.next(), t.discriminant = this.parseParenExpression(), t.cases = [], this.expect(o.braceL), this.labels.push(Gi), this.enterScope(0);
|
|
973
973
|
for (var e, s = !1; this.type !== o.braceR; )
|
|
974
974
|
if (this.type === o._case || this.type === o._default) {
|
|
975
975
|
var i = this.type === o._case;
|
|
@@ -979,16 +979,16 @@ b.parseSwitchStatement = function(t) {
|
|
|
979
979
|
return this.exitScope(), e && this.finishNode(e, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(t, "SwitchStatement");
|
|
980
980
|
};
|
|
981
981
|
b.parseThrowStatement = function(t) {
|
|
982
|
-
return this.next(),
|
|
982
|
+
return this.next(), U.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), t.argument = this.parseExpression(), this.semicolon(), this.finishNode(t, "ThrowStatement");
|
|
983
983
|
};
|
|
984
|
-
var
|
|
984
|
+
var qi = [];
|
|
985
985
|
b.parseTryStatement = function(t) {
|
|
986
986
|
if (this.next(), t.block = this.parseBlock(), t.handler = null, this.type === o._catch) {
|
|
987
987
|
var e = this.startNode();
|
|
988
988
|
if (this.next(), this.eat(o.parenL)) {
|
|
989
989
|
e.param = this.parseBindingAtom();
|
|
990
990
|
var s = e.param.type === "Identifier";
|
|
991
|
-
this.enterScope(s ?
|
|
991
|
+
this.enterScope(s ? Cs : 0), this.checkLVal(e.param, s ? Is : Z), this.expect(o.parenR);
|
|
992
992
|
} else
|
|
993
993
|
this.options.ecmaVersion < 10 && this.unexpected(), e.param = null, this.enterScope(0);
|
|
994
994
|
e.body = this.parseBlock(!1), this.exitScope(), t.handler = this.finishNode(e, "CatchClause");
|
|
@@ -999,7 +999,7 @@ b.parseVarStatement = function(t, e) {
|
|
|
999
999
|
return this.next(), this.parseVar(t, !1, e), this.semicolon(), this.finishNode(t, "VariableDeclaration");
|
|
1000
1000
|
};
|
|
1001
1001
|
b.parseWhileStatement = function(t) {
|
|
1002
|
-
return this.next(), t.test = this.parseParenExpression(), this.labels.push(
|
|
1002
|
+
return this.next(), t.test = this.parseParenExpression(), this.labels.push(Ot), t.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(t, "WhileStatement");
|
|
1003
1003
|
};
|
|
1004
1004
|
b.parseWithStatement = function(t) {
|
|
1005
1005
|
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), t.object = this.parseParenExpression(), t.body = this.parseStatement("with"), this.finishNode(t, "WithStatement");
|
|
@@ -1050,13 +1050,13 @@ b.parseVar = function(t, e, s) {
|
|
|
1050
1050
|
return t;
|
|
1051
1051
|
};
|
|
1052
1052
|
b.parseVarId = function(t, e) {
|
|
1053
|
-
t.id = this.parseBindingAtom(), this.checkLVal(t.id, e === "var" ?
|
|
1053
|
+
t.id = this.parseBindingAtom(), this.checkLVal(t.id, e === "var" ? Vt : Z, !1);
|
|
1054
1054
|
};
|
|
1055
|
-
var
|
|
1055
|
+
var ke = 1, yt = 2, Ps = 4;
|
|
1056
1056
|
b.parseFunction = function(t, e, s, i) {
|
|
1057
|
-
this.initFunction(t), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !i) && (this.type === o.star && e &
|
|
1057
|
+
this.initFunction(t), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !i) && (this.type === o.star && e & yt && this.unexpected(), t.generator = this.eat(o.star)), this.options.ecmaVersion >= 8 && (t.async = !!i), e & ke && (t.id = e & Ps && this.type !== o.name ? null : this.parseIdent(), t.id && !(e & yt) && this.checkLVal(t.id, this.strict || t.generator || t.async ? this.treatFunctionsAsVar ? Vt : Z : ks));
|
|
1058
1058
|
var r = this.yieldPos, n = this.awaitPos, a = this.awaitIdentPos;
|
|
1059
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
1059
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Rt(t.async, t.generator)), e & ke || (t.id = this.type === o.name ? this.parseIdent() : null), this.parseFunctionParams(t), this.parseFunctionBody(t, s, !1), this.yieldPos = r, this.awaitPos = n, this.awaitIdentPos = a, this.finishNode(t, e & ke ? "FunctionDeclaration" : "FunctionExpression");
|
|
1060
1060
|
};
|
|
1061
1061
|
b.parseFunctionParams = function(t) {
|
|
1062
1062
|
this.expect(o.parenL), t.params = this.parseBindingList(o.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
@@ -1091,7 +1091,7 @@ b.parseClassMethod = function(t, e, s, i) {
|
|
|
1091
1091
|
return t.value = this.parseMethod(e, s, i), this.finishNode(t, "MethodDefinition");
|
|
1092
1092
|
};
|
|
1093
1093
|
b.parseClassId = function(t, e) {
|
|
1094
|
-
this.type === o.name ? (t.id = this.parseIdent(), e && this.checkLVal(t.id,
|
|
1094
|
+
this.type === o.name ? (t.id = this.parseIdent(), e && this.checkLVal(t.id, Z, !1)) : (e === !0 && this.unexpected(), t.id = null);
|
|
1095
1095
|
};
|
|
1096
1096
|
b.parseClassSuper = function(t) {
|
|
1097
1097
|
t.superClass = this.eat(o._extends) ? this.parseExprSubscripts() : null;
|
|
@@ -1104,7 +1104,7 @@ b.parseExport = function(t, e) {
|
|
|
1104
1104
|
var s;
|
|
1105
1105
|
if (this.type === o._function || (s = this.isAsyncFunction())) {
|
|
1106
1106
|
var i = this.startNode();
|
|
1107
|
-
this.next(), s && this.next(), t.declaration = this.parseFunction(i,
|
|
1107
|
+
this.next(), s && this.next(), t.declaration = this.parseFunction(i, ke | Ps, !1, s);
|
|
1108
1108
|
} else if (this.type === o._class) {
|
|
1109
1109
|
var r = this.startNode();
|
|
1110
1110
|
t.declaration = this.parseClass(r, "nullableID");
|
|
@@ -1129,7 +1129,7 @@ b.parseExport = function(t, e) {
|
|
|
1129
1129
|
return this.finishNode(t, "ExportNamedDeclaration");
|
|
1130
1130
|
};
|
|
1131
1131
|
b.checkExport = function(t, e, s) {
|
|
1132
|
-
t && (
|
|
1132
|
+
t && (Je(t, e) && this.raiseRecoverable(s, "Duplicate export '" + e + "'"), t[e] = !0);
|
|
1133
1133
|
};
|
|
1134
1134
|
b.checkPatternExport = function(t, e) {
|
|
1135
1135
|
var s = e.type;
|
|
@@ -1170,18 +1170,18 @@ b.parseExportSpecifiers = function(t) {
|
|
|
1170
1170
|
return e;
|
|
1171
1171
|
};
|
|
1172
1172
|
b.parseImport = function(t) {
|
|
1173
|
-
return this.next(), this.type === o.string ? (t.specifiers =
|
|
1173
|
+
return this.next(), this.type === o.string ? (t.specifiers = qi, t.source = this.parseExprAtom()) : (t.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), t.source = this.type === o.string ? this.parseExprAtom() : this.unexpected()), this.semicolon(), this.finishNode(t, "ImportDeclaration");
|
|
1174
1174
|
};
|
|
1175
1175
|
b.parseImportSpecifiers = function() {
|
|
1176
1176
|
var t = [], e = !0;
|
|
1177
1177
|
if (this.type === o.name) {
|
|
1178
1178
|
var s = this.startNode();
|
|
1179
|
-
if (s.local = this.parseIdent(), this.checkLVal(s.local,
|
|
1179
|
+
if (s.local = this.parseIdent(), this.checkLVal(s.local, Z), t.push(this.finishNode(s, "ImportDefaultSpecifier")), !this.eat(o.comma))
|
|
1180
1180
|
return t;
|
|
1181
1181
|
}
|
|
1182
1182
|
if (this.type === o.star) {
|
|
1183
1183
|
var i = this.startNode();
|
|
1184
|
-
return this.next(), this.expectContextual("as"), i.local = this.parseIdent(), this.checkLVal(i.local,
|
|
1184
|
+
return this.next(), this.expectContextual("as"), i.local = this.parseIdent(), this.checkLVal(i.local, Z), t.push(this.finishNode(i, "ImportNamespaceSpecifier")), t;
|
|
1185
1185
|
}
|
|
1186
1186
|
for (this.expect(o.braceL); !this.eat(o.braceR); ) {
|
|
1187
1187
|
if (e)
|
|
@@ -1189,7 +1189,7 @@ b.parseImportSpecifiers = function() {
|
|
|
1189
1189
|
else if (this.expect(o.comma), this.afterTrailingComma(o.braceR))
|
|
1190
1190
|
break;
|
|
1191
1191
|
var r = this.startNode();
|
|
1192
|
-
r.imported = this.parseIdent(!0), this.eatContextual("as") ? r.local = this.parseIdent() : (this.checkUnreserved(r.imported), r.local = r.imported), this.checkLVal(r.local,
|
|
1192
|
+
r.imported = this.parseIdent(!0), this.eatContextual("as") ? r.local = this.parseIdent() : (this.checkUnreserved(r.imported), r.local = r.imported), this.checkLVal(r.local, Z), t.push(this.finishNode(r, "ImportSpecifier"));
|
|
1193
1193
|
}
|
|
1194
1194
|
return t;
|
|
1195
1195
|
};
|
|
@@ -1201,8 +1201,8 @@ b.isDirectiveCandidate = function(t) {
|
|
|
1201
1201
|
return t.type === "ExpressionStatement" && t.expression.type === "Literal" && typeof t.expression.value == "string" && // Reject parenthesized strings.
|
|
1202
1202
|
(this.input[t.start] === '"' || this.input[t.start] === "'");
|
|
1203
1203
|
};
|
|
1204
|
-
var
|
|
1205
|
-
|
|
1204
|
+
var te = A.prototype;
|
|
1205
|
+
te.toAssignable = function(t, e, s) {
|
|
1206
1206
|
if (this.options.ecmaVersion >= 6 && t)
|
|
1207
1207
|
switch (t.type) {
|
|
1208
1208
|
case "Identifier":
|
|
@@ -1248,7 +1248,7 @@ ee.toAssignable = function(t, e, s) {
|
|
|
1248
1248
|
else s && this.checkPatternErrors(s, !0);
|
|
1249
1249
|
return t;
|
|
1250
1250
|
};
|
|
1251
|
-
|
|
1251
|
+
te.toAssignableList = function(t, e) {
|
|
1252
1252
|
for (var s = t.length, i = 0; i < s; i++) {
|
|
1253
1253
|
var r = t[i];
|
|
1254
1254
|
r && this.toAssignable(r, e);
|
|
@@ -1259,15 +1259,15 @@ ee.toAssignableList = function(t, e) {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
return t;
|
|
1261
1261
|
};
|
|
1262
|
-
|
|
1262
|
+
te.parseSpread = function(t) {
|
|
1263
1263
|
var e = this.startNode();
|
|
1264
1264
|
return this.next(), e.argument = this.parseMaybeAssign(!1, t), this.finishNode(e, "SpreadElement");
|
|
1265
1265
|
};
|
|
1266
|
-
|
|
1266
|
+
te.parseRestBinding = function() {
|
|
1267
1267
|
var t = this.startNode();
|
|
1268
1268
|
return this.next(), this.options.ecmaVersion === 6 && this.type !== o.name && this.unexpected(), t.argument = this.parseBindingAtom(), this.finishNode(t, "RestElement");
|
|
1269
1269
|
};
|
|
1270
|
-
|
|
1270
|
+
te.parseBindingAtom = function() {
|
|
1271
1271
|
if (this.options.ecmaVersion >= 6)
|
|
1272
1272
|
switch (this.type) {
|
|
1273
1273
|
case o.bracketL:
|
|
@@ -1278,7 +1278,7 @@ ee.parseBindingAtom = function() {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
return this.parseIdent();
|
|
1280
1280
|
};
|
|
1281
|
-
|
|
1281
|
+
te.parseBindingList = function(t, e, s) {
|
|
1282
1282
|
for (var i = [], r = !0; !this.eat(t); )
|
|
1283
1283
|
if (r ? r = !1 : this.expect(o.comma), e && this.type === o.comma)
|
|
1284
1284
|
i.push(null);
|
|
@@ -1296,19 +1296,19 @@ ee.parseBindingList = function(t, e, s) {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
return i;
|
|
1298
1298
|
};
|
|
1299
|
-
|
|
1299
|
+
te.parseBindingListItem = function(t) {
|
|
1300
1300
|
return t;
|
|
1301
1301
|
};
|
|
1302
|
-
|
|
1302
|
+
te.parseMaybeDefault = function(t, e, s) {
|
|
1303
1303
|
if (s = s || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(o.eq))
|
|
1304
1304
|
return s;
|
|
1305
1305
|
var i = this.startNodeAt(t, e);
|
|
1306
1306
|
return i.left = s, i.right = this.parseMaybeAssign(), this.finishNode(i, "AssignmentPattern");
|
|
1307
1307
|
};
|
|
1308
|
-
|
|
1309
|
-
switch (e === void 0 && (e =
|
|
1308
|
+
te.checkLVal = function(t, e, s) {
|
|
1309
|
+
switch (e === void 0 && (e = Xt), t.type) {
|
|
1310
1310
|
case "Identifier":
|
|
1311
|
-
e ===
|
|
1311
|
+
e === Z && t.name === "let" && this.raiseRecoverable(t.start, "let is disallowed as a lexically bound name"), this.strict && this.reservedWordsStrictBind.test(t.name) && this.raiseRecoverable(t.start, (e ? "Binding " : "Assigning to ") + t.name + " in strict mode"), s && (Je(s, t.name) && this.raiseRecoverable(t.start, "Argument name clash"), s[t.name] = !0), e !== Xt && e !== As && this.declareName(t.name, e, t.start);
|
|
1312
1312
|
break;
|
|
1313
1313
|
case "ChainExpression":
|
|
1314
1314
|
this.raiseRecoverable(t.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -1344,7 +1344,7 @@ ee.checkLVal = function(t, e, s) {
|
|
|
1344
1344
|
this.raise(t.start, (e ? "Binding" : "Assigning to") + " rvalue");
|
|
1345
1345
|
}
|
|
1346
1346
|
};
|
|
1347
|
-
var y =
|
|
1347
|
+
var y = A.prototype;
|
|
1348
1348
|
y.checkPropClash = function(t, e, s) {
|
|
1349
1349
|
if (!(this.options.ecmaVersion >= 9 && t.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (t.computed || t.method || t.shorthand))) {
|
|
1350
1350
|
var i = t.key, r;
|
|
@@ -1394,7 +1394,7 @@ y.parseMaybeAssign = function(t, e, s) {
|
|
|
1394
1394
|
this.exprAllowed = !1;
|
|
1395
1395
|
}
|
|
1396
1396
|
var i = !1, r = -1, n = -1;
|
|
1397
|
-
e ? (r = e.parenthesizedAssign, n = e.trailingComma, e.parenthesizedAssign = e.trailingComma = -1) : (e = new
|
|
1397
|
+
e ? (r = e.parenthesizedAssign, n = e.trailingComma, e.parenthesizedAssign = e.trailingComma = -1) : (e = new Ye(), i = !0);
|
|
1398
1398
|
var a = this.start, u = this.startLoc;
|
|
1399
1399
|
(this.type === o.parenL || this.type === o.name) && (this.potentialArrowAt = this.start);
|
|
1400
1400
|
var c = this.parseMaybeConditional(t, e);
|
|
@@ -1480,7 +1480,7 @@ y.parseSubscript = function(t, e, s, i, r, n) {
|
|
|
1480
1480
|
var l = this.startNodeAt(e, s);
|
|
1481
1481
|
l.object = t, l.property = c ? this.parseExpression() : this.parseIdent(this.options.allowReserved !== "never"), l.computed = !!c, c && this.expect(o.bracketR), a && (l.optional = u), t = this.finishNode(l, "MemberExpression");
|
|
1482
1482
|
} else if (!i && this.eat(o.parenL)) {
|
|
1483
|
-
var h = new
|
|
1483
|
+
var h = new Ye(), p = this.yieldPos, f = this.awaitPos, d = this.awaitIdentPos;
|
|
1484
1484
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1485
1485
|
var m = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, h);
|
|
1486
1486
|
if (r && !u && !this.canInsertSemicolon() && this.eat(o.arrow))
|
|
@@ -1583,7 +1583,7 @@ y.parseParenAndDistinguishExpression = function(t) {
|
|
|
1583
1583
|
var e = this.start, s = this.startLoc, i, r = this.options.ecmaVersion >= 8;
|
|
1584
1584
|
if (this.options.ecmaVersion >= 6) {
|
|
1585
1585
|
this.next();
|
|
1586
|
-
var n = this.start, a = this.startLoc, u = [], c = !0, l = !1, h = new
|
|
1586
|
+
var n = this.start, a = this.startLoc, u = [], c = !0, l = !1, h = new Ye(), p = this.yieldPos, f = this.awaitPos, d;
|
|
1587
1587
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR; )
|
|
1588
1588
|
if (c ? c = !1 : this.expect(o.comma), r && this.afterTrailingComma(o.parenR, !0)) {
|
|
1589
1589
|
l = !0;
|
|
@@ -1611,7 +1611,7 @@ y.parseParenItem = function(t) {
|
|
|
1611
1611
|
y.parseParenArrowList = function(t, e, s) {
|
|
1612
1612
|
return this.parseArrowExpression(this.startNodeAt(t, e), s);
|
|
1613
1613
|
};
|
|
1614
|
-
var
|
|
1614
|
+
var Wi = [];
|
|
1615
1615
|
y.parseNew = function() {
|
|
1616
1616
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
1617
1617
|
var t = this.startNode(), e = this.parseIdent(!0);
|
|
@@ -1621,7 +1621,7 @@ y.parseNew = function() {
|
|
|
1621
1621
|
return t.property = this.parseIdent(!0), t.property.name !== "target" && this.raiseRecoverable(t.property.start, "The only valid meta property for new is 'new.target'"), s && this.raiseRecoverable(t.start, "'new.target' must not contain escaped characters"), this.inNonArrowFunction() || this.raiseRecoverable(t.start, "'new.target' can only be used in functions"), this.finishNode(t, "MetaProperty");
|
|
1622
1622
|
}
|
|
1623
1623
|
var i = this.start, r = this.startLoc, n = this.type === o._import;
|
|
1624
|
-
return t.callee = this.parseSubscripts(this.parseExprAtom(), i, r, !0), n && t.callee.type === "ImportExpression" && this.raise(i, "Cannot use new with import()"), this.eat(o.parenL) ? t.arguments = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1) : t.arguments =
|
|
1624
|
+
return t.callee = this.parseSubscripts(this.parseExprAtom(), i, r, !0), n && t.callee.type === "ImportExpression" && this.raise(i, "Cannot use new with import()"), this.eat(o.parenL) ? t.arguments = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1) : t.arguments = Wi, this.finishNode(t, "NewExpression");
|
|
1625
1625
|
};
|
|
1626
1626
|
y.parseTemplateElement = function(t) {
|
|
1627
1627
|
var e = t.isTagged, s = this.startNode();
|
|
@@ -1646,7 +1646,7 @@ y.parseTemplate = function(t) {
|
|
|
1646
1646
|
return this.next(), this.finishNode(s, "TemplateLiteral");
|
|
1647
1647
|
};
|
|
1648
1648
|
y.isAsyncProp = function(t) {
|
|
1649
|
-
return !t.computed && t.key.type === "Identifier" && t.key.name === "async" && (this.type === o.name || this.type === o.num || this.type === o.string || this.type === o.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === o.star) &&
|
|
1649
|
+
return !t.computed && t.key.type === "Identifier" && t.key.name === "async" && (this.type === o.name || this.type === o.num || this.type === o.string || this.type === o.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === o.star) && !U.test(this.input.slice(this.lastTokEnd, this.start));
|
|
1650
1650
|
};
|
|
1651
1651
|
y.parseObj = function(t, e) {
|
|
1652
1652
|
var s = this.startNode(), i = !0, r = {};
|
|
@@ -1696,11 +1696,11 @@ y.initFunction = function(t) {
|
|
|
1696
1696
|
};
|
|
1697
1697
|
y.parseMethod = function(t, e, s) {
|
|
1698
1698
|
var i = this.startNode(), r = this.yieldPos, n = this.awaitPos, a = this.awaitIdentPos;
|
|
1699
|
-
return this.initFunction(i), this.options.ecmaVersion >= 6 && (i.generator = t), this.options.ecmaVersion >= 8 && (i.async = !!e), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
1699
|
+
return this.initFunction(i), this.options.ecmaVersion >= 6 && (i.generator = t), this.options.ecmaVersion >= 8 && (i.async = !!e), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Rt(e, i.generator) | ws | (s ? Es : 0)), this.expect(o.parenL), i.params = this.parseBindingList(o.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(i, !1, !0), this.yieldPos = r, this.awaitPos = n, this.awaitIdentPos = a, this.finishNode(i, "FunctionExpression");
|
|
1700
1700
|
};
|
|
1701
1701
|
y.parseArrowExpression = function(t, e, s) {
|
|
1702
1702
|
var i = this.yieldPos, r = this.awaitPos, n = this.awaitIdentPos;
|
|
1703
|
-
return this.enterScope(
|
|
1703
|
+
return this.enterScope(Rt(s, !1) | Ss), this.initFunction(t), this.options.ecmaVersion >= 8 && (t.async = !!s), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, t.params = this.toAssignableList(e, !0), this.parseFunctionBody(t, !0, !1), this.yieldPos = i, this.awaitPos = r, this.awaitIdentPos = n, this.finishNode(t, "ArrowFunctionExpression");
|
|
1704
1704
|
};
|
|
1705
1705
|
y.parseFunctionBody = function(t, e, s) {
|
|
1706
1706
|
var i = e && this.type !== o.braceL, r = this.strict, n = !1;
|
|
@@ -1710,7 +1710,7 @@ y.parseFunctionBody = function(t, e, s) {
|
|
|
1710
1710
|
var a = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(t.params);
|
|
1711
1711
|
(!r || a) && (n = this.strictDirective(this.end), n && a && this.raiseRecoverable(t.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
1712
1712
|
var u = this.labels;
|
|
1713
|
-
this.labels = [], n && (this.strict = !0), this.checkParams(t, !r && !n && !e && !s && this.isSimpleParamList(t.params)), this.strict && t.id && this.checkLVal(t.id,
|
|
1713
|
+
this.labels = [], n && (this.strict = !0), this.checkParams(t, !r && !n && !e && !s && this.isSimpleParamList(t.params)), this.strict && t.id && this.checkLVal(t.id, As), t.body = this.parseBlock(!1, void 0, n && !r), t.expression = !1, this.adaptDirectivePrologue(t.body.body), this.labels = u;
|
|
1714
1714
|
}
|
|
1715
1715
|
this.exitScope();
|
|
1716
1716
|
};
|
|
@@ -1725,7 +1725,7 @@ y.isSimpleParamList = function(t) {
|
|
|
1725
1725
|
y.checkParams = function(t, e) {
|
|
1726
1726
|
for (var s = {}, i = 0, r = t.params; i < r.length; i += 1) {
|
|
1727
1727
|
var n = r[i];
|
|
1728
|
-
this.checkLVal(n,
|
|
1728
|
+
this.checkLVal(n, Vt, e ? null : s);
|
|
1729
1729
|
}
|
|
1730
1730
|
};
|
|
1731
1731
|
y.parseExprList = function(t, e, s, i) {
|
|
@@ -1760,49 +1760,49 @@ y.parseAwait = function() {
|
|
|
1760
1760
|
var t = this.startNode();
|
|
1761
1761
|
return this.next(), t.argument = this.parseMaybeUnary(null, !1), this.finishNode(t, "AwaitExpression");
|
|
1762
1762
|
};
|
|
1763
|
-
var
|
|
1764
|
-
|
|
1765
|
-
var s =
|
|
1763
|
+
var Ue = A.prototype;
|
|
1764
|
+
Ue.raise = function(t, e) {
|
|
1765
|
+
var s = bs(this.input, t);
|
|
1766
1766
|
e += " (" + s.line + ":" + s.column + ")";
|
|
1767
1767
|
var i = new SyntaxError(e);
|
|
1768
1768
|
throw i.pos = t, i.loc = s, i.raisedAt = this.pos, i;
|
|
1769
1769
|
};
|
|
1770
|
-
|
|
1771
|
-
|
|
1770
|
+
Ue.raiseRecoverable = Ue.raise;
|
|
1771
|
+
Ue.curPosition = function() {
|
|
1772
1772
|
if (this.options.locations)
|
|
1773
|
-
return new
|
|
1773
|
+
return new Te(this.curLine, this.pos - this.lineStart);
|
|
1774
1774
|
};
|
|
1775
|
-
var ae =
|
|
1775
|
+
var ae = A.prototype, Ki = function(e) {
|
|
1776
1776
|
this.flags = e, this.var = [], this.lexical = [], this.functions = [];
|
|
1777
1777
|
};
|
|
1778
1778
|
ae.enterScope = function(t) {
|
|
1779
|
-
this.scopeStack.push(new
|
|
1779
|
+
this.scopeStack.push(new Ki(t));
|
|
1780
1780
|
};
|
|
1781
1781
|
ae.exitScope = function() {
|
|
1782
1782
|
this.scopeStack.pop();
|
|
1783
1783
|
};
|
|
1784
1784
|
ae.treatFunctionsAsVarInScope = function(t) {
|
|
1785
|
-
return t.flags &
|
|
1785
|
+
return t.flags & Oe || !this.inModule && t.flags & Ne;
|
|
1786
1786
|
};
|
|
1787
1787
|
ae.declareName = function(t, e, s) {
|
|
1788
1788
|
var i = !1;
|
|
1789
|
-
if (e ===
|
|
1789
|
+
if (e === Z) {
|
|
1790
1790
|
var r = this.currentScope();
|
|
1791
|
-
i = r.lexical.indexOf(t) > -1 || r.functions.indexOf(t) > -1 || r.var.indexOf(t) > -1, r.lexical.push(t), this.inModule && r.flags &
|
|
1792
|
-
} else if (e ===
|
|
1791
|
+
i = r.lexical.indexOf(t) > -1 || r.functions.indexOf(t) > -1 || r.var.indexOf(t) > -1, r.lexical.push(t), this.inModule && r.flags & Ne && delete this.undefinedExports[t];
|
|
1792
|
+
} else if (e === Is) {
|
|
1793
1793
|
var n = this.currentScope();
|
|
1794
1794
|
n.lexical.push(t);
|
|
1795
|
-
} else if (e ===
|
|
1795
|
+
} else if (e === ks) {
|
|
1796
1796
|
var a = this.currentScope();
|
|
1797
1797
|
this.treatFunctionsAsVar ? i = a.lexical.indexOf(t) > -1 : i = a.lexical.indexOf(t) > -1 || a.var.indexOf(t) > -1, a.functions.push(t);
|
|
1798
1798
|
} else
|
|
1799
1799
|
for (var u = this.scopeStack.length - 1; u >= 0; --u) {
|
|
1800
1800
|
var c = this.scopeStack[u];
|
|
1801
|
-
if (c.lexical.indexOf(t) > -1 && !(c.flags &
|
|
1801
|
+
if (c.lexical.indexOf(t) > -1 && !(c.flags & Cs && c.lexical[0] === t) || !this.treatFunctionsAsVarInScope(c) && c.functions.indexOf(t) > -1) {
|
|
1802
1802
|
i = !0;
|
|
1803
1803
|
break;
|
|
1804
1804
|
}
|
|
1805
|
-
if (c.var.push(t), this.inModule && c.flags &
|
|
1805
|
+
if (c.var.push(t), this.inModule && c.flags & Ne && delete this.undefinedExports[t], c.flags & Nt)
|
|
1806
1806
|
break;
|
|
1807
1807
|
}
|
|
1808
1808
|
i && this.raiseRecoverable(s, "Identifier '" + t + "' has already been declared");
|
|
@@ -1816,59 +1816,59 @@ ae.currentScope = function() {
|
|
|
1816
1816
|
ae.currentVarScope = function() {
|
|
1817
1817
|
for (var t = this.scopeStack.length - 1; ; t--) {
|
|
1818
1818
|
var e = this.scopeStack[t];
|
|
1819
|
-
if (e.flags &
|
|
1819
|
+
if (e.flags & Nt)
|
|
1820
1820
|
return e;
|
|
1821
1821
|
}
|
|
1822
1822
|
};
|
|
1823
1823
|
ae.currentThisScope = function() {
|
|
1824
1824
|
for (var t = this.scopeStack.length - 1; ; t--) {
|
|
1825
1825
|
var e = this.scopeStack[t];
|
|
1826
|
-
if (e.flags &
|
|
1826
|
+
if (e.flags & Nt && !(e.flags & Ss))
|
|
1827
1827
|
return e;
|
|
1828
1828
|
}
|
|
1829
1829
|
};
|
|
1830
|
-
var
|
|
1831
|
-
this.type = "", this.start = s, this.end = 0, e.options.locations && (this.loc = new
|
|
1832
|
-
},
|
|
1833
|
-
|
|
1834
|
-
return new
|
|
1830
|
+
var Ft = function(e, s, i) {
|
|
1831
|
+
this.type = "", this.start = s, this.end = 0, e.options.locations && (this.loc = new Qe(e, i)), e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile), e.options.ranges && (this.range = [s, 0]);
|
|
1832
|
+
}, Xe = A.prototype;
|
|
1833
|
+
Xe.startNode = function() {
|
|
1834
|
+
return new Ft(this, this.start, this.startLoc);
|
|
1835
1835
|
};
|
|
1836
|
-
|
|
1837
|
-
return new
|
|
1836
|
+
Xe.startNodeAt = function(t, e) {
|
|
1837
|
+
return new Ft(this, t, e);
|
|
1838
1838
|
};
|
|
1839
|
-
function
|
|
1839
|
+
function Ts(t, e, s, i) {
|
|
1840
1840
|
return t.type = e, t.end = s, this.options.locations && (t.loc.end = i), this.options.ranges && (t.range[1] = s), t;
|
|
1841
1841
|
}
|
|
1842
|
-
|
|
1843
|
-
return
|
|
1842
|
+
Xe.finishNode = function(t, e) {
|
|
1843
|
+
return Ts.call(this, t, e, this.lastTokEnd, this.lastTokEndLoc);
|
|
1844
1844
|
};
|
|
1845
|
-
|
|
1846
|
-
return
|
|
1845
|
+
Xe.finishNodeAt = function(t, e, s, i) {
|
|
1846
|
+
return Ts.call(this, t, e, s, i);
|
|
1847
1847
|
};
|
|
1848
|
-
var
|
|
1848
|
+
var W = function(e, s, i, r, n) {
|
|
1849
1849
|
this.token = e, this.isExpr = !!s, this.preserveSpace = !!i, this.override = r, this.generator = !!n;
|
|
1850
1850
|
}, k = {
|
|
1851
|
-
b_stat: new
|
|
1852
|
-
b_expr: new
|
|
1853
|
-
b_tmpl: new
|
|
1854
|
-
p_stat: new
|
|
1855
|
-
p_expr: new
|
|
1856
|
-
q_tmpl: new
|
|
1851
|
+
b_stat: new W("{", !1),
|
|
1852
|
+
b_expr: new W("{", !0),
|
|
1853
|
+
b_tmpl: new W("${", !1),
|
|
1854
|
+
p_stat: new W("(", !1),
|
|
1855
|
+
p_expr: new W("(", !0),
|
|
1856
|
+
q_tmpl: new W("`", !0, !0, function(t) {
|
|
1857
1857
|
return t.tryReadTemplateToken();
|
|
1858
1858
|
}),
|
|
1859
|
-
f_stat: new
|
|
1860
|
-
f_expr: new
|
|
1861
|
-
f_expr_gen: new
|
|
1862
|
-
f_gen: new
|
|
1863
|
-
},
|
|
1864
|
-
|
|
1859
|
+
f_stat: new W("function", !1),
|
|
1860
|
+
f_expr: new W("function", !0),
|
|
1861
|
+
f_expr_gen: new W("function", !0, !1, null, !0),
|
|
1862
|
+
f_gen: new W("function", !1, !1, null, !0)
|
|
1863
|
+
}, Ze = A.prototype;
|
|
1864
|
+
Ze.initialContext = function() {
|
|
1865
1865
|
return [k.b_stat];
|
|
1866
1866
|
};
|
|
1867
|
-
|
|
1867
|
+
Ze.braceIsBlock = function(t) {
|
|
1868
1868
|
var e = this.curContext();
|
|
1869
|
-
return e === k.f_expr || e === k.f_stat ? !0 : t === o.colon && (e === k.b_stat || e === k.b_expr) ? !e.isExpr : t === o._return || t === o.name && this.exprAllowed ?
|
|
1869
|
+
return e === k.f_expr || e === k.f_stat ? !0 : t === o.colon && (e === k.b_stat || e === k.b_expr) ? !e.isExpr : t === o._return || t === o.name && this.exprAllowed ? U.test(this.input.slice(this.lastTokEnd, this.start)) : t === o._else || t === o.semi || t === o.eof || t === o.parenR || t === o.arrow ? !0 : t === o.braceL ? e === k.b_stat : t === o._var || t === o._const || t === o.name ? !1 : !this.exprAllowed;
|
|
1870
1870
|
};
|
|
1871
|
-
|
|
1871
|
+
Ze.inGeneratorContext = function() {
|
|
1872
1872
|
for (var t = this.context.length - 1; t >= 1; t--) {
|
|
1873
1873
|
var e = this.context[t];
|
|
1874
1874
|
if (e.token === "function")
|
|
@@ -1876,7 +1876,7 @@ Qe.inGeneratorContext = function() {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
return !1;
|
|
1878
1878
|
};
|
|
1879
|
-
|
|
1879
|
+
Ze.updateContext = function(t) {
|
|
1880
1880
|
var e, s = this.type;
|
|
1881
1881
|
s.keyword && t === o.dot ? this.exprAllowed = !1 : (e = s.updateContext) ? e.call(this, t) : this.exprAllowed = s.beforeExpr;
|
|
1882
1882
|
};
|
|
@@ -1901,7 +1901,7 @@ o.parenL.updateContext = function(t) {
|
|
|
1901
1901
|
o.incDec.updateContext = function() {
|
|
1902
1902
|
};
|
|
1903
1903
|
o._function.updateContext = o._class.updateContext = function(t) {
|
|
1904
|
-
t.beforeExpr && t !== o.semi && t !== o._else && !(t === o._return &&
|
|
1904
|
+
t.beforeExpr && t !== o.semi && t !== o._else && !(t === o._return && U.test(this.input.slice(this.lastTokEnd, this.start))) && !((t === o.colon || t === o.braceL) && this.curContext() === k.b_stat) ? this.context.push(k.f_expr) : this.context.push(k.f_stat), this.exprAllowed = !1;
|
|
1905
1905
|
};
|
|
1906
1906
|
o.backQuote.updateContext = function() {
|
|
1907
1907
|
this.curContext() === k.q_tmpl ? this.context.pop() : this.context.push(k.q_tmpl), this.exprAllowed = !1;
|
|
@@ -1917,39 +1917,39 @@ o.name.updateContext = function(t) {
|
|
|
1917
1917
|
var e = !1;
|
|
1918
1918
|
this.options.ecmaVersion >= 6 && t !== o.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (e = !0), this.exprAllowed = e;
|
|
1919
1919
|
};
|
|
1920
|
-
var
|
|
1921
|
-
9:
|
|
1922
|
-
10:
|
|
1920
|
+
var Ns = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", Rs = Ns + " Extended_Pictographic", zi = Rs, Ji = {
|
|
1921
|
+
9: Ns,
|
|
1922
|
+
10: Rs,
|
|
1923
1923
|
11: zi
|
|
1924
|
-
},
|
|
1925
|
-
9:
|
|
1926
|
-
10:
|
|
1927
|
-
11:
|
|
1928
|
-
},
|
|
1929
|
-
function
|
|
1930
|
-
var e =
|
|
1931
|
-
binary:
|
|
1924
|
+
}, Zt = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", Vs = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", Os = Vs + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", Qi = Os + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", Yi = {
|
|
1925
|
+
9: Vs,
|
|
1926
|
+
10: Os,
|
|
1927
|
+
11: Qi
|
|
1928
|
+
}, Fs = {};
|
|
1929
|
+
function Lt(t) {
|
|
1930
|
+
var e = Fs[t] = {
|
|
1931
|
+
binary: le(Ji[t] + " " + Zt),
|
|
1932
1932
|
nonBinary: {
|
|
1933
|
-
General_Category:
|
|
1934
|
-
Script:
|
|
1933
|
+
General_Category: le(Zt),
|
|
1934
|
+
Script: le(Yi[t])
|
|
1935
1935
|
}
|
|
1936
1936
|
};
|
|
1937
1937
|
e.nonBinary.Script_Extensions = e.nonBinary.Script, e.nonBinary.gc = e.nonBinary.General_Category, e.nonBinary.sc = e.nonBinary.Script, e.nonBinary.scx = e.nonBinary.Script_Extensions;
|
|
1938
1938
|
}
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
var v =
|
|
1943
|
-
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : ""), this.unicodeProperties =
|
|
1939
|
+
Lt(9);
|
|
1940
|
+
Lt(10);
|
|
1941
|
+
Lt(11);
|
|
1942
|
+
var v = A.prototype, se = function(e) {
|
|
1943
|
+
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : ""), this.unicodeProperties = Fs[e.options.ecmaVersion >= 11 ? 11 : e.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = [], this.backReferenceNames = [];
|
|
1944
1944
|
};
|
|
1945
|
-
|
|
1945
|
+
se.prototype.reset = function(e, s, i) {
|
|
1946
1946
|
var r = i.indexOf("u") !== -1;
|
|
1947
1947
|
this.start = e | 0, this.source = s + "", this.flags = i, this.switchU = r && this.parser.options.ecmaVersion >= 6, this.switchN = r && this.parser.options.ecmaVersion >= 9;
|
|
1948
1948
|
};
|
|
1949
|
-
|
|
1949
|
+
se.prototype.raise = function(e) {
|
|
1950
1950
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + e);
|
|
1951
1951
|
};
|
|
1952
|
-
|
|
1952
|
+
se.prototype.at = function(e, s) {
|
|
1953
1953
|
s === void 0 && (s = !1);
|
|
1954
1954
|
var i = this.source, r = i.length;
|
|
1955
1955
|
if (e >= r)
|
|
@@ -1960,7 +1960,7 @@ te.prototype.at = function(e, s) {
|
|
|
1960
1960
|
var a = i.charCodeAt(e + 1);
|
|
1961
1961
|
return a >= 56320 && a <= 57343 ? (n << 10) + a - 56613888 : n;
|
|
1962
1962
|
};
|
|
1963
|
-
|
|
1963
|
+
se.prototype.nextIndex = function(e, s) {
|
|
1964
1964
|
s === void 0 && (s = !1);
|
|
1965
1965
|
var i = this.source, r = i.length;
|
|
1966
1966
|
if (e >= r)
|
|
@@ -1968,19 +1968,19 @@ te.prototype.nextIndex = function(e, s) {
|
|
|
1968
1968
|
var n = i.charCodeAt(e), a;
|
|
1969
1969
|
return !(s || this.switchU) || n <= 55295 || n >= 57344 || e + 1 >= r || (a = i.charCodeAt(e + 1)) < 56320 || a > 57343 ? e + 1 : e + 2;
|
|
1970
1970
|
};
|
|
1971
|
-
|
|
1971
|
+
se.prototype.current = function(e) {
|
|
1972
1972
|
return e === void 0 && (e = !1), this.at(this.pos, e);
|
|
1973
1973
|
};
|
|
1974
|
-
|
|
1974
|
+
se.prototype.lookahead = function(e) {
|
|
1975
1975
|
return e === void 0 && (e = !1), this.at(this.nextIndex(this.pos, e), e);
|
|
1976
1976
|
};
|
|
1977
|
-
|
|
1977
|
+
se.prototype.advance = function(e) {
|
|
1978
1978
|
e === void 0 && (e = !1), this.pos = this.nextIndex(this.pos, e);
|
|
1979
1979
|
};
|
|
1980
|
-
|
|
1980
|
+
se.prototype.eat = function(e, s) {
|
|
1981
1981
|
return s === void 0 && (s = !1), this.current(s) === e ? (this.advance(s), !0) : !1;
|
|
1982
1982
|
};
|
|
1983
|
-
function
|
|
1983
|
+
function Ge(t) {
|
|
1984
1984
|
return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
|
|
1985
1985
|
}
|
|
1986
1986
|
v.validateRegExpFlags = function(t) {
|
|
@@ -2179,13 +2179,13 @@ v.regexp_eatInvalidBracedQuantifier = function(t) {
|
|
|
2179
2179
|
};
|
|
2180
2180
|
v.regexp_eatSyntaxCharacter = function(t) {
|
|
2181
2181
|
var e = t.current();
|
|
2182
|
-
return
|
|
2182
|
+
return Ls(e) ? (t.lastIntValue = e, t.advance(), !0) : !1;
|
|
2183
2183
|
};
|
|
2184
|
-
function
|
|
2184
|
+
function Ls(t) {
|
|
2185
2185
|
return t === 36 || t >= 40 && t <= 43 || t === 46 || t === 63 || t >= 91 && t <= 94 || t >= 123 && t <= 125;
|
|
2186
2186
|
}
|
|
2187
2187
|
v.regexp_eatPatternCharacters = function(t) {
|
|
2188
|
-
for (var e = t.pos, s = 0; (s = t.current()) !== -1 && !
|
|
2188
|
+
for (var e = t.pos, s = 0; (s = t.current()) !== -1 && !Ls(s); )
|
|
2189
2189
|
t.advance();
|
|
2190
2190
|
return t.pos !== e;
|
|
2191
2191
|
};
|
|
@@ -2221,8 +2221,8 @@ v.regexp_eatGroupName = function(t) {
|
|
|
2221
2221
|
};
|
|
2222
2222
|
v.regexp_eatRegExpIdentifierName = function(t) {
|
|
2223
2223
|
if (t.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(t)) {
|
|
2224
|
-
for (t.lastStringValue +=
|
|
2225
|
-
t.lastStringValue +=
|
|
2224
|
+
for (t.lastStringValue += Ge(t.lastIntValue); this.regexp_eatRegExpIdentifierPart(t); )
|
|
2225
|
+
t.lastStringValue += Ge(t.lastIntValue);
|
|
2226
2226
|
return !0;
|
|
2227
2227
|
}
|
|
2228
2228
|
return !1;
|
|
@@ -2236,9 +2236,9 @@ function Xi(t) {
|
|
|
2236
2236
|
}
|
|
2237
2237
|
v.regexp_eatRegExpIdentifierPart = function(t) {
|
|
2238
2238
|
var e = t.pos, s = this.options.ecmaVersion >= 11, i = t.current(s);
|
|
2239
|
-
return t.advance(s), i === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(t, s) && (i = t.lastIntValue),
|
|
2239
|
+
return t.advance(s), i === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(t, s) && (i = t.lastIntValue), Zi(i) ? (t.lastIntValue = i, !0) : (t.pos = e, !1);
|
|
2240
2240
|
};
|
|
2241
|
-
function
|
|
2241
|
+
function Zi(t) {
|
|
2242
2242
|
return ve(t, !0) || t === 36 || t === 95 || t === 8204 || t === 8205;
|
|
2243
2243
|
}
|
|
2244
2244
|
v.regexp_eatAtomEscape = function(t) {
|
|
@@ -2283,7 +2283,7 @@ v.regexp_eatCControlLetter = function(t) {
|
|
|
2283
2283
|
return !1;
|
|
2284
2284
|
};
|
|
2285
2285
|
v.regexp_eatZero = function(t) {
|
|
2286
|
-
return t.current() === 48 && !
|
|
2286
|
+
return t.current() === 48 && !et(t.lookahead()) ? (t.lastIntValue = 0, t.advance(), !0) : !1;
|
|
2287
2287
|
};
|
|
2288
2288
|
v.regexp_eatControlEscape = function(t) {
|
|
2289
2289
|
var e = t.current();
|
|
@@ -2291,9 +2291,9 @@ v.regexp_eatControlEscape = function(t) {
|
|
|
2291
2291
|
};
|
|
2292
2292
|
v.regexp_eatControlLetter = function(t) {
|
|
2293
2293
|
var e = t.current();
|
|
2294
|
-
return
|
|
2294
|
+
return js(e) ? (t.lastIntValue = e % 32, t.advance(), !0) : !1;
|
|
2295
2295
|
};
|
|
2296
|
-
function
|
|
2296
|
+
function js(t) {
|
|
2297
2297
|
return t >= 65 && t <= 90 || t >= 97 && t <= 122;
|
|
2298
2298
|
}
|
|
2299
2299
|
v.regexp_eatRegExpUnicodeEscapeSequence = function(t, e) {
|
|
@@ -2328,13 +2328,13 @@ v.regexp_eatRegExpUnicodeEscapeSequence = function(t, e) {
|
|
|
2328
2328
|
) && this.regexp_eatHexDigits(t) && t.eat(
|
|
2329
2329
|
125
|
|
2330
2330
|
/* } */
|
|
2331
|
-
) &&
|
|
2331
|
+
) && er(t.lastIntValue))
|
|
2332
2332
|
return !0;
|
|
2333
2333
|
i && t.raise("Invalid unicode escape"), t.pos = s;
|
|
2334
2334
|
}
|
|
2335
2335
|
return !1;
|
|
2336
2336
|
};
|
|
2337
|
-
function
|
|
2337
|
+
function er(t) {
|
|
2338
2338
|
return t >= 0 && t <= 1114111;
|
|
2339
2339
|
}
|
|
2340
2340
|
v.regexp_eatIdentityEscape = function(t) {
|
|
@@ -2359,7 +2359,7 @@ v.regexp_eatDecimalEscape = function(t) {
|
|
|
2359
2359
|
};
|
|
2360
2360
|
v.regexp_eatCharacterClassEscape = function(t) {
|
|
2361
2361
|
var e = t.current();
|
|
2362
|
-
if (
|
|
2362
|
+
if (tr(e))
|
|
2363
2363
|
return t.lastIntValue = -1, t.advance(), !0;
|
|
2364
2364
|
if (t.switchU && this.options.ecmaVersion >= 9 && (e === 80 || e === 112)) {
|
|
2365
2365
|
if (t.lastIntValue = -1, t.advance(), t.eat(
|
|
@@ -2374,7 +2374,7 @@ v.regexp_eatCharacterClassEscape = function(t) {
|
|
|
2374
2374
|
}
|
|
2375
2375
|
return !1;
|
|
2376
2376
|
};
|
|
2377
|
-
function
|
|
2377
|
+
function tr(t) {
|
|
2378
2378
|
return t === 100 || t === 68 || t === 115 || t === 83 || t === 119 || t === 87;
|
|
2379
2379
|
}
|
|
2380
2380
|
v.regexp_eatUnicodePropertyValueExpression = function(t) {
|
|
@@ -2396,28 +2396,28 @@ v.regexp_eatUnicodePropertyValueExpression = function(t) {
|
|
|
2396
2396
|
return !1;
|
|
2397
2397
|
};
|
|
2398
2398
|
v.regexp_validateUnicodePropertyNameAndValue = function(t, e, s) {
|
|
2399
|
-
|
|
2399
|
+
Je(t.unicodeProperties.nonBinary, e) || t.raise("Invalid property name"), t.unicodeProperties.nonBinary[e].test(s) || t.raise("Invalid property value");
|
|
2400
2400
|
};
|
|
2401
2401
|
v.regexp_validateUnicodePropertyNameOrValue = function(t, e) {
|
|
2402
2402
|
t.unicodeProperties.binary.test(e) || t.raise("Invalid property name");
|
|
2403
2403
|
};
|
|
2404
2404
|
v.regexp_eatUnicodePropertyName = function(t) {
|
|
2405
2405
|
var e = 0;
|
|
2406
|
-
for (t.lastStringValue = "";
|
|
2407
|
-
t.lastStringValue +=
|
|
2406
|
+
for (t.lastStringValue = ""; Ms(e = t.current()); )
|
|
2407
|
+
t.lastStringValue += Ge(e), t.advance();
|
|
2408
2408
|
return t.lastStringValue !== "";
|
|
2409
2409
|
};
|
|
2410
|
-
function
|
|
2411
|
-
return
|
|
2410
|
+
function Ms(t) {
|
|
2411
|
+
return js(t) || t === 95;
|
|
2412
2412
|
}
|
|
2413
2413
|
v.regexp_eatUnicodePropertyValue = function(t) {
|
|
2414
2414
|
var e = 0;
|
|
2415
|
-
for (t.lastStringValue = "";
|
|
2416
|
-
t.lastStringValue +=
|
|
2415
|
+
for (t.lastStringValue = ""; sr(e = t.current()); )
|
|
2416
|
+
t.lastStringValue += Ge(e), t.advance();
|
|
2417
2417
|
return t.lastStringValue !== "";
|
|
2418
2418
|
};
|
|
2419
|
-
function
|
|
2420
|
-
return
|
|
2419
|
+
function sr(t) {
|
|
2420
|
+
return Ms(t) || et(t);
|
|
2421
2421
|
}
|
|
2422
2422
|
v.regexp_eatLoneUnicodePropertyNameOrValue = function(t) {
|
|
2423
2423
|
return this.regexp_eatUnicodePropertyValue(t);
|
|
@@ -2461,7 +2461,7 @@ v.regexp_eatClassAtom = function(t) {
|
|
|
2461
2461
|
return !0;
|
|
2462
2462
|
if (t.switchU) {
|
|
2463
2463
|
var s = t.current();
|
|
2464
|
-
(s === 99 ||
|
|
2464
|
+
(s === 99 || Hs(s)) && t.raise("Invalid class escape"), t.raise("Invalid escape");
|
|
2465
2465
|
}
|
|
2466
2466
|
t.pos = e;
|
|
2467
2467
|
}
|
|
@@ -2492,7 +2492,7 @@ v.regexp_eatClassEscape = function(t) {
|
|
|
2492
2492
|
};
|
|
2493
2493
|
v.regexp_eatClassControlLetter = function(t) {
|
|
2494
2494
|
var e = t.current();
|
|
2495
|
-
return
|
|
2495
|
+
return et(e) || e === 95 ? (t.lastIntValue = e % 32, t.advance(), !0) : !1;
|
|
2496
2496
|
};
|
|
2497
2497
|
v.regexp_eatHexEscapeSequence = function(t) {
|
|
2498
2498
|
var e = t.pos;
|
|
@@ -2508,23 +2508,23 @@ v.regexp_eatHexEscapeSequence = function(t) {
|
|
|
2508
2508
|
};
|
|
2509
2509
|
v.regexp_eatDecimalDigits = function(t) {
|
|
2510
2510
|
var e = t.pos, s = 0;
|
|
2511
|
-
for (t.lastIntValue = 0;
|
|
2511
|
+
for (t.lastIntValue = 0; et(s = t.current()); )
|
|
2512
2512
|
t.lastIntValue = 10 * t.lastIntValue + (s - 48), t.advance();
|
|
2513
2513
|
return t.pos !== e;
|
|
2514
2514
|
};
|
|
2515
|
-
function
|
|
2515
|
+
function et(t) {
|
|
2516
2516
|
return t >= 48 && t <= 57;
|
|
2517
2517
|
}
|
|
2518
2518
|
v.regexp_eatHexDigits = function(t) {
|
|
2519
2519
|
var e = t.pos, s = 0;
|
|
2520
|
-
for (t.lastIntValue = 0;
|
|
2521
|
-
t.lastIntValue = 16 * t.lastIntValue +
|
|
2520
|
+
for (t.lastIntValue = 0; Ds(s = t.current()); )
|
|
2521
|
+
t.lastIntValue = 16 * t.lastIntValue + Bs(s), t.advance();
|
|
2522
2522
|
return t.pos !== e;
|
|
2523
2523
|
};
|
|
2524
|
-
function
|
|
2524
|
+
function Ds(t) {
|
|
2525
2525
|
return t >= 48 && t <= 57 || t >= 65 && t <= 70 || t >= 97 && t <= 102;
|
|
2526
2526
|
}
|
|
2527
|
-
function
|
|
2527
|
+
function Bs(t) {
|
|
2528
2528
|
return t >= 65 && t <= 70 ? 10 + (t - 65) : t >= 97 && t <= 102 ? 10 + (t - 97) : t - 48;
|
|
2529
2529
|
}
|
|
2530
2530
|
v.regexp_eatLegacyOctalEscapeSequence = function(t) {
|
|
@@ -2541,9 +2541,9 @@ v.regexp_eatLegacyOctalEscapeSequence = function(t) {
|
|
|
2541
2541
|
};
|
|
2542
2542
|
v.regexp_eatOctalDigit = function(t) {
|
|
2543
2543
|
var e = t.current();
|
|
2544
|
-
return
|
|
2544
|
+
return Hs(e) ? (t.lastIntValue = e - 48, t.advance(), !0) : (t.lastIntValue = 0, !1);
|
|
2545
2545
|
};
|
|
2546
|
-
function
|
|
2546
|
+
function Hs(t) {
|
|
2547
2547
|
return t >= 48 && t <= 55;
|
|
2548
2548
|
}
|
|
2549
2549
|
v.regexp_eatFixedHexDigits = function(t, e) {
|
|
@@ -2551,20 +2551,20 @@ v.regexp_eatFixedHexDigits = function(t, e) {
|
|
|
2551
2551
|
t.lastIntValue = 0;
|
|
2552
2552
|
for (var i = 0; i < e; ++i) {
|
|
2553
2553
|
var r = t.current();
|
|
2554
|
-
if (!
|
|
2554
|
+
if (!Ds(r))
|
|
2555
2555
|
return t.pos = s, !1;
|
|
2556
|
-
t.lastIntValue = 16 * t.lastIntValue +
|
|
2556
|
+
t.lastIntValue = 16 * t.lastIntValue + Bs(r), t.advance();
|
|
2557
2557
|
}
|
|
2558
2558
|
return !0;
|
|
2559
2559
|
};
|
|
2560
|
-
var
|
|
2561
|
-
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new
|
|
2562
|
-
}, _ =
|
|
2560
|
+
var jt = function(e) {
|
|
2561
|
+
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new Qe(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
|
|
2562
|
+
}, _ = A.prototype;
|
|
2563
2563
|
_.next = function(t) {
|
|
2564
|
-
!t && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new
|
|
2564
|
+
!t && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new jt(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2565
2565
|
};
|
|
2566
2566
|
_.getToken = function() {
|
|
2567
|
-
return this.next(), new
|
|
2567
|
+
return this.next(), new jt(this);
|
|
2568
2568
|
};
|
|
2569
2569
|
typeof Symbol < "u" && (_[Symbol.iterator] = function() {
|
|
2570
2570
|
var t = this;
|
|
@@ -2602,8 +2602,8 @@ _.fullCharCodeAtPos = function() {
|
|
|
2602
2602
|
_.skipBlockComment = function() {
|
|
2603
2603
|
var t = this.options.onComment && this.curPosition(), e = this.pos, s = this.input.indexOf("*/", this.pos += 2);
|
|
2604
2604
|
if (s === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = s + 2, this.options.locations) {
|
|
2605
|
-
|
|
2606
|
-
for (var i; (i =
|
|
2605
|
+
Pe.lastIndex = e;
|
|
2606
|
+
for (var i; (i = Pe.exec(this.input)) && i.index < this.pos; )
|
|
2607
2607
|
++this.curLine, this.lineStart = i.index + i[0].length;
|
|
2608
2608
|
}
|
|
2609
2609
|
this.options.onComment && this.options.onComment(
|
|
@@ -2616,7 +2616,7 @@ _.skipBlockComment = function() {
|
|
|
2616
2616
|
);
|
|
2617
2617
|
};
|
|
2618
2618
|
_.skipLineComment = function(t) {
|
|
2619
|
-
for (var e = this.pos, s = this.options.onComment && this.curPosition(), i = this.input.charCodeAt(this.pos += t); this.pos < this.input.length && !
|
|
2619
|
+
for (var e = this.pos, s = this.options.onComment && this.curPosition(), i = this.input.charCodeAt(this.pos += t); this.pos < this.input.length && !Ve(i); )
|
|
2620
2620
|
i = this.input.charCodeAt(++this.pos);
|
|
2621
2621
|
this.options.onComment && this.options.onComment(
|
|
2622
2622
|
!1,
|
|
@@ -2655,7 +2655,7 @@ _.skipSpace = function() {
|
|
|
2655
2655
|
}
|
|
2656
2656
|
break;
|
|
2657
2657
|
default:
|
|
2658
|
-
if (t > 8 && t < 14 || t >= 5760 &&
|
|
2658
|
+
if (t > 8 && t < 14 || t >= 5760 && xs.test(String.fromCharCode(t)))
|
|
2659
2659
|
++this.pos;
|
|
2660
2660
|
else
|
|
2661
2661
|
break e;
|
|
@@ -2700,7 +2700,7 @@ _.readToken_caret = function() {
|
|
|
2700
2700
|
};
|
|
2701
2701
|
_.readToken_plus_min = function(t) {
|
|
2702
2702
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2703
|
-
return e === t ? e === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 ||
|
|
2703
|
+
return e === t ? e === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || U.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(o.incDec, 2) : e === 61 ? this.finishOp(o.assign, 2) : this.finishOp(o.plusMin, 1);
|
|
2704
2704
|
};
|
|
2705
2705
|
_.readToken_lt_gt = function(t) {
|
|
2706
2706
|
var e = this.input.charCodeAt(this.pos + 1), s = 1;
|
|
@@ -2813,7 +2813,7 @@ _.getTokenFromCode = function(t) {
|
|
|
2813
2813
|
case 126:
|
|
2814
2814
|
return this.finishOp(o.prefix, 1);
|
|
2815
2815
|
}
|
|
2816
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
2816
|
+
this.raise(this.pos, "Unexpected character '" + Mt(t) + "'");
|
|
2817
2817
|
};
|
|
2818
2818
|
_.finishOp = function(t, e) {
|
|
2819
2819
|
var s = this.input.slice(this.pos, this.pos + e);
|
|
@@ -2823,7 +2823,7 @@ _.readRegexp = function() {
|
|
|
2823
2823
|
for (var t, e, s = this.pos; ; ) {
|
|
2824
2824
|
this.pos >= this.input.length && this.raise(s, "Unterminated regular expression");
|
|
2825
2825
|
var i = this.input.charAt(this.pos);
|
|
2826
|
-
if (
|
|
2826
|
+
if (U.test(i) && this.raise(s, "Unterminated regular expression"), t)
|
|
2827
2827
|
t = !1;
|
|
2828
2828
|
else {
|
|
2829
2829
|
if (i === "[")
|
|
@@ -2840,7 +2840,7 @@ _.readRegexp = function() {
|
|
|
2840
2840
|
++this.pos;
|
|
2841
2841
|
var n = this.pos, a = this.readWord1();
|
|
2842
2842
|
this.containsEsc && this.unexpected(n);
|
|
2843
|
-
var u = this.regexpState || (this.regexpState = new
|
|
2843
|
+
var u = this.regexpState || (this.regexpState = new se(this));
|
|
2844
2844
|
u.reset(s, r, a), this.validateRegExpFlags(u), this.validateRegExpPattern(u);
|
|
2845
2845
|
var c = null;
|
|
2846
2846
|
try {
|
|
@@ -2862,17 +2862,17 @@ _.readInt = function(t, e, s) {
|
|
|
2862
2862
|
}
|
|
2863
2863
|
return i && u === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === n || e != null && this.pos - n !== e ? null : a;
|
|
2864
2864
|
};
|
|
2865
|
-
function
|
|
2865
|
+
function ir(t, e) {
|
|
2866
2866
|
return e ? parseInt(t, 8) : parseFloat(t.replace(/_/g, ""));
|
|
2867
2867
|
}
|
|
2868
|
-
function
|
|
2868
|
+
function $s(t) {
|
|
2869
2869
|
return typeof BigInt != "function" ? null : BigInt(t.replace(/_/g, ""));
|
|
2870
2870
|
}
|
|
2871
2871
|
_.readRadixNumber = function(t) {
|
|
2872
2872
|
var e = this.pos;
|
|
2873
2873
|
this.pos += 2;
|
|
2874
2874
|
var s = this.readInt(t);
|
|
2875
|
-
return s == null && this.raise(this.start + 2, "Expected number in radix " + t), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (s =
|
|
2875
|
+
return s == null && this.raise(this.start + 2, "Expected number in radix " + t), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (s = $s(this.input.slice(e, this.pos)), ++this.pos) : ne(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(o.num, s);
|
|
2876
2876
|
};
|
|
2877
2877
|
_.readNumber = function(t) {
|
|
2878
2878
|
var e = this.pos;
|
|
@@ -2881,11 +2881,11 @@ _.readNumber = function(t) {
|
|
|
2881
2881
|
s && this.strict && this.raise(e, "Invalid number");
|
|
2882
2882
|
var i = this.input.charCodeAt(this.pos);
|
|
2883
2883
|
if (!s && !t && this.options.ecmaVersion >= 11 && i === 110) {
|
|
2884
|
-
var r =
|
|
2884
|
+
var r = $s(this.input.slice(e, this.pos));
|
|
2885
2885
|
return ++this.pos, ne(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(o.num, r);
|
|
2886
2886
|
}
|
|
2887
2887
|
s && /[89]/.test(this.input.slice(e, this.pos)) && (s = !1), i === 46 && !s && (++this.pos, this.readInt(10), i = this.input.charCodeAt(this.pos)), (i === 69 || i === 101) && !s && (i = this.input.charCodeAt(++this.pos), (i === 43 || i === 45) && ++this.pos, this.readInt(10) === null && this.raise(e, "Invalid number")), ne(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
2888
|
-
var n =
|
|
2888
|
+
var n = ir(this.input.slice(e, this.pos), s);
|
|
2889
2889
|
return this.finishToken(o.num, n);
|
|
2890
2890
|
};
|
|
2891
2891
|
_.readCodePoint = function() {
|
|
@@ -2898,7 +2898,7 @@ _.readCodePoint = function() {
|
|
|
2898
2898
|
e = this.readHexChar(4);
|
|
2899
2899
|
return e;
|
|
2900
2900
|
};
|
|
2901
|
-
function
|
|
2901
|
+
function Mt(t) {
|
|
2902
2902
|
return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
|
|
2903
2903
|
}
|
|
2904
2904
|
_.readString = function(t) {
|
|
@@ -2907,17 +2907,17 @@ _.readString = function(t) {
|
|
|
2907
2907
|
var i = this.input.charCodeAt(this.pos);
|
|
2908
2908
|
if (i === t)
|
|
2909
2909
|
break;
|
|
2910
|
-
i === 92 ? (e += this.input.slice(s, this.pos), e += this.readEscapedChar(!1), s = this.pos) : (
|
|
2910
|
+
i === 92 ? (e += this.input.slice(s, this.pos), e += this.readEscapedChar(!1), s = this.pos) : (Ve(i, this.options.ecmaVersion >= 10) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
|
|
2911
2911
|
}
|
|
2912
2912
|
return e += this.input.slice(s, this.pos++), this.finishToken(o.string, e);
|
|
2913
2913
|
};
|
|
2914
|
-
var
|
|
2914
|
+
var Us = {};
|
|
2915
2915
|
_.tryReadTemplateToken = function() {
|
|
2916
2916
|
this.inTemplateElement = !0;
|
|
2917
2917
|
try {
|
|
2918
2918
|
this.readTmplToken();
|
|
2919
2919
|
} catch (t) {
|
|
2920
|
-
if (t ===
|
|
2920
|
+
if (t === Us)
|
|
2921
2921
|
this.readInvalidTemplateToken();
|
|
2922
2922
|
else
|
|
2923
2923
|
throw t;
|
|
@@ -2926,7 +2926,7 @@ _.tryReadTemplateToken = function() {
|
|
|
2926
2926
|
};
|
|
2927
2927
|
_.invalidStringToken = function(t, e) {
|
|
2928
2928
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
2929
|
-
throw
|
|
2929
|
+
throw Us;
|
|
2930
2930
|
this.raise(t, e);
|
|
2931
2931
|
};
|
|
2932
2932
|
_.readTmplToken = function() {
|
|
@@ -2937,7 +2937,7 @@ _.readTmplToken = function() {
|
|
|
2937
2937
|
return this.pos === this.start && (this.type === o.template || this.type === o.invalidTemplate) ? s === 36 ? (this.pos += 2, this.finishToken(o.dollarBraceL)) : (++this.pos, this.finishToken(o.backQuote)) : (t += this.input.slice(e, this.pos), this.finishToken(o.template, t));
|
|
2938
2938
|
if (s === 92)
|
|
2939
2939
|
t += this.input.slice(e, this.pos), t += this.readEscapedChar(!0), e = this.pos;
|
|
2940
|
-
else if (
|
|
2940
|
+
else if (Ve(s)) {
|
|
2941
2941
|
switch (t += this.input.slice(e, this.pos), ++this.pos, s) {
|
|
2942
2942
|
case 13:
|
|
2943
2943
|
this.input.charCodeAt(this.pos) === 10 && ++this.pos;
|
|
@@ -2983,7 +2983,7 @@ _.readEscapedChar = function(t) {
|
|
|
2983
2983
|
return String.fromCharCode(this.readHexChar(2));
|
|
2984
2984
|
// 'x'
|
|
2985
2985
|
case 117:
|
|
2986
|
-
return
|
|
2986
|
+
return Mt(this.readCodePoint());
|
|
2987
2987
|
// 'u'
|
|
2988
2988
|
case 116:
|
|
2989
2989
|
return " ";
|
|
@@ -3019,7 +3019,7 @@ _.readEscapedChar = function(t) {
|
|
|
3019
3019
|
t ? "Octal literal in template string" : "Octal literal in strict mode"
|
|
3020
3020
|
), String.fromCharCode(r);
|
|
3021
3021
|
}
|
|
3022
|
-
return
|
|
3022
|
+
return Ve(e) ? "" : String.fromCharCode(e);
|
|
3023
3023
|
}
|
|
3024
3024
|
};
|
|
3025
3025
|
_.readHexChar = function(t) {
|
|
@@ -3037,7 +3037,7 @@ _.readWord1 = function() {
|
|
|
3037
3037
|
var n = this.pos;
|
|
3038
3038
|
this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
|
|
3039
3039
|
var a = this.readCodePoint();
|
|
3040
|
-
(e ? ne : ve)(a, i) || this.invalidStringToken(n, "Invalid Unicode escape"), t +=
|
|
3040
|
+
(e ? ne : ve)(a, i) || this.invalidStringToken(n, "Invalid Unicode escape"), t += Mt(a), s = this.pos;
|
|
3041
3041
|
} else
|
|
3042
3042
|
break;
|
|
3043
3043
|
e = !1;
|
|
@@ -3046,76 +3046,76 @@ _.readWord1 = function() {
|
|
|
3046
3046
|
};
|
|
3047
3047
|
_.readWord = function() {
|
|
3048
3048
|
var t = this.readWord1(), e = o.name;
|
|
3049
|
-
return this.keywords.test(t) && (e =
|
|
3050
|
-
};
|
|
3051
|
-
var
|
|
3052
|
-
|
|
3053
|
-
Parser:
|
|
3054
|
-
version:
|
|
3055
|
-
defaultOptions:
|
|
3056
|
-
Position:
|
|
3057
|
-
SourceLocation:
|
|
3058
|
-
getLineInfo:
|
|
3059
|
-
Node:
|
|
3049
|
+
return this.keywords.test(t) && (e = Tt[t]), this.finishToken(e, t);
|
|
3050
|
+
};
|
|
3051
|
+
var rr = "7.4.1";
|
|
3052
|
+
A.acorn = {
|
|
3053
|
+
Parser: A,
|
|
3054
|
+
version: rr,
|
|
3055
|
+
defaultOptions: bt,
|
|
3056
|
+
Position: Te,
|
|
3057
|
+
SourceLocation: Qe,
|
|
3058
|
+
getLineInfo: bs,
|
|
3059
|
+
Node: Ft,
|
|
3060
3060
|
TokenType: E,
|
|
3061
3061
|
tokTypes: o,
|
|
3062
|
-
keywordTypes:
|
|
3063
|
-
TokContext:
|
|
3062
|
+
keywordTypes: Tt,
|
|
3063
|
+
TokContext: W,
|
|
3064
3064
|
tokContexts: k,
|
|
3065
3065
|
isIdentifierChar: ve,
|
|
3066
3066
|
isIdentifierStart: ne,
|
|
3067
|
-
Token:
|
|
3068
|
-
isNewLine:
|
|
3069
|
-
lineBreak:
|
|
3070
|
-
lineBreakG:
|
|
3071
|
-
nonASCIIwhitespace:
|
|
3067
|
+
Token: jt,
|
|
3068
|
+
isNewLine: Ve,
|
|
3069
|
+
lineBreak: U,
|
|
3070
|
+
lineBreakG: Pe,
|
|
3071
|
+
nonASCIIwhitespace: xs
|
|
3072
3072
|
};
|
|
3073
|
-
function
|
|
3074
|
-
return
|
|
3073
|
+
function nr(t, e) {
|
|
3074
|
+
return A.parse(t, e);
|
|
3075
3075
|
}
|
|
3076
|
-
class
|
|
3076
|
+
class ar extends Error {
|
|
3077
3077
|
}
|
|
3078
|
-
class
|
|
3078
|
+
class or extends SyntaxError {
|
|
3079
3079
|
}
|
|
3080
|
-
class
|
|
3080
|
+
class _t extends ReferenceError {
|
|
3081
3081
|
}
|
|
3082
|
-
class
|
|
3082
|
+
class ur extends TypeError {
|
|
3083
3083
|
}
|
|
3084
|
-
class
|
|
3084
|
+
class Gs extends ar {
|
|
3085
3085
|
}
|
|
3086
|
-
class
|
|
3086
|
+
class cr extends or {
|
|
3087
3087
|
}
|
|
3088
|
-
class
|
|
3088
|
+
class K extends _t {
|
|
3089
3089
|
}
|
|
3090
3090
|
const V = {
|
|
3091
|
-
ExecutionTimeOutError: [3002, "Script execution timed out after %0ms",
|
|
3092
|
-
NodeTypeSyntaxError: [1001, "Unknown node type: %0",
|
|
3093
|
-
BinaryOperatorSyntaxError: [1002, "Unknown binary operator: %0",
|
|
3091
|
+
ExecutionTimeOutError: [3002, "Script execution timed out after %0ms", Gs],
|
|
3092
|
+
NodeTypeSyntaxError: [1001, "Unknown node type: %0", K],
|
|
3093
|
+
BinaryOperatorSyntaxError: [1002, "Unknown binary operator: %0", K],
|
|
3094
3094
|
LogicalOperatorSyntaxError: [
|
|
3095
3095
|
1003,
|
|
3096
3096
|
"Unknown logical operator: %0",
|
|
3097
|
-
|
|
3097
|
+
K
|
|
3098
3098
|
],
|
|
3099
|
-
UnaryOperatorSyntaxError: [1004, "Unknown unary operator: %0",
|
|
3100
|
-
UpdateOperatorSyntaxError: [1005, "Unknown update operator: %0",
|
|
3099
|
+
UnaryOperatorSyntaxError: [1004, "Unknown unary operator: %0", K],
|
|
3100
|
+
UpdateOperatorSyntaxError: [1005, "Unknown update operator: %0", K],
|
|
3101
3101
|
ObjectStructureSyntaxError: [
|
|
3102
3102
|
1006,
|
|
3103
3103
|
"Unknown object structure: %0",
|
|
3104
|
-
|
|
3104
|
+
K
|
|
3105
3105
|
],
|
|
3106
3106
|
AssignmentExpressionSyntaxError: [
|
|
3107
3107
|
1007,
|
|
3108
3108
|
"Unknown assignment expression: %0",
|
|
3109
|
-
|
|
3109
|
+
K
|
|
3110
3110
|
],
|
|
3111
|
-
VariableTypeSyntaxError: [1008, "Unknown variable type: %0",
|
|
3112
|
-
ParamTypeSyntaxError: [1009, "Unknown param type: %0",
|
|
3113
|
-
AssignmentTypeSyntaxError: [1010, "Unknown assignment type: %0",
|
|
3114
|
-
FunctionUndefinedReferenceError: [2001, "%0 is not a function",
|
|
3115
|
-
VariableUndefinedReferenceError: [2002, "%0 is not defined",
|
|
3116
|
-
IsNotConstructor: [2003, "%0 is not a constructor",
|
|
3117
|
-
},
|
|
3118
|
-
function
|
|
3111
|
+
VariableTypeSyntaxError: [1008, "Unknown variable type: %0", K],
|
|
3112
|
+
ParamTypeSyntaxError: [1009, "Unknown param type: %0", K],
|
|
3113
|
+
AssignmentTypeSyntaxError: [1010, "Unknown assignment type: %0", K],
|
|
3114
|
+
FunctionUndefinedReferenceError: [2001, "%0 is not a function", _t],
|
|
3115
|
+
VariableUndefinedReferenceError: [2002, "%0 is not defined", _t],
|
|
3116
|
+
IsNotConstructor: [2003, "%0 is not a constructor", ur]
|
|
3117
|
+
}, lr = "1.4.8";
|
|
3118
|
+
function es(t, e) {
|
|
3119
3119
|
Object.defineProperty(t, "name", {
|
|
3120
3120
|
value: e,
|
|
3121
3121
|
writable: !1,
|
|
@@ -3123,8 +3123,8 @@ function Xt(t, e) {
|
|
|
3123
3123
|
configurable: !0
|
|
3124
3124
|
});
|
|
3125
3125
|
}
|
|
3126
|
-
const
|
|
3127
|
-
function
|
|
3126
|
+
const hr = Object.prototype.hasOwnProperty, fe = Symbol("Break"), de = Symbol("Continue"), ts = Symbol("DefaultCase"), R = Symbol("EmptyStatementReturn"), ss = Symbol("WithScopeName"), is = Symbol("SuperScopeName"), rs = Symbol("RootScopeName"), ns = Symbol("GlobalScopeName");
|
|
3127
|
+
function ct(t) {
|
|
3128
3128
|
return typeof t == "function";
|
|
3129
3129
|
}
|
|
3130
3130
|
class re {
|
|
@@ -3151,7 +3151,7 @@ class re {
|
|
|
3151
3151
|
};
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
|
-
function
|
|
3154
|
+
function Dt(t, e, s = !0) {
|
|
3155
3155
|
if (!(t instanceof re))
|
|
3156
3156
|
throw new Error("Illegal call");
|
|
3157
3157
|
if (typeof e != "string")
|
|
@@ -3166,13 +3166,13 @@ function Ft(t, e, s = !0) {
|
|
|
3166
3166
|
}, a = s ? i.getGlobalScope() : i.getCurrentScope();
|
|
3167
3167
|
return new j(a, n).evaluate(e);
|
|
3168
3168
|
}
|
|
3169
|
-
Object.defineProperty(
|
|
3169
|
+
Object.defineProperty(Dt, "__IS_EVAL_FUNC", {
|
|
3170
3170
|
value: !0,
|
|
3171
3171
|
writable: !1,
|
|
3172
3172
|
enumerable: !1,
|
|
3173
3173
|
configurable: !1
|
|
3174
3174
|
});
|
|
3175
|
-
function
|
|
3175
|
+
function Bt(t, ...e) {
|
|
3176
3176
|
if (!(t instanceof re))
|
|
3177
3177
|
throw new Error("Illegal call");
|
|
3178
3178
|
const s = t.generator(), i = e.pop(), r = new j(s.getGlobalScope(), s.getOptions()), n = `
|
|
@@ -3182,18 +3182,18 @@ function Lt(t, ...e) {
|
|
|
3182
3182
|
`;
|
|
3183
3183
|
return r.evaluate(n);
|
|
3184
3184
|
}
|
|
3185
|
-
Object.defineProperty(
|
|
3185
|
+
Object.defineProperty(Bt, "__IS_FUNCTION_FUNC", {
|
|
3186
3186
|
value: !0,
|
|
3187
3187
|
writable: !1,
|
|
3188
3188
|
enumerable: !1,
|
|
3189
3189
|
configurable: !1
|
|
3190
3190
|
});
|
|
3191
|
-
class
|
|
3191
|
+
class Q {
|
|
3192
3192
|
constructor(e) {
|
|
3193
3193
|
this.value = e;
|
|
3194
3194
|
}
|
|
3195
3195
|
}
|
|
3196
|
-
class
|
|
3196
|
+
class ue {
|
|
3197
3197
|
constructor(e) {
|
|
3198
3198
|
this.value = e;
|
|
3199
3199
|
}
|
|
@@ -3208,15 +3208,15 @@ class me {
|
|
|
3208
3208
|
this.name = i, this.parent = s, this.data = e, this.labelStack = [];
|
|
3209
3209
|
}
|
|
3210
3210
|
}
|
|
3211
|
-
function
|
|
3211
|
+
function De() {
|
|
3212
3212
|
}
|
|
3213
|
-
function
|
|
3213
|
+
function pr(t = null, e) {
|
|
3214
3214
|
return new me(/* @__PURE__ */ Object.create(null), t, e);
|
|
3215
3215
|
}
|
|
3216
|
-
function
|
|
3216
|
+
function fr(t) {
|
|
3217
3217
|
return Object.create(t);
|
|
3218
3218
|
}
|
|
3219
|
-
const
|
|
3219
|
+
const Y = {
|
|
3220
3220
|
NaN: NaN,
|
|
3221
3221
|
Infinity: 1 / 0,
|
|
3222
3222
|
undefined: void 0,
|
|
@@ -3245,18 +3245,18 @@ const Q = {
|
|
|
3245
3245
|
encodeURIComponent,
|
|
3246
3246
|
escape,
|
|
3247
3247
|
unescape,
|
|
3248
|
-
eval:
|
|
3249
|
-
Function:
|
|
3250
|
-
};
|
|
3251
|
-
typeof JSON < "u" && (
|
|
3252
|
-
typeof Promise < "u" && (
|
|
3253
|
-
typeof Set < "u" && (
|
|
3254
|
-
typeof Map < "u" && (
|
|
3255
|
-
typeof Symbol < "u" && (
|
|
3256
|
-
typeof Proxy < "u" && (
|
|
3257
|
-
typeof WeakMap < "u" && (
|
|
3258
|
-
typeof WeakSet < "u" && (
|
|
3259
|
-
typeof Reflect < "u" && (
|
|
3248
|
+
eval: Dt,
|
|
3249
|
+
Function: Bt
|
|
3250
|
+
};
|
|
3251
|
+
typeof JSON < "u" && (Y.JSON = JSON);
|
|
3252
|
+
typeof Promise < "u" && (Y.Promise = Promise);
|
|
3253
|
+
typeof Set < "u" && (Y.Set = Set);
|
|
3254
|
+
typeof Map < "u" && (Y.Map = Map);
|
|
3255
|
+
typeof Symbol < "u" && (Y.Symbol = Symbol);
|
|
3256
|
+
typeof Proxy < "u" && (Y.Proxy = Proxy);
|
|
3257
|
+
typeof WeakMap < "u" && (Y.WeakMap = WeakMap);
|
|
3258
|
+
typeof WeakSet < "u" && (Y.WeakSet = WeakSet);
|
|
3259
|
+
typeof Reflect < "u" && (Y.Reflect = Reflect);
|
|
3260
3260
|
class j {
|
|
3261
3261
|
constructor(e = j.global, s = {}) {
|
|
3262
3262
|
this.sourceList = [], this.collectDeclVars = /* @__PURE__ */ Object.create(null), this.collectDeclFuncs = /* @__PURE__ */ Object.create(null), this.isVarDeclMode = !1, this.lastExecNode = null, this.isRunning = !1, this.options = {
|
|
@@ -3274,7 +3274,7 @@ class j {
|
|
|
3274
3274
|
else {
|
|
3275
3275
|
let r = null;
|
|
3276
3276
|
const n = this.createSuperScope(e);
|
|
3277
|
-
this.options.rootContext && (r = new me(
|
|
3277
|
+
this.options.rootContext && (r = new me(fr(this.options.rootContext), n, rs)), s = new me(e, r || n, ns);
|
|
3278
3278
|
}
|
|
3279
3279
|
this.globalScope = s, this.currentScope = this.globalScope, this.globalContext = s.data, this.currentContext = s.data, this.collectDeclVars = /* @__PURE__ */ Object.create(null), this.collectDeclFuncs = /* @__PURE__ */ Object.create(null), this.execStartTime = Date.now(), this.execEndTime = this.execStartTime;
|
|
3280
3280
|
const i = this.options._initEnv;
|
|
@@ -3302,13 +3302,13 @@ class j {
|
|
|
3302
3302
|
return this.currentContext;
|
|
3303
3303
|
}
|
|
3304
3304
|
isInterruptThrow(e) {
|
|
3305
|
-
return e instanceof
|
|
3305
|
+
return e instanceof Gs || e instanceof K || e instanceof cr;
|
|
3306
3306
|
}
|
|
3307
3307
|
createSuperScope(e) {
|
|
3308
|
-
let s = Object.assign({},
|
|
3308
|
+
let s = Object.assign({}, Y);
|
|
3309
3309
|
return Object.keys(s).forEach((r) => {
|
|
3310
3310
|
r in e && delete s[r];
|
|
3311
|
-
}), new me(s, null,
|
|
3311
|
+
}), new me(s, null, is);
|
|
3312
3312
|
}
|
|
3313
3313
|
setCurrentContext(e) {
|
|
3314
3314
|
this.currentContext = e;
|
|
@@ -3319,7 +3319,7 @@ class j {
|
|
|
3319
3319
|
evaluate(e = "") {
|
|
3320
3320
|
let s;
|
|
3321
3321
|
if (e)
|
|
3322
|
-
return s =
|
|
3322
|
+
return s = nr(e, {
|
|
3323
3323
|
ranges: !0,
|
|
3324
3324
|
locations: !0,
|
|
3325
3325
|
ecmaVersion: this.options.ecmaVersion || j.ecmaVersion
|
|
@@ -3641,7 +3641,7 @@ class j {
|
|
|
3641
3641
|
});
|
|
3642
3642
|
else {
|
|
3643
3643
|
const m = c.property, g = m.kind;
|
|
3644
|
-
m.key.type === "Identifier" && m.value.type === "FunctionExpression" && g === "init" && !m.value.id &&
|
|
3644
|
+
m.key.type === "Identifier" && m.value.type === "FunctionExpression" && g === "init" && !m.value.id && es(p, m.key.name), n[l] = p;
|
|
3645
3645
|
}
|
|
3646
3646
|
}
|
|
3647
3647
|
return n;
|
|
@@ -3668,7 +3668,7 @@ class j {
|
|
|
3668
3668
|
const s = this.createClosure(e.object), i = this.createMemberKeyGetter(e), r = this.source;
|
|
3669
3669
|
return () => {
|
|
3670
3670
|
const a = s(), u = i(), c = this.safeObjectGet(a, u, e);
|
|
3671
|
-
if (!c || !
|
|
3671
|
+
if (!c || !ct(c)) {
|
|
3672
3672
|
const l = r.slice(e.start, e.end);
|
|
3673
3673
|
throw this.createInternalThrowError(V.FunctionUndefinedReferenceError, l, e);
|
|
3674
3674
|
}
|
|
@@ -3680,13 +3680,13 @@ class j {
|
|
|
3680
3680
|
let a = "";
|
|
3681
3681
|
e.type === "Identifier" && (a = e.name);
|
|
3682
3682
|
const u = n();
|
|
3683
|
-
if (!u || !
|
|
3683
|
+
if (!u || !ct(u))
|
|
3684
3684
|
throw this.createInternalThrowError(V.FunctionUndefinedReferenceError, a, e);
|
|
3685
3685
|
if (e.type === "Identifier" && u.__IS_EVAL_FUNC && a === "eval")
|
|
3686
3686
|
return (l) => {
|
|
3687
|
-
const h = this.getScopeFromName(a, this.getCurrentScope()), p = h.name ===
|
|
3688
|
-
h.name ===
|
|
3689
|
-
h.name ===
|
|
3687
|
+
const h = this.getScopeFromName(a, this.getCurrentScope()), p = h.name === is || // !scope.parent || // super scope
|
|
3688
|
+
h.name === ns || // this.globalScope === scope ||
|
|
3689
|
+
h.name === rs;
|
|
3690
3690
|
return u(new re(this), l, !p);
|
|
3691
3691
|
};
|
|
3692
3692
|
if (u.__IS_EVAL_FUNC)
|
|
@@ -3696,7 +3696,7 @@ class j {
|
|
|
3696
3696
|
let c = this.options.globalContextInFunction;
|
|
3697
3697
|
if (e.type === "Identifier") {
|
|
3698
3698
|
const l = this.getIdentifierScope(e);
|
|
3699
|
-
l.name ===
|
|
3699
|
+
l.name === ss && (c = l.data);
|
|
3700
3700
|
}
|
|
3701
3701
|
return u.bind(c);
|
|
3702
3702
|
};
|
|
@@ -3715,17 +3715,17 @@ class j {
|
|
|
3715
3715
|
return this.collectDeclVars = r, this.collectDeclFuncs = n, () => {
|
|
3716
3716
|
const f = s.getCurrentScope(), d = function(...m) {
|
|
3717
3717
|
s.callStack.push(`${a}`);
|
|
3718
|
-
const g = s.getCurrentScope(), x =
|
|
3719
|
-
s.setCurrentScope(x), s.addDeclarationsToScope(h, p, x), a && (x.data[a] = d), x.data.arguments = arguments, c.forEach((
|
|
3720
|
-
x.data[
|
|
3718
|
+
const g = s.getCurrentScope(), x = pr(f, `FunctionScope(${a})`);
|
|
3719
|
+
s.setCurrentScope(x), s.addDeclarationsToScope(h, p, x), a && (x.data[a] = d), x.data.arguments = arguments, c.forEach((N, w) => {
|
|
3720
|
+
x.data[N()] = m[w];
|
|
3721
3721
|
});
|
|
3722
|
-
const
|
|
3722
|
+
const S = s.getCurrentContext();
|
|
3723
3723
|
s.setCurrentContext(this);
|
|
3724
|
-
const
|
|
3725
|
-
if (s.setCurrentContext(
|
|
3726
|
-
return
|
|
3724
|
+
const I = l();
|
|
3725
|
+
if (s.setCurrentContext(S), s.setCurrentScope(g), s.callStack.pop(), I instanceof Q)
|
|
3726
|
+
return I.value;
|
|
3727
3727
|
};
|
|
3728
|
-
return
|
|
3728
|
+
return es(d, a), Object.defineProperty(d, "length", {
|
|
3729
3729
|
value: u,
|
|
3730
3730
|
writable: !1,
|
|
3731
3731
|
enumerable: !1,
|
|
@@ -3748,7 +3748,7 @@ class j {
|
|
|
3748
3748
|
const s = this.source, i = this.createClosure(e.callee), r = e.arguments.map((n) => this.createClosure(n));
|
|
3749
3749
|
return () => {
|
|
3750
3750
|
const n = i();
|
|
3751
|
-
if (!
|
|
3751
|
+
if (!ct(n) || n.__IS_EVAL_FUNC) {
|
|
3752
3752
|
const a = e.callee, u = s.slice(a.start, a.end);
|
|
3753
3753
|
throw this.createInternalThrowError(V.IsNotConstructor, u, e);
|
|
3754
3754
|
}
|
|
@@ -3848,7 +3848,7 @@ class j {
|
|
|
3848
3848
|
enumerable: !1
|
|
3849
3849
|
}), this.funcDeclaration(e.id.name, s);
|
|
3850
3850
|
}
|
|
3851
|
-
return () =>
|
|
3851
|
+
return () => R;
|
|
3852
3852
|
}
|
|
3853
3853
|
getVariableName(e) {
|
|
3854
3854
|
if (e.type === "Identifier")
|
|
@@ -3877,7 +3877,7 @@ class j {
|
|
|
3877
3877
|
const r = this.isVarDeclMode;
|
|
3878
3878
|
this.isVarDeclMode = !0, s(), this.isVarDeclMode = r;
|
|
3879
3879
|
}
|
|
3880
|
-
return
|
|
3880
|
+
return R;
|
|
3881
3881
|
};
|
|
3882
3882
|
}
|
|
3883
3883
|
assertVariable(e, s, i) {
|
|
@@ -3888,10 +3888,10 @@ class j {
|
|
|
3888
3888
|
programHandler(e) {
|
|
3889
3889
|
const s = e.body.map((i) => this.createClosure(i));
|
|
3890
3890
|
return () => {
|
|
3891
|
-
let i =
|
|
3891
|
+
let i = R;
|
|
3892
3892
|
for (let r = 0; r < s.length; r++) {
|
|
3893
3893
|
const n = s[r], a = this.setValue(n());
|
|
3894
|
-
if (a !==
|
|
3894
|
+
if (a !== R && (i = a, i instanceof Q || i instanceof ue || i instanceof ie || i === fe || i === de))
|
|
3895
3895
|
break;
|
|
3896
3896
|
}
|
|
3897
3897
|
return i;
|
|
@@ -3902,18 +3902,18 @@ class j {
|
|
|
3902
3902
|
return this.createClosure(e.expression);
|
|
3903
3903
|
}
|
|
3904
3904
|
emptyStatementHandler(e) {
|
|
3905
|
-
return () =>
|
|
3905
|
+
return () => R;
|
|
3906
3906
|
}
|
|
3907
3907
|
// return xx;
|
|
3908
3908
|
returnStatementHandler(e) {
|
|
3909
|
-
const s = e.argument ? this.createClosure(e.argument) :
|
|
3910
|
-
return () => new
|
|
3909
|
+
const s = e.argument ? this.createClosure(e.argument) : De;
|
|
3910
|
+
return () => new Q(s());
|
|
3911
3911
|
}
|
|
3912
3912
|
// if else
|
|
3913
3913
|
ifStatementHandler(e) {
|
|
3914
3914
|
const s = this.createClosure(e.test), i = this.createClosure(e.consequent), r = e.alternate ? this.createClosure(e.alternate) : (
|
|
3915
3915
|
/*!important*/
|
|
3916
|
-
() =>
|
|
3916
|
+
() => R
|
|
3917
3917
|
);
|
|
3918
3918
|
return () => s() ? i() : r();
|
|
3919
3919
|
}
|
|
@@ -3923,21 +3923,21 @@ class j {
|
|
|
3923
3923
|
}
|
|
3924
3924
|
// for(var i = 0; i < 10; i++) {...}
|
|
3925
3925
|
forStatementHandler(e) {
|
|
3926
|
-
let s =
|
|
3926
|
+
let s = De, i = e.test ? this.createClosure(e.test) : () => !0, r = De;
|
|
3927
3927
|
const n = this.createClosure(e.body);
|
|
3928
|
-
return e.type === "ForStatement" && (s = e.init ? this.createClosure(e.init) : s, r = e.update ? this.createClosure(e.update) :
|
|
3929
|
-
let u, c =
|
|
3928
|
+
return e.type === "ForStatement" && (s = e.init ? this.createClosure(e.init) : s, r = e.update ? this.createClosure(e.update) : De), (a) => {
|
|
3929
|
+
let u, c = R, l = e.type === "DoWhileStatement";
|
|
3930
3930
|
for (a && a.type === "LabeledStatement" && (u = a.label.name), s(); l || i(); r()) {
|
|
3931
3931
|
l = !1;
|
|
3932
3932
|
const h = this.setValue(n());
|
|
3933
|
-
if (!(h ===
|
|
3933
|
+
if (!(h === R || h === de)) {
|
|
3934
3934
|
if (h === fe)
|
|
3935
3935
|
break;
|
|
3936
3936
|
if (c = h, c instanceof ie && c.value === u) {
|
|
3937
|
-
c =
|
|
3937
|
+
c = R;
|
|
3938
3938
|
continue;
|
|
3939
3939
|
}
|
|
3940
|
-
if (c instanceof
|
|
3940
|
+
if (c instanceof Q || c instanceof ue || c instanceof ie)
|
|
3941
3941
|
break;
|
|
3942
3942
|
}
|
|
3943
3943
|
}
|
|
@@ -3955,7 +3955,7 @@ class j {
|
|
|
3955
3955
|
let s = e.left;
|
|
3956
3956
|
const i = this.createClosure(e.right), r = this.createClosure(e.body);
|
|
3957
3957
|
return e.left.type === "VariableDeclaration" && (this.createClosure(e.left)(), s = e.left.declarations[0].id), (n) => {
|
|
3958
|
-
let a, u =
|
|
3958
|
+
let a, u = R, c;
|
|
3959
3959
|
n && n.type === "LabeledStatement" && (a = n.label.name);
|
|
3960
3960
|
const l = i();
|
|
3961
3961
|
for (c in l) {
|
|
@@ -3969,14 +3969,14 @@ class j {
|
|
|
3969
3969
|
}
|
|
3970
3970
|
})();
|
|
3971
3971
|
const h = this.setValue(r());
|
|
3972
|
-
if (!(h ===
|
|
3972
|
+
if (!(h === R || h === de)) {
|
|
3973
3973
|
if (h === fe)
|
|
3974
3974
|
break;
|
|
3975
3975
|
if (u = h, u instanceof ie && u.value === a) {
|
|
3976
|
-
u =
|
|
3976
|
+
u = R;
|
|
3977
3977
|
continue;
|
|
3978
3978
|
}
|
|
3979
|
-
if (u instanceof
|
|
3979
|
+
if (u instanceof Q || u instanceof ue || u instanceof ie)
|
|
3980
3980
|
break;
|
|
3981
3981
|
}
|
|
3982
3982
|
}
|
|
@@ -3986,7 +3986,7 @@ class j {
|
|
|
3986
3986
|
withStatementHandler(e) {
|
|
3987
3987
|
const s = this.createClosure(e.object), i = this.createClosure(e.body);
|
|
3988
3988
|
return () => {
|
|
3989
|
-
const r = s(), n = this.getCurrentScope(), a = new me(r, n,
|
|
3989
|
+
const r = s(), n = this.getCurrentScope(), a = new me(r, n, ss);
|
|
3990
3990
|
this.setCurrentScope(a);
|
|
3991
3991
|
const u = this.setValue(i());
|
|
3992
3992
|
return this.setCurrentScope(n), u;
|
|
@@ -4003,18 +4003,18 @@ class j {
|
|
|
4003
4003
|
const s = this.createClosure(e.block), i = e.handler ? this.catchClauseHandler(e.handler) : null, r = e.finalizer ? this.createClosure(e.finalizer) : null;
|
|
4004
4004
|
return () => {
|
|
4005
4005
|
const n = this.getCurrentScope(), a = this.getCurrentContext(), u = n.labelStack.concat([]), c = this.callStack.concat([]);
|
|
4006
|
-
let l =
|
|
4006
|
+
let l = R, h, p;
|
|
4007
4007
|
const f = () => {
|
|
4008
4008
|
this.setCurrentScope(n), this.setCurrentContext(a), n.labelStack = u, this.callStack = c;
|
|
4009
4009
|
};
|
|
4010
4010
|
try {
|
|
4011
|
-
l = this.setValue(s()), l instanceof
|
|
4011
|
+
l = this.setValue(s()), l instanceof Q && (h = l);
|
|
4012
4012
|
} catch (d) {
|
|
4013
4013
|
if (f(), this.isInterruptThrow(d))
|
|
4014
4014
|
throw d;
|
|
4015
4015
|
if (i)
|
|
4016
4016
|
try {
|
|
4017
|
-
l = this.setValue(i(d)), l instanceof
|
|
4017
|
+
l = this.setValue(i(d)), l instanceof Q && (h = l);
|
|
4018
4018
|
} catch (m) {
|
|
4019
4019
|
if (f(), this.isInterruptThrow(m))
|
|
4020
4020
|
throw m;
|
|
@@ -4023,7 +4023,7 @@ class j {
|
|
|
4023
4023
|
}
|
|
4024
4024
|
if (r)
|
|
4025
4025
|
try {
|
|
4026
|
-
l = r(), l instanceof
|
|
4026
|
+
l = r(), l instanceof Q && (h = l);
|
|
4027
4027
|
} catch (d) {
|
|
4028
4028
|
if (f(), this.isInterruptThrow(d))
|
|
4029
4029
|
throw d;
|
|
@@ -4039,7 +4039,7 @@ class j {
|
|
|
4039
4039
|
const s = this.createParamNameGetter(e.param), i = this.createClosure(e.body);
|
|
4040
4040
|
return (r) => {
|
|
4041
4041
|
let n;
|
|
4042
|
-
const u = this.getCurrentScope().data, c = s(), l =
|
|
4042
|
+
const u = this.getCurrentScope().data, c = s(), l = hr.call(u, c), h = u[c];
|
|
4043
4043
|
return u[c] = r, n = i(), l ? u[c] = h : delete u[c], n;
|
|
4044
4044
|
};
|
|
4045
4045
|
}
|
|
@@ -4047,7 +4047,7 @@ class j {
|
|
|
4047
4047
|
return () => e.label ? new ie(e.label.name) : de;
|
|
4048
4048
|
}
|
|
4049
4049
|
breakStatementHandler(e) {
|
|
4050
|
-
return () => e.label ? new
|
|
4050
|
+
return () => e.label ? new ue(e.label.name) : fe;
|
|
4051
4051
|
}
|
|
4052
4052
|
switchStatementHandler(e) {
|
|
4053
4053
|
const s = this.createClosure(e.discriminant), i = e.cases.map((r) => this.switchCaseHandler(r));
|
|
@@ -4057,10 +4057,10 @@ class j {
|
|
|
4057
4057
|
for (let h = 0; h < 2; h++) {
|
|
4058
4058
|
for (let p = c; p < i.length; p++) {
|
|
4059
4059
|
const f = i[p](), d = f.testClosure();
|
|
4060
|
-
if (!l && d ===
|
|
4061
|
-
if (n = !0, u = this.setValue(f.bodyClosure()), u ===
|
|
4060
|
+
if (!l && d === ts && (l = !0, c = p), n || d === r) {
|
|
4061
|
+
if (n = !0, u = this.setValue(f.bodyClosure()), u === R)
|
|
4062
4062
|
continue;
|
|
4063
|
-
if (u === fe || (a = u, a instanceof
|
|
4063
|
+
if (u === fe || (a = u, a instanceof Q || a instanceof ue || a instanceof ie || a === de))
|
|
4064
4064
|
break;
|
|
4065
4065
|
}
|
|
4066
4066
|
}
|
|
@@ -4073,7 +4073,7 @@ class j {
|
|
|
4073
4073
|
};
|
|
4074
4074
|
}
|
|
4075
4075
|
switchCaseHandler(e) {
|
|
4076
|
-
const s = e.test ? this.createClosure(e.test) : () =>
|
|
4076
|
+
const s = e.test ? this.createClosure(e.test) : () => ts, i = this.createClosure({
|
|
4077
4077
|
type: "BlockStatement",
|
|
4078
4078
|
body: e.consequent
|
|
4079
4079
|
});
|
|
@@ -4088,13 +4088,13 @@ class j {
|
|
|
4088
4088
|
return () => {
|
|
4089
4089
|
let r;
|
|
4090
4090
|
const n = this.getCurrentScope();
|
|
4091
|
-
return n.labelStack.push(s), r = i(e), r instanceof
|
|
4091
|
+
return n.labelStack.push(s), r = i(e), r instanceof ue && r.value === s && (r = R), n.labelStack.pop(), r;
|
|
4092
4092
|
};
|
|
4093
4093
|
}
|
|
4094
4094
|
debuggerStatementHandler(e) {
|
|
4095
4095
|
return () => {
|
|
4096
4096
|
debugger;
|
|
4097
|
-
return
|
|
4097
|
+
return R;
|
|
4098
4098
|
};
|
|
4099
4099
|
}
|
|
4100
4100
|
// get es3/5 param name
|
|
@@ -4167,26 +4167,26 @@ class j {
|
|
|
4167
4167
|
}
|
|
4168
4168
|
setValue(e) {
|
|
4169
4169
|
const s = this.callStack.length;
|
|
4170
|
-
return this.isVarDeclMode || s || e ===
|
|
4170
|
+
return this.isVarDeclMode || s || e === R || e === fe || e === de || e instanceof ue || e instanceof ie || (this.value = e instanceof Q ? e.value : e), e;
|
|
4171
4171
|
}
|
|
4172
4172
|
getValue() {
|
|
4173
4173
|
return this.value;
|
|
4174
4174
|
}
|
|
4175
4175
|
}
|
|
4176
|
-
j.version =
|
|
4177
|
-
j.eval =
|
|
4178
|
-
j.Function =
|
|
4176
|
+
j.version = lr;
|
|
4177
|
+
j.eval = Dt;
|
|
4178
|
+
j.Function = Bt;
|
|
4179
4179
|
j.ecmaVersion = 5;
|
|
4180
4180
|
j.globalContextInFunction = void 0;
|
|
4181
4181
|
j.global = /* @__PURE__ */ Object.create(null);
|
|
4182
|
-
const
|
|
4182
|
+
const dr = (() => {
|
|
4183
4183
|
try {
|
|
4184
4184
|
return new Function("return 1")(), !0;
|
|
4185
4185
|
} catch {
|
|
4186
4186
|
return !1;
|
|
4187
4187
|
}
|
|
4188
4188
|
})();
|
|
4189
|
-
function
|
|
4189
|
+
function qe(t) {
|
|
4190
4190
|
if (typeof globalThis > "u") return;
|
|
4191
4191
|
const e = globalThis[0] || globalThis;
|
|
4192
4192
|
if (e.__simulator__)
|
|
@@ -4196,13 +4196,13 @@ function xt(t) {
|
|
|
4196
4196
|
} catch {
|
|
4197
4197
|
}
|
|
4198
4198
|
}
|
|
4199
|
-
function
|
|
4199
|
+
function mr(t, e) {
|
|
4200
4200
|
return new j(e, {
|
|
4201
4201
|
rootContext: e,
|
|
4202
4202
|
globalContextInFunction: e
|
|
4203
4203
|
}).evaluate(`(function($scope){ ${t} }).call(this, this)`);
|
|
4204
4204
|
}
|
|
4205
|
-
function
|
|
4205
|
+
function Re(t, e, s = !1, i = !1, r = !1) {
|
|
4206
4206
|
try {
|
|
4207
4207
|
const n = ['"use strict";', "var __self = arguments[0];"];
|
|
4208
4208
|
n.push("return ");
|
|
@@ -4212,14 +4212,14 @@ function Ne(t, e, s = !1, i = !1, r = !1) {
|
|
|
4212
4212
|
const u = r ? `
|
|
4213
4213
|
${a}
|
|
4214
4214
|
` : `with(${s ? "{}" : "$scope || {}"}) { ${a} }`;
|
|
4215
|
-
return
|
|
4215
|
+
return dr ? new Function("$scope", u)(e) : mr(u, e);
|
|
4216
4216
|
} catch (n) {
|
|
4217
|
-
if (ge.error("parseExpression.error", n, t, e?.__self ?? e), n && (n.info = t.value),
|
|
4217
|
+
if (ge.error("parseExpression.error", n, t, e?.__self ?? e), n && (n.info = t.value), qe(n), i)
|
|
4218
4218
|
throw n;
|
|
4219
4219
|
}
|
|
4220
4220
|
}
|
|
4221
|
-
function
|
|
4222
|
-
const n =
|
|
4221
|
+
function J(t, e, s = !1, i = !1, r = !1) {
|
|
4222
|
+
const n = Re(t, e, s, i, r);
|
|
4223
4223
|
if (typeof n != "function" && (ge.error(
|
|
4224
4224
|
"parseFunction.error",
|
|
4225
4225
|
"not a function",
|
|
@@ -4235,13 +4235,13 @@ function T(t) {
|
|
|
4235
4235
|
function O(t) {
|
|
4236
4236
|
return typeof t == "object" && t && t.type === "JSFunction";
|
|
4237
4237
|
}
|
|
4238
|
-
function
|
|
4238
|
+
function gr(t) {
|
|
4239
4239
|
return T(t) || O(t);
|
|
4240
4240
|
}
|
|
4241
|
-
function
|
|
4242
|
-
return
|
|
4241
|
+
function Rn(t) {
|
|
4242
|
+
return gr(t) ? t.value.startsWith("{") ? `(${t.value})` : t.value : JSON.stringify(t);
|
|
4243
4243
|
}
|
|
4244
|
-
const
|
|
4244
|
+
const xr = {
|
|
4245
4245
|
session: !1,
|
|
4246
4246
|
authKey: "Authorization",
|
|
4247
4247
|
storageKey: "ACCESS_STORAGE",
|
|
@@ -4254,15 +4254,15 @@ const gr = {
|
|
|
4254
4254
|
noPermissionMessage: "无权限访问该页面",
|
|
4255
4255
|
appName: "",
|
|
4256
4256
|
statusKey: "code"
|
|
4257
|
-
},
|
|
4258
|
-
class
|
|
4257
|
+
}, qs = Symbol("access");
|
|
4258
|
+
class Ht {
|
|
4259
4259
|
options;
|
|
4260
4260
|
data = null;
|
|
4261
4261
|
mode = P.Raw;
|
|
4262
4262
|
interceptResponse = !0;
|
|
4263
4263
|
isTipShowing = !1;
|
|
4264
4264
|
constructor(e) {
|
|
4265
|
-
this.options = Object.assign({},
|
|
4265
|
+
this.options = Object.assign({}, xr, e), this.loadData();
|
|
4266
4266
|
}
|
|
4267
4267
|
enableIntercept() {
|
|
4268
4268
|
this.interceptResponse = !0;
|
|
@@ -4276,17 +4276,17 @@ class jt {
|
|
|
4276
4276
|
}
|
|
4277
4277
|
login(e) {
|
|
4278
4278
|
const { storageKey: s, storagePrefix: i, session: r, authKey: n } = this.options;
|
|
4279
|
-
this.setData(e), this.data && (
|
|
4279
|
+
this.setData(e), this.data && (rt.save(s, e, {
|
|
4280
4280
|
type: "local",
|
|
4281
4281
|
prefix: i
|
|
4282
|
-
}), r &&
|
|
4282
|
+
}), r && nt.set(n, this.data.token));
|
|
4283
4283
|
}
|
|
4284
4284
|
clear() {
|
|
4285
4285
|
const { storageKey: e, storagePrefix: s, session: i, authKey: r } = this.options;
|
|
4286
|
-
this.data = null,
|
|
4286
|
+
this.data = null, rt.remove(e, {
|
|
4287
4287
|
type: "local",
|
|
4288
4288
|
prefix: s
|
|
4289
|
-
}), i &&
|
|
4289
|
+
}), i && nt.remove(r);
|
|
4290
4290
|
}
|
|
4291
4291
|
logout() {
|
|
4292
4292
|
this.clear(), this.toLogin();
|
|
@@ -4301,19 +4301,19 @@ class jt {
|
|
|
4301
4301
|
const { appName: s } = this.options, { permissions: i = {} } = this.data || {};
|
|
4302
4302
|
if (typeof e == "function")
|
|
4303
4303
|
return e(i);
|
|
4304
|
-
const r =
|
|
4304
|
+
const r = qt(e);
|
|
4305
4305
|
return Array.isArray(i) ? r.every(
|
|
4306
4306
|
(n) => i.includes(n) || i.includes(s + "." + n)
|
|
4307
4307
|
) : r.every((n) => i[n] || i[s + "." + n]);
|
|
4308
4308
|
}
|
|
4309
4309
|
some(e) {
|
|
4310
|
-
const { appName: s } = this.options, { permissions: i = {} } = this.data || {}, r =
|
|
4310
|
+
const { appName: s } = this.options, { permissions: i = {} } = this.data || {}, r = qt(e);
|
|
4311
4311
|
return Array.isArray(i) ? r.some(
|
|
4312
4312
|
(n) => i.includes(n) || i.includes(s + "." + n)
|
|
4313
4313
|
) : r.some((n) => i[n] || i[s + "." + n]);
|
|
4314
4314
|
}
|
|
4315
4315
|
install(e) {
|
|
4316
|
-
e.config.globalProperties.$access = this, e.provide(
|
|
4316
|
+
e.config.globalProperties.$access = this, e.provide(qs, this);
|
|
4317
4317
|
}
|
|
4318
4318
|
isAuthPath(e) {
|
|
4319
4319
|
const { auth: s, isAuth: i } = this.options;
|
|
@@ -4334,7 +4334,7 @@ class jt {
|
|
|
4334
4334
|
setData(e) {
|
|
4335
4335
|
const { privateKey: s } = this.options;
|
|
4336
4336
|
if (Array.isArray(e) && s) {
|
|
4337
|
-
const i = e.map((r) =>
|
|
4337
|
+
const i = e.map((r) => Wt(r, s));
|
|
4338
4338
|
try {
|
|
4339
4339
|
this.data = JSON.parse(i.join(""));
|
|
4340
4340
|
} catch (r) {
|
|
@@ -4344,7 +4344,7 @@ class jt {
|
|
|
4344
4344
|
}
|
|
4345
4345
|
if (typeof e == "string")
|
|
4346
4346
|
try {
|
|
4347
|
-
const i = s ?
|
|
4347
|
+
const i = s ? Wt(e, s) : e;
|
|
4348
4348
|
i ? this.data = JSON.parse(i) : console.warn("RSA解密失败或登录信息缺失");
|
|
4349
4349
|
} catch (i) {
|
|
4350
4350
|
console.warn(i);
|
|
@@ -4353,7 +4353,7 @@ class jt {
|
|
|
4353
4353
|
this.data = e;
|
|
4354
4354
|
}
|
|
4355
4355
|
loadData() {
|
|
4356
|
-
const { storageKey: e, storagePrefix: s } = this.options, i =
|
|
4356
|
+
const { storageKey: e, storagePrefix: s } = this.options, i = rt.get(e, {
|
|
4357
4357
|
type: "local",
|
|
4358
4358
|
prefix: s
|
|
4359
4359
|
});
|
|
@@ -4361,10 +4361,10 @@ class jt {
|
|
|
4361
4361
|
}
|
|
4362
4362
|
isLogined() {
|
|
4363
4363
|
const { session: e, authKey: s } = this.options;
|
|
4364
|
-
return e && s ? !!
|
|
4364
|
+
return e && s ? !!nt.get(s) : !!this.getToken();
|
|
4365
4365
|
}
|
|
4366
4366
|
hasRoutePermission(e) {
|
|
4367
|
-
if (e.name ===
|
|
4367
|
+
if (e.name === Ee) {
|
|
4368
4368
|
const s = e.params.id;
|
|
4369
4369
|
return s && this.can(s);
|
|
4370
4370
|
}
|
|
@@ -4381,10 +4381,10 @@ class jt {
|
|
|
4381
4381
|
return s();
|
|
4382
4382
|
{
|
|
4383
4383
|
const { noPermissionMessage: i = "无权限访问", unauthorized: r = !1 } = this.options;
|
|
4384
|
-
return await this.showTip(i), z(r) ? (r(), s(!1)) :
|
|
4384
|
+
return await this.showTip(i), z(r) ? (r(), s(!1)) : ee(r) ? s(r) : s(!1);
|
|
4385
4385
|
}
|
|
4386
4386
|
}
|
|
4387
|
-
s(!1), await
|
|
4387
|
+
s(!1), await Ie(0), this.toLogin();
|
|
4388
4388
|
}
|
|
4389
4389
|
isWhiteList(e) {
|
|
4390
4390
|
const { whiteList: s } = this.options;
|
|
@@ -4400,7 +4400,7 @@ class jt {
|
|
|
4400
4400
|
}
|
|
4401
4401
|
async showTip(e) {
|
|
4402
4402
|
const { alert: s } = this.options;
|
|
4403
|
-
return this.isTipShowing ? !1 : s ? (this.isTipShowing = !0, await
|
|
4403
|
+
return this.isTipShowing ? !1 : s ? (this.isTipShowing = !0, await Ie(150), await s(e, {
|
|
4404
4404
|
title: "提示",
|
|
4405
4405
|
type: "warning"
|
|
4406
4406
|
})?.catch(() => !0)?.finally(() => {
|
|
@@ -4418,10 +4418,10 @@ class jt {
|
|
|
4418
4418
|
);
|
|
4419
4419
|
}
|
|
4420
4420
|
}
|
|
4421
|
-
function
|
|
4422
|
-
return
|
|
4421
|
+
function vr() {
|
|
4422
|
+
return It(qs, null);
|
|
4423
4423
|
}
|
|
4424
|
-
function
|
|
4424
|
+
function Vn(t = {}) {
|
|
4425
4425
|
const {
|
|
4426
4426
|
notify: e,
|
|
4427
4427
|
loading: s,
|
|
@@ -4433,7 +4433,7 @@ function Rn(t = {}) {
|
|
|
4433
4433
|
} = t;
|
|
4434
4434
|
let c = null;
|
|
4435
4435
|
return {
|
|
4436
|
-
request:
|
|
4436
|
+
request: os({
|
|
4437
4437
|
adapter: t.axiosAdapter,
|
|
4438
4438
|
settings: {
|
|
4439
4439
|
type: "form",
|
|
@@ -4454,19 +4454,19 @@ function Rn(t = {}) {
|
|
|
4454
4454
|
...i
|
|
4455
4455
|
}
|
|
4456
4456
|
}),
|
|
4457
|
-
jsonp:
|
|
4457
|
+
jsonp: us,
|
|
4458
4458
|
notify: e,
|
|
4459
4459
|
loading: s,
|
|
4460
4460
|
useTitle: a,
|
|
4461
4461
|
alert: u,
|
|
4462
4462
|
startupComponent: r,
|
|
4463
|
-
access: n ? new
|
|
4463
|
+
access: n ? new Ht({ alert: u, ...n }) : void 0
|
|
4464
4464
|
};
|
|
4465
4465
|
}
|
|
4466
|
-
function
|
|
4467
|
-
return new
|
|
4466
|
+
function On(t = {}) {
|
|
4467
|
+
return new Ht(t);
|
|
4468
4468
|
}
|
|
4469
|
-
function
|
|
4469
|
+
function br(t, e) {
|
|
4470
4470
|
const { jsonp: s, request: i } = e;
|
|
4471
4471
|
if (t.method === "jsonp")
|
|
4472
4472
|
return (r = {}) => s(t.url, {
|
|
@@ -4474,7 +4474,7 @@ function vr(t, e) {
|
|
|
4474
4474
|
query: r
|
|
4475
4475
|
});
|
|
4476
4476
|
{
|
|
4477
|
-
const r = t.headers ?
|
|
4477
|
+
const r = t.headers ? Re(t.headers, {}, !0) : void 0, n = {
|
|
4478
4478
|
url: t.url,
|
|
4479
4479
|
method: t.method,
|
|
4480
4480
|
settings: {
|
|
@@ -4482,10 +4482,10 @@ function vr(t, e) {
|
|
|
4482
4482
|
headers: r
|
|
4483
4483
|
}
|
|
4484
4484
|
};
|
|
4485
|
-
return (a, u) => (delete n.data, i.send(
|
|
4485
|
+
return (a, u) => (delete n.data, i.send(ni(n, u || {}, { data: a })));
|
|
4486
4486
|
}
|
|
4487
4487
|
}
|
|
4488
|
-
function
|
|
4488
|
+
function yr(t, e) {
|
|
4489
4489
|
const { metaQuery: s } = e;
|
|
4490
4490
|
if (!s) return;
|
|
4491
4491
|
const { code: i, queryCode: r } = t;
|
|
@@ -4497,22 +4497,22 @@ function br(t, e) {
|
|
|
4497
4497
|
return s(i, r, n, a);
|
|
4498
4498
|
};
|
|
4499
4499
|
}
|
|
4500
|
-
function
|
|
4500
|
+
function _r(t = [], e = [], s) {
|
|
4501
4501
|
const i = {};
|
|
4502
4502
|
for (const r of t) {
|
|
4503
|
-
const n =
|
|
4503
|
+
const n = br(r, s);
|
|
4504
4504
|
i[r.id] = n, i[r.name] = n;
|
|
4505
4505
|
}
|
|
4506
4506
|
for (const r of e)
|
|
4507
|
-
i[r.id] =
|
|
4507
|
+
i[r.id] = yr(r, s);
|
|
4508
4508
|
return i;
|
|
4509
4509
|
}
|
|
4510
|
-
async function
|
|
4511
|
-
const s =
|
|
4512
|
-
s && (
|
|
4510
|
+
async function Sr(t = [], e = globalThis) {
|
|
4511
|
+
const s = Ae(e);
|
|
4512
|
+
s && (Ws(e), t.forEach((i) => wr(s, i)));
|
|
4513
4513
|
}
|
|
4514
|
-
function
|
|
4515
|
-
const s = O(t.mockTemplate) && t.mockTemplate.value ?
|
|
4514
|
+
function Cr(t, e = globalThis) {
|
|
4515
|
+
const s = O(t.mockTemplate) && t.mockTemplate.value ? J(t.mockTemplate, {}, !0) : void 0, i = Ae(e);
|
|
4516
4516
|
return async (...r) => {
|
|
4517
4517
|
let n = {};
|
|
4518
4518
|
if (s)
|
|
@@ -4524,36 +4524,36 @@ function Sr(t, e = globalThis) {
|
|
|
4524
4524
|
return i?.mock(n);
|
|
4525
4525
|
};
|
|
4526
4526
|
}
|
|
4527
|
-
function
|
|
4527
|
+
function wr(t, e) {
|
|
4528
4528
|
if (!e.mock) return;
|
|
4529
4529
|
const { url: s, mockTemplate: i, method: r = "get", settings: n = {} } = e;
|
|
4530
4530
|
if (s && i)
|
|
4531
4531
|
try {
|
|
4532
|
-
const a =
|
|
4532
|
+
const a = dt(s) ? new URL(s).pathname : s, u = ai(`(.*)${a}`, [], { end: !1 }), c = new RegExp(
|
|
4533
4533
|
u.source + "([?#].*)?$",
|
|
4534
4534
|
u.flags
|
|
4535
|
-
), l =
|
|
4535
|
+
), l = oi(a, { decode: decodeURIComponent }), h = Re(i, {}, !0);
|
|
4536
4536
|
t.mock(
|
|
4537
4537
|
c,
|
|
4538
4538
|
r.toLowerCase(),
|
|
4539
4539
|
(p) => {
|
|
4540
|
-
const f =
|
|
4541
|
-
let m = p.body instanceof FormData ?
|
|
4540
|
+
const f = he.parse(p.url) || {}, d = n.type || "form";
|
|
4541
|
+
let m = p.body instanceof FormData ? ui(p.body) : p.body;
|
|
4542
4542
|
if (typeof m == "string")
|
|
4543
4543
|
if (d === "json")
|
|
4544
4544
|
try {
|
|
4545
4545
|
m = JSON.parse(m);
|
|
4546
|
-
} catch (
|
|
4547
|
-
console.warn("[Mock.mock]",
|
|
4546
|
+
} catch (S) {
|
|
4547
|
+
console.warn("[Mock.mock]", S);
|
|
4548
4548
|
}
|
|
4549
4549
|
else
|
|
4550
|
-
m =
|
|
4551
|
-
const g =
|
|
4550
|
+
m = he.parse(m);
|
|
4551
|
+
const g = dt(p.url) ? new URL(p.url).pathname : p.url.split("?")[0], x = l(g)?.params;
|
|
4552
4552
|
Object.assign(p, { data: m, params: x, query: f });
|
|
4553
4553
|
try {
|
|
4554
4554
|
return t.mock(h(p));
|
|
4555
|
-
} catch (
|
|
4556
|
-
return console.warn("[mockApi]", c, p,
|
|
4555
|
+
} catch (S) {
|
|
4556
|
+
return console.warn("[mockApi]", c, p, S), null;
|
|
4557
4557
|
}
|
|
4558
4558
|
}
|
|
4559
4559
|
);
|
|
@@ -4561,11 +4561,11 @@ function Cr(t, e) {
|
|
|
4561
4561
|
console.warn("mockApi", a);
|
|
4562
4562
|
}
|
|
4563
4563
|
}
|
|
4564
|
-
function
|
|
4565
|
-
const e =
|
|
4564
|
+
function Ws(t = globalThis) {
|
|
4565
|
+
const e = Ae(t);
|
|
4566
4566
|
e && (e._mocked = {});
|
|
4567
4567
|
}
|
|
4568
|
-
class
|
|
4568
|
+
class Er {
|
|
4569
4569
|
__id = null;
|
|
4570
4570
|
__mode;
|
|
4571
4571
|
__instance = null;
|
|
@@ -4624,12 +4624,12 @@ class wr {
|
|
|
4624
4624
|
__proxy() {
|
|
4625
4625
|
if (!this.__instance) return;
|
|
4626
4626
|
const e = this.__instance;
|
|
4627
|
-
|
|
4627
|
+
Qt.forEach((s) => {
|
|
4628
4628
|
this[s] = e[s] || e._?.[s.replace("$", "")] || null;
|
|
4629
4629
|
});
|
|
4630
4630
|
}
|
|
4631
4631
|
__cleanup() {
|
|
4632
|
-
|
|
4632
|
+
Qt.forEach((e) => {
|
|
4633
4633
|
this[e] = null;
|
|
4634
4634
|
}), this.__reset();
|
|
4635
4635
|
}
|
|
@@ -4640,17 +4640,17 @@ class wr {
|
|
|
4640
4640
|
if (e)
|
|
4641
4641
|
if (this.__mode === P.Runtime) {
|
|
4642
4642
|
const { id: s, type: i } = e, r = s ? this.__transform[s] ?? e.value : e.value;
|
|
4643
|
-
return
|
|
4643
|
+
return J({ type: i, value: r }, this);
|
|
4644
4644
|
} else
|
|
4645
|
-
return
|
|
4645
|
+
return J(e, this);
|
|
4646
4646
|
}
|
|
4647
4647
|
__parseExpression(e) {
|
|
4648
4648
|
if (e)
|
|
4649
4649
|
if (this.__mode === P.Runtime) {
|
|
4650
4650
|
const { id: s, type: i } = e, r = s ? this.__transform[s] ?? e.value : e.value;
|
|
4651
|
-
return
|
|
4651
|
+
return Re({ type: i, value: r }, this);
|
|
4652
4652
|
} else
|
|
4653
|
-
return
|
|
4653
|
+
return Re(e, this);
|
|
4654
4654
|
}
|
|
4655
4655
|
__ref(e = null, s) {
|
|
4656
4656
|
if (this.__mode === P.VNode)
|
|
@@ -4658,7 +4658,7 @@ class wr {
|
|
|
4658
4658
|
e && e !== this.__id && (this.__contextRefs[e] = this);
|
|
4659
4659
|
let i = e ? this.__refCaches[e] : null;
|
|
4660
4660
|
return i || (i = async (r) => {
|
|
4661
|
-
await
|
|
4661
|
+
await Ie(0);
|
|
4662
4662
|
let n = r?.$vtjEl || r?.$el || r?._?.vnode?.el || r;
|
|
4663
4663
|
if (!n) {
|
|
4664
4664
|
typeof s == "string" && (delete this.$refs[s], this[s] && xe.isRef(this[s]) && (this[s].value = null), e && delete this.__refs[e]);
|
|
@@ -4683,7 +4683,8 @@ class wr {
|
|
|
4683
4683
|
return i.context.__proto__ = this.context, i.__proto__ = this, i;
|
|
4684
4684
|
}
|
|
4685
4685
|
}
|
|
4686
|
-
|
|
4686
|
+
const lt = Symbol("vtjBlockChain");
|
|
4687
|
+
function St(t) {
|
|
4687
4688
|
const {
|
|
4688
4689
|
Vue: e = xe,
|
|
4689
4690
|
UniApp: s = {},
|
|
@@ -4696,7 +4697,7 @@ function vt(t) {
|
|
|
4696
4697
|
$components: r,
|
|
4697
4698
|
$libs: n,
|
|
4698
4699
|
$apis: a
|
|
4699
|
-
}, h = new
|
|
4700
|
+
}, h = new Er({
|
|
4700
4701
|
mode: i,
|
|
4701
4702
|
dsl: c.value,
|
|
4702
4703
|
attrs: l
|
|
@@ -4704,71 +4705,81 @@ function vt(t) {
|
|
|
4704
4705
|
name: c.value.name,
|
|
4705
4706
|
__scopeId: c.value.id ? `data-v-${c.value.id}` : void 0,
|
|
4706
4707
|
props: {
|
|
4707
|
-
...
|
|
4708
|
+
...Ir(c.value.props ?? [], h)
|
|
4708
4709
|
},
|
|
4709
4710
|
async setup(f = {}) {
|
|
4710
|
-
|
|
4711
|
+
const d = c.value.id, m = c.value.name, g = e.inject(
|
|
4712
|
+
lt,
|
|
4713
|
+
null
|
|
4714
|
+
);
|
|
4715
|
+
if (d && g && g.has(d)) {
|
|
4716
|
+
const oe = `检测到区块循环引用: ${m}(${d})`;
|
|
4717
|
+
return console.warn(`[VTJ Renderer] ${oe},已中断渲染以防止浏览器崩溃`), qe(new Error(oe)), e.provide(lt, g), { __vtjCircular: !0 };
|
|
4718
|
+
}
|
|
4719
|
+
const x = new Set(g || []);
|
|
4720
|
+
d && x.add(d), e.provide(lt, x), h.$props = h.props = f, c.value.id && At(
|
|
4711
4721
|
t.window || globalThis,
|
|
4712
4722
|
c.value.id,
|
|
4713
4723
|
c.value.css || "",
|
|
4714
4724
|
!0
|
|
4715
4725
|
);
|
|
4716
|
-
const
|
|
4717
|
-
h.$state = h.state =
|
|
4726
|
+
const S = c.value.apiMode === "composition";
|
|
4727
|
+
h.$state = h.state = Ar(
|
|
4718
4728
|
e,
|
|
4719
4729
|
c.value.state ?? {},
|
|
4720
4730
|
h
|
|
4721
4731
|
);
|
|
4722
|
-
const
|
|
4732
|
+
const I = S ? Or(e, c.value.refs ?? {}, h) : {}, N = S ? Fr(e, c.value.reactives ?? {}, h) : {}, w = Pr(e, c.value.computed ?? {}, h), D = Tr(c.value.methods ?? {}, h), ye = Nr(e, c.value.inject, h), _e = Rr(
|
|
4723
4733
|
c.value.dataSources || {},
|
|
4724
4734
|
h
|
|
4725
4735
|
);
|
|
4726
|
-
let
|
|
4727
|
-
|
|
4736
|
+
let G = {};
|
|
4737
|
+
S && (G = Lr(
|
|
4728
4738
|
c.value.composables ?? [],
|
|
4729
4739
|
h
|
|
4730
4740
|
));
|
|
4731
|
-
const
|
|
4741
|
+
const tt = {
|
|
4732
4742
|
...f,
|
|
4733
|
-
...
|
|
4734
|
-
...
|
|
4735
|
-
...
|
|
4736
|
-
...x,
|
|
4743
|
+
...I,
|
|
4744
|
+
...N,
|
|
4745
|
+
...ye,
|
|
4737
4746
|
...w,
|
|
4738
|
-
...
|
|
4739
|
-
...
|
|
4747
|
+
...D,
|
|
4748
|
+
..._e,
|
|
4749
|
+
...G
|
|
4740
4750
|
};
|
|
4741
|
-
if (h.setup(
|
|
4742
|
-
if (await
|
|
4751
|
+
if (h.setup(tt, e), Vr(e, c.value.watch ?? [], h), S) {
|
|
4752
|
+
if (await Mr(
|
|
4743
4753
|
e,
|
|
4744
4754
|
c.value.lifeCycles ?? {},
|
|
4745
4755
|
h,
|
|
4746
4756
|
s
|
|
4747
4757
|
), c.value.setup) {
|
|
4748
|
-
const
|
|
4749
|
-
if (z(
|
|
4758
|
+
const oe = h.__parseFunction(c.value.setup);
|
|
4759
|
+
if (z(oe))
|
|
4750
4760
|
try {
|
|
4751
|
-
await
|
|
4752
|
-
} catch (
|
|
4753
|
-
console.warn("[VTJ] Composition setup 执行失败",
|
|
4761
|
+
await oe();
|
|
4762
|
+
} catch (Le) {
|
|
4763
|
+
console.warn("[VTJ] Composition setup 执行失败", Le);
|
|
4754
4764
|
}
|
|
4755
4765
|
}
|
|
4756
|
-
|
|
4766
|
+
jr(e, c.value.provide ?? {}, h);
|
|
4757
4767
|
}
|
|
4758
4768
|
return {
|
|
4759
4769
|
vtj: h,
|
|
4760
|
-
state: h
|
|
4761
|
-
$state: h.$state,
|
|
4770
|
+
state: h.$state,
|
|
4762
4771
|
...f,
|
|
4763
|
-
...
|
|
4764
|
-
...
|
|
4765
|
-
...
|
|
4766
|
-
...
|
|
4772
|
+
...I,
|
|
4773
|
+
...N,
|
|
4774
|
+
...w,
|
|
4775
|
+
...D
|
|
4767
4776
|
};
|
|
4768
4777
|
},
|
|
4769
|
-
emits:
|
|
4778
|
+
emits: kr(c.value.emits),
|
|
4770
4779
|
expose: ["vtj", ...c.value.expose || []],
|
|
4771
4780
|
render() {
|
|
4781
|
+
if (this.__vtjCircular)
|
|
4782
|
+
return null;
|
|
4772
4783
|
const f = c.value;
|
|
4773
4784
|
if (f.refs)
|
|
4774
4785
|
for (const m of Object.keys(f.refs)) this[m];
|
|
@@ -4796,19 +4807,19 @@ function vt(t) {
|
|
|
4796
4807
|
}
|
|
4797
4808
|
},
|
|
4798
4809
|
// Options 模式下生命周期以 Options 风格注册
|
|
4799
|
-
...c.value.apiMode !== "composition" ?
|
|
4810
|
+
...c.value.apiMode !== "composition" ? Dr(c.value.lifeCycles ?? {}, h) : {}
|
|
4800
4811
|
});
|
|
4801
4812
|
return {
|
|
4802
4813
|
renderer: e.markRaw(p),
|
|
4803
4814
|
context: h
|
|
4804
4815
|
};
|
|
4805
4816
|
}
|
|
4806
|
-
function
|
|
4807
|
-
return t.map((e) =>
|
|
4817
|
+
function kr(t = []) {
|
|
4818
|
+
return t.map((e) => ee(e) ? e : e.name);
|
|
4808
4819
|
}
|
|
4809
|
-
function
|
|
4810
|
-
const s = (i) => i ? (Array.isArray(i) ? i : [i]).map((n) =>
|
|
4811
|
-
return t.map((i) =>
|
|
4820
|
+
function Ir(t = [], e) {
|
|
4821
|
+
const s = (i) => i ? (Array.isArray(i) ? i : [i]).map((n) => gi[n]) : void 0;
|
|
4822
|
+
return t.map((i) => ee(i) ? {
|
|
4812
4823
|
name: i
|
|
4813
4824
|
} : {
|
|
4814
4825
|
name: i.name,
|
|
@@ -4824,7 +4835,7 @@ function kr(t = [], e) {
|
|
|
4824
4835
|
{}
|
|
4825
4836
|
);
|
|
4826
4837
|
}
|
|
4827
|
-
function
|
|
4838
|
+
function Ar(t, e, s) {
|
|
4828
4839
|
return t.reactive(
|
|
4829
4840
|
Object.keys(e || {}).reduce(
|
|
4830
4841
|
(i, r) => {
|
|
@@ -4835,19 +4846,19 @@ function Ir(t, e, s) {
|
|
|
4835
4846
|
)
|
|
4836
4847
|
);
|
|
4837
4848
|
}
|
|
4838
|
-
function
|
|
4849
|
+
function Pr(t, e, s) {
|
|
4839
4850
|
return Object.entries(e ?? {}).reduce(
|
|
4840
4851
|
(i, [r, n]) => (O(n) ? i[r] = t.computed(s.__parseFunction(n)) : i[r] = t.computed(s.__parseExpression(n)), i),
|
|
4841
4852
|
{}
|
|
4842
4853
|
);
|
|
4843
4854
|
}
|
|
4844
|
-
function
|
|
4855
|
+
function Tr(t, e) {
|
|
4845
4856
|
return Object.entries(t ?? {}).reduce(
|
|
4846
4857
|
(s, [i, r]) => (s[i] = e.__parseFunction(r), s),
|
|
4847
4858
|
{}
|
|
4848
4859
|
);
|
|
4849
4860
|
}
|
|
4850
|
-
function
|
|
4861
|
+
function Nr(t, e = [], s) {
|
|
4851
4862
|
return e.reduce(
|
|
4852
4863
|
(i, r) => {
|
|
4853
4864
|
const { name: n, from: a } = r || {}, u = T(a) ? s.__parseExpression(a) || n : a ?? n, c = T(r.default) ? s.__parseExpression(r.default) : r.default ?? null;
|
|
@@ -4856,12 +4867,12 @@ function Tr(t, e = [], s) {
|
|
|
4856
4867
|
{}
|
|
4857
4868
|
);
|
|
4858
4869
|
}
|
|
4859
|
-
function
|
|
4870
|
+
function Rr(t, e) {
|
|
4860
4871
|
return Object.keys(t).reduce(
|
|
4861
4872
|
(s, i) => {
|
|
4862
4873
|
const r = t[i];
|
|
4863
4874
|
if (r.type === "mock")
|
|
4864
|
-
s[i] =
|
|
4875
|
+
s[i] = Cr(r);
|
|
4865
4876
|
else if (r.ref) {
|
|
4866
4877
|
const n = e.$apis[r.ref], a = O(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
|
|
4867
4878
|
s[i] = async (...u) => {
|
|
@@ -4874,7 +4885,7 @@ function Nr(t, e) {
|
|
|
4874
4885
|
{}
|
|
4875
4886
|
);
|
|
4876
4887
|
}
|
|
4877
|
-
function
|
|
4888
|
+
function Vr(t, e = [], s) {
|
|
4878
4889
|
e.forEach((i) => {
|
|
4879
4890
|
t.watch(
|
|
4880
4891
|
s.__parseExpression(i.source),
|
|
@@ -4887,7 +4898,7 @@ function Rr(t, e = [], s) {
|
|
|
4887
4898
|
);
|
|
4888
4899
|
});
|
|
4889
4900
|
}
|
|
4890
|
-
function
|
|
4901
|
+
function Or(t, e, s) {
|
|
4891
4902
|
return Object.entries(e).reduce(
|
|
4892
4903
|
(i, [r, n]) => {
|
|
4893
4904
|
const a = T(n) ? s.__parseExpression(n) : n;
|
|
@@ -4896,7 +4907,7 @@ function Vr(t, e, s) {
|
|
|
4896
4907
|
{}
|
|
4897
4908
|
);
|
|
4898
4909
|
}
|
|
4899
|
-
function
|
|
4910
|
+
function Fr(t, e, s) {
|
|
4900
4911
|
return Object.entries(e).reduce(
|
|
4901
4912
|
(i, [r, n]) => {
|
|
4902
4913
|
const a = T(n) ? s.__parseExpression(n) : n;
|
|
@@ -4905,12 +4916,12 @@ function Or(t, e, s) {
|
|
|
4905
4916
|
{}
|
|
4906
4917
|
);
|
|
4907
4918
|
}
|
|
4908
|
-
function
|
|
4919
|
+
function Lr(t, e) {
|
|
4909
4920
|
return t.reduce(
|
|
4910
4921
|
(s, i) => {
|
|
4911
4922
|
try {
|
|
4912
4923
|
let r;
|
|
4913
|
-
if (T(i.composable) ? r = e.__parseExpression(i.composable) :
|
|
4924
|
+
if (T(i.composable) ? r = e.__parseExpression(i.composable) : ee(i.composable) && (r = e.$libs[i.composable]), z(r)) {
|
|
4914
4925
|
const n = (i.args || []).map(
|
|
4915
4926
|
(u) => T(u) ? e.__parseExpression(u) : u
|
|
4916
4927
|
), a = r(...n);
|
|
@@ -4928,13 +4939,13 @@ function Fr(t, e) {
|
|
|
4928
4939
|
{}
|
|
4929
4940
|
);
|
|
4930
4941
|
}
|
|
4931
|
-
function
|
|
4942
|
+
function jr(t, e, s) {
|
|
4932
4943
|
Object.entries(e).forEach(([i, r]) => {
|
|
4933
4944
|
let n = r;
|
|
4934
4945
|
T(r) ? n = s.__parseExpression(r) : O(r) && (n = s.__parseFunction(r)), t.provide(i, n);
|
|
4935
4946
|
});
|
|
4936
4947
|
}
|
|
4937
|
-
async function
|
|
4948
|
+
async function Mr(t, e, s, i = {}) {
|
|
4938
4949
|
const r = {
|
|
4939
4950
|
beforeMount: "onBeforeMount",
|
|
4940
4951
|
mounted: "onMounted",
|
|
@@ -4955,7 +4966,7 @@ async function jr(t, e, s, i = {}) {
|
|
|
4955
4966
|
try {
|
|
4956
4967
|
await l();
|
|
4957
4968
|
} catch (h) {
|
|
4958
|
-
console.warn(`[VTJ] Composition 生命周期 "${n}" 执行失败`, h),
|
|
4969
|
+
console.warn(`[VTJ] Composition 生命周期 "${n}" 执行失败`, h), qe(h);
|
|
4959
4970
|
}
|
|
4960
4971
|
continue;
|
|
4961
4972
|
}
|
|
@@ -4964,27 +4975,27 @@ async function jr(t, e, s, i = {}) {
|
|
|
4964
4975
|
const l = s.__parseFunction(a);
|
|
4965
4976
|
z(l) && c(async () => {
|
|
4966
4977
|
try {
|
|
4967
|
-
await
|
|
4978
|
+
await Ie(0), await l();
|
|
4968
4979
|
} catch (h) {
|
|
4969
|
-
console.warn(`[VTJ] Composition 生命周期 "${n}" 执行失败`, h),
|
|
4980
|
+
console.warn(`[VTJ] Composition 生命周期 "${n}" 执行失败`, h), qe(h);
|
|
4970
4981
|
}
|
|
4971
4982
|
});
|
|
4972
4983
|
} else
|
|
4973
4984
|
console.warn(`[VTJ] 无效的 Composition 生命周期钩子 "${n}"`);
|
|
4974
4985
|
}
|
|
4975
4986
|
}
|
|
4976
|
-
function
|
|
4987
|
+
function Dr(t, e) {
|
|
4977
4988
|
return Object.entries(t ?? {}).reduce(
|
|
4978
4989
|
(s, [i, r]) => {
|
|
4979
4990
|
const n = e.__parseFunction(r);
|
|
4980
4991
|
return s[i] = async () => {
|
|
4981
|
-
z(n) && (await
|
|
4992
|
+
z(n) && (await Ie(0), await n());
|
|
4982
4993
|
}, s;
|
|
4983
4994
|
},
|
|
4984
4995
|
{}
|
|
4985
4996
|
);
|
|
4986
4997
|
}
|
|
4987
|
-
class
|
|
4998
|
+
class Br {
|
|
4988
4999
|
__props = {};
|
|
4989
5000
|
__events = {};
|
|
4990
5001
|
__nodes = {};
|
|
@@ -5020,7 +5031,7 @@ class Dr {
|
|
|
5020
5031
|
return i || (e && this.setNode(e, s), s);
|
|
5021
5032
|
}
|
|
5022
5033
|
isEqual(e, s) {
|
|
5023
|
-
return
|
|
5034
|
+
return at(e, s);
|
|
5024
5035
|
}
|
|
5025
5036
|
/**
|
|
5026
5037
|
* 比较两个节点缓存是否相等,函数引用变化不触发重渲染,但函数属性的增删会触发
|
|
@@ -5040,60 +5051,60 @@ class Dr {
|
|
|
5040
5051
|
}
|
|
5041
5052
|
return c;
|
|
5042
5053
|
}, n = i(e).sort(), a = i(s).sort();
|
|
5043
|
-
return
|
|
5054
|
+
return at(n, a) ? at(r(e), r(s)) : !1;
|
|
5044
5055
|
}
|
|
5045
5056
|
clear() {
|
|
5046
5057
|
this.__props = {}, this.__events = {}, this.__nodes = {};
|
|
5047
5058
|
}
|
|
5048
5059
|
}
|
|
5049
|
-
const
|
|
5050
|
-
let
|
|
5051
|
-
const
|
|
5052
|
-
async function
|
|
5053
|
-
const { urls: s = [], library: i } = t, r = s.filter((u) =>
|
|
5060
|
+
const Se = new Br(), Ks = new ci();
|
|
5061
|
+
let ht = [], ce = {}, Ce = {};
|
|
5062
|
+
const Hr = (t, e) => e;
|
|
5063
|
+
async function zs(t, e = globalThis) {
|
|
5064
|
+
const { urls: s = [], library: i } = t, r = s.filter((u) => ze(u));
|
|
5054
5065
|
if (r.length === 0 || !i) return null;
|
|
5055
|
-
const n = s.filter((u) =>
|
|
5056
|
-
return n.length &&
|
|
5066
|
+
const n = s.filter((u) => Ke(u));
|
|
5067
|
+
return n.length && fs(n, e), await ds(r, i, e).catch(
|
|
5057
5068
|
(u) => (console.warn("loadScriptUrl error", r, i, u), null)
|
|
5058
5069
|
);
|
|
5059
5070
|
}
|
|
5060
|
-
function
|
|
5071
|
+
function Ct(t) {
|
|
5061
5072
|
const { getDsl: e, getDslByUrl: s, options: i } = t;
|
|
5062
|
-
return i.window && (
|
|
5073
|
+
return i.window && (ht.forEach((r) => {
|
|
5063
5074
|
delete i.window[r];
|
|
5064
|
-
}),
|
|
5075
|
+
}), ht = []), (r, n, a, u = xe) => {
|
|
5065
5076
|
if (!a || typeof a == "string") return n;
|
|
5066
5077
|
let c = "";
|
|
5067
5078
|
if (a.type === "Schema" && a.id)
|
|
5068
|
-
return c = a.id + "_" + r,
|
|
5069
|
-
const l =
|
|
5079
|
+
return c = a.id + "_" + r, Ce[c] || (Ce[c] = u.defineAsyncComponent(async () => {
|
|
5080
|
+
const l = ce[a.id] || await Ks.add(
|
|
5070
5081
|
a.id,
|
|
5071
5082
|
() => e(a.id)
|
|
5072
5083
|
);
|
|
5073
|
-
return l && (l.name = n,
|
|
5084
|
+
return l && (l.name = n, ce[a.id] = l), l ? St({
|
|
5074
5085
|
Vue: u,
|
|
5075
5086
|
mode: P.Runtime,
|
|
5076
5087
|
...i,
|
|
5077
|
-
dsl:
|
|
5078
|
-
loader:
|
|
5088
|
+
dsl: Kt(l),
|
|
5089
|
+
loader: Ct(t)
|
|
5079
5090
|
}).renderer : null;
|
|
5080
5091
|
}));
|
|
5081
5092
|
if (a.type === "UrlSchema" && a.url)
|
|
5082
|
-
return c = a.url + "_" + r,
|
|
5083
|
-
const l =
|
|
5084
|
-
return l && (l.name = n,
|
|
5093
|
+
return c = a.url + "_" + r, Ce[c] || (Ce[c] = u.defineAsyncComponent(async () => {
|
|
5094
|
+
const l = ce[a.url] || await s(a.url);
|
|
5095
|
+
return l && (l.name = n, ce[a.url] = l), l ? St({
|
|
5085
5096
|
...i,
|
|
5086
5097
|
Vue: u,
|
|
5087
|
-
dsl:
|
|
5098
|
+
dsl: Kt(l),
|
|
5088
5099
|
mode: P.Runtime,
|
|
5089
|
-
loader:
|
|
5100
|
+
loader: Ct(t)
|
|
5090
5101
|
}).renderer : null;
|
|
5091
5102
|
}));
|
|
5092
5103
|
if (a.type === "Plugin") {
|
|
5093
|
-
let l = a.library ?
|
|
5094
|
-
return l || (a.library &&
|
|
5104
|
+
let l = a.library ? ce[a.library] : null;
|
|
5105
|
+
return l || (a.library && ht.push(a.library), l = ce[a.library || Symbol()] = u.defineAsyncComponent(
|
|
5095
5106
|
async () => {
|
|
5096
|
-
const h = await
|
|
5107
|
+
const h = await zs(a, i.window);
|
|
5097
5108
|
return h || (console.warn("getPlugin result is null", a), null);
|
|
5098
5109
|
}
|
|
5099
5110
|
), l);
|
|
@@ -5101,61 +5112,61 @@ function bt(t) {
|
|
|
5101
5112
|
return n;
|
|
5102
5113
|
};
|
|
5103
5114
|
}
|
|
5104
|
-
function
|
|
5105
|
-
|
|
5115
|
+
function Fn() {
|
|
5116
|
+
ce = {}, Ce = {}, Ks.clearAllCache(), Se.clear();
|
|
5106
5117
|
}
|
|
5107
|
-
function be(t, e, s = xe, i =
|
|
5118
|
+
function be(t, e, s = xe, i = Hr, r = [], n = !1, a = 0) {
|
|
5108
5119
|
if (!t || !t.name || t.invisible) return null;
|
|
5109
|
-
const u = s.getCurrentInstance()?.appContext, { id: c = null, directives: l = [] } = t, { vIf: h, vElseIf: p, vElse: f, vFor: d, vShow: m, vModels: g, vBind: x, vHtml:
|
|
5120
|
+
const u = s.getCurrentInstance()?.appContext, { id: c = null, directives: l = [] } = t, { vIf: h, vElseIf: p, vElse: f, vFor: d, vShow: m, vModels: g, vBind: x, vHtml: S, others: I } = Js(l);
|
|
5110
5121
|
if (!n && (p || f))
|
|
5111
5122
|
return null;
|
|
5112
|
-
if (h &&
|
|
5113
|
-
return
|
|
5114
|
-
const
|
|
5115
|
-
const
|
|
5123
|
+
if (h && !Ur(h, e))
|
|
5124
|
+
return Jr(t, e, s, i, r);
|
|
5125
|
+
const N = (w, D = 0) => {
|
|
5126
|
+
const ye = w.$components, _e = (() => {
|
|
5116
5127
|
if (t.name === "component")
|
|
5117
|
-
return
|
|
5128
|
+
return Gr(w, t.props?.is);
|
|
5118
5129
|
if (t.name === "slot") return t.name;
|
|
5119
|
-
const
|
|
5120
|
-
return
|
|
5121
|
-
})(),
|
|
5130
|
+
const q = i(`${t.id}_${D}`, t.name, t.from, s);
|
|
5131
|
+
return ee(q) ? Pi(q) || Ti(q) ? q : ye[q] ?? u?.app?.component(q) ?? q : q;
|
|
5132
|
+
})(), G = qr(c, t.props ?? {}, w), tt = zr(
|
|
5122
5133
|
s,
|
|
5123
5134
|
t.id,
|
|
5124
5135
|
t.events ?? {},
|
|
5125
|
-
|
|
5136
|
+
w
|
|
5126
5137
|
);
|
|
5127
5138
|
if (t.name === "slot")
|
|
5128
|
-
return
|
|
5129
|
-
x && Object.assign(
|
|
5130
|
-
|
|
5131
|
-
Xr(m,
|
|
5132
|
-
)),
|
|
5133
|
-
|
|
5139
|
+
return Qr(s, t, G, w, i);
|
|
5140
|
+
x && Object.assign(G, w.__parseExpression(x.value)), m && (G.style = Object.assign(
|
|
5141
|
+
G.style ?? {},
|
|
5142
|
+
Xr(m, w)
|
|
5143
|
+
)), S && Object.assign(G, Zr(S, w)), g.forEach((q) => {
|
|
5144
|
+
hs.includes(t.name) ? Object.assign(G, en(q, w)) : Object.assign(G, tn(s, q, w));
|
|
5134
5145
|
});
|
|
5135
|
-
const
|
|
5146
|
+
const oe = sn(
|
|
5136
5147
|
s,
|
|
5137
5148
|
t.children ?? [],
|
|
5138
|
-
|
|
5149
|
+
w,
|
|
5139
5150
|
i,
|
|
5140
5151
|
t
|
|
5141
|
-
),
|
|
5142
|
-
key:
|
|
5143
|
-
...Zs,
|
|
5152
|
+
), Le = w?.__id ? `data-v-${w.__id}` : void 0, ei = Le ? { [Le]: "" } : {}, ti = w.__mode === P.Design ? { "data-vtj": c } : {}, je = `${c}_${D}`, st = {
|
|
5153
|
+
key: je,
|
|
5144
5154
|
...ei,
|
|
5145
|
-
...
|
|
5155
|
+
...ti,
|
|
5156
|
+
...G
|
|
5146
5157
|
};
|
|
5147
|
-
|
|
5148
|
-
let
|
|
5149
|
-
|
|
5150
|
-
{ ...
|
|
5151
|
-
|
|
5158
|
+
Se.isNodeEqual(st, Se.getNode(je)) || Se.setNode(je, st);
|
|
5159
|
+
let it = s.createVNode(
|
|
5160
|
+
_e,
|
|
5161
|
+
{ ...Se.getNode(je) || st, ...tt },
|
|
5162
|
+
oe
|
|
5152
5163
|
);
|
|
5153
|
-
const
|
|
5154
|
-
return
|
|
5164
|
+
const Gt = u ? $r(u, I, w) : [];
|
|
5165
|
+
return Gt.length && (it = s.withDirectives(it, Gt)), it;
|
|
5155
5166
|
};
|
|
5156
|
-
return d ?
|
|
5167
|
+
return d ? an(d, N, e) : N(e, a);
|
|
5157
5168
|
}
|
|
5158
|
-
function
|
|
5169
|
+
function $r(t, e, s) {
|
|
5159
5170
|
const i = t.app;
|
|
5160
5171
|
return e.map((r) => {
|
|
5161
5172
|
const n = typeof r.name == "string" ? i.directive(r.name) : s.__parseExpression(r.name);
|
|
@@ -5164,13 +5175,13 @@ function Hr(t, e, s) {
|
|
|
5164
5175
|
return r.value && a.push(s.__parseExpression(r.value)), r.arg && a.push(r.arg), r.modifiers && a.push(r.modifiers), a;
|
|
5165
5176
|
}).filter((r) => !!r);
|
|
5166
5177
|
}
|
|
5167
|
-
function
|
|
5178
|
+
function Js(t = []) {
|
|
5168
5179
|
const e = t.find((h) => X(h.name) === "vIf"), s = t.find(
|
|
5169
5180
|
(h) => X(h.name) === "vElseIf"
|
|
5170
5181
|
), i = t.find((h) => X(h.name) === "vElse"), r = t.find((h) => X(h.name) === "vFor"), n = t.find((h) => X(h.name) === "vShow"), a = t.find((h) => X(h.name) === "vBind"), u = t.find((h) => X(h.name) === "vHtml"), c = t.filter(
|
|
5171
5182
|
(h) => X(h.name) === "vModel"
|
|
5172
5183
|
), l = t.filter(
|
|
5173
|
-
(h) => !
|
|
5184
|
+
(h) => !mi.includes(X(h.name))
|
|
5174
5185
|
);
|
|
5175
5186
|
return {
|
|
5176
5187
|
vIf: e,
|
|
@@ -5184,39 +5195,39 @@ function Ws(t = []) {
|
|
|
5184
5195
|
vHtml: u
|
|
5185
5196
|
};
|
|
5186
5197
|
}
|
|
5187
|
-
function
|
|
5198
|
+
function Ur(t, e) {
|
|
5188
5199
|
return !!e.__parseExpression(t.value);
|
|
5189
5200
|
}
|
|
5190
|
-
function
|
|
5201
|
+
function Gr(t, e) {
|
|
5191
5202
|
return e ? T(e) ? t.__parseExpression(e) : e : "div";
|
|
5192
5203
|
}
|
|
5193
|
-
function
|
|
5194
|
-
const i =
|
|
5204
|
+
function qr(t, e, s) {
|
|
5205
|
+
const i = wt(e, s);
|
|
5195
5206
|
return i.ref = s.__ref(t, i.ref), i;
|
|
5196
5207
|
}
|
|
5197
|
-
function
|
|
5198
|
-
return T(t) ? e.__parseExpression(t) : O(t) ? e.__parseFunction(t) : Array.isArray(t) ? t.map((s) =>
|
|
5208
|
+
function wt(t, e) {
|
|
5209
|
+
return T(t) ? e.__parseExpression(t) : O(t) ? e.__parseFunction(t) : Array.isArray(t) ? t.map((s) => wt(s, e)) : typeof t == "object" ? Object.keys(t || {}).reduce(
|
|
5199
5210
|
(s, i) => {
|
|
5200
5211
|
let r = t[i];
|
|
5201
|
-
return s[i] =
|
|
5212
|
+
return s[i] = wt(r, e), s;
|
|
5202
5213
|
},
|
|
5203
5214
|
{}
|
|
5204
5215
|
) : t;
|
|
5205
5216
|
}
|
|
5206
|
-
function
|
|
5217
|
+
function Wr(t, e) {
|
|
5207
5218
|
return (s) => {
|
|
5208
5219
|
s?.key?.toLowerCase() === e.toLowerCase() && t(s);
|
|
5209
5220
|
};
|
|
5210
5221
|
}
|
|
5211
|
-
function
|
|
5212
|
-
return
|
|
5222
|
+
function Kr(t) {
|
|
5223
|
+
return Ni(t.value) ? t : Ri(t.value) ? {
|
|
5213
5224
|
type: "JSFunction",
|
|
5214
5225
|
value: `(...args) => (() => {
|
|
5215
5226
|
return (($event) => {
|
|
5216
5227
|
${t.value}
|
|
5217
5228
|
}).apply(this, args);
|
|
5218
5229
|
})()`
|
|
5219
|
-
} :
|
|
5230
|
+
} : Vi(t.value) ? {
|
|
5220
5231
|
type: "JSFunction",
|
|
5221
5232
|
value: `() => { ${t.value}}`
|
|
5222
5233
|
} : t;
|
|
@@ -5229,19 +5240,19 @@ function zr(t, e, s, i) {
|
|
|
5229
5240
|
};
|
|
5230
5241
|
return Object.keys(s || {}).reduce(
|
|
5231
5242
|
(u, c) => {
|
|
5232
|
-
const l = s[c], h =
|
|
5243
|
+
const l = s[c], h = Qs(l.modifiers), p = h.find((m) => r.includes(m)), f = "on" + li(c) + (p && n[p] || ""), d = l.handler ? i.__parseFunction(Kr(l.handler)) : null;
|
|
5233
5244
|
return d && (u[f] = t.withModifiers(
|
|
5234
|
-
h.includes("enter") ?
|
|
5245
|
+
h.includes("enter") ? Wr(d, "enter") : d,
|
|
5235
5246
|
h
|
|
5236
5247
|
)), u;
|
|
5237
5248
|
},
|
|
5238
5249
|
{}
|
|
5239
5250
|
);
|
|
5240
5251
|
}
|
|
5241
|
-
function
|
|
5252
|
+
function Jr(t, e, s, i, r = []) {
|
|
5242
5253
|
let n = r.findIndex((a) => a.id === t.id);
|
|
5243
5254
|
for (let a = ++n; a < r.length; a++) {
|
|
5244
|
-
const { directives: u = [] } = r[a], { vElseIf: c, vElse: l } =
|
|
5255
|
+
const { directives: u = [] } = r[a], { vElseIf: c, vElse: l } = Js(u);
|
|
5245
5256
|
if (c) {
|
|
5246
5257
|
if (e.__parseExpression(c.value))
|
|
5247
5258
|
return be(r[a], e, s, i, r, !0);
|
|
@@ -5252,19 +5263,19 @@ function Kr(t, e, s, i, r = []) {
|
|
|
5252
5263
|
}
|
|
5253
5264
|
return null;
|
|
5254
5265
|
}
|
|
5255
|
-
function
|
|
5266
|
+
function Qs(t = {}, e = !1) {
|
|
5256
5267
|
const s = Object.keys(t);
|
|
5257
5268
|
return e ? s.map((i) => "." + i) : s;
|
|
5258
5269
|
}
|
|
5259
|
-
function
|
|
5260
|
-
const { children: n } = e, a =
|
|
5261
|
-
return u ? u(s) : n ?
|
|
5262
|
-
|
|
5270
|
+
function Qr(t, e, s, i, r) {
|
|
5271
|
+
const { children: n } = e, a = Yr(e, i), u = i.$slots?.[a.name];
|
|
5272
|
+
return u ? u(s) : n ? ee(n) ? t.createTextVNode(n) : T(n) ? t.createTextVNode(
|
|
5273
|
+
ps(i.__parseExpression(n))
|
|
5263
5274
|
) : Array.isArray(n) ? n.map(
|
|
5264
5275
|
(c, l) => be(c, i, t, r, n, !1, l)
|
|
5265
5276
|
) : null : null;
|
|
5266
5277
|
}
|
|
5267
|
-
function
|
|
5278
|
+
function Yr(t, e) {
|
|
5268
5279
|
const { props: s } = t, i = s?.name || "default";
|
|
5269
5280
|
return {
|
|
5270
5281
|
name: T(i) ? e.__parseExpression(i) : i,
|
|
@@ -5276,12 +5287,12 @@ function Xr(t, e) {
|
|
|
5276
5287
|
display: "none"
|
|
5277
5288
|
};
|
|
5278
5289
|
}
|
|
5279
|
-
function
|
|
5290
|
+
function Zr(t, e) {
|
|
5280
5291
|
return {
|
|
5281
5292
|
innerHTML: e.__parseExpression(t.value) || ""
|
|
5282
5293
|
};
|
|
5283
5294
|
}
|
|
5284
|
-
function
|
|
5295
|
+
function en(t, e) {
|
|
5285
5296
|
const s = {
|
|
5286
5297
|
type: "JSFunction",
|
|
5287
5298
|
value: t.value?.value ? `(v) => {
|
|
@@ -5293,13 +5304,13 @@ function Zr(t, e) {
|
|
|
5293
5304
|
onInput: e.__parseFunction(s)
|
|
5294
5305
|
};
|
|
5295
5306
|
}
|
|
5296
|
-
function
|
|
5307
|
+
function tn(t, e, s) {
|
|
5297
5308
|
const i = {
|
|
5298
5309
|
type: "JSFunction",
|
|
5299
5310
|
value: e.value?.value ? `(v) => {
|
|
5300
5311
|
${e.value.value} = v;
|
|
5301
5312
|
}` : "(v) => {}"
|
|
5302
|
-
}, r = s.__parseFunction(i), n =
|
|
5313
|
+
}, r = s.__parseFunction(i), n = Qs(
|
|
5303
5314
|
T(e.modifiers) ? s.__parseExpression(e.modifiers) : e.modifiers
|
|
5304
5315
|
), a = T(e.arg) ? s.__parseExpression(e.arg) : e.arg || "modelValue";
|
|
5305
5316
|
return {
|
|
@@ -5307,23 +5318,23 @@ function en(t, e, s) {
|
|
|
5307
5318
|
[`onUpdate:${a}`]: n.length && r ? t.withModifiers(r, n) : r
|
|
5308
5319
|
};
|
|
5309
5320
|
}
|
|
5310
|
-
function
|
|
5321
|
+
function sn(t, e, s, i, r) {
|
|
5311
5322
|
if (!e) return null;
|
|
5312
|
-
if (
|
|
5323
|
+
if (ee(e))
|
|
5313
5324
|
return { default: () => e };
|
|
5314
5325
|
if (T(e))
|
|
5315
5326
|
return {
|
|
5316
|
-
default: () =>
|
|
5327
|
+
default: () => ps(s.__parseExpression(e))
|
|
5317
5328
|
};
|
|
5318
5329
|
if (Array.isArray(e) && e.length > 0) {
|
|
5319
|
-
const n =
|
|
5330
|
+
const n = rn(e), a = (u, c) => !u || !r ? {} : r?.id && Object.keys(u).length ? c ? {
|
|
5320
5331
|
[c]: u
|
|
5321
5332
|
} : {
|
|
5322
5333
|
[`scope_${r.id}`]: u
|
|
5323
5334
|
} : c ? { [c]: /* @__PURE__ */ Object.create(null) } : {};
|
|
5324
5335
|
return Object.entries(n).reduce(
|
|
5325
5336
|
(u, [c, { nodes: l, params: h, scope: p }]) => (u[c] = (f) => {
|
|
5326
|
-
const d = h.length ?
|
|
5337
|
+
const d = h.length ? hi(f ?? {}, h) : a(f, p);
|
|
5327
5338
|
return l.map(
|
|
5328
5339
|
(m, g) => be(
|
|
5329
5340
|
m,
|
|
@@ -5341,10 +5352,10 @@ function tn(t, e, s, i, r) {
|
|
|
5341
5352
|
}
|
|
5342
5353
|
return null;
|
|
5343
5354
|
}
|
|
5344
|
-
function
|
|
5355
|
+
function rn(t) {
|
|
5345
5356
|
const e = {};
|
|
5346
5357
|
for (const s of t) {
|
|
5347
|
-
const i =
|
|
5358
|
+
const i = nn(s.slot), r = i.name;
|
|
5348
5359
|
e[r] ? (e[r].nodes.push(s), e[r].params = e[r].params.concat(i.params), e[r].scope = i.scope || "") : e[r] = {
|
|
5349
5360
|
nodes: [s],
|
|
5350
5361
|
params: i.params,
|
|
@@ -5353,18 +5364,18 @@ function sn(t) {
|
|
|
5353
5364
|
}
|
|
5354
5365
|
return e;
|
|
5355
5366
|
}
|
|
5356
|
-
function
|
|
5357
|
-
return
|
|
5367
|
+
function nn(t = "default") {
|
|
5368
|
+
return ee(t) ? { name: t, params: [], scope: "" } : { params: [], scope: "", ...t };
|
|
5358
5369
|
}
|
|
5359
|
-
function
|
|
5370
|
+
function an(t, e, s) {
|
|
5360
5371
|
const { value: i, iterator: r } = t, { item: n = "item", index: a = "index" } = r || {};
|
|
5361
5372
|
let u = s.__parseExpression(i) || [];
|
|
5362
5373
|
return Number.isInteger(u) && (u = new Array(u).fill(!0).map((c, l) => l + 1)), Array.isArray(u) ? u.map((c, l) => e(s.__clone({ [n]: c, [a]: l }), l)) : (console.warn("[vForRender]:", `${i?.value} is not a Arrary`), []);
|
|
5363
5374
|
}
|
|
5364
|
-
const
|
|
5375
|
+
const pt = cs({
|
|
5365
5376
|
name: "VtjPageContainer",
|
|
5366
5377
|
async setup() {
|
|
5367
|
-
const t =
|
|
5378
|
+
const t = Xs(), e = ls(), s = e.meta.__vtj__ || e.params.id, i = s ? t.getPage(s) : t.getHomepage(), r = i ? await t.getRenderComponent(i.id) : null, n = xt(Symbol());
|
|
5368
5379
|
if (i) {
|
|
5369
5380
|
Object.assign(e.meta, i.meta || {}, { cache: i.cache });
|
|
5370
5381
|
const { useTitle: a } = t?.adapter;
|
|
@@ -5385,7 +5396,7 @@ const ot = as({
|
|
|
5385
5396
|
},
|
|
5386
5397
|
render() {
|
|
5387
5398
|
const { component: t, query: e, sid: s } = this;
|
|
5388
|
-
return t ?
|
|
5399
|
+
return t ? gt(t, { ...e, key: s }) : gt(
|
|
5389
5400
|
"div",
|
|
5390
5401
|
{ style: { padding: "10px" } },
|
|
5391
5402
|
"找不到组件,组件不存在或未发布!"
|
|
@@ -5394,18 +5405,18 @@ const ot = as({
|
|
|
5394
5405
|
activated() {
|
|
5395
5406
|
this.meta.cache === !1 && (this.sid = Symbol());
|
|
5396
5407
|
}
|
|
5397
|
-
}),
|
|
5408
|
+
}), on = cs({
|
|
5398
5409
|
name: "VtjStartupContainer",
|
|
5399
5410
|
render() {
|
|
5400
|
-
return
|
|
5411
|
+
return gt("div", "page not found!");
|
|
5401
5412
|
}
|
|
5402
5413
|
});
|
|
5403
|
-
function
|
|
5414
|
+
function We(t, e, s = []) {
|
|
5404
5415
|
const i = [];
|
|
5405
5416
|
for (const r of s) {
|
|
5406
5417
|
const { id: n, title: a, icon: u, children: c, hidden: l, layout: h } = r;
|
|
5407
5418
|
if (h) {
|
|
5408
|
-
const p =
|
|
5419
|
+
const p = We(t, e, c || []);
|
|
5409
5420
|
i.push(...p);
|
|
5410
5421
|
} else {
|
|
5411
5422
|
const p = {
|
|
@@ -5414,50 +5425,50 @@ function Ue(t, e, s = []) {
|
|
|
5414
5425
|
icon: u,
|
|
5415
5426
|
hidden: l,
|
|
5416
5427
|
url: `${t}/${e}/${n}`,
|
|
5417
|
-
children: c && c.length ?
|
|
5428
|
+
children: c && c.length ? We(t, e, c) : void 0
|
|
5418
5429
|
};
|
|
5419
5430
|
i.push(p);
|
|
5420
5431
|
}
|
|
5421
5432
|
}
|
|
5422
5433
|
return i;
|
|
5423
5434
|
}
|
|
5424
|
-
function
|
|
5435
|
+
function Ys(t, e) {
|
|
5425
5436
|
if (!e) return t;
|
|
5426
5437
|
let s = [];
|
|
5427
5438
|
for (const i of t)
|
|
5428
5439
|
if (i.children && i.children.length) {
|
|
5429
|
-
const r =
|
|
5440
|
+
const r = Ys(i.children, e);
|
|
5430
5441
|
r.length && (i.children = r, s.push(i));
|
|
5431
5442
|
} else
|
|
5432
5443
|
e.can(i.id.toString()) && s.push(i);
|
|
5433
5444
|
return s;
|
|
5434
5445
|
}
|
|
5435
|
-
function
|
|
5446
|
+
function Ln(t) {
|
|
5436
5447
|
const {
|
|
5437
5448
|
menuPathPrefix: e = "",
|
|
5438
5449
|
pageRouteName: s = "page",
|
|
5439
5450
|
disableMenusFilter: i = !1
|
|
5440
|
-
} = t || {}, r =
|
|
5451
|
+
} = t || {}, r = Xs(), n = ls(), a = vr(), u = xt(!1), c = xt(!1), l = r.project, h = (d, m) => {
|
|
5441
5452
|
u.value = !d?.mask, c.value = m?.pure ?? !!d?.pure;
|
|
5442
5453
|
};
|
|
5443
|
-
|
|
5454
|
+
di(() => {
|
|
5444
5455
|
const { name: d, params: m, meta: g } = n;
|
|
5445
|
-
if (d ===
|
|
5456
|
+
if (d === Ee) {
|
|
5446
5457
|
const x = r.getPage(m.id);
|
|
5447
5458
|
h(x, g);
|
|
5448
|
-
} else if (d ===
|
|
5459
|
+
} else if (d === He) {
|
|
5449
5460
|
const x = r.getHomepage();
|
|
5450
5461
|
h(x, g);
|
|
5451
5462
|
} else {
|
|
5452
5463
|
const x = g.__vtj__;
|
|
5453
5464
|
if (x) {
|
|
5454
|
-
const
|
|
5455
|
-
h(
|
|
5465
|
+
const S = r.getPage(x);
|
|
5466
|
+
h(S, g);
|
|
5456
5467
|
} else
|
|
5457
5468
|
u.value = !g.mask, c.value = !!g.pure;
|
|
5458
5469
|
}
|
|
5459
5470
|
});
|
|
5460
|
-
const p =
|
|
5471
|
+
const p = We(
|
|
5461
5472
|
e,
|
|
5462
5473
|
s,
|
|
5463
5474
|
l?.pages
|
|
@@ -5467,11 +5478,11 @@ function Fn(t) {
|
|
|
5467
5478
|
logo: f?.logo,
|
|
5468
5479
|
themeSwitchable: f?.themeSwitchable,
|
|
5469
5480
|
title: f?.title || l?.description || l?.name || "VTJ App",
|
|
5470
|
-
menus: i ? p :
|
|
5481
|
+
menus: i ? p : Ys(p, a),
|
|
5471
5482
|
pure: c
|
|
5472
5483
|
};
|
|
5473
5484
|
}
|
|
5474
|
-
function
|
|
5485
|
+
function ft(t, e) {
|
|
5475
5486
|
const { id: s, title: i, meta: r } = t, { name: n = "page", prefix: a = "", component: u, routeMeta: c } = e;
|
|
5476
5487
|
return {
|
|
5477
5488
|
name: s,
|
|
@@ -5485,7 +5496,7 @@ function ut(t, e) {
|
|
|
5485
5496
|
}
|
|
5486
5497
|
};
|
|
5487
5498
|
}
|
|
5488
|
-
function
|
|
5499
|
+
function Et(t) {
|
|
5489
5500
|
const {
|
|
5490
5501
|
name: e = "page",
|
|
5491
5502
|
prefix: s = "",
|
|
@@ -5498,7 +5509,7 @@ function _t(t) {
|
|
|
5498
5509
|
for (const l of i) {
|
|
5499
5510
|
const { id: h, title: p, dir: f, layout: d, children: m, meta: g } = l;
|
|
5500
5511
|
if (f) {
|
|
5501
|
-
const x =
|
|
5512
|
+
const x = Et({
|
|
5502
5513
|
name: e,
|
|
5503
5514
|
prefix: s,
|
|
5504
5515
|
component: r,
|
|
@@ -5509,7 +5520,7 @@ function _t(t) {
|
|
|
5509
5520
|
});
|
|
5510
5521
|
c.push(...x);
|
|
5511
5522
|
} else if (d) {
|
|
5512
|
-
const x =
|
|
5523
|
+
const x = Et({
|
|
5513
5524
|
name: e,
|
|
5514
5525
|
prefix: s,
|
|
5515
5526
|
component: r,
|
|
@@ -5517,7 +5528,7 @@ function _t(t) {
|
|
|
5517
5528
|
homepage: u,
|
|
5518
5529
|
loader: n,
|
|
5519
5530
|
pages: m || []
|
|
5520
|
-
}),
|
|
5531
|
+
}), S = {
|
|
5521
5532
|
name: `layout_${h}`,
|
|
5522
5533
|
path: s,
|
|
5523
5534
|
component: () => n(h),
|
|
@@ -5529,31 +5540,31 @@ function _t(t) {
|
|
|
5529
5540
|
},
|
|
5530
5541
|
children: x
|
|
5531
5542
|
};
|
|
5532
|
-
c.push(
|
|
5533
|
-
} else if (c.push(
|
|
5534
|
-
const x =
|
|
5543
|
+
c.push(S), c.push(ft(l, t));
|
|
5544
|
+
} else if (c.push(ft(l, t)), u === h) {
|
|
5545
|
+
const x = ft(l, t);
|
|
5535
5546
|
x.path = "", x.name = `home_${h}`, c.push(x);
|
|
5536
5547
|
}
|
|
5537
5548
|
}
|
|
5538
5549
|
return c;
|
|
5539
5550
|
}
|
|
5540
|
-
function
|
|
5551
|
+
function un(t = {}, e) {
|
|
5541
5552
|
const { css: s, store: i, enhance: r } = t, { window: n, app: a, library: u = {}, adapter: c, mode: l } = e, { Pinia: h } = u;
|
|
5542
|
-
a.config.globalProperties.$libs = u,
|
|
5553
|
+
a.config.globalProperties.$libs = u, At(n, "global-css", s || ""), h && i && cn(i, a, h), hn(a, c, t), !c.access && t.access && ln(t.access, a, l, c), pn(a, t), r && fn(r, a, u);
|
|
5543
5554
|
}
|
|
5544
|
-
function
|
|
5555
|
+
function cn(t, e, s) {
|
|
5545
5556
|
if (!e.config.globalProperties.$pinia) {
|
|
5546
5557
|
const i = s.createPinia();
|
|
5547
5558
|
e.use(i);
|
|
5548
5559
|
}
|
|
5549
5560
|
if (O(t) && t.value) {
|
|
5550
|
-
const i =
|
|
5561
|
+
const i = J(t, {}, !1, !1, !0), r = s.defineStore("$store", i(e) || {});
|
|
5551
5562
|
e.config.globalProperties.$store = r();
|
|
5552
5563
|
}
|
|
5553
5564
|
}
|
|
5554
|
-
function
|
|
5565
|
+
function ln(t, e, s, i) {
|
|
5555
5566
|
if (O(t) && t.value) {
|
|
5556
|
-
const r =
|
|
5567
|
+
const r = J(t, {}, !1, !1, !0), { alert: n, request: a } = i, u = new Ht({
|
|
5557
5568
|
alert: n,
|
|
5558
5569
|
storagePrefix: "__VTJ_APP_",
|
|
5559
5570
|
...r(e)
|
|
@@ -5561,37 +5572,37 @@ function cn(t, e, s, i) {
|
|
|
5561
5572
|
u.connect({ mode: s, router: c, request: a }), e.use(u);
|
|
5562
5573
|
}
|
|
5563
5574
|
}
|
|
5564
|
-
function
|
|
5575
|
+
function hn(t, e, s) {
|
|
5565
5576
|
if (!e.request) return;
|
|
5566
5577
|
const { axios: i, request: r, response: n } = s;
|
|
5567
5578
|
if (i && O(i) && i.value) {
|
|
5568
|
-
const a =
|
|
5579
|
+
const a = J(i, {}, !1, !1, !0);
|
|
5569
5580
|
e.request.setConfig(a(t));
|
|
5570
5581
|
}
|
|
5571
5582
|
if (r && O(r) && r.value) {
|
|
5572
|
-
const a =
|
|
5583
|
+
const a = J(r, {}, !1, !1, !0), u = e.request;
|
|
5573
5584
|
u.__unReq && u.__unReq(), u.__unReq = e.request.useRequest((c) => a(c, t));
|
|
5574
5585
|
}
|
|
5575
5586
|
if (n && O(n) && n.value) {
|
|
5576
|
-
const a =
|
|
5587
|
+
const a = J(n, {}, !1, !1, !0), u = e.request;
|
|
5577
5588
|
u.__unRes && u.__unRes(), u.__unRes = e.request.useResponse((c) => a(c, t));
|
|
5578
5589
|
}
|
|
5579
5590
|
}
|
|
5580
|
-
function
|
|
5591
|
+
function pn(t, e) {
|
|
5581
5592
|
const { beforeEach: s, afterEach: i } = e, r = t.config.globalProperties.$router;
|
|
5582
5593
|
if (s && O(s) && s.value) {
|
|
5583
|
-
const n =
|
|
5594
|
+
const n = J(s, {}, !1, !1, !0);
|
|
5584
5595
|
r && r.beforeEach((a, u, c) => n(a, u, c, t));
|
|
5585
5596
|
}
|
|
5586
5597
|
if (i && O(i) && i.value) {
|
|
5587
|
-
const n =
|
|
5598
|
+
const n = J(i, {}, !1, !1, !0);
|
|
5588
5599
|
r && r.afterEach((a, u, c) => n(a, u, c, t));
|
|
5589
5600
|
}
|
|
5590
5601
|
}
|
|
5591
|
-
function
|
|
5592
|
-
O(t) && t.value &&
|
|
5602
|
+
function fn(t, e, s = {}) {
|
|
5603
|
+
O(t) && t.value && J(t, {}, !1, !1, !0)(e, s);
|
|
5593
5604
|
}
|
|
5594
|
-
function
|
|
5605
|
+
function dn(t, e, s) {
|
|
5595
5606
|
if (!t || !e || !s) return;
|
|
5596
5607
|
const { VueI18n: i } = e;
|
|
5597
5608
|
if (i) {
|
|
@@ -5610,9 +5621,9 @@ function fn(t, e, s) {
|
|
|
5610
5621
|
t.use(c);
|
|
5611
5622
|
}
|
|
5612
5623
|
}
|
|
5613
|
-
const
|
|
5614
|
-
var
|
|
5615
|
-
class
|
|
5624
|
+
const $t = Symbol("Provider");
|
|
5625
|
+
var mn = /* @__PURE__ */ ((t) => (t.Production = "production", t.Development = "development", t))(mn || {});
|
|
5626
|
+
class gn extends si {
|
|
5616
5627
|
/**
|
|
5617
5628
|
* 创建Provider实例
|
|
5618
5629
|
* @param options 配置选项
|
|
@@ -5643,7 +5654,7 @@ class mn extends ti {
|
|
|
5643
5654
|
// 全局变量
|
|
5644
5655
|
modules = {};
|
|
5645
5656
|
// 异步模块加载器
|
|
5646
|
-
adapter = { request:
|
|
5657
|
+
adapter = { request: mt, jsonp: us };
|
|
5647
5658
|
// 适配器接口
|
|
5648
5659
|
apis = {};
|
|
5649
5660
|
// API集合
|
|
@@ -5683,7 +5694,7 @@ class mn extends ti {
|
|
|
5683
5694
|
} catch (n) {
|
|
5684
5695
|
ge.warn("模拟数据模版异常", n);
|
|
5685
5696
|
}
|
|
5686
|
-
const r =
|
|
5697
|
+
const r = Ae();
|
|
5687
5698
|
return r || console.warn(
|
|
5688
5699
|
"[@vtj/renderer]",
|
|
5689
5700
|
"项目缺少mockjs, 你需要安装mockjs依赖,并在应用的 main.ts 中添加 mockjs 导入,确保 window.Mock 可用"
|
|
@@ -5704,10 +5715,10 @@ class mn extends ti {
|
|
|
5704
5715
|
if (this.project = i ? await i() : await this.service.init(e), !this.project)
|
|
5705
5716
|
throw new Error("project is null");
|
|
5706
5717
|
const { apis: r = [], meta: n = [], env: a = [] } = this.project, u = globalThis;
|
|
5707
|
-
u && (u.CKEDITOR_VERSION = void 0), this.initEnv(a), this.mode === P.Raw ? await this.loadDependencies(u) : await this.loadAssets(u), this.initMock(u), this.apis =
|
|
5718
|
+
u && (u.CKEDITOR_VERSION = void 0), this.initEnv(a), this.mode === P.Raw ? await this.loadDependencies(u) : await this.loadAssets(u), this.initMock(u), this.apis = _r(r, n, this.adapter), Ws(u), Sr(r, u), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
|
|
5708
5719
|
}
|
|
5709
5720
|
initMock(e) {
|
|
5710
|
-
const s =
|
|
5721
|
+
const s = Ae(e);
|
|
5711
5722
|
s && s.setup({
|
|
5712
5723
|
timeout: "50-500"
|
|
5713
5724
|
});
|
|
@@ -5732,7 +5743,7 @@ class mn extends ti {
|
|
|
5732
5743
|
materialExports: f,
|
|
5733
5744
|
materialMapLibrary: d,
|
|
5734
5745
|
libraryLocaleMap: m
|
|
5735
|
-
} =
|
|
5746
|
+
} = yi(
|
|
5736
5747
|
s,
|
|
5737
5748
|
a,
|
|
5738
5749
|
u === "development"
|
|
@@ -5740,37 +5751,37 @@ class mn extends ti {
|
|
|
5740
5751
|
);
|
|
5741
5752
|
Object.assign(this.libraryLocaleMap, m);
|
|
5742
5753
|
for (const g of l) {
|
|
5743
|
-
const x = i[g],
|
|
5744
|
-
if (
|
|
5745
|
-
r[g] =
|
|
5754
|
+
const x = i[g], S = e[g];
|
|
5755
|
+
if (S)
|
|
5756
|
+
r[g] = S;
|
|
5746
5757
|
else if (x)
|
|
5747
5758
|
e[g] = r[g] = await x();
|
|
5748
5759
|
else {
|
|
5749
|
-
const
|
|
5750
|
-
for (const
|
|
5751
|
-
|
|
5760
|
+
const N = h[g] || [];
|
|
5761
|
+
for (const w of N)
|
|
5762
|
+
Ke(w) && await Ii(w, he.append(w, { v: we })), ze(w) && await zt(he.append(w, { v: we }));
|
|
5752
5763
|
r[g] = e[g];
|
|
5753
5764
|
}
|
|
5754
|
-
const
|
|
5755
|
-
if (
|
|
5756
|
-
const
|
|
5757
|
-
c[
|
|
5765
|
+
const I = m[g];
|
|
5766
|
+
if (I) {
|
|
5767
|
+
const N = i[I];
|
|
5768
|
+
c[I] = N ? await N() : e[I];
|
|
5758
5769
|
}
|
|
5759
5770
|
}
|
|
5760
5771
|
if (u === "development") {
|
|
5761
5772
|
for (const x of p)
|
|
5762
|
-
await
|
|
5773
|
+
await zt(he.append(x, { v: we }));
|
|
5763
5774
|
const g = this.materials || {};
|
|
5764
5775
|
for (const x of f) {
|
|
5765
|
-
const
|
|
5766
|
-
if (
|
|
5767
|
-
|
|
5768
|
-
n[
|
|
5776
|
+
const S = e[d[x]], I = S?.default || S, N = ii[x];
|
|
5777
|
+
if (N)
|
|
5778
|
+
I && N.forEach((w) => {
|
|
5779
|
+
n[w] = I[w];
|
|
5769
5780
|
});
|
|
5770
5781
|
else {
|
|
5771
|
-
const
|
|
5772
|
-
|
|
5773
|
-
n[
|
|
5782
|
+
const w = g[x] ? (await g[x]()).default : e[x];
|
|
5783
|
+
w && I && (w.components || []).forEach((D) => {
|
|
5784
|
+
n[D.name] = _i(D, I);
|
|
5774
5785
|
});
|
|
5775
5786
|
}
|
|
5776
5787
|
}
|
|
@@ -5785,21 +5796,21 @@ class mn extends ti {
|
|
|
5785
5796
|
routeMeta: c
|
|
5786
5797
|
} = i, l = a ? "" : "/", h = {
|
|
5787
5798
|
path: `${l}${u}/:id`,
|
|
5788
|
-
name:
|
|
5789
|
-
component:
|
|
5799
|
+
name: Ee,
|
|
5800
|
+
component: pt
|
|
5790
5801
|
}, p = this.getHomepage(), f = {
|
|
5791
5802
|
path: l,
|
|
5792
|
-
name:
|
|
5793
|
-
component: p ?
|
|
5803
|
+
name: He,
|
|
5804
|
+
component: p ? pt : r.startupComponent || on,
|
|
5794
5805
|
meta: c
|
|
5795
5806
|
};
|
|
5796
|
-
if (e.hasRoute(
|
|
5807
|
+
if (e.hasRoute(Ee) && e.removeRoute(Ee), e.hasRoute(He) && e.removeRoute(He), i.enableStaticRoute) {
|
|
5797
5808
|
const d = s?.pages || [];
|
|
5798
|
-
|
|
5809
|
+
Et({
|
|
5799
5810
|
name: u,
|
|
5800
5811
|
prefix: l,
|
|
5801
5812
|
pages: d,
|
|
5802
|
-
component:
|
|
5813
|
+
component: pt,
|
|
5803
5814
|
loader: this.getRenderComponent.bind(this),
|
|
5804
5815
|
homepage: p?.id
|
|
5805
5816
|
}).forEach((g) => {
|
|
@@ -5809,7 +5820,7 @@ class mn extends ti {
|
|
|
5809
5820
|
a ? (e.addRoute(a, h), e.addRoute(a, f)) : (e.addRoute(h), e.addRoute(f));
|
|
5810
5821
|
}
|
|
5811
5822
|
setErrorHandler(e) {
|
|
5812
|
-
e.config.errorHandler =
|
|
5823
|
+
e.config.errorHandler = pi((s, i, r) => {
|
|
5813
5824
|
const n = i?.$options.name, a = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", u = `[ ${n} ] ${a} ${r}`;
|
|
5814
5825
|
if (!["getComputedStyle", "ResizeObserver"].some((l) => u.includes(l))) {
|
|
5815
5826
|
try {
|
|
@@ -5841,11 +5852,11 @@ class mn extends ti {
|
|
|
5841
5852
|
install(e) {
|
|
5842
5853
|
const { libraryLocaleMap: s, libraryLocales: i } = this, { libraryOptions: r = {} } = this.options, n = e.config.globalProperties.installed || {};
|
|
5843
5854
|
for (const [a, u] of Object.entries(this.library))
|
|
5844
|
-
if (!n[a] &&
|
|
5855
|
+
if (!n[a] && Ai(u)) {
|
|
5845
5856
|
const l = { locale: i[s[a]] }, h = r[a] || {}, p = { ...l, ...h };
|
|
5846
5857
|
e.use(u, p), n[a] = !0;
|
|
5847
5858
|
}
|
|
5848
|
-
e.provide(
|
|
5859
|
+
e.provide($t, this), e.config.globalProperties.$provider = this, e.config.globalProperties.$apis = this.apis, e.config.globalProperties.$request = this.adapter?.request, this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), this.project?.platform !== "uniapp" && this.mode !== P.Design && this.initGlobals(this.project?.globals || {}, {
|
|
5849
5860
|
app: e,
|
|
5850
5861
|
window: globalThis,
|
|
5851
5862
|
adapter: this.adapter,
|
|
@@ -5892,7 +5903,7 @@ class mn extends ti {
|
|
|
5892
5903
|
return s(e) || null;
|
|
5893
5904
|
}
|
|
5894
5905
|
getMenus(e = "page", s = "") {
|
|
5895
|
-
return
|
|
5906
|
+
return We(s, e, this.project?.pages || []);
|
|
5896
5907
|
}
|
|
5897
5908
|
getHomepage() {
|
|
5898
5909
|
const { homepage: e } = this.project || {};
|
|
@@ -5932,12 +5943,12 @@ class mn extends ti {
|
|
|
5932
5943
|
apis: a,
|
|
5933
5944
|
window: globalThis,
|
|
5934
5945
|
...s
|
|
5935
|
-
}, c =
|
|
5946
|
+
}, c = Ct({
|
|
5936
5947
|
getDsl: async (l) => await this.getDsl(l) || null,
|
|
5937
5948
|
getDslByUrl: async (l) => await this.getDslByUrl(l) || null,
|
|
5938
5949
|
options: u
|
|
5939
5950
|
});
|
|
5940
|
-
return
|
|
5951
|
+
return St({
|
|
5941
5952
|
...u,
|
|
5942
5953
|
dsl: e,
|
|
5943
5954
|
loader: c
|
|
@@ -5974,7 +5985,7 @@ class mn extends ti {
|
|
|
5974
5985
|
* @returns Vue异步组件
|
|
5975
5986
|
*/
|
|
5976
5987
|
defineUrlSchemaComponent(e, s) {
|
|
5977
|
-
return
|
|
5988
|
+
return Jt(async () => {
|
|
5978
5989
|
const i = await this.getDslByUrl(e);
|
|
5979
5990
|
return i ? (i.name = s || i.name, this.createDslRenderer(i).renderer) : null;
|
|
5980
5991
|
});
|
|
@@ -5987,7 +5998,7 @@ class mn extends ti {
|
|
|
5987
5998
|
* @returns Vue异步组件
|
|
5988
5999
|
*/
|
|
5989
6000
|
definePluginComponent(e) {
|
|
5990
|
-
return
|
|
6001
|
+
return Jt(async () => await zs(e, globalThis));
|
|
5991
6002
|
}
|
|
5992
6003
|
/**
|
|
5993
6004
|
* 设置应用全局
|
|
@@ -6002,10 +6013,10 @@ class mn extends ti {
|
|
|
6002
6013
|
},
|
|
6003
6014
|
s
|
|
6004
6015
|
);
|
|
6005
|
-
|
|
6016
|
+
un(e, i);
|
|
6006
6017
|
}
|
|
6007
6018
|
initI18n(e, s, i) {
|
|
6008
|
-
|
|
6019
|
+
dn(e, s, i);
|
|
6009
6020
|
}
|
|
6010
6021
|
initEnv(e = []) {
|
|
6011
6022
|
this.env = e.reduce(
|
|
@@ -6014,15 +6025,15 @@ class mn extends ti {
|
|
|
6014
6025
|
);
|
|
6015
6026
|
}
|
|
6016
6027
|
}
|
|
6017
|
-
function
|
|
6018
|
-
const e = new
|
|
6028
|
+
function jn(t) {
|
|
6029
|
+
const e = new gn(t);
|
|
6019
6030
|
return {
|
|
6020
6031
|
provider: e,
|
|
6021
6032
|
onReady: (i) => e.ready(i)
|
|
6022
6033
|
};
|
|
6023
6034
|
}
|
|
6024
|
-
function
|
|
6025
|
-
const e =
|
|
6035
|
+
function Xs(t = {}) {
|
|
6036
|
+
const e = It($t, null);
|
|
6026
6037
|
if (!e)
|
|
6027
6038
|
throw new Error("Can not find provider");
|
|
6028
6039
|
if (e.nodeEnv === "development") {
|
|
@@ -6038,39 +6049,39 @@ function Js(t = {}) {
|
|
|
6038
6049
|
}
|
|
6039
6050
|
return e;
|
|
6040
6051
|
}
|
|
6041
|
-
function
|
|
6042
|
-
return
|
|
6043
|
-
}
|
|
6044
|
-
function jn() {
|
|
6045
|
-
return Oe().$store || {};
|
|
6052
|
+
function Fe() {
|
|
6053
|
+
return It($t, null)?.globals ?? {};
|
|
6046
6054
|
}
|
|
6047
6055
|
function Mn() {
|
|
6048
|
-
return
|
|
6056
|
+
return Fe().$store || {};
|
|
6049
6057
|
}
|
|
6050
6058
|
function Dn() {
|
|
6051
|
-
return
|
|
6059
|
+
return Fe().$pinia || {};
|
|
6052
6060
|
}
|
|
6053
6061
|
function Bn() {
|
|
6054
|
-
return
|
|
6062
|
+
return Fe().$request;
|
|
6055
6063
|
}
|
|
6056
6064
|
function Hn() {
|
|
6057
|
-
return
|
|
6065
|
+
return Fe().$libs || {};
|
|
6066
|
+
}
|
|
6067
|
+
function $n() {
|
|
6068
|
+
return Fe().$apis || {};
|
|
6058
6069
|
}
|
|
6059
|
-
async function
|
|
6060
|
-
const { name: s, urls: i = [] } = t || {}, r = i.map((u) => e + u), { css: n, js: a } =
|
|
6061
|
-
if (n.length &&
|
|
6062
|
-
return await
|
|
6070
|
+
async function Un(t, e = "") {
|
|
6071
|
+
const { name: s, urls: i = [] } = t || {}, r = i.map((u) => e + u), { css: n, js: a } = Si(r);
|
|
6072
|
+
if (n.length && fs(n), a.length)
|
|
6073
|
+
return await ds(a, s).catch(
|
|
6063
6074
|
() => {
|
|
6064
6075
|
}
|
|
6065
6076
|
);
|
|
6066
6077
|
}
|
|
6067
|
-
const
|
|
6078
|
+
const Zs = {
|
|
6068
6079
|
type: "json",
|
|
6069
6080
|
validSuccess: !0,
|
|
6070
6081
|
originResponse: !1,
|
|
6071
6082
|
failMessage: !0,
|
|
6072
6083
|
validate: (t) => t.data?.code === 0
|
|
6073
|
-
},
|
|
6084
|
+
}, xn = (t, e = "/__vtj__/api/:type.json") => (s, i, r) => t.send({
|
|
6074
6085
|
url: e,
|
|
6075
6086
|
method: "post",
|
|
6076
6087
|
params: { type: s },
|
|
@@ -6079,8 +6090,8 @@ const Qs = {
|
|
|
6079
6090
|
type: s,
|
|
6080
6091
|
data: i
|
|
6081
6092
|
},
|
|
6082
|
-
settings:
|
|
6083
|
-
}),
|
|
6093
|
+
settings: Zs
|
|
6094
|
+
}), vn = (t, e = "/__vtj__/api/uploader.json") => async (s, i) => await t.send({
|
|
6084
6095
|
url: e,
|
|
6085
6096
|
method: "post",
|
|
6086
6097
|
data: {
|
|
@@ -6088,12 +6099,12 @@ const Qs = {
|
|
|
6088
6099
|
projectId: i
|
|
6089
6100
|
},
|
|
6090
6101
|
settings: {
|
|
6091
|
-
...
|
|
6102
|
+
...Zs,
|
|
6092
6103
|
type: "data"
|
|
6093
6104
|
}
|
|
6094
6105
|
}).then((r) => r && r[0] ? r[0] : null).catch(() => null);
|
|
6095
|
-
function
|
|
6096
|
-
return
|
|
6106
|
+
function Gn(t) {
|
|
6107
|
+
return os({
|
|
6097
6108
|
settings: {
|
|
6098
6109
|
type: "json",
|
|
6099
6110
|
validSuccess: !0,
|
|
@@ -6106,9 +6117,9 @@ function Un(t) {
|
|
|
6106
6117
|
}
|
|
6107
6118
|
});
|
|
6108
6119
|
}
|
|
6109
|
-
class
|
|
6110
|
-
constructor(e =
|
|
6111
|
-
this.req = e, this.api =
|
|
6120
|
+
class Ut {
|
|
6121
|
+
constructor(e = mt) {
|
|
6122
|
+
this.req = e, this.api = xn(e), this.uploader = vn(e);
|
|
6112
6123
|
}
|
|
6113
6124
|
api;
|
|
6114
6125
|
pluginCaches = {};
|
|
@@ -6192,10 +6203,10 @@ class Dt {
|
|
|
6192
6203
|
return await this.api("clearStaticFiles", e).catch(() => "");
|
|
6193
6204
|
}
|
|
6194
6205
|
async getPluginMaterial(e) {
|
|
6195
|
-
const { urls: s = [] } = e, i = s.filter((n) =>
|
|
6206
|
+
const { urls: s = [] } = e, i = s.filter((n) => vi(n))[0];
|
|
6196
6207
|
if (!i) return null;
|
|
6197
6208
|
const r = this.pluginCaches[i];
|
|
6198
|
-
return r || (this.pluginCaches[i] =
|
|
6209
|
+
return r || (this.pluginCaches[i] = mt.send({
|
|
6199
6210
|
url: i,
|
|
6200
6211
|
method: "get",
|
|
6201
6212
|
settings: {
|
|
@@ -6208,22 +6219,22 @@ class Dt {
|
|
|
6208
6219
|
return console.log("BaseService.genSource", e), "";
|
|
6209
6220
|
}
|
|
6210
6221
|
}
|
|
6211
|
-
const L = new
|
|
6222
|
+
const L = new fi({
|
|
6212
6223
|
type: "local",
|
|
6213
6224
|
expired: 0,
|
|
6214
6225
|
prefix: "__VTJ_"
|
|
6215
6226
|
});
|
|
6216
|
-
class
|
|
6227
|
+
class qn extends Ut {
|
|
6217
6228
|
init(e) {
|
|
6218
|
-
const s = new
|
|
6229
|
+
const s = new $e(e), i = L.get(`project_${s.id}`), r = Object.assign(s.toDsl(), i || {});
|
|
6219
6230
|
return L.save(`project_${s.id}`, r), Promise.resolve(r);
|
|
6220
6231
|
}
|
|
6221
6232
|
saveProject(e) {
|
|
6222
|
-
const s = new
|
|
6233
|
+
const s = new $e(e);
|
|
6223
6234
|
return L.save(`project_${s.id}`, s.toDsl()), Promise.resolve(!0);
|
|
6224
6235
|
}
|
|
6225
6236
|
saveMaterials(e, s) {
|
|
6226
|
-
return L.save(`materials_${e.id}`,
|
|
6237
|
+
return L.save(`materials_${e.id}`, kt(s)), Promise.resolve(!0);
|
|
6227
6238
|
}
|
|
6228
6239
|
saveFile(e) {
|
|
6229
6240
|
return L.save(`file_${e.id}`, e), Promise.resolve(!0);
|
|
@@ -6247,7 +6258,7 @@ class Gn extends Dt {
|
|
|
6247
6258
|
return Promise.resolve(!0);
|
|
6248
6259
|
}
|
|
6249
6260
|
getHistory(e) {
|
|
6250
|
-
const s = L.get(`history_${e}`), i = new
|
|
6261
|
+
const s = L.get(`history_${e}`), i = new as(s || { id: e });
|
|
6251
6262
|
return Promise.resolve(i.toDsl());
|
|
6252
6263
|
}
|
|
6253
6264
|
getHistoryItem(e, s) {
|
|
@@ -6263,22 +6274,22 @@ class Gn extends Dt {
|
|
|
6263
6274
|
}), Promise.resolve(!0);
|
|
6264
6275
|
}
|
|
6265
6276
|
}
|
|
6266
|
-
class
|
|
6277
|
+
class bn extends Ut {
|
|
6267
6278
|
projects = {};
|
|
6268
6279
|
materials = {};
|
|
6269
6280
|
files = {};
|
|
6270
6281
|
histories = {};
|
|
6271
6282
|
historyItems = {};
|
|
6272
6283
|
init(e) {
|
|
6273
|
-
const s = new
|
|
6284
|
+
const s = new $e(e), i = this.projects[s.id] || {}, r = Object.assign(s.toDsl(), i);
|
|
6274
6285
|
return this.projects[r.id] = r, Promise.resolve(r);
|
|
6275
6286
|
}
|
|
6276
6287
|
saveProject(e) {
|
|
6277
|
-
const s = new
|
|
6288
|
+
const s = new $e(e);
|
|
6278
6289
|
return this.projects[s.id] = s.toDsl(), Promise.resolve(!0);
|
|
6279
6290
|
}
|
|
6280
6291
|
saveMaterials(e, s) {
|
|
6281
|
-
return e.id && (this.materials[e.id] =
|
|
6292
|
+
return e.id && (this.materials[e.id] = kt(s)), Promise.resolve(!0);
|
|
6282
6293
|
}
|
|
6283
6294
|
saveFile(e) {
|
|
6284
6295
|
return this.files[e.id] = e, Promise.resolve(!0);
|
|
@@ -6302,7 +6313,7 @@ class vn extends Dt {
|
|
|
6302
6313
|
return Promise.resolve(!0);
|
|
6303
6314
|
}
|
|
6304
6315
|
getHistory(e) {
|
|
6305
|
-
const s = this.histories[e], i = new
|
|
6316
|
+
const s = this.histories[e], i = new as(s || { id: e });
|
|
6306
6317
|
return Promise.resolve(i);
|
|
6307
6318
|
}
|
|
6308
6319
|
getHistoryItem(e, s) {
|
|
@@ -6320,11 +6331,11 @@ class vn extends Dt {
|
|
|
6320
6331
|
}), Promise.resolve(!0);
|
|
6321
6332
|
}
|
|
6322
6333
|
}
|
|
6323
|
-
let
|
|
6324
|
-
function
|
|
6325
|
-
return
|
|
6334
|
+
let Be = null;
|
|
6335
|
+
function Wn() {
|
|
6336
|
+
return Be || (Be = new bn(), Be);
|
|
6326
6337
|
}
|
|
6327
|
-
class
|
|
6338
|
+
class Kn extends Ut {
|
|
6328
6339
|
getFileCaches = {};
|
|
6329
6340
|
async getExtension() {
|
|
6330
6341
|
return await this.api("getExtension", {}).catch(() => {
|
|
@@ -6341,7 +6352,7 @@ class Wn extends Dt {
|
|
|
6341
6352
|
async saveMaterials(e, s) {
|
|
6342
6353
|
return !!await this.api("saveMaterials", {
|
|
6343
6354
|
project: e,
|
|
6344
|
-
materials:
|
|
6355
|
+
materials: kt(s)
|
|
6345
6356
|
}).catch(() => !1);
|
|
6346
6357
|
}
|
|
6347
6358
|
async saveFile(e) {
|
|
@@ -6382,94 +6393,94 @@ class Wn extends Dt {
|
|
|
6382
6393
|
}
|
|
6383
6394
|
}
|
|
6384
6395
|
export {
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6396
|
+
In as ACCESS,
|
|
6397
|
+
qs as ACCESS_KEY,
|
|
6398
|
+
Ht as Access,
|
|
6399
|
+
xi as BUILD_IN_TAGS,
|
|
6400
|
+
mi as BUILT_IN_DIRECTIVES,
|
|
6401
|
+
Ut as BaseService,
|
|
6402
|
+
En as COMPOSITION_HOOKS_LIST,
|
|
6403
|
+
Qt as CONTEXT_HOST,
|
|
6404
|
+
Er as Context,
|
|
6394
6405
|
P as ContextMode,
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6406
|
+
gi as DATA_TYPES,
|
|
6407
|
+
He as HOMEPAGE_ROUTE_NAME,
|
|
6408
|
+
hs as HTML_TAGS,
|
|
6409
|
+
Rn as JSCodeToString,
|
|
6410
|
+
wn as LIFE_CYCLES_LIST,
|
|
6411
|
+
Kn as LocalService,
|
|
6412
|
+
bn as MemoryService,
|
|
6413
|
+
mn as NodeEnv,
|
|
6414
|
+
Ee as PAGE_ROUTE_NAME,
|
|
6415
|
+
gn as Provider,
|
|
6416
|
+
kn as REMOTE,
|
|
6417
|
+
qn as StorageService,
|
|
6418
|
+
we as VTJ_RENDERER_VERSION,
|
|
6419
|
+
Tn as adoptStylesToInline,
|
|
6420
|
+
At as adoptedStyleSheets,
|
|
6421
|
+
Fn as clearLoaderCache,
|
|
6422
|
+
Ci as compileScopedCSS,
|
|
6423
|
+
ki as convertCssRpx,
|
|
6424
|
+
On as createAccess,
|
|
6425
|
+
Vn as createAdapter,
|
|
6426
|
+
An as createAssetScripts,
|
|
6427
|
+
Pn as createAssetsCss,
|
|
6428
|
+
Rr as createDataSources,
|
|
6429
|
+
Ct as createLoader,
|
|
6430
|
+
Wn as createMemoryService,
|
|
6431
|
+
We as createMenus,
|
|
6432
|
+
yr as createMetaApi,
|
|
6433
|
+
Cr as createMock,
|
|
6434
|
+
jn as createProvider,
|
|
6435
|
+
St as createRenderer,
|
|
6436
|
+
br as createSchemaApi,
|
|
6437
|
+
_r as createSchemaApis,
|
|
6438
|
+
Gn as createServiceRequest,
|
|
6439
|
+
Hr as defaultLoader,
|
|
6440
|
+
Me as fillBasePath,
|
|
6441
|
+
Ae as getMock,
|
|
6442
|
+
Qs as getModifiers,
|
|
6443
|
+
zs as getPlugin,
|
|
6444
|
+
_i as getRawComponent,
|
|
6445
|
+
Ni as isArrowFunction,
|
|
6446
|
+
Vi as isAssignment,
|
|
6447
|
+
Pi as isBuiltInTag,
|
|
6448
|
+
Ke as isCSSUrl,
|
|
6449
|
+
Ri as isCallFunction,
|
|
6450
|
+
gr as isJSCode,
|
|
6440
6451
|
T as isJSExpression,
|
|
6441
6452
|
O as isJSFunction,
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6453
|
+
vi as isJSON,
|
|
6454
|
+
ze as isJSUrl,
|
|
6455
|
+
Ti as isNativeTag,
|
|
6456
|
+
Ai as isVuePlugin,
|
|
6457
|
+
Ii as loadCss,
|
|
6458
|
+
fs as loadCssUrl,
|
|
6459
|
+
Un as loadEnhance,
|
|
6460
|
+
ds as loadScriptUrl,
|
|
6461
|
+
Ys as menusFilter,
|
|
6462
|
+
wr as mockApi,
|
|
6463
|
+
Sr as mockApis,
|
|
6464
|
+
Ws as mockCleanup,
|
|
6465
|
+
Se as nodeCache,
|
|
6455
6466
|
be as nodeRender,
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6467
|
+
yi as parseDeps,
|
|
6468
|
+
Re as parseExpression,
|
|
6469
|
+
J as parseFunction,
|
|
6470
|
+
Si as parseUrls,
|
|
6471
|
+
$t as providerKey,
|
|
6472
|
+
bi as removeProdFlag,
|
|
6473
|
+
Ei as rpxToPx,
|
|
6474
|
+
Nn as setupPageSetting,
|
|
6475
|
+
ps as toString,
|
|
6476
|
+
qe as triggerError,
|
|
6477
|
+
vr as useAccess,
|
|
6478
|
+
$n as useApis,
|
|
6479
|
+
Fe as useGlobals,
|
|
6480
|
+
Hn as useLibs,
|
|
6481
|
+
Ln as useMask,
|
|
6482
|
+
Dn as usePinia,
|
|
6483
|
+
Xs as useProvider,
|
|
6484
|
+
Bn as useRequest,
|
|
6485
|
+
Mn as useStore
|
|
6475
6486
|
};
|