@vtj/renderer 0.18.20 → 0.18.22
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 +12 -12
- package/dist/index.mjs +756 -730
- 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 ui, BUILT_IN_COMPONENTS as ci, ProjectModel as
|
|
2
|
-
import { url as
|
|
3
|
-
import * as
|
|
4
|
-
import { inject as
|
|
5
|
-
import { useRoute as
|
|
1
|
+
import { Base as ui, BUILT_IN_COMPONENTS as ci, ProjectModel as qe, HistoryModel as fs } from "@vtj/core";
|
|
2
|
+
import { url as pe, isUrl as xt, dedupArray as li, isFunction as K, isString as te, logger as ve, storage as ot, cookie as ut, toArray as Yt, unRSA as Xt, delay as Pe, createRequest as ds, jsonp as ms, merge as hi, pathToRegexp as pi, pathToRegexpMatch as fi, formDataToJson as di, isEqual as ct, Queue as mi, cloneDeep as Zt, camelCase as Z, upperFirstCamelCase as gi, pick as xi, request as vt, loadScript as es, debounce as vi, Storage as bi, mapToObject as Pt } from "@vtj/utils";
|
|
3
|
+
import * as be from "vue";
|
|
4
|
+
import { inject as Tt, defineComponent as gs, h as bt, ref as yt, watchEffect as yi, defineAsyncComponent as ts } from "vue";
|
|
5
|
+
import { useRoute as xs } 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.22
|
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const ke = "0.18.22";
|
|
14
14
|
var T = /* @__PURE__ */ ((t) => (t.Runtime = "Runtime", t.Design = "Design", t.Raw = "Raw", t.VNode = "VNode", t))(T || {});
|
|
15
|
-
const
|
|
15
|
+
const ss = [
|
|
16
16
|
"$el",
|
|
17
17
|
"$emit",
|
|
18
18
|
"$nextTick",
|
|
@@ -67,9 +67,9 @@ const es = [
|
|
|
67
67
|
Object,
|
|
68
68
|
Function,
|
|
69
69
|
Date
|
|
70
|
-
},
|
|
70
|
+
}, Ie = "VtjPage", Ge = "VtjHomepage", vs = "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
|
-
), Ci = "component,slot".split(","),
|
|
72
|
+
), Ci = "component,slot".split(","), Nn = [
|
|
73
73
|
"h",
|
|
74
74
|
"t",
|
|
75
75
|
"t",
|
|
@@ -89,7 +89,7 @@ const es = [
|
|
|
89
89
|
"p",
|
|
90
90
|
"r",
|
|
91
91
|
"o"
|
|
92
|
-
].join(""),
|
|
92
|
+
].join(""), Rn = {
|
|
93
93
|
auth: [
|
|
94
94
|
"h",
|
|
95
95
|
"t",
|
|
@@ -149,13 +149,13 @@ const es = [
|
|
|
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 He(t, e) {
|
|
153
|
+
return t.map((s) => xt(s) || s.startsWith("/") ? s : `${e}${s}`);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Qe(t) {
|
|
156
156
|
return /\.css$/.test(t);
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Ye(t) {
|
|
159
159
|
return /\.js$/.test(t);
|
|
160
160
|
}
|
|
161
161
|
function wi(t) {
|
|
@@ -163,12 +163,12 @@ function wi(t) {
|
|
|
163
163
|
}
|
|
164
164
|
function Vn(t) {
|
|
165
165
|
return t.map(
|
|
166
|
-
(e) => `<script src="${
|
|
166
|
+
(e) => `<script src="${pe.append(e, { v: ke })}"><\/script>`
|
|
167
167
|
).join("");
|
|
168
168
|
}
|
|
169
169
|
function On(t = []) {
|
|
170
170
|
return t.map(
|
|
171
|
-
(e) => `<link rel="stylesheet" href="${
|
|
171
|
+
(e) => `<link rel="stylesheet" href="${pe.append(e, { v: ke })}" />`
|
|
172
172
|
).join("");
|
|
173
173
|
}
|
|
174
174
|
function Ei(t, e = !1) {
|
|
@@ -177,15 +177,15 @@ function Ei(t, e = !1) {
|
|
|
177
177
|
function ki(t, e, s = !1) {
|
|
178
178
|
const i = t.filter((d) => !!d.enabled), r = [], n = [], a = [], u = [], c = {}, l = {}, h = [], p = {};
|
|
179
179
|
return i.forEach(
|
|
180
|
-
({ urls: d, assetsUrl: f, library: m, assetsLibrary:
|
|
181
|
-
d?.forEach((
|
|
182
|
-
|
|
183
|
-
}), m && (u.push(m), c[m] =
|
|
180
|
+
({ urls: d, assetsUrl: f, library: m, assetsLibrary: v, localeLibrary: g }) => {
|
|
181
|
+
d?.forEach((x) => {
|
|
182
|
+
Ye(x) && r.push(Ei(x, s)), Qe(x) && n.push(x);
|
|
183
|
+
}), m && (u.push(m), c[m] = He(d || [], e), g && (l[m] = g)), f && a.push(f), v && h.push(v), m && v && (p[v] = m);
|
|
184
184
|
}
|
|
185
185
|
), {
|
|
186
|
-
scripts:
|
|
187
|
-
css:
|
|
188
|
-
materials:
|
|
186
|
+
scripts: He(r, e),
|
|
187
|
+
css: He(n, e),
|
|
188
|
+
materials: He(a, e),
|
|
189
189
|
libraryExports: u,
|
|
190
190
|
materialExports: li(h),
|
|
191
191
|
materialMapLibrary: p,
|
|
@@ -198,7 +198,7 @@ function Ii(t, e) {
|
|
|
198
198
|
return i ? e[i]?.[r || s] : e[r || s];
|
|
199
199
|
}
|
|
200
200
|
function Ai(t = []) {
|
|
201
|
-
const e = t.filter((i) =>
|
|
201
|
+
const e = t.filter((i) => Qe(i)), s = t.filter((i) => Ye(i));
|
|
202
202
|
return {
|
|
203
203
|
css: e,
|
|
204
204
|
js: s
|
|
@@ -214,33 +214,33 @@ function Pi(t, e) {
|
|
|
214
214
|
continue;
|
|
215
215
|
}
|
|
216
216
|
if (l.substring(p, p + 2) === "/*") {
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
p =
|
|
217
|
+
const x = l.indexOf("*/", p + 2);
|
|
218
|
+
if (x !== -1) {
|
|
219
|
+
p = x + 2;
|
|
220
220
|
continue;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
if (l[p] === "@") {
|
|
224
|
-
const
|
|
224
|
+
const x = p;
|
|
225
225
|
for (; p < l.length && l[p] !== "{" && l[p] !== ";"; )
|
|
226
226
|
p++;
|
|
227
|
-
const k = l.substring(
|
|
227
|
+
const k = l.substring(x, p).trim(), N = k.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(x, 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 C = p + 1;
|
|
235
|
+
let D = 1;
|
|
236
|
+
for (p++; p < l.length && D > 0; )
|
|
237
|
+
l[p] === "{" ? D++ : l[p] === "}" && D--, p++;
|
|
238
|
+
const de = l.substring(x, p), Se = l.substring(C, p - 1);
|
|
239
239
|
h.push({
|
|
240
240
|
type: N ? "keyframes" : "at-rule",
|
|
241
241
|
rule: k,
|
|
242
|
-
content:
|
|
243
|
-
inner:
|
|
242
|
+
content: de,
|
|
243
|
+
inner: Se
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
continue;
|
|
@@ -255,9 +255,9 @@ function Pi(t, e) {
|
|
|
255
255
|
continue;
|
|
256
256
|
}
|
|
257
257
|
const m = p + 1;
|
|
258
|
-
let
|
|
259
|
-
for (p++; p < l.length &&
|
|
260
|
-
l[p] === "{" ?
|
|
258
|
+
let v = 1;
|
|
259
|
+
for (p++; p < l.length && v > 0; )
|
|
260
|
+
l[p] === "{" ? v++ : l[p] === "}" && v--, p++;
|
|
261
261
|
const g = l.substring(m, p - 1);
|
|
262
262
|
h.push({
|
|
263
263
|
type: "rule",
|
|
@@ -319,20 +319,20 @@ function Pi(t, e) {
|
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
const Ti = 750;
|
|
322
|
-
function
|
|
322
|
+
function Ni(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
325
|
const r = s || Ti;
|
|
326
326
|
return e * i / r;
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Ri(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), d = `${
|
|
335
|
+
const l = c[1], h = parseFloat(l), d = `${Ni(t, h).toFixed(6).replace(/\.?0+$/, "")}px`;
|
|
336
336
|
n += d, a += c[0].length - 1;
|
|
337
337
|
continue;
|
|
338
338
|
}
|
|
@@ -341,11 +341,11 @@ function Ni(t, e) {
|
|
|
341
341
|
}
|
|
342
342
|
return n;
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
return
|
|
344
|
+
function bs(t) {
|
|
345
|
+
return te(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 Nt(t, e, s, i = !1) {
|
|
348
|
+
const r = t.CSSStyleSheet, n = i ? `data-v-${e}` : e, a = t.__uniConfig ? Ri(t, s) : s, u = i ? Pi(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);
|
|
@@ -377,9 +377,9 @@ function Fn(t) {
|
|
|
377
377
|
}
|
|
378
378
|
async function Vi(t, e) {
|
|
379
379
|
const s = await globalThis.fetch(e).then((i) => i.text()).catch(() => "");
|
|
380
|
-
s &&
|
|
380
|
+
s && Nt(globalThis, t, s);
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function ys(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 vs(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 _s(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) => {
|
|
@@ -408,9 +408,9 @@ function Fi(t) {
|
|
|
408
408
|
return Ci.includes(t);
|
|
409
409
|
}
|
|
410
410
|
function Li(t) {
|
|
411
|
-
return
|
|
411
|
+
return vs.includes(t);
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function Te(t = globalThis) {
|
|
414
414
|
const e = globalThis?.Mock;
|
|
415
415
|
if (e) return e;
|
|
416
416
|
const s = t?.Mock;
|
|
@@ -431,20 +431,20 @@ function Mi(t) {
|
|
|
431
431
|
function Di(t) {
|
|
432
432
|
return t.includes("=");
|
|
433
433
|
}
|
|
434
|
-
var
|
|
434
|
+
var lt = {
|
|
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
|
-
}, Hi = /^in(stanceof)?$/, Rt = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",
|
|
445
|
-
Rt =
|
|
446
|
-
var
|
|
447
|
-
function
|
|
440
|
+
}, ht = "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", Bi = {
|
|
441
|
+
5: ht,
|
|
442
|
+
"5module": ht + " export import",
|
|
443
|
+
6: ht + " const class extends export import super"
|
|
444
|
+
}, Hi = /^in(stanceof)?$/, Rt = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", Ss = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_", $i = new RegExp("[" + Rt + "]"), Ui = new RegExp("[" + Rt + Ss + "]");
|
|
445
|
+
Rt = Ss = null;
|
|
446
|
+
var Cs = [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], Gi = [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 _t(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,10 +453,10 @@ function yt(t, e) {
|
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
function ae(t, e) {
|
|
456
|
-
return t < 65 ? t === 36 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && $i.test(String.fromCharCode(t)) : e === !1 ? !1 :
|
|
456
|
+
return t < 65 ? t === 36 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && $i.test(String.fromCharCode(t)) : e === !1 ? !1 : _t(t, Cs);
|
|
457
457
|
}
|
|
458
|
-
function
|
|
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 && Ui.test(String.fromCharCode(t)) : e === !1 ? !1 :
|
|
458
|
+
function ye(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 && Ui.test(String.fromCharCode(t)) : e === !1 ? !1 : _t(t, Cs) || _t(t, Gi);
|
|
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;
|
|
@@ -464,15 +464,15 @@ var E = function(e, s) {
|
|
|
464
464
|
function H(t, e) {
|
|
465
465
|
return new E(t, { beforeExpr: !0, binop: e });
|
|
466
466
|
}
|
|
467
|
-
var $ = { beforeExpr: !0 },
|
|
468
|
-
function
|
|
469
|
-
return e === void 0 && (e = {}), e.keyword = t,
|
|
467
|
+
var $ = { beforeExpr: !0 }, B = { startsExpr: !0 }, Vt = {};
|
|
468
|
+
function w(t, e) {
|
|
469
|
+
return e === void 0 && (e = {}), e.keyword = t, Vt[t] = new E(t, e);
|
|
470
470
|
}
|
|
471
471
|
var o = {
|
|
472
|
-
num: new E("num",
|
|
473
|
-
regexp: new E("regexp",
|
|
474
|
-
string: new E("string",
|
|
475
|
-
name: new E("name",
|
|
472
|
+
num: new E("num", B),
|
|
473
|
+
regexp: new E("regexp", B),
|
|
474
|
+
string: new E("string", B),
|
|
475
|
+
name: new E("name", B),
|
|
476
476
|
eof: new E("eof"),
|
|
477
477
|
// Punctuation token types.
|
|
478
478
|
bracketL: new E("[", { beforeExpr: !0, startsExpr: !0 }),
|
|
@@ -491,7 +491,7 @@ var o = {
|
|
|
491
491
|
template: new E("template"),
|
|
492
492
|
invalidTemplate: new E("invalidTemplate"),
|
|
493
493
|
ellipsis: new E("...", $),
|
|
494
|
-
backQuote: new E("`",
|
|
494
|
+
backQuote: new E("`", B),
|
|
495
495
|
dollarBraceL: new E("${", { beforeExpr: !0, startsExpr: !0 }),
|
|
496
496
|
// Operators. These carry several kinds of properties to help the
|
|
497
497
|
// parser use them properly (the presence of these properties is
|
|
@@ -525,75 +525,75 @@ var o = {
|
|
|
525
525
|
starstar: new E("**", { beforeExpr: !0 }),
|
|
526
526
|
coalesce: H("??", 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
|
-
}, G = /\r\n?|\n|\u2028|\u2029/,
|
|
564
|
-
function
|
|
528
|
+
_break: w("break"),
|
|
529
|
+
_case: w("case", $),
|
|
530
|
+
_catch: w("catch"),
|
|
531
|
+
_continue: w("continue"),
|
|
532
|
+
_debugger: w("debugger"),
|
|
533
|
+
_default: w("default", $),
|
|
534
|
+
_do: w("do", { isLoop: !0, beforeExpr: !0 }),
|
|
535
|
+
_else: w("else", $),
|
|
536
|
+
_finally: w("finally"),
|
|
537
|
+
_for: w("for", { isLoop: !0 }),
|
|
538
|
+
_function: w("function", B),
|
|
539
|
+
_if: w("if"),
|
|
540
|
+
_return: w("return", $),
|
|
541
|
+
_switch: w("switch"),
|
|
542
|
+
_throw: w("throw", $),
|
|
543
|
+
_try: w("try"),
|
|
544
|
+
_var: w("var"),
|
|
545
|
+
_const: w("const"),
|
|
546
|
+
_while: w("while", { isLoop: !0 }),
|
|
547
|
+
_with: w("with"),
|
|
548
|
+
_new: w("new", { beforeExpr: !0, startsExpr: !0 }),
|
|
549
|
+
_this: w("this", B),
|
|
550
|
+
_super: w("super", B),
|
|
551
|
+
_class: w("class", B),
|
|
552
|
+
_extends: w("extends", $),
|
|
553
|
+
_export: w("export"),
|
|
554
|
+
_import: w("import", B),
|
|
555
|
+
_null: w("null", B),
|
|
556
|
+
_true: w("true", B),
|
|
557
|
+
_false: w("false", B),
|
|
558
|
+
_in: w("in", { beforeExpr: !0, binop: 7 }),
|
|
559
|
+
_instanceof: w("instanceof", { beforeExpr: !0, binop: 7 }),
|
|
560
|
+
_typeof: w("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
561
|
+
_void: w("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
562
|
+
_delete: w("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
563
|
+
}, G = /\r\n?|\n|\u2028|\u2029/, Ne = new RegExp(G.source, "g");
|
|
564
|
+
function Fe(t, e) {
|
|
565
565
|
return t === 10 || t === 13 || !e && (t === 8232 || t === 8233);
|
|
566
566
|
}
|
|
567
|
-
var
|
|
568
|
-
function
|
|
567
|
+
var ws = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, U = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, Es = Object.prototype, qi = Es.hasOwnProperty, Wi = Es.toString;
|
|
568
|
+
function Xe(t, e) {
|
|
569
569
|
return qi.call(t, e);
|
|
570
570
|
}
|
|
571
|
-
var
|
|
571
|
+
var is = Array.isArray || (function(t) {
|
|
572
572
|
return Wi.call(t) === "[object Array]";
|
|
573
573
|
});
|
|
574
|
-
function
|
|
574
|
+
function he(t) {
|
|
575
575
|
return new RegExp("^(?:" + t.replace(/ /g, "|") + ")$");
|
|
576
576
|
}
|
|
577
|
-
var
|
|
577
|
+
var Re = function(e, s) {
|
|
578
578
|
this.line = e, this.column = s;
|
|
579
579
|
};
|
|
580
|
-
|
|
581
|
-
return new
|
|
580
|
+
Re.prototype.offset = function(e) {
|
|
581
|
+
return new Re(this.line, this.column + e);
|
|
582
582
|
};
|
|
583
|
-
var
|
|
583
|
+
var Ze = 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 ks(t, e) {
|
|
587
587
|
for (var s = 1, i = 0; ; ) {
|
|
588
|
-
|
|
589
|
-
var r =
|
|
588
|
+
Ne.lastIndex = i;
|
|
589
|
+
var r = Ne.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 Re(s, e - i);
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
var
|
|
596
|
+
var St = {
|
|
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
|
|
@@ -679,15 +679,15 @@ var _t = {
|
|
|
679
679
|
};
|
|
680
680
|
function Ki(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 St)
|
|
683
|
+
e[s] = t && Xe(t, s) ? t[s] : St[s];
|
|
684
|
+
if (e.ecmaVersion >= 2015 && (e.ecmaVersion -= 2009), e.allowReserved == null && (e.allowReserved = e.ecmaVersion < 5), is(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 is(e.onComment) && (e.onComment = zi(e, e.onComment)), e;
|
|
691
691
|
}
|
|
692
692
|
function zi(t, e) {
|
|
693
693
|
return function(s, i, r, n, a, u) {
|
|
@@ -697,50 +697,50 @@ function zi(t, e) {
|
|
|
697
697
|
start: r,
|
|
698
698
|
end: n
|
|
699
699
|
};
|
|
700
|
-
t.locations && (c.loc = new
|
|
700
|
+
t.locations && (c.loc = new Ze(this, a, u)), t.ranges && (c.range = [r, n]), e.push(c);
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
|
-
var
|
|
704
|
-
function
|
|
705
|
-
return
|
|
703
|
+
var Ve = 1, Le = 2, Ot = Ve | Le, Is = 4, As = 8, Ps = 16, Ts = 32, Ns = 64, Rs = 128;
|
|
704
|
+
function Ft(t, e) {
|
|
705
|
+
return Le | (t ? Is : 0) | (e ? As : 0);
|
|
706
706
|
}
|
|
707
|
-
var
|
|
708
|
-
this.options = e = Ki(e), this.sourceFile = e.sourceFile, this.keywords =
|
|
707
|
+
var rs = 0, Lt = 1, ee = 2, Vs = 3, Os = 4, Fs = 5, A = function(e, s, i) {
|
|
708
|
+
this.options = e = Ki(e), this.sourceFile = e.sourceFile, this.keywords = he(Bi[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 = lt[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(G).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(
|
|
719
|
-
},
|
|
715
|
+
this.reservedWords = he(r);
|
|
716
|
+
var a = (r ? r + " " : "") + lt.strict;
|
|
717
|
+
this.reservedWordsStrict = he(a), this.reservedWordsStrictBind = he(a + " " + lt.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(G).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(Ve), this.regexpState = null;
|
|
719
|
+
}, fe = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 } };
|
|
720
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
|
+
fe.inFunction.get = function() {
|
|
725
|
+
return (this.currentVarScope().flags & Le) > 0;
|
|
726
726
|
};
|
|
727
|
-
|
|
728
|
-
return (this.currentVarScope().flags &
|
|
727
|
+
fe.inGenerator.get = function() {
|
|
728
|
+
return (this.currentVarScope().flags & As) > 0;
|
|
729
729
|
};
|
|
730
|
-
|
|
731
|
-
return (this.currentVarScope().flags &
|
|
730
|
+
fe.inAsync.get = function() {
|
|
731
|
+
return (this.currentVarScope().flags & Is) > 0;
|
|
732
732
|
};
|
|
733
|
-
|
|
734
|
-
return (this.currentThisScope().flags &
|
|
733
|
+
fe.allowSuper.get = function() {
|
|
734
|
+
return (this.currentThisScope().flags & Ns) > 0;
|
|
735
735
|
};
|
|
736
|
-
|
|
737
|
-
return (this.currentThisScope().flags &
|
|
736
|
+
fe.allowDirectSuper.get = function() {
|
|
737
|
+
return (this.currentThisScope().flags & Rs) > 0;
|
|
738
738
|
};
|
|
739
|
-
|
|
739
|
+
fe.treatFunctionsAsVar.get = function() {
|
|
740
740
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
741
741
|
};
|
|
742
742
|
A.prototype.inNonArrowFunction = function() {
|
|
743
|
-
return (this.currentThisScope().flags &
|
|
743
|
+
return (this.currentThisScope().flags & Le) > 0;
|
|
744
744
|
};
|
|
745
745
|
A.extend = function() {
|
|
746
746
|
for (var e = [], s = arguments.length; s--; ) e[s] = arguments[s];
|
|
@@ -758,7 +758,7 @@ A.parseExpressionAt = function(e, s, i) {
|
|
|
758
758
|
A.tokenizer = function(e, s) {
|
|
759
759
|
return new this(s, e);
|
|
760
760
|
};
|
|
761
|
-
Object.defineProperties(A.prototype,
|
|
761
|
+
Object.defineProperties(A.prototype, fe);
|
|
762
762
|
var L = A.prototype, Ji = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
|
|
763
763
|
L.strictDirective = function(t) {
|
|
764
764
|
for (; ; ) {
|
|
@@ -806,7 +806,7 @@ L.expect = function(t) {
|
|
|
806
806
|
L.unexpected = function(t) {
|
|
807
807
|
this.raise(t ?? this.start, "Unexpected token");
|
|
808
808
|
};
|
|
809
|
-
function
|
|
809
|
+
function et() {
|
|
810
810
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
811
811
|
}
|
|
812
812
|
L.checkPatternErrors = function(t, e) {
|
|
@@ -844,7 +844,7 @@ y.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 jt = { kind: "loop" }, Qi = { kind: "switch" };
|
|
848
848
|
y.isLet = function(t) {
|
|
849
849
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
850
850
|
return !1;
|
|
@@ -857,7 +857,7 @@ y.isLet = function(t) {
|
|
|
857
857
|
if (i === 123)
|
|
858
858
|
return !0;
|
|
859
859
|
if (ae(i, !0)) {
|
|
860
|
-
for (var r = s + 1;
|
|
860
|
+
for (var r = s + 1; ye(this.input.charCodeAt(r), !0); )
|
|
861
861
|
++r;
|
|
862
862
|
var n = this.input.slice(s, r);
|
|
863
863
|
if (!Hi.test(n))
|
|
@@ -870,7 +870,7 @@ y.isAsyncFunction = function() {
|
|
|
870
870
|
return !1;
|
|
871
871
|
U.lastIndex = this.pos;
|
|
872
872
|
var t = U.exec(this.input), e = this.pos + t[0].length;
|
|
873
|
-
return !G.test(this.input.slice(this.pos, e)) && this.input.slice(e, e + 8) === "function" && (e + 8 === this.input.length || !
|
|
873
|
+
return !G.test(this.input.slice(this.pos, e)) && this.input.slice(e, e + 8) === "function" && (e + 8 === this.input.length || !ye(this.input.charAt(e + 8)));
|
|
874
874
|
};
|
|
875
875
|
y.parseStatement = function(t, e, s) {
|
|
876
876
|
var i = this.type, r = this.startNode(), n;
|
|
@@ -944,23 +944,23 @@ y.parseDebuggerStatement = function(t) {
|
|
|
944
944
|
return this.next(), this.semicolon(), this.finishNode(t, "DebuggerStatement");
|
|
945
945
|
};
|
|
946
946
|
y.parseDoStatement = function(t) {
|
|
947
|
-
return this.next(), this.labels.push(
|
|
947
|
+
return this.next(), this.labels.push(jt), 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
|
y.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(jt), 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 et(), 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
|
y.parseFunctionStatement = function(t, e, s) {
|
|
963
|
-
return this.next(), this.parseFunction(t,
|
|
963
|
+
return this.next(), this.parseFunction(t, Ae | (s ? 0 : Ct), !1, e);
|
|
964
964
|
};
|
|
965
965
|
y.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");
|
|
@@ -988,7 +988,7 @@ y.parseTryStatement = function(t) {
|
|
|
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 ? Ts : 0), this.checkLVal(e.param, s ? Os : ee), 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 @@ y.parseVarStatement = function(t, e) {
|
|
|
999
999
|
return this.next(), this.parseVar(t, !1, e), this.semicolon(), this.finishNode(t, "VariableDeclaration");
|
|
1000
1000
|
};
|
|
1001
1001
|
y.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(jt), t.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(t, "WhileStatement");
|
|
1003
1003
|
};
|
|
1004
1004
|
y.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 @@ y.parseVar = function(t, e, s) {
|
|
|
1050
1050
|
return t;
|
|
1051
1051
|
};
|
|
1052
1052
|
y.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" ? Lt : ee, !1);
|
|
1054
1054
|
};
|
|
1055
|
-
var
|
|
1055
|
+
var Ae = 1, Ct = 2, Ls = 4;
|
|
1056
1056
|
y.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 & Ct && this.unexpected(), t.generator = this.eat(o.star)), this.options.ecmaVersion >= 8 && (t.async = !!i), e & Ae && (t.id = e & Ls && this.type !== o.name ? null : this.parseIdent(), t.id && !(e & Ct) && this.checkLVal(t.id, this.strict || t.generator || t.async ? this.treatFunctionsAsVar ? Lt : ee : Vs));
|
|
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(Ft(t.async, t.generator)), e & Ae || (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 & Ae ? "FunctionDeclaration" : "FunctionExpression");
|
|
1060
1060
|
};
|
|
1061
1061
|
y.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 @@ y.parseClassMethod = function(t, e, s, i) {
|
|
|
1091
1091
|
return t.value = this.parseMethod(e, s, i), this.finishNode(t, "MethodDefinition");
|
|
1092
1092
|
};
|
|
1093
1093
|
y.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, ee, !1)) : (e === !0 && this.unexpected(), t.id = null);
|
|
1095
1095
|
};
|
|
1096
1096
|
y.parseClassSuper = function(t) {
|
|
1097
1097
|
t.superClass = this.eat(o._extends) ? this.parseExprSubscripts() : null;
|
|
@@ -1104,7 +1104,7 @@ y.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, Ae | Ls, !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 @@ y.parseExport = function(t, e) {
|
|
|
1129
1129
|
return this.finishNode(t, "ExportNamedDeclaration");
|
|
1130
1130
|
};
|
|
1131
1131
|
y.checkExport = function(t, e, s) {
|
|
1132
|
-
t && (
|
|
1132
|
+
t && (Xe(t, e) && this.raiseRecoverable(s, "Duplicate export '" + e + "'"), t[e] = !0);
|
|
1133
1133
|
};
|
|
1134
1134
|
y.checkPatternExport = function(t, e) {
|
|
1135
1135
|
var s = e.type;
|
|
@@ -1176,12 +1176,12 @@ y.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, ee), 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, ee), 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 @@ y.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, ee), t.push(this.finishNode(r, "ImportSpecifier"));
|
|
1193
1193
|
}
|
|
1194
1194
|
return t;
|
|
1195
1195
|
};
|
|
@@ -1201,8 +1201,8 @@ y.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 se = A.prototype;
|
|
1205
|
+
se.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 @@ te.toAssignable = function(t, e, s) {
|
|
|
1248
1248
|
else s && this.checkPatternErrors(s, !0);
|
|
1249
1249
|
return t;
|
|
1250
1250
|
};
|
|
1251
|
-
|
|
1251
|
+
se.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 @@ te.toAssignableList = function(t, e) {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
return t;
|
|
1261
1261
|
};
|
|
1262
|
-
|
|
1262
|
+
se.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
|
+
se.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
|
+
se.parseBindingAtom = function() {
|
|
1271
1271
|
if (this.options.ecmaVersion >= 6)
|
|
1272
1272
|
switch (this.type) {
|
|
1273
1273
|
case o.bracketL:
|
|
@@ -1278,7 +1278,7 @@ te.parseBindingAtom = function() {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
return this.parseIdent();
|
|
1280
1280
|
};
|
|
1281
|
-
|
|
1281
|
+
se.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 @@ te.parseBindingList = function(t, e, s) {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
return i;
|
|
1298
1298
|
};
|
|
1299
|
-
|
|
1299
|
+
se.parseBindingListItem = function(t) {
|
|
1300
1300
|
return t;
|
|
1301
1301
|
};
|
|
1302
|
-
|
|
1302
|
+
se.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
|
+
se.checkLVal = function(t, e, s) {
|
|
1309
|
+
switch (e === void 0 && (e = rs), t.type) {
|
|
1310
1310
|
case "Identifier":
|
|
1311
|
-
e ===
|
|
1311
|
+
e === ee && 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 && (Xe(s, t.name) && this.raiseRecoverable(t.start, "Argument name clash"), s[t.name] = !0), e !== rs && e !== Fs && 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");
|
|
@@ -1394,7 +1394,7 @@ _.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 et(), 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,14 +1480,14 @@ _.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 et(), p = this.yieldPos, d = this.awaitPos, f = 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))
|
|
1487
1487
|
return this.checkPatternErrors(h, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = p, this.awaitPos = d, this.awaitIdentPos = f, this.parseArrowExpression(this.startNodeAt(e, s), m, !0);
|
|
1488
1488
|
this.checkExpressionErrors(h, !0), this.yieldPos = p || this.yieldPos, this.awaitPos = d || this.awaitPos, this.awaitIdentPos = f || this.awaitIdentPos;
|
|
1489
|
-
var
|
|
1490
|
-
|
|
1489
|
+
var v = this.startNodeAt(e, s);
|
|
1490
|
+
v.callee = t, v.arguments = m, a && (v.optional = u), t = this.finishNode(v, "CallExpression");
|
|
1491
1491
|
} else if (this.type === o.backQuote) {
|
|
1492
1492
|
(u || n) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
1493
1493
|
var g = this.startNodeAt(e, s);
|
|
@@ -1583,7 +1583,7 @@ _.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 et(), p = this.yieldPos, d = this.awaitPos, f;
|
|
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;
|
|
@@ -1593,10 +1593,10 @@ _.parseParenAndDistinguishExpression = function(t) {
|
|
|
1593
1593
|
break;
|
|
1594
1594
|
} else
|
|
1595
1595
|
u.push(this.parseMaybeAssign(!1, h, this.parseParenItem));
|
|
1596
|
-
var m = this.start,
|
|
1596
|
+
var m = this.start, v = this.startLoc;
|
|
1597
1597
|
if (this.expect(o.parenR), t && !this.canInsertSemicolon() && this.eat(o.arrow))
|
|
1598
1598
|
return this.checkPatternErrors(h, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = p, this.awaitPos = d, this.parseParenArrowList(e, s, u);
|
|
1599
|
-
(!u.length || l) && this.unexpected(this.lastTokStart), f && this.unexpected(f), this.checkExpressionErrors(h, !0), this.yieldPos = p || this.yieldPos, this.awaitPos = d || this.awaitPos, u.length > 1 ? (i = this.startNodeAt(n, a), i.expressions = u, this.finishNodeAt(i, "SequenceExpression", m,
|
|
1599
|
+
(!u.length || l) && this.unexpected(this.lastTokStart), f && this.unexpected(f), this.checkExpressionErrors(h, !0), this.yieldPos = p || this.yieldPos, this.awaitPos = d || this.awaitPos, u.length > 1 ? (i = this.startNodeAt(n, a), i.expressions = u, this.finishNodeAt(i, "SequenceExpression", m, v)) : i = u[0];
|
|
1600
1600
|
} else
|
|
1601
1601
|
i = this.parseParenExpression();
|
|
1602
1602
|
if (this.options.preserveParens) {
|
|
@@ -1696,11 +1696,11 @@ _.initFunction = function(t) {
|
|
|
1696
1696
|
};
|
|
1697
1697
|
_.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(Ft(e, i.generator) | Ns | (s ? Rs : 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
|
_.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(Ft(s, !1) | Ps), 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
|
_.parseFunctionBody = function(t, e, s) {
|
|
1706
1706
|
var i = e && this.type !== o.braceL, r = this.strict, n = !1;
|
|
@@ -1710,7 +1710,7 @@ _.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, Fs), 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 @@ _.isSimpleParamList = function(t) {
|
|
|
1725
1725
|
_.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, Lt, e ? null : s);
|
|
1729
1729
|
}
|
|
1730
1730
|
};
|
|
1731
1731
|
_.parseExprList = function(t, e, s, i) {
|
|
@@ -1760,17 +1760,17 @@ _.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 We = A.prototype;
|
|
1764
|
+
We.raise = function(t, e) {
|
|
1765
|
+
var s = ks(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
|
+
We.raiseRecoverable = We.raise;
|
|
1771
|
+
We.curPosition = function() {
|
|
1772
1772
|
if (this.options.locations)
|
|
1773
|
-
return new
|
|
1773
|
+
return new Re(this.curLine, this.pos - this.lineStart);
|
|
1774
1774
|
};
|
|
1775
1775
|
var oe = A.prototype, Zi = function(e) {
|
|
1776
1776
|
this.flags = e, this.var = [], this.lexical = [], this.functions = [];
|
|
@@ -1782,27 +1782,27 @@ oe.exitScope = function() {
|
|
|
1782
1782
|
this.scopeStack.pop();
|
|
1783
1783
|
};
|
|
1784
1784
|
oe.treatFunctionsAsVarInScope = function(t) {
|
|
1785
|
-
return t.flags &
|
|
1785
|
+
return t.flags & Le || !this.inModule && t.flags & Ve;
|
|
1786
1786
|
};
|
|
1787
1787
|
oe.declareName = function(t, e, s) {
|
|
1788
1788
|
var i = !1;
|
|
1789
|
-
if (e ===
|
|
1789
|
+
if (e === ee) {
|
|
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 & Ve && delete this.undefinedExports[t];
|
|
1792
|
+
} else if (e === Os) {
|
|
1793
1793
|
var n = this.currentScope();
|
|
1794
1794
|
n.lexical.push(t);
|
|
1795
|
-
} else if (e ===
|
|
1795
|
+
} else if (e === Vs) {
|
|
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 & Ts && 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 & Ve && delete this.undefinedExports[t], c.flags & Ot)
|
|
1806
1806
|
break;
|
|
1807
1807
|
}
|
|
1808
1808
|
i && this.raiseRecoverable(s, "Identifier '" + t + "' has already been declared");
|
|
@@ -1816,34 +1816,34 @@ oe.currentScope = function() {
|
|
|
1816
1816
|
oe.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 & Ot)
|
|
1820
1820
|
return e;
|
|
1821
1821
|
}
|
|
1822
1822
|
};
|
|
1823
1823
|
oe.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 & Ot && !(e.flags & Ps))
|
|
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 Mt = function(e, s, i) {
|
|
1831
|
+
this.type = "", this.start = s, this.end = 0, e.options.locations && (this.loc = new Ze(e, i)), e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile), e.options.ranges && (this.range = [s, 0]);
|
|
1832
|
+
}, tt = A.prototype;
|
|
1833
|
+
tt.startNode = function() {
|
|
1834
|
+
return new Mt(this, this.start, this.startLoc);
|
|
1835
1835
|
};
|
|
1836
|
-
|
|
1837
|
-
return new
|
|
1836
|
+
tt.startNodeAt = function(t, e) {
|
|
1837
|
+
return new Mt(this, t, e);
|
|
1838
1838
|
};
|
|
1839
|
-
function
|
|
1839
|
+
function js(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
|
+
tt.finishNode = function(t, e) {
|
|
1843
|
+
return js.call(this, t, e, this.lastTokEnd, this.lastTokEndLoc);
|
|
1844
1844
|
};
|
|
1845
|
-
|
|
1846
|
-
return
|
|
1845
|
+
tt.finishNodeAt = function(t, e, s, i) {
|
|
1846
|
+
return js.call(this, t, e, s, i);
|
|
1847
1847
|
};
|
|
1848
1848
|
var q = function(e, s, i, r, n) {
|
|
1849
1849
|
this.token = e, this.isExpr = !!s, this.preserveSpace = !!i, this.override = r, this.generator = !!n;
|
|
@@ -1860,15 +1860,15 @@ var q = function(e, s, i, r, n) {
|
|
|
1860
1860
|
f_expr: new q("function", !0),
|
|
1861
1861
|
f_expr_gen: new q("function", !0, !1, null, !0),
|
|
1862
1862
|
f_gen: new q("function", !1, !1, null, !0)
|
|
1863
|
-
},
|
|
1864
|
-
|
|
1863
|
+
}, st = A.prototype;
|
|
1864
|
+
st.initialContext = function() {
|
|
1865
1865
|
return [I.b_stat];
|
|
1866
1866
|
};
|
|
1867
|
-
|
|
1867
|
+
st.braceIsBlock = function(t) {
|
|
1868
1868
|
var e = this.curContext();
|
|
1869
1869
|
return e === I.f_expr || e === I.f_stat ? !0 : t === o.colon && (e === I.b_stat || e === I.b_expr) ? !e.isExpr : t === o._return || t === o.name && this.exprAllowed ? G.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 === I.b_stat : t === o._var || t === o._const || t === o.name ? !1 : !this.exprAllowed;
|
|
1870
1870
|
};
|
|
1871
|
-
|
|
1871
|
+
st.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 @@ et.inGeneratorContext = function() {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
return !1;
|
|
1878
1878
|
};
|
|
1879
|
-
|
|
1879
|
+
st.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
|
};
|
|
@@ -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: Ls,
|
|
1922
|
-
10: js,
|
|
1923
|
-
11: er
|
|
1924
|
-
}, is = "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", Ms = "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", Ds = Ms + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", sr = Ds + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", ir = {
|
|
1920
|
+
var Ms = "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", Ds = Ms + " Extended_Pictographic", er = Ds, tr = {
|
|
1925
1921
|
9: Ms,
|
|
1926
1922
|
10: Ds,
|
|
1923
|
+
11: er
|
|
1924
|
+
}, ns = "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", Bs = "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", Hs = Bs + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", sr = Hs + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", ir = {
|
|
1925
|
+
9: Bs,
|
|
1926
|
+
10: Hs,
|
|
1927
1927
|
11: sr
|
|
1928
|
-
},
|
|
1929
|
-
function
|
|
1930
|
-
var e =
|
|
1931
|
-
binary:
|
|
1928
|
+
}, $s = {};
|
|
1929
|
+
function Dt(t) {
|
|
1930
|
+
var e = $s[t] = {
|
|
1931
|
+
binary: he(tr[t] + " " + ns),
|
|
1932
1932
|
nonBinary: {
|
|
1933
|
-
General_Category:
|
|
1934
|
-
Script:
|
|
1933
|
+
General_Category: he(ns),
|
|
1934
|
+
Script: he(ir[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 b = A.prototype,
|
|
1943
|
-
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : ""), this.unicodeProperties =
|
|
1939
|
+
Dt(9);
|
|
1940
|
+
Dt(10);
|
|
1941
|
+
Dt(11);
|
|
1942
|
+
var b = A.prototype, ie = function(e) {
|
|
1943
|
+
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : ""), this.unicodeProperties = $s[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
|
+
ie.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
|
+
ie.prototype.raise = function(e) {
|
|
1950
1950
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + e);
|
|
1951
1951
|
};
|
|
1952
|
-
|
|
1952
|
+
ie.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 @@ se.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
|
+
ie.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 @@ se.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
|
+
ie.prototype.current = function(e) {
|
|
1972
1972
|
return e === void 0 && (e = !1), this.at(this.pos, e);
|
|
1973
1973
|
};
|
|
1974
|
-
|
|
1974
|
+
ie.prototype.lookahead = function(e) {
|
|
1975
1975
|
return e === void 0 && (e = !1), this.at(this.nextIndex(this.pos, e), e);
|
|
1976
1976
|
};
|
|
1977
|
-
|
|
1977
|
+
ie.prototype.advance = function(e) {
|
|
1978
1978
|
e === void 0 && (e = !1), this.pos = this.nextIndex(this.pos, e);
|
|
1979
1979
|
};
|
|
1980
|
-
|
|
1980
|
+
ie.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 Ke(t) {
|
|
1984
1984
|
return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
|
|
1985
1985
|
}
|
|
1986
1986
|
b.validateRegExpFlags = function(t) {
|
|
@@ -2179,13 +2179,13 @@ b.regexp_eatInvalidBracedQuantifier = function(t) {
|
|
|
2179
2179
|
};
|
|
2180
2180
|
b.regexp_eatSyntaxCharacter = function(t) {
|
|
2181
2181
|
var e = t.current();
|
|
2182
|
-
return
|
|
2182
|
+
return Us(e) ? (t.lastIntValue = e, t.advance(), !0) : !1;
|
|
2183
2183
|
};
|
|
2184
|
-
function
|
|
2184
|
+
function Us(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
|
b.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 && !Us(s); )
|
|
2189
2189
|
t.advance();
|
|
2190
2190
|
return t.pos !== e;
|
|
2191
2191
|
};
|
|
@@ -2221,8 +2221,8 @@ b.regexp_eatGroupName = function(t) {
|
|
|
2221
2221
|
};
|
|
2222
2222
|
b.regexp_eatRegExpIdentifierName = function(t) {
|
|
2223
2223
|
if (t.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(t)) {
|
|
2224
|
-
for (t.lastStringValue +=
|
|
2225
|
-
t.lastStringValue +=
|
|
2224
|
+
for (t.lastStringValue += Ke(t.lastIntValue); this.regexp_eatRegExpIdentifierPart(t); )
|
|
2225
|
+
t.lastStringValue += Ke(t.lastIntValue);
|
|
2226
2226
|
return !0;
|
|
2227
2227
|
}
|
|
2228
2228
|
return !1;
|
|
@@ -2239,7 +2239,7 @@ b.regexp_eatRegExpIdentifierPart = function(t) {
|
|
|
2239
2239
|
return t.advance(s), i === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(t, s) && (i = t.lastIntValue), nr(i) ? (t.lastIntValue = i, !0) : (t.pos = e, !1);
|
|
2240
2240
|
};
|
|
2241
2241
|
function nr(t) {
|
|
2242
|
-
return
|
|
2242
|
+
return ye(t, !0) || t === 36 || t === 95 || t === 8204 || t === 8205;
|
|
2243
2243
|
}
|
|
2244
2244
|
b.regexp_eatAtomEscape = function(t) {
|
|
2245
2245
|
return this.regexp_eatBackReference(t) || this.regexp_eatCharacterClassEscape(t) || this.regexp_eatCharacterEscape(t) || t.switchN && this.regexp_eatKGroupName(t) ? !0 : (t.switchU && (t.current() === 99 && t.raise("Invalid unicode escape"), t.raise("Invalid escape")), !1);
|
|
@@ -2283,7 +2283,7 @@ b.regexp_eatCControlLetter = function(t) {
|
|
|
2283
2283
|
return !1;
|
|
2284
2284
|
};
|
|
2285
2285
|
b.regexp_eatZero = function(t) {
|
|
2286
|
-
return t.current() === 48 && !
|
|
2286
|
+
return t.current() === 48 && !it(t.lookahead()) ? (t.lastIntValue = 0, t.advance(), !0) : !1;
|
|
2287
2287
|
};
|
|
2288
2288
|
b.regexp_eatControlEscape = function(t) {
|
|
2289
2289
|
var e = t.current();
|
|
@@ -2291,9 +2291,9 @@ b.regexp_eatControlEscape = function(t) {
|
|
|
2291
2291
|
};
|
|
2292
2292
|
b.regexp_eatControlLetter = function(t) {
|
|
2293
2293
|
var e = t.current();
|
|
2294
|
-
return
|
|
2294
|
+
return Gs(e) ? (t.lastIntValue = e % 32, t.advance(), !0) : !1;
|
|
2295
2295
|
};
|
|
2296
|
-
function
|
|
2296
|
+
function Gs(t) {
|
|
2297
2297
|
return t >= 65 && t <= 90 || t >= 97 && t <= 122;
|
|
2298
2298
|
}
|
|
2299
2299
|
b.regexp_eatRegExpUnicodeEscapeSequence = function(t, e) {
|
|
@@ -2396,28 +2396,28 @@ b.regexp_eatUnicodePropertyValueExpression = function(t) {
|
|
|
2396
2396
|
return !1;
|
|
2397
2397
|
};
|
|
2398
2398
|
b.regexp_validateUnicodePropertyNameAndValue = function(t, e, s) {
|
|
2399
|
-
|
|
2399
|
+
Xe(t.unicodeProperties.nonBinary, e) || t.raise("Invalid property name"), t.unicodeProperties.nonBinary[e].test(s) || t.raise("Invalid property value");
|
|
2400
2400
|
};
|
|
2401
2401
|
b.regexp_validateUnicodePropertyNameOrValue = function(t, e) {
|
|
2402
2402
|
t.unicodeProperties.binary.test(e) || t.raise("Invalid property name");
|
|
2403
2403
|
};
|
|
2404
2404
|
b.regexp_eatUnicodePropertyName = function(t) {
|
|
2405
2405
|
var e = 0;
|
|
2406
|
-
for (t.lastStringValue = "";
|
|
2407
|
-
t.lastStringValue +=
|
|
2406
|
+
for (t.lastStringValue = ""; qs(e = t.current()); )
|
|
2407
|
+
t.lastStringValue += Ke(e), t.advance();
|
|
2408
2408
|
return t.lastStringValue !== "";
|
|
2409
2409
|
};
|
|
2410
|
-
function
|
|
2411
|
-
return
|
|
2410
|
+
function qs(t) {
|
|
2411
|
+
return Gs(t) || t === 95;
|
|
2412
2412
|
}
|
|
2413
2413
|
b.regexp_eatUnicodePropertyValue = function(t) {
|
|
2414
2414
|
var e = 0;
|
|
2415
2415
|
for (t.lastStringValue = ""; ur(e = t.current()); )
|
|
2416
|
-
t.lastStringValue +=
|
|
2416
|
+
t.lastStringValue += Ke(e), t.advance();
|
|
2417
2417
|
return t.lastStringValue !== "";
|
|
2418
2418
|
};
|
|
2419
2419
|
function ur(t) {
|
|
2420
|
-
return
|
|
2420
|
+
return qs(t) || it(t);
|
|
2421
2421
|
}
|
|
2422
2422
|
b.regexp_eatLoneUnicodePropertyNameOrValue = function(t) {
|
|
2423
2423
|
return this.regexp_eatUnicodePropertyValue(t);
|
|
@@ -2461,7 +2461,7 @@ b.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 || zs(s)) && t.raise("Invalid class escape"), t.raise("Invalid escape");
|
|
2465
2465
|
}
|
|
2466
2466
|
t.pos = e;
|
|
2467
2467
|
}
|
|
@@ -2492,7 +2492,7 @@ b.regexp_eatClassEscape = function(t) {
|
|
|
2492
2492
|
};
|
|
2493
2493
|
b.regexp_eatClassControlLetter = function(t) {
|
|
2494
2494
|
var e = t.current();
|
|
2495
|
-
return
|
|
2495
|
+
return it(e) || e === 95 ? (t.lastIntValue = e % 32, t.advance(), !0) : !1;
|
|
2496
2496
|
};
|
|
2497
2497
|
b.regexp_eatHexEscapeSequence = function(t) {
|
|
2498
2498
|
var e = t.pos;
|
|
@@ -2508,23 +2508,23 @@ b.regexp_eatHexEscapeSequence = function(t) {
|
|
|
2508
2508
|
};
|
|
2509
2509
|
b.regexp_eatDecimalDigits = function(t) {
|
|
2510
2510
|
var e = t.pos, s = 0;
|
|
2511
|
-
for (t.lastIntValue = 0;
|
|
2511
|
+
for (t.lastIntValue = 0; it(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 it(t) {
|
|
2516
2516
|
return t >= 48 && t <= 57;
|
|
2517
2517
|
}
|
|
2518
2518
|
b.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; Ws(s = t.current()); )
|
|
2521
|
+
t.lastIntValue = 16 * t.lastIntValue + Ks(s), t.advance();
|
|
2522
2522
|
return t.pos !== e;
|
|
2523
2523
|
};
|
|
2524
|
-
function
|
|
2524
|
+
function Ws(t) {
|
|
2525
2525
|
return t >= 48 && t <= 57 || t >= 65 && t <= 70 || t >= 97 && t <= 102;
|
|
2526
2526
|
}
|
|
2527
|
-
function
|
|
2527
|
+
function Ks(t) {
|
|
2528
2528
|
return t >= 65 && t <= 70 ? 10 + (t - 65) : t >= 97 && t <= 102 ? 10 + (t - 97) : t - 48;
|
|
2529
2529
|
}
|
|
2530
2530
|
b.regexp_eatLegacyOctalEscapeSequence = function(t) {
|
|
@@ -2541,9 +2541,9 @@ b.regexp_eatLegacyOctalEscapeSequence = function(t) {
|
|
|
2541
2541
|
};
|
|
2542
2542
|
b.regexp_eatOctalDigit = function(t) {
|
|
2543
2543
|
var e = t.current();
|
|
2544
|
-
return
|
|
2544
|
+
return zs(e) ? (t.lastIntValue = e - 48, t.advance(), !0) : (t.lastIntValue = 0, !1);
|
|
2545
2545
|
};
|
|
2546
|
-
function
|
|
2546
|
+
function zs(t) {
|
|
2547
2547
|
return t >= 48 && t <= 55;
|
|
2548
2548
|
}
|
|
2549
2549
|
b.regexp_eatFixedHexDigits = function(t, e) {
|
|
@@ -2551,20 +2551,20 @@ b.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 (!Ws(r))
|
|
2555
2555
|
return t.pos = s, !1;
|
|
2556
|
-
t.lastIntValue = 16 * t.lastIntValue +
|
|
2556
|
+
t.lastIntValue = 16 * t.lastIntValue + Ks(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
|
|
2560
|
+
var Bt = 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 Ze(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
|
|
2562
2562
|
}, S = A.prototype;
|
|
2563
2563
|
S.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 Bt(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2565
2565
|
};
|
|
2566
2566
|
S.getToken = function() {
|
|
2567
|
-
return this.next(), new
|
|
2567
|
+
return this.next(), new Bt(this);
|
|
2568
2568
|
};
|
|
2569
2569
|
typeof Symbol < "u" && (S[Symbol.iterator] = function() {
|
|
2570
2570
|
var t = this;
|
|
@@ -2602,8 +2602,8 @@ S.fullCharCodeAtPos = function() {
|
|
|
2602
2602
|
S.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
|
+
Ne.lastIndex = e;
|
|
2606
|
+
for (var i; (i = Ne.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 @@ S.skipBlockComment = function() {
|
|
|
2616
2616
|
);
|
|
2617
2617
|
};
|
|
2618
2618
|
S.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 && !Fe(i); )
|
|
2620
2620
|
i = this.input.charCodeAt(++this.pos);
|
|
2621
2621
|
this.options.onComment && this.options.onComment(
|
|
2622
2622
|
!1,
|
|
@@ -2655,7 +2655,7 @@ S.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 && ws.test(String.fromCharCode(t)))
|
|
2659
2659
|
++this.pos;
|
|
2660
2660
|
else
|
|
2661
2661
|
break e;
|
|
@@ -2813,7 +2813,7 @@ S.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 '" + Ht(t) + "'");
|
|
2817
2817
|
};
|
|
2818
2818
|
S.finishOp = function(t, e) {
|
|
2819
2819
|
var s = this.input.slice(this.pos, this.pos + e);
|
|
@@ -2840,7 +2840,7 @@ S.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 ie(this));
|
|
2844
2844
|
u.reset(s, r, a), this.validateRegExpFlags(u), this.validateRegExpPattern(u);
|
|
2845
2845
|
var c = null;
|
|
2846
2846
|
try {
|
|
@@ -2865,14 +2865,14 @@ S.readInt = function(t, e, s) {
|
|
|
2865
2865
|
function cr(t, e) {
|
|
2866
2866
|
return e ? parseInt(t, 8) : parseFloat(t.replace(/_/g, ""));
|
|
2867
2867
|
}
|
|
2868
|
-
function
|
|
2868
|
+
function Js(t) {
|
|
2869
2869
|
return typeof BigInt != "function" ? null : BigInt(t.replace(/_/g, ""));
|
|
2870
2870
|
}
|
|
2871
2871
|
S.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 = Js(this.input.slice(e, this.pos)), ++this.pos) : ae(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(o.num, s);
|
|
2876
2876
|
};
|
|
2877
2877
|
S.readNumber = function(t) {
|
|
2878
2878
|
var e = this.pos;
|
|
@@ -2881,7 +2881,7 @@ S.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 = Js(this.input.slice(e, this.pos));
|
|
2885
2885
|
return ++this.pos, ae(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")), ae(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
@@ -2898,7 +2898,7 @@ S.readCodePoint = function() {
|
|
|
2898
2898
|
e = this.readHexChar(4);
|
|
2899
2899
|
return e;
|
|
2900
2900
|
};
|
|
2901
|
-
function
|
|
2901
|
+
function Ht(t) {
|
|
2902
2902
|
return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
|
|
2903
2903
|
}
|
|
2904
2904
|
S.readString = function(t) {
|
|
@@ -2907,17 +2907,17 @@ S.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) : (Fe(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 Qs = {};
|
|
2915
2915
|
S.tryReadTemplateToken = function() {
|
|
2916
2916
|
this.inTemplateElement = !0;
|
|
2917
2917
|
try {
|
|
2918
2918
|
this.readTmplToken();
|
|
2919
2919
|
} catch (t) {
|
|
2920
|
-
if (t ===
|
|
2920
|
+
if (t === Qs)
|
|
2921
2921
|
this.readInvalidTemplateToken();
|
|
2922
2922
|
else
|
|
2923
2923
|
throw t;
|
|
@@ -2926,7 +2926,7 @@ S.tryReadTemplateToken = function() {
|
|
|
2926
2926
|
};
|
|
2927
2927
|
S.invalidStringToken = function(t, e) {
|
|
2928
2928
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
2929
|
-
throw
|
|
2929
|
+
throw Qs;
|
|
2930
2930
|
this.raise(t, e);
|
|
2931
2931
|
};
|
|
2932
2932
|
S.readTmplToken = function() {
|
|
@@ -2937,7 +2937,7 @@ S.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 (Fe(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 @@ S.readEscapedChar = function(t) {
|
|
|
2983
2983
|
return String.fromCharCode(this.readHexChar(2));
|
|
2984
2984
|
// 'x'
|
|
2985
2985
|
case 117:
|
|
2986
|
-
return
|
|
2986
|
+
return Ht(this.readCodePoint());
|
|
2987
2987
|
// 'u'
|
|
2988
2988
|
case 116:
|
|
2989
2989
|
return " ";
|
|
@@ -3019,7 +3019,7 @@ S.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 Fe(e) ? "" : String.fromCharCode(e);
|
|
3023
3023
|
}
|
|
3024
3024
|
};
|
|
3025
3025
|
S.readHexChar = function(t) {
|
|
@@ -3030,14 +3030,14 @@ S.readWord1 = function() {
|
|
|
3030
3030
|
this.containsEsc = !1;
|
|
3031
3031
|
for (var t = "", e = !0, s = this.pos, i = this.options.ecmaVersion >= 6; this.pos < this.input.length; ) {
|
|
3032
3032
|
var r = this.fullCharCodeAtPos();
|
|
3033
|
-
if (
|
|
3033
|
+
if (ye(r, i))
|
|
3034
3034
|
this.pos += r <= 65535 ? 1 : 2;
|
|
3035
3035
|
else if (r === 92) {
|
|
3036
3036
|
this.containsEsc = !0, t += this.input.slice(s, this.pos);
|
|
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 ? ae :
|
|
3040
|
+
(e ? ae : ye)(a, i) || this.invalidStringToken(n, "Invalid Unicode escape"), t += Ht(a), s = this.pos;
|
|
3041
3041
|
} else
|
|
3042
3042
|
break;
|
|
3043
3043
|
e = !1;
|
|
@@ -3046,29 +3046,29 @@ S.readWord1 = function() {
|
|
|
3046
3046
|
};
|
|
3047
3047
|
S.readWord = function() {
|
|
3048
3048
|
var t = this.readWord1(), e = o.name;
|
|
3049
|
-
return this.keywords.test(t) && (e =
|
|
3049
|
+
return this.keywords.test(t) && (e = Vt[t]), this.finishToken(e, t);
|
|
3050
3050
|
};
|
|
3051
3051
|
var lr = "7.4.1";
|
|
3052
3052
|
A.acorn = {
|
|
3053
3053
|
Parser: A,
|
|
3054
3054
|
version: lr,
|
|
3055
|
-
defaultOptions:
|
|
3056
|
-
Position:
|
|
3057
|
-
SourceLocation:
|
|
3058
|
-
getLineInfo:
|
|
3059
|
-
Node:
|
|
3055
|
+
defaultOptions: St,
|
|
3056
|
+
Position: Re,
|
|
3057
|
+
SourceLocation: Ze,
|
|
3058
|
+
getLineInfo: ks,
|
|
3059
|
+
Node: Mt,
|
|
3060
3060
|
TokenType: E,
|
|
3061
3061
|
tokTypes: o,
|
|
3062
|
-
keywordTypes:
|
|
3062
|
+
keywordTypes: Vt,
|
|
3063
3063
|
TokContext: q,
|
|
3064
3064
|
tokContexts: I,
|
|
3065
|
-
isIdentifierChar:
|
|
3065
|
+
isIdentifierChar: ye,
|
|
3066
3066
|
isIdentifierStart: ae,
|
|
3067
|
-
Token:
|
|
3068
|
-
isNewLine:
|
|
3067
|
+
Token: Bt,
|
|
3068
|
+
isNewLine: Fe,
|
|
3069
3069
|
lineBreak: G,
|
|
3070
|
-
lineBreakG:
|
|
3071
|
-
nonASCIIwhitespace:
|
|
3070
|
+
lineBreakG: Ne,
|
|
3071
|
+
nonASCIIwhitespace: ws
|
|
3072
3072
|
};
|
|
3073
3073
|
function hr(t, e) {
|
|
3074
3074
|
return A.parse(t, e);
|
|
@@ -3077,18 +3077,18 @@ class pr extends Error {
|
|
|
3077
3077
|
}
|
|
3078
3078
|
class fr extends SyntaxError {
|
|
3079
3079
|
}
|
|
3080
|
-
class
|
|
3080
|
+
class wt extends ReferenceError {
|
|
3081
3081
|
}
|
|
3082
3082
|
class dr extends TypeError {
|
|
3083
3083
|
}
|
|
3084
|
-
class
|
|
3084
|
+
class Ys extends pr {
|
|
3085
3085
|
}
|
|
3086
3086
|
class mr extends fr {
|
|
3087
3087
|
}
|
|
3088
|
-
class W extends
|
|
3088
|
+
class W extends wt {
|
|
3089
3089
|
}
|
|
3090
3090
|
const O = {
|
|
3091
|
-
ExecutionTimeOutError: [3002, "Script execution timed out after %0ms",
|
|
3091
|
+
ExecutionTimeOutError: [3002, "Script execution timed out after %0ms", Ys],
|
|
3092
3092
|
NodeTypeSyntaxError: [1001, "Unknown node type: %0", W],
|
|
3093
3093
|
BinaryOperatorSyntaxError: [1002, "Unknown binary operator: %0", W],
|
|
3094
3094
|
LogicalOperatorSyntaxError: [
|
|
@@ -3111,11 +3111,11 @@ const O = {
|
|
|
3111
3111
|
VariableTypeSyntaxError: [1008, "Unknown variable type: %0", W],
|
|
3112
3112
|
ParamTypeSyntaxError: [1009, "Unknown param type: %0", W],
|
|
3113
3113
|
AssignmentTypeSyntaxError: [1010, "Unknown assignment type: %0", W],
|
|
3114
|
-
FunctionUndefinedReferenceError: [2001, "%0 is not a function",
|
|
3115
|
-
VariableUndefinedReferenceError: [2002, "%0 is not defined",
|
|
3114
|
+
FunctionUndefinedReferenceError: [2001, "%0 is not a function", wt],
|
|
3115
|
+
VariableUndefinedReferenceError: [2002, "%0 is not defined", wt],
|
|
3116
3116
|
IsNotConstructor: [2003, "%0 is not a constructor", dr]
|
|
3117
3117
|
}, gr = "1.4.8";
|
|
3118
|
-
function
|
|
3118
|
+
function as(t, e) {
|
|
3119
3119
|
Object.defineProperty(t, "name", {
|
|
3120
3120
|
value: e,
|
|
3121
3121
|
writable: !1,
|
|
@@ -3123,8 +3123,8 @@ function rs(t, e) {
|
|
|
3123
3123
|
configurable: !0
|
|
3124
3124
|
});
|
|
3125
3125
|
}
|
|
3126
|
-
const xr = Object.prototype.hasOwnProperty,
|
|
3127
|
-
function
|
|
3126
|
+
const xr = Object.prototype.hasOwnProperty, me = Symbol("Break"), ge = Symbol("Continue"), os = Symbol("DefaultCase"), V = Symbol("EmptyStatementReturn"), us = Symbol("WithScopeName"), cs = Symbol("SuperScopeName"), ls = Symbol("RootScopeName"), hs = Symbol("GlobalScopeName");
|
|
3127
|
+
function pt(t) {
|
|
3128
3128
|
return typeof t == "function";
|
|
3129
3129
|
}
|
|
3130
3130
|
class ne {
|
|
@@ -3151,7 +3151,7 @@ class ne {
|
|
|
3151
3151
|
};
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
|
-
function
|
|
3154
|
+
function $t(t, e, s = !0) {
|
|
3155
3155
|
if (!(t instanceof ne))
|
|
3156
3156
|
throw new Error("Illegal call");
|
|
3157
3157
|
if (typeof e != "string")
|
|
@@ -3166,13 +3166,13 @@ function Ht(t, e, s = !0) {
|
|
|
3166
3166
|
}, a = s ? i.getGlobalScope() : i.getCurrentScope();
|
|
3167
3167
|
return new M(a, n).evaluate(e);
|
|
3168
3168
|
}
|
|
3169
|
-
Object.defineProperty(
|
|
3169
|
+
Object.defineProperty($t, "__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 Ut(t, ...e) {
|
|
3176
3176
|
if (!(t instanceof ne))
|
|
3177
3177
|
throw new Error("Illegal call");
|
|
3178
3178
|
const s = t.generator(), i = e.pop(), r = new M(s.getGlobalScope(), s.getOptions()), n = `
|
|
@@ -3182,18 +3182,18 @@ function $t(t, ...e) {
|
|
|
3182
3182
|
`;
|
|
3183
3183
|
return r.evaluate(n);
|
|
3184
3184
|
}
|
|
3185
|
-
Object.defineProperty(
|
|
3185
|
+
Object.defineProperty(Ut, "__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 Y {
|
|
3192
3192
|
constructor(e) {
|
|
3193
3193
|
this.value = e;
|
|
3194
3194
|
}
|
|
3195
3195
|
}
|
|
3196
|
-
class
|
|
3196
|
+
class ce {
|
|
3197
3197
|
constructor(e) {
|
|
3198
3198
|
this.value = e;
|
|
3199
3199
|
}
|
|
@@ -3203,20 +3203,20 @@ class re {
|
|
|
3203
3203
|
this.value = e;
|
|
3204
3204
|
}
|
|
3205
3205
|
}
|
|
3206
|
-
class
|
|
3206
|
+
class xe {
|
|
3207
3207
|
constructor(e, s = null, i) {
|
|
3208
3208
|
this.name = i, this.parent = s, this.data = e, this.labelStack = [];
|
|
3209
3209
|
}
|
|
3210
3210
|
}
|
|
3211
|
-
function
|
|
3211
|
+
function $e() {
|
|
3212
3212
|
}
|
|
3213
3213
|
function vr(t = null, e) {
|
|
3214
|
-
return new
|
|
3214
|
+
return new xe(/* @__PURE__ */ Object.create(null), t, e);
|
|
3215
3215
|
}
|
|
3216
3216
|
function br(t) {
|
|
3217
3217
|
return Object.create(t);
|
|
3218
3218
|
}
|
|
3219
|
-
const
|
|
3219
|
+
const X = {
|
|
3220
3220
|
NaN: NaN,
|
|
3221
3221
|
Infinity: 1 / 0,
|
|
3222
3222
|
undefined: void 0,
|
|
@@ -3245,18 +3245,18 @@ const Y = {
|
|
|
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: $t,
|
|
3249
|
+
Function: Ut
|
|
3250
|
+
};
|
|
3251
|
+
typeof JSON < "u" && (X.JSON = JSON);
|
|
3252
|
+
typeof Promise < "u" && (X.Promise = Promise);
|
|
3253
|
+
typeof Set < "u" && (X.Set = Set);
|
|
3254
|
+
typeof Map < "u" && (X.Map = Map);
|
|
3255
|
+
typeof Symbol < "u" && (X.Symbol = Symbol);
|
|
3256
|
+
typeof Proxy < "u" && (X.Proxy = Proxy);
|
|
3257
|
+
typeof WeakMap < "u" && (X.WeakMap = WeakMap);
|
|
3258
|
+
typeof WeakSet < "u" && (X.WeakSet = WeakSet);
|
|
3259
|
+
typeof Reflect < "u" && (X.Reflect = Reflect);
|
|
3260
3260
|
class M {
|
|
3261
3261
|
constructor(e = M.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 = {
|
|
@@ -3269,12 +3269,12 @@ class M {
|
|
|
3269
3269
|
}
|
|
3270
3270
|
initEnvironment(e) {
|
|
3271
3271
|
let s;
|
|
3272
|
-
if (e instanceof
|
|
3272
|
+
if (e instanceof xe)
|
|
3273
3273
|
s = e;
|
|
3274
3274
|
else {
|
|
3275
3275
|
let r = null;
|
|
3276
3276
|
const n = this.createSuperScope(e);
|
|
3277
|
-
this.options.rootContext && (r = new
|
|
3277
|
+
this.options.rootContext && (r = new xe(br(this.options.rootContext), n, ls)), s = new xe(e, r || n, hs);
|
|
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 M {
|
|
|
3302
3302
|
return this.currentContext;
|
|
3303
3303
|
}
|
|
3304
3304
|
isInterruptThrow(e) {
|
|
3305
|
-
return e instanceof
|
|
3305
|
+
return e instanceof Ys || e instanceof W || e instanceof mr;
|
|
3306
3306
|
}
|
|
3307
3307
|
createSuperScope(e) {
|
|
3308
|
-
let s = Object.assign({},
|
|
3308
|
+
let s = Object.assign({}, X);
|
|
3309
3309
|
return Object.keys(s).forEach((r) => {
|
|
3310
3310
|
r in e && delete s[r];
|
|
3311
|
-
}), new
|
|
3311
|
+
}), new xe(s, null, cs);
|
|
3312
3312
|
}
|
|
3313
3313
|
setCurrentContext(e) {
|
|
3314
3314
|
this.currentContext = e;
|
|
@@ -3640,8 +3640,8 @@ class M {
|
|
|
3640
3640
|
set: f
|
|
3641
3641
|
});
|
|
3642
3642
|
else {
|
|
3643
|
-
const m = c.property,
|
|
3644
|
-
m.key.type === "Identifier" && m.value.type === "FunctionExpression" &&
|
|
3643
|
+
const m = c.property, v = m.kind;
|
|
3644
|
+
m.key.type === "Identifier" && m.value.type === "FunctionExpression" && v === "init" && !m.value.id && as(p, m.key.name), n[l] = p;
|
|
3645
3645
|
}
|
|
3646
3646
|
}
|
|
3647
3647
|
return n;
|
|
@@ -3668,7 +3668,7 @@ class M {
|
|
|
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 || !pt(c)) {
|
|
3672
3672
|
const l = r.slice(e.start, e.end);
|
|
3673
3673
|
throw this.createInternalThrowError(O.FunctionUndefinedReferenceError, l, e);
|
|
3674
3674
|
}
|
|
@@ -3680,13 +3680,13 @@ class M {
|
|
|
3680
3680
|
let a = "";
|
|
3681
3681
|
e.type === "Identifier" && (a = e.name);
|
|
3682
3682
|
const u = n();
|
|
3683
|
-
if (!u || !
|
|
3683
|
+
if (!u || !pt(u))
|
|
3684
3684
|
throw this.createInternalThrowError(O.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 === cs || // !scope.parent || // super scope
|
|
3688
|
+
h.name === hs || // this.globalScope === scope ||
|
|
3689
|
+
h.name === ls;
|
|
3690
3690
|
return u(new ne(this), l, !p);
|
|
3691
3691
|
};
|
|
3692
3692
|
if (u.__IS_EVAL_FUNC)
|
|
@@ -3696,7 +3696,7 @@ class M {
|
|
|
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 === us && (c = l.data);
|
|
3700
3700
|
}
|
|
3701
3701
|
return u.bind(c);
|
|
3702
3702
|
};
|
|
@@ -3715,17 +3715,17 @@ class M {
|
|
|
3715
3715
|
return this.collectDeclVars = r, this.collectDeclFuncs = n, () => {
|
|
3716
3716
|
const d = s.getCurrentScope(), f = function(...m) {
|
|
3717
3717
|
s.callStack.push(`${a}`);
|
|
3718
|
-
const
|
|
3719
|
-
s.setCurrentScope(g), s.addDeclarationsToScope(h, p, g), a && (g.data[a] = f), g.data.arguments = arguments, c.forEach((N,
|
|
3720
|
-
g.data[N()] = m[
|
|
3718
|
+
const v = s.getCurrentScope(), g = vr(d, `FunctionScope(${a})`);
|
|
3719
|
+
s.setCurrentScope(g), s.addDeclarationsToScope(h, p, g), a && (g.data[a] = f), g.data.arguments = arguments, c.forEach((N, C) => {
|
|
3720
|
+
g.data[N()] = m[C];
|
|
3721
3721
|
});
|
|
3722
|
-
const
|
|
3722
|
+
const x = s.getCurrentContext();
|
|
3723
3723
|
s.setCurrentContext(this);
|
|
3724
3724
|
const k = l();
|
|
3725
|
-
if (s.setCurrentContext(
|
|
3725
|
+
if (s.setCurrentContext(x), s.setCurrentScope(v), s.callStack.pop(), k instanceof Y)
|
|
3726
3726
|
return k.value;
|
|
3727
3727
|
};
|
|
3728
|
-
return
|
|
3728
|
+
return as(f, a), Object.defineProperty(f, "length", {
|
|
3729
3729
|
value: u,
|
|
3730
3730
|
writable: !1,
|
|
3731
3731
|
enumerable: !1,
|
|
@@ -3748,7 +3748,7 @@ class M {
|
|
|
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 (!pt(n) || n.__IS_EVAL_FUNC) {
|
|
3752
3752
|
const a = e.callee, u = s.slice(a.start, a.end);
|
|
3753
3753
|
throw this.createInternalThrowError(O.IsNotConstructor, u, e);
|
|
3754
3754
|
}
|
|
@@ -3891,7 +3891,7 @@ class M {
|
|
|
3891
3891
|
let i = V;
|
|
3892
3892
|
for (let r = 0; r < s.length; r++) {
|
|
3893
3893
|
const n = s[r], a = this.setValue(n());
|
|
3894
|
-
if (a !== V && (i = a, i instanceof
|
|
3894
|
+
if (a !== V && (i = a, i instanceof Y || i instanceof ce || i instanceof re || i === me || i === ge))
|
|
3895
3895
|
break;
|
|
3896
3896
|
}
|
|
3897
3897
|
return i;
|
|
@@ -3906,8 +3906,8 @@ class M {
|
|
|
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) : $e;
|
|
3910
|
+
return () => new Y(s());
|
|
3911
3911
|
}
|
|
3912
3912
|
// if else
|
|
3913
3913
|
ifStatementHandler(e) {
|
|
@@ -3923,21 +3923,21 @@ class M {
|
|
|
3923
3923
|
}
|
|
3924
3924
|
// for(var i = 0; i < 10; i++) {...}
|
|
3925
3925
|
forStatementHandler(e) {
|
|
3926
|
-
let s =
|
|
3926
|
+
let s = $e, i = e.test ? this.createClosure(e.test) : () => !0, r = $e;
|
|
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) :
|
|
3928
|
+
return e.type === "ForStatement" && (s = e.init ? this.createClosure(e.init) : s, r = e.update ? this.createClosure(e.update) : $e), (a) => {
|
|
3929
3929
|
let u, c = V, 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 === V || h ===
|
|
3934
|
-
if (h ===
|
|
3933
|
+
if (!(h === V || h === ge)) {
|
|
3934
|
+
if (h === me)
|
|
3935
3935
|
break;
|
|
3936
3936
|
if (c = h, c instanceof re && c.value === u) {
|
|
3937
3937
|
c = V;
|
|
3938
3938
|
continue;
|
|
3939
3939
|
}
|
|
3940
|
-
if (c instanceof
|
|
3940
|
+
if (c instanceof Y || c instanceof ce || c instanceof re)
|
|
3941
3941
|
break;
|
|
3942
3942
|
}
|
|
3943
3943
|
}
|
|
@@ -3969,14 +3969,14 @@ class M {
|
|
|
3969
3969
|
}
|
|
3970
3970
|
})();
|
|
3971
3971
|
const h = this.setValue(r());
|
|
3972
|
-
if (!(h === V || h ===
|
|
3973
|
-
if (h ===
|
|
3972
|
+
if (!(h === V || h === ge)) {
|
|
3973
|
+
if (h === me)
|
|
3974
3974
|
break;
|
|
3975
3975
|
if (u = h, u instanceof re && u.value === a) {
|
|
3976
3976
|
u = V;
|
|
3977
3977
|
continue;
|
|
3978
3978
|
}
|
|
3979
|
-
if (u instanceof
|
|
3979
|
+
if (u instanceof Y || u instanceof ce || u instanceof re)
|
|
3980
3980
|
break;
|
|
3981
3981
|
}
|
|
3982
3982
|
}
|
|
@@ -3986,7 +3986,7 @@ class M {
|
|
|
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
|
|
3989
|
+
const r = s(), n = this.getCurrentScope(), a = new xe(r, n, us);
|
|
3990
3990
|
this.setCurrentScope(a);
|
|
3991
3991
|
const u = this.setValue(i());
|
|
3992
3992
|
return this.setCurrentScope(n), u;
|
|
@@ -4008,13 +4008,13 @@ class M {
|
|
|
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 Y && (h = l);
|
|
4012
4012
|
} catch (f) {
|
|
4013
4013
|
if (d(), this.isInterruptThrow(f))
|
|
4014
4014
|
throw f;
|
|
4015
4015
|
if (i)
|
|
4016
4016
|
try {
|
|
4017
|
-
l = this.setValue(i(f)), l instanceof
|
|
4017
|
+
l = this.setValue(i(f)), l instanceof Y && (h = l);
|
|
4018
4018
|
} catch (m) {
|
|
4019
4019
|
if (d(), this.isInterruptThrow(m))
|
|
4020
4020
|
throw m;
|
|
@@ -4023,7 +4023,7 @@ class M {
|
|
|
4023
4023
|
}
|
|
4024
4024
|
if (r)
|
|
4025
4025
|
try {
|
|
4026
|
-
l = r(), l instanceof
|
|
4026
|
+
l = r(), l instanceof Y && (h = l);
|
|
4027
4027
|
} catch (f) {
|
|
4028
4028
|
if (d(), this.isInterruptThrow(f))
|
|
4029
4029
|
throw f;
|
|
@@ -4044,10 +4044,10 @@ class M {
|
|
|
4044
4044
|
};
|
|
4045
4045
|
}
|
|
4046
4046
|
continueStatementHandler(e) {
|
|
4047
|
-
return () => e.label ? new re(e.label.name) :
|
|
4047
|
+
return () => e.label ? new re(e.label.name) : ge;
|
|
4048
4048
|
}
|
|
4049
4049
|
breakStatementHandler(e) {
|
|
4050
|
-
return () => e.label ? new
|
|
4050
|
+
return () => e.label ? new ce(e.label.name) : me;
|
|
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 M {
|
|
|
4057
4057
|
for (let h = 0; h < 2; h++) {
|
|
4058
4058
|
for (let p = c; p < i.length; p++) {
|
|
4059
4059
|
const d = i[p](), f = d.testClosure();
|
|
4060
|
-
if (!l && f ===
|
|
4060
|
+
if (!l && f === os && (l = !0, c = p), n || f === r) {
|
|
4061
4061
|
if (n = !0, u = this.setValue(d.bodyClosure()), u === V)
|
|
4062
4062
|
continue;
|
|
4063
|
-
if (u ===
|
|
4063
|
+
if (u === me || (a = u, a instanceof Y || a instanceof ce || a instanceof re || a === ge))
|
|
4064
4064
|
break;
|
|
4065
4065
|
}
|
|
4066
4066
|
}
|
|
@@ -4073,7 +4073,7 @@ class M {
|
|
|
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) : () => os, i = this.createClosure({
|
|
4077
4077
|
type: "BlockStatement",
|
|
4078
4078
|
body: e.consequent
|
|
4079
4079
|
});
|
|
@@ -4088,7 +4088,7 @@ class M {
|
|
|
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 ce && r.value === s && (r = V), n.labelStack.pop(), r;
|
|
4092
4092
|
};
|
|
4093
4093
|
}
|
|
4094
4094
|
debuggerStatementHandler(e) {
|
|
@@ -4167,15 +4167,15 @@ class M {
|
|
|
4167
4167
|
}
|
|
4168
4168
|
setValue(e) {
|
|
4169
4169
|
const s = this.callStack.length;
|
|
4170
|
-
return this.isVarDeclMode || s || e === V || e ===
|
|
4170
|
+
return this.isVarDeclMode || s || e === V || e === me || e === ge || e instanceof ce || e instanceof re || (this.value = e instanceof Y ? e.value : e), e;
|
|
4171
4171
|
}
|
|
4172
4172
|
getValue() {
|
|
4173
4173
|
return this.value;
|
|
4174
4174
|
}
|
|
4175
4175
|
}
|
|
4176
4176
|
M.version = gr;
|
|
4177
|
-
M.eval =
|
|
4178
|
-
M.Function =
|
|
4177
|
+
M.eval = $t;
|
|
4178
|
+
M.Function = Ut;
|
|
4179
4179
|
M.ecmaVersion = 5;
|
|
4180
4180
|
M.globalContextInFunction = void 0;
|
|
4181
4181
|
M.global = /* @__PURE__ */ Object.create(null);
|
|
@@ -4186,7 +4186,7 @@ const yr = (() => {
|
|
|
4186
4186
|
return !1;
|
|
4187
4187
|
}
|
|
4188
4188
|
})();
|
|
4189
|
-
function
|
|
4189
|
+
function ze(t) {
|
|
4190
4190
|
if (typeof globalThis > "u") return;
|
|
4191
4191
|
const e = globalThis[0] || globalThis;
|
|
4192
4192
|
if (e.__simulator__)
|
|
@@ -4202,7 +4202,7 @@ function _r(t, e) {
|
|
|
4202
4202
|
globalContextInFunction: e
|
|
4203
4203
|
}).evaluate(`(function($scope){ ${t} }).call(this, this)`);
|
|
4204
4204
|
}
|
|
4205
|
-
function
|
|
4205
|
+
function Oe(t, e, s = !1, i = !1, r = !1) {
|
|
4206
4206
|
try {
|
|
4207
4207
|
const n = ['"use strict";', "var __self = $scope;"];
|
|
4208
4208
|
n.push("return ");
|
|
@@ -4214,13 +4214,13 @@ ${a}
|
|
|
4214
4214
|
` : `with(${s ? "{}" : "$scope || {}"}) { ${a} }`;
|
|
4215
4215
|
return yr ? new Function("$scope", u)(e) : _r(u, e);
|
|
4216
4216
|
} catch (n) {
|
|
4217
|
-
if (
|
|
4217
|
+
if (ve.error("parseExpression.error", n, t, e?.__self ?? e), n && (n.info = t.value), ze(n), i)
|
|
4218
4218
|
throw n;
|
|
4219
4219
|
}
|
|
4220
4220
|
}
|
|
4221
4221
|
function z(t, e, s = !1, i = !1, r = !1) {
|
|
4222
|
-
const n =
|
|
4223
|
-
if (typeof n != "function" && (
|
|
4222
|
+
const n = Oe(t, e, s, i, r);
|
|
4223
|
+
if (typeof n != "function" && (ve.error(
|
|
4224
4224
|
"parseFunction.error",
|
|
4225
4225
|
"not a function",
|
|
4226
4226
|
t,
|
|
@@ -4254,8 +4254,8 @@ const Cr = {
|
|
|
4254
4254
|
noPermissionMessage: "无权限访问该页面",
|
|
4255
4255
|
appName: "",
|
|
4256
4256
|
statusKey: "code"
|
|
4257
|
-
},
|
|
4258
|
-
class
|
|
4257
|
+
}, Xs = Symbol("access");
|
|
4258
|
+
class Gt {
|
|
4259
4259
|
options;
|
|
4260
4260
|
data = null;
|
|
4261
4261
|
mode = T.Raw;
|
|
@@ -4276,17 +4276,17 @@ class Ut {
|
|
|
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 && (ot.save(s, e, {
|
|
4280
4280
|
type: "local",
|
|
4281
4281
|
prefix: i
|
|
4282
|
-
}), r &&
|
|
4282
|
+
}), r && ut.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, ot.remove(e, {
|
|
4287
4287
|
type: "local",
|
|
4288
4288
|
prefix: s
|
|
4289
|
-
}), i &&
|
|
4289
|
+
}), i && ut.remove(r);
|
|
4290
4290
|
}
|
|
4291
4291
|
logout() {
|
|
4292
4292
|
this.clear(), this.toLogin();
|
|
@@ -4301,19 +4301,19 @@ class Ut {
|
|
|
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 = Yt(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 = Yt(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(Xs, this);
|
|
4317
4317
|
}
|
|
4318
4318
|
isAuthPath(e) {
|
|
4319
4319
|
const { auth: s, isAuth: i } = this.options;
|
|
@@ -4334,7 +4334,7 @@ class Ut {
|
|
|
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) => Xt(r, s));
|
|
4338
4338
|
try {
|
|
4339
4339
|
this.data = JSON.parse(i.join(""));
|
|
4340
4340
|
} catch (r) {
|
|
@@ -4344,7 +4344,7 @@ class Ut {
|
|
|
4344
4344
|
}
|
|
4345
4345
|
if (typeof e == "string")
|
|
4346
4346
|
try {
|
|
4347
|
-
const i = s ?
|
|
4347
|
+
const i = s ? Xt(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 Ut {
|
|
|
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 = ot.get(e, {
|
|
4357
4357
|
type: "local",
|
|
4358
4358
|
prefix: s
|
|
4359
4359
|
});
|
|
@@ -4361,10 +4361,10 @@ class Ut {
|
|
|
4361
4361
|
}
|
|
4362
4362
|
isLogined() {
|
|
4363
4363
|
const { session: e, authKey: s } = this.options;
|
|
4364
|
-
return e && s ? !!
|
|
4364
|
+
return e && s ? !!ut.get(s) : !!this.getToken();
|
|
4365
4365
|
}
|
|
4366
4366
|
hasRoutePermission(e) {
|
|
4367
|
-
if (e.name ===
|
|
4367
|
+
if (e.name === Ie) {
|
|
4368
4368
|
const s = e.params.id;
|
|
4369
4369
|
return s && this.can(s);
|
|
4370
4370
|
}
|
|
@@ -4381,10 +4381,10 @@ class Ut {
|
|
|
4381
4381
|
return s();
|
|
4382
4382
|
{
|
|
4383
4383
|
const { noPermissionMessage: i = "无权限访问", unauthorized: r = !1 } = this.options;
|
|
4384
|
-
return await this.showTip(i), K(r) ? (r(), s(!1)) :
|
|
4384
|
+
return await this.showTip(i), K(r) ? (r(), s(!1)) : te(r) ? s(r) : s(!1);
|
|
4385
4385
|
}
|
|
4386
4386
|
}
|
|
4387
|
-
s(!1), await
|
|
4387
|
+
s(!1), await Pe(0), this.toLogin();
|
|
4388
4388
|
}
|
|
4389
4389
|
isWhiteList(e) {
|
|
4390
4390
|
const { whiteList: s } = this.options;
|
|
@@ -4400,7 +4400,7 @@ class Ut {
|
|
|
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 Pe(150), await s(e, {
|
|
4404
4404
|
title: "提示",
|
|
4405
4405
|
type: "warning"
|
|
4406
4406
|
})?.catch(() => !0)?.finally(() => {
|
|
@@ -4419,7 +4419,7 @@ class Ut {
|
|
|
4419
4419
|
}
|
|
4420
4420
|
}
|
|
4421
4421
|
function wr() {
|
|
4422
|
-
return
|
|
4422
|
+
return Tt(Xs, null);
|
|
4423
4423
|
}
|
|
4424
4424
|
function Mn(t = {}) {
|
|
4425
4425
|
const {
|
|
@@ -4433,7 +4433,7 @@ function Mn(t = {}) {
|
|
|
4433
4433
|
} = t;
|
|
4434
4434
|
let c = null;
|
|
4435
4435
|
return {
|
|
4436
|
-
request:
|
|
4436
|
+
request: ds({
|
|
4437
4437
|
adapter: t.axiosAdapter,
|
|
4438
4438
|
settings: {
|
|
4439
4439
|
type: "form",
|
|
@@ -4454,17 +4454,17 @@ function Mn(t = {}) {
|
|
|
4454
4454
|
...i
|
|
4455
4455
|
}
|
|
4456
4456
|
}),
|
|
4457
|
-
jsonp:
|
|
4457
|
+
jsonp: ms,
|
|
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 Gt({ alert: u, ...n }) : void 0
|
|
4464
4464
|
};
|
|
4465
4465
|
}
|
|
4466
4466
|
function Dn(t = {}) {
|
|
4467
|
-
return new
|
|
4467
|
+
return new Gt(t);
|
|
4468
4468
|
}
|
|
4469
4469
|
function Er(t, e) {
|
|
4470
4470
|
const { jsonp: s, request: i } = e;
|
|
@@ -4474,7 +4474,7 @@ function Er(t, e) {
|
|
|
4474
4474
|
query: r
|
|
4475
4475
|
});
|
|
4476
4476
|
{
|
|
4477
|
-
const r = t.headers ?
|
|
4477
|
+
const r = t.headers ? Oe(t.headers, {}, !0) : void 0, n = {
|
|
4478
4478
|
url: t.url,
|
|
4479
4479
|
method: t.method,
|
|
4480
4480
|
settings: {
|
|
@@ -4508,18 +4508,18 @@ function Ir(t = [], e = [], s) {
|
|
|
4508
4508
|
return i;
|
|
4509
4509
|
}
|
|
4510
4510
|
async function Ar(t = [], e = globalThis) {
|
|
4511
|
-
const s =
|
|
4512
|
-
s && (
|
|
4511
|
+
const s = Te(e);
|
|
4512
|
+
s && (Zs(e), t.forEach((i) => Tr(s, i)));
|
|
4513
4513
|
}
|
|
4514
4514
|
function Pr(t, e = globalThis) {
|
|
4515
|
-
const s = F(t.mockTemplate) && t.mockTemplate.value ? z(t.mockTemplate, {}, !0) : void 0, i =
|
|
4515
|
+
const s = F(t.mockTemplate) && t.mockTemplate.value ? z(t.mockTemplate, {}, !0) : void 0, i = Te(e);
|
|
4516
4516
|
return async (...r) => {
|
|
4517
4517
|
let n = {};
|
|
4518
4518
|
if (s)
|
|
4519
4519
|
try {
|
|
4520
4520
|
n = await s.apply(s, r);
|
|
4521
4521
|
} catch (a) {
|
|
4522
|
-
|
|
4522
|
+
ve.warn("模拟数据模版异常", a);
|
|
4523
4523
|
}
|
|
4524
4524
|
return i?.mock(n);
|
|
4525
4525
|
};
|
|
@@ -4529,31 +4529,31 @@ function Tr(t, e) {
|
|
|
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 = xt(s) ? new URL(s).pathname : s, u = pi(`(.*)${a}`, [], { end: !1 }), c = new RegExp(
|
|
4533
4533
|
u.source + "([?#].*)?$",
|
|
4534
4534
|
u.flags
|
|
4535
|
-
), l = fi(a, { decode: decodeURIComponent }), h =
|
|
4535
|
+
), l = fi(a, { decode: decodeURIComponent }), h = Oe(i, {}, !0);
|
|
4536
4536
|
t.mock(
|
|
4537
4537
|
c,
|
|
4538
4538
|
r.toLowerCase(),
|
|
4539
4539
|
(p) => {
|
|
4540
|
-
const d =
|
|
4540
|
+
const d = pe.parse(p.url) || {}, f = n.type || "form";
|
|
4541
4541
|
let m = p.body instanceof FormData ? di(p.body) : p.body;
|
|
4542
4542
|
if (typeof m == "string")
|
|
4543
4543
|
if (f === "json")
|
|
4544
4544
|
try {
|
|
4545
4545
|
m = JSON.parse(m);
|
|
4546
|
-
} catch (
|
|
4547
|
-
console.warn("[Mock.mock]",
|
|
4546
|
+
} catch (x) {
|
|
4547
|
+
console.warn("[Mock.mock]", x);
|
|
4548
4548
|
}
|
|
4549
4549
|
else
|
|
4550
|
-
m =
|
|
4551
|
-
const
|
|
4550
|
+
m = pe.parse(m);
|
|
4551
|
+
const v = xt(p.url) ? new URL(p.url).pathname : p.url.split("?")[0], g = l(v)?.params;
|
|
4552
4552
|
Object.assign(p, { data: m, params: g, query: d });
|
|
4553
4553
|
try {
|
|
4554
4554
|
return t.mock(h(p));
|
|
4555
|
-
} catch (
|
|
4556
|
-
return console.warn("[mockApi]", c, p,
|
|
4555
|
+
} catch (x) {
|
|
4556
|
+
return console.warn("[mockApi]", c, p, x), null;
|
|
4557
4557
|
}
|
|
4558
4558
|
}
|
|
4559
4559
|
);
|
|
@@ -4561,11 +4561,11 @@ function Tr(t, e) {
|
|
|
4561
4561
|
console.warn("mockApi", a);
|
|
4562
4562
|
}
|
|
4563
4563
|
}
|
|
4564
|
-
function
|
|
4565
|
-
const e =
|
|
4564
|
+
function Zs(t = globalThis) {
|
|
4565
|
+
const e = Te(t);
|
|
4566
4566
|
e && (e._mocked = {});
|
|
4567
4567
|
}
|
|
4568
|
-
class
|
|
4568
|
+
class ps {
|
|
4569
4569
|
__id = null;
|
|
4570
4570
|
__mode;
|
|
4571
4571
|
__instance = null;
|
|
@@ -4610,7 +4610,7 @@ class ls {
|
|
|
4610
4610
|
const { mode: s, dsl: i, attrs: r } = e;
|
|
4611
4611
|
this.__mode = s, i && (this.__id = i.id || null, this.__transform = i.transform || {}), r && Object.assign(this, r);
|
|
4612
4612
|
}
|
|
4613
|
-
setup(e, s =
|
|
4613
|
+
setup(e, s = be) {
|
|
4614
4614
|
const i = s.getCurrentInstance();
|
|
4615
4615
|
if (!i) return;
|
|
4616
4616
|
this.__refs = {}, this.__refCaches = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = i.proxy;
|
|
@@ -4629,12 +4629,12 @@ class ls {
|
|
|
4629
4629
|
__proxy() {
|
|
4630
4630
|
if (!this.__instance) return;
|
|
4631
4631
|
const e = this.__instance;
|
|
4632
|
-
|
|
4632
|
+
ss.forEach((s) => {
|
|
4633
4633
|
this[s] = e[s] || e._?.[s.replace("$", "")] || null;
|
|
4634
4634
|
});
|
|
4635
4635
|
}
|
|
4636
4636
|
__cleanup() {
|
|
4637
|
-
|
|
4637
|
+
ss.forEach((e) => {
|
|
4638
4638
|
this[e] = null;
|
|
4639
4639
|
}), this.__reset(), this.__refGenerations = {};
|
|
4640
4640
|
}
|
|
@@ -4653,9 +4653,9 @@ class ls {
|
|
|
4653
4653
|
if (e)
|
|
4654
4654
|
if (this.__mode === T.Runtime) {
|
|
4655
4655
|
const { id: s, type: i } = e, r = s ? this.__transform[s] ?? e.value : e.value;
|
|
4656
|
-
return
|
|
4656
|
+
return Oe({ type: i, value: r }, this);
|
|
4657
4657
|
} else
|
|
4658
|
-
return
|
|
4658
|
+
return Oe(e, this);
|
|
4659
4659
|
}
|
|
4660
4660
|
__ref(e = null, s) {
|
|
4661
4661
|
if (this.__mode === T.VNode)
|
|
@@ -4666,14 +4666,14 @@ class ls {
|
|
|
4666
4666
|
return i;
|
|
4667
4667
|
const r = e ? (this.__refGenerations[e] || 0) + 1 : 0;
|
|
4668
4668
|
return e && (this.__refGenerations[e] = r), i = async (n) => {
|
|
4669
|
-
if (await
|
|
4669
|
+
if (await Pe(0), e && this.__refGenerations[e] !== r)
|
|
4670
4670
|
return;
|
|
4671
4671
|
let a = n?.$vtjEl || n?.$el || n?._?.vnode?.el || n;
|
|
4672
4672
|
if (!a) {
|
|
4673
|
-
typeof s == "string" && (delete this.$refs[s], this[s] &&
|
|
4673
|
+
typeof s == "string" && (delete this.$refs[s], this[s] && be.isRef(this[s]) && (this[s].value = null), e && delete this.__refs[e]);
|
|
4674
4674
|
return;
|
|
4675
4675
|
}
|
|
4676
|
-
return a.nodeType === 3 && a.nextSibling && (a = a.nextSibling), a.__vtj__ = e, T.Design === this.__mode && (a.__context__ = this, a.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, n)), typeof s == "function" ? s(n) : s && (this.$refs[s] = this.__getRefEl(this.$refs, s, n), this[s] &&
|
|
4676
|
+
return a.nodeType === 3 && a.nextSibling && (a = a.nextSibling), a.__vtj__ = e, T.Design === this.__mode && (a.__context__ = this, a.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, n)), typeof s == "function" ? s(n) : s && (this.$refs[s] = this.__getRefEl(this.$refs, s, n), this[s] && be.isRef(this[s]) && (this[s].value = this.$refs[s])), n;
|
|
4677
4677
|
}, e && (this.__refCaches[e] = i), i;
|
|
4678
4678
|
}
|
|
4679
4679
|
__getRefEl(e, s, i) {
|
|
@@ -4692,10 +4692,10 @@ class ls {
|
|
|
4692
4692
|
return i.context.__proto__ = this.context, i.__proto__ = this, i;
|
|
4693
4693
|
}
|
|
4694
4694
|
}
|
|
4695
|
-
const
|
|
4696
|
-
function
|
|
4695
|
+
const ft = Symbol("vtjBlockChain");
|
|
4696
|
+
function Et(t) {
|
|
4697
4697
|
const {
|
|
4698
|
-
Vue: e =
|
|
4698
|
+
Vue: e = be,
|
|
4699
4699
|
UniApp: s = {},
|
|
4700
4700
|
mode: i = T.Runtime,
|
|
4701
4701
|
components: r = {},
|
|
@@ -4706,7 +4706,7 @@ function wt(t) {
|
|
|
4706
4706
|
$components: r,
|
|
4707
4707
|
$libs: n,
|
|
4708
4708
|
$apis: a
|
|
4709
|
-
}, h = new
|
|
4709
|
+
}, h = new ps({
|
|
4710
4710
|
mode: i,
|
|
4711
4711
|
dsl: c.value,
|
|
4712
4712
|
attrs: l
|
|
@@ -4714,83 +4714,102 @@ function wt(t) {
|
|
|
4714
4714
|
name: c.value.name,
|
|
4715
4715
|
__scopeId: c.value.id ? `data-v-${c.value.id}` : void 0,
|
|
4716
4716
|
props: {
|
|
4717
|
-
...
|
|
4717
|
+
...Rr(c.value.props ?? [], h)
|
|
4718
4718
|
},
|
|
4719
4719
|
async setup(d = {}) {
|
|
4720
|
-
const f = c.value.id, m = c.value.name,
|
|
4721
|
-
|
|
4720
|
+
const f = c.value.id, m = c.value.name, v = e.inject(
|
|
4721
|
+
ft,
|
|
4722
4722
|
null
|
|
4723
4723
|
);
|
|
4724
|
-
if (f &&
|
|
4725
|
-
const
|
|
4726
|
-
return console.warn(`[VTJ Renderer] ${
|
|
4724
|
+
if (f && v && v.has(f)) {
|
|
4725
|
+
const Q = `检测到区块循环引用: ${m}(${f})`;
|
|
4726
|
+
return console.warn(`[VTJ Renderer] ${Q},已中断渲染以防止浏览器崩溃`), ze(new Error(Q)), e.provide(ft, v), { __vtjCircular: !0 };
|
|
4727
4727
|
}
|
|
4728
|
-
const g = new Set(
|
|
4729
|
-
f && g.add(f), e.provide(
|
|
4730
|
-
const
|
|
4728
|
+
const g = new Set(v || []);
|
|
4729
|
+
f && g.add(f), e.provide(ft, g);
|
|
4730
|
+
const x = new ps({
|
|
4731
4731
|
mode: i,
|
|
4732
4732
|
dsl: c.value,
|
|
4733
4733
|
attrs: l
|
|
4734
4734
|
});
|
|
4735
|
-
|
|
4735
|
+
x.$props = x.props = d, c.value.id && Nt(
|
|
4736
4736
|
t.window || globalThis,
|
|
4737
4737
|
c.value.id,
|
|
4738
4738
|
c.value.css || "",
|
|
4739
4739
|
!0
|
|
4740
4740
|
);
|
|
4741
4741
|
const k = c.value.apiMode === "composition";
|
|
4742
|
-
|
|
4742
|
+
x.$state = x.state = Vr(
|
|
4743
4743
|
e,
|
|
4744
4744
|
c.value.state ?? {},
|
|
4745
|
-
|
|
4745
|
+
x
|
|
4746
4746
|
);
|
|
4747
|
-
const N = k ? Dr(e, c.value.refs ?? {},
|
|
4747
|
+
const N = k ? Dr(e, c.value.refs ?? {}, x) : {}, C = k ? Br(e, c.value.reactives ?? {}, x) : {}, D = Or(e, c.value.computed ?? {}, x), de = Fr(c.value.methods ?? {}, x), Se = Lr(e, c.value.inject, x), J = jr(
|
|
4748
4748
|
c.value.dataSources || {},
|
|
4749
|
-
|
|
4749
|
+
x
|
|
4750
4750
|
);
|
|
4751
|
-
let
|
|
4752
|
-
k && (
|
|
4751
|
+
let Me = {};
|
|
4752
|
+
k && (Me = Hr(
|
|
4753
4753
|
c.value.composables ?? [],
|
|
4754
|
-
|
|
4754
|
+
x
|
|
4755
4755
|
));
|
|
4756
|
-
const
|
|
4756
|
+
const rt = {
|
|
4757
4757
|
...d,
|
|
4758
4758
|
...N,
|
|
4759
|
-
...
|
|
4760
|
-
...
|
|
4761
|
-
...
|
|
4762
|
-
...
|
|
4759
|
+
...C,
|
|
4760
|
+
...Se,
|
|
4761
|
+
...D,
|
|
4762
|
+
...de,
|
|
4763
4763
|
...J,
|
|
4764
|
-
...
|
|
4764
|
+
...Me
|
|
4765
4765
|
};
|
|
4766
|
-
if (
|
|
4766
|
+
if (x.setup(rt, e), k && c.value.props && c.value.props.length > 0) {
|
|
4767
|
+
const Q = /* @__PURE__ */ new Set([
|
|
4768
|
+
...Object.keys(N),
|
|
4769
|
+
...Object.keys(C),
|
|
4770
|
+
...Object.keys(D)
|
|
4771
|
+
]);
|
|
4772
|
+
for (const ue of c.value.props) {
|
|
4773
|
+
const Ce = typeof ue == "string" ? ue : ue.name;
|
|
4774
|
+
Q.has(Ce) || Object.defineProperty(x, Ce, {
|
|
4775
|
+
get() {
|
|
4776
|
+
return this.$props[Ce];
|
|
4777
|
+
},
|
|
4778
|
+
set(Kt) {
|
|
4779
|
+
},
|
|
4780
|
+
configurable: !0,
|
|
4781
|
+
enumerable: !0
|
|
4782
|
+
});
|
|
4783
|
+
}
|
|
4784
|
+
}
|
|
4785
|
+
if (Mr(e, c.value.watch ?? [], x), k) {
|
|
4767
4786
|
if (await Ur(
|
|
4768
4787
|
e,
|
|
4769
4788
|
c.value.lifeCycles ?? {},
|
|
4770
|
-
|
|
4789
|
+
x,
|
|
4771
4790
|
s
|
|
4772
4791
|
), c.value.setup) {
|
|
4773
|
-
const
|
|
4774
|
-
if (K(
|
|
4792
|
+
const Q = x.__parseFunction(c.value.setup);
|
|
4793
|
+
if (K(Q))
|
|
4775
4794
|
try {
|
|
4776
|
-
await
|
|
4777
|
-
} catch (
|
|
4778
|
-
console.warn("[VTJ] Composition setup 执行失败",
|
|
4795
|
+
await Q();
|
|
4796
|
+
} catch (ue) {
|
|
4797
|
+
console.warn("[VTJ] Composition setup 执行失败", ue);
|
|
4779
4798
|
}
|
|
4780
4799
|
}
|
|
4781
|
-
$r(e, c.value.provide ?? {},
|
|
4800
|
+
$r(e, c.value.provide ?? {}, x);
|
|
4782
4801
|
}
|
|
4783
4802
|
return {
|
|
4784
|
-
vtj:
|
|
4785
|
-
state:
|
|
4803
|
+
vtj: x,
|
|
4804
|
+
state: x.$state,
|
|
4786
4805
|
...d,
|
|
4787
4806
|
...N,
|
|
4788
|
-
...
|
|
4789
|
-
...
|
|
4790
|
-
...
|
|
4807
|
+
...C,
|
|
4808
|
+
...D,
|
|
4809
|
+
...de
|
|
4791
4810
|
};
|
|
4792
4811
|
},
|
|
4793
|
-
emits:
|
|
4812
|
+
emits: Nr(c.value.emits),
|
|
4794
4813
|
expose: ["vtj", ...c.value.expose || []],
|
|
4795
4814
|
render() {
|
|
4796
4815
|
if (this.__vtjCircular)
|
|
@@ -4800,28 +4819,33 @@ function wt(t) {
|
|
|
4800
4819
|
for (const g of Object.keys(f.refs)) this[g];
|
|
4801
4820
|
if (f.reactives)
|
|
4802
4821
|
for (const g of Object.keys(f.reactives)) {
|
|
4803
|
-
const
|
|
4804
|
-
if (
|
|
4805
|
-
for (const k of Object.keys(
|
|
4822
|
+
const x = this[g];
|
|
4823
|
+
if (x && typeof x == "object")
|
|
4824
|
+
for (const k of Object.keys(x)) x[k];
|
|
4806
4825
|
}
|
|
4807
4826
|
if (f.state) {
|
|
4808
4827
|
const g = this.state;
|
|
4809
|
-
for (const
|
|
4828
|
+
for (const x of Object.keys(f.state)) g[x];
|
|
4810
4829
|
}
|
|
4811
4830
|
if (f.computed)
|
|
4812
4831
|
for (const g of Object.keys(f.computed)) this[g];
|
|
4813
4832
|
if (f.inject)
|
|
4814
4833
|
for (const g of f.inject) this[g.name];
|
|
4834
|
+
if (f.props && f.props.length > 0)
|
|
4835
|
+
for (const g of f.props) {
|
|
4836
|
+
const x = typeof g == "string" ? g : g.name;
|
|
4837
|
+
this[x];
|
|
4838
|
+
}
|
|
4815
4839
|
if (!f.nodes) return null;
|
|
4816
4840
|
const m = f.nodes || [];
|
|
4817
|
-
let
|
|
4841
|
+
let v;
|
|
4818
4842
|
if (m.length === 1)
|
|
4819
|
-
|
|
4843
|
+
v = _e(m[0], d, e, u, m);
|
|
4820
4844
|
else {
|
|
4821
|
-
const g = m.map((
|
|
4822
|
-
|
|
4845
|
+
const g = m.map((x) => _e(x, d, e, u, m)).flat();
|
|
4846
|
+
v = e.createVNode("div", {}, g);
|
|
4823
4847
|
}
|
|
4824
|
-
return d !== h && (h.__contextRefs = d.__contextRefs),
|
|
4848
|
+
return d !== h && (h.__contextRefs = d.__contextRefs), v;
|
|
4825
4849
|
},
|
|
4826
4850
|
// Options 模式下生命周期以 Options 风格注册
|
|
4827
4851
|
...c.value.apiMode !== "composition" ? Gr(c.value.lifeCycles ?? {}, h) : {}
|
|
@@ -4831,12 +4855,12 @@ function wt(t) {
|
|
|
4831
4855
|
context: h
|
|
4832
4856
|
};
|
|
4833
4857
|
}
|
|
4834
|
-
function
|
|
4835
|
-
return t.map((e) =>
|
|
4858
|
+
function Nr(t = []) {
|
|
4859
|
+
return t.map((e) => te(e) ? e : e.name);
|
|
4836
4860
|
}
|
|
4837
|
-
function
|
|
4861
|
+
function Rr(t = [], e) {
|
|
4838
4862
|
const s = (i) => i ? (Array.isArray(i) ? i : [i]).map((n) => Si[n]) : void 0;
|
|
4839
|
-
return t.map((i) =>
|
|
4863
|
+
return t.map((i) => te(i) ? {
|
|
4840
4864
|
name: i
|
|
4841
4865
|
} : {
|
|
4842
4866
|
name: i.name,
|
|
@@ -4938,7 +4962,7 @@ function Hr(t, e) {
|
|
|
4938
4962
|
(s, i) => {
|
|
4939
4963
|
try {
|
|
4940
4964
|
let r;
|
|
4941
|
-
if (R(i.composable) ? r = e.__parseExpression(i.composable) :
|
|
4965
|
+
if (R(i.composable) ? r = e.__parseExpression(i.composable) : te(i.composable) && (r = e.$libs[i.composable]), K(r)) {
|
|
4942
4966
|
const n = (i.args || []).map(
|
|
4943
4967
|
(u) => R(u) ? e.__parseExpression(u) : u
|
|
4944
4968
|
), a = r(...n);
|
|
@@ -4983,7 +5007,7 @@ async function Ur(t, e, s, i = {}) {
|
|
|
4983
5007
|
try {
|
|
4984
5008
|
await l();
|
|
4985
5009
|
} catch (h) {
|
|
4986
|
-
console.warn(`[VTJ] Composition 生命周期 "${n}" 执行失败`, h),
|
|
5010
|
+
console.warn(`[VTJ] Composition 生命周期 "${n}" 执行失败`, h), ze(h);
|
|
4987
5011
|
}
|
|
4988
5012
|
continue;
|
|
4989
5013
|
}
|
|
@@ -4992,9 +5016,9 @@ async function Ur(t, e, s, i = {}) {
|
|
|
4992
5016
|
const l = s.__parseFunction(a);
|
|
4993
5017
|
K(l) && c(async () => {
|
|
4994
5018
|
try {
|
|
4995
|
-
await
|
|
5019
|
+
await Pe(0), await l();
|
|
4996
5020
|
} catch (h) {
|
|
4997
|
-
console.warn(`[VTJ] Composition 生命周期 "${n}" 执行失败`, h),
|
|
5021
|
+
console.warn(`[VTJ] Composition 生命周期 "${n}" 执行失败`, h), ze(h);
|
|
4998
5022
|
}
|
|
4999
5023
|
});
|
|
5000
5024
|
} else
|
|
@@ -5005,7 +5029,7 @@ function Gr(t, e) {
|
|
|
5005
5029
|
return Object.entries(t ?? {}).reduce(
|
|
5006
5030
|
(s, [i, r]) => (s[i] = async function() {
|
|
5007
5031
|
const a = (this?.vtj || e).__parseFunction(r);
|
|
5008
|
-
K(a) && (await
|
|
5032
|
+
K(a) && (await Pe(0), await a());
|
|
5009
5033
|
}, s),
|
|
5010
5034
|
{}
|
|
5011
5035
|
);
|
|
@@ -5046,7 +5070,7 @@ class qr {
|
|
|
5046
5070
|
return i || (e && this.setNode(e, s), s);
|
|
5047
5071
|
}
|
|
5048
5072
|
isEqual(e, s) {
|
|
5049
|
-
return
|
|
5073
|
+
return ct(e, s);
|
|
5050
5074
|
}
|
|
5051
5075
|
/**
|
|
5052
5076
|
* 比较两个节点缓存是否相等,函数引用变化不触发重渲染,但函数属性的增删会触发
|
|
@@ -5066,60 +5090,60 @@ class qr {
|
|
|
5066
5090
|
}
|
|
5067
5091
|
return c;
|
|
5068
5092
|
}, n = i(e).sort(), a = i(s).sort();
|
|
5069
|
-
return
|
|
5093
|
+
return ct(n, a) ? ct(r(e), r(s)) : !1;
|
|
5070
5094
|
}
|
|
5071
5095
|
clear() {
|
|
5072
5096
|
this.__props = {}, this.__events = {}, this.__nodes = {};
|
|
5073
5097
|
}
|
|
5074
5098
|
}
|
|
5075
|
-
const
|
|
5076
|
-
let
|
|
5099
|
+
const we = new qr(), ei = new mi();
|
|
5100
|
+
let dt = [], le = {}, Ee = {};
|
|
5077
5101
|
const Wr = (t, e) => e;
|
|
5078
|
-
async function
|
|
5079
|
-
const { urls: s = [], library: i } = t, r = s.filter((u) =>
|
|
5102
|
+
async function ti(t, e = globalThis) {
|
|
5103
|
+
const { urls: s = [], library: i } = t, r = s.filter((u) => Ye(u));
|
|
5080
5104
|
if (r.length === 0 || !i) return null;
|
|
5081
|
-
const n = s.filter((u) =>
|
|
5082
|
-
return n.length &&
|
|
5105
|
+
const n = s.filter((u) => Qe(u));
|
|
5106
|
+
return n.length && ys(n, e), await _s(r, i, e).catch(
|
|
5083
5107
|
(u) => (console.warn("loadScriptUrl error", r, i, u), null)
|
|
5084
5108
|
);
|
|
5085
5109
|
}
|
|
5086
|
-
function
|
|
5110
|
+
function kt(t) {
|
|
5087
5111
|
const { getDsl: e, getDslByUrl: s, options: i } = t;
|
|
5088
|
-
return i.window && (
|
|
5112
|
+
return i.window && (dt.forEach((r) => {
|
|
5089
5113
|
delete i.window[r];
|
|
5090
|
-
}),
|
|
5114
|
+
}), dt = []), (r, n, a, u = be) => {
|
|
5091
5115
|
if (!a || typeof a == "string") return n;
|
|
5092
5116
|
let c = "";
|
|
5093
5117
|
if (a.type === "Schema" && a.id)
|
|
5094
|
-
return c = a.id + "_" + r,
|
|
5095
|
-
const l =
|
|
5118
|
+
return c = a.id + "_" + r, Ee[c] || (Ee[c] = u.defineAsyncComponent(async () => {
|
|
5119
|
+
const l = le[a.id] || await ei.add(
|
|
5096
5120
|
a.id,
|
|
5097
5121
|
() => e(a.id)
|
|
5098
5122
|
);
|
|
5099
|
-
return l && (l.name = n,
|
|
5123
|
+
return l && (l.name = n, le[a.id] = l), l ? Et({
|
|
5100
5124
|
Vue: u,
|
|
5101
5125
|
mode: T.Runtime,
|
|
5102
5126
|
...i,
|
|
5103
|
-
dsl:
|
|
5104
|
-
loader:
|
|
5127
|
+
dsl: Zt(l),
|
|
5128
|
+
loader: kt(t)
|
|
5105
5129
|
}).renderer : null;
|
|
5106
5130
|
}));
|
|
5107
5131
|
if (a.type === "UrlSchema" && a.url)
|
|
5108
|
-
return c = a.url + "_" + r,
|
|
5109
|
-
const l =
|
|
5110
|
-
return l && (l.name = n,
|
|
5132
|
+
return c = a.url + "_" + r, Ee[c] || (Ee[c] = u.defineAsyncComponent(async () => {
|
|
5133
|
+
const l = le[a.url] || await s(a.url);
|
|
5134
|
+
return l && (l.name = n, le[a.url] = l), l ? Et({
|
|
5111
5135
|
...i,
|
|
5112
5136
|
Vue: u,
|
|
5113
|
-
dsl:
|
|
5137
|
+
dsl: Zt(l),
|
|
5114
5138
|
mode: T.Runtime,
|
|
5115
|
-
loader:
|
|
5139
|
+
loader: kt(t)
|
|
5116
5140
|
}).renderer : null;
|
|
5117
5141
|
}));
|
|
5118
5142
|
if (a.type === "Plugin") {
|
|
5119
|
-
let l = a.library ?
|
|
5120
|
-
return l || (a.library &&
|
|
5143
|
+
let l = a.library ? le[a.library] : null;
|
|
5144
|
+
return l || (a.library && dt.push(a.library), l = le[a.library || Symbol()] = u.defineAsyncComponent(
|
|
5121
5145
|
async () => {
|
|
5122
|
-
const h = await
|
|
5146
|
+
const h = await ti(a, i.window);
|
|
5123
5147
|
return h || (console.warn("getPlugin result is null", a), null);
|
|
5124
5148
|
}
|
|
5125
5149
|
), l);
|
|
@@ -5128,66 +5152,66 @@ function Et(t) {
|
|
|
5128
5152
|
};
|
|
5129
5153
|
}
|
|
5130
5154
|
function Bn() {
|
|
5131
|
-
|
|
5155
|
+
le = {}, Ee = {}, ei.clearAllCache(), we.clear();
|
|
5132
5156
|
}
|
|
5133
|
-
function
|
|
5157
|
+
function _e(t, e, s = be, i = Wr, r = [], n = !1, a = 0) {
|
|
5134
5158
|
if (!t || !t.name || t.invisible) return null;
|
|
5135
|
-
const u = s.getCurrentInstance()?.appContext, { id: c = null, directives: l = [] } = t, { vIf: h, vElseIf: p, vElse: d, vFor: f, vShow: m, vModels:
|
|
5159
|
+
const u = s.getCurrentInstance()?.appContext, { id: c = null, directives: l = [] } = t, { vIf: h, vElseIf: p, vElse: d, vFor: f, vShow: m, vModels: v, vBind: g, vHtml: x, others: k } = si(l);
|
|
5136
5160
|
if (!n && (p || d))
|
|
5137
5161
|
return null;
|
|
5138
5162
|
if (h && !zr(h, e))
|
|
5139
5163
|
return en(t, e, s, i, r);
|
|
5140
|
-
const N = (
|
|
5141
|
-
const
|
|
5164
|
+
const N = (C, D = 0) => {
|
|
5165
|
+
const de = C.$components, Se = (() => {
|
|
5142
5166
|
if (t.name === "component")
|
|
5143
|
-
return Jr(
|
|
5167
|
+
return Jr(C, t.props?.is);
|
|
5144
5168
|
if (t.name === "slot") return t.name;
|
|
5145
|
-
const P = i(`${t.id}_${
|
|
5146
|
-
return
|
|
5147
|
-
})(), J = Qr(c, t.props ?? {},
|
|
5169
|
+
const P = i(`${t.id}_${D}`, t.name, t.from, s);
|
|
5170
|
+
return te(P) ? Fi(P) || Li(P) ? P : de[P] ?? u?.app?.component(P) ?? P : P;
|
|
5171
|
+
})(), J = Qr(c, t.props ?? {}, C), Me = Zr(
|
|
5148
5172
|
s,
|
|
5149
5173
|
t.id,
|
|
5150
5174
|
t.events ?? {},
|
|
5151
|
-
|
|
5175
|
+
C
|
|
5152
5176
|
);
|
|
5153
5177
|
if (t.name === "slot")
|
|
5154
|
-
return tn(s, t, J,
|
|
5155
|
-
g && Object.assign(J,
|
|
5178
|
+
return tn(s, t, J, C, i);
|
|
5179
|
+
g && Object.assign(J, C.__parseExpression(g.value)), m && (J.style = Object.assign(
|
|
5156
5180
|
J.style ?? {},
|
|
5157
|
-
rn(m,
|
|
5158
|
-
)),
|
|
5159
|
-
|
|
5181
|
+
rn(m, C)
|
|
5182
|
+
)), x && Object.assign(J, nn(x, C)), v.forEach((P) => {
|
|
5183
|
+
vs.includes(t.name) ? Object.assign(J, an(P, C)) : Object.assign(J, on(s, P, C));
|
|
5160
5184
|
});
|
|
5161
|
-
const
|
|
5185
|
+
const rt = un(
|
|
5162
5186
|
s,
|
|
5163
5187
|
t.children ?? [],
|
|
5164
|
-
|
|
5188
|
+
C,
|
|
5165
5189
|
i,
|
|
5166
5190
|
t
|
|
5167
|
-
),
|
|
5191
|
+
), Q = C?.__id ? `data-v-${C.__id}` : void 0, ue = Q ? { [Q]: "" } : {}, Ce = C.__mode === T.Design ? { "data-vtj": c } : {}, { ref: Kt, ...De } = J, oi = Object.keys(De).filter(
|
|
5168
5192
|
(P) => P.startsWith("on")
|
|
5169
|
-
),
|
|
5170
|
-
for (const P of Object.keys(
|
|
5171
|
-
oi.includes(P) ?
|
|
5172
|
-
const
|
|
5173
|
-
key:
|
|
5174
|
-
...
|
|
5175
|
-
...
|
|
5176
|
-
...
|
|
5193
|
+
), zt = {}, Jt = {};
|
|
5194
|
+
for (const P of Object.keys(De))
|
|
5195
|
+
oi.includes(P) ? zt[P] = De[P] : Jt[P] = De[P];
|
|
5196
|
+
const Be = `${c}_${D}`, nt = {
|
|
5197
|
+
key: Be,
|
|
5198
|
+
...ue,
|
|
5199
|
+
...Ce,
|
|
5200
|
+
...Jt
|
|
5177
5201
|
};
|
|
5178
|
-
|
|
5179
|
-
let
|
|
5180
|
-
|
|
5202
|
+
we.isNodeEqual(nt, we.getNode(Be)) || we.setNode(Be, nt);
|
|
5203
|
+
let at = s.createVNode(
|
|
5204
|
+
Se,
|
|
5181
5205
|
{
|
|
5182
|
-
...
|
|
5183
|
-
ref:
|
|
5184
|
-
...
|
|
5185
|
-
...
|
|
5206
|
+
...we.getNode(Be) || nt,
|
|
5207
|
+
ref: Kt,
|
|
5208
|
+
...zt,
|
|
5209
|
+
...Me
|
|
5186
5210
|
},
|
|
5187
|
-
|
|
5211
|
+
rt
|
|
5188
5212
|
);
|
|
5189
|
-
const
|
|
5190
|
-
return
|
|
5213
|
+
const Qt = u ? Kr(u, k, C) : [];
|
|
5214
|
+
return Qt.length && (at = s.withDirectives(at, Qt)), at;
|
|
5191
5215
|
};
|
|
5192
5216
|
return f ? hn(f, N, e) : N(e, a);
|
|
5193
5217
|
}
|
|
@@ -5200,13 +5224,13 @@ function Kr(t, e, s) {
|
|
|
5200
5224
|
return r.value && a.push(s.__parseExpression(r.value)), r.arg && a.push(r.arg), r.modifiers && a.push(r.modifiers), a;
|
|
5201
5225
|
}).filter((r) => !!r);
|
|
5202
5226
|
}
|
|
5203
|
-
function
|
|
5204
|
-
const e = t.find((h) =>
|
|
5205
|
-
(h) =>
|
|
5206
|
-
), i = t.find((h) =>
|
|
5207
|
-
(h) =>
|
|
5227
|
+
function si(t = []) {
|
|
5228
|
+
const e = t.find((h) => Z(h.name) === "vIf"), s = t.find(
|
|
5229
|
+
(h) => Z(h.name) === "vElseIf"
|
|
5230
|
+
), i = t.find((h) => Z(h.name) === "vElse"), r = t.find((h) => Z(h.name) === "vFor"), n = t.find((h) => Z(h.name) === "vShow"), a = t.find((h) => Z(h.name) === "vBind"), u = t.find((h) => Z(h.name) === "vHtml"), c = t.filter(
|
|
5231
|
+
(h) => Z(h.name) === "vModel"
|
|
5208
5232
|
), l = t.filter(
|
|
5209
|
-
(h) => !_i.includes(
|
|
5233
|
+
(h) => !_i.includes(Z(h.name))
|
|
5210
5234
|
);
|
|
5211
5235
|
return {
|
|
5212
5236
|
vIf: e,
|
|
@@ -5227,14 +5251,14 @@ function Jr(t, e) {
|
|
|
5227
5251
|
return e ? R(e) ? t.__parseExpression(e) : e : "div";
|
|
5228
5252
|
}
|
|
5229
5253
|
function Qr(t, e, s) {
|
|
5230
|
-
const i =
|
|
5254
|
+
const i = It(e, s);
|
|
5231
5255
|
return i.ref = s.__ref(t, i.ref), i;
|
|
5232
5256
|
}
|
|
5233
|
-
function
|
|
5234
|
-
return R(t) ? e.__parseExpression(t) : F(t) ? e.__parseFunction(t) : Array.isArray(t) ? t.map((s) =>
|
|
5257
|
+
function It(t, e) {
|
|
5258
|
+
return R(t) ? e.__parseExpression(t) : F(t) ? e.__parseFunction(t) : Array.isArray(t) ? t.map((s) => It(s, e)) : typeof t == "object" ? Object.keys(t || {}).reduce(
|
|
5235
5259
|
(s, i) => {
|
|
5236
5260
|
let r = t[i];
|
|
5237
|
-
return s[i] =
|
|
5261
|
+
return s[i] = It(r, e), s;
|
|
5238
5262
|
},
|
|
5239
5263
|
{}
|
|
5240
5264
|
) : t;
|
|
@@ -5265,7 +5289,7 @@ function Zr(t, e, s, i) {
|
|
|
5265
5289
|
};
|
|
5266
5290
|
return Object.keys(s || {}).reduce(
|
|
5267
5291
|
(u, c) => {
|
|
5268
|
-
const l = s[c], h =
|
|
5292
|
+
const l = s[c], h = ii(l.modifiers), p = h.find((m) => r.includes(m)), d = "on" + gi(c) + (p && n[p] || ""), f = l.handler ? i.__parseFunction(Xr(l.handler)) : null;
|
|
5269
5293
|
return f && (u[d] = t.withModifiers(
|
|
5270
5294
|
h.includes("enter") ? Yr(f, "enter") : f,
|
|
5271
5295
|
h
|
|
@@ -5277,27 +5301,29 @@ function Zr(t, e, s, i) {
|
|
|
5277
5301
|
function en(t, e, s, i, r = []) {
|
|
5278
5302
|
let n = r.findIndex((a) => a.id === t.id);
|
|
5279
5303
|
for (let a = ++n; a < r.length; a++) {
|
|
5280
|
-
const { directives: u = [] } = r[a], {
|
|
5281
|
-
if (c)
|
|
5282
|
-
|
|
5283
|
-
|
|
5304
|
+
const { directives: u = [] } = r[a], { vIf: c, vElseIf: l, vElse: h } = si(u);
|
|
5305
|
+
if (c)
|
|
5306
|
+
break;
|
|
5307
|
+
if (l) {
|
|
5308
|
+
if (e.__parseExpression(l.value))
|
|
5309
|
+
return _e(r[a], e, s, i, r, !0);
|
|
5284
5310
|
continue;
|
|
5285
5311
|
}
|
|
5286
|
-
if (
|
|
5287
|
-
return
|
|
5312
|
+
if (h)
|
|
5313
|
+
return _e(r[a], e, s, i, r, !0);
|
|
5288
5314
|
}
|
|
5289
5315
|
return null;
|
|
5290
5316
|
}
|
|
5291
|
-
function
|
|
5317
|
+
function ii(t = {}, e = !1) {
|
|
5292
5318
|
const s = Object.keys(t);
|
|
5293
5319
|
return e ? s.map((i) => "." + i) : s;
|
|
5294
5320
|
}
|
|
5295
5321
|
function tn(t, e, s, i, r) {
|
|
5296
5322
|
const { children: n } = e, a = sn(e, i), u = i.$slots?.[a.name];
|
|
5297
|
-
return u ? u(s) : n ?
|
|
5298
|
-
|
|
5323
|
+
return u ? u(s) : n ? te(n) ? t.createTextVNode(n) : R(n) ? t.createTextVNode(
|
|
5324
|
+
bs(i.__parseExpression(n))
|
|
5299
5325
|
) : Array.isArray(n) ? n.map(
|
|
5300
|
-
(c, l) =>
|
|
5326
|
+
(c, l) => _e(c, i, t, r, n, !1, l)
|
|
5301
5327
|
) : null : null;
|
|
5302
5328
|
}
|
|
5303
5329
|
function sn(t, e) {
|
|
@@ -5335,7 +5361,7 @@ function on(t, e, s) {
|
|
|
5335
5361
|
value: e.value?.value ? `(v) => {
|
|
5336
5362
|
${e.value.value} = v;
|
|
5337
5363
|
}` : "(v) => {}"
|
|
5338
|
-
}, r = s.__parseFunction(i), n =
|
|
5364
|
+
}, r = s.__parseFunction(i), n = ii(
|
|
5339
5365
|
R(e.modifiers) ? s.__parseExpression(e.modifiers) : e.modifiers
|
|
5340
5366
|
), a = R(e.arg) ? s.__parseExpression(e.arg) : e.arg || "modelValue";
|
|
5341
5367
|
return {
|
|
@@ -5345,11 +5371,11 @@ function on(t, e, s) {
|
|
|
5345
5371
|
}
|
|
5346
5372
|
function un(t, e, s, i, r) {
|
|
5347
5373
|
if (!e) return null;
|
|
5348
|
-
if (
|
|
5374
|
+
if (te(e))
|
|
5349
5375
|
return { default: () => e };
|
|
5350
5376
|
if (R(e))
|
|
5351
5377
|
return {
|
|
5352
|
-
default: () =>
|
|
5378
|
+
default: () => bs(s.__parseExpression(e))
|
|
5353
5379
|
};
|
|
5354
5380
|
if (Array.isArray(e) && e.length > 0) {
|
|
5355
5381
|
const n = cn(e), a = (u, c) => !u || !r ? {} : r?.id && Object.keys(u).length ? c ? {
|
|
@@ -5361,14 +5387,14 @@ function un(t, e, s, i, r) {
|
|
|
5361
5387
|
(u, [c, { nodes: l, params: h, scope: p }]) => (u[c] = (d) => {
|
|
5362
5388
|
const f = h.length ? xi(d ?? {}, h) : a(d, p);
|
|
5363
5389
|
return l.map(
|
|
5364
|
-
(m,
|
|
5390
|
+
(m, v) => _e(
|
|
5365
5391
|
m,
|
|
5366
5392
|
s.__clone(f),
|
|
5367
5393
|
t,
|
|
5368
5394
|
i,
|
|
5369
5395
|
l,
|
|
5370
5396
|
!1,
|
|
5371
|
-
|
|
5397
|
+
v
|
|
5372
5398
|
)
|
|
5373
5399
|
);
|
|
5374
5400
|
}, u),
|
|
@@ -5390,17 +5416,17 @@ function cn(t) {
|
|
|
5390
5416
|
return e;
|
|
5391
5417
|
}
|
|
5392
5418
|
function ln(t = "default") {
|
|
5393
|
-
return
|
|
5419
|
+
return te(t) ? { name: t, params: [], scope: "" } : { params: [], scope: "", ...t };
|
|
5394
5420
|
}
|
|
5395
5421
|
function hn(t, e, s) {
|
|
5396
5422
|
const { value: i, iterator: r } = t, { item: n = "item", index: a = "index" } = r || {};
|
|
5397
5423
|
let u = s.__parseExpression(i) || [];
|
|
5398
5424
|
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`), []);
|
|
5399
5425
|
}
|
|
5400
|
-
const
|
|
5426
|
+
const mt = gs({
|
|
5401
5427
|
name: "VtjPageContainer",
|
|
5402
5428
|
async setup() {
|
|
5403
|
-
const t =
|
|
5429
|
+
const t = ni(), e = xs(), s = e.meta.__vtj__ || e.params.id, i = s ? t.getPage(s) : t.getHomepage(), r = i ? await t.getRenderComponent(i.id) : null, n = yt(Symbol());
|
|
5404
5430
|
if (i) {
|
|
5405
5431
|
Object.assign(e.meta, i.meta || {}, { cache: i.cache });
|
|
5406
5432
|
const { useTitle: a } = t?.adapter;
|
|
@@ -5421,7 +5447,7 @@ const dt = ds({
|
|
|
5421
5447
|
},
|
|
5422
5448
|
render() {
|
|
5423
5449
|
const { component: t, query: e, sid: s } = this;
|
|
5424
|
-
return t ?
|
|
5450
|
+
return t ? bt(t, { ...e, key: s }) : bt(
|
|
5425
5451
|
"div",
|
|
5426
5452
|
{ style: { padding: "10px" } },
|
|
5427
5453
|
"找不到组件,组件不存在或未发布!"
|
|
@@ -5430,18 +5456,18 @@ const dt = ds({
|
|
|
5430
5456
|
activated() {
|
|
5431
5457
|
this.meta.cache === !1 && (this.sid = Symbol());
|
|
5432
5458
|
}
|
|
5433
|
-
}), pn =
|
|
5459
|
+
}), pn = gs({
|
|
5434
5460
|
name: "VtjStartupContainer",
|
|
5435
5461
|
render() {
|
|
5436
|
-
return
|
|
5462
|
+
return bt("div", "page not found!");
|
|
5437
5463
|
}
|
|
5438
5464
|
});
|
|
5439
|
-
function
|
|
5465
|
+
function Je(t, e, s = []) {
|
|
5440
5466
|
const i = [];
|
|
5441
5467
|
for (const r of s) {
|
|
5442
5468
|
const { id: n, title: a, icon: u, children: c, hidden: l, layout: h } = r;
|
|
5443
5469
|
if (h) {
|
|
5444
|
-
const p =
|
|
5470
|
+
const p = Je(t, e, c || []);
|
|
5445
5471
|
i.push(...p);
|
|
5446
5472
|
} else {
|
|
5447
5473
|
const p = {
|
|
@@ -5450,19 +5476,19 @@ function Ke(t, e, s = []) {
|
|
|
5450
5476
|
icon: u,
|
|
5451
5477
|
hidden: l,
|
|
5452
5478
|
url: `${t}/${e}/${n}`,
|
|
5453
|
-
children: c && c.length ?
|
|
5479
|
+
children: c && c.length ? Je(t, e, c) : void 0
|
|
5454
5480
|
};
|
|
5455
5481
|
i.push(p);
|
|
5456
5482
|
}
|
|
5457
5483
|
}
|
|
5458
5484
|
return i;
|
|
5459
5485
|
}
|
|
5460
|
-
function
|
|
5486
|
+
function ri(t, e) {
|
|
5461
5487
|
if (!e) return t;
|
|
5462
5488
|
let s = [];
|
|
5463
5489
|
for (const i of t)
|
|
5464
5490
|
if (i.children && i.children.length) {
|
|
5465
|
-
const r =
|
|
5491
|
+
const r = ri(i.children, e);
|
|
5466
5492
|
r.length && (i.children = r, s.push(i));
|
|
5467
5493
|
} else
|
|
5468
5494
|
e.can(i.id.toString()) && s.push(i);
|
|
@@ -5473,27 +5499,27 @@ function Hn(t) {
|
|
|
5473
5499
|
menuPathPrefix: e = "",
|
|
5474
5500
|
pageRouteName: s = "page",
|
|
5475
5501
|
disableMenusFilter: i = !1
|
|
5476
|
-
} = t || {}, r =
|
|
5502
|
+
} = t || {}, r = ni(), n = xs(), a = wr(), u = yt(!1), c = yt(!1), l = r.project, h = (f, m) => {
|
|
5477
5503
|
u.value = !f?.mask, c.value = m?.pure ?? !!f?.pure;
|
|
5478
5504
|
};
|
|
5479
5505
|
yi(() => {
|
|
5480
|
-
const { name: f, params: m, meta:
|
|
5481
|
-
if (f ===
|
|
5506
|
+
const { name: f, params: m, meta: v } = n;
|
|
5507
|
+
if (f === Ie) {
|
|
5482
5508
|
const g = r.getPage(m.id);
|
|
5483
|
-
h(g,
|
|
5484
|
-
} else if (f ===
|
|
5509
|
+
h(g, v);
|
|
5510
|
+
} else if (f === Ge) {
|
|
5485
5511
|
const g = r.getHomepage();
|
|
5486
|
-
h(g,
|
|
5512
|
+
h(g, v);
|
|
5487
5513
|
} else {
|
|
5488
|
-
const g =
|
|
5514
|
+
const g = v.__vtj__;
|
|
5489
5515
|
if (g) {
|
|
5490
|
-
const
|
|
5491
|
-
h(
|
|
5516
|
+
const x = r.getPage(g);
|
|
5517
|
+
h(x, v);
|
|
5492
5518
|
} else
|
|
5493
|
-
u.value = !
|
|
5519
|
+
u.value = !v.mask, c.value = !!v.pure;
|
|
5494
5520
|
}
|
|
5495
5521
|
});
|
|
5496
|
-
const p =
|
|
5522
|
+
const p = Je(
|
|
5497
5523
|
e,
|
|
5498
5524
|
s,
|
|
5499
5525
|
l?.pages
|
|
@@ -5503,11 +5529,11 @@ function Hn(t) {
|
|
|
5503
5529
|
logo: d?.logo,
|
|
5504
5530
|
themeSwitchable: d?.themeSwitchable,
|
|
5505
5531
|
title: d?.title || l?.description || l?.name || "VTJ App",
|
|
5506
|
-
menus: i ? p :
|
|
5532
|
+
menus: i ? p : ri(p, a),
|
|
5507
5533
|
pure: c
|
|
5508
5534
|
};
|
|
5509
5535
|
}
|
|
5510
|
-
function
|
|
5536
|
+
function gt(t, e) {
|
|
5511
5537
|
const { id: s, title: i, meta: r } = t, { name: n = "page", prefix: a = "", component: u, routeMeta: c } = e;
|
|
5512
5538
|
return {
|
|
5513
5539
|
name: s,
|
|
@@ -5521,7 +5547,7 @@ function mt(t, e) {
|
|
|
5521
5547
|
}
|
|
5522
5548
|
};
|
|
5523
5549
|
}
|
|
5524
|
-
function
|
|
5550
|
+
function At(t) {
|
|
5525
5551
|
const {
|
|
5526
5552
|
name: e = "page",
|
|
5527
5553
|
prefix: s = "",
|
|
@@ -5532,9 +5558,9 @@ function It(t) {
|
|
|
5532
5558
|
homepage: u
|
|
5533
5559
|
} = t, c = [];
|
|
5534
5560
|
for (const l of i) {
|
|
5535
|
-
const { id: h, title: p, dir: d, layout: f, children: m, meta:
|
|
5561
|
+
const { id: h, title: p, dir: d, layout: f, children: m, meta: v } = l;
|
|
5536
5562
|
if (d) {
|
|
5537
|
-
const g =
|
|
5563
|
+
const g = At({
|
|
5538
5564
|
name: e,
|
|
5539
5565
|
prefix: s,
|
|
5540
5566
|
component: r,
|
|
@@ -5545,7 +5571,7 @@ function It(t) {
|
|
|
5545
5571
|
});
|
|
5546
5572
|
c.push(...g);
|
|
5547
5573
|
} else if (f) {
|
|
5548
|
-
const g =
|
|
5574
|
+
const g = At({
|
|
5549
5575
|
name: e,
|
|
5550
5576
|
prefix: s,
|
|
5551
5577
|
component: r,
|
|
@@ -5553,21 +5579,21 @@ function It(t) {
|
|
|
5553
5579
|
homepage: u,
|
|
5554
5580
|
loader: n,
|
|
5555
5581
|
pages: m || []
|
|
5556
|
-
}),
|
|
5582
|
+
}), x = {
|
|
5557
5583
|
name: `layout_${h}`,
|
|
5558
5584
|
path: s,
|
|
5559
5585
|
component: () => n(h),
|
|
5560
5586
|
meta: {
|
|
5561
5587
|
title: p,
|
|
5562
5588
|
...a,
|
|
5563
|
-
...
|
|
5589
|
+
...v,
|
|
5564
5590
|
__vtj__: h
|
|
5565
5591
|
},
|
|
5566
5592
|
children: g
|
|
5567
5593
|
};
|
|
5568
|
-
c.push(
|
|
5569
|
-
} else if (c.push(
|
|
5570
|
-
const g =
|
|
5594
|
+
c.push(x), c.push(gt(l, t));
|
|
5595
|
+
} else if (c.push(gt(l, t)), u === h) {
|
|
5596
|
+
const g = gt(l, t);
|
|
5571
5597
|
g.path = "", g.name = `home_${h}`, c.push(g);
|
|
5572
5598
|
}
|
|
5573
5599
|
}
|
|
@@ -5575,7 +5601,7 @@ function It(t) {
|
|
|
5575
5601
|
}
|
|
5576
5602
|
function fn(t = {}, e) {
|
|
5577
5603
|
const { css: s, store: i, enhance: r } = t, { window: n, app: a, library: u = {}, adapter: c, mode: l } = e, { Pinia: h } = u;
|
|
5578
|
-
a.config.globalProperties.$libs = u,
|
|
5604
|
+
a.config.globalProperties.$libs = u, Nt(n, "global-css", s || ""), h && i && dn(i, a, h), gn(a, c, t), !c.access && t.access && mn(t.access, a, l, c), xn(a, t), r && vn(r, a, u);
|
|
5579
5605
|
}
|
|
5580
5606
|
function dn(t, e, s) {
|
|
5581
5607
|
if (!e.config.globalProperties.$pinia) {
|
|
@@ -5589,7 +5615,7 @@ function dn(t, e, s) {
|
|
|
5589
5615
|
}
|
|
5590
5616
|
function mn(t, e, s, i) {
|
|
5591
5617
|
if (F(t) && t.value) {
|
|
5592
|
-
const r = z(t, {}, !1, !1, !0), { alert: n, request: a } = i, u = new
|
|
5618
|
+
const r = z(t, {}, !1, !1, !0), { alert: n, request: a } = i, u = new Gt({
|
|
5593
5619
|
alert: n,
|
|
5594
5620
|
storagePrefix: "__VTJ_APP_",
|
|
5595
5621
|
...r(e)
|
|
@@ -5646,7 +5672,7 @@ function bn(t, e, s) {
|
|
|
5646
5672
|
t.use(c);
|
|
5647
5673
|
}
|
|
5648
5674
|
}
|
|
5649
|
-
const
|
|
5675
|
+
const qt = Symbol("Provider");
|
|
5650
5676
|
var yn = /* @__PURE__ */ ((t) => (t.Production = "production", t.Development = "development", t))(yn || {});
|
|
5651
5677
|
class _n extends ui {
|
|
5652
5678
|
/**
|
|
@@ -5679,7 +5705,7 @@ class _n extends ui {
|
|
|
5679
5705
|
// 全局变量
|
|
5680
5706
|
modules = {};
|
|
5681
5707
|
// 异步模块加载器
|
|
5682
|
-
adapter = { request:
|
|
5708
|
+
adapter = { request: vt, jsonp: ms };
|
|
5683
5709
|
// 适配器接口
|
|
5684
5710
|
apis = {};
|
|
5685
5711
|
// API集合
|
|
@@ -5717,9 +5743,9 @@ class _n extends ui {
|
|
|
5717
5743
|
try {
|
|
5718
5744
|
i = await e.apply(e, s);
|
|
5719
5745
|
} catch (n) {
|
|
5720
|
-
|
|
5746
|
+
ve.warn("模拟数据模版异常", n);
|
|
5721
5747
|
}
|
|
5722
|
-
const r =
|
|
5748
|
+
const r = Te();
|
|
5723
5749
|
return r || console.warn(
|
|
5724
5750
|
"[@vtj/renderer]",
|
|
5725
5751
|
"项目缺少mockjs, 你需要安装mockjs依赖,并在应用的 main.ts 中添加 mockjs 导入,确保 window.Mock 可用"
|
|
@@ -5740,10 +5766,10 @@ class _n extends ui {
|
|
|
5740
5766
|
if (this.project = i ? await i() : await this.service.init(e), !this.project)
|
|
5741
5767
|
throw new Error("project is null");
|
|
5742
5768
|
const { apis: r = [], meta: n = [], env: a = [] } = this.project, u = globalThis;
|
|
5743
|
-
u && (u.CKEDITOR_VERSION = void 0), this.initEnv(a), this.mode === T.Raw ? await this.loadDependencies(u) : await this.loadAssets(u), this.initMock(u), this.apis = Ir(r, n, this.adapter),
|
|
5769
|
+
u && (u.CKEDITOR_VERSION = void 0), this.initEnv(a), this.mode === T.Raw ? await this.loadDependencies(u) : await this.loadAssets(u), this.initMock(u), this.apis = Ir(r, n, this.adapter), Zs(u), Ar(r, u), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
|
|
5744
5770
|
}
|
|
5745
5771
|
initMock(e) {
|
|
5746
|
-
const s =
|
|
5772
|
+
const s = Te(e);
|
|
5747
5773
|
s && s.setup({
|
|
5748
5774
|
timeout: "50-500"
|
|
5749
5775
|
});
|
|
@@ -5775,19 +5801,19 @@ class _n extends ui {
|
|
|
5775
5801
|
/* Development */
|
|
5776
5802
|
);
|
|
5777
5803
|
Object.assign(this.libraryLocaleMap, m);
|
|
5778
|
-
for (const
|
|
5779
|
-
const g = i[
|
|
5780
|
-
if (
|
|
5781
|
-
r[
|
|
5804
|
+
for (const v of l) {
|
|
5805
|
+
const g = i[v], x = e[v];
|
|
5806
|
+
if (x)
|
|
5807
|
+
r[v] = x;
|
|
5782
5808
|
else if (g)
|
|
5783
|
-
e[
|
|
5809
|
+
e[v] = r[v] = await g();
|
|
5784
5810
|
else {
|
|
5785
|
-
const N = h[
|
|
5786
|
-
for (const
|
|
5787
|
-
|
|
5788
|
-
r[
|
|
5811
|
+
const N = h[v] || [];
|
|
5812
|
+
for (const C of N)
|
|
5813
|
+
Qe(C) && await Vi(C, pe.append(C, { v: ke })), Ye(C) && await es(pe.append(C, { v: ke }));
|
|
5814
|
+
r[v] = e[v];
|
|
5789
5815
|
}
|
|
5790
|
-
const k = m[
|
|
5816
|
+
const k = m[v];
|
|
5791
5817
|
if (k) {
|
|
5792
5818
|
const N = i[k];
|
|
5793
5819
|
c[k] = N ? await N() : e[k];
|
|
@@ -5795,18 +5821,18 @@ class _n extends ui {
|
|
|
5795
5821
|
}
|
|
5796
5822
|
if (u === "development") {
|
|
5797
5823
|
for (const g of p)
|
|
5798
|
-
await
|
|
5799
|
-
const
|
|
5824
|
+
await es(pe.append(g, { v: ke }));
|
|
5825
|
+
const v = this.materials || {};
|
|
5800
5826
|
for (const g of d) {
|
|
5801
|
-
const
|
|
5827
|
+
const x = e[f[g]], k = x?.default || x, N = ci[g];
|
|
5802
5828
|
if (N)
|
|
5803
|
-
k && N.forEach((
|
|
5804
|
-
n[
|
|
5829
|
+
k && N.forEach((C) => {
|
|
5830
|
+
n[C] = k[C];
|
|
5805
5831
|
});
|
|
5806
5832
|
else {
|
|
5807
|
-
const
|
|
5808
|
-
|
|
5809
|
-
n[
|
|
5833
|
+
const C = v[g] ? (await v[g]()).default : e[g];
|
|
5834
|
+
C && k && (C.components || []).forEach((D) => {
|
|
5835
|
+
n[D.name] = Ii(D, k);
|
|
5810
5836
|
});
|
|
5811
5837
|
}
|
|
5812
5838
|
}
|
|
@@ -5821,25 +5847,25 @@ class _n extends ui {
|
|
|
5821
5847
|
routeMeta: c
|
|
5822
5848
|
} = i, l = a ? "" : "/", h = {
|
|
5823
5849
|
path: `${l}${u}/:id`,
|
|
5824
|
-
name:
|
|
5825
|
-
component:
|
|
5850
|
+
name: Ie,
|
|
5851
|
+
component: mt
|
|
5826
5852
|
}, p = this.getHomepage(), d = {
|
|
5827
5853
|
path: l,
|
|
5828
|
-
name:
|
|
5829
|
-
component: p ?
|
|
5854
|
+
name: Ge,
|
|
5855
|
+
component: p ? mt : r.startupComponent || pn,
|
|
5830
5856
|
meta: c
|
|
5831
5857
|
};
|
|
5832
|
-
if (e.hasRoute(
|
|
5858
|
+
if (e.hasRoute(Ie) && e.removeRoute(Ie), e.hasRoute(Ge) && e.removeRoute(Ge), i.enableStaticRoute) {
|
|
5833
5859
|
const f = s?.pages || [];
|
|
5834
|
-
|
|
5860
|
+
At({
|
|
5835
5861
|
name: u,
|
|
5836
5862
|
prefix: l,
|
|
5837
5863
|
pages: f,
|
|
5838
|
-
component:
|
|
5864
|
+
component: mt,
|
|
5839
5865
|
loader: this.getRenderComponent.bind(this),
|
|
5840
5866
|
homepage: p?.id
|
|
5841
|
-
}).forEach((
|
|
5842
|
-
a ? e.addRoute(a,
|
|
5867
|
+
}).forEach((v) => {
|
|
5868
|
+
a ? e.addRoute(a, v) : e.addRoute(v);
|
|
5843
5869
|
}), p || (a ? e.addRoute(a, d) : e.addRoute(d));
|
|
5844
5870
|
} else
|
|
5845
5871
|
a ? (e.addRoute(a, h), e.addRoute(a, d)) : (e.addRoute(h), e.addRoute(d));
|
|
@@ -5881,7 +5907,7 @@ class _n extends ui {
|
|
|
5881
5907
|
const l = { locale: i[s[a]] }, h = r[a] || {}, p = { ...l, ...h };
|
|
5882
5908
|
e.use(u, p), n[a] = !0;
|
|
5883
5909
|
}
|
|
5884
|
-
e.provide(
|
|
5910
|
+
e.provide(qt, 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 !== T.Design && this.initGlobals(this.project?.globals || {}, {
|
|
5885
5911
|
app: e,
|
|
5886
5912
|
window: globalThis,
|
|
5887
5913
|
adapter: this.adapter,
|
|
@@ -5928,7 +5954,7 @@ class _n extends ui {
|
|
|
5928
5954
|
return s(e) || null;
|
|
5929
5955
|
}
|
|
5930
5956
|
getMenus(e = "page", s = "") {
|
|
5931
|
-
return
|
|
5957
|
+
return Je(s, e, this.project?.pages || []);
|
|
5932
5958
|
}
|
|
5933
5959
|
getHomepage() {
|
|
5934
5960
|
const { homepage: e } = this.project || {};
|
|
@@ -5968,12 +5994,12 @@ class _n extends ui {
|
|
|
5968
5994
|
apis: a,
|
|
5969
5995
|
window: globalThis,
|
|
5970
5996
|
...s
|
|
5971
|
-
}, c =
|
|
5997
|
+
}, c = kt({
|
|
5972
5998
|
getDsl: async (l) => await this.getDsl(l) || null,
|
|
5973
5999
|
getDslByUrl: async (l) => await this.getDslByUrl(l) || null,
|
|
5974
6000
|
options: u
|
|
5975
6001
|
});
|
|
5976
|
-
return
|
|
6002
|
+
return Et({
|
|
5977
6003
|
...u,
|
|
5978
6004
|
dsl: e,
|
|
5979
6005
|
loader: c
|
|
@@ -5992,13 +6018,13 @@ class _n extends ui {
|
|
|
5992
6018
|
async getRenderComponent(e, s) {
|
|
5993
6019
|
const i = this.getFile(e);
|
|
5994
6020
|
if (!i)
|
|
5995
|
-
return
|
|
6021
|
+
return ve.warn(`Can not find file: ${e}`), null;
|
|
5996
6022
|
if (s && s(i), this.mode === T.Raw) {
|
|
5997
6023
|
const { vtjRawDir: n = ".vtj/vue" } = this.options, a = `${n}/${e}.vue`, u = this.modules[a] || this.modules[`/src/pages/${e}.vue`];
|
|
5998
6024
|
return u ? (await u())?.default : this.nodeEnv === "development" && this.adapter.startupComponent || null;
|
|
5999
6025
|
}
|
|
6000
6026
|
const r = await this.getDsl(i.id);
|
|
6001
|
-
return r ? this.createDslRenderer(r).renderer : (
|
|
6027
|
+
return r ? this.createDslRenderer(r).renderer : (ve.warn(`Can not find dsl: ${e}`), null);
|
|
6002
6028
|
}
|
|
6003
6029
|
/**
|
|
6004
6030
|
* 定义基于URL的异步组件
|
|
@@ -6010,7 +6036,7 @@ class _n extends ui {
|
|
|
6010
6036
|
* @returns Vue异步组件
|
|
6011
6037
|
*/
|
|
6012
6038
|
defineUrlSchemaComponent(e, s) {
|
|
6013
|
-
return
|
|
6039
|
+
return ts(async () => {
|
|
6014
6040
|
const i = await this.getDslByUrl(e);
|
|
6015
6041
|
return i ? (i.name = s || i.name, this.createDslRenderer(i).renderer) : null;
|
|
6016
6042
|
});
|
|
@@ -6023,7 +6049,7 @@ class _n extends ui {
|
|
|
6023
6049
|
* @returns Vue异步组件
|
|
6024
6050
|
*/
|
|
6025
6051
|
definePluginComponent(e) {
|
|
6026
|
-
return
|
|
6052
|
+
return ts(async () => await ti(e, globalThis));
|
|
6027
6053
|
}
|
|
6028
6054
|
/**
|
|
6029
6055
|
* 设置应用全局
|
|
@@ -6057,8 +6083,8 @@ function $n(t) {
|
|
|
6057
6083
|
onReady: (i) => e.ready(i)
|
|
6058
6084
|
};
|
|
6059
6085
|
}
|
|
6060
|
-
function
|
|
6061
|
-
const e =
|
|
6086
|
+
function ni(t = {}) {
|
|
6087
|
+
const e = Tt(qt, null);
|
|
6062
6088
|
if (!e)
|
|
6063
6089
|
throw new Error("Can not find provider");
|
|
6064
6090
|
if (e.nodeEnv === "development") {
|
|
@@ -6074,33 +6100,33 @@ function ii(t = {}) {
|
|
|
6074
6100
|
}
|
|
6075
6101
|
return e;
|
|
6076
6102
|
}
|
|
6077
|
-
function
|
|
6078
|
-
return
|
|
6103
|
+
function je() {
|
|
6104
|
+
return Tt(qt, null)?.globals ?? {};
|
|
6079
6105
|
}
|
|
6080
6106
|
function Un() {
|
|
6081
|
-
return
|
|
6107
|
+
return je().$store || {};
|
|
6082
6108
|
}
|
|
6083
6109
|
function Gn() {
|
|
6084
|
-
return
|
|
6110
|
+
return je().$pinia || {};
|
|
6085
6111
|
}
|
|
6086
6112
|
function qn() {
|
|
6087
|
-
return
|
|
6113
|
+
return je().$request;
|
|
6088
6114
|
}
|
|
6089
6115
|
function Wn() {
|
|
6090
|
-
return
|
|
6116
|
+
return je().$libs || {};
|
|
6091
6117
|
}
|
|
6092
6118
|
function Kn() {
|
|
6093
|
-
return
|
|
6119
|
+
return je().$apis || {};
|
|
6094
6120
|
}
|
|
6095
6121
|
async function zn(t, e = "") {
|
|
6096
6122
|
const { name: s, urls: i = [] } = t || {}, r = i.map((u) => e + u), { css: n, js: a } = Ai(r);
|
|
6097
|
-
if (n.length &&
|
|
6098
|
-
return await
|
|
6123
|
+
if (n.length && ys(n), a.length)
|
|
6124
|
+
return await _s(a, s).catch(
|
|
6099
6125
|
() => {
|
|
6100
6126
|
}
|
|
6101
6127
|
);
|
|
6102
6128
|
}
|
|
6103
|
-
const
|
|
6129
|
+
const ai = {
|
|
6104
6130
|
type: "json",
|
|
6105
6131
|
validSuccess: !0,
|
|
6106
6132
|
originResponse: !1,
|
|
@@ -6115,7 +6141,7 @@ const ri = {
|
|
|
6115
6141
|
type: s,
|
|
6116
6142
|
data: i
|
|
6117
6143
|
},
|
|
6118
|
-
settings:
|
|
6144
|
+
settings: ai
|
|
6119
6145
|
}), Cn = (t, e = "/__vtj__/api/uploader.json") => async (s, i) => await t.send({
|
|
6120
6146
|
url: e,
|
|
6121
6147
|
method: "post",
|
|
@@ -6124,12 +6150,12 @@ const ri = {
|
|
|
6124
6150
|
projectId: i
|
|
6125
6151
|
},
|
|
6126
6152
|
settings: {
|
|
6127
|
-
...
|
|
6153
|
+
...ai,
|
|
6128
6154
|
type: "data"
|
|
6129
6155
|
}
|
|
6130
6156
|
}).then((r) => r && r[0] ? r[0] : null).catch(() => null);
|
|
6131
6157
|
function Jn(t) {
|
|
6132
|
-
return
|
|
6158
|
+
return ds({
|
|
6133
6159
|
settings: {
|
|
6134
6160
|
type: "json",
|
|
6135
6161
|
validSuccess: !0,
|
|
@@ -6142,8 +6168,8 @@ function Jn(t) {
|
|
|
6142
6168
|
}
|
|
6143
6169
|
});
|
|
6144
6170
|
}
|
|
6145
|
-
class
|
|
6146
|
-
constructor(e =
|
|
6171
|
+
class Wt {
|
|
6172
|
+
constructor(e = vt) {
|
|
6147
6173
|
this.req = e, this.api = Sn(e), this.uploader = Cn(e);
|
|
6148
6174
|
}
|
|
6149
6175
|
api;
|
|
@@ -6231,7 +6257,7 @@ class qt {
|
|
|
6231
6257
|
const { urls: s = [] } = e, i = s.filter((n) => wi(n))[0];
|
|
6232
6258
|
if (!i) return null;
|
|
6233
6259
|
const r = this.pluginCaches[i];
|
|
6234
|
-
return r || (this.pluginCaches[i] =
|
|
6260
|
+
return r || (this.pluginCaches[i] = vt.send({
|
|
6235
6261
|
url: i,
|
|
6236
6262
|
method: "get",
|
|
6237
6263
|
settings: {
|
|
@@ -6249,17 +6275,17 @@ const j = new bi({
|
|
|
6249
6275
|
expired: 0,
|
|
6250
6276
|
prefix: "__VTJ_"
|
|
6251
6277
|
});
|
|
6252
|
-
class Qn extends
|
|
6278
|
+
class Qn extends Wt {
|
|
6253
6279
|
init(e) {
|
|
6254
|
-
const s = new
|
|
6280
|
+
const s = new qe(e), i = j.get(`project_${s.id}`), r = Object.assign(s.toDsl(), i || {});
|
|
6255
6281
|
return j.save(`project_${s.id}`, r), Promise.resolve(r);
|
|
6256
6282
|
}
|
|
6257
6283
|
saveProject(e) {
|
|
6258
|
-
const s = new
|
|
6284
|
+
const s = new qe(e);
|
|
6259
6285
|
return j.save(`project_${s.id}`, s.toDsl()), Promise.resolve(!0);
|
|
6260
6286
|
}
|
|
6261
6287
|
saveMaterials(e, s) {
|
|
6262
|
-
return j.save(`materials_${e.id}`,
|
|
6288
|
+
return j.save(`materials_${e.id}`, Pt(s)), Promise.resolve(!0);
|
|
6263
6289
|
}
|
|
6264
6290
|
saveFile(e) {
|
|
6265
6291
|
return j.save(`file_${e.id}`, e), Promise.resolve(!0);
|
|
@@ -6283,7 +6309,7 @@ class Qn extends qt {
|
|
|
6283
6309
|
return Promise.resolve(!0);
|
|
6284
6310
|
}
|
|
6285
6311
|
getHistory(e) {
|
|
6286
|
-
const s = j.get(`history_${e}`), i = new
|
|
6312
|
+
const s = j.get(`history_${e}`), i = new fs(s || { id: e });
|
|
6287
6313
|
return Promise.resolve(i.toDsl());
|
|
6288
6314
|
}
|
|
6289
6315
|
getHistoryItem(e, s) {
|
|
@@ -6299,22 +6325,22 @@ class Qn extends qt {
|
|
|
6299
6325
|
}), Promise.resolve(!0);
|
|
6300
6326
|
}
|
|
6301
6327
|
}
|
|
6302
|
-
class wn extends
|
|
6328
|
+
class wn extends Wt {
|
|
6303
6329
|
projects = {};
|
|
6304
6330
|
materials = {};
|
|
6305
6331
|
files = {};
|
|
6306
6332
|
histories = {};
|
|
6307
6333
|
historyItems = {};
|
|
6308
6334
|
init(e) {
|
|
6309
|
-
const s = new
|
|
6335
|
+
const s = new qe(e), i = this.projects[s.id] || {}, r = Object.assign(s.toDsl(), i);
|
|
6310
6336
|
return this.projects[r.id] = r, Promise.resolve(r);
|
|
6311
6337
|
}
|
|
6312
6338
|
saveProject(e) {
|
|
6313
|
-
const s = new
|
|
6339
|
+
const s = new qe(e);
|
|
6314
6340
|
return this.projects[s.id] = s.toDsl(), Promise.resolve(!0);
|
|
6315
6341
|
}
|
|
6316
6342
|
saveMaterials(e, s) {
|
|
6317
|
-
return e.id && (this.materials[e.id] =
|
|
6343
|
+
return e.id && (this.materials[e.id] = Pt(s)), Promise.resolve(!0);
|
|
6318
6344
|
}
|
|
6319
6345
|
saveFile(e) {
|
|
6320
6346
|
return this.files[e.id] = e, Promise.resolve(!0);
|
|
@@ -6338,7 +6364,7 @@ class wn extends qt {
|
|
|
6338
6364
|
return Promise.resolve(!0);
|
|
6339
6365
|
}
|
|
6340
6366
|
getHistory(e) {
|
|
6341
|
-
const s = this.histories[e], i = new
|
|
6367
|
+
const s = this.histories[e], i = new fs(s || { id: e });
|
|
6342
6368
|
return Promise.resolve(i);
|
|
6343
6369
|
}
|
|
6344
6370
|
getHistoryItem(e, s) {
|
|
@@ -6356,11 +6382,11 @@ class wn extends qt {
|
|
|
6356
6382
|
}), Promise.resolve(!0);
|
|
6357
6383
|
}
|
|
6358
6384
|
}
|
|
6359
|
-
let
|
|
6385
|
+
let Ue = null;
|
|
6360
6386
|
function Yn() {
|
|
6361
|
-
return
|
|
6387
|
+
return Ue || (Ue = new wn(), Ue);
|
|
6362
6388
|
}
|
|
6363
|
-
class Xn extends
|
|
6389
|
+
class Xn extends Wt {
|
|
6364
6390
|
getFileCaches = {};
|
|
6365
6391
|
async getExtension() {
|
|
6366
6392
|
return await this.api("getExtension", {}).catch(() => {
|
|
@@ -6377,7 +6403,7 @@ class Xn extends qt {
|
|
|
6377
6403
|
async saveMaterials(e, s) {
|
|
6378
6404
|
return !!await this.api("saveMaterials", {
|
|
6379
6405
|
project: e,
|
|
6380
|
-
materials:
|
|
6406
|
+
materials: Pt(s)
|
|
6381
6407
|
}).catch(() => !1);
|
|
6382
6408
|
}
|
|
6383
6409
|
async saveFile(e) {
|
|
@@ -6418,94 +6444,94 @@ class Xn extends qt {
|
|
|
6418
6444
|
}
|
|
6419
6445
|
}
|
|
6420
6446
|
export {
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6447
|
+
Rn as ACCESS,
|
|
6448
|
+
Xs as ACCESS_KEY,
|
|
6449
|
+
Gt as Access,
|
|
6424
6450
|
Ci as BUILD_IN_TAGS,
|
|
6425
6451
|
_i as BUILT_IN_DIRECTIVES,
|
|
6426
|
-
|
|
6452
|
+
Wt as BaseService,
|
|
6427
6453
|
Tn as COMPOSITION_HOOKS_LIST,
|
|
6428
|
-
|
|
6429
|
-
|
|
6454
|
+
ss as CONTEXT_HOST,
|
|
6455
|
+
ps as Context,
|
|
6430
6456
|
T as ContextMode,
|
|
6431
6457
|
Si as DATA_TYPES,
|
|
6432
|
-
|
|
6433
|
-
|
|
6458
|
+
Ge as HOMEPAGE_ROUTE_NAME,
|
|
6459
|
+
vs as HTML_TAGS,
|
|
6434
6460
|
jn as JSCodeToString,
|
|
6435
6461
|
Pn as LIFE_CYCLES_LIST,
|
|
6436
6462
|
Xn as LocalService,
|
|
6437
6463
|
wn as MemoryService,
|
|
6438
6464
|
yn as NodeEnv,
|
|
6439
|
-
|
|
6465
|
+
Ie as PAGE_ROUTE_NAME,
|
|
6440
6466
|
_n as Provider,
|
|
6441
|
-
|
|
6467
|
+
Nn as REMOTE,
|
|
6442
6468
|
Qn as StorageService,
|
|
6443
|
-
|
|
6469
|
+
ke as VTJ_RENDERER_VERSION,
|
|
6444
6470
|
Fn as adoptStylesToInline,
|
|
6445
|
-
|
|
6471
|
+
Nt as adoptedStyleSheets,
|
|
6446
6472
|
Bn as clearLoaderCache,
|
|
6447
6473
|
Pi as compileScopedCSS,
|
|
6448
|
-
|
|
6474
|
+
Ri as convertCssRpx,
|
|
6449
6475
|
Dn as createAccess,
|
|
6450
6476
|
Mn as createAdapter,
|
|
6451
6477
|
Vn as createAssetScripts,
|
|
6452
6478
|
On as createAssetsCss,
|
|
6453
6479
|
jr as createDataSources,
|
|
6454
|
-
|
|
6480
|
+
kt as createLoader,
|
|
6455
6481
|
Yn as createMemoryService,
|
|
6456
|
-
|
|
6482
|
+
Je as createMenus,
|
|
6457
6483
|
kr as createMetaApi,
|
|
6458
6484
|
Pr as createMock,
|
|
6459
6485
|
$n as createProvider,
|
|
6460
|
-
|
|
6486
|
+
Et as createRenderer,
|
|
6461
6487
|
Er as createSchemaApi,
|
|
6462
6488
|
Ir as createSchemaApis,
|
|
6463
6489
|
Jn as createServiceRequest,
|
|
6464
6490
|
Wr as defaultLoader,
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6491
|
+
He as fillBasePath,
|
|
6492
|
+
Te as getMock,
|
|
6493
|
+
ii as getModifiers,
|
|
6494
|
+
ti as getPlugin,
|
|
6469
6495
|
Ii as getRawComponent,
|
|
6470
6496
|
ji as isArrowFunction,
|
|
6471
6497
|
Di as isAssignment,
|
|
6472
6498
|
Fi as isBuiltInTag,
|
|
6473
|
-
|
|
6499
|
+
Qe as isCSSUrl,
|
|
6474
6500
|
Mi as isCallFunction,
|
|
6475
6501
|
Sr as isJSCode,
|
|
6476
6502
|
R as isJSExpression,
|
|
6477
6503
|
F as isJSFunction,
|
|
6478
6504
|
wi as isJSON,
|
|
6479
|
-
|
|
6505
|
+
Ye as isJSUrl,
|
|
6480
6506
|
Li as isNativeTag,
|
|
6481
6507
|
Oi as isVuePlugin,
|
|
6482
6508
|
Vi as loadCss,
|
|
6483
|
-
|
|
6509
|
+
ys as loadCssUrl,
|
|
6484
6510
|
zn as loadEnhance,
|
|
6485
|
-
|
|
6486
|
-
|
|
6511
|
+
_s as loadScriptUrl,
|
|
6512
|
+
ri as menusFilter,
|
|
6487
6513
|
Tr as mockApi,
|
|
6488
6514
|
Ar as mockApis,
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6515
|
+
Zs as mockCleanup,
|
|
6516
|
+
we as nodeCache,
|
|
6517
|
+
_e as nodeRender,
|
|
6492
6518
|
ki as parseDeps,
|
|
6493
|
-
|
|
6519
|
+
Oe as parseExpression,
|
|
6494
6520
|
z as parseFunction,
|
|
6495
6521
|
Ai as parseUrls,
|
|
6496
|
-
|
|
6522
|
+
qt as providerKey,
|
|
6497
6523
|
Ei as removeProdFlag,
|
|
6498
|
-
|
|
6524
|
+
Ni as rpxToPx,
|
|
6499
6525
|
Ln as setupPageSetting,
|
|
6500
|
-
|
|
6501
|
-
|
|
6526
|
+
bs as toString,
|
|
6527
|
+
ze as triggerError,
|
|
6502
6528
|
wr as useAccess,
|
|
6503
6529
|
Kn as useApis,
|
|
6504
|
-
|
|
6530
|
+
je as useGlobals,
|
|
6505
6531
|
Wn as useLibs,
|
|
6506
6532
|
Hn as useMask,
|
|
6507
6533
|
Gn as usePinia,
|
|
6508
|
-
|
|
6534
|
+
ni as useProvider,
|
|
6509
6535
|
qn as useRequest,
|
|
6510
6536
|
Un as useStore
|
|
6511
6537
|
};
|