@vtj/renderer 0.18.0 → 0.18.1
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 +7 -7
- package/dist/index.mjs +178 -167
- package/package.json +6 -6
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Base as ti, BUILT_IN_COMPONENTS as si, ProjectModel as Be, HistoryModel as is } from "@vtj/core";
|
|
2
|
-
import { url as
|
|
2
|
+
import { url as le, isUrl as ct, dedupArray as ii, isFunction as z, isString as Z, logger as ge, storage as et, cookie as tt, toArray as $t, unRSA as Ut, delay as ke, createRequest as rs, jsonp as ns, merge as ri, pathToRegexp as ni, pathToRegexpMatch as ai, formDataToJson as oi, isEqual as st, Queue as ui, cloneDeep as Gt, camelCase as X, upperFirstCamelCase as ci, pick as li, request as lt, loadScript as qt, debounce as hi, Storage as pi, mapToObject as St } from "@vtj/utils";
|
|
3
3
|
import * as xe from "vue";
|
|
4
4
|
import { inject as Ct, defineComponent as as, h as ht, ref as pt, watchEffect as fi, defineAsyncComponent as Wt } from "vue";
|
|
5
5
|
import { useRoute as os } from "vue-router";
|
|
@@ -7,10 +7,10 @@ import { useRoute as os } from "vue-router";
|
|
|
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.1
|
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
12
12
|
*/
|
|
13
|
-
const Ce = "0.18.
|
|
13
|
+
const Ce = "0.18.1";
|
|
14
14
|
var P = /* @__PURE__ */ ((t) => (t.Runtime = "Runtime", t.Design = "Design", t.Raw = "Raw", t.VNode = "VNode", t))(P || {});
|
|
15
15
|
const zt = [
|
|
16
16
|
"$el",
|
|
@@ -163,12 +163,12 @@ function xi(t) {
|
|
|
163
163
|
}
|
|
164
164
|
function In(t) {
|
|
165
165
|
return t.map(
|
|
166
|
-
(e) => `<script src="${
|
|
166
|
+
(e) => `<script src="${le.append(e, { v: Ce })}"><\/script>`
|
|
167
167
|
).join("");
|
|
168
168
|
}
|
|
169
169
|
function An(t = []) {
|
|
170
170
|
return t.map(
|
|
171
|
-
(e) => `<link rel="stylesheet" href="${
|
|
171
|
+
(e) => `<link rel="stylesheet" href="${le.append(e, { v: Ce })}" />`
|
|
172
172
|
).join("");
|
|
173
173
|
}
|
|
174
174
|
function vi(t, e = !1) {
|
|
@@ -177,10 +177,10 @@ function vi(t, e = !1) {
|
|
|
177
177
|
function bi(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:
|
|
180
|
+
({ urls: d, assetsUrl: f, library: m, assetsLibrary: g, localeLibrary: x }) => {
|
|
181
181
|
d?.forEach((E) => {
|
|
182
182
|
qe(E) && r.push(vi(E, s)), Ge(E) && n.push(E);
|
|
183
|
-
}), m && (u.push(m), c[m] = Le(d || [], e),
|
|
183
|
+
}), m && (u.push(m), c[m] = Le(d || [], e), x && (l[m] = x)), f && a.push(f), g && h.push(g), m && g && (p[g] = m);
|
|
184
184
|
}
|
|
185
185
|
), {
|
|
186
186
|
scripts: Le(r, e),
|
|
@@ -235,11 +235,11 @@ function Si(t, e) {
|
|
|
235
235
|
let U = 1;
|
|
236
236
|
for (p++; p < l.length && U > 0; )
|
|
237
237
|
l[p] === "{" ? U++ : l[p] === "}" && U--, p++;
|
|
238
|
-
const
|
|
238
|
+
const pe = l.substring(E, p), ye = l.substring(C, p - 1);
|
|
239
239
|
h.push({
|
|
240
240
|
type: R ? "keyframes" : "at-rule",
|
|
241
241
|
rule: A,
|
|
242
|
-
content:
|
|
242
|
+
content: pe,
|
|
243
243
|
inner: ye
|
|
244
244
|
});
|
|
245
245
|
}
|
|
@@ -255,14 +255,14 @@ function Si(t, e) {
|
|
|
255
255
|
continue;
|
|
256
256
|
}
|
|
257
257
|
const m = p + 1;
|
|
258
|
-
let
|
|
259
|
-
for (p++; p < l.length &&
|
|
260
|
-
l[p] === "{" ?
|
|
261
|
-
const
|
|
258
|
+
let g = 1;
|
|
259
|
+
for (p++; p < l.length && g > 0; )
|
|
260
|
+
l[p] === "{" ? g++ : l[p] === "}" && g--, p++;
|
|
261
|
+
const x = l.substring(m, p - 1);
|
|
262
262
|
h.push({
|
|
263
263
|
type: "rule",
|
|
264
264
|
selector: f,
|
|
265
|
-
content:
|
|
265
|
+
content: x.trim()
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
return h;
|
|
@@ -716,27 +716,27 @@ var Jt = 0, Pt = 1, Y = 2, Cs = 3, ws = 4, Es = 5, I = function(e, s, i) {
|
|
|
716
716
|
var a = (r ? r + " " : "") + it.strict;
|
|
717
717
|
this.reservedWordsStrict = ce(a), this.reservedWordsStrictBind = ce(a + " " + it.strictBind), this.input = String(s), this.containsEsc = !1, i ? (this.pos = i, this.lineStart = this.input.lastIndexOf(`
|
|
718
718
|
`, i - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split($).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(Te), this.regexpState = null;
|
|
719
|
-
},
|
|
719
|
+
}, he = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 } };
|
|
720
720
|
I.prototype.parse = function() {
|
|
721
721
|
var e = this.options.program || this.startNode();
|
|
722
722
|
return this.nextToken(), this.parseTopLevel(e);
|
|
723
723
|
};
|
|
724
|
-
|
|
724
|
+
he.inFunction.get = function() {
|
|
725
725
|
return (this.currentVarScope().flags & Ve) > 0;
|
|
726
726
|
};
|
|
727
|
-
|
|
727
|
+
he.inGenerator.get = function() {
|
|
728
728
|
return (this.currentVarScope().flags & vs) > 0;
|
|
729
729
|
};
|
|
730
|
-
|
|
730
|
+
he.inAsync.get = function() {
|
|
731
731
|
return (this.currentVarScope().flags & xs) > 0;
|
|
732
732
|
};
|
|
733
|
-
|
|
733
|
+
he.allowSuper.get = function() {
|
|
734
734
|
return (this.currentThisScope().flags & _s) > 0;
|
|
735
735
|
};
|
|
736
|
-
|
|
736
|
+
he.allowDirectSuper.get = function() {
|
|
737
737
|
return (this.currentThisScope().flags & Ss) > 0;
|
|
738
738
|
};
|
|
739
|
-
|
|
739
|
+
he.treatFunctionsAsVar.get = function() {
|
|
740
740
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
741
741
|
};
|
|
742
742
|
I.prototype.inNonArrowFunction = function() {
|
|
@@ -758,7 +758,7 @@ I.parseExpressionAt = function(e, s, i) {
|
|
|
758
758
|
I.tokenizer = function(e, s) {
|
|
759
759
|
return new this(s, e);
|
|
760
760
|
};
|
|
761
|
-
Object.defineProperties(I.prototype,
|
|
761
|
+
Object.defineProperties(I.prototype, he);
|
|
762
762
|
var F = I.prototype, $i = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
|
|
763
763
|
F.strictDirective = function(t) {
|
|
764
764
|
for (; ; ) {
|
|
@@ -1486,12 +1486,12 @@ y.parseSubscript = function(t, e, s, i, r, n) {
|
|
|
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 g = this.startNodeAt(e, s);
|
|
1490
|
+
g.callee = t, g.arguments = m, a && (g.optional = u), t = this.finishNode(g, "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
|
-
var
|
|
1494
|
-
|
|
1493
|
+
var x = this.startNodeAt(e, s);
|
|
1494
|
+
x.tag = t, x.quasi = this.parseTemplate({ isTagged: !0 }), t = this.finishNode(x, "TaggedTemplateExpression");
|
|
1495
1495
|
}
|
|
1496
1496
|
return t;
|
|
1497
1497
|
};
|
|
@@ -1593,15 +1593,15 @@ y.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, g = 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, g)) : i = u[0];
|
|
1600
1600
|
} else
|
|
1601
1601
|
i = this.parseParenExpression();
|
|
1602
1602
|
if (this.options.preserveParens) {
|
|
1603
|
-
var
|
|
1604
|
-
return
|
|
1603
|
+
var x = this.startNodeAt(e, s);
|
|
1604
|
+
return x.expression = i, this.finishNode(x, "ParenthesizedExpression");
|
|
1605
1605
|
} else
|
|
1606
1606
|
return i;
|
|
1607
1607
|
};
|
|
@@ -1939,7 +1939,7 @@ function Rt(t) {
|
|
|
1939
1939
|
Rt(9);
|
|
1940
1940
|
Rt(10);
|
|
1941
1941
|
Rt(11);
|
|
1942
|
-
var
|
|
1942
|
+
var v = I.prototype, te = function(e) {
|
|
1943
1943
|
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : ""), this.unicodeProperties = Rs[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
|
te.prototype.reset = function(e, s, i) {
|
|
@@ -1983,16 +1983,16 @@ te.prototype.eat = function(e, s) {
|
|
|
1983
1983
|
function $e(t) {
|
|
1984
1984
|
return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
|
|
1985
1985
|
}
|
|
1986
|
-
|
|
1986
|
+
v.validateRegExpFlags = function(t) {
|
|
1987
1987
|
for (var e = t.validFlags, s = t.flags, i = 0; i < s.length; i++) {
|
|
1988
1988
|
var r = s.charAt(i);
|
|
1989
1989
|
e.indexOf(r) === -1 && this.raise(t.start, "Invalid regular expression flag"), s.indexOf(r, i + 1) > -1 && this.raise(t.start, "Duplicate regular expression flag");
|
|
1990
1990
|
}
|
|
1991
1991
|
};
|
|
1992
|
-
|
|
1992
|
+
v.validateRegExpPattern = function(t) {
|
|
1993
1993
|
this.regexp_pattern(t), !t.switchN && this.options.ecmaVersion >= 9 && t.groupNames.length > 0 && (t.switchN = !0, this.regexp_pattern(t));
|
|
1994
1994
|
};
|
|
1995
|
-
|
|
1995
|
+
v.regexp_pattern = function(t) {
|
|
1996
1996
|
t.pos = 0, t.lastIntValue = 0, t.lastStringValue = "", t.lastAssertionIsQuantifiable = !1, t.numCapturingParens = 0, t.maxBackReference = 0, t.groupNames.length = 0, t.backReferenceNames.length = 0, this.regexp_disjunction(t), t.pos !== t.source.length && (t.eat(
|
|
1997
1997
|
41
|
|
1998
1998
|
/* ) */
|
|
@@ -2008,7 +2008,7 @@ g.regexp_pattern = function(t) {
|
|
|
2008
2008
|
t.groupNames.indexOf(i) === -1 && t.raise("Invalid named capture referenced");
|
|
2009
2009
|
}
|
|
2010
2010
|
};
|
|
2011
|
-
|
|
2011
|
+
v.regexp_disjunction = function(t) {
|
|
2012
2012
|
for (this.regexp_alternative(t); t.eat(
|
|
2013
2013
|
124
|
|
2014
2014
|
/* | */
|
|
@@ -2019,14 +2019,14 @@ g.regexp_disjunction = function(t) {
|
|
|
2019
2019
|
/* { */
|
|
2020
2020
|
) && t.raise("Lone quantifier brackets");
|
|
2021
2021
|
};
|
|
2022
|
-
|
|
2022
|
+
v.regexp_alternative = function(t) {
|
|
2023
2023
|
for (; t.pos < t.source.length && this.regexp_eatTerm(t); )
|
|
2024
2024
|
;
|
|
2025
2025
|
};
|
|
2026
|
-
|
|
2026
|
+
v.regexp_eatTerm = function(t) {
|
|
2027
2027
|
return this.regexp_eatAssertion(t) ? (t.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(t) && t.switchU && t.raise("Invalid quantifier"), !0) : (t.switchU ? this.regexp_eatAtom(t) : this.regexp_eatExtendedAtom(t)) ? (this.regexp_eatQuantifier(t), !0) : !1;
|
|
2028
2028
|
};
|
|
2029
|
-
|
|
2029
|
+
v.regexp_eatAssertion = function(t) {
|
|
2030
2030
|
var e = t.pos;
|
|
2031
2031
|
if (t.lastAssertionIsQuantifiable = !1, t.eat(
|
|
2032
2032
|
94
|
|
@@ -2075,13 +2075,13 @@ g.regexp_eatAssertion = function(t) {
|
|
|
2075
2075
|
}
|
|
2076
2076
|
return t.pos = e, !1;
|
|
2077
2077
|
};
|
|
2078
|
-
|
|
2078
|
+
v.regexp_eatQuantifier = function(t, e) {
|
|
2079
2079
|
return e === void 0 && (e = !1), this.regexp_eatQuantifierPrefix(t, e) ? (t.eat(
|
|
2080
2080
|
63
|
|
2081
2081
|
/* ? */
|
|
2082
2082
|
), !0) : !1;
|
|
2083
2083
|
};
|
|
2084
|
-
|
|
2084
|
+
v.regexp_eatQuantifierPrefix = function(t, e) {
|
|
2085
2085
|
return t.eat(
|
|
2086
2086
|
42
|
|
2087
2087
|
/* * */
|
|
@@ -2093,7 +2093,7 @@ g.regexp_eatQuantifierPrefix = function(t, e) {
|
|
|
2093
2093
|
/* ? */
|
|
2094
2094
|
) || this.regexp_eatBracedQuantifier(t, e);
|
|
2095
2095
|
};
|
|
2096
|
-
|
|
2096
|
+
v.regexp_eatBracedQuantifier = function(t, e) {
|
|
2097
2097
|
var s = t.pos;
|
|
2098
2098
|
if (t.eat(
|
|
2099
2099
|
123
|
|
@@ -2112,13 +2112,13 @@ g.regexp_eatBracedQuantifier = function(t, e) {
|
|
|
2112
2112
|
}
|
|
2113
2113
|
return !1;
|
|
2114
2114
|
};
|
|
2115
|
-
|
|
2115
|
+
v.regexp_eatAtom = function(t) {
|
|
2116
2116
|
return this.regexp_eatPatternCharacters(t) || t.eat(
|
|
2117
2117
|
46
|
|
2118
2118
|
/* . */
|
|
2119
2119
|
) || this.regexp_eatReverseSolidusAtomEscape(t) || this.regexp_eatCharacterClass(t) || this.regexp_eatUncapturingGroup(t) || this.regexp_eatCapturingGroup(t);
|
|
2120
2120
|
};
|
|
2121
|
-
|
|
2121
|
+
v.regexp_eatReverseSolidusAtomEscape = function(t) {
|
|
2122
2122
|
var e = t.pos;
|
|
2123
2123
|
if (t.eat(
|
|
2124
2124
|
92
|
|
@@ -2130,7 +2130,7 @@ g.regexp_eatReverseSolidusAtomEscape = function(t) {
|
|
|
2130
2130
|
}
|
|
2131
2131
|
return !1;
|
|
2132
2132
|
};
|
|
2133
|
-
|
|
2133
|
+
v.regexp_eatUncapturingGroup = function(t) {
|
|
2134
2134
|
var e = t.pos;
|
|
2135
2135
|
if (t.eat(
|
|
2136
2136
|
40
|
|
@@ -2154,7 +2154,7 @@ g.regexp_eatUncapturingGroup = function(t) {
|
|
|
2154
2154
|
}
|
|
2155
2155
|
return !1;
|
|
2156
2156
|
};
|
|
2157
|
-
|
|
2157
|
+
v.regexp_eatCapturingGroup = function(t) {
|
|
2158
2158
|
if (t.eat(
|
|
2159
2159
|
40
|
|
2160
2160
|
/* ( */
|
|
@@ -2168,32 +2168,32 @@ g.regexp_eatCapturingGroup = function(t) {
|
|
|
2168
2168
|
}
|
|
2169
2169
|
return !1;
|
|
2170
2170
|
};
|
|
2171
|
-
|
|
2171
|
+
v.regexp_eatExtendedAtom = function(t) {
|
|
2172
2172
|
return t.eat(
|
|
2173
2173
|
46
|
|
2174
2174
|
/* . */
|
|
2175
2175
|
) || this.regexp_eatReverseSolidusAtomEscape(t) || this.regexp_eatCharacterClass(t) || this.regexp_eatUncapturingGroup(t) || this.regexp_eatCapturingGroup(t) || this.regexp_eatInvalidBracedQuantifier(t) || this.regexp_eatExtendedPatternCharacter(t);
|
|
2176
2176
|
};
|
|
2177
|
-
|
|
2177
|
+
v.regexp_eatInvalidBracedQuantifier = function(t) {
|
|
2178
2178
|
return this.regexp_eatBracedQuantifier(t, !0) && t.raise("Nothing to repeat"), !1;
|
|
2179
2179
|
};
|
|
2180
|
-
|
|
2180
|
+
v.regexp_eatSyntaxCharacter = function(t) {
|
|
2181
2181
|
var e = t.current();
|
|
2182
2182
|
return Vs(e) ? (t.lastIntValue = e, t.advance(), !0) : !1;
|
|
2183
2183
|
};
|
|
2184
2184
|
function Vs(t) {
|
|
2185
2185
|
return t === 36 || t >= 40 && t <= 43 || t === 46 || t === 63 || t >= 91 && t <= 94 || t >= 123 && t <= 125;
|
|
2186
2186
|
}
|
|
2187
|
-
|
|
2187
|
+
v.regexp_eatPatternCharacters = function(t) {
|
|
2188
2188
|
for (var e = t.pos, s = 0; (s = t.current()) !== -1 && !Vs(s); )
|
|
2189
2189
|
t.advance();
|
|
2190
2190
|
return t.pos !== e;
|
|
2191
2191
|
};
|
|
2192
|
-
|
|
2192
|
+
v.regexp_eatExtendedPatternCharacter = function(t) {
|
|
2193
2193
|
var e = t.current();
|
|
2194
2194
|
return e !== -1 && e !== 36 && !(e >= 40 && e <= 43) && e !== 46 && e !== 63 && e !== 91 && e !== 94 && e !== 124 ? (t.advance(), !0) : !1;
|
|
2195
2195
|
};
|
|
2196
|
-
|
|
2196
|
+
v.regexp_groupSpecifier = function(t) {
|
|
2197
2197
|
if (t.eat(
|
|
2198
2198
|
63
|
|
2199
2199
|
/* ? */
|
|
@@ -2205,7 +2205,7 @@ g.regexp_groupSpecifier = function(t) {
|
|
|
2205
2205
|
t.raise("Invalid group");
|
|
2206
2206
|
}
|
|
2207
2207
|
};
|
|
2208
|
-
|
|
2208
|
+
v.regexp_eatGroupName = function(t) {
|
|
2209
2209
|
if (t.lastStringValue = "", t.eat(
|
|
2210
2210
|
60
|
|
2211
2211
|
/* < */
|
|
@@ -2219,7 +2219,7 @@ g.regexp_eatGroupName = function(t) {
|
|
|
2219
2219
|
}
|
|
2220
2220
|
return !1;
|
|
2221
2221
|
};
|
|
2222
|
-
|
|
2222
|
+
v.regexp_eatRegExpIdentifierName = function(t) {
|
|
2223
2223
|
if (t.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(t)) {
|
|
2224
2224
|
for (t.lastStringValue += $e(t.lastIntValue); this.regexp_eatRegExpIdentifierPart(t); )
|
|
2225
2225
|
t.lastStringValue += $e(t.lastIntValue);
|
|
@@ -2227,24 +2227,24 @@ g.regexp_eatRegExpIdentifierName = function(t) {
|
|
|
2227
2227
|
}
|
|
2228
2228
|
return !1;
|
|
2229
2229
|
};
|
|
2230
|
-
|
|
2230
|
+
v.regexp_eatRegExpIdentifierStart = function(t) {
|
|
2231
2231
|
var e = t.pos, s = this.options.ecmaVersion >= 11, i = t.current(s);
|
|
2232
2232
|
return t.advance(s), i === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(t, s) && (i = t.lastIntValue), Xi(i) ? (t.lastIntValue = i, !0) : (t.pos = e, !1);
|
|
2233
2233
|
};
|
|
2234
2234
|
function Xi(t) {
|
|
2235
2235
|
return ne(t, !0) || t === 36 || t === 95;
|
|
2236
2236
|
}
|
|
2237
|
-
|
|
2237
|
+
v.regexp_eatRegExpIdentifierPart = function(t) {
|
|
2238
2238
|
var e = t.pos, s = this.options.ecmaVersion >= 11, i = t.current(s);
|
|
2239
2239
|
return t.advance(s), i === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(t, s) && (i = t.lastIntValue), Yi(i) ? (t.lastIntValue = i, !0) : (t.pos = e, !1);
|
|
2240
2240
|
};
|
|
2241
2241
|
function Yi(t) {
|
|
2242
2242
|
return ve(t, !0) || t === 36 || t === 95 || t === 8204 || t === 8205;
|
|
2243
2243
|
}
|
|
2244
|
-
|
|
2244
|
+
v.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);
|
|
2246
2246
|
};
|
|
2247
|
-
|
|
2247
|
+
v.regexp_eatBackReference = function(t) {
|
|
2248
2248
|
var e = t.pos;
|
|
2249
2249
|
if (this.regexp_eatDecimalEscape(t)) {
|
|
2250
2250
|
var s = t.lastIntValue;
|
|
@@ -2256,7 +2256,7 @@ g.regexp_eatBackReference = function(t) {
|
|
|
2256
2256
|
}
|
|
2257
2257
|
return !1;
|
|
2258
2258
|
};
|
|
2259
|
-
|
|
2259
|
+
v.regexp_eatKGroupName = function(t) {
|
|
2260
2260
|
if (t.eat(
|
|
2261
2261
|
107
|
|
2262
2262
|
/* k */
|
|
@@ -2267,10 +2267,10 @@ g.regexp_eatKGroupName = function(t) {
|
|
|
2267
2267
|
}
|
|
2268
2268
|
return !1;
|
|
2269
2269
|
};
|
|
2270
|
-
|
|
2270
|
+
v.regexp_eatCharacterEscape = function(t) {
|
|
2271
2271
|
return this.regexp_eatControlEscape(t) || this.regexp_eatCControlLetter(t) || this.regexp_eatZero(t) || this.regexp_eatHexEscapeSequence(t) || this.regexp_eatRegExpUnicodeEscapeSequence(t, !1) || !t.switchU && this.regexp_eatLegacyOctalEscapeSequence(t) || this.regexp_eatIdentityEscape(t);
|
|
2272
2272
|
};
|
|
2273
|
-
|
|
2273
|
+
v.regexp_eatCControlLetter = function(t) {
|
|
2274
2274
|
var e = t.pos;
|
|
2275
2275
|
if (t.eat(
|
|
2276
2276
|
99
|
|
@@ -2282,21 +2282,21 @@ g.regexp_eatCControlLetter = function(t) {
|
|
|
2282
2282
|
}
|
|
2283
2283
|
return !1;
|
|
2284
2284
|
};
|
|
2285
|
-
|
|
2285
|
+
v.regexp_eatZero = function(t) {
|
|
2286
2286
|
return t.current() === 48 && !Xe(t.lookahead()) ? (t.lastIntValue = 0, t.advance(), !0) : !1;
|
|
2287
2287
|
};
|
|
2288
|
-
|
|
2288
|
+
v.regexp_eatControlEscape = function(t) {
|
|
2289
2289
|
var e = t.current();
|
|
2290
2290
|
return e === 116 ? (t.lastIntValue = 9, t.advance(), !0) : e === 110 ? (t.lastIntValue = 10, t.advance(), !0) : e === 118 ? (t.lastIntValue = 11, t.advance(), !0) : e === 102 ? (t.lastIntValue = 12, t.advance(), !0) : e === 114 ? (t.lastIntValue = 13, t.advance(), !0) : !1;
|
|
2291
2291
|
};
|
|
2292
|
-
|
|
2292
|
+
v.regexp_eatControlLetter = function(t) {
|
|
2293
2293
|
var e = t.current();
|
|
2294
2294
|
return Os(e) ? (t.lastIntValue = e % 32, t.advance(), !0) : !1;
|
|
2295
2295
|
};
|
|
2296
2296
|
function Os(t) {
|
|
2297
2297
|
return t >= 65 && t <= 90 || t >= 97 && t <= 122;
|
|
2298
2298
|
}
|
|
2299
|
-
|
|
2299
|
+
v.regexp_eatRegExpUnicodeEscapeSequence = function(t, e) {
|
|
2300
2300
|
e === void 0 && (e = !1);
|
|
2301
2301
|
var s = t.pos, i = e || t.switchU;
|
|
2302
2302
|
if (t.eat(
|
|
@@ -2337,7 +2337,7 @@ g.regexp_eatRegExpUnicodeEscapeSequence = function(t, e) {
|
|
|
2337
2337
|
function Zi(t) {
|
|
2338
2338
|
return t >= 0 && t <= 1114111;
|
|
2339
2339
|
}
|
|
2340
|
-
|
|
2340
|
+
v.regexp_eatIdentityEscape = function(t) {
|
|
2341
2341
|
if (t.switchU)
|
|
2342
2342
|
return this.regexp_eatSyntaxCharacter(t) ? !0 : t.eat(
|
|
2343
2343
|
47
|
|
@@ -2346,7 +2346,7 @@ g.regexp_eatIdentityEscape = function(t) {
|
|
|
2346
2346
|
var e = t.current();
|
|
2347
2347
|
return e !== 99 && (!t.switchN || e !== 107) ? (t.lastIntValue = e, t.advance(), !0) : !1;
|
|
2348
2348
|
};
|
|
2349
|
-
|
|
2349
|
+
v.regexp_eatDecimalEscape = function(t) {
|
|
2350
2350
|
t.lastIntValue = 0;
|
|
2351
2351
|
var e = t.current();
|
|
2352
2352
|
if (e >= 49 && e <= 57) {
|
|
@@ -2357,7 +2357,7 @@ g.regexp_eatDecimalEscape = function(t) {
|
|
|
2357
2357
|
}
|
|
2358
2358
|
return !1;
|
|
2359
2359
|
};
|
|
2360
|
-
|
|
2360
|
+
v.regexp_eatCharacterClassEscape = function(t) {
|
|
2361
2361
|
var e = t.current();
|
|
2362
2362
|
if (er(e))
|
|
2363
2363
|
return t.lastIntValue = -1, t.advance(), !0;
|
|
@@ -2377,7 +2377,7 @@ g.regexp_eatCharacterClassEscape = function(t) {
|
|
|
2377
2377
|
function er(t) {
|
|
2378
2378
|
return t === 100 || t === 68 || t === 115 || t === 83 || t === 119 || t === 87;
|
|
2379
2379
|
}
|
|
2380
|
-
|
|
2380
|
+
v.regexp_eatUnicodePropertyValueExpression = function(t) {
|
|
2381
2381
|
var e = t.pos;
|
|
2382
2382
|
if (this.regexp_eatUnicodePropertyName(t) && t.eat(
|
|
2383
2383
|
61
|
|
@@ -2395,13 +2395,13 @@ g.regexp_eatUnicodePropertyValueExpression = function(t) {
|
|
|
2395
2395
|
}
|
|
2396
2396
|
return !1;
|
|
2397
2397
|
};
|
|
2398
|
-
|
|
2398
|
+
v.regexp_validateUnicodePropertyNameAndValue = function(t, e, s) {
|
|
2399
2399
|
We(t.unicodeProperties.nonBinary, e) || t.raise("Invalid property name"), t.unicodeProperties.nonBinary[e].test(s) || t.raise("Invalid property value");
|
|
2400
2400
|
};
|
|
2401
|
-
|
|
2401
|
+
v.regexp_validateUnicodePropertyNameOrValue = function(t, e) {
|
|
2402
2402
|
t.unicodeProperties.binary.test(e) || t.raise("Invalid property name");
|
|
2403
2403
|
};
|
|
2404
|
-
|
|
2404
|
+
v.regexp_eatUnicodePropertyName = function(t) {
|
|
2405
2405
|
var e = 0;
|
|
2406
2406
|
for (t.lastStringValue = ""; Fs(e = t.current()); )
|
|
2407
2407
|
t.lastStringValue += $e(e), t.advance();
|
|
@@ -2410,7 +2410,7 @@ g.regexp_eatUnicodePropertyName = function(t) {
|
|
|
2410
2410
|
function Fs(t) {
|
|
2411
2411
|
return Os(t) || t === 95;
|
|
2412
2412
|
}
|
|
2413
|
-
|
|
2413
|
+
v.regexp_eatUnicodePropertyValue = function(t) {
|
|
2414
2414
|
var e = 0;
|
|
2415
2415
|
for (t.lastStringValue = ""; tr(e = t.current()); )
|
|
2416
2416
|
t.lastStringValue += $e(e), t.advance();
|
|
@@ -2419,10 +2419,10 @@ g.regexp_eatUnicodePropertyValue = function(t) {
|
|
|
2419
2419
|
function tr(t) {
|
|
2420
2420
|
return Fs(t) || Xe(t);
|
|
2421
2421
|
}
|
|
2422
|
-
|
|
2422
|
+
v.regexp_eatLoneUnicodePropertyNameOrValue = function(t) {
|
|
2423
2423
|
return this.regexp_eatUnicodePropertyValue(t);
|
|
2424
2424
|
};
|
|
2425
|
-
|
|
2425
|
+
v.regexp_eatCharacterClass = function(t) {
|
|
2426
2426
|
if (t.eat(
|
|
2427
2427
|
91
|
|
2428
2428
|
/* [ */
|
|
@@ -2439,7 +2439,7 @@ g.regexp_eatCharacterClass = function(t) {
|
|
|
2439
2439
|
}
|
|
2440
2440
|
return !1;
|
|
2441
2441
|
};
|
|
2442
|
-
|
|
2442
|
+
v.regexp_classRanges = function(t) {
|
|
2443
2443
|
for (; this.regexp_eatClassAtom(t); ) {
|
|
2444
2444
|
var e = t.lastIntValue;
|
|
2445
2445
|
if (t.eat(
|
|
@@ -2451,7 +2451,7 @@ g.regexp_classRanges = function(t) {
|
|
|
2451
2451
|
}
|
|
2452
2452
|
}
|
|
2453
2453
|
};
|
|
2454
|
-
|
|
2454
|
+
v.regexp_eatClassAtom = function(t) {
|
|
2455
2455
|
var e = t.pos;
|
|
2456
2456
|
if (t.eat(
|
|
2457
2457
|
92
|
|
@@ -2468,7 +2468,7 @@ g.regexp_eatClassAtom = function(t) {
|
|
|
2468
2468
|
var i = t.current();
|
|
2469
2469
|
return i !== 93 ? (t.lastIntValue = i, t.advance(), !0) : !1;
|
|
2470
2470
|
};
|
|
2471
|
-
|
|
2471
|
+
v.regexp_eatClassEscape = function(t) {
|
|
2472
2472
|
var e = t.pos;
|
|
2473
2473
|
if (t.eat(
|
|
2474
2474
|
98
|
|
@@ -2490,11 +2490,11 @@ g.regexp_eatClassEscape = function(t) {
|
|
|
2490
2490
|
}
|
|
2491
2491
|
return this.regexp_eatCharacterClassEscape(t) || this.regexp_eatCharacterEscape(t);
|
|
2492
2492
|
};
|
|
2493
|
-
|
|
2493
|
+
v.regexp_eatClassControlLetter = function(t) {
|
|
2494
2494
|
var e = t.current();
|
|
2495
2495
|
return Xe(e) || e === 95 ? (t.lastIntValue = e % 32, t.advance(), !0) : !1;
|
|
2496
2496
|
};
|
|
2497
|
-
|
|
2497
|
+
v.regexp_eatHexEscapeSequence = function(t) {
|
|
2498
2498
|
var e = t.pos;
|
|
2499
2499
|
if (t.eat(
|
|
2500
2500
|
120
|
|
@@ -2506,7 +2506,7 @@ g.regexp_eatHexEscapeSequence = function(t) {
|
|
|
2506
2506
|
}
|
|
2507
2507
|
return !1;
|
|
2508
2508
|
};
|
|
2509
|
-
|
|
2509
|
+
v.regexp_eatDecimalDigits = function(t) {
|
|
2510
2510
|
var e = t.pos, s = 0;
|
|
2511
2511
|
for (t.lastIntValue = 0; Xe(s = t.current()); )
|
|
2512
2512
|
t.lastIntValue = 10 * t.lastIntValue + (s - 48), t.advance();
|
|
@@ -2515,7 +2515,7 @@ g.regexp_eatDecimalDigits = function(t) {
|
|
|
2515
2515
|
function Xe(t) {
|
|
2516
2516
|
return t >= 48 && t <= 57;
|
|
2517
2517
|
}
|
|
2518
|
-
|
|
2518
|
+
v.regexp_eatHexDigits = function(t) {
|
|
2519
2519
|
var e = t.pos, s = 0;
|
|
2520
2520
|
for (t.lastIntValue = 0; Ls(s = t.current()); )
|
|
2521
2521
|
t.lastIntValue = 16 * t.lastIntValue + js(s), t.advance();
|
|
@@ -2527,7 +2527,7 @@ function Ls(t) {
|
|
|
2527
2527
|
function js(t) {
|
|
2528
2528
|
return t >= 65 && t <= 70 ? 10 + (t - 65) : t >= 97 && t <= 102 ? 10 + (t - 97) : t - 48;
|
|
2529
2529
|
}
|
|
2530
|
-
|
|
2530
|
+
v.regexp_eatLegacyOctalEscapeSequence = function(t) {
|
|
2531
2531
|
if (this.regexp_eatOctalDigit(t)) {
|
|
2532
2532
|
var e = t.lastIntValue;
|
|
2533
2533
|
if (this.regexp_eatOctalDigit(t)) {
|
|
@@ -2539,14 +2539,14 @@ g.regexp_eatLegacyOctalEscapeSequence = function(t) {
|
|
|
2539
2539
|
}
|
|
2540
2540
|
return !1;
|
|
2541
2541
|
};
|
|
2542
|
-
|
|
2542
|
+
v.regexp_eatOctalDigit = function(t) {
|
|
2543
2543
|
var e = t.current();
|
|
2544
2544
|
return Ms(e) ? (t.lastIntValue = e - 48, t.advance(), !0) : (t.lastIntValue = 0, !1);
|
|
2545
2545
|
};
|
|
2546
2546
|
function Ms(t) {
|
|
2547
2547
|
return t >= 48 && t <= 55;
|
|
2548
2548
|
}
|
|
2549
|
-
|
|
2549
|
+
v.regexp_eatFixedHexDigits = function(t, e) {
|
|
2550
2550
|
var s = t.pos;
|
|
2551
2551
|
t.lastIntValue = 0;
|
|
2552
2552
|
for (var i = 0; i < e; ++i) {
|
|
@@ -3123,7 +3123,7 @@ function Xt(t, e) {
|
|
|
3123
3123
|
configurable: !0
|
|
3124
3124
|
});
|
|
3125
3125
|
}
|
|
3126
|
-
const lr = Object.prototype.hasOwnProperty,
|
|
3126
|
+
const lr = Object.prototype.hasOwnProperty, fe = Symbol("Break"), de = Symbol("Continue"), Yt = Symbol("DefaultCase"), N = Symbol("EmptyStatementReturn"), Zt = Symbol("WithScopeName"), es = Symbol("SuperScopeName"), ts = Symbol("RootScopeName"), ss = Symbol("GlobalScopeName");
|
|
3127
3127
|
function nt(t) {
|
|
3128
3128
|
return typeof t == "function";
|
|
3129
3129
|
}
|
|
@@ -3203,7 +3203,7 @@ class ie {
|
|
|
3203
3203
|
this.value = e;
|
|
3204
3204
|
}
|
|
3205
3205
|
}
|
|
3206
|
-
class
|
|
3206
|
+
class me {
|
|
3207
3207
|
constructor(e, s = null, i) {
|
|
3208
3208
|
this.name = i, this.parent = s, this.data = e, this.labelStack = [];
|
|
3209
3209
|
}
|
|
@@ -3211,7 +3211,7 @@ class de {
|
|
|
3211
3211
|
function je() {
|
|
3212
3212
|
}
|
|
3213
3213
|
function hr(t = null, e) {
|
|
3214
|
-
return new
|
|
3214
|
+
return new me(/* @__PURE__ */ Object.create(null), t, e);
|
|
3215
3215
|
}
|
|
3216
3216
|
function pr(t) {
|
|
3217
3217
|
return Object.create(t);
|
|
@@ -3269,12 +3269,12 @@ class j {
|
|
|
3269
3269
|
}
|
|
3270
3270
|
initEnvironment(e) {
|
|
3271
3271
|
let s;
|
|
3272
|
-
if (e instanceof
|
|
3272
|
+
if (e instanceof me)
|
|
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 me(pr(this.options.rootContext), n, ts)), s = new me(e, r || n, ss);
|
|
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;
|
|
@@ -3308,7 +3308,7 @@ class j {
|
|
|
3308
3308
|
let s = Object.assign({}, Q);
|
|
3309
3309
|
return Object.keys(s).forEach((r) => {
|
|
3310
3310
|
r in e && delete s[r];
|
|
3311
|
-
}), new
|
|
3311
|
+
}), new me(s, null, es);
|
|
3312
3312
|
}
|
|
3313
3313
|
setCurrentContext(e) {
|
|
3314
3314
|
this.currentContext = e;
|
|
@@ -3640,8 +3640,8 @@ class j {
|
|
|
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, g = m.kind;
|
|
3644
|
+
m.key.type === "Identifier" && m.value.type === "FunctionExpression" && g === "init" && !m.value.id && Xt(p, m.key.name), n[l] = p;
|
|
3645
3645
|
}
|
|
3646
3646
|
}
|
|
3647
3647
|
return n;
|
|
@@ -3715,14 +3715,14 @@ class j {
|
|
|
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(
|
|
3720
|
-
|
|
3718
|
+
const g = s.getCurrentScope(), x = hr(d, `FunctionScope(${a})`);
|
|
3719
|
+
s.setCurrentScope(x), s.addDeclarationsToScope(h, p, x), a && (x.data[a] = f), x.data.arguments = arguments, c.forEach((R, C) => {
|
|
3720
|
+
x.data[R()] = m[C];
|
|
3721
3721
|
});
|
|
3722
3722
|
const E = s.getCurrentContext();
|
|
3723
3723
|
s.setCurrentContext(this);
|
|
3724
3724
|
const A = l();
|
|
3725
|
-
if (s.setCurrentContext(E), s.setCurrentScope(
|
|
3725
|
+
if (s.setCurrentContext(E), s.setCurrentScope(g), s.callStack.pop(), A instanceof J)
|
|
3726
3726
|
return A.value;
|
|
3727
3727
|
};
|
|
3728
3728
|
return Xt(f, a), Object.defineProperty(f, "length", {
|
|
@@ -3891,7 +3891,7 @@ class j {
|
|
|
3891
3891
|
let i = N;
|
|
3892
3892
|
for (let r = 0; r < s.length; r++) {
|
|
3893
3893
|
const n = s[r], a = this.setValue(n());
|
|
3894
|
-
if (a !== N && (i = a, i instanceof J || i instanceof oe || i instanceof ie || i ===
|
|
3894
|
+
if (a !== N && (i = a, i instanceof J || i instanceof oe || i instanceof ie || i === fe || i === de))
|
|
3895
3895
|
break;
|
|
3896
3896
|
}
|
|
3897
3897
|
return i;
|
|
@@ -3930,8 +3930,8 @@ class j {
|
|
|
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 === N || h ===
|
|
3934
|
-
if (h ===
|
|
3933
|
+
if (!(h === N || h === de)) {
|
|
3934
|
+
if (h === fe)
|
|
3935
3935
|
break;
|
|
3936
3936
|
if (c = h, c instanceof ie && c.value === u) {
|
|
3937
3937
|
c = N;
|
|
@@ -3969,8 +3969,8 @@ class j {
|
|
|
3969
3969
|
}
|
|
3970
3970
|
})();
|
|
3971
3971
|
const h = this.setValue(r());
|
|
3972
|
-
if (!(h === N || h ===
|
|
3973
|
-
if (h ===
|
|
3972
|
+
if (!(h === N || h === de)) {
|
|
3973
|
+
if (h === fe)
|
|
3974
3974
|
break;
|
|
3975
3975
|
if (u = h, u instanceof ie && u.value === a) {
|
|
3976
3976
|
u = N;
|
|
@@ -3986,7 +3986,7 @@ class j {
|
|
|
3986
3986
|
withStatementHandler(e) {
|
|
3987
3987
|
const s = this.createClosure(e.object), i = this.createClosure(e.body);
|
|
3988
3988
|
return () => {
|
|
3989
|
-
const r = s(), n = this.getCurrentScope(), a = new
|
|
3989
|
+
const r = s(), n = this.getCurrentScope(), a = new me(r, n, Zt);
|
|
3990
3990
|
this.setCurrentScope(a);
|
|
3991
3991
|
const u = this.setValue(i());
|
|
3992
3992
|
return this.setCurrentScope(n), u;
|
|
@@ -4044,10 +4044,10 @@ class j {
|
|
|
4044
4044
|
};
|
|
4045
4045
|
}
|
|
4046
4046
|
continueStatementHandler(e) {
|
|
4047
|
-
return () => e.label ? new ie(e.label.name) :
|
|
4047
|
+
return () => e.label ? new ie(e.label.name) : de;
|
|
4048
4048
|
}
|
|
4049
4049
|
breakStatementHandler(e) {
|
|
4050
|
-
return () => e.label ? new oe(e.label.name) :
|
|
4050
|
+
return () => e.label ? new oe(e.label.name) : fe;
|
|
4051
4051
|
}
|
|
4052
4052
|
switchStatementHandler(e) {
|
|
4053
4053
|
const s = this.createClosure(e.discriminant), i = e.cases.map((r) => this.switchCaseHandler(r));
|
|
@@ -4060,7 +4060,7 @@ class j {
|
|
|
4060
4060
|
if (!l && f === Yt && (l = !0, c = p), n || f === r) {
|
|
4061
4061
|
if (n = !0, u = this.setValue(d.bodyClosure()), u === N)
|
|
4062
4062
|
continue;
|
|
4063
|
-
if (u ===
|
|
4063
|
+
if (u === fe || (a = u, a instanceof J || a instanceof oe || a instanceof ie || a === de))
|
|
4064
4064
|
break;
|
|
4065
4065
|
}
|
|
4066
4066
|
}
|
|
@@ -4167,7 +4167,7 @@ class j {
|
|
|
4167
4167
|
}
|
|
4168
4168
|
setValue(e) {
|
|
4169
4169
|
const s = this.callStack.length;
|
|
4170
|
-
return this.isVarDeclMode || s || e === N || e ===
|
|
4170
|
+
return this.isVarDeclMode || s || e === N || e === fe || e === de || e instanceof oe || e instanceof ie || (this.value = e instanceof J ? e.value : e), e;
|
|
4171
4171
|
}
|
|
4172
4172
|
getValue() {
|
|
4173
4173
|
return this.value;
|
|
@@ -4526,25 +4526,36 @@ function Sr(t, e = globalThis) {
|
|
|
4526
4526
|
}
|
|
4527
4527
|
function Cr(t, e) {
|
|
4528
4528
|
if (!e.mock) return;
|
|
4529
|
-
const { url: s, mockTemplate: i, method: r = "get" } = e;
|
|
4529
|
+
const { url: s, mockTemplate: i, method: r = "get", settings: n = {} } = e;
|
|
4530
4530
|
if (s && i)
|
|
4531
4531
|
try {
|
|
4532
|
-
const
|
|
4532
|
+
const a = ct(s) ? new URL(s).pathname : s, u = ni(`(.*)${a}(.*)`), c = ai(a, { decode: decodeURIComponent }), l = Ne(i, {}, !0);
|
|
4533
4533
|
t.mock(
|
|
4534
|
-
|
|
4534
|
+
u,
|
|
4535
4535
|
r.toLowerCase(),
|
|
4536
|
-
(
|
|
4537
|
-
const
|
|
4538
|
-
|
|
4536
|
+
(h) => {
|
|
4537
|
+
const p = le.parse(h.url) || {}, d = n.type || "form";
|
|
4538
|
+
let f = h.body instanceof FormData ? oi(h.body) : h.body;
|
|
4539
|
+
if (typeof f == "string")
|
|
4540
|
+
if (d === "json")
|
|
4541
|
+
try {
|
|
4542
|
+
f = JSON.parse(f);
|
|
4543
|
+
} catch (x) {
|
|
4544
|
+
console.warn("[Mock.mock]", x);
|
|
4545
|
+
}
|
|
4546
|
+
else
|
|
4547
|
+
f = le.parse(f);
|
|
4548
|
+
const m = ct(h.url) ? new URL(h.url).pathname : h.url.split("?")[0], g = c(m)?.params;
|
|
4549
|
+
Object.assign(h, { data: f, params: g, query: p });
|
|
4539
4550
|
try {
|
|
4540
|
-
return t.mock(
|
|
4541
|
-
} catch (
|
|
4542
|
-
return console.warn("[mockApi]",
|
|
4551
|
+
return t.mock(l(h));
|
|
4552
|
+
} catch (x) {
|
|
4553
|
+
return console.warn("[mockApi]", u, h, x), null;
|
|
4543
4554
|
}
|
|
4544
4555
|
}
|
|
4545
4556
|
);
|
|
4546
|
-
} catch (
|
|
4547
|
-
console.warn("mockApi",
|
|
4557
|
+
} catch (a) {
|
|
4558
|
+
console.warn("mockApi", a);
|
|
4548
4559
|
}
|
|
4549
4560
|
}
|
|
4550
4561
|
function Us(t = globalThis) {
|
|
@@ -4702,7 +4713,7 @@ function vt(t) {
|
|
|
4702
4713
|
c.value.state ?? {},
|
|
4703
4714
|
h
|
|
4704
4715
|
);
|
|
4705
|
-
const m = f ? Vr(e, c.value.refs ?? {}, h) : {},
|
|
4716
|
+
const m = f ? Vr(e, c.value.refs ?? {}, h) : {}, g = f ? Or(e, c.value.reactives ?? {}, h) : {}, x = Ar(e, c.value.computed ?? {}, h), E = Pr(c.value.methods ?? {}, h), A = Tr(e, c.value.inject, h), R = Nr(
|
|
4706
4717
|
c.value.dataSources || {},
|
|
4707
4718
|
h
|
|
4708
4719
|
);
|
|
@@ -4714,9 +4725,9 @@ function vt(t) {
|
|
|
4714
4725
|
const U = {
|
|
4715
4726
|
...d,
|
|
4716
4727
|
...m,
|
|
4717
|
-
...
|
|
4728
|
+
...g,
|
|
4718
4729
|
...A,
|
|
4719
|
-
...
|
|
4730
|
+
...x,
|
|
4720
4731
|
...E,
|
|
4721
4732
|
...R,
|
|
4722
4733
|
...C
|
|
@@ -4728,10 +4739,10 @@ function vt(t) {
|
|
|
4728
4739
|
h,
|
|
4729
4740
|
s
|
|
4730
4741
|
), c.value.setup) {
|
|
4731
|
-
const
|
|
4732
|
-
if (z(
|
|
4742
|
+
const pe = h.__parseFunction(c.value.setup);
|
|
4743
|
+
if (z(pe))
|
|
4733
4744
|
try {
|
|
4734
|
-
await
|
|
4745
|
+
await pe();
|
|
4735
4746
|
} catch (ye) {
|
|
4736
4747
|
console.warn("[VTJ] Composition setup 执行失败", ye);
|
|
4737
4748
|
}
|
|
@@ -4744,8 +4755,8 @@ function vt(t) {
|
|
|
4744
4755
|
$state: h.$state,
|
|
4745
4756
|
...d,
|
|
4746
4757
|
...m,
|
|
4758
|
+
...g,
|
|
4747
4759
|
...x,
|
|
4748
|
-
...v,
|
|
4749
4760
|
...E
|
|
4750
4761
|
};
|
|
4751
4762
|
},
|
|
@@ -5072,18 +5083,18 @@ function On() {
|
|
|
5072
5083
|
}
|
|
5073
5084
|
function be(t, e, s = xe, i = Br, r = [], n = !1, a = 0) {
|
|
5074
5085
|
if (!t || !t.name || t.invisible) return null;
|
|
5075
|
-
const u = s.getCurrentInstance()?.appContext, { id: c = null, directives: l = [] } = t, { vIf: h, vElseIf: p, vElse: d, vFor: f, vShow: m, vModels:
|
|
5086
|
+
const u = s.getCurrentInstance()?.appContext, { id: c = null, directives: l = [] } = t, { vIf: h, vElseIf: p, vElse: d, vFor: f, vShow: m, vModels: g, vBind: x, vHtml: E, others: A } = Ws(l);
|
|
5076
5087
|
if (!n && (p || d))
|
|
5077
5088
|
return null;
|
|
5078
5089
|
if (h && !$r(h, e))
|
|
5079
5090
|
return Kr(t, e, s, i, r);
|
|
5080
5091
|
const R = (C, U = 0) => {
|
|
5081
|
-
const
|
|
5092
|
+
const pe = C.$components, ye = (() => {
|
|
5082
5093
|
if (t.name === "component")
|
|
5083
5094
|
return Ur(C, t.props?.is);
|
|
5084
5095
|
if (t.name === "slot") return t.name;
|
|
5085
5096
|
const G = i(`${t.id}_${U}`, t.name, t.from, s);
|
|
5086
|
-
return Z(G) ? Ai(G) || Pi(G) ? G :
|
|
5097
|
+
return Z(G) ? Ai(G) || Pi(G) ? G : pe[G] ?? u?.app?.component(G) ?? G : G;
|
|
5087
5098
|
})(), se = Gr(c, t.props ?? {}, C), Xs = zr(
|
|
5088
5099
|
s,
|
|
5089
5100
|
t.id,
|
|
@@ -5092,10 +5103,10 @@ function be(t, e, s = xe, i = Br, r = [], n = !1, a = 0) {
|
|
|
5092
5103
|
);
|
|
5093
5104
|
if (t.name === "slot")
|
|
5094
5105
|
return Jr(s, t, se, C, i);
|
|
5095
|
-
|
|
5106
|
+
x && Object.assign(se, C.__parseExpression(x.value)), m && (se.style = Object.assign(
|
|
5096
5107
|
se.style ?? {},
|
|
5097
5108
|
Xr(m, C)
|
|
5098
|
-
)), E && Object.assign(se, Yr(E, C)),
|
|
5109
|
+
)), E && Object.assign(se, Yr(E, C)), g.forEach((G) => {
|
|
5099
5110
|
us.includes(t.name) ? Object.assign(se, Zr(G, C)) : Object.assign(se, en(s, G, C));
|
|
5100
5111
|
});
|
|
5101
5112
|
const Ys = tn(
|
|
@@ -5292,14 +5303,14 @@ function tn(t, e, s, i, r) {
|
|
|
5292
5303
|
(u, [c, { nodes: l, params: h, scope: p }]) => (u[c] = (d) => {
|
|
5293
5304
|
const f = h.length ? li(d ?? {}, h) : a(d, p);
|
|
5294
5305
|
return l.map(
|
|
5295
|
-
(m,
|
|
5306
|
+
(m, g) => be(
|
|
5296
5307
|
m,
|
|
5297
5308
|
s.__clone(f),
|
|
5298
5309
|
t,
|
|
5299
5310
|
i,
|
|
5300
5311
|
l,
|
|
5301
5312
|
!1,
|
|
5302
|
-
|
|
5313
|
+
g
|
|
5303
5314
|
)
|
|
5304
5315
|
);
|
|
5305
5316
|
}, u),
|
|
@@ -5408,20 +5419,20 @@ function Fn(t) {
|
|
|
5408
5419
|
u.value = !f?.mask, c.value = m?.pure ?? !!f?.pure;
|
|
5409
5420
|
};
|
|
5410
5421
|
fi(() => {
|
|
5411
|
-
const { name: f, params: m, meta:
|
|
5422
|
+
const { name: f, params: m, meta: g } = n;
|
|
5412
5423
|
if (f === we) {
|
|
5413
|
-
const
|
|
5414
|
-
h(
|
|
5424
|
+
const x = r.getPage(m.id);
|
|
5425
|
+
h(x, g);
|
|
5415
5426
|
} else if (f === De) {
|
|
5416
|
-
const
|
|
5417
|
-
h(
|
|
5427
|
+
const x = r.getHomepage();
|
|
5428
|
+
h(x, g);
|
|
5418
5429
|
} else {
|
|
5419
|
-
const
|
|
5420
|
-
if (
|
|
5421
|
-
const E = r.getPage(
|
|
5422
|
-
h(E,
|
|
5430
|
+
const x = g.__vtj__;
|
|
5431
|
+
if (x) {
|
|
5432
|
+
const E = r.getPage(x);
|
|
5433
|
+
h(E, g);
|
|
5423
5434
|
} else
|
|
5424
|
-
u.value = !
|
|
5435
|
+
u.value = !g.mask, c.value = !!g.pure;
|
|
5425
5436
|
}
|
|
5426
5437
|
});
|
|
5427
5438
|
const p = Ue(
|
|
@@ -5463,9 +5474,9 @@ function _t(t) {
|
|
|
5463
5474
|
homepage: u
|
|
5464
5475
|
} = t, c = [];
|
|
5465
5476
|
for (const l of i) {
|
|
5466
|
-
const { id: h, title: p, dir: d, layout: f, children: m, meta:
|
|
5477
|
+
const { id: h, title: p, dir: d, layout: f, children: m, meta: g } = l;
|
|
5467
5478
|
if (d) {
|
|
5468
|
-
const
|
|
5479
|
+
const x = _t({
|
|
5469
5480
|
name: e,
|
|
5470
5481
|
prefix: s,
|
|
5471
5482
|
component: r,
|
|
@@ -5474,9 +5485,9 @@ function _t(t) {
|
|
|
5474
5485
|
loader: n,
|
|
5475
5486
|
pages: m || []
|
|
5476
5487
|
});
|
|
5477
|
-
c.push(...
|
|
5488
|
+
c.push(...x);
|
|
5478
5489
|
} else if (f) {
|
|
5479
|
-
const
|
|
5490
|
+
const x = _t({
|
|
5480
5491
|
name: e,
|
|
5481
5492
|
prefix: s,
|
|
5482
5493
|
component: r,
|
|
@@ -5491,15 +5502,15 @@ function _t(t) {
|
|
|
5491
5502
|
meta: {
|
|
5492
5503
|
title: p,
|
|
5493
5504
|
...a,
|
|
5494
|
-
...
|
|
5505
|
+
...g,
|
|
5495
5506
|
__vtj__: h
|
|
5496
5507
|
},
|
|
5497
|
-
children:
|
|
5508
|
+
children: x
|
|
5498
5509
|
};
|
|
5499
5510
|
c.push(E), c.push(ut(l, t));
|
|
5500
5511
|
} else if (c.push(ut(l, t)), u === h) {
|
|
5501
|
-
const
|
|
5502
|
-
|
|
5512
|
+
const x = ut(l, t);
|
|
5513
|
+
x.path = "", x.name = `home_${h}`, c.push(x);
|
|
5503
5514
|
}
|
|
5504
5515
|
}
|
|
5505
5516
|
return c;
|
|
@@ -5703,36 +5714,36 @@ class mn extends ti {
|
|
|
5703
5714
|
/* Development */
|
|
5704
5715
|
);
|
|
5705
5716
|
Object.assign(this.libraryLocaleMap, m);
|
|
5706
|
-
for (const
|
|
5707
|
-
const
|
|
5717
|
+
for (const g of l) {
|
|
5718
|
+
const x = i[g], E = e[g];
|
|
5708
5719
|
if (E)
|
|
5709
|
-
r[
|
|
5710
|
-
else if (
|
|
5711
|
-
e[
|
|
5720
|
+
r[g] = E;
|
|
5721
|
+
else if (x)
|
|
5722
|
+
e[g] = r[g] = await x();
|
|
5712
5723
|
else {
|
|
5713
|
-
const R = h[
|
|
5724
|
+
const R = h[g] || [];
|
|
5714
5725
|
for (const C of R)
|
|
5715
|
-
Ge(C) && await ki(C,
|
|
5716
|
-
r[
|
|
5726
|
+
Ge(C) && await ki(C, le.append(C, { v: Ce })), qe(C) && await qt(le.append(C, { v: Ce }));
|
|
5727
|
+
r[g] = e[g];
|
|
5717
5728
|
}
|
|
5718
|
-
const A = m[
|
|
5729
|
+
const A = m[g];
|
|
5719
5730
|
if (A) {
|
|
5720
5731
|
const R = i[A];
|
|
5721
5732
|
c[A] = R ? await R() : e[A];
|
|
5722
5733
|
}
|
|
5723
5734
|
}
|
|
5724
5735
|
if (u === "development") {
|
|
5725
|
-
for (const
|
|
5726
|
-
await qt(
|
|
5727
|
-
const
|
|
5728
|
-
for (const
|
|
5729
|
-
const E = e[f[
|
|
5736
|
+
for (const x of p)
|
|
5737
|
+
await qt(le.append(x, { v: Ce }));
|
|
5738
|
+
const g = this.materials || {};
|
|
5739
|
+
for (const x of d) {
|
|
5740
|
+
const E = e[f[x]], A = E?.default || E, R = si[x];
|
|
5730
5741
|
if (R)
|
|
5731
5742
|
A && R.forEach((C) => {
|
|
5732
5743
|
n[C] = A[C];
|
|
5733
5744
|
});
|
|
5734
5745
|
else {
|
|
5735
|
-
const C = x
|
|
5746
|
+
const C = g[x] ? (await g[x]()).default : e[x];
|
|
5736
5747
|
C && A && (C.components || []).forEach((U) => {
|
|
5737
5748
|
n[U.name] = yi(U, A);
|
|
5738
5749
|
});
|
|
@@ -5766,8 +5777,8 @@ class mn extends ti {
|
|
|
5766
5777
|
component: ot,
|
|
5767
5778
|
loader: this.getRenderComponent.bind(this),
|
|
5768
5779
|
homepage: p?.id
|
|
5769
|
-
}).forEach((
|
|
5770
|
-
a ? e.addRoute(a,
|
|
5780
|
+
}).forEach((g) => {
|
|
5781
|
+
a ? e.addRoute(a, g) : e.addRoute(g);
|
|
5771
5782
|
}), p || (a ? e.addRoute(a, d) : e.addRoute(d));
|
|
5772
5783
|
} else
|
|
5773
5784
|
a ? (e.addRoute(a, h), e.addRoute(a, d)) : (e.addRoute(h), e.addRoute(d));
|
|
@@ -6032,7 +6043,7 @@ const Qs = {
|
|
|
6032
6043
|
type: "json",
|
|
6033
6044
|
validSuccess: !0,
|
|
6034
6045
|
originResponse: !1,
|
|
6035
|
-
failMessage: !
|
|
6046
|
+
failMessage: !0,
|
|
6036
6047
|
validate: (t) => t.data?.code === 0
|
|
6037
6048
|
}, gn = (t, e = "/__vtj__/api/:type.json") => (s, i, r) => t.send({
|
|
6038
6049
|
url: e,
|