@rexeus/typeweaver 0.2.1 → 0.3.0
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/README.md +30 -10
- package/dist/{acorn-CJ4HNU11.js → acorn-TNAGPKCR.js} +1076 -998
- package/dist/angular-3KXBV3WD.js +3030 -0
- package/dist/babel-V7SGJWS6.js +7296 -0
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/chunk-Q6MQC6UP.js +34641 -0
- package/dist/cli.cjs +116222 -0
- package/dist/cli.d.cts +2 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +2 -0
- package/dist/entry.cjs +116942 -0
- package/dist/entry.d.cts +2 -0
- package/dist/entry.d.ts +2 -0
- package/dist/entry.js +30 -0
- package/dist/estree-QSPT5I7I.js +4612 -0
- package/dist/flow-WHVBWPDR.js +27546 -0
- package/dist/{glimmer-DiXjs4DB.js → glimmer-BHRIPYOK.js} +1317 -1051
- package/dist/{graphql-DLJHmbDb.js → graphql-7EJJJFHU.js} +343 -307
- package/dist/html-YM5TKPVB.js +2926 -0
- package/dist/index.cjs +116228 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -16
- package/dist/markdown-FIK6SNTF.js +3551 -0
- package/dist/meriyah-FBUICA5T.js +2684 -0
- package/dist/{postcss-DUOVol6C.js → postcss-ODV7XV5T.js} +1779 -1641
- package/dist/tsx-loader-H3LYLQCE.js +2 -0
- package/dist/typescript-BG63TNYD.js +13203 -0
- package/dist/{yaml-Bd8DkW_K.js → yaml-DV3ZI4ZT.js} +1140 -1058
- package/package.json +33 -33
- package/dist/angular-wXs0C_R2.js +0 -2626
- package/dist/babel-DNmSIBHM.js +0 -7201
- package/dist/cli-D5DHO8r6.js +0 -20691
- package/dist/estree-BfVT8G2n.js +0 -4301
- package/dist/flow-DgzFy9Js.js +0 -27138
- package/dist/html-BwjSBi_v.js +0 -2677
- package/dist/markdown-DWIPYE8e.js +0 -3363
- package/dist/meriyah-CbAY3E55.js +0 -2603
- package/dist/run-cli-with-tsx.js +0 -18
- package/dist/typescript-DDNbhgng.js +0 -12972
|
@@ -1,31 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var Ii = Object.
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import "./chunk-MLKGABMK.js";
|
|
2
|
+
|
|
3
|
+
// ../../node_modules/.pnpm/prettier@3.7.4/node_modules/prettier/plugins/acorn.mjs
|
|
4
|
+
var Ii = Object.create;
|
|
5
|
+
var Be = Object.defineProperty;
|
|
6
|
+
var Ni = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var Li = Object.getOwnPropertyNames;
|
|
8
|
+
var Ri = Object.getPrototypeOf;
|
|
9
|
+
var Vi = Object.prototype.hasOwnProperty;
|
|
10
|
+
var ot = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
|
|
11
|
+
var Oi = (e, t) => {
|
|
12
|
+
for (var i in t) Be(e, i, { get: t[i], enumerable: true });
|
|
13
|
+
};
|
|
14
|
+
var Bi = (e, t, i, s) => {
|
|
15
|
+
if (t && typeof t == "object" || typeof t == "function") for (let r of Li(t)) !Vi.call(e, r) && r !== i && Be(e, r, { get: () => t[r], enumerable: !(s = Ni(t, r)) || s.enumerable });
|
|
10
16
|
return e;
|
|
11
17
|
};
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
|
|
18
|
+
var ut = (e, t, i) => (i = e != null ? Ii(Ri(e)) : {}, Bi(t || !e || !e.__esModule ? Be(i, "default", { value: e, enumerable: true }) : i, e));
|
|
19
|
+
var Qt = ot((xr, zt) => {
|
|
20
|
+
zt.exports = {};
|
|
15
21
|
});
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
var $e = ot((yr, Ye) => {
|
|
23
|
+
"use strict";
|
|
24
|
+
var _s = Qt(), Cs = /^[\da-fA-F]+$/, Ts = /^\d+$/, Yt = /* @__PURE__ */ new WeakMap();
|
|
25
|
+
function $t(e) {
|
|
19
26
|
e = e.Parser.acorn || e;
|
|
20
|
-
let t =
|
|
27
|
+
let t = Yt.get(e);
|
|
21
28
|
if (!t) {
|
|
22
|
-
let i = e.tokTypes, s = e.TokContext, r = e.TokenType,
|
|
23
|
-
|
|
24
|
-
this.context.push(p), this.context.push(
|
|
25
|
-
},
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
}, t = { tokContexts:
|
|
29
|
+
let i = e.tokTypes, s = e.TokContext, r = e.TokenType, o = new s("<tag", false), u = new s("</tag", false), p = new s("<tag>...</tag>", true, true), h = { tc_oTag: o, tc_cTag: u, tc_expr: p }, l = { jsxName: new r("jsxName"), jsxText: new r("jsxText", { beforeExpr: true }), jsxTagStart: new r("jsxTagStart", { startsExpr: true }), jsxTagEnd: new r("jsxTagEnd") };
|
|
30
|
+
l.jsxTagStart.updateContext = function() {
|
|
31
|
+
this.context.push(p), this.context.push(o), this.exprAllowed = false;
|
|
32
|
+
}, l.jsxTagEnd.updateContext = function(m) {
|
|
33
|
+
let S = this.context.pop();
|
|
34
|
+
S === o && m === i.slash || S === u ? (this.context.pop(), this.exprAllowed = this.curContext() === p) : this.exprAllowed = true;
|
|
35
|
+
}, t = { tokContexts: h, tokTypes: l }, Yt.set(e, t);
|
|
29
36
|
}
|
|
30
37
|
return t;
|
|
31
38
|
}
|
|
@@ -35,101 +42,101 @@ var Xe = nt((dr, We) => {
|
|
|
35
42
|
if (e.type === "JSXNamespacedName") return e.namespace.name + ":" + e.name.name;
|
|
36
43
|
if (e.type === "JSXMemberExpression") return pe(e.object) + "." + pe(e.property);
|
|
37
44
|
}
|
|
38
|
-
|
|
45
|
+
Ye.exports = function(e) {
|
|
39
46
|
return e = e || {}, function(t) {
|
|
40
|
-
return
|
|
47
|
+
return Es({ allowNamespaces: e.allowNamespaces !== false, allowNamespacedObjects: !!e.allowNamespacedObjects }, t);
|
|
41
48
|
};
|
|
42
49
|
};
|
|
43
|
-
Object.defineProperty(
|
|
44
|
-
return
|
|
50
|
+
Object.defineProperty(Ye.exports, "tokTypes", { get: function() {
|
|
51
|
+
return $t(void 0).tokTypes;
|
|
45
52
|
}, configurable: true, enumerable: true });
|
|
46
|
-
function
|
|
47
|
-
let i = t.acorn || void 0, s =
|
|
53
|
+
function Es(e, t) {
|
|
54
|
+
let i = t.acorn || void 0, s = $t(i), r = i.tokTypes, o = s.tokTypes, u = i.tokContexts, p = s.tokContexts.tc_oTag, h = s.tokContexts.tc_cTag, l = s.tokContexts.tc_expr, m = i.isNewLine, S = i.isIdentifierStart, E = i.isIdentifierChar;
|
|
48
55
|
return class extends t {
|
|
49
56
|
static get acornJsx() {
|
|
50
57
|
return s;
|
|
51
58
|
}
|
|
52
59
|
jsx_readToken() {
|
|
53
|
-
let
|
|
60
|
+
let c = "", x = this.pos;
|
|
54
61
|
for (; ; ) {
|
|
55
62
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated JSX contents");
|
|
56
|
-
let
|
|
57
|
-
switch (
|
|
63
|
+
let y = this.input.charCodeAt(this.pos);
|
|
64
|
+
switch (y) {
|
|
58
65
|
case 60:
|
|
59
66
|
case 123:
|
|
60
|
-
return this.pos === this.start ?
|
|
67
|
+
return this.pos === this.start ? y === 60 && this.exprAllowed ? (++this.pos, this.finishToken(o.jsxTagStart)) : this.getTokenFromCode(y) : (c += this.input.slice(x, this.pos), this.finishToken(o.jsxText, c));
|
|
61
68
|
case 38:
|
|
62
|
-
|
|
69
|
+
c += this.input.slice(x, this.pos), c += this.jsx_readEntity(), x = this.pos;
|
|
63
70
|
break;
|
|
64
71
|
case 62:
|
|
65
72
|
case 125:
|
|
66
|
-
this.raise(this.pos, "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + (
|
|
73
|
+
this.raise(this.pos, "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + (y === 62 ? ">" : "}") + '` or `{"' + this.input[this.pos] + '"}`?');
|
|
67
74
|
default:
|
|
68
|
-
|
|
75
|
+
m(y) ? (c += this.input.slice(x, this.pos), c += this.jsx_readNewLine(true), x = this.pos) : ++this.pos;
|
|
69
76
|
}
|
|
70
77
|
}
|
|
71
78
|
}
|
|
72
|
-
jsx_readNewLine(
|
|
73
|
-
let
|
|
74
|
-
return ++this.pos,
|
|
79
|
+
jsx_readNewLine(c) {
|
|
80
|
+
let x = this.input.charCodeAt(this.pos), y;
|
|
81
|
+
return ++this.pos, x === 13 && this.input.charCodeAt(this.pos) === 10 ? (++this.pos, y = c ? `
|
|
75
82
|
` : `\r
|
|
76
|
-
`) :
|
|
83
|
+
`) : y = String.fromCharCode(x), this.options.locations && (++this.curLine, this.lineStart = this.pos), y;
|
|
77
84
|
}
|
|
78
|
-
jsx_readString(
|
|
79
|
-
let
|
|
85
|
+
jsx_readString(c) {
|
|
86
|
+
let x = "", y = ++this.pos;
|
|
80
87
|
for (; ; ) {
|
|
81
88
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
82
|
-
let
|
|
83
|
-
if (
|
|
84
|
-
|
|
89
|
+
let v = this.input.charCodeAt(this.pos);
|
|
90
|
+
if (v === c) break;
|
|
91
|
+
v === 38 ? (x += this.input.slice(y, this.pos), x += this.jsx_readEntity(), y = this.pos) : m(v) ? (x += this.input.slice(y, this.pos), x += this.jsx_readNewLine(false), y = this.pos) : ++this.pos;
|
|
85
92
|
}
|
|
86
|
-
return
|
|
93
|
+
return x += this.input.slice(y, this.pos++), this.finishToken(r.string, x);
|
|
87
94
|
}
|
|
88
95
|
jsx_readEntity() {
|
|
89
|
-
let
|
|
90
|
-
|
|
91
|
-
let
|
|
92
|
-
for (; this.pos < this.input.length &&
|
|
93
|
-
if (
|
|
94
|
-
|
|
96
|
+
let c = "", x = 0, y, v = this.input[this.pos];
|
|
97
|
+
v !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
|
|
98
|
+
let I = ++this.pos;
|
|
99
|
+
for (; this.pos < this.input.length && x++ < 10; ) {
|
|
100
|
+
if (v = this.input[this.pos++], v === ";") {
|
|
101
|
+
c[0] === "#" ? c[1] === "x" ? (c = c.substr(2), Cs.test(c) && (y = String.fromCharCode(parseInt(c, 16)))) : (c = c.substr(1), Ts.test(c) && (y = String.fromCharCode(parseInt(c, 10)))) : y = _s[c];
|
|
95
102
|
break;
|
|
96
103
|
}
|
|
97
|
-
|
|
104
|
+
c += v;
|
|
98
105
|
}
|
|
99
|
-
return
|
|
106
|
+
return y || (this.pos = I, "&");
|
|
100
107
|
}
|
|
101
108
|
jsx_readWord() {
|
|
102
|
-
let
|
|
109
|
+
let c, x = this.pos;
|
|
103
110
|
do
|
|
104
|
-
|
|
105
|
-
while (
|
|
106
|
-
return this.finishToken(
|
|
111
|
+
c = this.input.charCodeAt(++this.pos);
|
|
112
|
+
while (E(c) || c === 45);
|
|
113
|
+
return this.finishToken(o.jsxName, this.input.slice(x, this.pos));
|
|
107
114
|
}
|
|
108
115
|
jsx_parseIdentifier() {
|
|
109
|
-
let
|
|
110
|
-
return this.type ===
|
|
116
|
+
let c = this.startNode();
|
|
117
|
+
return this.type === o.jsxName ? c.name = this.value : this.type.keyword ? c.name = this.type.keyword : this.unexpected(), this.next(), this.finishNode(c, "JSXIdentifier");
|
|
111
118
|
}
|
|
112
119
|
jsx_parseNamespacedName() {
|
|
113
|
-
let
|
|
114
|
-
if (!e.allowNamespaces || !this.eat(r.colon)) return
|
|
115
|
-
var
|
|
116
|
-
return
|
|
120
|
+
let c = this.start, x = this.startLoc, y = this.jsx_parseIdentifier();
|
|
121
|
+
if (!e.allowNamespaces || !this.eat(r.colon)) return y;
|
|
122
|
+
var v = this.startNodeAt(c, x);
|
|
123
|
+
return v.namespace = y, v.name = this.jsx_parseIdentifier(), this.finishNode(v, "JSXNamespacedName");
|
|
117
124
|
}
|
|
118
125
|
jsx_parseElementName() {
|
|
119
|
-
if (this.type ===
|
|
120
|
-
let
|
|
121
|
-
for (this.type === r.dot &&
|
|
122
|
-
let
|
|
123
|
-
|
|
126
|
+
if (this.type === o.jsxTagEnd) return "";
|
|
127
|
+
let c = this.start, x = this.startLoc, y = this.jsx_parseNamespacedName();
|
|
128
|
+
for (this.type === r.dot && y.type === "JSXNamespacedName" && !e.allowNamespacedObjects && this.unexpected(); this.eat(r.dot); ) {
|
|
129
|
+
let v = this.startNodeAt(c, x);
|
|
130
|
+
v.object = y, v.property = this.jsx_parseIdentifier(), y = this.finishNode(v, "JSXMemberExpression");
|
|
124
131
|
}
|
|
125
|
-
return
|
|
132
|
+
return y;
|
|
126
133
|
}
|
|
127
134
|
jsx_parseAttributeValue() {
|
|
128
135
|
switch (this.type) {
|
|
129
136
|
case r.braceL:
|
|
130
|
-
let
|
|
131
|
-
return
|
|
132
|
-
case
|
|
137
|
+
let c = this.jsx_parseExpressionContainer();
|
|
138
|
+
return c.expression.type === "JSXEmptyExpression" && this.raise(c.start, "JSX attributes must only be assigned a non-empty expression"), c;
|
|
139
|
+
case o.jsxTagStart:
|
|
133
140
|
case r.string:
|
|
134
141
|
return this.parseExprAtom();
|
|
135
142
|
default:
|
|
@@ -137,115 +144,128 @@ var Xe = nt((dr, We) => {
|
|
|
137
144
|
}
|
|
138
145
|
}
|
|
139
146
|
jsx_parseEmptyExpression() {
|
|
140
|
-
let
|
|
141
|
-
return this.finishNodeAt(
|
|
147
|
+
let c = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc);
|
|
148
|
+
return this.finishNodeAt(c, "JSXEmptyExpression", this.start, this.startLoc);
|
|
142
149
|
}
|
|
143
150
|
jsx_parseExpressionContainer() {
|
|
144
|
-
let
|
|
145
|
-
return this.next(),
|
|
151
|
+
let c = this.startNode();
|
|
152
|
+
return this.next(), c.expression = this.type === r.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression(), this.expect(r.braceR), this.finishNode(c, "JSXExpressionContainer");
|
|
146
153
|
}
|
|
147
154
|
jsx_parseAttribute() {
|
|
148
|
-
let
|
|
149
|
-
return this.eat(r.braceL) ? (this.expect(r.ellipsis),
|
|
155
|
+
let c = this.startNode();
|
|
156
|
+
return this.eat(r.braceL) ? (this.expect(r.ellipsis), c.argument = this.parseMaybeAssign(), this.expect(r.braceR), this.finishNode(c, "JSXSpreadAttribute")) : (c.name = this.jsx_parseNamespacedName(), c.value = this.eat(r.eq) ? this.jsx_parseAttributeValue() : null, this.finishNode(c, "JSXAttribute"));
|
|
150
157
|
}
|
|
151
|
-
jsx_parseOpeningElementAt(
|
|
152
|
-
let
|
|
153
|
-
|
|
154
|
-
let
|
|
155
|
-
for (
|
|
156
|
-
return
|
|
158
|
+
jsx_parseOpeningElementAt(c, x) {
|
|
159
|
+
let y = this.startNodeAt(c, x);
|
|
160
|
+
y.attributes = [];
|
|
161
|
+
let v = this.jsx_parseElementName();
|
|
162
|
+
for (v && (y.name = v); this.type !== r.slash && this.type !== o.jsxTagEnd; ) y.attributes.push(this.jsx_parseAttribute());
|
|
163
|
+
return y.selfClosing = this.eat(r.slash), this.expect(o.jsxTagEnd), this.finishNode(y, v ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
157
164
|
}
|
|
158
|
-
jsx_parseClosingElementAt(
|
|
159
|
-
let
|
|
160
|
-
return
|
|
165
|
+
jsx_parseClosingElementAt(c, x) {
|
|
166
|
+
let y = this.startNodeAt(c, x), v = this.jsx_parseElementName();
|
|
167
|
+
return v && (y.name = v), this.expect(o.jsxTagEnd), this.finishNode(y, v ? "JSXClosingElement" : "JSXClosingFragment");
|
|
161
168
|
}
|
|
162
|
-
jsx_parseElementAt(
|
|
163
|
-
let
|
|
164
|
-
if (!
|
|
169
|
+
jsx_parseElementAt(c, x) {
|
|
170
|
+
let y = this.startNodeAt(c, x), v = [], I = this.jsx_parseOpeningElementAt(c, x), de = null;
|
|
171
|
+
if (!I.selfClosing) {
|
|
165
172
|
e: for (; ; ) switch (this.type) {
|
|
166
|
-
case
|
|
167
|
-
if (
|
|
168
|
-
|
|
173
|
+
case o.jsxTagStart:
|
|
174
|
+
if (c = this.start, x = this.startLoc, this.next(), this.eat(r.slash)) {
|
|
175
|
+
de = this.jsx_parseClosingElementAt(c, x);
|
|
169
176
|
break e;
|
|
170
177
|
}
|
|
171
|
-
|
|
178
|
+
v.push(this.jsx_parseElementAt(c, x));
|
|
172
179
|
break;
|
|
173
|
-
case
|
|
174
|
-
|
|
180
|
+
case o.jsxText:
|
|
181
|
+
v.push(this.parseExprAtom());
|
|
175
182
|
break;
|
|
176
183
|
case r.braceL:
|
|
177
|
-
|
|
184
|
+
v.push(this.jsx_parseExpressionContainer());
|
|
178
185
|
break;
|
|
179
186
|
default:
|
|
180
187
|
this.unexpected();
|
|
181
188
|
}
|
|
182
|
-
pe(
|
|
189
|
+
pe(de.name) !== pe(I.name) && this.raise(de.start, "Expected corresponding JSX closing tag for <" + pe(I.name) + ">");
|
|
183
190
|
}
|
|
184
|
-
let
|
|
185
|
-
return
|
|
191
|
+
let Oe = I.name ? "Element" : "Fragment";
|
|
192
|
+
return y["opening" + Oe] = I, y["closing" + Oe] = de, y.children = v, this.type === r.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(y, "JSX" + Oe);
|
|
186
193
|
}
|
|
187
194
|
jsx_parseText() {
|
|
188
|
-
let
|
|
189
|
-
return
|
|
195
|
+
let c = this.parseLiteral(this.value);
|
|
196
|
+
return c.type = "JSXText", c;
|
|
190
197
|
}
|
|
191
198
|
jsx_parseElement() {
|
|
192
|
-
let
|
|
193
|
-
return this.next(), this.jsx_parseElementAt(
|
|
199
|
+
let c = this.start, x = this.startLoc;
|
|
200
|
+
return this.next(), this.jsx_parseElementAt(c, x);
|
|
194
201
|
}
|
|
195
|
-
parseExprAtom(
|
|
196
|
-
return this.type ===
|
|
202
|
+
parseExprAtom(c) {
|
|
203
|
+
return this.type === o.jsxText ? this.jsx_parseText() : this.type === o.jsxTagStart ? this.jsx_parseElement() : super.parseExprAtom(c);
|
|
197
204
|
}
|
|
198
|
-
readToken(
|
|
199
|
-
let
|
|
200
|
-
if (
|
|
201
|
-
if (
|
|
202
|
-
if (
|
|
203
|
-
if (
|
|
204
|
-
if ((
|
|
205
|
+
readToken(c) {
|
|
206
|
+
let x = this.curContext();
|
|
207
|
+
if (x === l) return this.jsx_readToken();
|
|
208
|
+
if (x === p || x === h) {
|
|
209
|
+
if (S(c)) return this.jsx_readWord();
|
|
210
|
+
if (c == 62) return ++this.pos, this.finishToken(o.jsxTagEnd);
|
|
211
|
+
if ((c === 34 || c === 39) && x == p) return this.jsx_readString(c);
|
|
205
212
|
}
|
|
206
|
-
return
|
|
213
|
+
return c === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33 ? (++this.pos, this.finishToken(o.jsxTagStart)) : super.readToken(c);
|
|
207
214
|
}
|
|
208
|
-
updateContext(
|
|
215
|
+
updateContext(c) {
|
|
209
216
|
if (this.type == r.braceL) {
|
|
210
|
-
var
|
|
211
|
-
|
|
212
|
-
} else if (this.type === r.slash &&
|
|
213
|
-
else return super.updateContext(
|
|
217
|
+
var x = this.curContext();
|
|
218
|
+
x == p ? this.context.push(u.b_expr) : x == l ? this.context.push(u.b_tmpl) : super.updateContext(c), this.exprAllowed = true;
|
|
219
|
+
} else if (this.type === r.slash && c === o.jsxTagStart) this.context.length -= 2, this.context.push(h), this.exprAllowed = false;
|
|
220
|
+
else return super.updateContext(c);
|
|
214
221
|
}
|
|
215
222
|
};
|
|
216
223
|
}
|
|
217
224
|
});
|
|
218
|
-
var
|
|
219
|
-
|
|
220
|
-
var Oi = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 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, 343, 9, 54, 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, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 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, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239], ft = [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, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 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, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 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, 20, 1, 64, 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, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 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, 38, 6, 186, 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, 19, 72, 200, 32, 32, 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, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 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, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 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, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], Bi = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65", dt = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC", Ve = { 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", 5: "class enum extends super const export import", 6: "enum", strict: "implements interface let package private protected public static yield", strictBind: "eval arguments" }, Re = "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", Di = { 5: Re, "5module": Re + " export import", 6: Re + " const class extends export import super" }, Fi = /^in(stanceof)?$/, Mi = new RegExp("[" + dt + "]"), ji = new RegExp("[" + dt + Bi + "]");
|
|
221
|
-
|
|
225
|
+
var Pi = {};
|
|
226
|
+
Oi(Pi, { parsers: () => dr });
|
|
227
|
+
var Di = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 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, 343, 9, 54, 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, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 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, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
228
|
+
var dt = [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, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 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, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 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, 20, 1, 64, 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, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 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, 38, 6, 186, 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, 19, 72, 200, 32, 32, 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, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 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, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 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, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
|
|
229
|
+
var Mi = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
|
|
230
|
+
var mt = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
|
|
231
|
+
var De = { 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", 5: "class enum extends super const export import", 6: "enum", strict: "implements interface let package private protected public static yield", strictBind: "eval arguments" };
|
|
232
|
+
var Me = "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";
|
|
233
|
+
var Fi = { 5: Me, "5module": Me + " export import", 6: Me + " const class extends export import super" };
|
|
234
|
+
var ji = /^in(stanceof)?$/;
|
|
235
|
+
var Ui = new RegExp("[" + mt + "]");
|
|
236
|
+
var Gi = new RegExp("[" + mt + Mi + "]");
|
|
237
|
+
function je(e, t) {
|
|
222
238
|
for (var i = 65536, s = 0; s < t.length; s += 2) {
|
|
223
239
|
if (i += t[s], i > e) return false;
|
|
224
240
|
if (i += t[s + 1], i >= e) return true;
|
|
225
241
|
}
|
|
226
242
|
return false;
|
|
227
243
|
}
|
|
228
|
-
function
|
|
229
|
-
return e < 65 ? e === 36 : e < 91 ? true : e < 97 ? e === 95 : e < 123 ? true : e <= 65535 ? e >= 170 &&
|
|
244
|
+
function j(e, t) {
|
|
245
|
+
return e < 65 ? e === 36 : e < 91 ? true : e < 97 ? e === 95 : e < 123 ? true : e <= 65535 ? e >= 170 && Ui.test(String.fromCharCode(e)) : t === false ? false : je(e, dt);
|
|
230
246
|
}
|
|
231
|
-
function
|
|
232
|
-
return e < 48 ? e === 36 : e < 58 ? true : e < 65 ? false : e < 91 ? true : e < 97 ? e === 95 : e < 123 ? true : e <= 65535 ? e >= 170 &&
|
|
247
|
+
function X(e, t) {
|
|
248
|
+
return e < 48 ? e === 36 : e < 58 ? true : e < 65 ? false : e < 91 ? true : e < 97 ? e === 95 : e < 123 ? true : e <= 65535 ? e >= 170 && Gi.test(String.fromCharCode(e)) : t === false ? false : je(e, dt) || je(e, Di);
|
|
233
249
|
}
|
|
234
|
-
var
|
|
250
|
+
var C = function(t, i) {
|
|
235
251
|
i === void 0 && (i = {}), this.label = t, this.keyword = i.keyword, this.beforeExpr = !!i.beforeExpr, this.startsExpr = !!i.startsExpr, this.isLoop = !!i.isLoop, this.isAssign = !!i.isAssign, this.prefix = !!i.prefix, this.postfix = !!i.postfix, this.binop = i.binop || null, this.updateContext = null;
|
|
236
252
|
};
|
|
237
|
-
function
|
|
238
|
-
return new
|
|
253
|
+
function V(e, t) {
|
|
254
|
+
return new C(e, { beforeExpr: true, binop: t });
|
|
239
255
|
}
|
|
240
|
-
var O = { beforeExpr: true }
|
|
241
|
-
|
|
242
|
-
|
|
256
|
+
var O = { beforeExpr: true };
|
|
257
|
+
var N = { startsExpr: true };
|
|
258
|
+
var Je = {};
|
|
259
|
+
function _(e, t) {
|
|
260
|
+
return t === void 0 && (t = {}), t.keyword = e, Je[e] = new C(e, t);
|
|
243
261
|
}
|
|
244
|
-
var a = { num: new
|
|
262
|
+
var a = { num: new C("num", N), regexp: new C("regexp", N), string: new C("string", N), name: new C("name", N), privateId: new C("privateId", N), eof: new C("eof"), bracketL: new C("[", { beforeExpr: true, startsExpr: true }), bracketR: new C("]"), braceL: new C("{", { beforeExpr: true, startsExpr: true }), braceR: new C("}"), parenL: new C("(", { beforeExpr: true, startsExpr: true }), parenR: new C(")"), comma: new C(",", O), semi: new C(";", O), colon: new C(":", O), dot: new C("."), question: new C("?", O), questionDot: new C("?."), arrow: new C("=>", O), template: new C("template"), invalidTemplate: new C("invalidTemplate"), ellipsis: new C("...", O), backQuote: new C("`", N), dollarBraceL: new C("${", { beforeExpr: true, startsExpr: true }), eq: new C("=", { beforeExpr: true, isAssign: true }), assign: new C("_=", { beforeExpr: true, isAssign: true }), incDec: new C("++/--", { prefix: true, postfix: true, startsExpr: true }), prefix: new C("!/~", { beforeExpr: true, prefix: true, startsExpr: true }), logicalOR: V("||", 1), logicalAND: V("&&", 2), bitwiseOR: V("|", 3), bitwiseXOR: V("^", 4), bitwiseAND: V("&", 5), equality: V("==/!=/===/!==", 6), relational: V("</>/<=/>=", 7), bitShift: V("<</>>/>>>", 8), plusMin: new C("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }), modulo: V("%", 10), star: V("*", 10), slash: V("/", 10), starstar: new C("**", { beforeExpr: true }), coalesce: V("??", 1), _break: _("break"), _case: _("case", O), _catch: _("catch"), _continue: _("continue"), _debugger: _("debugger"), _default: _("default", O), _do: _("do", { isLoop: true, beforeExpr: true }), _else: _("else", O), _finally: _("finally"), _for: _("for", { isLoop: true }), _function: _("function", N), _if: _("if"), _return: _("return", O), _switch: _("switch"), _throw: _("throw", O), _try: _("try"), _var: _("var"), _const: _("const"), _while: _("while", { isLoop: true }), _with: _("with"), _new: _("new", { beforeExpr: true, startsExpr: true }), _this: _("this", N), _super: _("super", N), _class: _("class", N), _extends: _("extends", O), _export: _("export"), _import: _("import", N), _null: _("null", N), _true: _("true", N), _false: _("false", N), _in: _("in", { beforeExpr: true, binop: 7 }), _instanceof: _("instanceof", { beforeExpr: true, binop: 7 }), _typeof: _("typeof", { beforeExpr: true, prefix: true, startsExpr: true }), _void: _("void", { beforeExpr: true, prefix: true, startsExpr: true }), _delete: _("delete", { beforeExpr: true, prefix: true, startsExpr: true }) };
|
|
263
|
+
var L = /\r\n?|\n|\u2028|\u2029/;
|
|
264
|
+
var qi = new RegExp(L.source, "g");
|
|
245
265
|
function Y(e) {
|
|
246
266
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
247
267
|
}
|
|
248
|
-
function
|
|
268
|
+
function xt(e, t, i) {
|
|
249
269
|
i === void 0 && (i = e.length);
|
|
250
270
|
for (var s = t; s < i; s++) {
|
|
251
271
|
var r = e.charCodeAt(s);
|
|
@@ -253,189 +273,216 @@ function mt(e, t, i) {
|
|
|
253
273
|
}
|
|
254
274
|
return -1;
|
|
255
275
|
}
|
|
256
|
-
var
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
276
|
+
var yt = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
|
|
277
|
+
var k = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
278
|
+
var gt = Object.prototype;
|
|
279
|
+
var Ji = gt.hasOwnProperty;
|
|
280
|
+
var Ki = gt.toString;
|
|
281
|
+
var $ = Object.hasOwn || (function(e, t) {
|
|
282
|
+
return Ji.call(e, t);
|
|
283
|
+
});
|
|
284
|
+
var ht = Array.isArray || (function(e) {
|
|
285
|
+
return Ki.call(e) === "[object Array]";
|
|
286
|
+
});
|
|
287
|
+
var pt = /* @__PURE__ */ Object.create(null);
|
|
261
288
|
function H(e) {
|
|
262
289
|
return pt[e] || (pt[e] = new RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
263
290
|
}
|
|
264
|
-
function
|
|
291
|
+
function q(e) {
|
|
265
292
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
266
293
|
}
|
|
267
|
-
var
|
|
294
|
+
var Hi = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
|
|
295
|
+
var ne = function(t, i) {
|
|
268
296
|
this.line = t, this.column = i;
|
|
269
297
|
};
|
|
270
|
-
|
|
271
|
-
return new
|
|
298
|
+
ne.prototype.offset = function(t) {
|
|
299
|
+
return new ne(this.line, this.column + t);
|
|
272
300
|
};
|
|
273
|
-
var
|
|
301
|
+
var be = function(t, i, s) {
|
|
274
302
|
this.start = i, this.end = s, t.sourceFile !== null && (this.source = t.sourceFile);
|
|
275
303
|
};
|
|
276
|
-
function
|
|
304
|
+
function vt(e, t) {
|
|
277
305
|
for (var i = 1, s = 0; ; ) {
|
|
278
|
-
var r =
|
|
279
|
-
if (r < 0) return new
|
|
306
|
+
var r = xt(e, s, t);
|
|
307
|
+
if (r < 0) return new ne(i, t - s);
|
|
280
308
|
++i, s = r;
|
|
281
309
|
}
|
|
282
310
|
}
|
|
283
|
-
var
|
|
284
|
-
|
|
311
|
+
var Ue = { ecmaVersion: null, sourceType: "script", onInsertedSemicolon: null, onTrailingComma: null, allowReserved: null, allowReturnOutsideFunction: false, allowImportExportEverywhere: false, allowAwaitOutsideFunction: null, allowSuperOutsideMethod: null, allowHashBang: false, checkPrivateFields: true, locations: false, onToken: null, onComment: null, ranges: false, program: null, sourceFile: null, directSourceFile: null, preserveParens: false };
|
|
312
|
+
var ct = false;
|
|
313
|
+
function Xi(e) {
|
|
285
314
|
var t = {};
|
|
286
|
-
for (var i in
|
|
287
|
-
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!
|
|
288
|
-
Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved == null && (t.allowReserved = t.ecmaVersion < 5), (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14),
|
|
315
|
+
for (var i in Ue) t[i] = e && $(e, i) ? e[i] : Ue[i];
|
|
316
|
+
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!ct && typeof console == "object" && console.warn && (ct = true, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
317
|
+
Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved == null && (t.allowReserved = t.ecmaVersion < 5), (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14), ht(t.onToken)) {
|
|
289
318
|
var s = t.onToken;
|
|
290
319
|
t.onToken = function(r) {
|
|
291
320
|
return s.push(r);
|
|
292
321
|
};
|
|
293
322
|
}
|
|
294
|
-
return
|
|
323
|
+
return ht(t.onComment) && (t.onComment = Wi(t, t.onComment)), t;
|
|
295
324
|
}
|
|
296
|
-
function
|
|
297
|
-
return function(i, s, r,
|
|
298
|
-
var
|
|
299
|
-
e.locations && (
|
|
325
|
+
function Wi(e, t) {
|
|
326
|
+
return function(i, s, r, o, u, p) {
|
|
327
|
+
var h = { type: i ? "Block" : "Line", value: s, start: r, end: o };
|
|
328
|
+
e.locations && (h.loc = new be(this, u, p)), e.ranges && (h.range = [r, o]), t.push(h);
|
|
300
329
|
};
|
|
301
330
|
}
|
|
302
|
-
var
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
var
|
|
307
|
-
|
|
331
|
+
var oe = 1;
|
|
332
|
+
var Z = 2;
|
|
333
|
+
var Ke = 4;
|
|
334
|
+
var bt = 8;
|
|
335
|
+
var He = 16;
|
|
336
|
+
var St = 32;
|
|
337
|
+
var Se = 64;
|
|
338
|
+
var _t = 128;
|
|
339
|
+
var z = 256;
|
|
340
|
+
var ue = 512;
|
|
341
|
+
var _e = oe | Z | z;
|
|
342
|
+
function Xe(e, t) {
|
|
343
|
+
return Z | (e ? Ke : 0) | (t ? bt : 0);
|
|
344
|
+
}
|
|
345
|
+
var xe = 0;
|
|
346
|
+
var We = 1;
|
|
347
|
+
var K = 2;
|
|
348
|
+
var Ct = 3;
|
|
349
|
+
var Tt = 4;
|
|
350
|
+
var Et = 5;
|
|
351
|
+
var A = function(t, i, s) {
|
|
352
|
+
this.options = t = Xi(t), this.sourceFile = t.sourceFile, this.keywords = H(Fi[t.ecmaVersion >= 6 ? 6 : t.sourceType === "module" ? "5module" : 5]);
|
|
308
353
|
var r = "";
|
|
309
|
-
t.allowReserved !== true && (r =
|
|
310
|
-
var
|
|
311
|
-
this.reservedWordsStrict = H(
|
|
312
|
-
`, s - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(
|
|
313
|
-
}
|
|
314
|
-
|
|
354
|
+
t.allowReserved !== true && (r = De[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (r += " await")), this.reservedWords = H(r);
|
|
355
|
+
var o = (r ? r + " " : "") + De.strict;
|
|
356
|
+
this.reservedWordsStrict = H(o), this.reservedWordsStrictBind = H(o + " " + De.strictBind), this.input = String(i), this.containsEsc = false, s ? (this.pos = s, this.lineStart = this.input.lastIndexOf(`
|
|
357
|
+
`, s - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(L).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = a.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 = true, this.inModule = t.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = false, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = /* @__PURE__ */ Object.create(null), this.pos === 0 && t.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(oe), this.regexpState = null, this.privateNameStack = [];
|
|
358
|
+
};
|
|
359
|
+
var U = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } };
|
|
360
|
+
A.prototype.parse = function() {
|
|
315
361
|
var t = this.options.program || this.startNode();
|
|
316
362
|
return this.nextToken(), this.parseTopLevel(t);
|
|
317
363
|
};
|
|
318
|
-
|
|
364
|
+
U.inFunction.get = function() {
|
|
319
365
|
return (this.currentVarScope().flags & Z) > 0;
|
|
320
366
|
};
|
|
321
|
-
|
|
322
|
-
return (this.currentVarScope().flags &
|
|
367
|
+
U.inGenerator.get = function() {
|
|
368
|
+
return (this.currentVarScope().flags & bt) > 0;
|
|
323
369
|
};
|
|
324
|
-
|
|
325
|
-
return (this.currentVarScope().flags &
|
|
370
|
+
U.inAsync.get = function() {
|
|
371
|
+
return (this.currentVarScope().flags & Ke) > 0;
|
|
326
372
|
};
|
|
327
|
-
|
|
373
|
+
U.canAwait.get = function() {
|
|
328
374
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
329
375
|
var t = this.scopeStack[e], i = t.flags;
|
|
330
|
-
if (i & (
|
|
331
|
-
if (i & Z) return (i &
|
|
376
|
+
if (i & (z | ue)) return false;
|
|
377
|
+
if (i & Z) return (i & Ke) > 0;
|
|
332
378
|
}
|
|
333
379
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
334
380
|
};
|
|
335
|
-
|
|
381
|
+
U.allowSuper.get = function() {
|
|
336
382
|
var e = this.currentThisScope(), t = e.flags;
|
|
337
|
-
return (t &
|
|
383
|
+
return (t & Se) > 0 || this.options.allowSuperOutsideMethod;
|
|
338
384
|
};
|
|
339
|
-
|
|
340
|
-
return (this.currentThisScope().flags &
|
|
385
|
+
U.allowDirectSuper.get = function() {
|
|
386
|
+
return (this.currentThisScope().flags & _t) > 0;
|
|
341
387
|
};
|
|
342
|
-
|
|
388
|
+
U.treatFunctionsAsVar.get = function() {
|
|
343
389
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
344
390
|
};
|
|
345
|
-
|
|
391
|
+
U.allowNewDotTarget.get = function() {
|
|
346
392
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
347
393
|
var t = this.scopeStack[e], i = t.flags;
|
|
348
|
-
if (i & (
|
|
394
|
+
if (i & (z | ue) || i & Z && !(i & He)) return true;
|
|
349
395
|
}
|
|
350
396
|
return false;
|
|
351
397
|
};
|
|
352
|
-
|
|
353
|
-
return (this.currentVarScope().flags &
|
|
398
|
+
U.inClassStaticBlock.get = function() {
|
|
399
|
+
return (this.currentVarScope().flags & z) > 0;
|
|
354
400
|
};
|
|
355
|
-
|
|
401
|
+
A.extend = function() {
|
|
356
402
|
for (var t = [], i = arguments.length; i--; ) t[i] = arguments[i];
|
|
357
403
|
for (var s = this, r = 0; r < t.length; r++) s = t[r](s);
|
|
358
404
|
return s;
|
|
359
405
|
};
|
|
360
|
-
|
|
406
|
+
A.parse = function(t, i) {
|
|
361
407
|
return new this(i, t).parse();
|
|
362
408
|
};
|
|
363
|
-
|
|
409
|
+
A.parseExpressionAt = function(t, i, s) {
|
|
364
410
|
var r = new this(s, t, i);
|
|
365
411
|
return r.nextToken(), r.parseExpression();
|
|
366
412
|
};
|
|
367
|
-
|
|
413
|
+
A.tokenizer = function(t, i) {
|
|
368
414
|
return new this(i, t);
|
|
369
415
|
};
|
|
370
|
-
Object.defineProperties(
|
|
371
|
-
var
|
|
372
|
-
|
|
416
|
+
Object.defineProperties(A.prototype, U);
|
|
417
|
+
var w = A.prototype;
|
|
418
|
+
var zi = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
419
|
+
w.strictDirective = function(e) {
|
|
373
420
|
if (this.options.ecmaVersion < 5) return false;
|
|
374
421
|
for (; ; ) {
|
|
375
|
-
|
|
376
|
-
var t =
|
|
422
|
+
k.lastIndex = e, e += k.exec(this.input)[0].length;
|
|
423
|
+
var t = zi.exec(this.input.slice(e));
|
|
377
424
|
if (!t) return false;
|
|
378
425
|
if ((t[1] || t[2]) === "use strict") {
|
|
379
|
-
|
|
380
|
-
var i =
|
|
381
|
-
return r === ";" || r === "}" ||
|
|
426
|
+
k.lastIndex = e + t[0].length;
|
|
427
|
+
var i = k.exec(this.input), s = i.index + i[0].length, r = this.input.charAt(s);
|
|
428
|
+
return r === ";" || r === "}" || L.test(i[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(r) || r === "!" && this.input.charAt(s + 1) === "=");
|
|
382
429
|
}
|
|
383
|
-
e += t[0].length,
|
|
430
|
+
e += t[0].length, k.lastIndex = e, e += k.exec(this.input)[0].length, this.input[e] === ";" && e++;
|
|
384
431
|
}
|
|
385
432
|
};
|
|
386
|
-
|
|
433
|
+
w.eat = function(e) {
|
|
387
434
|
return this.type === e ? (this.next(), true) : false;
|
|
388
435
|
};
|
|
389
|
-
|
|
436
|
+
w.isContextual = function(e) {
|
|
390
437
|
return this.type === a.name && this.value === e && !this.containsEsc;
|
|
391
438
|
};
|
|
392
|
-
|
|
439
|
+
w.eatContextual = function(e) {
|
|
393
440
|
return this.isContextual(e) ? (this.next(), true) : false;
|
|
394
441
|
};
|
|
395
|
-
|
|
442
|
+
w.expectContextual = function(e) {
|
|
396
443
|
this.eatContextual(e) || this.unexpected();
|
|
397
444
|
};
|
|
398
|
-
|
|
399
|
-
return this.type === a.eof || this.type === a.braceR ||
|
|
445
|
+
w.canInsertSemicolon = function() {
|
|
446
|
+
return this.type === a.eof || this.type === a.braceR || L.test(this.input.slice(this.lastTokEnd, this.start));
|
|
400
447
|
};
|
|
401
|
-
|
|
448
|
+
w.insertSemicolon = function() {
|
|
402
449
|
if (this.canInsertSemicolon()) return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), true;
|
|
403
450
|
};
|
|
404
|
-
|
|
451
|
+
w.semicolon = function() {
|
|
405
452
|
!this.eat(a.semi) && !this.insertSemicolon() && this.unexpected();
|
|
406
453
|
};
|
|
407
|
-
|
|
454
|
+
w.afterTrailingComma = function(e, t) {
|
|
408
455
|
if (this.type === e) return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), t || this.next(), true;
|
|
409
456
|
};
|
|
410
|
-
|
|
457
|
+
w.expect = function(e) {
|
|
411
458
|
this.eat(e) || this.unexpected();
|
|
412
459
|
};
|
|
413
|
-
|
|
460
|
+
w.unexpected = function(e) {
|
|
414
461
|
this.raise(e ?? this.start, "Unexpected token");
|
|
415
462
|
};
|
|
416
|
-
var
|
|
463
|
+
var Ce = function() {
|
|
417
464
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
418
465
|
};
|
|
419
|
-
|
|
466
|
+
w.checkPatternErrors = function(e, t) {
|
|
420
467
|
if (e) {
|
|
421
468
|
e.trailingComma > -1 && this.raiseRecoverable(e.trailingComma, "Comma is not permitted after the rest element");
|
|
422
469
|
var i = t ? e.parenthesizedAssign : e.parenthesizedBind;
|
|
423
470
|
i > -1 && this.raiseRecoverable(i, t ? "Assigning to rvalue" : "Parenthesized pattern");
|
|
424
471
|
}
|
|
425
472
|
};
|
|
426
|
-
|
|
473
|
+
w.checkExpressionErrors = function(e, t) {
|
|
427
474
|
if (!e) return false;
|
|
428
475
|
var i = e.shorthandAssign, s = e.doubleProto;
|
|
429
476
|
if (!t) return i >= 0 || s >= 0;
|
|
430
477
|
i >= 0 && this.raise(i, "Shorthand property assignments are valid only in destructuring patterns"), s >= 0 && this.raiseRecoverable(s, "Redefinition of __proto__ property");
|
|
431
478
|
};
|
|
432
|
-
|
|
479
|
+
w.checkYieldAwaitInDefaultParams = function() {
|
|
433
480
|
this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value");
|
|
434
481
|
};
|
|
435
|
-
|
|
482
|
+
w.isSimpleAssignTarget = function(e) {
|
|
436
483
|
return e.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(e.expression) : e.type === "Identifier" || e.type === "MemberExpression";
|
|
437
484
|
};
|
|
438
|
-
var d =
|
|
485
|
+
var d = A.prototype;
|
|
439
486
|
d.parseTopLevel = function(e) {
|
|
440
487
|
var t = /* @__PURE__ */ Object.create(null);
|
|
441
488
|
for (e.body || (e.body = []); this.type !== a.eof; ) {
|
|
@@ -443,51 +490,52 @@ d.parseTopLevel = function(e) {
|
|
|
443
490
|
e.body.push(i);
|
|
444
491
|
}
|
|
445
492
|
if (this.inModule) for (var s = 0, r = Object.keys(this.undefinedExports); s < r.length; s += 1) {
|
|
446
|
-
var
|
|
447
|
-
this.raiseRecoverable(this.undefinedExports[
|
|
493
|
+
var o = r[s];
|
|
494
|
+
this.raiseRecoverable(this.undefinedExports[o].start, "Export '" + o + "' is not defined");
|
|
448
495
|
}
|
|
449
496
|
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType, this.finishNode(e, "Program");
|
|
450
497
|
};
|
|
451
|
-
var
|
|
498
|
+
var ze = { kind: "loop" };
|
|
499
|
+
var Qi = { kind: "switch" };
|
|
452
500
|
d.isLet = function(e) {
|
|
453
501
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return false;
|
|
454
|
-
|
|
455
|
-
var t =
|
|
502
|
+
k.lastIndex = this.pos;
|
|
503
|
+
var t = k.exec(this.input), i = this.pos + t[0].length, s = this.input.charCodeAt(i);
|
|
456
504
|
if (s === 91 || s === 92) return true;
|
|
457
505
|
if (e) return false;
|
|
458
506
|
if (s === 123 || s > 55295 && s < 56320) return true;
|
|
459
|
-
if (
|
|
460
|
-
for (var r = i + 1;
|
|
507
|
+
if (j(s, true)) {
|
|
508
|
+
for (var r = i + 1; X(s = this.input.charCodeAt(r), true); ) ++r;
|
|
461
509
|
if (s === 92 || s > 55295 && s < 56320) return true;
|
|
462
|
-
var
|
|
463
|
-
if (!
|
|
510
|
+
var o = this.input.slice(i, r);
|
|
511
|
+
if (!ji.test(o)) return true;
|
|
464
512
|
}
|
|
465
513
|
return false;
|
|
466
514
|
};
|
|
467
515
|
d.isAsyncFunction = function() {
|
|
468
516
|
if (this.options.ecmaVersion < 8 || !this.isContextual("async")) return false;
|
|
469
|
-
|
|
470
|
-
var e =
|
|
471
|
-
return !
|
|
517
|
+
k.lastIndex = this.pos;
|
|
518
|
+
var e = k.exec(this.input), t = this.pos + e[0].length, i;
|
|
519
|
+
return !L.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(X(i = this.input.charCodeAt(t + 8)) || i > 55295 && i < 56320));
|
|
472
520
|
};
|
|
473
521
|
d.isUsingKeyword = function(e, t) {
|
|
474
522
|
if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using")) return false;
|
|
475
|
-
|
|
476
|
-
var i =
|
|
477
|
-
if (
|
|
523
|
+
k.lastIndex = this.pos;
|
|
524
|
+
var i = k.exec(this.input), s = this.pos + i[0].length;
|
|
525
|
+
if (L.test(this.input.slice(this.pos, s))) return false;
|
|
478
526
|
if (e) {
|
|
479
|
-
var r = s + 5,
|
|
480
|
-
if (this.input.slice(s, r) !== "using" || r === this.input.length ||
|
|
481
|
-
|
|
482
|
-
var
|
|
483
|
-
if (
|
|
527
|
+
var r = s + 5, o;
|
|
528
|
+
if (this.input.slice(s, r) !== "using" || r === this.input.length || X(o = this.input.charCodeAt(r)) || o > 55295 && o < 56320) return false;
|
|
529
|
+
k.lastIndex = r;
|
|
530
|
+
var u = k.exec(this.input);
|
|
531
|
+
if (u && L.test(this.input.slice(r, r + u[0].length))) return false;
|
|
484
532
|
}
|
|
485
533
|
if (t) {
|
|
486
|
-
var p = s + 2,
|
|
487
|
-
if (this.input.slice(s, p) === "of" && (p === this.input.length || !
|
|
534
|
+
var p = s + 2, h;
|
|
535
|
+
if (this.input.slice(s, p) === "of" && (p === this.input.length || !X(h = this.input.charCodeAt(p)) && !(h > 55295 && h < 56320))) return false;
|
|
488
536
|
}
|
|
489
|
-
var
|
|
490
|
-
return
|
|
537
|
+
var l = this.input.charCodeAt(s);
|
|
538
|
+
return j(l, true) || l === 92;
|
|
491
539
|
};
|
|
492
540
|
d.isAwaitUsing = function(e) {
|
|
493
541
|
return this.isUsingKeyword(true, e);
|
|
@@ -496,8 +544,8 @@ d.isUsing = function(e) {
|
|
|
496
544
|
return this.isUsingKeyword(false, e);
|
|
497
545
|
};
|
|
498
546
|
d.parseStatement = function(e, t, i) {
|
|
499
|
-
var s = this.type, r = this.startNode(),
|
|
500
|
-
switch (this.isLet(e) && (s = a._var,
|
|
547
|
+
var s = this.type, r = this.startNode(), o;
|
|
548
|
+
switch (this.isLet(e) && (s = a._var, o = "let"), s) {
|
|
501
549
|
case a._break:
|
|
502
550
|
case a._continue:
|
|
503
551
|
return this.parseBreakContinueStatement(r, s.keyword);
|
|
@@ -523,7 +571,7 @@ d.parseStatement = function(e, t, i) {
|
|
|
523
571
|
return this.parseTryStatement(r);
|
|
524
572
|
case a._const:
|
|
525
573
|
case a._var:
|
|
526
|
-
return
|
|
574
|
+
return o = o || this.value, e && o !== "var" && this.unexpected(), this.parseVarStatement(r, o);
|
|
527
575
|
case a._while:
|
|
528
576
|
return this.parseWhileStatement(r);
|
|
529
577
|
case a._with:
|
|
@@ -535,17 +583,17 @@ d.parseStatement = function(e, t, i) {
|
|
|
535
583
|
case a._export:
|
|
536
584
|
case a._import:
|
|
537
585
|
if (this.options.ecmaVersion > 10 && s === a._import) {
|
|
538
|
-
|
|
539
|
-
var
|
|
540
|
-
if (
|
|
586
|
+
k.lastIndex = this.pos;
|
|
587
|
+
var u = k.exec(this.input), p = this.pos + u[0].length, h = this.input.charCodeAt(p);
|
|
588
|
+
if (h === 40 || h === 46) return this.parseExpressionStatement(r, this.parseExpression());
|
|
541
589
|
}
|
|
542
590
|
return this.options.allowImportExportEverywhere || (t || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), s === a._import ? this.parseImport(r) : this.parseExport(r, i);
|
|
543
591
|
default:
|
|
544
592
|
if (this.isAsyncFunction()) return e && this.unexpected(), this.next(), this.parseFunctionStatement(r, true, !e);
|
|
545
|
-
var
|
|
546
|
-
if (
|
|
547
|
-
var
|
|
548
|
-
return s === a.name &&
|
|
593
|
+
var l = this.isAwaitUsing(false) ? "await using" : this.isUsing(false) ? "using" : null;
|
|
594
|
+
if (l) return t && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), l === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(r, false, l), this.semicolon(), this.finishNode(r, "VariableDeclaration");
|
|
595
|
+
var m = this.value, S = this.parseExpression();
|
|
596
|
+
return s === a.name && S.type === "Identifier" && this.eat(a.colon) ? this.parseLabeledStatement(r, m, S, e) : this.parseExpressionStatement(r, S);
|
|
549
597
|
}
|
|
550
598
|
};
|
|
551
599
|
d.parseBreakContinueStatement = function(e, t) {
|
|
@@ -561,30 +609,30 @@ d.parseDebuggerStatement = function(e) {
|
|
|
561
609
|
return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement");
|
|
562
610
|
};
|
|
563
611
|
d.parseDoStatement = function(e) {
|
|
564
|
-
return this.next(), this.labels.push(
|
|
612
|
+
return this.next(), this.labels.push(ze), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(a._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(a.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement");
|
|
565
613
|
};
|
|
566
614
|
d.parseForStatement = function(e) {
|
|
567
615
|
this.next();
|
|
568
616
|
var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
569
|
-
if (this.labels.push(
|
|
617
|
+
if (this.labels.push(ze), this.enterScope(0), this.expect(a.parenL), this.type === a.semi) return t > -1 && this.unexpected(t), this.parseFor(e, null);
|
|
570
618
|
var i = this.isLet();
|
|
571
619
|
if (this.type === a._var || this.type === a._const || i) {
|
|
572
620
|
var s = this.startNode(), r = i ? "let" : this.value;
|
|
573
621
|
return this.next(), this.parseVar(s, true, r), this.finishNode(s, "VariableDeclaration"), this.parseForAfterInit(e, s, t);
|
|
574
622
|
}
|
|
575
|
-
var
|
|
623
|
+
var o = this.isContextual("let"), u = false, p = this.isUsing(true) ? "using" : this.isAwaitUsing(true) ? "await using" : null;
|
|
576
624
|
if (p) {
|
|
577
|
-
var
|
|
578
|
-
return this.next(), p === "await using" && this.next(), this.parseVar(
|
|
625
|
+
var h = this.startNode();
|
|
626
|
+
return this.next(), p === "await using" && this.next(), this.parseVar(h, true, p), this.finishNode(h, "VariableDeclaration"), this.parseForAfterInit(e, h, t);
|
|
579
627
|
}
|
|
580
|
-
var
|
|
581
|
-
return this.type === a._in || (
|
|
628
|
+
var l = this.containsEsc, m = new Ce(), S = this.start, E = t > -1 ? this.parseExprSubscripts(m, "await") : this.parseExpression(true, m);
|
|
629
|
+
return this.type === a._in || (u = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === a._in && this.unexpected(t), e.await = true) : u && this.options.ecmaVersion >= 8 && (E.start === S && !l && E.type === "Identifier" && E.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = false)), o && u && this.raise(E.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(E, false, m), this.checkLValPattern(E), this.parseForIn(e, E)) : (this.checkExpressionErrors(m, true), t > -1 && this.unexpected(t), this.parseFor(e, E));
|
|
582
630
|
};
|
|
583
631
|
d.parseForAfterInit = function(e, t, i) {
|
|
584
632
|
return (this.type === a._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === a._in ? i > -1 && this.unexpected(i) : e.await = i > -1), this.parseForIn(e, t)) : (i > -1 && this.unexpected(i), this.parseFor(e, t));
|
|
585
633
|
};
|
|
586
634
|
d.parseFunctionStatement = function(e, t, i) {
|
|
587
|
-
return this.next(), this.parseFunction(e,
|
|
635
|
+
return this.next(), this.parseFunction(e, ae | (i ? 0 : Ge), false, t);
|
|
588
636
|
};
|
|
589
637
|
d.parseIfStatement = function(e) {
|
|
590
638
|
return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(a._else) ? this.parseStatement("if") : null, this.finishNode(e, "IfStatement");
|
|
@@ -593,7 +641,7 @@ d.parseReturnStatement = function(e) {
|
|
|
593
641
|
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(a.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
|
|
594
642
|
};
|
|
595
643
|
d.parseSwitchStatement = function(e) {
|
|
596
|
-
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(a.braceL), this.labels.push(
|
|
644
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(a.braceL), this.labels.push(Qi), this.enterScope(0);
|
|
597
645
|
for (var t, i = false; this.type !== a.braceR; ) if (this.type === a._case || this.type === a._default) {
|
|
598
646
|
var s = this.type === a._case;
|
|
599
647
|
t && this.finishNode(t, "SwitchCase"), e.cases.push(t = this.startNode()), t.consequent = [], this.next(), s ? t.test = this.parseExpression() : (i && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), i = true, t.test = null), this.expect(a.colon);
|
|
@@ -601,12 +649,12 @@ d.parseSwitchStatement = function(e) {
|
|
|
601
649
|
return this.exitScope(), t && this.finishNode(t, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e, "SwitchStatement");
|
|
602
650
|
};
|
|
603
651
|
d.parseThrowStatement = function(e) {
|
|
604
|
-
return this.next(),
|
|
652
|
+
return this.next(), L.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e.argument = this.parseExpression(), this.semicolon(), this.finishNode(e, "ThrowStatement");
|
|
605
653
|
};
|
|
606
|
-
var
|
|
654
|
+
var Yi = [];
|
|
607
655
|
d.parseCatchClauseParam = function() {
|
|
608
656
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
609
|
-
return this.enterScope(t ?
|
|
657
|
+
return this.enterScope(t ? St : 0), this.checkLValPattern(e, t ? Tt : K), this.expect(a.parenR), e;
|
|
610
658
|
};
|
|
611
659
|
d.parseTryStatement = function(e) {
|
|
612
660
|
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === a._catch) {
|
|
@@ -619,7 +667,7 @@ d.parseVarStatement = function(e, t, i) {
|
|
|
619
667
|
return this.next(), this.parseVar(e, false, t, i), this.semicolon(), this.finishNode(e, "VariableDeclaration");
|
|
620
668
|
};
|
|
621
669
|
d.parseWhileStatement = function(e) {
|
|
622
|
-
return this.next(), e.test = this.parseParenExpression(), this.labels.push(
|
|
670
|
+
return this.next(), e.test = this.parseParenExpression(), this.labels.push(ze), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement");
|
|
623
671
|
};
|
|
624
672
|
d.parseWithStatement = function(e) {
|
|
625
673
|
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), e.object = this.parseParenExpression(), e.body = this.parseStatement("with"), this.finishNode(e, "WithStatement");
|
|
@@ -628,13 +676,13 @@ d.parseEmptyStatement = function(e) {
|
|
|
628
676
|
return this.next(), this.finishNode(e, "EmptyStatement");
|
|
629
677
|
};
|
|
630
678
|
d.parseLabeledStatement = function(e, t, i, s) {
|
|
631
|
-
for (var r = 0,
|
|
632
|
-
var
|
|
633
|
-
|
|
679
|
+
for (var r = 0, o = this.labels; r < o.length; r += 1) {
|
|
680
|
+
var u = o[r];
|
|
681
|
+
u.name === t && this.raise(i.start, "Label '" + t + "' is already declared");
|
|
634
682
|
}
|
|
635
|
-
for (var p = this.type.isLoop ? "loop" : this.type === a._switch ? "switch" : null,
|
|
636
|
-
var
|
|
637
|
-
if (
|
|
683
|
+
for (var p = this.type.isLoop ? "loop" : this.type === a._switch ? "switch" : null, h = this.labels.length - 1; h >= 0; h--) {
|
|
684
|
+
var l = this.labels[h];
|
|
685
|
+
if (l.statementStart === e.start) l.statementStart = this.start, l.kind = p;
|
|
638
686
|
else break;
|
|
639
687
|
}
|
|
640
688
|
return this.labels.push({ name: t, kind: p, statementStart: this.start }), e.body = this.parseStatement(s ? s.indexOf("label") === -1 ? s + "label" : s : "label"), this.labels.pop(), e.label = i, this.finishNode(e, "LabeledStatement");
|
|
@@ -664,13 +712,15 @@ d.parseVar = function(e, t, i, s) {
|
|
|
664
712
|
return e;
|
|
665
713
|
};
|
|
666
714
|
d.parseVarId = function(e, t) {
|
|
667
|
-
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ?
|
|
715
|
+
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? We : K, false);
|
|
668
716
|
};
|
|
669
|
-
var
|
|
717
|
+
var ae = 1;
|
|
718
|
+
var Ge = 2;
|
|
719
|
+
var At = 4;
|
|
670
720
|
d.parseFunction = function(e, t, i, s, r) {
|
|
671
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s) && (this.type === a.star && t &
|
|
672
|
-
var
|
|
673
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
721
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s) && (this.type === a.star && t & Ge && this.unexpected(), e.generator = this.eat(a.star)), this.options.ecmaVersion >= 8 && (e.async = !!s), t & ae && (e.id = t & At && this.type !== a.name ? null : this.parseIdent(), e.id && !(t & Ge) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? We : K : Ct));
|
|
722
|
+
var o = this.yieldPos, u = this.awaitPos, p = this.awaitIdentPos;
|
|
723
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Xe(e.async, e.generator)), t & ae || (e.id = this.type === a.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, i, false, r), this.yieldPos = o, this.awaitPos = u, this.awaitIdentPos = p, this.finishNode(e, t & ae ? "FunctionDeclaration" : "FunctionExpression");
|
|
674
724
|
};
|
|
675
725
|
d.parseFunctionParams = function(e) {
|
|
676
726
|
this.expect(a.parenL), e.params = this.parseBindingList(a.parenR, false, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
@@ -679,27 +729,27 @@ d.parseClass = function(e, t) {
|
|
|
679
729
|
this.next();
|
|
680
730
|
var i = this.strict;
|
|
681
731
|
this.strict = true, this.parseClassId(e, t), this.parseClassSuper(e);
|
|
682
|
-
var s = this.enterClassBody(), r = this.startNode(),
|
|
732
|
+
var s = this.enterClassBody(), r = this.startNode(), o = false;
|
|
683
733
|
for (r.body = [], this.expect(a.braceL); this.type !== a.braceR; ) {
|
|
684
|
-
var
|
|
685
|
-
|
|
734
|
+
var u = this.parseClassElement(e.superClass !== null);
|
|
735
|
+
u && (r.body.push(u), u.type === "MethodDefinition" && u.kind === "constructor" ? (o && this.raiseRecoverable(u.start, "Duplicate constructor in the same class"), o = true) : u.key && u.key.type === "PrivateIdentifier" && $i(s, u) && this.raiseRecoverable(u.key.start, "Identifier '#" + u.key.name + "' has already been declared"));
|
|
686
736
|
}
|
|
687
737
|
return this.strict = i, this.next(), e.body = this.finishNode(r, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
688
738
|
};
|
|
689
739
|
d.parseClassElement = function(e) {
|
|
690
740
|
if (this.eat(a.semi)) return null;
|
|
691
|
-
var t = this.options.ecmaVersion, i = this.startNode(), s = "", r = false,
|
|
741
|
+
var t = this.options.ecmaVersion, i = this.startNode(), s = "", r = false, o = false, u = "method", p = false;
|
|
692
742
|
if (this.eatContextual("static")) {
|
|
693
743
|
if (t >= 13 && this.eat(a.braceL)) return this.parseClassStaticBlock(i), i;
|
|
694
744
|
this.isClassElementNameStart() || this.type === a.star ? p = true : s = "static";
|
|
695
745
|
}
|
|
696
|
-
if (i.static = p, !s && t >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type === a.star) && !this.canInsertSemicolon() ?
|
|
697
|
-
var
|
|
698
|
-
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ?
|
|
746
|
+
if (i.static = p, !s && t >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type === a.star) && !this.canInsertSemicolon() ? o = true : s = "async"), !s && (t >= 9 || !o) && this.eat(a.star) && (r = true), !s && !o && !r) {
|
|
747
|
+
var h = this.value;
|
|
748
|
+
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? u = h : s = h);
|
|
699
749
|
}
|
|
700
|
-
if (s ? (i.computed = false, i.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i.key.name = s, this.finishNode(i.key, "Identifier")) : this.parseClassElementName(i), t < 13 || this.type === a.parenL ||
|
|
701
|
-
var
|
|
702
|
-
|
|
750
|
+
if (s ? (i.computed = false, i.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i.key.name = s, this.finishNode(i.key, "Identifier")) : this.parseClassElementName(i), t < 13 || this.type === a.parenL || u !== "method" || r || o) {
|
|
751
|
+
var l = !i.static && ye(i, "constructor"), m = l && e;
|
|
752
|
+
l && u !== "method" && this.raise(i.key.start, "Constructor can't have get/set modifier"), i.kind = l ? "constructor" : u, this.parseClassMethod(i, r, o, m);
|
|
703
753
|
} else this.parseClassField(i);
|
|
704
754
|
return i;
|
|
705
755
|
};
|
|
@@ -711,24 +761,24 @@ d.parseClassElementName = function(e) {
|
|
|
711
761
|
};
|
|
712
762
|
d.parseClassMethod = function(e, t, i, s) {
|
|
713
763
|
var r = e.key;
|
|
714
|
-
e.kind === "constructor" ? (t && this.raise(r.start, "Constructor can't be a generator"), i && this.raise(r.start, "Constructor can't be an async method")) : e.static &&
|
|
715
|
-
var
|
|
716
|
-
return e.kind === "get" &&
|
|
764
|
+
e.kind === "constructor" ? (t && this.raise(r.start, "Constructor can't be a generator"), i && this.raise(r.start, "Constructor can't be an async method")) : e.static && ye(e, "prototype") && this.raise(r.start, "Classes may not have a static property named prototype");
|
|
765
|
+
var o = e.value = this.parseMethod(t, i, s);
|
|
766
|
+
return e.kind === "get" && o.params.length !== 0 && this.raiseRecoverable(o.start, "getter should have no params"), e.kind === "set" && o.params.length !== 1 && this.raiseRecoverable(o.start, "setter should have exactly one param"), e.kind === "set" && o.params[0].type === "RestElement" && this.raiseRecoverable(o.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
|
|
717
767
|
};
|
|
718
768
|
d.parseClassField = function(e) {
|
|
719
|
-
return
|
|
769
|
+
return ye(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && ye(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(a.eq) ? (this.enterScope(ue | Se), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition");
|
|
720
770
|
};
|
|
721
771
|
d.parseClassStaticBlock = function(e) {
|
|
722
772
|
e.body = [];
|
|
723
773
|
var t = this.labels;
|
|
724
|
-
for (this.labels = [], this.enterScope(
|
|
774
|
+
for (this.labels = [], this.enterScope(z | Se); this.type !== a.braceR; ) {
|
|
725
775
|
var i = this.parseStatement(null);
|
|
726
776
|
e.body.push(i);
|
|
727
777
|
}
|
|
728
778
|
return this.next(), this.exitScope(), this.labels = t, this.finishNode(e, "StaticBlock");
|
|
729
779
|
};
|
|
730
780
|
d.parseClassId = function(e, t) {
|
|
731
|
-
this.type === a.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id,
|
|
781
|
+
this.type === a.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id, K, false)) : (t === true && this.unexpected(), e.id = null);
|
|
732
782
|
};
|
|
733
783
|
d.parseClassSuper = function(e) {
|
|
734
784
|
e.superClass = this.eat(a._extends) ? this.parseExprSubscripts(null, false) : null;
|
|
@@ -739,16 +789,16 @@ d.enterClassBody = function() {
|
|
|
739
789
|
};
|
|
740
790
|
d.exitClassBody = function() {
|
|
741
791
|
var e = this.privateNameStack.pop(), t = e.declared, i = e.used;
|
|
742
|
-
if (this.options.checkPrivateFields) for (var s = this.privateNameStack.length, r = s === 0 ? null : this.privateNameStack[s - 1],
|
|
743
|
-
var
|
|
744
|
-
$(t,
|
|
792
|
+
if (this.options.checkPrivateFields) for (var s = this.privateNameStack.length, r = s === 0 ? null : this.privateNameStack[s - 1], o = 0; o < i.length; ++o) {
|
|
793
|
+
var u = i[o];
|
|
794
|
+
$(t, u.name) || (r ? r.used.push(u) : this.raiseRecoverable(u.start, "Private field '#" + u.name + "' must be declared in an enclosing class"));
|
|
745
795
|
}
|
|
746
796
|
};
|
|
747
|
-
function
|
|
797
|
+
function $i(e, t) {
|
|
748
798
|
var i = t.key.name, s = e[i], r = "true";
|
|
749
799
|
return t.type === "MethodDefinition" && (t.kind === "get" || t.kind === "set") && (r = (t.static ? "s" : "i") + t.kind), s === "iget" && r === "iset" || s === "iset" && r === "iget" || s === "sget" && r === "sset" || s === "sset" && r === "sget" ? (e[i] = "true", false) : s ? true : (e[i] = r, false);
|
|
750
800
|
}
|
|
751
|
-
function
|
|
801
|
+
function ye(e, t) {
|
|
752
802
|
var i = e.computed, s = e.key;
|
|
753
803
|
return !i && (s.type === "Identifier" && s.name === t || s.type === "Literal" && s.value === t);
|
|
754
804
|
}
|
|
@@ -779,7 +829,7 @@ d.parseExportDefaultDeclaration = function() {
|
|
|
779
829
|
var e;
|
|
780
830
|
if (this.type === a._function || (e = this.isAsyncFunction())) {
|
|
781
831
|
var t = this.startNode();
|
|
782
|
-
return this.next(), e && this.next(), this.parseFunction(t,
|
|
832
|
+
return this.next(), e && this.next(), this.parseFunction(t, ae | At, false, e);
|
|
783
833
|
} else if (this.type === a._class) {
|
|
784
834
|
var i = this.startNode();
|
|
785
835
|
return this.parseClass(i, "nullableID");
|
|
@@ -795,12 +845,12 @@ d.checkPatternExport = function(e, t) {
|
|
|
795
845
|
var i = t.type;
|
|
796
846
|
if (i === "Identifier") this.checkExport(e, t, t.start);
|
|
797
847
|
else if (i === "ObjectPattern") for (var s = 0, r = t.properties; s < r.length; s += 1) {
|
|
798
|
-
var
|
|
799
|
-
this.checkPatternExport(e,
|
|
848
|
+
var o = r[s];
|
|
849
|
+
this.checkPatternExport(e, o);
|
|
800
850
|
}
|
|
801
|
-
else if (i === "ArrayPattern") for (var
|
|
802
|
-
var
|
|
803
|
-
|
|
851
|
+
else if (i === "ArrayPattern") for (var u = 0, p = t.elements; u < p.length; u += 1) {
|
|
852
|
+
var h = p[u];
|
|
853
|
+
h && this.checkPatternExport(e, h);
|
|
804
854
|
}
|
|
805
855
|
else i === "Property" ? this.checkPatternExport(e, t.value) : i === "AssignmentPattern" ? this.checkPatternExport(e, t.left) : i === "RestElement" && this.checkPatternExport(e, t.argument);
|
|
806
856
|
};
|
|
@@ -827,19 +877,19 @@ d.parseExportSpecifiers = function(e) {
|
|
|
827
877
|
return t;
|
|
828
878
|
};
|
|
829
879
|
d.parseImport = function(e) {
|
|
830
|
-
return this.next(), this.type === a.string ? (e.specifiers =
|
|
880
|
+
return this.next(), this.type === a.string ? (e.specifiers = Yi, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === a.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration");
|
|
831
881
|
};
|
|
832
882
|
d.parseImportSpecifier = function() {
|
|
833
883
|
var e = this.startNode();
|
|
834
|
-
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local,
|
|
884
|
+
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local, K), this.finishNode(e, "ImportSpecifier");
|
|
835
885
|
};
|
|
836
886
|
d.parseImportDefaultSpecifier = function() {
|
|
837
887
|
var e = this.startNode();
|
|
838
|
-
return e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
888
|
+
return e.local = this.parseIdent(), this.checkLValSimple(e.local, K), this.finishNode(e, "ImportDefaultSpecifier");
|
|
839
889
|
};
|
|
840
890
|
d.parseImportNamespaceSpecifier = function() {
|
|
841
891
|
var e = this.startNode();
|
|
842
|
-
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
892
|
+
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local, K), this.finishNode(e, "ImportNamespaceSpecifier");
|
|
843
893
|
};
|
|
844
894
|
d.parseImportSpecifiers = function() {
|
|
845
895
|
var e = [], t = true;
|
|
@@ -871,7 +921,7 @@ d.parseImportAttribute = function() {
|
|
|
871
921
|
d.parseModuleExportName = function() {
|
|
872
922
|
if (this.options.ecmaVersion >= 13 && this.type === a.string) {
|
|
873
923
|
var e = this.parseLiteral(this.value);
|
|
874
|
-
return
|
|
924
|
+
return Hi.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
875
925
|
}
|
|
876
926
|
return this.parseIdent(true);
|
|
877
927
|
};
|
|
@@ -881,7 +931,7 @@ d.adaptDirectivePrologue = function(e) {
|
|
|
881
931
|
d.isDirectiveCandidate = function(e) {
|
|
882
932
|
return this.options.ecmaVersion >= 5 && e.type === "ExpressionStatement" && e.expression.type === "Literal" && typeof e.expression.value == "string" && (this.input[e.start] === '"' || this.input[e.start] === "'");
|
|
883
933
|
};
|
|
884
|
-
var D =
|
|
934
|
+
var D = A.prototype;
|
|
885
935
|
D.toAssignable = function(e, t, i) {
|
|
886
936
|
if (this.options.ecmaVersion >= 6 && e) switch (e.type) {
|
|
887
937
|
case "Identifier":
|
|
@@ -895,8 +945,8 @@ D.toAssignable = function(e, t, i) {
|
|
|
895
945
|
case "ObjectExpression":
|
|
896
946
|
e.type = "ObjectPattern", i && this.checkPatternErrors(i, true);
|
|
897
947
|
for (var s = 0, r = e.properties; s < r.length; s += 1) {
|
|
898
|
-
var
|
|
899
|
-
this.toAssignable(
|
|
948
|
+
var o = r[s];
|
|
949
|
+
this.toAssignable(o, t), o.type === "RestElement" && (o.argument.type === "ArrayPattern" || o.argument.type === "ObjectPattern") && this.raise(o.argument.start, "Unexpected token");
|
|
900
950
|
}
|
|
901
951
|
break;
|
|
902
952
|
case "Property":
|
|
@@ -931,8 +981,8 @@ D.toAssignableList = function(e, t) {
|
|
|
931
981
|
r && this.toAssignable(r, t);
|
|
932
982
|
}
|
|
933
983
|
if (i) {
|
|
934
|
-
var
|
|
935
|
-
this.options.ecmaVersion === 6 && t &&
|
|
984
|
+
var o = e[i - 1];
|
|
985
|
+
this.options.ecmaVersion === 6 && t && o && o.type === "RestElement" && o.argument.type !== "Identifier" && this.unexpected(o.argument.start);
|
|
936
986
|
}
|
|
937
987
|
return e;
|
|
938
988
|
};
|
|
@@ -955,12 +1005,12 @@ D.parseBindingAtom = function() {
|
|
|
955
1005
|
return this.parseIdent();
|
|
956
1006
|
};
|
|
957
1007
|
D.parseBindingList = function(e, t, i, s) {
|
|
958
|
-
for (var r = [],
|
|
1008
|
+
for (var r = [], o = true; !this.eat(e); ) if (o ? o = false : this.expect(a.comma), t && this.type === a.comma) r.push(null);
|
|
959
1009
|
else {
|
|
960
1010
|
if (i && this.afterTrailingComma(e)) break;
|
|
961
1011
|
if (this.type === a.ellipsis) {
|
|
962
|
-
var
|
|
963
|
-
this.parseBindingListItem(
|
|
1012
|
+
var u = this.parseRestBinding();
|
|
1013
|
+
this.parseBindingListItem(u), r.push(u), this.type === a.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.expect(e);
|
|
964
1014
|
break;
|
|
965
1015
|
} else r.push(this.parseAssignableListItem(s));
|
|
966
1016
|
}
|
|
@@ -979,11 +1029,11 @@ D.parseMaybeDefault = function(e, t, i) {
|
|
|
979
1029
|
return s.left = i, s.right = this.parseMaybeAssign(), this.finishNode(s, "AssignmentPattern");
|
|
980
1030
|
};
|
|
981
1031
|
D.checkLValSimple = function(e, t, i) {
|
|
982
|
-
t === void 0 && (t =
|
|
983
|
-
var s = t !==
|
|
1032
|
+
t === void 0 && (t = xe);
|
|
1033
|
+
var s = t !== xe;
|
|
984
1034
|
switch (e.type) {
|
|
985
1035
|
case "Identifier":
|
|
986
|
-
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (s ? "Binding " : "Assigning to ") + e.name + " in strict mode"), s && (t ===
|
|
1036
|
+
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (s ? "Binding " : "Assigning to ") + e.name + " in strict mode"), s && (t === K && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && ($(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = true), t !== Et && this.declareName(e.name, t, e.start));
|
|
987
1037
|
break;
|
|
988
1038
|
case "ChainExpression":
|
|
989
1039
|
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -998,17 +1048,17 @@ D.checkLValSimple = function(e, t, i) {
|
|
|
998
1048
|
}
|
|
999
1049
|
};
|
|
1000
1050
|
D.checkLValPattern = function(e, t, i) {
|
|
1001
|
-
switch (t === void 0 && (t =
|
|
1051
|
+
switch (t === void 0 && (t = xe), e.type) {
|
|
1002
1052
|
case "ObjectPattern":
|
|
1003
1053
|
for (var s = 0, r = e.properties; s < r.length; s += 1) {
|
|
1004
|
-
var
|
|
1005
|
-
this.checkLValInnerPattern(
|
|
1054
|
+
var o = r[s];
|
|
1055
|
+
this.checkLValInnerPattern(o, t, i);
|
|
1006
1056
|
}
|
|
1007
1057
|
break;
|
|
1008
1058
|
case "ArrayPattern":
|
|
1009
|
-
for (var
|
|
1010
|
-
var
|
|
1011
|
-
|
|
1059
|
+
for (var u = 0, p = e.elements; u < p.length; u += 1) {
|
|
1060
|
+
var h = p[u];
|
|
1061
|
+
h && this.checkLValInnerPattern(h, t, i);
|
|
1012
1062
|
}
|
|
1013
1063
|
break;
|
|
1014
1064
|
default:
|
|
@@ -1016,7 +1066,7 @@ D.checkLValPattern = function(e, t, i) {
|
|
|
1016
1066
|
}
|
|
1017
1067
|
};
|
|
1018
1068
|
D.checkLValInnerPattern = function(e, t, i) {
|
|
1019
|
-
switch (t === void 0 && (t =
|
|
1069
|
+
switch (t === void 0 && (t = xe), e.type) {
|
|
1020
1070
|
case "Property":
|
|
1021
1071
|
this.checkLValInnerPattern(e.value, t, i);
|
|
1022
1072
|
break;
|
|
@@ -1030,20 +1080,22 @@ D.checkLValInnerPattern = function(e, t, i) {
|
|
|
1030
1080
|
this.checkLValPattern(e, t, i);
|
|
1031
1081
|
}
|
|
1032
1082
|
};
|
|
1033
|
-
var F = function(t, i, s, r,
|
|
1034
|
-
this.token = t, this.isExpr = !!i, this.preserveSpace = !!s, this.override = r, this.generator = !!
|
|
1035
|
-
}
|
|
1083
|
+
var F = function(t, i, s, r, o) {
|
|
1084
|
+
this.token = t, this.isExpr = !!i, this.preserveSpace = !!s, this.override = r, this.generator = !!o;
|
|
1085
|
+
};
|
|
1086
|
+
var T = { b_stat: new F("{", false), b_expr: new F("{", true), b_tmpl: new F("${", false), p_stat: new F("(", false), p_expr: new F("(", true), q_tmpl: new F("`", true, true, function(e) {
|
|
1036
1087
|
return e.tryReadTemplateToken();
|
|
1037
|
-
}), f_stat: new F("function", false), f_expr: new F("function", true), f_expr_gen: new F("function", true, false, null, true), f_gen: new F("function", false, false, null, true) }
|
|
1088
|
+
}), f_stat: new F("function", false), f_expr: new F("function", true), f_expr_gen: new F("function", true, false, null, true), f_gen: new F("function", false, false, null, true) };
|
|
1089
|
+
var ee = A.prototype;
|
|
1038
1090
|
ee.initialContext = function() {
|
|
1039
|
-
return [
|
|
1091
|
+
return [T.b_stat];
|
|
1040
1092
|
};
|
|
1041
1093
|
ee.curContext = function() {
|
|
1042
1094
|
return this.context[this.context.length - 1];
|
|
1043
1095
|
};
|
|
1044
1096
|
ee.braceIsBlock = function(e) {
|
|
1045
1097
|
var t = this.curContext();
|
|
1046
|
-
return t ===
|
|
1098
|
+
return t === T.f_expr || t === T.f_stat ? true : e === a.colon && (t === T.b_stat || t === T.b_expr) ? !t.isExpr : e === a._return || e === a.name && this.exprAllowed ? L.test(this.input.slice(this.lastTokEnd, this.start)) : e === a._else || e === a.semi || e === a.eof || e === a.parenR || e === a.arrow ? true : e === a.braceL ? t === T.b_stat : e === a._var || e === a._const || e === a.name ? false : !this.exprAllowed;
|
|
1047
1099
|
};
|
|
1048
1100
|
ee.inGeneratorContext = function() {
|
|
1049
1101
|
for (var e = this.context.length - 1; e >= 1; e--) {
|
|
@@ -1065,33 +1117,33 @@ a.parenR.updateContext = a.braceR.updateContext = function() {
|
|
|
1065
1117
|
return;
|
|
1066
1118
|
}
|
|
1067
1119
|
var e = this.context.pop();
|
|
1068
|
-
e ===
|
|
1120
|
+
e === T.b_stat && this.curContext().token === "function" && (e = this.context.pop()), this.exprAllowed = !e.isExpr;
|
|
1069
1121
|
};
|
|
1070
1122
|
a.braceL.updateContext = function(e) {
|
|
1071
|
-
this.context.push(this.braceIsBlock(e) ?
|
|
1123
|
+
this.context.push(this.braceIsBlock(e) ? T.b_stat : T.b_expr), this.exprAllowed = true;
|
|
1072
1124
|
};
|
|
1073
1125
|
a.dollarBraceL.updateContext = function() {
|
|
1074
|
-
this.context.push(
|
|
1126
|
+
this.context.push(T.b_tmpl), this.exprAllowed = true;
|
|
1075
1127
|
};
|
|
1076
1128
|
a.parenL.updateContext = function(e) {
|
|
1077
1129
|
var t = e === a._if || e === a._for || e === a._with || e === a._while;
|
|
1078
|
-
this.context.push(t ?
|
|
1130
|
+
this.context.push(t ? T.p_stat : T.p_expr), this.exprAllowed = true;
|
|
1079
1131
|
};
|
|
1080
1132
|
a.incDec.updateContext = function() {
|
|
1081
1133
|
};
|
|
1082
1134
|
a._function.updateContext = a._class.updateContext = function(e) {
|
|
1083
|
-
e.beforeExpr && e !== a._else && !(e === a.semi && this.curContext() !==
|
|
1135
|
+
e.beforeExpr && e !== a._else && !(e === a.semi && this.curContext() !== T.p_stat) && !(e === a._return && L.test(this.input.slice(this.lastTokEnd, this.start))) && !((e === a.colon || e === a.braceL) && this.curContext() === T.b_stat) ? this.context.push(T.f_expr) : this.context.push(T.f_stat), this.exprAllowed = false;
|
|
1084
1136
|
};
|
|
1085
1137
|
a.colon.updateContext = function() {
|
|
1086
1138
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = true;
|
|
1087
1139
|
};
|
|
1088
1140
|
a.backQuote.updateContext = function() {
|
|
1089
|
-
this.curContext() ===
|
|
1141
|
+
this.curContext() === T.q_tmpl ? this.context.pop() : this.context.push(T.q_tmpl), this.exprAllowed = false;
|
|
1090
1142
|
};
|
|
1091
1143
|
a.star.updateContext = function(e) {
|
|
1092
1144
|
if (e === a._function) {
|
|
1093
1145
|
var t = this.context.length - 1;
|
|
1094
|
-
this.context[t] ===
|
|
1146
|
+
this.context[t] === T.f_expr ? this.context[t] = T.f_expr_gen : this.context[t] = T.f_gen;
|
|
1095
1147
|
}
|
|
1096
1148
|
this.exprAllowed = true;
|
|
1097
1149
|
};
|
|
@@ -1099,8 +1151,8 @@ a.name.updateContext = function(e) {
|
|
|
1099
1151
|
var t = false;
|
|
1100
1152
|
this.options.ecmaVersion >= 6 && e !== a.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (t = true), this.exprAllowed = t;
|
|
1101
1153
|
};
|
|
1102
|
-
var
|
|
1103
|
-
|
|
1154
|
+
var g = A.prototype;
|
|
1155
|
+
g.checkPropClash = function(e, t, i) {
|
|
1104
1156
|
if (!(this.options.ecmaVersion >= 9 && e.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (e.computed || e.method || e.shorthand))) {
|
|
1105
1157
|
var s = e.key, r;
|
|
1106
1158
|
switch (s.type) {
|
|
@@ -1113,147 +1165,147 @@ y.checkPropClash = function(e, t, i) {
|
|
|
1113
1165
|
default:
|
|
1114
1166
|
return;
|
|
1115
1167
|
}
|
|
1116
|
-
var
|
|
1168
|
+
var o = e.kind;
|
|
1117
1169
|
if (this.options.ecmaVersion >= 6) {
|
|
1118
|
-
r === "__proto__" &&
|
|
1170
|
+
r === "__proto__" && o === "init" && (t.proto && (i ? i.doubleProto < 0 && (i.doubleProto = s.start) : this.raiseRecoverable(s.start, "Redefinition of __proto__ property")), t.proto = true);
|
|
1119
1171
|
return;
|
|
1120
1172
|
}
|
|
1121
1173
|
r = "$" + r;
|
|
1122
|
-
var
|
|
1123
|
-
if (
|
|
1174
|
+
var u = t[r];
|
|
1175
|
+
if (u) {
|
|
1124
1176
|
var p;
|
|
1125
|
-
|
|
1126
|
-
} else
|
|
1127
|
-
o
|
|
1177
|
+
o === "init" ? p = this.strict && u.init || u.get || u.set : p = u.init || u[o], p && this.raiseRecoverable(s.start, "Redefinition of property");
|
|
1178
|
+
} else u = t[r] = { init: false, get: false, set: false };
|
|
1179
|
+
u[o] = true;
|
|
1128
1180
|
}
|
|
1129
1181
|
};
|
|
1130
|
-
|
|
1182
|
+
g.parseExpression = function(e, t) {
|
|
1131
1183
|
var i = this.start, s = this.startLoc, r = this.parseMaybeAssign(e, t);
|
|
1132
1184
|
if (this.type === a.comma) {
|
|
1133
|
-
var
|
|
1134
|
-
for (
|
|
1135
|
-
return this.finishNode(
|
|
1185
|
+
var o = this.startNodeAt(i, s);
|
|
1186
|
+
for (o.expressions = [r]; this.eat(a.comma); ) o.expressions.push(this.parseMaybeAssign(e, t));
|
|
1187
|
+
return this.finishNode(o, "SequenceExpression");
|
|
1136
1188
|
}
|
|
1137
1189
|
return r;
|
|
1138
1190
|
};
|
|
1139
|
-
|
|
1191
|
+
g.parseMaybeAssign = function(e, t, i) {
|
|
1140
1192
|
if (this.isContextual("yield")) {
|
|
1141
1193
|
if (this.inGenerator) return this.parseYield(e);
|
|
1142
1194
|
this.exprAllowed = false;
|
|
1143
1195
|
}
|
|
1144
|
-
var s = false, r = -1,
|
|
1145
|
-
t ? (r = t.parenthesizedAssign,
|
|
1146
|
-
var p = this.start,
|
|
1196
|
+
var s = false, r = -1, o = -1, u = -1;
|
|
1197
|
+
t ? (r = t.parenthesizedAssign, o = t.trailingComma, u = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new Ce(), s = true);
|
|
1198
|
+
var p = this.start, h = this.startLoc;
|
|
1147
1199
|
(this.type === a.parenL || this.type === a.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
1148
|
-
var
|
|
1149
|
-
if (i && (
|
|
1150
|
-
var
|
|
1151
|
-
return
|
|
1200
|
+
var l = this.parseMaybeConditional(e, t);
|
|
1201
|
+
if (i && (l = i.call(this, l, p, h)), this.type.isAssign) {
|
|
1202
|
+
var m = this.startNodeAt(p, h);
|
|
1203
|
+
return m.operator = this.value, this.type === a.eq && (l = this.toAssignable(l, false, t)), s || (t.parenthesizedAssign = t.trailingComma = t.doubleProto = -1), t.shorthandAssign >= l.start && (t.shorthandAssign = -1), this.type === a.eq ? this.checkLValPattern(l) : this.checkLValSimple(l), m.left = l, this.next(), m.right = this.parseMaybeAssign(e), u > -1 && (t.doubleProto = u), this.finishNode(m, "AssignmentExpression");
|
|
1152
1204
|
} else s && this.checkExpressionErrors(t, true);
|
|
1153
|
-
return r > -1 && (t.parenthesizedAssign = r),
|
|
1205
|
+
return r > -1 && (t.parenthesizedAssign = r), o > -1 && (t.trailingComma = o), l;
|
|
1154
1206
|
};
|
|
1155
|
-
|
|
1207
|
+
g.parseMaybeConditional = function(e, t) {
|
|
1156
1208
|
var i = this.start, s = this.startLoc, r = this.parseExprOps(e, t);
|
|
1157
1209
|
if (this.checkExpressionErrors(t)) return r;
|
|
1158
1210
|
if (this.eat(a.question)) {
|
|
1159
|
-
var
|
|
1160
|
-
return
|
|
1211
|
+
var o = this.startNodeAt(i, s);
|
|
1212
|
+
return o.test = r, o.consequent = this.parseMaybeAssign(), this.expect(a.colon), o.alternate = this.parseMaybeAssign(e), this.finishNode(o, "ConditionalExpression");
|
|
1161
1213
|
}
|
|
1162
1214
|
return r;
|
|
1163
1215
|
};
|
|
1164
|
-
|
|
1216
|
+
g.parseExprOps = function(e, t) {
|
|
1165
1217
|
var i = this.start, s = this.startLoc, r = this.parseMaybeUnary(t, false, false, e);
|
|
1166
1218
|
return this.checkExpressionErrors(t) || r.start === i && r.type === "ArrowFunctionExpression" ? r : this.parseExprOp(r, i, s, -1, e);
|
|
1167
1219
|
};
|
|
1168
|
-
|
|
1169
|
-
var
|
|
1170
|
-
if (
|
|
1171
|
-
var
|
|
1172
|
-
p && (
|
|
1173
|
-
var
|
|
1220
|
+
g.parseExprOp = function(e, t, i, s, r) {
|
|
1221
|
+
var o = this.type.binop;
|
|
1222
|
+
if (o != null && (!r || this.type !== a._in) && o > s) {
|
|
1223
|
+
var u = this.type === a.logicalOR || this.type === a.logicalAND, p = this.type === a.coalesce;
|
|
1224
|
+
p && (o = a.logicalAND.binop);
|
|
1225
|
+
var h = this.value;
|
|
1174
1226
|
this.next();
|
|
1175
|
-
var
|
|
1176
|
-
return (
|
|
1227
|
+
var l = this.start, m = this.startLoc, S = this.parseExprOp(this.parseMaybeUnary(null, false, false, r), l, m, o, r), E = this.buildBinary(t, i, e, S, h, u || p);
|
|
1228
|
+
return (u && this.type === a.coalesce || p && (this.type === a.logicalOR || this.type === a.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(E, t, i, s, r);
|
|
1177
1229
|
}
|
|
1178
1230
|
return e;
|
|
1179
1231
|
};
|
|
1180
|
-
|
|
1232
|
+
g.buildBinary = function(e, t, i, s, r, o) {
|
|
1181
1233
|
s.type === "PrivateIdentifier" && this.raise(s.start, "Private identifier can only be left side of binary expression");
|
|
1182
|
-
var
|
|
1183
|
-
return
|
|
1234
|
+
var u = this.startNodeAt(e, t);
|
|
1235
|
+
return u.left = i, u.operator = r, u.right = s, this.finishNode(u, o ? "LogicalExpression" : "BinaryExpression");
|
|
1184
1236
|
};
|
|
1185
|
-
|
|
1186
|
-
var r = this.start,
|
|
1187
|
-
if (this.isContextual("await") && this.canAwait)
|
|
1237
|
+
g.parseMaybeUnary = function(e, t, i, s) {
|
|
1238
|
+
var r = this.start, o = this.startLoc, u;
|
|
1239
|
+
if (this.isContextual("await") && this.canAwait) u = this.parseAwait(s), t = true;
|
|
1188
1240
|
else if (this.type.prefix) {
|
|
1189
|
-
var p = this.startNode(),
|
|
1190
|
-
p.operator = this.value, p.prefix = true, this.next(), p.argument = this.parseMaybeUnary(null, true,
|
|
1191
|
-
} else if (!t && this.type === a.privateId) (s || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(),
|
|
1241
|
+
var p = this.startNode(), h = this.type === a.incDec;
|
|
1242
|
+
p.operator = this.value, p.prefix = true, this.next(), p.argument = this.parseMaybeUnary(null, true, h, s), this.checkExpressionErrors(e, true), h ? this.checkLValSimple(p.argument) : this.strict && p.operator === "delete" && kt(p.argument) ? this.raiseRecoverable(p.start, "Deleting local variable in strict mode") : p.operator === "delete" && qe(p.argument) ? this.raiseRecoverable(p.start, "Private fields can not be deleted") : t = true, u = this.finishNode(p, h ? "UpdateExpression" : "UnaryExpression");
|
|
1243
|
+
} else if (!t && this.type === a.privateId) (s || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), u = this.parsePrivateIdent(), this.type !== a._in && this.unexpected();
|
|
1192
1244
|
else {
|
|
1193
|
-
if (
|
|
1245
|
+
if (u = this.parseExprSubscripts(e, s), this.checkExpressionErrors(e)) return u;
|
|
1194
1246
|
for (; this.type.postfix && !this.canInsertSemicolon(); ) {
|
|
1195
|
-
var
|
|
1196
|
-
|
|
1247
|
+
var l = this.startNodeAt(r, o);
|
|
1248
|
+
l.operator = this.value, l.prefix = false, l.argument = u, this.checkLValSimple(u), this.next(), u = this.finishNode(l, "UpdateExpression");
|
|
1197
1249
|
}
|
|
1198
1250
|
}
|
|
1199
1251
|
if (!i && this.eat(a.starstar)) if (t) this.unexpected(this.lastTokStart);
|
|
1200
|
-
else return this.buildBinary(r,
|
|
1201
|
-
else return
|
|
1252
|
+
else return this.buildBinary(r, o, u, this.parseMaybeUnary(null, false, false, s), "**", false);
|
|
1253
|
+
else return u;
|
|
1202
1254
|
};
|
|
1203
1255
|
function kt(e) {
|
|
1204
1256
|
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && kt(e.expression);
|
|
1205
1257
|
}
|
|
1206
|
-
function
|
|
1207
|
-
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" &&
|
|
1258
|
+
function qe(e) {
|
|
1259
|
+
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && qe(e.expression) || e.type === "ParenthesizedExpression" && qe(e.expression);
|
|
1208
1260
|
}
|
|
1209
|
-
|
|
1261
|
+
g.parseExprSubscripts = function(e, t) {
|
|
1210
1262
|
var i = this.start, s = this.startLoc, r = this.parseExprAtom(e, t);
|
|
1211
1263
|
if (r.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") return r;
|
|
1212
|
-
var
|
|
1213
|
-
return e &&
|
|
1214
|
-
};
|
|
1215
|
-
|
|
1216
|
-
for (var
|
|
1217
|
-
var p = this.parseSubscript(e, t, i, s,
|
|
1218
|
-
if (p.optional && (
|
|
1219
|
-
if (
|
|
1220
|
-
var
|
|
1221
|
-
|
|
1264
|
+
var o = this.parseSubscripts(r, i, s, false, t);
|
|
1265
|
+
return e && o.type === "MemberExpression" && (e.parenthesizedAssign >= o.start && (e.parenthesizedAssign = -1), e.parenthesizedBind >= o.start && (e.parenthesizedBind = -1), e.trailingComma >= o.start && (e.trailingComma = -1)), o;
|
|
1266
|
+
};
|
|
1267
|
+
g.parseSubscripts = function(e, t, i, s, r) {
|
|
1268
|
+
for (var o = this.options.ecmaVersion >= 8 && e.type === "Identifier" && e.name === "async" && this.lastTokEnd === e.end && !this.canInsertSemicolon() && e.end - e.start === 5 && this.potentialArrowAt === e.start, u = false; ; ) {
|
|
1269
|
+
var p = this.parseSubscript(e, t, i, s, o, u, r);
|
|
1270
|
+
if (p.optional && (u = true), p === e || p.type === "ArrowFunctionExpression") {
|
|
1271
|
+
if (u) {
|
|
1272
|
+
var h = this.startNodeAt(t, i);
|
|
1273
|
+
h.expression = p, p = this.finishNode(h, "ChainExpression");
|
|
1222
1274
|
}
|
|
1223
1275
|
return p;
|
|
1224
1276
|
}
|
|
1225
1277
|
e = p;
|
|
1226
1278
|
}
|
|
1227
1279
|
};
|
|
1228
|
-
|
|
1280
|
+
g.shouldParseAsyncArrow = function() {
|
|
1229
1281
|
return !this.canInsertSemicolon() && this.eat(a.arrow);
|
|
1230
1282
|
};
|
|
1231
|
-
|
|
1283
|
+
g.parseSubscriptAsyncArrow = function(e, t, i, s) {
|
|
1232
1284
|
return this.parseArrowExpression(this.startNodeAt(e, t), i, true, s);
|
|
1233
1285
|
};
|
|
1234
|
-
|
|
1235
|
-
var p = this.options.ecmaVersion >= 11,
|
|
1236
|
-
s &&
|
|
1237
|
-
var
|
|
1238
|
-
if (
|
|
1239
|
-
var
|
|
1240
|
-
|
|
1286
|
+
g.parseSubscript = function(e, t, i, s, r, o, u) {
|
|
1287
|
+
var p = this.options.ecmaVersion >= 11, h = p && this.eat(a.questionDot);
|
|
1288
|
+
s && h && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
1289
|
+
var l = this.eat(a.bracketL);
|
|
1290
|
+
if (l || h && this.type !== a.parenL && this.type !== a.backQuote || this.eat(a.dot)) {
|
|
1291
|
+
var m = this.startNodeAt(t, i);
|
|
1292
|
+
m.object = e, l ? (m.property = this.parseExpression(), this.expect(a.bracketR)) : this.type === a.privateId && e.type !== "Super" ? m.property = this.parsePrivateIdent() : m.property = this.parseIdent(this.options.allowReserved !== "never"), m.computed = !!l, p && (m.optional = h), e = this.finishNode(m, "MemberExpression");
|
|
1241
1293
|
} else if (!s && this.eat(a.parenL)) {
|
|
1242
|
-
var
|
|
1294
|
+
var S = new Ce(), E = this.yieldPos, c = this.awaitPos, x = this.awaitIdentPos;
|
|
1243
1295
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1244
|
-
var
|
|
1245
|
-
if (r && !
|
|
1246
|
-
this.checkExpressionErrors(
|
|
1247
|
-
var
|
|
1248
|
-
|
|
1296
|
+
var y = this.parseExprList(a.parenR, this.options.ecmaVersion >= 8, false, S);
|
|
1297
|
+
if (r && !h && this.shouldParseAsyncArrow()) return this.checkPatternErrors(S, false), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = E, this.awaitPos = c, this.awaitIdentPos = x, this.parseSubscriptAsyncArrow(t, i, y, u);
|
|
1298
|
+
this.checkExpressionErrors(S, true), this.yieldPos = E || this.yieldPos, this.awaitPos = c || this.awaitPos, this.awaitIdentPos = x || this.awaitIdentPos;
|
|
1299
|
+
var v = this.startNodeAt(t, i);
|
|
1300
|
+
v.callee = e, v.arguments = y, p && (v.optional = h), e = this.finishNode(v, "CallExpression");
|
|
1249
1301
|
} else if (this.type === a.backQuote) {
|
|
1250
|
-
(
|
|
1251
|
-
var
|
|
1252
|
-
|
|
1302
|
+
(h || o) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
1303
|
+
var I = this.startNodeAt(t, i);
|
|
1304
|
+
I.tag = e, I.quasi = this.parseTemplate({ isTagged: true }), e = this.finishNode(I, "TaggedTemplateExpression");
|
|
1253
1305
|
}
|
|
1254
1306
|
return e;
|
|
1255
1307
|
};
|
|
1256
|
-
|
|
1308
|
+
g.parseExprAtom = function(e, t, i) {
|
|
1257
1309
|
this.type === a.slash && this.readRegexp();
|
|
1258
1310
|
var s, r = this.potentialArrowAt === this.start;
|
|
1259
1311
|
switch (this.type) {
|
|
@@ -1262,16 +1314,16 @@ y.parseExprAtom = function(e, t, i) {
|
|
|
1262
1314
|
case a._this:
|
|
1263
1315
|
return s = this.startNode(), this.next(), this.finishNode(s, "ThisExpression");
|
|
1264
1316
|
case a.name:
|
|
1265
|
-
var
|
|
1266
|
-
if (this.options.ecmaVersion >= 8 && !p &&
|
|
1317
|
+
var o = this.start, u = this.startLoc, p = this.containsEsc, h = this.parseIdent(false);
|
|
1318
|
+
if (this.options.ecmaVersion >= 8 && !p && h.name === "async" && !this.canInsertSemicolon() && this.eat(a._function)) return this.overrideContext(T.f_expr), this.parseFunction(this.startNodeAt(o, u), 0, false, true, t);
|
|
1267
1319
|
if (r && !this.canInsertSemicolon()) {
|
|
1268
|
-
if (this.eat(a.arrow)) return this.parseArrowExpression(this.startNodeAt(
|
|
1269
|
-
if (this.options.ecmaVersion >= 8 &&
|
|
1320
|
+
if (this.eat(a.arrow)) return this.parseArrowExpression(this.startNodeAt(o, u), [h], false, t);
|
|
1321
|
+
if (this.options.ecmaVersion >= 8 && h.name === "async" && this.type === a.name && !p && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) return h = this.parseIdent(false), (this.canInsertSemicolon() || !this.eat(a.arrow)) && this.unexpected(), this.parseArrowExpression(this.startNodeAt(o, u), [h], true, t);
|
|
1270
1322
|
}
|
|
1271
|
-
return
|
|
1323
|
+
return h;
|
|
1272
1324
|
case a.regexp:
|
|
1273
|
-
var
|
|
1274
|
-
return s = this.parseLiteral(
|
|
1325
|
+
var l = this.value;
|
|
1326
|
+
return s = this.parseLiteral(l.value), s.regex = { pattern: l.pattern, flags: l.flags }, s;
|
|
1275
1327
|
case a.num:
|
|
1276
1328
|
case a.string:
|
|
1277
1329
|
return this.parseLiteral(this.value);
|
|
@@ -1280,12 +1332,12 @@ y.parseExprAtom = function(e, t, i) {
|
|
|
1280
1332
|
case a._false:
|
|
1281
1333
|
return s = this.startNode(), s.value = this.type === a._null ? null : this.type === a._true, s.raw = this.type.keyword, this.next(), this.finishNode(s, "Literal");
|
|
1282
1334
|
case a.parenL:
|
|
1283
|
-
var
|
|
1284
|
-
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(
|
|
1335
|
+
var m = this.start, S = this.parseParenAndDistinguishExpression(r, t);
|
|
1336
|
+
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(S) && (e.parenthesizedAssign = m), e.parenthesizedBind < 0 && (e.parenthesizedBind = m)), S;
|
|
1285
1337
|
case a.bracketL:
|
|
1286
1338
|
return s = this.startNode(), this.next(), s.elements = this.parseExprList(a.bracketR, true, true, e), this.finishNode(s, "ArrayExpression");
|
|
1287
1339
|
case a.braceL:
|
|
1288
|
-
return this.overrideContext(
|
|
1340
|
+
return this.overrideContext(T.b_expr), this.parseObj(false, e);
|
|
1289
1341
|
case a._function:
|
|
1290
1342
|
return s = this.startNode(), this.next(), this.parseFunction(s, 0);
|
|
1291
1343
|
case a._class:
|
|
@@ -1300,10 +1352,10 @@ y.parseExprAtom = function(e, t, i) {
|
|
|
1300
1352
|
return this.parseExprAtomDefault();
|
|
1301
1353
|
}
|
|
1302
1354
|
};
|
|
1303
|
-
|
|
1355
|
+
g.parseExprAtomDefault = function() {
|
|
1304
1356
|
this.unexpected();
|
|
1305
1357
|
};
|
|
1306
|
-
|
|
1358
|
+
g.parseExprImport = function(e) {
|
|
1307
1359
|
var t = this.startNode();
|
|
1308
1360
|
if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === a.parenL && !e) return this.parseDynamicImport(t);
|
|
1309
1361
|
if (this.type === a.dot) {
|
|
@@ -1311,7 +1363,7 @@ y.parseExprImport = function(e) {
|
|
|
1311
1363
|
return i.name = "import", t.meta = this.finishNode(i, "Identifier"), this.parseImportMeta(t);
|
|
1312
1364
|
} else this.unexpected();
|
|
1313
1365
|
};
|
|
1314
|
-
|
|
1366
|
+
g.parseDynamicImport = function(e) {
|
|
1315
1367
|
if (this.next(), e.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16) this.eat(a.parenR) ? e.options = null : (this.expect(a.comma), this.afterTrailingComma(a.parenR) ? e.options = null : (e.options = this.parseMaybeAssign(), this.eat(a.parenR) || (this.expect(a.comma), this.afterTrailingComma(a.parenR) || this.unexpected())));
|
|
1316
1368
|
else if (!this.eat(a.parenR)) {
|
|
1317
1369
|
var t = this.start;
|
|
@@ -1319,52 +1371,52 @@ y.parseDynamicImport = function(e) {
|
|
|
1319
1371
|
}
|
|
1320
1372
|
return this.finishNode(e, "ImportExpression");
|
|
1321
1373
|
};
|
|
1322
|
-
|
|
1374
|
+
g.parseImportMeta = function(e) {
|
|
1323
1375
|
this.next();
|
|
1324
1376
|
var t = this.containsEsc;
|
|
1325
1377
|
return e.property = this.parseIdent(true), e.property.name !== "meta" && this.raiseRecoverable(e.property.start, "The only valid meta property for import is 'import.meta'"), t && this.raiseRecoverable(e.start, "'import.meta' must not contain escaped characters"), this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere && this.raiseRecoverable(e.start, "Cannot use 'import.meta' outside a module"), this.finishNode(e, "MetaProperty");
|
|
1326
1378
|
};
|
|
1327
|
-
|
|
1379
|
+
g.parseLiteral = function(e) {
|
|
1328
1380
|
var t = this.startNode();
|
|
1329
1381
|
return t.value = e, t.raw = this.input.slice(this.start, this.end), t.raw.charCodeAt(t.raw.length - 1) === 110 && (t.bigint = t.value != null ? t.value.toString() : t.raw.slice(0, -1).replace(/_/g, "")), this.next(), this.finishNode(t, "Literal");
|
|
1330
1382
|
};
|
|
1331
|
-
|
|
1383
|
+
g.parseParenExpression = function() {
|
|
1332
1384
|
this.expect(a.parenL);
|
|
1333
1385
|
var e = this.parseExpression();
|
|
1334
1386
|
return this.expect(a.parenR), e;
|
|
1335
1387
|
};
|
|
1336
|
-
|
|
1388
|
+
g.shouldParseArrow = function(e) {
|
|
1337
1389
|
return !this.canInsertSemicolon();
|
|
1338
1390
|
};
|
|
1339
|
-
|
|
1340
|
-
var i = this.start, s = this.startLoc, r,
|
|
1391
|
+
g.parseParenAndDistinguishExpression = function(e, t) {
|
|
1392
|
+
var i = this.start, s = this.startLoc, r, o = this.options.ecmaVersion >= 8;
|
|
1341
1393
|
if (this.options.ecmaVersion >= 6) {
|
|
1342
1394
|
this.next();
|
|
1343
|
-
var
|
|
1344
|
-
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== a.parenR; ) if (
|
|
1345
|
-
|
|
1395
|
+
var u = this.start, p = this.startLoc, h = [], l = true, m = false, S = new Ce(), E = this.yieldPos, c = this.awaitPos, x;
|
|
1396
|
+
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== a.parenR; ) if (l ? l = false : this.expect(a.comma), o && this.afterTrailingComma(a.parenR, true)) {
|
|
1397
|
+
m = true;
|
|
1346
1398
|
break;
|
|
1347
1399
|
} else if (this.type === a.ellipsis) {
|
|
1348
|
-
|
|
1400
|
+
x = this.start, h.push(this.parseParenItem(this.parseRestBinding())), this.type === a.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element");
|
|
1349
1401
|
break;
|
|
1350
|
-
} else
|
|
1351
|
-
var
|
|
1352
|
-
if (this.expect(a.parenR), e && this.shouldParseArrow(
|
|
1353
|
-
(!
|
|
1402
|
+
} else h.push(this.parseMaybeAssign(false, S, this.parseParenItem));
|
|
1403
|
+
var y = this.lastTokEnd, v = this.lastTokEndLoc;
|
|
1404
|
+
if (this.expect(a.parenR), e && this.shouldParseArrow(h) && this.eat(a.arrow)) return this.checkPatternErrors(S, false), this.checkYieldAwaitInDefaultParams(), this.yieldPos = E, this.awaitPos = c, this.parseParenArrowList(i, s, h, t);
|
|
1405
|
+
(!h.length || m) && this.unexpected(this.lastTokStart), x && this.unexpected(x), this.checkExpressionErrors(S, true), this.yieldPos = E || this.yieldPos, this.awaitPos = c || this.awaitPos, h.length > 1 ? (r = this.startNodeAt(u, p), r.expressions = h, this.finishNodeAt(r, "SequenceExpression", y, v)) : r = h[0];
|
|
1354
1406
|
} else r = this.parseParenExpression();
|
|
1355
1407
|
if (this.options.preserveParens) {
|
|
1356
|
-
var
|
|
1357
|
-
return
|
|
1408
|
+
var I = this.startNodeAt(i, s);
|
|
1409
|
+
return I.expression = r, this.finishNode(I, "ParenthesizedExpression");
|
|
1358
1410
|
} else return r;
|
|
1359
1411
|
};
|
|
1360
|
-
|
|
1412
|
+
g.parseParenItem = function(e) {
|
|
1361
1413
|
return e;
|
|
1362
1414
|
};
|
|
1363
|
-
|
|
1415
|
+
g.parseParenArrowList = function(e, t, i, s) {
|
|
1364
1416
|
return this.parseArrowExpression(this.startNodeAt(e, t), i, false, s);
|
|
1365
1417
|
};
|
|
1366
|
-
var
|
|
1367
|
-
|
|
1418
|
+
var Zi = [];
|
|
1419
|
+
g.parseNew = function() {
|
|
1368
1420
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
1369
1421
|
var e = this.startNode();
|
|
1370
1422
|
if (this.next(), this.options.ecmaVersion >= 6 && this.type === a.dot) {
|
|
@@ -1374,15 +1426,15 @@ y.parseNew = function() {
|
|
|
1374
1426
|
return e.property = this.parseIdent(true), e.property.name !== "target" && this.raiseRecoverable(e.property.start, "The only valid meta property for new is 'new.target'"), i && this.raiseRecoverable(e.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e, "MetaProperty");
|
|
1375
1427
|
}
|
|
1376
1428
|
var s = this.start, r = this.startLoc;
|
|
1377
|
-
return e.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), s, r, true, false), this.eat(a.parenL) ? e.arguments = this.parseExprList(a.parenR, this.options.ecmaVersion >= 8, false) : e.arguments =
|
|
1429
|
+
return e.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), s, r, true, false), this.eat(a.parenL) ? e.arguments = this.parseExprList(a.parenR, this.options.ecmaVersion >= 8, false) : e.arguments = Zi, this.finishNode(e, "NewExpression");
|
|
1378
1430
|
};
|
|
1379
|
-
|
|
1431
|
+
g.parseTemplateElement = function(e) {
|
|
1380
1432
|
var t = e.isTagged, i = this.startNode();
|
|
1381
1433
|
return this.type === a.invalidTemplate ? (t || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), i.value = { raw: this.value.replace(/\r\n?/g, `
|
|
1382
1434
|
`), cooked: null }) : i.value = { raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, `
|
|
1383
1435
|
`), cooked: this.value }, this.next(), i.tail = this.type === a.backQuote, this.finishNode(i, "TemplateElement");
|
|
1384
1436
|
};
|
|
1385
|
-
|
|
1437
|
+
g.parseTemplate = function(e) {
|
|
1386
1438
|
e === void 0 && (e = {});
|
|
1387
1439
|
var t = e.isTagged;
|
|
1388
1440
|
t === void 0 && (t = false);
|
|
@@ -1392,27 +1444,27 @@ y.parseTemplate = function(e) {
|
|
|
1392
1444
|
for (i.quasis = [s]; !s.tail; ) this.type === a.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(a.dollarBraceL), i.expressions.push(this.parseExpression()), this.expect(a.braceR), i.quasis.push(s = this.parseTemplateElement({ isTagged: t }));
|
|
1393
1445
|
return this.next(), this.finishNode(i, "TemplateLiteral");
|
|
1394
1446
|
};
|
|
1395
|
-
|
|
1396
|
-
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === a.name || this.type === a.num || this.type === a.string || this.type === a.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === a.star) && !
|
|
1447
|
+
g.isAsyncProp = function(e) {
|
|
1448
|
+
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === a.name || this.type === a.num || this.type === a.string || this.type === a.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === a.star) && !L.test(this.input.slice(this.lastTokEnd, this.start));
|
|
1397
1449
|
};
|
|
1398
|
-
|
|
1450
|
+
g.parseObj = function(e, t) {
|
|
1399
1451
|
var i = this.startNode(), s = true, r = {};
|
|
1400
1452
|
for (i.properties = [], this.next(); !this.eat(a.braceR); ) {
|
|
1401
1453
|
if (s) s = false;
|
|
1402
1454
|
else if (this.expect(a.comma), this.options.ecmaVersion >= 5 && this.afterTrailingComma(a.braceR)) break;
|
|
1403
|
-
var
|
|
1404
|
-
e || this.checkPropClash(
|
|
1455
|
+
var o = this.parseProperty(e, t);
|
|
1456
|
+
e || this.checkPropClash(o, r, t), i.properties.push(o);
|
|
1405
1457
|
}
|
|
1406
1458
|
return this.finishNode(i, e ? "ObjectPattern" : "ObjectExpression");
|
|
1407
1459
|
};
|
|
1408
|
-
|
|
1409
|
-
var i = this.startNode(), s, r,
|
|
1460
|
+
g.parseProperty = function(e, t) {
|
|
1461
|
+
var i = this.startNode(), s, r, o, u;
|
|
1410
1462
|
if (this.options.ecmaVersion >= 9 && this.eat(a.ellipsis)) return e ? (i.argument = this.parseIdent(false), this.type === a.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(i, "RestElement")) : (i.argument = this.parseMaybeAssign(false, t), this.type === a.comma && t && t.trailingComma < 0 && (t.trailingComma = this.start), this.finishNode(i, "SpreadElement"));
|
|
1411
|
-
this.options.ecmaVersion >= 6 && (i.method = false, i.shorthand = false, (e || t) && (
|
|
1463
|
+
this.options.ecmaVersion >= 6 && (i.method = false, i.shorthand = false, (e || t) && (o = this.start, u = this.startLoc), e || (s = this.eat(a.star)));
|
|
1412
1464
|
var p = this.containsEsc;
|
|
1413
|
-
return this.parsePropertyName(i), !e && !p && this.options.ecmaVersion >= 8 && !s && this.isAsyncProp(i) ? (r = true, s = this.options.ecmaVersion >= 9 && this.eat(a.star), this.parsePropertyName(i)) : r = false, this.parsePropertyValue(i, e, s, r,
|
|
1465
|
+
return this.parsePropertyName(i), !e && !p && this.options.ecmaVersion >= 8 && !s && this.isAsyncProp(i) ? (r = true, s = this.options.ecmaVersion >= 9 && this.eat(a.star), this.parsePropertyName(i)) : r = false, this.parsePropertyValue(i, e, s, r, o, u, t, p), this.finishNode(i, "Property");
|
|
1414
1466
|
};
|
|
1415
|
-
|
|
1467
|
+
g.parseGetterSetter = function(e) {
|
|
1416
1468
|
var t = e.key.name;
|
|
1417
1469
|
this.parsePropertyName(e), e.value = this.parseMethod(false), e.kind = t;
|
|
1418
1470
|
var i = e.kind === "get" ? 0 : 1;
|
|
@@ -1421,130 +1473,131 @@ y.parseGetterSetter = function(e) {
|
|
|
1421
1473
|
e.kind === "get" ? this.raiseRecoverable(s, "getter should have no params") : this.raiseRecoverable(s, "setter should have exactly one param");
|
|
1422
1474
|
} else e.kind === "set" && e.value.params[0].type === "RestElement" && this.raiseRecoverable(e.value.params[0].start, "Setter cannot use rest params");
|
|
1423
1475
|
};
|
|
1424
|
-
|
|
1425
|
-
(i || s) && this.type === a.colon && this.unexpected(), this.eat(a.colon) ? (e.value = t ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false,
|
|
1476
|
+
g.parsePropertyValue = function(e, t, i, s, r, o, u, p) {
|
|
1477
|
+
(i || s) && this.type === a.colon && this.unexpected(), this.eat(a.colon) ? (e.value = t ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, u), e.kind = "init") : this.options.ecmaVersion >= 6 && this.type === a.parenL ? (t && this.unexpected(), e.method = true, e.value = this.parseMethod(i, s), e.kind = "init") : !t && !p && this.options.ecmaVersion >= 5 && !e.computed && e.key.type === "Identifier" && (e.key.name === "get" || e.key.name === "set") && this.type !== a.comma && this.type !== a.braceR && this.type !== a.eq ? ((i || s) && this.unexpected(), this.parseGetterSetter(e)) : this.options.ecmaVersion >= 6 && !e.computed && e.key.type === "Identifier" ? ((i || s) && this.unexpected(), this.checkUnreserved(e.key), e.key.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = r), t ? e.value = this.parseMaybeDefault(r, o, this.copyNode(e.key)) : this.type === a.eq && u ? (u.shorthandAssign < 0 && (u.shorthandAssign = this.start), e.value = this.parseMaybeDefault(r, o, this.copyNode(e.key))) : e.value = this.copyNode(e.key), e.kind = "init", e.shorthand = true) : this.unexpected();
|
|
1426
1478
|
};
|
|
1427
|
-
|
|
1479
|
+
g.parsePropertyName = function(e) {
|
|
1428
1480
|
if (this.options.ecmaVersion >= 6) {
|
|
1429
1481
|
if (this.eat(a.bracketL)) return e.computed = true, e.key = this.parseMaybeAssign(), this.expect(a.bracketR), e.key;
|
|
1430
1482
|
e.computed = false;
|
|
1431
1483
|
}
|
|
1432
1484
|
return e.key = this.type === a.num || this.type === a.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
|
|
1433
1485
|
};
|
|
1434
|
-
|
|
1486
|
+
g.initFunction = function(e) {
|
|
1435
1487
|
e.id = null, this.options.ecmaVersion >= 6 && (e.generator = e.expression = false), this.options.ecmaVersion >= 8 && (e.async = false);
|
|
1436
1488
|
};
|
|
1437
|
-
|
|
1438
|
-
var s = this.startNode(), r = this.yieldPos,
|
|
1439
|
-
return this.initFunction(s), this.options.ecmaVersion >= 6 && (s.generator = e), this.options.ecmaVersion >= 8 && (s.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
1489
|
+
g.parseMethod = function(e, t, i) {
|
|
1490
|
+
var s = this.startNode(), r = this.yieldPos, o = this.awaitPos, u = this.awaitIdentPos;
|
|
1491
|
+
return this.initFunction(s), this.options.ecmaVersion >= 6 && (s.generator = e), this.options.ecmaVersion >= 8 && (s.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Xe(t, s.generator) | Se | (i ? _t : 0)), this.expect(a.parenL), s.params = this.parseBindingList(a.parenR, false, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(s, false, true, false), this.yieldPos = r, this.awaitPos = o, this.awaitIdentPos = u, this.finishNode(s, "FunctionExpression");
|
|
1440
1492
|
};
|
|
1441
|
-
|
|
1442
|
-
var r = this.yieldPos,
|
|
1443
|
-
return this.enterScope(
|
|
1493
|
+
g.parseArrowExpression = function(e, t, i, s) {
|
|
1494
|
+
var r = this.yieldPos, o = this.awaitPos, u = this.awaitIdentPos;
|
|
1495
|
+
return this.enterScope(Xe(i, false) | He), this.initFunction(e), this.options.ecmaVersion >= 8 && (e.async = !!i), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e.params = this.toAssignableList(t, true), this.parseFunctionBody(e, true, false, s), this.yieldPos = r, this.awaitPos = o, this.awaitIdentPos = u, this.finishNode(e, "ArrowFunctionExpression");
|
|
1444
1496
|
};
|
|
1445
|
-
|
|
1446
|
-
var r = t && this.type !== a.braceL,
|
|
1497
|
+
g.parseFunctionBody = function(e, t, i, s) {
|
|
1498
|
+
var r = t && this.type !== a.braceL, o = this.strict, u = false;
|
|
1447
1499
|
if (r) e.body = this.parseMaybeAssign(s), e.expression = true, this.checkParams(e, false);
|
|
1448
1500
|
else {
|
|
1449
1501
|
var p = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
1450
|
-
(!
|
|
1451
|
-
var
|
|
1452
|
-
this.labels = [],
|
|
1502
|
+
(!o || p) && (u = this.strictDirective(this.end), u && p && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
1503
|
+
var h = this.labels;
|
|
1504
|
+
this.labels = [], u && (this.strict = true), this.checkParams(e, !o && !u && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, Et), e.body = this.parseBlock(false, void 0, u && !o), e.expression = false, this.adaptDirectivePrologue(e.body.body), this.labels = h;
|
|
1453
1505
|
}
|
|
1454
1506
|
this.exitScope();
|
|
1455
1507
|
};
|
|
1456
|
-
|
|
1508
|
+
g.isSimpleParamList = function(e) {
|
|
1457
1509
|
for (var t = 0, i = e; t < i.length; t += 1) {
|
|
1458
1510
|
var s = i[t];
|
|
1459
1511
|
if (s.type !== "Identifier") return false;
|
|
1460
1512
|
}
|
|
1461
1513
|
return true;
|
|
1462
1514
|
};
|
|
1463
|
-
|
|
1515
|
+
g.checkParams = function(e, t) {
|
|
1464
1516
|
for (var i = /* @__PURE__ */ Object.create(null), s = 0, r = e.params; s < r.length; s += 1) {
|
|
1465
|
-
var
|
|
1466
|
-
this.checkLValInnerPattern(
|
|
1517
|
+
var o = r[s];
|
|
1518
|
+
this.checkLValInnerPattern(o, We, t ? null : i);
|
|
1467
1519
|
}
|
|
1468
1520
|
};
|
|
1469
|
-
|
|
1470
|
-
for (var r = [],
|
|
1471
|
-
if (
|
|
1521
|
+
g.parseExprList = function(e, t, i, s) {
|
|
1522
|
+
for (var r = [], o = true; !this.eat(e); ) {
|
|
1523
|
+
if (o) o = false;
|
|
1472
1524
|
else if (this.expect(a.comma), t && this.afterTrailingComma(e)) break;
|
|
1473
|
-
var
|
|
1474
|
-
i && this.type === a.comma ?
|
|
1525
|
+
var u = void 0;
|
|
1526
|
+
i && this.type === a.comma ? u = null : this.type === a.ellipsis ? (u = this.parseSpread(s), s && this.type === a.comma && s.trailingComma < 0 && (s.trailingComma = this.start)) : u = this.parseMaybeAssign(false, s), r.push(u);
|
|
1475
1527
|
}
|
|
1476
1528
|
return r;
|
|
1477
1529
|
};
|
|
1478
|
-
|
|
1530
|
+
g.checkUnreserved = function(e) {
|
|
1479
1531
|
var t = e.start, i = e.end, s = e.name;
|
|
1480
|
-
if (this.inGenerator && s === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && s === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags &
|
|
1532
|
+
if (this.inGenerator && s === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && s === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & _e) && s === "arguments" && this.raiseRecoverable(t, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (s === "arguments" || s === "await") && this.raise(t, "Cannot use " + s + " in class static initialization block"), this.keywords.test(s) && this.raise(t, "Unexpected keyword '" + s + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(t, i).indexOf("\\") !== -1)) {
|
|
1481
1533
|
var r = this.strict ? this.reservedWordsStrict : this.reservedWords;
|
|
1482
1534
|
r.test(s) && (!this.inAsync && s === "await" && this.raiseRecoverable(t, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(t, "The keyword '" + s + "' is reserved"));
|
|
1483
1535
|
}
|
|
1484
1536
|
};
|
|
1485
|
-
|
|
1537
|
+
g.parseIdent = function(e) {
|
|
1486
1538
|
var t = this.parseIdentNode();
|
|
1487
1539
|
return this.next(!!e), this.finishNode(t, "Identifier"), e || (this.checkUnreserved(t), t.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = t.start)), t;
|
|
1488
1540
|
};
|
|
1489
|
-
|
|
1541
|
+
g.parseIdentNode = function() {
|
|
1490
1542
|
var e = this.startNode();
|
|
1491
1543
|
return this.type === a.name ? e.name = this.value : this.type.keyword ? (e.name = this.type.keyword, (e.name === "class" || e.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46) && this.context.pop(), this.type = a.name) : this.unexpected(), e;
|
|
1492
1544
|
};
|
|
1493
|
-
|
|
1545
|
+
g.parsePrivateIdent = function() {
|
|
1494
1546
|
var e = this.startNode();
|
|
1495
1547
|
return this.type === a.privateId ? e.name = this.value : this.unexpected(), this.next(), this.finishNode(e, "PrivateIdentifier"), this.options.checkPrivateFields && (this.privateNameStack.length === 0 ? this.raise(e.start, "Private field '#" + e.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(e)), e;
|
|
1496
1548
|
};
|
|
1497
|
-
|
|
1549
|
+
g.parseYield = function(e) {
|
|
1498
1550
|
this.yieldPos || (this.yieldPos = this.start);
|
|
1499
1551
|
var t = this.startNode();
|
|
1500
1552
|
return this.next(), this.type === a.semi || this.canInsertSemicolon() || this.type !== a.star && !this.type.startsExpr ? (t.delegate = false, t.argument = null) : (t.delegate = this.eat(a.star), t.argument = this.parseMaybeAssign(e)), this.finishNode(t, "YieldExpression");
|
|
1501
1553
|
};
|
|
1502
|
-
|
|
1554
|
+
g.parseAwait = function(e) {
|
|
1503
1555
|
this.awaitPos || (this.awaitPos = this.start);
|
|
1504
1556
|
var t = this.startNode();
|
|
1505
1557
|
return this.next(), t.argument = this.parseMaybeUnary(null, true, false, e), this.finishNode(t, "AwaitExpression");
|
|
1506
1558
|
};
|
|
1507
|
-
var
|
|
1508
|
-
|
|
1509
|
-
var i =
|
|
1559
|
+
var ge = A.prototype;
|
|
1560
|
+
ge.raise = function(e, t) {
|
|
1561
|
+
var i = vt(this.input, e);
|
|
1510
1562
|
t += " (" + i.line + ":" + i.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
|
|
1511
1563
|
var s = new SyntaxError(t);
|
|
1512
1564
|
throw s.pos = e, s.loc = i, s.raisedAt = this.pos, s;
|
|
1513
1565
|
};
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
if (this.options.locations) return new
|
|
1566
|
+
ge.raiseRecoverable = ge.raise;
|
|
1567
|
+
ge.curPosition = function() {
|
|
1568
|
+
if (this.options.locations) return new ne(this.curLine, this.pos - this.lineStart);
|
|
1517
1569
|
};
|
|
1518
|
-
var W =
|
|
1570
|
+
var W = A.prototype;
|
|
1571
|
+
var es = function(t) {
|
|
1519
1572
|
this.flags = t, this.var = [], this.lexical = [], this.functions = [];
|
|
1520
1573
|
};
|
|
1521
1574
|
W.enterScope = function(e) {
|
|
1522
|
-
this.scopeStack.push(new
|
|
1575
|
+
this.scopeStack.push(new es(e));
|
|
1523
1576
|
};
|
|
1524
1577
|
W.exitScope = function() {
|
|
1525
1578
|
this.scopeStack.pop();
|
|
1526
1579
|
};
|
|
1527
1580
|
W.treatFunctionsAsVarInScope = function(e) {
|
|
1528
|
-
return e.flags & Z || !this.inModule && e.flags &
|
|
1581
|
+
return e.flags & Z || !this.inModule && e.flags & oe;
|
|
1529
1582
|
};
|
|
1530
1583
|
W.declareName = function(e, t, i) {
|
|
1531
1584
|
var s = false;
|
|
1532
|
-
if (t ===
|
|
1585
|
+
if (t === K) {
|
|
1533
1586
|
var r = this.currentScope();
|
|
1534
|
-
s = r.lexical.indexOf(e) > -1 || r.functions.indexOf(e) > -1 || r.var.indexOf(e) > -1, r.lexical.push(e), this.inModule && r.flags &
|
|
1587
|
+
s = r.lexical.indexOf(e) > -1 || r.functions.indexOf(e) > -1 || r.var.indexOf(e) > -1, r.lexical.push(e), this.inModule && r.flags & oe && delete this.undefinedExports[e];
|
|
1535
1588
|
} else if (t === Tt) {
|
|
1536
|
-
var n = this.currentScope();
|
|
1537
|
-
n.lexical.push(e);
|
|
1538
|
-
} else if (t === _t) {
|
|
1539
1589
|
var o = this.currentScope();
|
|
1540
|
-
|
|
1590
|
+
o.lexical.push(e);
|
|
1591
|
+
} else if (t === Ct) {
|
|
1592
|
+
var u = this.currentScope();
|
|
1593
|
+
this.treatFunctionsAsVar ? s = u.lexical.indexOf(e) > -1 : s = u.lexical.indexOf(e) > -1 || u.var.indexOf(e) > -1, u.functions.push(e);
|
|
1541
1594
|
} else for (var p = this.scopeStack.length - 1; p >= 0; --p) {
|
|
1542
|
-
var
|
|
1543
|
-
if (
|
|
1595
|
+
var h = this.scopeStack[p];
|
|
1596
|
+
if (h.lexical.indexOf(e) > -1 && !(h.flags & St && h.lexical[0] === e) || !this.treatFunctionsAsVarInScope(h) && h.functions.indexOf(e) > -1) {
|
|
1544
1597
|
s = true;
|
|
1545
1598
|
break;
|
|
1546
1599
|
}
|
|
1547
|
-
if (
|
|
1600
|
+
if (h.var.push(e), this.inModule && h.flags & oe && delete this.undefinedExports[e], h.flags & _e) break;
|
|
1548
1601
|
}
|
|
1549
1602
|
s && this.raiseRecoverable(i, "Identifier '" + e + "' has already been declared");
|
|
1550
1603
|
};
|
|
@@ -1557,134 +1610,157 @@ W.currentScope = function() {
|
|
|
1557
1610
|
W.currentVarScope = function() {
|
|
1558
1611
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
1559
1612
|
var t = this.scopeStack[e];
|
|
1560
|
-
if (t.flags & (
|
|
1613
|
+
if (t.flags & (_e | ue | z)) return t;
|
|
1561
1614
|
}
|
|
1562
1615
|
};
|
|
1563
1616
|
W.currentThisScope = function() {
|
|
1564
1617
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
1565
1618
|
var t = this.scopeStack[e];
|
|
1566
|
-
if (t.flags & (
|
|
1619
|
+
if (t.flags & (_e | ue | z) && !(t.flags & He)) return t;
|
|
1567
1620
|
}
|
|
1568
1621
|
};
|
|
1569
|
-
var
|
|
1570
|
-
this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
|
|
1622
|
+
var Te = function(t, i, s) {
|
|
1623
|
+
this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new be(t, s)), t.options.directSourceFile && (this.sourceFile = t.options.directSourceFile), t.options.ranges && (this.range = [i, 0]);
|
|
1624
|
+
};
|
|
1625
|
+
var he = A.prototype;
|
|
1626
|
+
he.startNode = function() {
|
|
1627
|
+
return new Te(this, this.start, this.startLoc);
|
|
1574
1628
|
};
|
|
1575
|
-
|
|
1576
|
-
return new
|
|
1629
|
+
he.startNodeAt = function(e, t) {
|
|
1630
|
+
return new Te(this, e, t);
|
|
1577
1631
|
};
|
|
1578
|
-
function
|
|
1632
|
+
function wt(e, t, i, s) {
|
|
1579
1633
|
return e.type = t, e.end = i, this.options.locations && (e.loc.end = s), this.options.ranges && (e.range[1] = i), e;
|
|
1580
1634
|
}
|
|
1581
|
-
|
|
1582
|
-
return
|
|
1635
|
+
he.finishNode = function(e, t) {
|
|
1636
|
+
return wt.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
1583
1637
|
};
|
|
1584
|
-
|
|
1585
|
-
return
|
|
1638
|
+
he.finishNodeAt = function(e, t, i, s) {
|
|
1639
|
+
return wt.call(this, e, t, i, s);
|
|
1586
1640
|
};
|
|
1587
|
-
|
|
1588
|
-
var t = new
|
|
1641
|
+
he.copyNode = function(e) {
|
|
1642
|
+
var t = new Te(this, e.start, this.startLoc);
|
|
1589
1643
|
for (var i in e) t[i] = e[i];
|
|
1590
1644
|
return t;
|
|
1591
1645
|
};
|
|
1592
|
-
var
|
|
1593
|
-
|
|
1594
|
-
|
|
1646
|
+
var ts = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz";
|
|
1647
|
+
var Pt = "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";
|
|
1648
|
+
var It = Pt + " Extended_Pictographic";
|
|
1649
|
+
var Nt = It;
|
|
1650
|
+
var Lt = Nt + " EBase EComp EMod EPres ExtPict";
|
|
1651
|
+
var Rt = Lt;
|
|
1652
|
+
var is = Rt;
|
|
1653
|
+
var ss = { 9: Pt, 10: It, 11: Nt, 12: Lt, 13: Rt, 14: is };
|
|
1654
|
+
var rs = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji";
|
|
1655
|
+
var as = { 9: "", 10: "", 11: "", 12: "", 13: "", 14: rs };
|
|
1656
|
+
var lt = "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";
|
|
1657
|
+
var Vt = "Adlam Adlm 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 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";
|
|
1658
|
+
var Ot = Vt + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
|
|
1659
|
+
var Bt = Ot + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
|
|
1660
|
+
var Dt = Bt + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
|
|
1661
|
+
var Mt = Dt + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
|
|
1662
|
+
var ns = Mt + " " + ts;
|
|
1663
|
+
var os = { 9: Vt, 10: Ot, 11: Bt, 12: Dt, 13: Mt, 14: ns };
|
|
1664
|
+
var Ft = {};
|
|
1665
|
+
function us(e) {
|
|
1666
|
+
var t = Ft[e] = { binary: H(ss[e] + " " + lt), binaryOfStrings: H(as[e]), nonBinary: { General_Category: H(lt), Script: H(os[e]) } };
|
|
1595
1667
|
t.nonBinary.Script_Extensions = t.nonBinary.Script, t.nonBinary.gc = t.nonBinary.General_Category, t.nonBinary.sc = t.nonBinary.Script, t.nonBinary.scx = t.nonBinary.Script_Extensions;
|
|
1596
1668
|
}
|
|
1597
|
-
for (
|
|
1598
|
-
var
|
|
1669
|
+
for (me = 0, Fe = [9, 10, 11, 12, 13, 14]; me < Fe.length; me += 1) ft = Fe[me], us(ft);
|
|
1670
|
+
var ft;
|
|
1671
|
+
var me;
|
|
1672
|
+
var Fe;
|
|
1673
|
+
var f = A.prototype;
|
|
1674
|
+
var ve = function(t, i) {
|
|
1599
1675
|
this.parent = t, this.base = i || this;
|
|
1600
1676
|
};
|
|
1601
|
-
|
|
1677
|
+
ve.prototype.separatedFrom = function(t) {
|
|
1602
1678
|
for (var i = this; i; i = i.parent) for (var s = t; s; s = s.parent) if (i.base === s.base && i !== s) return true;
|
|
1603
1679
|
return false;
|
|
1604
1680
|
};
|
|
1605
|
-
|
|
1606
|
-
return new
|
|
1681
|
+
ve.prototype.sibling = function() {
|
|
1682
|
+
return new ve(this.parent, this.base);
|
|
1607
1683
|
};
|
|
1608
|
-
var
|
|
1684
|
+
var G = function(t) {
|
|
1609
1685
|
this.parser = t, this.validFlags = "gim" + (t.options.ecmaVersion >= 6 ? "uy" : "") + (t.options.ecmaVersion >= 9 ? "s" : "") + (t.options.ecmaVersion >= 13 ? "d" : "") + (t.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = Ft[t.options.ecmaVersion >= 14 ? 14 : t.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = false, this.switchV = false, this.switchN = false, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = false, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = /* @__PURE__ */ Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
1610
1686
|
};
|
|
1611
|
-
|
|
1612
|
-
var r = s.indexOf("v") !== -1,
|
|
1613
|
-
this.start = t | 0, this.source = i + "", this.flags = s, r && this.parser.options.ecmaVersion >= 15 ? (this.switchU = true, this.switchV = true, this.switchN = true) : (this.switchU =
|
|
1687
|
+
G.prototype.reset = function(t, i, s) {
|
|
1688
|
+
var r = s.indexOf("v") !== -1, o = s.indexOf("u") !== -1;
|
|
1689
|
+
this.start = t | 0, this.source = i + "", this.flags = s, r && this.parser.options.ecmaVersion >= 15 ? (this.switchU = true, this.switchV = true, this.switchN = true) : (this.switchU = o && this.parser.options.ecmaVersion >= 6, this.switchV = false, this.switchN = o && this.parser.options.ecmaVersion >= 9);
|
|
1614
1690
|
};
|
|
1615
|
-
|
|
1691
|
+
G.prototype.raise = function(t) {
|
|
1616
1692
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + t);
|
|
1617
1693
|
};
|
|
1618
|
-
|
|
1694
|
+
G.prototype.at = function(t, i) {
|
|
1619
1695
|
i === void 0 && (i = false);
|
|
1620
1696
|
var s = this.source, r = s.length;
|
|
1621
1697
|
if (t >= r) return -1;
|
|
1622
|
-
var
|
|
1623
|
-
if (!(i || this.switchU) ||
|
|
1624
|
-
var
|
|
1625
|
-
return
|
|
1698
|
+
var o = s.charCodeAt(t);
|
|
1699
|
+
if (!(i || this.switchU) || o <= 55295 || o >= 57344 || t + 1 >= r) return o;
|
|
1700
|
+
var u = s.charCodeAt(t + 1);
|
|
1701
|
+
return u >= 56320 && u <= 57343 ? (o << 10) + u - 56613888 : o;
|
|
1626
1702
|
};
|
|
1627
|
-
|
|
1703
|
+
G.prototype.nextIndex = function(t, i) {
|
|
1628
1704
|
i === void 0 && (i = false);
|
|
1629
1705
|
var s = this.source, r = s.length;
|
|
1630
1706
|
if (t >= r) return r;
|
|
1631
|
-
var
|
|
1632
|
-
return !(i || this.switchU) ||
|
|
1707
|
+
var o = s.charCodeAt(t), u;
|
|
1708
|
+
return !(i || this.switchU) || o <= 55295 || o >= 57344 || t + 1 >= r || (u = s.charCodeAt(t + 1)) < 56320 || u > 57343 ? t + 1 : t + 2;
|
|
1633
1709
|
};
|
|
1634
|
-
|
|
1710
|
+
G.prototype.current = function(t) {
|
|
1635
1711
|
return t === void 0 && (t = false), this.at(this.pos, t);
|
|
1636
1712
|
};
|
|
1637
|
-
|
|
1713
|
+
G.prototype.lookahead = function(t) {
|
|
1638
1714
|
return t === void 0 && (t = false), this.at(this.nextIndex(this.pos, t), t);
|
|
1639
1715
|
};
|
|
1640
|
-
|
|
1716
|
+
G.prototype.advance = function(t) {
|
|
1641
1717
|
t === void 0 && (t = false), this.pos = this.nextIndex(this.pos, t);
|
|
1642
1718
|
};
|
|
1643
|
-
|
|
1719
|
+
G.prototype.eat = function(t, i) {
|
|
1644
1720
|
return i === void 0 && (i = false), this.current(i) === t ? (this.advance(i), true) : false;
|
|
1645
1721
|
};
|
|
1646
|
-
|
|
1722
|
+
G.prototype.eatChars = function(t, i) {
|
|
1647
1723
|
i === void 0 && (i = false);
|
|
1648
|
-
for (var s = this.pos, r = 0,
|
|
1649
|
-
var
|
|
1650
|
-
if (p === -1 || p !==
|
|
1724
|
+
for (var s = this.pos, r = 0, o = t; r < o.length; r += 1) {
|
|
1725
|
+
var u = o[r], p = this.at(s, i);
|
|
1726
|
+
if (p === -1 || p !== u) return false;
|
|
1651
1727
|
s = this.nextIndex(s, i);
|
|
1652
1728
|
}
|
|
1653
1729
|
return this.pos = s, true;
|
|
1654
1730
|
};
|
|
1655
|
-
|
|
1656
|
-
for (var t = e.validFlags, i = e.flags, s = false, r = false,
|
|
1657
|
-
var
|
|
1658
|
-
t.indexOf(
|
|
1731
|
+
f.validateRegExpFlags = function(e) {
|
|
1732
|
+
for (var t = e.validFlags, i = e.flags, s = false, r = false, o = 0; o < i.length; o++) {
|
|
1733
|
+
var u = i.charAt(o);
|
|
1734
|
+
t.indexOf(u) === -1 && this.raise(e.start, "Invalid regular expression flag"), i.indexOf(u, o + 1) > -1 && this.raise(e.start, "Duplicate regular expression flag"), u === "u" && (s = true), u === "v" && (r = true);
|
|
1659
1735
|
}
|
|
1660
1736
|
this.options.ecmaVersion >= 15 && s && r && this.raise(e.start, "Invalid regular expression flag");
|
|
1661
1737
|
};
|
|
1662
|
-
function
|
|
1738
|
+
function hs(e) {
|
|
1663
1739
|
for (var t in e) return true;
|
|
1664
1740
|
return false;
|
|
1665
1741
|
}
|
|
1666
|
-
|
|
1667
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
1742
|
+
f.validateRegExpPattern = function(e) {
|
|
1743
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && hs(e.groupNames) && (e.switchN = true, this.regexp_pattern(e));
|
|
1668
1744
|
};
|
|
1669
|
-
|
|
1745
|
+
f.regexp_pattern = function(e) {
|
|
1670
1746
|
e.pos = 0, e.lastIntValue = 0, e.lastStringValue = "", e.lastAssertionIsQuantifiable = false, e.numCapturingParens = 0, e.maxBackReference = 0, e.groupNames = /* @__PURE__ */ Object.create(null), e.backReferenceNames.length = 0, e.branchID = null, this.regexp_disjunction(e), e.pos !== e.source.length && (e.eat(41) && e.raise("Unmatched ')'"), (e.eat(93) || e.eat(125)) && e.raise("Lone quantifier brackets")), e.maxBackReference > e.numCapturingParens && e.raise("Invalid escape");
|
|
1671
1747
|
for (var t = 0, i = e.backReferenceNames; t < i.length; t += 1) {
|
|
1672
1748
|
var s = i[t];
|
|
1673
1749
|
e.groupNames[s] || e.raise("Invalid named capture referenced");
|
|
1674
1750
|
}
|
|
1675
1751
|
};
|
|
1676
|
-
|
|
1752
|
+
f.regexp_disjunction = function(e) {
|
|
1677
1753
|
var t = this.options.ecmaVersion >= 16;
|
|
1678
|
-
for (t && (e.branchID = new
|
|
1754
|
+
for (t && (e.branchID = new ve(e.branchID, null)), this.regexp_alternative(e); e.eat(124); ) t && (e.branchID = e.branchID.sibling()), this.regexp_alternative(e);
|
|
1679
1755
|
t && (e.branchID = e.branchID.parent), this.regexp_eatQuantifier(e, true) && e.raise("Nothing to repeat"), e.eat(123) && e.raise("Lone quantifier brackets");
|
|
1680
1756
|
};
|
|
1681
|
-
|
|
1757
|
+
f.regexp_alternative = function(e) {
|
|
1682
1758
|
for (; e.pos < e.source.length && this.regexp_eatTerm(e); ) ;
|
|
1683
1759
|
};
|
|
1684
|
-
|
|
1760
|
+
f.regexp_eatTerm = function(e) {
|
|
1685
1761
|
return this.regexp_eatAssertion(e) ? (e.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(e) && e.switchU && e.raise("Invalid quantifier"), true) : (e.switchU ? this.regexp_eatAtom(e) : this.regexp_eatExtendedAtom(e)) ? (this.regexp_eatQuantifier(e), true) : false;
|
|
1686
1762
|
};
|
|
1687
|
-
|
|
1763
|
+
f.regexp_eatAssertion = function(e) {
|
|
1688
1764
|
var t = e.pos;
|
|
1689
1765
|
if (e.lastAssertionIsQuantifiable = false, e.eat(94) || e.eat(36)) return true;
|
|
1690
1766
|
if (e.eat(92)) {
|
|
@@ -1697,13 +1773,13 @@ l.regexp_eatAssertion = function(e) {
|
|
|
1697
1773
|
}
|
|
1698
1774
|
return e.pos = t, false;
|
|
1699
1775
|
};
|
|
1700
|
-
|
|
1776
|
+
f.regexp_eatQuantifier = function(e, t) {
|
|
1701
1777
|
return t === void 0 && (t = false), this.regexp_eatQuantifierPrefix(e, t) ? (e.eat(63), true) : false;
|
|
1702
1778
|
};
|
|
1703
|
-
|
|
1779
|
+
f.regexp_eatQuantifierPrefix = function(e, t) {
|
|
1704
1780
|
return e.eat(42) || e.eat(43) || e.eat(63) || this.regexp_eatBracedQuantifier(e, t);
|
|
1705
1781
|
};
|
|
1706
|
-
|
|
1782
|
+
f.regexp_eatBracedQuantifier = function(e, t) {
|
|
1707
1783
|
var i = e.pos;
|
|
1708
1784
|
if (e.eat(123)) {
|
|
1709
1785
|
var s = 0, r = -1;
|
|
@@ -1712,10 +1788,10 @@ l.regexp_eatBracedQuantifier = function(e, t) {
|
|
|
1712
1788
|
}
|
|
1713
1789
|
return false;
|
|
1714
1790
|
};
|
|
1715
|
-
|
|
1791
|
+
f.regexp_eatAtom = function(e) {
|
|
1716
1792
|
return this.regexp_eatPatternCharacters(e) || e.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e);
|
|
1717
1793
|
};
|
|
1718
|
-
|
|
1794
|
+
f.regexp_eatReverseSolidusAtomEscape = function(e) {
|
|
1719
1795
|
var t = e.pos;
|
|
1720
1796
|
if (e.eat(92)) {
|
|
1721
1797
|
if (this.regexp_eatAtomEscape(e)) return true;
|
|
@@ -1723,7 +1799,7 @@ l.regexp_eatReverseSolidusAtomEscape = function(e) {
|
|
|
1723
1799
|
}
|
|
1724
1800
|
return false;
|
|
1725
1801
|
};
|
|
1726
|
-
|
|
1802
|
+
f.regexp_eatUncapturingGroup = function(e) {
|
|
1727
1803
|
var t = e.pos;
|
|
1728
1804
|
if (e.eat(40)) {
|
|
1729
1805
|
if (e.eat(63)) {
|
|
@@ -1731,15 +1807,15 @@ l.regexp_eatUncapturingGroup = function(e) {
|
|
|
1731
1807
|
var i = this.regexp_eatModifiers(e), s = e.eat(45);
|
|
1732
1808
|
if (i || s) {
|
|
1733
1809
|
for (var r = 0; r < i.length; r++) {
|
|
1734
|
-
var
|
|
1735
|
-
i.indexOf(
|
|
1810
|
+
var o = i.charAt(r);
|
|
1811
|
+
i.indexOf(o, r + 1) > -1 && e.raise("Duplicate regular expression modifiers");
|
|
1736
1812
|
}
|
|
1737
1813
|
if (s) {
|
|
1738
|
-
var
|
|
1739
|
-
!i && !
|
|
1740
|
-
for (var p = 0; p <
|
|
1741
|
-
var
|
|
1742
|
-
(
|
|
1814
|
+
var u = this.regexp_eatModifiers(e);
|
|
1815
|
+
!i && !u && e.current() === 58 && e.raise("Invalid regular expression modifiers");
|
|
1816
|
+
for (var p = 0; p < u.length; p++) {
|
|
1817
|
+
var h = u.charAt(p);
|
|
1818
|
+
(u.indexOf(h, p + 1) > -1 || i.indexOf(h) > -1) && e.raise("Duplicate regular expression modifiers");
|
|
1743
1819
|
}
|
|
1744
1820
|
}
|
|
1745
1821
|
}
|
|
@@ -1753,85 +1829,85 @@ l.regexp_eatUncapturingGroup = function(e) {
|
|
|
1753
1829
|
}
|
|
1754
1830
|
return false;
|
|
1755
1831
|
};
|
|
1756
|
-
|
|
1832
|
+
f.regexp_eatCapturingGroup = function(e) {
|
|
1757
1833
|
if (e.eat(40)) {
|
|
1758
1834
|
if (this.options.ecmaVersion >= 9 ? this.regexp_groupSpecifier(e) : e.current() === 63 && e.raise("Invalid group"), this.regexp_disjunction(e), e.eat(41)) return e.numCapturingParens += 1, true;
|
|
1759
1835
|
e.raise("Unterminated group");
|
|
1760
1836
|
}
|
|
1761
1837
|
return false;
|
|
1762
1838
|
};
|
|
1763
|
-
|
|
1764
|
-
for (var t = "", i = 0; (i = e.current()) !== -1 &&
|
|
1839
|
+
f.regexp_eatModifiers = function(e) {
|
|
1840
|
+
for (var t = "", i = 0; (i = e.current()) !== -1 && ps(i); ) t += q(i), e.advance();
|
|
1765
1841
|
return t;
|
|
1766
1842
|
};
|
|
1767
|
-
function
|
|
1843
|
+
function ps(e) {
|
|
1768
1844
|
return e === 105 || e === 109 || e === 115;
|
|
1769
1845
|
}
|
|
1770
|
-
|
|
1846
|
+
f.regexp_eatExtendedAtom = function(e) {
|
|
1771
1847
|
return e.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e) || this.regexp_eatInvalidBracedQuantifier(e) || this.regexp_eatExtendedPatternCharacter(e);
|
|
1772
1848
|
};
|
|
1773
|
-
|
|
1849
|
+
f.regexp_eatInvalidBracedQuantifier = function(e) {
|
|
1774
1850
|
return this.regexp_eatBracedQuantifier(e, true) && e.raise("Nothing to repeat"), false;
|
|
1775
1851
|
};
|
|
1776
|
-
|
|
1852
|
+
f.regexp_eatSyntaxCharacter = function(e) {
|
|
1777
1853
|
var t = e.current();
|
|
1778
|
-
return
|
|
1854
|
+
return jt(t) ? (e.lastIntValue = t, e.advance(), true) : false;
|
|
1779
1855
|
};
|
|
1780
|
-
function
|
|
1856
|
+
function jt(e) {
|
|
1781
1857
|
return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
1782
1858
|
}
|
|
1783
|
-
|
|
1784
|
-
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !
|
|
1859
|
+
f.regexp_eatPatternCharacters = function(e) {
|
|
1860
|
+
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !jt(i); ) e.advance();
|
|
1785
1861
|
return e.pos !== t;
|
|
1786
1862
|
};
|
|
1787
|
-
|
|
1863
|
+
f.regexp_eatExtendedPatternCharacter = function(e) {
|
|
1788
1864
|
var t = e.current();
|
|
1789
1865
|
return t !== -1 && t !== 36 && !(t >= 40 && t <= 43) && t !== 46 && t !== 63 && t !== 91 && t !== 94 && t !== 124 ? (e.advance(), true) : false;
|
|
1790
1866
|
};
|
|
1791
|
-
|
|
1867
|
+
f.regexp_groupSpecifier = function(e) {
|
|
1792
1868
|
if (e.eat(63)) {
|
|
1793
1869
|
this.regexp_eatGroupName(e) || e.raise("Invalid group");
|
|
1794
1870
|
var t = this.options.ecmaVersion >= 16, i = e.groupNames[e.lastStringValue];
|
|
1795
1871
|
if (i) if (t) for (var s = 0, r = i; s < r.length; s += 1) {
|
|
1796
|
-
var
|
|
1797
|
-
|
|
1872
|
+
var o = r[s];
|
|
1873
|
+
o.separatedFrom(e.branchID) || e.raise("Duplicate capture group name");
|
|
1798
1874
|
}
|
|
1799
1875
|
else e.raise("Duplicate capture group name");
|
|
1800
1876
|
t ? (i || (e.groupNames[e.lastStringValue] = [])).push(e.branchID) : e.groupNames[e.lastStringValue] = true;
|
|
1801
1877
|
}
|
|
1802
1878
|
};
|
|
1803
|
-
|
|
1879
|
+
f.regexp_eatGroupName = function(e) {
|
|
1804
1880
|
if (e.lastStringValue = "", e.eat(60)) {
|
|
1805
1881
|
if (this.regexp_eatRegExpIdentifierName(e) && e.eat(62)) return true;
|
|
1806
1882
|
e.raise("Invalid capture group name");
|
|
1807
1883
|
}
|
|
1808
1884
|
return false;
|
|
1809
1885
|
};
|
|
1810
|
-
|
|
1886
|
+
f.regexp_eatRegExpIdentifierName = function(e) {
|
|
1811
1887
|
if (e.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(e)) {
|
|
1812
|
-
for (e.lastStringValue +=
|
|
1888
|
+
for (e.lastStringValue += q(e.lastIntValue); this.regexp_eatRegExpIdentifierPart(e); ) e.lastStringValue += q(e.lastIntValue);
|
|
1813
1889
|
return true;
|
|
1814
1890
|
}
|
|
1815
1891
|
return false;
|
|
1816
1892
|
};
|
|
1817
|
-
|
|
1893
|
+
f.regexp_eatRegExpIdentifierStart = function(e) {
|
|
1818
1894
|
var t = e.pos, i = this.options.ecmaVersion >= 11, s = e.current(i);
|
|
1819
|
-
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue),
|
|
1895
|
+
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue), cs(s) ? (e.lastIntValue = s, true) : (e.pos = t, false);
|
|
1820
1896
|
};
|
|
1821
|
-
function
|
|
1822
|
-
return
|
|
1897
|
+
function cs(e) {
|
|
1898
|
+
return j(e, true) || e === 36 || e === 95;
|
|
1823
1899
|
}
|
|
1824
|
-
|
|
1900
|
+
f.regexp_eatRegExpIdentifierPart = function(e) {
|
|
1825
1901
|
var t = e.pos, i = this.options.ecmaVersion >= 11, s = e.current(i);
|
|
1826
|
-
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue),
|
|
1902
|
+
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue), ls(s) ? (e.lastIntValue = s, true) : (e.pos = t, false);
|
|
1827
1903
|
};
|
|
1828
|
-
function
|
|
1829
|
-
return
|
|
1904
|
+
function ls(e) {
|
|
1905
|
+
return X(e, true) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
1830
1906
|
}
|
|
1831
|
-
|
|
1907
|
+
f.regexp_eatAtomEscape = function(e) {
|
|
1832
1908
|
return this.regexp_eatBackReference(e) || this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e) || e.switchN && this.regexp_eatKGroupName(e) ? true : (e.switchU && (e.current() === 99 && e.raise("Invalid unicode escape"), e.raise("Invalid escape")), false);
|
|
1833
1909
|
};
|
|
1834
|
-
|
|
1910
|
+
f.regexp_eatBackReference = function(e) {
|
|
1835
1911
|
var t = e.pos;
|
|
1836
1912
|
if (this.regexp_eatDecimalEscape(e)) {
|
|
1837
1913
|
var i = e.lastIntValue;
|
|
@@ -1841,17 +1917,17 @@ l.regexp_eatBackReference = function(e) {
|
|
|
1841
1917
|
}
|
|
1842
1918
|
return false;
|
|
1843
1919
|
};
|
|
1844
|
-
|
|
1920
|
+
f.regexp_eatKGroupName = function(e) {
|
|
1845
1921
|
if (e.eat(107)) {
|
|
1846
1922
|
if (this.regexp_eatGroupName(e)) return e.backReferenceNames.push(e.lastStringValue), true;
|
|
1847
1923
|
e.raise("Invalid named reference");
|
|
1848
1924
|
}
|
|
1849
1925
|
return false;
|
|
1850
1926
|
};
|
|
1851
|
-
|
|
1927
|
+
f.regexp_eatCharacterEscape = function(e) {
|
|
1852
1928
|
return this.regexp_eatControlEscape(e) || this.regexp_eatCControlLetter(e) || this.regexp_eatZero(e) || this.regexp_eatHexEscapeSequence(e) || this.regexp_eatRegExpUnicodeEscapeSequence(e, false) || !e.switchU && this.regexp_eatLegacyOctalEscapeSequence(e) || this.regexp_eatIdentityEscape(e);
|
|
1853
1929
|
};
|
|
1854
|
-
|
|
1930
|
+
f.regexp_eatCControlLetter = function(e) {
|
|
1855
1931
|
var t = e.pos;
|
|
1856
1932
|
if (e.eat(99)) {
|
|
1857
1933
|
if (this.regexp_eatControlLetter(e)) return true;
|
|
@@ -1859,50 +1935,50 @@ l.regexp_eatCControlLetter = function(e) {
|
|
|
1859
1935
|
}
|
|
1860
1936
|
return false;
|
|
1861
1937
|
};
|
|
1862
|
-
|
|
1863
|
-
return e.current() === 48 && !
|
|
1938
|
+
f.regexp_eatZero = function(e) {
|
|
1939
|
+
return e.current() === 48 && !Ee(e.lookahead()) ? (e.lastIntValue = 0, e.advance(), true) : false;
|
|
1864
1940
|
};
|
|
1865
|
-
|
|
1941
|
+
f.regexp_eatControlEscape = function(e) {
|
|
1866
1942
|
var t = e.current();
|
|
1867
1943
|
return t === 116 ? (e.lastIntValue = 9, e.advance(), true) : t === 110 ? (e.lastIntValue = 10, e.advance(), true) : t === 118 ? (e.lastIntValue = 11, e.advance(), true) : t === 102 ? (e.lastIntValue = 12, e.advance(), true) : t === 114 ? (e.lastIntValue = 13, e.advance(), true) : false;
|
|
1868
1944
|
};
|
|
1869
|
-
|
|
1945
|
+
f.regexp_eatControlLetter = function(e) {
|
|
1870
1946
|
var t = e.current();
|
|
1871
|
-
return
|
|
1947
|
+
return Ut(t) ? (e.lastIntValue = t % 32, e.advance(), true) : false;
|
|
1872
1948
|
};
|
|
1873
|
-
function
|
|
1949
|
+
function Ut(e) {
|
|
1874
1950
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
1875
1951
|
}
|
|
1876
|
-
|
|
1952
|
+
f.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
1877
1953
|
t === void 0 && (t = false);
|
|
1878
1954
|
var i = e.pos, s = t || e.switchU;
|
|
1879
1955
|
if (e.eat(117)) {
|
|
1880
1956
|
if (this.regexp_eatFixedHexDigits(e, 4)) {
|
|
1881
1957
|
var r = e.lastIntValue;
|
|
1882
1958
|
if (s && r >= 55296 && r <= 56319) {
|
|
1883
|
-
var
|
|
1959
|
+
var o = e.pos;
|
|
1884
1960
|
if (e.eat(92) && e.eat(117) && this.regexp_eatFixedHexDigits(e, 4)) {
|
|
1885
|
-
var
|
|
1886
|
-
if (
|
|
1961
|
+
var u = e.lastIntValue;
|
|
1962
|
+
if (u >= 56320 && u <= 57343) return e.lastIntValue = (r - 55296) * 1024 + (u - 56320) + 65536, true;
|
|
1887
1963
|
}
|
|
1888
|
-
e.pos =
|
|
1964
|
+
e.pos = o, e.lastIntValue = r;
|
|
1889
1965
|
}
|
|
1890
1966
|
return true;
|
|
1891
1967
|
}
|
|
1892
|
-
if (s && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) &&
|
|
1968
|
+
if (s && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) && fs(e.lastIntValue)) return true;
|
|
1893
1969
|
s && e.raise("Invalid unicode escape"), e.pos = i;
|
|
1894
1970
|
}
|
|
1895
1971
|
return false;
|
|
1896
1972
|
};
|
|
1897
|
-
function
|
|
1973
|
+
function fs(e) {
|
|
1898
1974
|
return e >= 0 && e <= 1114111;
|
|
1899
1975
|
}
|
|
1900
|
-
|
|
1976
|
+
f.regexp_eatIdentityEscape = function(e) {
|
|
1901
1977
|
if (e.switchU) return this.regexp_eatSyntaxCharacter(e) ? true : e.eat(47) ? (e.lastIntValue = 47, true) : false;
|
|
1902
1978
|
var t = e.current();
|
|
1903
1979
|
return t !== 99 && (!e.switchN || t !== 107) ? (e.lastIntValue = t, e.advance(), true) : false;
|
|
1904
1980
|
};
|
|
1905
|
-
|
|
1981
|
+
f.regexp_eatDecimalEscape = function(e) {
|
|
1906
1982
|
e.lastIntValue = 0;
|
|
1907
1983
|
var t = e.current();
|
|
1908
1984
|
if (t >= 49 && t <= 57) {
|
|
@@ -1913,10 +1989,12 @@ l.regexp_eatDecimalEscape = function(e) {
|
|
|
1913
1989
|
}
|
|
1914
1990
|
return false;
|
|
1915
1991
|
};
|
|
1916
|
-
var
|
|
1917
|
-
|
|
1992
|
+
var Gt = 0;
|
|
1993
|
+
var J = 1;
|
|
1994
|
+
var B = 2;
|
|
1995
|
+
f.regexp_eatCharacterClassEscape = function(e) {
|
|
1918
1996
|
var t = e.current();
|
|
1919
|
-
if (
|
|
1997
|
+
if (ds(t)) return e.lastIntValue = -1, e.advance(), J;
|
|
1920
1998
|
var i = false;
|
|
1921
1999
|
if (e.switchU && this.options.ecmaVersion >= 9 && ((i = t === 80) || t === 112)) {
|
|
1922
2000
|
e.lastIntValue = -1, e.advance();
|
|
@@ -1924,64 +2002,64 @@ l.regexp_eatCharacterClassEscape = function(e) {
|
|
|
1924
2002
|
if (e.eat(123) && (s = this.regexp_eatUnicodePropertyValueExpression(e)) && e.eat(125)) return i && s === B && e.raise("Invalid property name"), s;
|
|
1925
2003
|
e.raise("Invalid property name");
|
|
1926
2004
|
}
|
|
1927
|
-
return
|
|
2005
|
+
return Gt;
|
|
1928
2006
|
};
|
|
1929
|
-
function
|
|
2007
|
+
function ds(e) {
|
|
1930
2008
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
1931
2009
|
}
|
|
1932
|
-
|
|
2010
|
+
f.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
1933
2011
|
var t = e.pos;
|
|
1934
2012
|
if (this.regexp_eatUnicodePropertyName(e) && e.eat(61)) {
|
|
1935
2013
|
var i = e.lastStringValue;
|
|
1936
2014
|
if (this.regexp_eatUnicodePropertyValue(e)) {
|
|
1937
2015
|
var s = e.lastStringValue;
|
|
1938
|
-
return this.regexp_validateUnicodePropertyNameAndValue(e, i, s),
|
|
2016
|
+
return this.regexp_validateUnicodePropertyNameAndValue(e, i, s), J;
|
|
1939
2017
|
}
|
|
1940
2018
|
}
|
|
1941
2019
|
if (e.pos = t, this.regexp_eatLoneUnicodePropertyNameOrValue(e)) {
|
|
1942
2020
|
var r = e.lastStringValue;
|
|
1943
2021
|
return this.regexp_validateUnicodePropertyNameOrValue(e, r);
|
|
1944
2022
|
}
|
|
1945
|
-
return
|
|
2023
|
+
return Gt;
|
|
1946
2024
|
};
|
|
1947
|
-
|
|
2025
|
+
f.regexp_validateUnicodePropertyNameAndValue = function(e, t, i) {
|
|
1948
2026
|
$(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(i) || e.raise("Invalid property value");
|
|
1949
2027
|
};
|
|
1950
|
-
|
|
1951
|
-
if (e.unicodeProperties.binary.test(t)) return
|
|
2028
|
+
f.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
2029
|
+
if (e.unicodeProperties.binary.test(t)) return J;
|
|
1952
2030
|
if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t)) return B;
|
|
1953
2031
|
e.raise("Invalid property name");
|
|
1954
2032
|
};
|
|
1955
|
-
|
|
2033
|
+
f.regexp_eatUnicodePropertyName = function(e) {
|
|
1956
2034
|
var t = 0;
|
|
1957
|
-
for (e.lastStringValue = "";
|
|
2035
|
+
for (e.lastStringValue = ""; qt(t = e.current()); ) e.lastStringValue += q(t), e.advance();
|
|
1958
2036
|
return e.lastStringValue !== "";
|
|
1959
2037
|
};
|
|
1960
|
-
function
|
|
1961
|
-
return
|
|
2038
|
+
function qt(e) {
|
|
2039
|
+
return Ut(e) || e === 95;
|
|
1962
2040
|
}
|
|
1963
|
-
|
|
2041
|
+
f.regexp_eatUnicodePropertyValue = function(e) {
|
|
1964
2042
|
var t = 0;
|
|
1965
|
-
for (e.lastStringValue = "";
|
|
2043
|
+
for (e.lastStringValue = ""; ms(t = e.current()); ) e.lastStringValue += q(t), e.advance();
|
|
1966
2044
|
return e.lastStringValue !== "";
|
|
1967
2045
|
};
|
|
1968
|
-
function
|
|
1969
|
-
return
|
|
2046
|
+
function ms(e) {
|
|
2047
|
+
return qt(e) || Ee(e);
|
|
1970
2048
|
}
|
|
1971
|
-
|
|
2049
|
+
f.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
1972
2050
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
1973
2051
|
};
|
|
1974
|
-
|
|
2052
|
+
f.regexp_eatCharacterClass = function(e) {
|
|
1975
2053
|
if (e.eat(91)) {
|
|
1976
2054
|
var t = e.eat(94), i = this.regexp_classContents(e);
|
|
1977
2055
|
return e.eat(93) || e.raise("Unterminated character class"), t && i === B && e.raise("Negated character class may contain strings"), true;
|
|
1978
2056
|
}
|
|
1979
2057
|
return false;
|
|
1980
2058
|
};
|
|
1981
|
-
|
|
1982
|
-
return e.current() === 93 ?
|
|
2059
|
+
f.regexp_classContents = function(e) {
|
|
2060
|
+
return e.current() === 93 ? J : e.switchV ? this.regexp_classSetExpression(e) : (this.regexp_nonEmptyClassRanges(e), J);
|
|
1983
2061
|
};
|
|
1984
|
-
|
|
2062
|
+
f.regexp_nonEmptyClassRanges = function(e) {
|
|
1985
2063
|
for (; this.regexp_eatClassAtom(e); ) {
|
|
1986
2064
|
var t = e.lastIntValue;
|
|
1987
2065
|
if (e.eat(45) && this.regexp_eatClassAtom(e)) {
|
|
@@ -1990,7 +2068,7 @@ l.regexp_nonEmptyClassRanges = function(e) {
|
|
|
1990
2068
|
}
|
|
1991
2069
|
}
|
|
1992
2070
|
};
|
|
1993
|
-
|
|
2071
|
+
f.regexp_eatClassAtom = function(e) {
|
|
1994
2072
|
var t = e.pos;
|
|
1995
2073
|
if (e.eat(92)) {
|
|
1996
2074
|
if (this.regexp_eatClassEscape(e)) return true;
|
|
@@ -2003,7 +2081,7 @@ l.regexp_eatClassAtom = function(e) {
|
|
|
2003
2081
|
var s = e.current();
|
|
2004
2082
|
return s !== 93 ? (e.lastIntValue = s, e.advance(), true) : false;
|
|
2005
2083
|
};
|
|
2006
|
-
|
|
2084
|
+
f.regexp_eatClassEscape = function(e) {
|
|
2007
2085
|
var t = e.pos;
|
|
2008
2086
|
if (e.eat(98)) return e.lastIntValue = 8, true;
|
|
2009
2087
|
if (e.switchU && e.eat(45)) return e.lastIntValue = 45, true;
|
|
@@ -2013,13 +2091,13 @@ l.regexp_eatClassEscape = function(e) {
|
|
|
2013
2091
|
}
|
|
2014
2092
|
return this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e);
|
|
2015
2093
|
};
|
|
2016
|
-
|
|
2017
|
-
var t =
|
|
2094
|
+
f.regexp_classSetExpression = function(e) {
|
|
2095
|
+
var t = J, i;
|
|
2018
2096
|
if (!this.regexp_eatClassSetRange(e)) if (i = this.regexp_eatClassSetOperand(e)) {
|
|
2019
2097
|
i === B && (t = B);
|
|
2020
2098
|
for (var s = e.pos; e.eatChars([38, 38]); ) {
|
|
2021
2099
|
if (e.current() !== 38 && (i = this.regexp_eatClassSetOperand(e))) {
|
|
2022
|
-
i !== B && (t =
|
|
2100
|
+
i !== B && (t = J);
|
|
2023
2101
|
continue;
|
|
2024
2102
|
}
|
|
2025
2103
|
e.raise("Invalid character in character class");
|
|
@@ -2033,7 +2111,7 @@ l.regexp_classSetExpression = function(e) {
|
|
|
2033
2111
|
i === B && (t = B);
|
|
2034
2112
|
}
|
|
2035
2113
|
};
|
|
2036
|
-
|
|
2114
|
+
f.regexp_eatClassSetRange = function(e) {
|
|
2037
2115
|
var t = e.pos;
|
|
2038
2116
|
if (this.regexp_eatClassSetCharacter(e)) {
|
|
2039
2117
|
var i = e.lastIntValue;
|
|
@@ -2045,10 +2123,10 @@ l.regexp_eatClassSetRange = function(e) {
|
|
|
2045
2123
|
}
|
|
2046
2124
|
return false;
|
|
2047
2125
|
};
|
|
2048
|
-
|
|
2049
|
-
return this.regexp_eatClassSetCharacter(e) ?
|
|
2126
|
+
f.regexp_eatClassSetOperand = function(e) {
|
|
2127
|
+
return this.regexp_eatClassSetCharacter(e) ? J : this.regexp_eatClassStringDisjunction(e) || this.regexp_eatNestedClass(e);
|
|
2050
2128
|
};
|
|
2051
|
-
|
|
2129
|
+
f.regexp_eatNestedClass = function(e) {
|
|
2052
2130
|
var t = e.pos;
|
|
2053
2131
|
if (e.eat(91)) {
|
|
2054
2132
|
var i = e.eat(94), s = this.regexp_classContents(e);
|
|
@@ -2062,7 +2140,7 @@ l.regexp_eatNestedClass = function(e) {
|
|
|
2062
2140
|
}
|
|
2063
2141
|
return null;
|
|
2064
2142
|
};
|
|
2065
|
-
|
|
2143
|
+
f.regexp_eatClassStringDisjunction = function(e) {
|
|
2066
2144
|
var t = e.pos;
|
|
2067
2145
|
if (e.eatChars([92, 113])) {
|
|
2068
2146
|
if (e.eat(123)) {
|
|
@@ -2073,38 +2151,38 @@ l.regexp_eatClassStringDisjunction = function(e) {
|
|
|
2073
2151
|
}
|
|
2074
2152
|
return null;
|
|
2075
2153
|
};
|
|
2076
|
-
|
|
2154
|
+
f.regexp_classStringDisjunctionContents = function(e) {
|
|
2077
2155
|
for (var t = this.regexp_classString(e); e.eat(124); ) this.regexp_classString(e) === B && (t = B);
|
|
2078
2156
|
return t;
|
|
2079
2157
|
};
|
|
2080
|
-
|
|
2158
|
+
f.regexp_classString = function(e) {
|
|
2081
2159
|
for (var t = 0; this.regexp_eatClassSetCharacter(e); ) t++;
|
|
2082
|
-
return t === 1 ?
|
|
2160
|
+
return t === 1 ? J : B;
|
|
2083
2161
|
};
|
|
2084
|
-
|
|
2162
|
+
f.regexp_eatClassSetCharacter = function(e) {
|
|
2085
2163
|
var t = e.pos;
|
|
2086
2164
|
if (e.eat(92)) return this.regexp_eatCharacterEscape(e) || this.regexp_eatClassSetReservedPunctuator(e) ? true : e.eat(98) ? (e.lastIntValue = 8, true) : (e.pos = t, false);
|
|
2087
2165
|
var i = e.current();
|
|
2088
|
-
return i < 0 || i === e.lookahead() &&
|
|
2166
|
+
return i < 0 || i === e.lookahead() && xs(i) || ys(i) ? false : (e.advance(), e.lastIntValue = i, true);
|
|
2089
2167
|
};
|
|
2090
|
-
function
|
|
2168
|
+
function xs(e) {
|
|
2091
2169
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
2092
2170
|
}
|
|
2093
|
-
function
|
|
2171
|
+
function ys(e) {
|
|
2094
2172
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
2095
2173
|
}
|
|
2096
|
-
|
|
2174
|
+
f.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
2097
2175
|
var t = e.current();
|
|
2098
|
-
return
|
|
2176
|
+
return gs(t) ? (e.lastIntValue = t, e.advance(), true) : false;
|
|
2099
2177
|
};
|
|
2100
|
-
function
|
|
2178
|
+
function gs(e) {
|
|
2101
2179
|
return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
|
|
2102
2180
|
}
|
|
2103
|
-
|
|
2181
|
+
f.regexp_eatClassControlLetter = function(e) {
|
|
2104
2182
|
var t = e.current();
|
|
2105
|
-
return
|
|
2183
|
+
return Ee(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), true) : false;
|
|
2106
2184
|
};
|
|
2107
|
-
|
|
2185
|
+
f.regexp_eatHexEscapeSequence = function(e) {
|
|
2108
2186
|
var t = e.pos;
|
|
2109
2187
|
if (e.eat(120)) {
|
|
2110
2188
|
if (this.regexp_eatFixedHexDigits(e, 2)) return true;
|
|
@@ -2112,26 +2190,26 @@ l.regexp_eatHexEscapeSequence = function(e) {
|
|
|
2112
2190
|
}
|
|
2113
2191
|
return false;
|
|
2114
2192
|
};
|
|
2115
|
-
|
|
2193
|
+
f.regexp_eatDecimalDigits = function(e) {
|
|
2116
2194
|
var t = e.pos, i = 0;
|
|
2117
|
-
for (e.lastIntValue = 0;
|
|
2195
|
+
for (e.lastIntValue = 0; Ee(i = e.current()); ) e.lastIntValue = 10 * e.lastIntValue + (i - 48), e.advance();
|
|
2118
2196
|
return e.pos !== t;
|
|
2119
2197
|
};
|
|
2120
|
-
function
|
|
2198
|
+
function Ee(e) {
|
|
2121
2199
|
return e >= 48 && e <= 57;
|
|
2122
2200
|
}
|
|
2123
|
-
|
|
2201
|
+
f.regexp_eatHexDigits = function(e) {
|
|
2124
2202
|
var t = e.pos, i = 0;
|
|
2125
|
-
for (e.lastIntValue = 0;
|
|
2203
|
+
for (e.lastIntValue = 0; Jt(i = e.current()); ) e.lastIntValue = 16 * e.lastIntValue + Kt(i), e.advance();
|
|
2126
2204
|
return e.pos !== t;
|
|
2127
2205
|
};
|
|
2128
|
-
function
|
|
2206
|
+
function Jt(e) {
|
|
2129
2207
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
2130
2208
|
}
|
|
2131
|
-
function
|
|
2209
|
+
function Kt(e) {
|
|
2132
2210
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
2133
2211
|
}
|
|
2134
|
-
|
|
2212
|
+
f.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
2135
2213
|
if (this.regexp_eatOctalDigit(e)) {
|
|
2136
2214
|
var t = e.lastIntValue;
|
|
2137
2215
|
if (this.regexp_eatOctalDigit(e)) {
|
|
@@ -2142,31 +2220,32 @@ l.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
2142
2220
|
}
|
|
2143
2221
|
return false;
|
|
2144
2222
|
};
|
|
2145
|
-
|
|
2223
|
+
f.regexp_eatOctalDigit = function(e) {
|
|
2146
2224
|
var t = e.current();
|
|
2147
2225
|
return Ht(t) ? (e.lastIntValue = t - 48, e.advance(), true) : (e.lastIntValue = 0, false);
|
|
2148
2226
|
};
|
|
2149
2227
|
function Ht(e) {
|
|
2150
2228
|
return e >= 48 && e <= 55;
|
|
2151
2229
|
}
|
|
2152
|
-
|
|
2230
|
+
f.regexp_eatFixedHexDigits = function(e, t) {
|
|
2153
2231
|
var i = e.pos;
|
|
2154
2232
|
e.lastIntValue = 0;
|
|
2155
2233
|
for (var s = 0; s < t; ++s) {
|
|
2156
2234
|
var r = e.current();
|
|
2157
|
-
if (!
|
|
2158
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
2235
|
+
if (!Jt(r)) return e.pos = i, false;
|
|
2236
|
+
e.lastIntValue = 16 * e.lastIntValue + Kt(r), e.advance();
|
|
2159
2237
|
}
|
|
2160
2238
|
return true;
|
|
2161
2239
|
};
|
|
2162
|
-
var
|
|
2163
|
-
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new
|
|
2164
|
-
}
|
|
2240
|
+
var Qe = function(t) {
|
|
2241
|
+
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new be(t, t.startLoc, t.endLoc)), t.options.ranges && (this.range = [t.start, t.end]);
|
|
2242
|
+
};
|
|
2243
|
+
var b = A.prototype;
|
|
2165
2244
|
b.next = function(e) {
|
|
2166
|
-
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new
|
|
2245
|
+
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Qe(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2167
2246
|
};
|
|
2168
2247
|
b.getToken = function() {
|
|
2169
|
-
return this.next(), new
|
|
2248
|
+
return this.next(), new Qe(this);
|
|
2170
2249
|
};
|
|
2171
2250
|
typeof Symbol < "u" && (b[Symbol.iterator] = function() {
|
|
2172
2251
|
var e = this;
|
|
@@ -2182,7 +2261,7 @@ b.nextToken = function() {
|
|
|
2182
2261
|
this.readToken(this.fullCharCodeAtPos());
|
|
2183
2262
|
};
|
|
2184
2263
|
b.readToken = function(e) {
|
|
2185
|
-
return
|
|
2264
|
+
return j(e, this.options.ecmaVersion >= 6) || e === 92 ? this.readWord() : this.getTokenFromCode(e);
|
|
2186
2265
|
};
|
|
2187
2266
|
b.fullCharCodeAtPos = function() {
|
|
2188
2267
|
var e = this.input.charCodeAt(this.pos);
|
|
@@ -2192,7 +2271,7 @@ b.fullCharCodeAtPos = function() {
|
|
|
2192
2271
|
};
|
|
2193
2272
|
b.skipBlockComment = function() {
|
|
2194
2273
|
var e = this.options.onComment && this.curPosition(), t = this.pos, i = this.input.indexOf("*/", this.pos += 2);
|
|
2195
|
-
if (i === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = i + 2, this.options.locations) for (var s = void 0, r = t; (s =
|
|
2274
|
+
if (i === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = i + 2, this.options.locations) for (var s = void 0, r = t; (s = xt(this.input, r, this.pos)) > -1; ) ++this.curLine, r = this.lineStart = s;
|
|
2196
2275
|
this.options.onComment && this.options.onComment(true, this.input.slice(t + 2, i), t, this.pos, e, this.curPosition());
|
|
2197
2276
|
};
|
|
2198
2277
|
b.skipLineComment = function(e) {
|
|
@@ -2227,7 +2306,7 @@ b.skipSpace = function() {
|
|
|
2227
2306
|
}
|
|
2228
2307
|
break;
|
|
2229
2308
|
default:
|
|
2230
|
-
if (e > 8 && e < 14 || e >= 5760 &&
|
|
2309
|
+
if (e > 8 && e < 14 || e >= 5760 && yt.test(String.fromCharCode(e))) ++this.pos;
|
|
2231
2310
|
else break e;
|
|
2232
2311
|
}
|
|
2233
2312
|
}
|
|
@@ -2268,7 +2347,7 @@ b.readToken_caret = function() {
|
|
|
2268
2347
|
};
|
|
2269
2348
|
b.readToken_plus_min = function(e) {
|
|
2270
2349
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2271
|
-
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 ||
|
|
2350
|
+
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || L.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(a.incDec, 2) : t === 61 ? this.finishOp(a.assign, 2) : this.finishOp(a.plusMin, 1);
|
|
2272
2351
|
};
|
|
2273
2352
|
b.readToken_lt_gt = function(e) {
|
|
2274
2353
|
var t = this.input.charCodeAt(this.pos + 1), i = 1;
|
|
@@ -2298,8 +2377,8 @@ b.readToken_question = function() {
|
|
|
2298
2377
|
};
|
|
2299
2378
|
b.readToken_numberSign = function() {
|
|
2300
2379
|
var e = this.options.ecmaVersion, t = 35;
|
|
2301
|
-
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(),
|
|
2302
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
2380
|
+
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), j(t, true) || t === 92)) return this.finishToken(a.privateId, this.readWord1());
|
|
2381
|
+
this.raise(this.pos, "Unexpected character '" + q(t) + "'");
|
|
2303
2382
|
};
|
|
2304
2383
|
b.getTokenFromCode = function(e) {
|
|
2305
2384
|
switch (e) {
|
|
@@ -2372,7 +2451,7 @@ b.getTokenFromCode = function(e) {
|
|
|
2372
2451
|
case 35:
|
|
2373
2452
|
return this.readToken_numberSign();
|
|
2374
2453
|
}
|
|
2375
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
2454
|
+
this.raise(this.pos, "Unexpected character '" + q(e) + "'");
|
|
2376
2455
|
};
|
|
2377
2456
|
b.finishOp = function(e, t) {
|
|
2378
2457
|
var i = this.input.slice(this.pos, this.pos + t);
|
|
@@ -2382,7 +2461,7 @@ b.readRegexp = function() {
|
|
|
2382
2461
|
for (var e, t, i = this.pos; ; ) {
|
|
2383
2462
|
this.pos >= this.input.length && this.raise(i, "Unterminated regular expression");
|
|
2384
2463
|
var s = this.input.charAt(this.pos);
|
|
2385
|
-
if (
|
|
2464
|
+
if (L.test(s) && this.raise(i, "Unterminated regular expression"), e) e = false;
|
|
2386
2465
|
else {
|
|
2387
2466
|
if (s === "[") t = true;
|
|
2388
2467
|
else if (s === "]" && t) t = false;
|
|
@@ -2393,40 +2472,40 @@ b.readRegexp = function() {
|
|
|
2393
2472
|
}
|
|
2394
2473
|
var r = this.input.slice(i, this.pos);
|
|
2395
2474
|
++this.pos;
|
|
2396
|
-
var
|
|
2397
|
-
this.containsEsc && this.unexpected(
|
|
2398
|
-
var p = this.regexpState || (this.regexpState = new
|
|
2399
|
-
p.reset(i, r,
|
|
2400
|
-
var
|
|
2475
|
+
var o = this.pos, u = this.readWord1();
|
|
2476
|
+
this.containsEsc && this.unexpected(o);
|
|
2477
|
+
var p = this.regexpState || (this.regexpState = new G(this));
|
|
2478
|
+
p.reset(i, r, u), this.validateRegExpFlags(p), this.validateRegExpPattern(p);
|
|
2479
|
+
var h = null;
|
|
2401
2480
|
try {
|
|
2402
|
-
|
|
2481
|
+
h = new RegExp(r, u);
|
|
2403
2482
|
} catch {
|
|
2404
2483
|
}
|
|
2405
|
-
return this.finishToken(a.regexp, { pattern: r, flags:
|
|
2484
|
+
return this.finishToken(a.regexp, { pattern: r, flags: u, value: h });
|
|
2406
2485
|
};
|
|
2407
2486
|
b.readInt = function(e, t, i) {
|
|
2408
|
-
for (var s = this.options.ecmaVersion >= 12 && t === void 0, r = i && this.input.charCodeAt(this.pos) === 48,
|
|
2409
|
-
var
|
|
2410
|
-
if (s &&
|
|
2411
|
-
r && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), p === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"),
|
|
2487
|
+
for (var s = this.options.ecmaVersion >= 12 && t === void 0, r = i && this.input.charCodeAt(this.pos) === 48, o = this.pos, u = 0, p = 0, h = 0, l = t ?? 1 / 0; h < l; ++h, ++this.pos) {
|
|
2488
|
+
var m = this.input.charCodeAt(this.pos), S = void 0;
|
|
2489
|
+
if (s && m === 95) {
|
|
2490
|
+
r && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), p === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), h === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), p = m;
|
|
2412
2491
|
continue;
|
|
2413
2492
|
}
|
|
2414
|
-
if (
|
|
2415
|
-
p =
|
|
2493
|
+
if (m >= 97 ? S = m - 97 + 10 : m >= 65 ? S = m - 65 + 10 : m >= 48 && m <= 57 ? S = m - 48 : S = 1 / 0, S >= e) break;
|
|
2494
|
+
p = m, u = u * e + S;
|
|
2416
2495
|
}
|
|
2417
|
-
return s && p === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos ===
|
|
2496
|
+
return s && p === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === o || t != null && this.pos - o !== t ? null : u;
|
|
2418
2497
|
};
|
|
2419
|
-
function
|
|
2498
|
+
function vs(e, t) {
|
|
2420
2499
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
2421
2500
|
}
|
|
2422
|
-
function
|
|
2501
|
+
function Xt(e) {
|
|
2423
2502
|
return typeof BigInt != "function" ? null : BigInt(e.replace(/_/g, ""));
|
|
2424
2503
|
}
|
|
2425
2504
|
b.readRadixNumber = function(e) {
|
|
2426
2505
|
var t = this.pos;
|
|
2427
2506
|
this.pos += 2;
|
|
2428
2507
|
var i = this.readInt(e);
|
|
2429
|
-
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i =
|
|
2508
|
+
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i = Xt(this.input.slice(t, this.pos)), ++this.pos) : j(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(a.num, i);
|
|
2430
2509
|
};
|
|
2431
2510
|
b.readNumber = function(e) {
|
|
2432
2511
|
var t = this.pos;
|
|
@@ -2435,12 +2514,12 @@ b.readNumber = function(e) {
|
|
|
2435
2514
|
i && this.strict && this.raise(t, "Invalid number");
|
|
2436
2515
|
var s = this.input.charCodeAt(this.pos);
|
|
2437
2516
|
if (!i && !e && this.options.ecmaVersion >= 11 && s === 110) {
|
|
2438
|
-
var r =
|
|
2439
|
-
return ++this.pos,
|
|
2517
|
+
var r = Xt(this.input.slice(t, this.pos));
|
|
2518
|
+
return ++this.pos, j(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(a.num, r);
|
|
2440
2519
|
}
|
|
2441
|
-
i && /[89]/.test(this.input.slice(t, this.pos)) && (i = false), s === 46 && !i && (++this.pos, this.readInt(10), s = this.input.charCodeAt(this.pos)), (s === 69 || s === 101) && !i && (s = this.input.charCodeAt(++this.pos), (s === 43 || s === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")),
|
|
2442
|
-
var
|
|
2443
|
-
return this.finishToken(a.num,
|
|
2520
|
+
i && /[89]/.test(this.input.slice(t, this.pos)) && (i = false), s === 46 && !i && (++this.pos, this.readInt(10), s = this.input.charCodeAt(this.pos)), (s === 69 || s === 101) && !i && (s = this.input.charCodeAt(++this.pos), (s === 43 || s === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), j(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
2521
|
+
var o = vs(this.input.slice(t, this.pos), i);
|
|
2522
|
+
return this.finishToken(a.num, o);
|
|
2444
2523
|
};
|
|
2445
2524
|
b.readCodePoint = function() {
|
|
2446
2525
|
var e = this.input.charCodeAt(this.pos), t;
|
|
@@ -2529,7 +2608,7 @@ b.readEscapedChar = function(e) {
|
|
|
2529
2608
|
case 120:
|
|
2530
2609
|
return String.fromCharCode(this.readHexChar(2));
|
|
2531
2610
|
case 117:
|
|
2532
|
-
return
|
|
2611
|
+
return q(this.readCodePoint());
|
|
2533
2612
|
case 116:
|
|
2534
2613
|
return " ";
|
|
2535
2614
|
case 98:
|
|
@@ -2564,13 +2643,13 @@ b.readWord1 = function() {
|
|
|
2564
2643
|
this.containsEsc = false;
|
|
2565
2644
|
for (var e = "", t = true, i = this.pos, s = this.options.ecmaVersion >= 6; this.pos < this.input.length; ) {
|
|
2566
2645
|
var r = this.fullCharCodeAtPos();
|
|
2567
|
-
if (
|
|
2646
|
+
if (X(r, s)) this.pos += r <= 65535 ? 1 : 2;
|
|
2568
2647
|
else if (r === 92) {
|
|
2569
2648
|
this.containsEsc = true, e += this.input.slice(i, this.pos);
|
|
2570
|
-
var
|
|
2649
|
+
var o = this.pos;
|
|
2571
2650
|
this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
|
|
2572
|
-
var
|
|
2573
|
-
(t ?
|
|
2651
|
+
var u = this.readCodePoint();
|
|
2652
|
+
(t ? j : X)(u, s) || this.invalidStringToken(o, "Invalid Unicode escape"), e += q(u), i = this.pos;
|
|
2574
2653
|
} else break;
|
|
2575
2654
|
t = false;
|
|
2576
2655
|
}
|
|
@@ -2578,17 +2657,17 @@ b.readWord1 = function() {
|
|
|
2578
2657
|
};
|
|
2579
2658
|
b.readWord = function() {
|
|
2580
2659
|
var e = this.readWord1(), t = a.name;
|
|
2581
|
-
return this.keywords.test(e) && (t =
|
|
2660
|
+
return this.keywords.test(e) && (t = Je[e]), this.finishToken(t, e);
|
|
2582
2661
|
};
|
|
2583
|
-
var
|
|
2584
|
-
|
|
2585
|
-
var
|
|
2586
|
-
function
|
|
2662
|
+
var bs = "8.15.0";
|
|
2663
|
+
A.acorn = { Parser: A, version: bs, defaultOptions: Ue, Position: ne, SourceLocation: be, getLineInfo: vt, Node: Te, TokenType: C, tokTypes: a, keywordTypes: Je, TokContext: F, tokContexts: T, isIdentifierChar: X, isIdentifierStart: j, Token: Qe, isNewLine: Y, lineBreak: L, lineBreakG: qi, nonASCIIwhitespace: yt };
|
|
2664
|
+
var Si = ut($e(), 1);
|
|
2665
|
+
function As(e, t) {
|
|
2587
2666
|
let i = new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")");
|
|
2588
2667
|
return Object.assign(i, t);
|
|
2589
2668
|
}
|
|
2590
|
-
var
|
|
2591
|
-
function
|
|
2669
|
+
var Ae = As;
|
|
2670
|
+
function ke(e) {
|
|
2592
2671
|
let t = [];
|
|
2593
2672
|
for (let i of e) try {
|
|
2594
2673
|
return i();
|
|
@@ -2597,316 +2676,317 @@ function Es(e) {
|
|
|
2597
2676
|
}
|
|
2598
2677
|
throw Object.assign(new Error("All combinations failed"), { errors: t });
|
|
2599
2678
|
}
|
|
2600
|
-
var
|
|
2601
|
-
var ks = (e
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
let r = t[s];
|
|
2606
|
-
if (i(r, s, t)) return r;
|
|
2607
|
-
}
|
|
2679
|
+
var te = (e, t) => (i, s, ...r) => i | 1 && s == null ? void 0 : (t.call(s) ?? s[e]).apply(s, r);
|
|
2680
|
+
var ks = Array.prototype.findLast ?? function(e) {
|
|
2681
|
+
for (let t = this.length - 1; t >= 0; t--) {
|
|
2682
|
+
let i = this[t];
|
|
2683
|
+
if (e(i, t, this)) return i;
|
|
2608
2684
|
}
|
|
2609
|
-
}
|
|
2610
|
-
var
|
|
2611
|
-
if (
|
|
2612
|
-
}
|
|
2613
|
-
var
|
|
2614
|
-
}, { get: () => ws });
|
|
2615
|
-
function w(e) {
|
|
2616
|
-
var s, r, n;
|
|
2617
|
-
let t = ((s = e.range) == null ? void 0 : s[0]) ?? e.start, i = (n = ((r = e.declaration) == null ? void 0 : r.decorators) ?? e.decorators) == null ? void 0 : n[0];
|
|
2618
|
-
return i ? Math.min(w(i), t) : t;
|
|
2619
|
-
}
|
|
2620
|
-
function k(e) {
|
|
2621
|
-
var i;
|
|
2622
|
-
return ((i = e.range) == null ? void 0 : i[1]) ?? e.end;
|
|
2623
|
-
}
|
|
2685
|
+
};
|
|
2686
|
+
var ws = te("findLast", function() {
|
|
2687
|
+
if (Array.isArray(this)) return ks;
|
|
2688
|
+
});
|
|
2689
|
+
var Zt = ws;
|
|
2624
2690
|
function Ps(e) {
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
let o = k(r);
|
|
2635
|
-
if (o < t) continue;
|
|
2636
|
-
let p = o - n;
|
|
2637
|
-
s = s.slice(0, n - t) + " ".repeat(p) + s.slice(o - t);
|
|
2638
|
-
}
|
|
2639
|
-
return s;
|
|
2691
|
+
return this[e < 0 ? this.length + e : e];
|
|
2692
|
+
}
|
|
2693
|
+
var Is = te("at", function() {
|
|
2694
|
+
if (Array.isArray(this) || typeof this == "string") return Ps;
|
|
2695
|
+
});
|
|
2696
|
+
var ie = Is;
|
|
2697
|
+
function M(e) {
|
|
2698
|
+
let t = e.range?.[0] ?? e.start, i = (e.declaration?.decorators ?? e.decorators)?.[0];
|
|
2699
|
+
return i ? Math.min(M(i), t) : t;
|
|
2640
2700
|
}
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2701
|
+
function R(e) {
|
|
2702
|
+
return e.range?.[1] ?? e.end;
|
|
2703
|
+
}
|
|
2704
|
+
function Ns(e) {
|
|
2705
|
+
let t = new Set(e);
|
|
2706
|
+
return (i) => t.has(i?.type);
|
|
2707
|
+
}
|
|
2708
|
+
var se = Ns;
|
|
2709
|
+
var Ls = se(["Block", "CommentBlock", "MultiLine"]);
|
|
2710
|
+
var re = Ls;
|
|
2711
|
+
var Rs = se(["Line", "CommentLine", "SingleLine", "HashbangComment", "HTMLOpen", "HTMLClose", "Hashbang", "InterpreterDirective"]);
|
|
2712
|
+
var ei = Rs;
|
|
2713
|
+
var Ze = /* @__PURE__ */ new WeakMap();
|
|
2645
2714
|
function Vs(e) {
|
|
2646
|
-
return
|
|
2715
|
+
return Ze.has(e) || Ze.set(e, re(e) && e.value[0] === "*" && /@(?:type|satisfies)\b/u.test(e.value)), Ze.get(e);
|
|
2647
2716
|
}
|
|
2648
|
-
var
|
|
2649
|
-
function
|
|
2650
|
-
if (!
|
|
2717
|
+
var ti = Vs;
|
|
2718
|
+
function Os(e) {
|
|
2719
|
+
if (!re(e)) return false;
|
|
2651
2720
|
let t = `*${e.value}*`.split(`
|
|
2652
2721
|
`);
|
|
2653
2722
|
return t.length > 1 && t.every((i) => i.trimStart()[0] === "*");
|
|
2654
2723
|
}
|
|
2655
|
-
var
|
|
2656
|
-
function Os(e) {
|
|
2657
|
-
return Ye.has(e) || Ye.set(e, Rs(e)), Ye.get(e);
|
|
2658
|
-
}
|
|
2659
|
-
var $e = Os;
|
|
2724
|
+
var et = /* @__PURE__ */ new WeakMap();
|
|
2660
2725
|
function Bs(e) {
|
|
2726
|
+
return et.has(e) || et.set(e, Os(e)), et.get(e);
|
|
2727
|
+
}
|
|
2728
|
+
var tt = Bs;
|
|
2729
|
+
function Ds(e) {
|
|
2661
2730
|
if (e.length < 2) return;
|
|
2662
2731
|
let t;
|
|
2663
2732
|
for (let i = e.length - 1; i >= 0; i--) {
|
|
2664
2733
|
let s = e[i];
|
|
2665
|
-
if (t &&
|
|
2734
|
+
if (t && R(s) === M(t) && tt(s) && tt(t) && (e.splice(i + 1, 1), s.value += "*//*" + t.value, s.range = [M(s), R(t)]), !ei(s) && !re(s)) throw new TypeError(`Unknown comment type: "${s.type}".`);
|
|
2666
2735
|
t = s;
|
|
2667
2736
|
}
|
|
2668
2737
|
}
|
|
2669
|
-
var
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2738
|
+
var ii = Ds;
|
|
2739
|
+
function Ms(e) {
|
|
2740
|
+
return e !== null && typeof e == "object";
|
|
2741
|
+
}
|
|
2742
|
+
var si = Ms;
|
|
2743
|
+
var ce = null;
|
|
2744
|
+
function le(e) {
|
|
2745
|
+
if (ce !== null && typeof ce.property) {
|
|
2746
|
+
let t = ce;
|
|
2747
|
+
return ce = le.prototype = null, t;
|
|
2675
2748
|
}
|
|
2676
|
-
return
|
|
2749
|
+
return ce = le.prototype = e ?? /* @__PURE__ */ Object.create(null), new le();
|
|
2677
2750
|
}
|
|
2678
|
-
var
|
|
2679
|
-
for (let e = 0; e <=
|
|
2680
|
-
function
|
|
2681
|
-
return
|
|
2751
|
+
var Fs = 10;
|
|
2752
|
+
for (let e = 0; e <= Fs; e++) le();
|
|
2753
|
+
function it(e) {
|
|
2754
|
+
return le(e);
|
|
2682
2755
|
}
|
|
2683
|
-
function
|
|
2684
|
-
|
|
2756
|
+
function js(e, t = "type") {
|
|
2757
|
+
it(e);
|
|
2685
2758
|
function i(s) {
|
|
2686
|
-
let r = s[t],
|
|
2687
|
-
if (!Array.isArray(
|
|
2688
|
-
return
|
|
2759
|
+
let r = s[t], o = e[r];
|
|
2760
|
+
if (!Array.isArray(o)) throw Object.assign(new Error(`Missing visitor keys for '${r}'.`), { node: s });
|
|
2761
|
+
return o;
|
|
2689
2762
|
}
|
|
2690
2763
|
return i;
|
|
2691
2764
|
}
|
|
2692
|
-
var
|
|
2693
|
-
var si = { ArrayExpression: ["elements"], AssignmentExpression: ["left", "right"], BinaryExpression: ["left", "right"], InterpreterDirective: [], Directive: ["value"], DirectiveLiteral: [], BlockStatement: ["directives", "body"], BreakStatement: ["label"], CallExpression: ["callee", "typeParameters", "typeArguments", "arguments"], CatchClause: ["param", "body"], ConditionalExpression: ["test", "consequent", "alternate"], ContinueStatement: ["label"], DebuggerStatement: [], DoWhileStatement: ["body", "test"], EmptyStatement: [], ExpressionStatement: ["expression"], File: ["program"], ForInStatement: ["left", "right", "body"], ForStatement: ["init", "test", "update", "body"], FunctionDeclaration: ["id", "typeParameters", "params", "predicate", "returnType", "body"], FunctionExpression: ["id", "typeParameters", "params", "returnType", "body"], Identifier: ["typeAnnotation", "decorators"], IfStatement: ["test", "consequent", "alternate"], LabeledStatement: ["label", "body"], StringLiteral: [], NumericLiteral: [], NullLiteral: [], BooleanLiteral: [], RegExpLiteral: [], LogicalExpression: ["left", "right"], MemberExpression: ["object", "property"], NewExpression: ["callee", "typeParameters", "typeArguments", "arguments"], Program: ["directives", "body"], ObjectExpression: ["properties"], ObjectMethod: ["decorators", "key", "typeParameters", "params", "returnType", "body"], ObjectProperty: ["decorators", "key", "value"], RestElement: ["argument", "typeAnnotation", "decorators"], ReturnStatement: ["argument"], SequenceExpression: ["expressions"], ParenthesizedExpression: ["expression"], SwitchCase: ["test", "consequent"], SwitchStatement: ["discriminant", "cases"], ThisExpression: [], ThrowStatement: ["argument"], TryStatement: ["block", "handler", "finalizer"], UnaryExpression: ["argument"], UpdateExpression: ["argument"], VariableDeclaration: ["declarations"], VariableDeclarator: ["id", "init"], WhileStatement: ["test", "body"], WithStatement: ["object", "body"], AssignmentPattern: ["left", "right", "decorators", "typeAnnotation"], ArrayPattern: ["elements", "typeAnnotation", "decorators"], ArrowFunctionExpression: ["typeParameters", "params", "predicate", "returnType", "body"], ClassBody: ["body"], ClassExpression: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "mixins", "implements", "body", "superTypeArguments"], ClassDeclaration: ["decorators", "id", "typeParameters", "superClass", "superTypeParameters", "mixins", "implements", "body", "superTypeArguments"], ExportAllDeclaration: ["source", "attributes", "exported"], ExportDefaultDeclaration: ["declaration"], ExportNamedDeclaration: ["declaration", "specifiers", "source", "attributes"], ExportSpecifier: ["local", "exported"], ForOfStatement: ["left", "right", "body"], ImportDeclaration: ["specifiers", "source", "attributes"], ImportDefaultSpecifier: ["local"], ImportNamespaceSpecifier: ["local"], ImportSpecifier: ["imported", "local"], ImportExpression: ["source", "options"], MetaProperty: ["meta", "property"], ClassMethod: ["decorators", "key", "typeParameters", "params", "returnType", "body"], ObjectPattern: ["decorators", "properties", "typeAnnotation"], SpreadElement: ["argument"], Super: [], TaggedTemplateExpression: ["tag", "typeParameters", "quasi", "typeArguments"], TemplateElement: [], TemplateLiteral: ["quasis", "expressions"], YieldExpression: ["argument"], AwaitExpression: ["argument"], BigIntLiteral: [], ExportNamespaceSpecifier: ["exported"], OptionalMemberExpression: ["object", "property"], OptionalCallExpression: ["callee", "typeParameters", "typeArguments", "arguments"], ClassProperty: ["decorators", "variance", "key", "typeAnnotation", "value"], ClassAccessorProperty: ["decorators", "key", "typeAnnotation", "value"], ClassPrivateProperty: ["decorators", "variance", "key", "typeAnnotation", "value"], ClassPrivateMethod: ["decorators", "key", "typeParameters", "params", "returnType", "body"], PrivateName: ["id"], StaticBlock: ["body"], ImportAttribute: ["key", "value"], AnyTypeAnnotation: [], ArrayTypeAnnotation: ["elementType"], BooleanTypeAnnotation: [], BooleanLiteralTypeAnnotation: [], NullLiteralTypeAnnotation: [], ClassImplements: ["id", "typeParameters"], DeclareClass: ["id", "typeParameters", "extends", "mixins", "implements", "body"], DeclareFunction: ["id", "predicate"], DeclareInterface: ["id", "typeParameters", "extends", "body"], DeclareModule: ["id", "body"], DeclareModuleExports: ["typeAnnotation"], DeclareTypeAlias: ["id", "typeParameters", "right"], DeclareOpaqueType: ["id", "typeParameters", "supertype"], DeclareVariable: ["id"], DeclareExportDeclaration: ["declaration", "specifiers", "source", "attributes"], DeclareExportAllDeclaration: ["source", "attributes"], DeclaredPredicate: ["value"], ExistsTypeAnnotation: [], FunctionTypeAnnotation: ["typeParameters", "this", "params", "rest", "returnType"], FunctionTypeParam: ["name", "typeAnnotation"], GenericTypeAnnotation: ["id", "typeParameters"], InferredPredicate: [], InterfaceExtends: ["id", "typeParameters"], InterfaceDeclaration: ["id", "typeParameters", "extends", "body"], InterfaceTypeAnnotation: ["extends", "body"], IntersectionTypeAnnotation: ["types"], MixedTypeAnnotation: [], EmptyTypeAnnotation: [], NullableTypeAnnotation: ["typeAnnotation"], NumberLiteralTypeAnnotation: [], NumberTypeAnnotation: [], ObjectTypeAnnotation: ["properties", "indexers", "callProperties", "internalSlots"], ObjectTypeInternalSlot: ["id", "value"], ObjectTypeCallProperty: ["value"], ObjectTypeIndexer: ["variance", "id", "key", "value"], ObjectTypeProperty: ["key", "value", "variance"], ObjectTypeSpreadProperty: ["argument"], OpaqueType: ["id", "typeParameters", "supertype", "impltype"], QualifiedTypeIdentifier: ["qualification", "id"], StringLiteralTypeAnnotation: [], StringTypeAnnotation: [], SymbolTypeAnnotation: [], ThisTypeAnnotation: [], TupleTypeAnnotation: ["types", "elementTypes"], TypeofTypeAnnotation: ["argument", "typeArguments"], TypeAlias: ["id", "typeParameters", "right"], TypeAnnotation: ["typeAnnotation"], TypeCastExpression: ["expression", "typeAnnotation"], TypeParameter: ["bound", "default", "variance"], TypeParameterDeclaration: ["params"], TypeParameterInstantiation: ["params"], UnionTypeAnnotation: ["types"], Variance: [], VoidTypeAnnotation: [], EnumDeclaration: ["id", "body"], EnumBooleanBody: ["members"], EnumNumberBody: ["members"], EnumStringBody: ["members"], EnumSymbolBody: ["members"], EnumBooleanMember: ["id", "init"], EnumNumberMember: ["id", "init"], EnumStringMember: ["id", "init"], EnumDefaultedMember: ["id"], IndexedAccessType: ["objectType", "indexType"], OptionalIndexedAccessType: ["objectType", "indexType"], JSXAttribute: ["name", "value"], JSXClosingElement: ["name"], JSXElement: ["openingElement", "children", "closingElement"], JSXEmptyExpression: [], JSXExpressionContainer: ["expression"], JSXSpreadChild: ["expression"], JSXIdentifier: [], JSXMemberExpression: ["object", "property"], JSXNamespacedName: ["namespace", "name"], JSXOpeningElement: ["name", "typeParameters", "typeArguments", "attributes"], JSXSpreadAttribute: ["argument"], JSXText: [], JSXFragment: ["openingFragment", "children", "closingFragment"], JSXOpeningFragment: [], JSXClosingFragment: [], Noop: [], Placeholder: [], V8IntrinsicIdentifier: [], ArgumentPlaceholder: [], BindExpression: ["object", "callee"], Decorator: ["expression"], DoExpression: ["body"], ExportDefaultSpecifier: ["exported"], ModuleExpression: ["body"], TopicReference: [], PipelineTopicExpression: ["expression"], PipelineBareFunction: ["callee"], PipelinePrimaryTopicReference: [], TSParameterProperty: ["parameter", "decorators"], TSDeclareFunction: ["id", "typeParameters", "params", "returnType", "body"], TSDeclareMethod: ["decorators", "key", "typeParameters", "params", "returnType"], TSQualifiedName: ["left", "right"], TSCallSignatureDeclaration: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSConstructSignatureDeclaration: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSPropertySignature: ["key", "typeAnnotation"], TSMethodSignature: ["key", "typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSIndexSignature: ["parameters", "typeAnnotation"], TSAnyKeyword: [], TSBooleanKeyword: [], TSBigIntKeyword: [], TSIntrinsicKeyword: [], TSNeverKeyword: [], TSNullKeyword: [], TSNumberKeyword: [], TSObjectKeyword: [], TSStringKeyword: [], TSSymbolKeyword: [], TSUndefinedKeyword: [], TSUnknownKeyword: [], TSVoidKeyword: [], TSThisType: [], TSFunctionType: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSConstructorType: ["typeParameters", "parameters", "typeAnnotation", "params", "returnType"], TSTypeReference: ["typeName", "typeParameters", "typeArguments"], TSTypePredicate: ["parameterName", "typeAnnotation"], TSTypeQuery: ["exprName", "typeParameters", "typeArguments"], TSTypeLiteral: ["members"], TSArrayType: ["elementType"], TSTupleType: ["elementTypes"], TSOptionalType: ["typeAnnotation"], TSRestType: ["typeAnnotation"], TSNamedTupleMember: ["label", "elementType"], TSUnionType: ["types"], TSIntersectionType: ["types"], TSConditionalType: ["checkType", "extendsType", "trueType", "falseType"], TSInferType: ["typeParameter"], TSParenthesizedType: ["typeAnnotation"], TSTypeOperator: ["typeAnnotation"], TSIndexedAccessType: ["objectType", "indexType"], TSMappedType: ["nameType", "typeAnnotation", "key", "constraint"], TSTemplateLiteralType: ["quasis", "types"], TSLiteralType: ["literal"], TSExpressionWithTypeArguments: ["expression", "typeParameters"], TSInterfaceDeclaration: ["id", "typeParameters", "extends", "body"], TSInterfaceBody: ["body"], TSTypeAliasDeclaration: ["id", "typeParameters", "typeAnnotation"], TSInstantiationExpression: ["expression", "typeParameters", "typeArguments"], TSAsExpression: ["expression", "typeAnnotation"], TSSatisfiesExpression: ["expression", "typeAnnotation"], TSTypeAssertion: ["typeAnnotation", "expression"], TSEnumBody: ["members"], TSEnumDeclaration: ["id", "body"], TSEnumMember: ["id", "initializer"], TSModuleDeclaration: ["id", "body"], TSModuleBlock: ["body"], TSImportType: ["argument", "options", "qualifier", "typeParameters", "typeArguments"], TSImportEqualsDeclaration: ["id", "moduleReference"], TSExternalModuleReference: ["expression"], TSNonNullExpression: ["expression"], TSExportAssignment: ["expression"], TSNamespaceExportDeclaration: ["id"], TSTypeAnnotation: ["typeAnnotation"], TSTypeParameterInstantiation: ["params"], TSTypeParameterDeclaration: ["params"], TSTypeParameter: ["constraint", "default", "name"], ChainExpression: ["expression"], ExperimentalRestProperty: ["argument"], ExperimentalSpreadProperty: ["argument"], Literal: [], MethodDefinition: ["decorators", "key", "value"], PrivateIdentifier: [], Property: ["key", "value"], PropertyDefinition: ["decorators", "key", "typeAnnotation", "value", "variance"], AccessorProperty: ["decorators", "key", "typeAnnotation", "value"], TSAbstractAccessorProperty: ["decorators", "key", "typeAnnotation"], TSAbstractKeyword: [], TSAbstractMethodDefinition: ["key", "value"], TSAbstractPropertyDefinition: ["decorators", "key", "typeAnnotation"], TSAsyncKeyword: [], TSClassImplements: ["expression", "typeArguments", "typeParameters"], TSDeclareKeyword: [], TSEmptyBodyFunctionExpression: ["id", "typeParameters", "params", "returnType"], TSExportKeyword: [], TSInterfaceHeritage: ["expression", "typeArguments", "typeParameters"], TSPrivateKeyword: [], TSProtectedKeyword: [], TSPublicKeyword: [], TSReadonlyKeyword: [], TSStaticKeyword: [], AsConstExpression: ["expression"], AsExpression: ["expression", "typeAnnotation"], BigIntLiteralTypeAnnotation: [], BigIntTypeAnnotation: [], ComponentDeclaration: ["id", "params", "body", "typeParameters", "rendersType"], ComponentParameter: ["name", "local"], ComponentTypeAnnotation: ["params", "rest", "typeParameters", "rendersType"], ComponentTypeParameter: ["name", "typeAnnotation"], ConditionalTypeAnnotation: ["checkType", "extendsType", "trueType", "falseType"], DeclareComponent: ["id", "params", "rest", "typeParameters", "rendersType"], DeclareEnum: ["id", "body"], DeclareHook: ["id"], DeclareNamespace: ["id", "body"], EnumBigIntBody: ["members"], EnumBigIntMember: ["id", "init"], HookDeclaration: ["id", "params", "body", "typeParameters", "returnType"], HookTypeAnnotation: ["params", "returnType", "rest", "typeParameters"], InferTypeAnnotation: ["typeParameter"], KeyofTypeAnnotation: ["argument"], ObjectTypeMappedTypeProperty: ["keyTparam", "propType", "sourceType", "variance"], QualifiedTypeofIdentifier: ["qualification", "id"], TupleTypeLabeledElement: ["label", "elementType", "variance"], TupleTypeSpreadElement: ["label", "typeAnnotation"], TypeOperator: ["typeAnnotation"], TypePredicate: ["parameterName", "typeAnnotation", "asserts"], NGChainedExpression: ["expressions"], NGEmptyExpression: [], NGPipeExpression: ["left", "right", "arguments"], NGMicrosyntax: ["body"], NGMicrosyntaxAs: ["key", "alias"], NGMicrosyntaxExpression: ["expression", "alias"], NGMicrosyntaxKey: [], NGMicrosyntaxKeyedExpression: ["key", "expression"], NGMicrosyntaxLet: ["key", "value"], NGRoot: ["node"], JsExpressionRoot: ["node"], JsonRoot: ["node"], TSJSDocAllType: [], TSJSDocUnknownType: [], TSJSDocNullableType: ["typeAnnotation"], TSJSDocNonNullableType: ["typeAnnotation"], NeverTypeAnnotation: [], SatisfiesExpression: ["expression", "typeAnnotation"], UndefinedTypeAnnotation: [], UnknownTypeAnnotation: [] };
|
|
2694
|
-
var Ms = ii(si), ri = Ms;
|
|
2695
|
-
|
|
2696
|
-
|
|
2765
|
+
var ri = js;
|
|
2766
|
+
var n = [["decorators", "key", "typeAnnotation", "value"], [], ["elementType"], ["expression"], ["expression", "typeAnnotation"], ["left", "right"], ["argument"], ["directives", "body"], ["label"], ["callee", "typeArguments", "arguments"], ["body"], ["decorators", "id", "typeParameters", "superClass", "superTypeArguments", "mixins", "implements", "body", "superTypeParameters"], ["id", "typeParameters"], ["decorators", "key", "typeParameters", "params", "returnType", "body"], ["decorators", "variance", "key", "typeAnnotation", "value"], ["name", "typeAnnotation"], ["test", "consequent", "alternate"], ["checkType", "extendsType", "trueType", "falseType"], ["value"], ["id", "body"], ["declaration", "specifiers", "source", "attributes"], ["id"], ["id", "typeParameters", "extends", "body"], ["typeAnnotation"], ["id", "typeParameters", "right"], ["body", "test"], ["members"], ["id", "init"], ["exported"], ["left", "right", "body"], ["id", "typeParameters", "params", "predicate", "returnType", "body"], ["id", "params", "body", "typeParameters", "returnType"], ["key", "value"], ["local"], ["objectType", "indexType"], ["typeParameter"], ["types"], ["node"], ["object", "property"], ["argument", "cases"], ["pattern", "body", "guard"], ["literal"], ["decorators", "key", "value"], ["expressions"], ["qualification", "id"], ["decorators", "key", "typeAnnotation"], ["typeParameters", "params", "returnType"], ["expression", "typeArguments"], ["params"], ["parameterName", "typeAnnotation"]];
|
|
2767
|
+
var ai = { AccessorProperty: n[0], AnyTypeAnnotation: n[1], ArgumentPlaceholder: n[1], ArrayExpression: ["elements"], ArrayPattern: ["elements", "typeAnnotation", "decorators"], ArrayTypeAnnotation: n[2], ArrowFunctionExpression: ["typeParameters", "params", "predicate", "returnType", "body"], AsConstExpression: n[3], AsExpression: n[4], AssignmentExpression: n[5], AssignmentPattern: ["left", "right", "decorators", "typeAnnotation"], AwaitExpression: n[6], BigIntLiteral: n[1], BigIntLiteralTypeAnnotation: n[1], BigIntTypeAnnotation: n[1], BinaryExpression: n[5], BindExpression: ["object", "callee"], BlockStatement: n[7], BooleanLiteral: n[1], BooleanLiteralTypeAnnotation: n[1], BooleanTypeAnnotation: n[1], BreakStatement: n[8], CallExpression: n[9], CatchClause: ["param", "body"], ChainExpression: n[3], ClassAccessorProperty: n[0], ClassBody: n[10], ClassDeclaration: n[11], ClassExpression: n[11], ClassImplements: n[12], ClassMethod: n[13], ClassPrivateMethod: n[13], ClassPrivateProperty: n[14], ClassProperty: n[14], ComponentDeclaration: ["id", "params", "body", "typeParameters", "rendersType"], ComponentParameter: ["name", "local"], ComponentTypeAnnotation: ["params", "rest", "typeParameters", "rendersType"], ComponentTypeParameter: n[15], ConditionalExpression: n[16], ConditionalTypeAnnotation: n[17], ContinueStatement: n[8], DebuggerStatement: n[1], DeclareClass: ["id", "typeParameters", "extends", "mixins", "implements", "body"], DeclareComponent: ["id", "params", "rest", "typeParameters", "rendersType"], DeclaredPredicate: n[18], DeclareEnum: n[19], DeclareExportAllDeclaration: ["source", "attributes"], DeclareExportDeclaration: n[20], DeclareFunction: ["id", "predicate"], DeclareHook: n[21], DeclareInterface: n[22], DeclareModule: n[19], DeclareModuleExports: n[23], DeclareNamespace: n[19], DeclareOpaqueType: ["id", "typeParameters", "supertype", "lowerBound", "upperBound"], DeclareTypeAlias: n[24], DeclareVariable: n[21], Decorator: n[3], Directive: n[18], DirectiveLiteral: n[1], DoExpression: n[10], DoWhileStatement: n[25], EmptyStatement: n[1], EmptyTypeAnnotation: n[1], EnumBigIntBody: n[26], EnumBigIntMember: n[27], EnumBooleanBody: n[26], EnumBooleanMember: n[27], EnumDeclaration: n[19], EnumDefaultedMember: n[21], EnumNumberBody: n[26], EnumNumberMember: n[27], EnumStringBody: n[26], EnumStringMember: n[27], EnumSymbolBody: n[26], ExistsTypeAnnotation: n[1], ExperimentalRestProperty: n[6], ExperimentalSpreadProperty: n[6], ExportAllDeclaration: ["source", "attributes", "exported"], ExportDefaultDeclaration: ["declaration"], ExportDefaultSpecifier: n[28], ExportNamedDeclaration: n[20], ExportNamespaceSpecifier: n[28], ExportSpecifier: ["local", "exported"], ExpressionStatement: n[3], File: ["program"], ForInStatement: n[29], ForOfStatement: n[29], ForStatement: ["init", "test", "update", "body"], FunctionDeclaration: n[30], FunctionExpression: n[30], FunctionTypeAnnotation: ["typeParameters", "this", "params", "rest", "returnType"], FunctionTypeParam: n[15], GenericTypeAnnotation: n[12], HookDeclaration: n[31], HookTypeAnnotation: ["params", "returnType", "rest", "typeParameters"], Identifier: ["typeAnnotation", "decorators"], IfStatement: n[16], ImportAttribute: n[32], ImportDeclaration: ["specifiers", "source", "attributes"], ImportDefaultSpecifier: n[33], ImportExpression: ["source", "options"], ImportNamespaceSpecifier: n[33], ImportSpecifier: ["imported", "local"], IndexedAccessType: n[34], InferredPredicate: n[1], InferTypeAnnotation: n[35], InterfaceDeclaration: n[22], InterfaceExtends: n[12], InterfaceTypeAnnotation: ["extends", "body"], InterpreterDirective: n[1], IntersectionTypeAnnotation: n[36], JsExpressionRoot: n[37], JsonRoot: n[37], JSXAttribute: ["name", "value"], JSXClosingElement: ["name"], JSXClosingFragment: n[1], JSXElement: ["openingElement", "children", "closingElement"], JSXEmptyExpression: n[1], JSXExpressionContainer: n[3], JSXFragment: ["openingFragment", "children", "closingFragment"], JSXIdentifier: n[1], JSXMemberExpression: n[38], JSXNamespacedName: ["namespace", "name"], JSXOpeningElement: ["name", "typeArguments", "attributes"], JSXOpeningFragment: n[1], JSXSpreadAttribute: n[6], JSXSpreadChild: n[3], JSXText: n[1], KeyofTypeAnnotation: n[6], LabeledStatement: ["label", "body"], Literal: n[1], LogicalExpression: n[5], MatchArrayPattern: ["elements", "rest"], MatchAsPattern: ["pattern", "target"], MatchBindingPattern: n[21], MatchExpression: n[39], MatchExpressionCase: n[40], MatchIdentifierPattern: n[21], MatchLiteralPattern: n[41], MatchMemberPattern: ["base", "property"], MatchObjectPattern: ["properties", "rest"], MatchObjectPatternProperty: ["key", "pattern"], MatchOrPattern: ["patterns"], MatchRestPattern: n[6], MatchStatement: n[39], MatchStatementCase: n[40], MatchUnaryPattern: n[6], MatchWildcardPattern: n[1], MemberExpression: n[38], MetaProperty: ["meta", "property"], MethodDefinition: n[42], MixedTypeAnnotation: n[1], ModuleExpression: n[10], NeverTypeAnnotation: n[1], NewExpression: n[9], NGChainedExpression: n[43], NGEmptyExpression: n[1], NGMicrosyntax: n[10], NGMicrosyntaxAs: ["key", "alias"], NGMicrosyntaxExpression: ["expression", "alias"], NGMicrosyntaxKey: n[1], NGMicrosyntaxKeyedExpression: ["key", "expression"], NGMicrosyntaxLet: n[32], NGPipeExpression: ["left", "right", "arguments"], NGRoot: n[37], NullableTypeAnnotation: n[23], NullLiteral: n[1], NullLiteralTypeAnnotation: n[1], NumberLiteralTypeAnnotation: n[1], NumberTypeAnnotation: n[1], NumericLiteral: n[1], ObjectExpression: ["properties"], ObjectMethod: n[13], ObjectPattern: ["decorators", "properties", "typeAnnotation"], ObjectProperty: n[42], ObjectTypeAnnotation: ["properties", "indexers", "callProperties", "internalSlots"], ObjectTypeCallProperty: n[18], ObjectTypeIndexer: ["variance", "id", "key", "value"], ObjectTypeInternalSlot: ["id", "value"], ObjectTypeMappedTypeProperty: ["keyTparam", "propType", "sourceType", "variance"], ObjectTypeProperty: ["key", "value", "variance"], ObjectTypeSpreadProperty: n[6], OpaqueType: ["id", "typeParameters", "supertype", "impltype", "lowerBound", "upperBound"], OptionalCallExpression: n[9], OptionalIndexedAccessType: n[34], OptionalMemberExpression: n[38], ParenthesizedExpression: n[3], PipelineBareFunction: ["callee"], PipelinePrimaryTopicReference: n[1], PipelineTopicExpression: n[3], Placeholder: n[1], PrivateIdentifier: n[1], PrivateName: n[21], Program: n[7], Property: n[32], PropertyDefinition: n[14], QualifiedTypeIdentifier: n[44], QualifiedTypeofIdentifier: n[44], RegExpLiteral: n[1], RestElement: ["argument", "typeAnnotation", "decorators"], ReturnStatement: n[6], SatisfiesExpression: n[4], SequenceExpression: n[43], SpreadElement: n[6], StaticBlock: n[10], StringLiteral: n[1], StringLiteralTypeAnnotation: n[1], StringTypeAnnotation: n[1], Super: n[1], SwitchCase: ["test", "consequent"], SwitchStatement: ["discriminant", "cases"], SymbolTypeAnnotation: n[1], TaggedTemplateExpression: ["tag", "typeArguments", "quasi"], TemplateElement: n[1], TemplateLiteral: ["quasis", "expressions"], ThisExpression: n[1], ThisTypeAnnotation: n[1], ThrowStatement: n[6], TopicReference: n[1], TryStatement: ["block", "handler", "finalizer"], TSAbstractAccessorProperty: n[45], TSAbstractKeyword: n[1], TSAbstractMethodDefinition: n[32], TSAbstractPropertyDefinition: n[45], TSAnyKeyword: n[1], TSArrayType: n[2], TSAsExpression: n[4], TSAsyncKeyword: n[1], TSBigIntKeyword: n[1], TSBooleanKeyword: n[1], TSCallSignatureDeclaration: n[46], TSClassImplements: n[47], TSConditionalType: n[17], TSConstructorType: n[46], TSConstructSignatureDeclaration: n[46], TSDeclareFunction: n[31], TSDeclareKeyword: n[1], TSDeclareMethod: ["decorators", "key", "typeParameters", "params", "returnType"], TSEmptyBodyFunctionExpression: ["id", "typeParameters", "params", "returnType"], TSEnumBody: n[26], TSEnumDeclaration: n[19], TSEnumMember: ["id", "initializer"], TSExportAssignment: n[3], TSExportKeyword: n[1], TSExternalModuleReference: n[3], TSFunctionType: n[46], TSImportEqualsDeclaration: ["id", "moduleReference"], TSImportType: ["options", "qualifier", "typeArguments", "source"], TSIndexedAccessType: n[34], TSIndexSignature: ["parameters", "typeAnnotation"], TSInferType: n[35], TSInstantiationExpression: n[47], TSInterfaceBody: n[10], TSInterfaceDeclaration: n[22], TSInterfaceHeritage: n[47], TSIntersectionType: n[36], TSIntrinsicKeyword: n[1], TSJSDocAllType: n[1], TSJSDocNonNullableType: n[23], TSJSDocNullableType: n[23], TSJSDocUnknownType: n[1], TSLiteralType: n[41], TSMappedType: ["key", "constraint", "nameType", "typeAnnotation"], TSMethodSignature: ["key", "typeParameters", "params", "returnType"], TSModuleBlock: n[10], TSModuleDeclaration: n[19], TSNamedTupleMember: ["label", "elementType"], TSNamespaceExportDeclaration: n[21], TSNeverKeyword: n[1], TSNonNullExpression: n[3], TSNullKeyword: n[1], TSNumberKeyword: n[1], TSObjectKeyword: n[1], TSOptionalType: n[23], TSParameterProperty: ["parameter", "decorators"], TSParenthesizedType: n[23], TSPrivateKeyword: n[1], TSPropertySignature: ["key", "typeAnnotation"], TSProtectedKeyword: n[1], TSPublicKeyword: n[1], TSQualifiedName: n[5], TSReadonlyKeyword: n[1], TSRestType: n[23], TSSatisfiesExpression: n[4], TSStaticKeyword: n[1], TSStringKeyword: n[1], TSSymbolKeyword: n[1], TSTemplateLiteralType: ["quasis", "types"], TSThisType: n[1], TSTupleType: ["elementTypes"], TSTypeAliasDeclaration: ["id", "typeParameters", "typeAnnotation"], TSTypeAnnotation: n[23], TSTypeAssertion: n[4], TSTypeLiteral: n[26], TSTypeOperator: n[23], TSTypeParameter: ["name", "constraint", "default"], TSTypeParameterDeclaration: n[48], TSTypeParameterInstantiation: n[48], TSTypePredicate: n[49], TSTypeQuery: ["exprName", "typeArguments"], TSTypeReference: ["typeName", "typeArguments"], TSUndefinedKeyword: n[1], TSUnionType: n[36], TSUnknownKeyword: n[1], TSVoidKeyword: n[1], TupleTypeAnnotation: ["types", "elementTypes"], TupleTypeLabeledElement: ["label", "elementType", "variance"], TupleTypeSpreadElement: ["label", "typeAnnotation"], TypeAlias: n[24], TypeAnnotation: n[23], TypeCastExpression: n[4], TypeofTypeAnnotation: ["argument", "typeArguments"], TypeOperator: n[23], TypeParameter: ["bound", "default", "variance"], TypeParameterDeclaration: n[48], TypeParameterInstantiation: n[48], TypePredicate: n[49], UnaryExpression: n[6], UndefinedTypeAnnotation: n[1], UnionTypeAnnotation: n[36], UnknownTypeAnnotation: n[1], UpdateExpression: n[6], V8IntrinsicIdentifier: n[1], VariableDeclaration: ["declarations"], VariableDeclarator: n[27], Variance: n[1], VoidPattern: n[1], VoidTypeAnnotation: n[1], WhileStatement: n[25], WithStatement: ["object", "body"], YieldExpression: n[6] };
|
|
2768
|
+
var Us = ri(ai);
|
|
2769
|
+
var ni = Us;
|
|
2770
|
+
function we(e, t) {
|
|
2771
|
+
if (!si(e)) return e;
|
|
2697
2772
|
if (Array.isArray(e)) {
|
|
2698
|
-
for (let s = 0; s < e.length; s++) e[s] =
|
|
2773
|
+
for (let s = 0; s < e.length; s++) e[s] = we(e[s], t);
|
|
2699
2774
|
return e;
|
|
2700
2775
|
}
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2776
|
+
if (t.onEnter) {
|
|
2777
|
+
let s = t.onEnter(e) ?? e;
|
|
2778
|
+
if (s !== e) return we(s, t);
|
|
2779
|
+
e = s;
|
|
2780
|
+
}
|
|
2781
|
+
let i = ni(e);
|
|
2782
|
+
for (let s = 0; s < i.length; s++) e[i[s]] = we(e[i[s]], t);
|
|
2783
|
+
return t.onLeave && (e = t.onLeave(e) || e), e;
|
|
2784
|
+
}
|
|
2785
|
+
var oi = we;
|
|
2786
|
+
var aa = se(["RegExpLiteral", "BigIntLiteral", "NumericLiteral", "StringLiteral", "DirectiveLiteral", "Literal", "JSXText", "TemplateElement", "StringLiteralTypeAnnotation", "NumberLiteralTypeAnnotation", "BigIntLiteralTypeAnnotation"]);
|
|
2787
|
+
function Gs(e, t) {
|
|
2788
|
+
let { parser: i, text: s } = t, { comments: r } = e, o = i === "oxc" && t.oxcAstType === "ts";
|
|
2789
|
+
ii(r);
|
|
2790
|
+
let u = e.type === "File" ? e.program : e;
|
|
2791
|
+
u.interpreter && (r.unshift(u.interpreter), delete u.interpreter), o && e.hashbang && (r.unshift(e.hashbang), delete e.hashbang), e.type === "Program" && (e.range = [0, s.length]);
|
|
2792
|
+
let p;
|
|
2793
|
+
return e = oi(e, { onEnter(h) {
|
|
2794
|
+
switch (h.type) {
|
|
2713
2795
|
case "ParenthesizedExpression": {
|
|
2714
|
-
let { expression:
|
|
2715
|
-
if (
|
|
2716
|
-
let
|
|
2717
|
-
if (!
|
|
2718
|
-
if (!
|
|
2719
|
-
|
|
2720
|
-
for (let
|
|
2796
|
+
let { expression: l } = h, m = M(h);
|
|
2797
|
+
if (l.type === "TypeCastExpression") return l.range = [m, R(h)], l;
|
|
2798
|
+
let S = false;
|
|
2799
|
+
if (!o) {
|
|
2800
|
+
if (!p) {
|
|
2801
|
+
p = [];
|
|
2802
|
+
for (let c of r) ti(c) && p.push(R(c));
|
|
2721
2803
|
}
|
|
2722
|
-
let
|
|
2723
|
-
|
|
2804
|
+
let E = Zt(0, p, (c) => c <= m);
|
|
2805
|
+
S = E && s.slice(E, m).trim().length === 0;
|
|
2724
2806
|
}
|
|
2725
|
-
|
|
2726
|
-
break;
|
|
2807
|
+
return S ? void 0 : (l.extra = { ...l.extra, parenthesized: true }, l);
|
|
2727
2808
|
}
|
|
2728
|
-
case "LogicalExpression":
|
|
2729
|
-
if (oi(u)) return tt(u);
|
|
2730
|
-
break;
|
|
2731
2809
|
case "TemplateLiteral":
|
|
2732
|
-
if (
|
|
2810
|
+
if (h.expressions.length !== h.quasis.length - 1) throw new Error("Malformed template literal.");
|
|
2733
2811
|
break;
|
|
2734
2812
|
case "TemplateElement":
|
|
2735
|
-
if (i === "flow" || i === "hermes" || i === "espree" || i === "typescript" ||
|
|
2736
|
-
let
|
|
2737
|
-
|
|
2813
|
+
if (i === "flow" || i === "hermes" || i === "espree" || i === "typescript" || o) {
|
|
2814
|
+
let l = M(h) + 1, m = R(h) - (h.tail ? 1 : 2);
|
|
2815
|
+
h.range = [l, m];
|
|
2738
2816
|
}
|
|
2739
2817
|
break;
|
|
2740
2818
|
case "VariableDeclaration": {
|
|
2741
|
-
let
|
|
2742
|
-
|
|
2819
|
+
let l = ie(0, h.declarations, -1);
|
|
2820
|
+
l?.init && s[R(l)] !== ";" && (h.range = [M(h), R(l)]);
|
|
2743
2821
|
break;
|
|
2744
2822
|
}
|
|
2745
2823
|
case "TSParenthesizedType":
|
|
2746
|
-
return
|
|
2747
|
-
case "TSTypeParameter":
|
|
2748
|
-
ni(u);
|
|
2749
|
-
break;
|
|
2824
|
+
return h.typeAnnotation;
|
|
2750
2825
|
case "TopicReference":
|
|
2751
2826
|
e.extra = { ...e.extra, __isUsingHackPipeline: true };
|
|
2752
2827
|
break;
|
|
2753
2828
|
case "TSUnionType":
|
|
2754
2829
|
case "TSIntersectionType":
|
|
2755
|
-
if (
|
|
2830
|
+
if (h.types.length === 1) return h.types[0];
|
|
2756
2831
|
break;
|
|
2757
|
-
case "
|
|
2758
|
-
|
|
2759
|
-
let { name: c, constraint: f } = ni(u.typeParameter);
|
|
2760
|
-
u.constraint = f, u.key = c, delete u.typeParameter;
|
|
2761
|
-
}
|
|
2832
|
+
case "ImportExpression":
|
|
2833
|
+
i === "hermes" && h.attributes && !h.options && (h.options = h.attributes);
|
|
2762
2834
|
break;
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2835
|
+
}
|
|
2836
|
+
}, onLeave(h) {
|
|
2837
|
+
switch (h.type) {
|
|
2838
|
+
case "LogicalExpression":
|
|
2839
|
+
if (ui(h)) return st(h);
|
|
2768
2840
|
break;
|
|
2769
|
-
case "
|
|
2770
|
-
|
|
2841
|
+
case "TSImportType":
|
|
2842
|
+
!h.source && h.argument.type === "TSLiteralType" && (h.source = h.argument.literal, delete h.argument);
|
|
2771
2843
|
break;
|
|
2772
2844
|
}
|
|
2773
|
-
});
|
|
2774
|
-
let p = e.type === "File" ? e.program : e;
|
|
2775
|
-
return p.interpreter && (r.unshift(p.interpreter), delete p.interpreter), n && e.hashbang && (r.unshift(e.hashbang), delete e.hashbang), e.type === "Program" && (e.range = [0, s.length]), e;
|
|
2845
|
+
} }), e;
|
|
2776
2846
|
}
|
|
2777
|
-
function
|
|
2778
|
-
if (e.type === "TSTypeParameter" && typeof e.name == "string") {
|
|
2779
|
-
let t = w(e);
|
|
2780
|
-
e.name = { type: "Identifier", name: e.name, range: [t, t + e.name.length] };
|
|
2781
|
-
}
|
|
2782
|
-
return e;
|
|
2783
|
-
}
|
|
2784
|
-
function oi(e) {
|
|
2847
|
+
function ui(e) {
|
|
2785
2848
|
return e.type === "LogicalExpression" && e.right.type === "LogicalExpression" && e.operator === e.right.operator;
|
|
2786
2849
|
}
|
|
2787
|
-
function
|
|
2788
|
-
return
|
|
2850
|
+
function st(e) {
|
|
2851
|
+
return ui(e) ? st({ type: "LogicalExpression", operator: e.operator, left: st({ type: "LogicalExpression", operator: e.operator, left: e.left, right: e.right.left, range: [M(e.left), R(e.right.left)] }), right: e.right.right, range: [M(e), R(e)] }) : e;
|
|
2789
2852
|
}
|
|
2790
|
-
var
|
|
2791
|
-
var
|
|
2792
|
-
|
|
2793
|
-
}
|
|
2794
|
-
var
|
|
2795
|
-
|
|
2796
|
-
|
|
2853
|
+
var Pe = Gs;
|
|
2854
|
+
var qs = String.prototype.replaceAll ?? function(e, t) {
|
|
2855
|
+
return e.global ? this.replace(e, t) : this.split(e).join(t);
|
|
2856
|
+
};
|
|
2857
|
+
var Js = te("replaceAll", function() {
|
|
2858
|
+
if (typeof this == "string") return qs;
|
|
2859
|
+
});
|
|
2860
|
+
var fe = Js;
|
|
2861
|
+
var Ks = /\*\/$/;
|
|
2862
|
+
var Hs = /^\/\*\*?/;
|
|
2863
|
+
var Xs = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/;
|
|
2864
|
+
var Ws = /(^|\s+)\/\/([^\n\r]*)/g;
|
|
2865
|
+
var hi = /^(\r?\n)+/;
|
|
2866
|
+
var zs = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g;
|
|
2867
|
+
var pi = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g;
|
|
2868
|
+
var Qs = /(\r?\n|^) *\* ?/g;
|
|
2869
|
+
var Ys = [];
|
|
2870
|
+
function ci(e) {
|
|
2871
|
+
let t = e.match(Xs);
|
|
2797
2872
|
return t ? t[0].trimStart() : "";
|
|
2798
2873
|
}
|
|
2799
|
-
function
|
|
2800
|
-
|
|
2801
|
-
`;
|
|
2802
|
-
e = se(false, e.replace(qs, "").replace(Gs, ""), Ws, "$1");
|
|
2874
|
+
function li(e) {
|
|
2875
|
+
e = fe(0, e.replace(Hs, "").replace(Ks, ""), Qs, "$1");
|
|
2803
2876
|
let i = "";
|
|
2804
|
-
for (; i !== e; ) i = e, e =
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2877
|
+
for (; i !== e; ) i = e, e = fe(0, e, zs, `
|
|
2878
|
+
$1 $2
|
|
2879
|
+
`);
|
|
2880
|
+
e = e.replace(hi, "").trimEnd();
|
|
2881
|
+
let s = /* @__PURE__ */ Object.create(null), r = fe(0, e, pi, "").replace(hi, "").trimEnd(), o;
|
|
2882
|
+
for (; o = pi.exec(e); ) {
|
|
2883
|
+
let u = fe(0, o[2], Ws, "");
|
|
2884
|
+
if (typeof s[o[1]] == "string" || Array.isArray(s[o[1]])) {
|
|
2885
|
+
let p = s[o[1]];
|
|
2886
|
+
s[o[1]] = [...Ys, ...Array.isArray(p) ? p : [p], u];
|
|
2887
|
+
} else s[o[1]] = u;
|
|
2813
2888
|
}
|
|
2814
2889
|
return { comments: r, pragmas: s };
|
|
2815
2890
|
}
|
|
2816
|
-
var
|
|
2817
|
-
|
|
2891
|
+
var fi = ["noformat", "noprettier"];
|
|
2892
|
+
var di = ["format", "prettier"];
|
|
2893
|
+
function $s(e) {
|
|
2818
2894
|
if (!e.startsWith("#!")) return "";
|
|
2819
2895
|
let t = e.indexOf(`
|
|
2820
2896
|
`);
|
|
2821
2897
|
return t === -1 ? e : e.slice(0, t);
|
|
2822
2898
|
}
|
|
2823
|
-
var
|
|
2824
|
-
function
|
|
2825
|
-
let t =
|
|
2899
|
+
var mi = $s;
|
|
2900
|
+
function xi(e) {
|
|
2901
|
+
let t = mi(e);
|
|
2826
2902
|
t && (e = e.slice(t.length + 1));
|
|
2827
|
-
let i =
|
|
2903
|
+
let i = ci(e), { pragmas: s, comments: r } = li(i);
|
|
2828
2904
|
return { shebang: t, text: e, pragmas: s, comments: r };
|
|
2829
2905
|
}
|
|
2830
|
-
function xi(e) {
|
|
2831
|
-
let { pragmas: t } = mi(e);
|
|
2832
|
-
return fi.some((i) => Object.prototype.hasOwnProperty.call(t, i));
|
|
2833
|
-
}
|
|
2834
2906
|
function yi(e) {
|
|
2835
|
-
let { pragmas: t } =
|
|
2836
|
-
return
|
|
2907
|
+
let { pragmas: t } = xi(e);
|
|
2908
|
+
return di.some((i) => Object.prototype.hasOwnProperty.call(t, i));
|
|
2909
|
+
}
|
|
2910
|
+
function gi(e) {
|
|
2911
|
+
let { pragmas: t } = xi(e);
|
|
2912
|
+
return fi.some((i) => Object.prototype.hasOwnProperty.call(t, i));
|
|
2837
2913
|
}
|
|
2838
|
-
function
|
|
2839
|
-
return e = typeof e == "function" ? { parse: e } : e, { astFormat: "estree", hasPragma:
|
|
2914
|
+
function Zs(e) {
|
|
2915
|
+
return e = typeof e == "function" ? { parse: e } : e, { astFormat: "estree", hasPragma: yi, hasIgnorePragma: gi, locStart: M, locEnd: R, ...e };
|
|
2840
2916
|
}
|
|
2841
|
-
var
|
|
2842
|
-
var
|
|
2843
|
-
|
|
2917
|
+
var Ie = Zs;
|
|
2918
|
+
var Ne = "module";
|
|
2919
|
+
var vi = "script";
|
|
2920
|
+
var Le = "commonjs";
|
|
2921
|
+
var Re = [Ne, Le];
|
|
2922
|
+
function Ve(e) {
|
|
2844
2923
|
if (typeof e == "string") {
|
|
2845
|
-
if (e = e.toLowerCase(), /\.(?:mjs|mts)$/iu.test(e)) return
|
|
2846
|
-
if (/\.(?:cjs|cts)$/iu.test(e)) return
|
|
2924
|
+
if (e = e.toLowerCase(), /\.(?:mjs|mts)$/iu.test(e)) return Ne;
|
|
2925
|
+
if (/\.(?:cjs|cts)$/iu.test(e)) return Le;
|
|
2847
2926
|
}
|
|
2848
2927
|
}
|
|
2849
|
-
var
|
|
2850
|
-
function
|
|
2928
|
+
var er = { ecmaVersion: "latest", allowReserved: true, allowReturnOutsideFunction: true, allowSuperOutsideMethod: true, checkPrivateFields: false, locations: false, ranges: true, preserveParens: true };
|
|
2929
|
+
function tr(e) {
|
|
2851
2930
|
let { message: t, loc: i } = e;
|
|
2852
2931
|
if (!i) return e;
|
|
2853
2932
|
let { line: s, column: r } = i;
|
|
2854
|
-
return
|
|
2933
|
+
return Ae(t.replace(/ \(\d+:\d+\)$/u, ""), { loc: { start: { line: s, column: r + 1 } }, cause: e });
|
|
2855
2934
|
}
|
|
2856
|
-
var
|
|
2857
|
-
|
|
2858
|
-
|
|
2935
|
+
var bi;
|
|
2936
|
+
var ir = () => (bi ?? (bi = A.extend((0, Si.default)())), bi);
|
|
2937
|
+
function sr(e, t) {
|
|
2938
|
+
let i = ir(), s = [], r = i.parse(e, { ...er, sourceType: t === Le ? vi : t, allowImportExportEverywhere: t === Ne, onComment: s });
|
|
2859
2939
|
return r.comments = s, r;
|
|
2860
2940
|
}
|
|
2861
|
-
function
|
|
2862
|
-
let i =
|
|
2941
|
+
function rr(e, t) {
|
|
2942
|
+
let i = Ve(t?.filepath), s = (i ? [i] : Re).map((o) => () => sr(e, o)), r;
|
|
2863
2943
|
try {
|
|
2864
|
-
r =
|
|
2865
|
-
} catch ({ errors: [
|
|
2866
|
-
throw
|
|
2944
|
+
r = ke(s);
|
|
2945
|
+
} catch ({ errors: [o] }) {
|
|
2946
|
+
throw tr(o);
|
|
2867
2947
|
}
|
|
2868
|
-
return
|
|
2948
|
+
return Pe(r, { text: e });
|
|
2869
2949
|
}
|
|
2870
|
-
var
|
|
2871
|
-
var
|
|
2872
|
-
var
|
|
2873
|
-
function
|
|
2874
|
-
let i = e[0], s =
|
|
2950
|
+
var _i = Ie(rr);
|
|
2951
|
+
var Ai = ut($e(), 1);
|
|
2952
|
+
var P = { Boolean: "Boolean", EOF: "<end>", Identifier: "Identifier", PrivateIdentifier: "PrivateIdentifier", Keyword: "Keyword", Null: "Null", Numeric: "Numeric", Punctuator: "Punctuator", String: "String", RegularExpression: "RegularExpression", Template: "Template", JSXIdentifier: "JSXIdentifier", JSXText: "JSXText" };
|
|
2953
|
+
function ar(e, t) {
|
|
2954
|
+
let i = e[0], s = ie(0, e, -1), r = { type: P.Template, value: t.slice(i.start, s.end) };
|
|
2875
2955
|
return i.loc && (r.loc = { start: i.loc.start, end: s.loc.end }), i.range && (r.start = i.range[0], r.end = s.range[1], r.range = [r.start, r.end]), r;
|
|
2876
2956
|
}
|
|
2877
|
-
function
|
|
2957
|
+
function rt(e, t) {
|
|
2878
2958
|
this._acornTokTypes = e, this._tokens = [], this._curlyBrace = null, this._code = t;
|
|
2879
2959
|
}
|
|
2880
|
-
|
|
2960
|
+
rt.prototype = { constructor: rt, translate(e, t) {
|
|
2881
2961
|
let i = e.type, s = this._acornTokTypes;
|
|
2882
|
-
if (i === s.name) e.type =
|
|
2883
|
-
else if (i === s.privateId) e.type =
|
|
2884
|
-
else if (i === s.semi || i === s.comma || i === s.parenL || i === s.parenR || i === s.braceL || i === s.braceR || i === s.dot || i === s.bracketL || i === s.colon || i === s.question || i === s.bracketR || i === s.ellipsis || i === s.arrow || i === s.jsxTagStart || i === s.incDec || i === s.starstar || i === s.jsxTagEnd || i === s.prefix || i === s.questionDot || i.binop && !i.keyword || i.isAssign) e.type =
|
|
2885
|
-
else if (i === s.jsxName) e.type =
|
|
2886
|
-
else if (i.label === "jsxText" || i === s.jsxAttrValueToken) e.type =
|
|
2887
|
-
else if (i.keyword) i.keyword === "true" || i.keyword === "false" ? e.type =
|
|
2888
|
-
else if (i === s.num) e.type =
|
|
2889
|
-
else if (i === s.string) t.jsxAttrValueToken ? (t.jsxAttrValueToken = false, e.type =
|
|
2962
|
+
if (i === s.name) e.type = P.Identifier, e.value === "static" && (e.type = P.Keyword), t.ecmaVersion > 5 && (e.value === "yield" || e.value === "let") && (e.type = P.Keyword);
|
|
2963
|
+
else if (i === s.privateId) e.type = P.PrivateIdentifier;
|
|
2964
|
+
else if (i === s.semi || i === s.comma || i === s.parenL || i === s.parenR || i === s.braceL || i === s.braceR || i === s.dot || i === s.bracketL || i === s.colon || i === s.question || i === s.bracketR || i === s.ellipsis || i === s.arrow || i === s.jsxTagStart || i === s.incDec || i === s.starstar || i === s.jsxTagEnd || i === s.prefix || i === s.questionDot || i.binop && !i.keyword || i.isAssign) e.type = P.Punctuator, e.value = this._code.slice(e.start, e.end);
|
|
2965
|
+
else if (i === s.jsxName) e.type = P.JSXIdentifier;
|
|
2966
|
+
else if (i.label === "jsxText" || i === s.jsxAttrValueToken) e.type = P.JSXText;
|
|
2967
|
+
else if (i.keyword) i.keyword === "true" || i.keyword === "false" ? e.type = P.Boolean : i.keyword === "null" ? e.type = P.Null : e.type = P.Keyword;
|
|
2968
|
+
else if (i === s.num) e.type = P.Numeric, e.value = this._code.slice(e.start, e.end);
|
|
2969
|
+
else if (i === s.string) t.jsxAttrValueToken ? (t.jsxAttrValueToken = false, e.type = P.JSXText) : e.type = P.String, e.value = this._code.slice(e.start, e.end);
|
|
2890
2970
|
else if (i === s.regexp) {
|
|
2891
|
-
e.type =
|
|
2971
|
+
e.type = P.RegularExpression;
|
|
2892
2972
|
let r = e.value;
|
|
2893
2973
|
e.regex = { flags: r.flags, pattern: r.pattern }, e.value = `/${r.pattern}/${r.flags}`;
|
|
2894
2974
|
}
|
|
2895
2975
|
return e;
|
|
2896
2976
|
}, onToken(e, t) {
|
|
2897
|
-
let i = this._acornTokTypes, s = t.tokens, r = this._tokens,
|
|
2898
|
-
s.push(
|
|
2977
|
+
let i = this._acornTokTypes, s = t.tokens, r = this._tokens, o = () => {
|
|
2978
|
+
s.push(ar(this._tokens, this._code)), this._tokens = [];
|
|
2899
2979
|
};
|
|
2900
2980
|
if (e.type === i.eof) {
|
|
2901
2981
|
this._curlyBrace && s.push(this.translate(this._curlyBrace, t));
|
|
2902
2982
|
return;
|
|
2903
2983
|
}
|
|
2904
2984
|
if (e.type === i.backQuote) {
|
|
2905
|
-
this._curlyBrace && (s.push(this.translate(this._curlyBrace, t)), this._curlyBrace = null), r.push(e), r.length > 1 &&
|
|
2985
|
+
this._curlyBrace && (s.push(this.translate(this._curlyBrace, t)), this._curlyBrace = null), r.push(e), r.length > 1 && o();
|
|
2906
2986
|
return;
|
|
2907
2987
|
}
|
|
2908
2988
|
if (e.type === i.dollarBraceL) {
|
|
2909
|
-
r.push(e),
|
|
2989
|
+
r.push(e), o();
|
|
2910
2990
|
return;
|
|
2911
2991
|
}
|
|
2912
2992
|
if (e.type === i.braceR) {
|
|
@@ -2919,51 +2999,52 @@ it.prototype = { constructor: it, translate(e, t) {
|
|
|
2919
2999
|
}
|
|
2920
3000
|
this._curlyBrace && (s.push(this.translate(this._curlyBrace, t)), this._curlyBrace = null), s.push(this.translate(e, t));
|
|
2921
3001
|
} };
|
|
2922
|
-
var
|
|
3002
|
+
var Ci = rt;
|
|
2923
3003
|
var Ti = [3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17];
|
|
2924
|
-
function
|
|
2925
|
-
return
|
|
3004
|
+
function nr() {
|
|
3005
|
+
return ie(0, Ti, -1);
|
|
2926
3006
|
}
|
|
2927
|
-
function
|
|
2928
|
-
let t = e === "latest" ?
|
|
3007
|
+
function or(e = 5) {
|
|
3008
|
+
let t = e === "latest" ? nr() : e;
|
|
2929
3009
|
if (typeof t != "number") throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);
|
|
2930
3010
|
if (t >= 2015 && (t -= 2009), !Ti.includes(t)) throw new Error("Invalid ecmaVersion.");
|
|
2931
3011
|
return t;
|
|
2932
3012
|
}
|
|
2933
|
-
function
|
|
3013
|
+
function ur(e = "script") {
|
|
2934
3014
|
if (e === "script" || e === "module") return e;
|
|
2935
3015
|
if (e === "commonjs") return "script";
|
|
2936
3016
|
throw new Error("Invalid sourceType.");
|
|
2937
3017
|
}
|
|
2938
|
-
function
|
|
2939
|
-
let t =
|
|
3018
|
+
function Ei(e) {
|
|
3019
|
+
let t = or(e.ecmaVersion), i = ur(e.sourceType), s = e.range === true, r = e.loc === true;
|
|
2940
3020
|
if (t !== 3 && e.allowReserved) throw new Error("`allowReserved` is only supported when ecmaVersion is 3");
|
|
2941
3021
|
if (typeof e.allowReserved < "u" && typeof e.allowReserved != "boolean") throw new Error("`allowReserved`, when present, must be `true` or `false`");
|
|
2942
|
-
let
|
|
3022
|
+
let o = t === 3 ? e.allowReserved || "never" : false, u = e.ecmaFeatures || {}, p = e.sourceType === "commonjs" || !!u.globalReturn;
|
|
2943
3023
|
if (i === "module" && t < 6) throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");
|
|
2944
|
-
return Object.assign({}, e, { ecmaVersion: t, sourceType: i, ranges: s, locations: r, allowReserved:
|
|
3024
|
+
return Object.assign({}, e, { ecmaVersion: t, sourceType: i, ranges: s, locations: r, allowReserved: o, allowReturnOutsideFunction: p });
|
|
2945
3025
|
}
|
|
2946
|
-
var Q = Symbol("espree's internal state")
|
|
2947
|
-
|
|
3026
|
+
var Q = /* @__PURE__ */ Symbol("espree's internal state");
|
|
3027
|
+
var at = /* @__PURE__ */ Symbol("espree's esprimaFinishNode");
|
|
3028
|
+
function hr(e, t, i, s, r, o, u) {
|
|
2948
3029
|
let p;
|
|
2949
|
-
e ? p = "Block" :
|
|
2950
|
-
let
|
|
2951
|
-
return typeof i == "number" && (
|
|
3030
|
+
e ? p = "Block" : u.slice(i, i + 2) === "#!" ? p = "Hashbang" : p = "Line";
|
|
3031
|
+
let h = { type: p, value: t };
|
|
3032
|
+
return typeof i == "number" && (h.start = i, h.end = s, h.range = [i, s]), typeof r == "object" && (h.loc = { start: r, end: o }), h;
|
|
2952
3033
|
}
|
|
2953
|
-
var
|
|
3034
|
+
var nt = () => (e) => {
|
|
2954
3035
|
let t = Object.assign({}, e.acorn.tokTypes);
|
|
2955
3036
|
return e.acornJsx && Object.assign(t, e.acornJsx.tokTypes), class extends e {
|
|
2956
3037
|
constructor(s, r) {
|
|
2957
3038
|
(typeof s != "object" || s === null) && (s = {}), typeof r != "string" && !(r instanceof String) && (r = String(r));
|
|
2958
|
-
let
|
|
2959
|
-
super({ ecmaVersion:
|
|
2960
|
-
|
|
2961
|
-
}, onComment(
|
|
2962
|
-
if (
|
|
2963
|
-
let
|
|
2964
|
-
|
|
3039
|
+
let o = s.sourceType, u = Ei(s), p = u.ecmaFeatures || {}, h = u.tokens === true ? new Ci(t, r) : null, l = { originalSourceType: o || u.sourceType, tokens: h ? [] : null, comments: u.comment === true ? [] : null, impliedStrict: p.impliedStrict === true && u.ecmaVersion >= 5, ecmaVersion: u.ecmaVersion, jsxAttrValueToken: false, lastToken: null, templateElements: [] };
|
|
3040
|
+
super({ ecmaVersion: u.ecmaVersion, sourceType: u.sourceType, ranges: u.ranges, locations: u.locations, allowReserved: u.allowReserved, allowReturnOutsideFunction: u.allowReturnOutsideFunction, onToken(m) {
|
|
3041
|
+
h && h.onToken(m, l), m.type !== t.eof && (l.lastToken = m);
|
|
3042
|
+
}, onComment(m, S, E, c, x, y) {
|
|
3043
|
+
if (l.comments) {
|
|
3044
|
+
let v = hr(m, S, E, c, x, y, r);
|
|
3045
|
+
l.comments.push(v);
|
|
2965
3046
|
}
|
|
2966
|
-
} }, r), this[Q] =
|
|
3047
|
+
} }, r), this[Q] = l;
|
|
2967
3048
|
}
|
|
2968
3049
|
tokenize() {
|
|
2969
3050
|
do
|
|
@@ -2975,29 +3056,25 @@ var rt = () => (e) => {
|
|
|
2975
3056
|
}
|
|
2976
3057
|
finishNode(...s) {
|
|
2977
3058
|
let r = super.finishNode(...s);
|
|
2978
|
-
return this[
|
|
3059
|
+
return this[at](r);
|
|
2979
3060
|
}
|
|
2980
3061
|
finishNodeAt(...s) {
|
|
2981
3062
|
let r = super.finishNodeAt(...s);
|
|
2982
|
-
return this[
|
|
3063
|
+
return this[at](r);
|
|
2983
3064
|
}
|
|
2984
3065
|
parse() {
|
|
2985
3066
|
let s = this[Q], r = super.parse();
|
|
2986
|
-
|
|
2987
|
-
let
|
|
2988
|
-
|
|
2989
|
-
}
|
|
2990
|
-
return s.lastToken && (r.range && (r.range[1] = s.lastToken.range[1]), r.loc && (r.loc.end = s.lastToken.loc.end), r.end = s.lastToken.end), this[Q].templateElements.forEach((n) => {
|
|
2991
|
-
let p = n.tail ? 1 : 2;
|
|
2992
|
-
n.start += -1, n.end += p, n.range && (n.range[0] += -1, n.range[1] += p), n.loc && (n.loc.start.column += -1, n.loc.end.column += p);
|
|
3067
|
+
return r.sourceType = s.originalSourceType, s.comments && (r.comments = s.comments), s.tokens && (r.tokens = s.tokens), this[Q].templateElements.forEach((o) => {
|
|
3068
|
+
let p = o.tail ? 1 : 2;
|
|
3069
|
+
o.start += -1, o.end += p, o.range && (o.range[0] += -1, o.range[1] += p), o.loc && (o.loc.start.column += -1, o.loc.end.column += p);
|
|
2993
3070
|
}), r;
|
|
2994
3071
|
}
|
|
2995
3072
|
parseTopLevel(s) {
|
|
2996
3073
|
return this[Q].impliedStrict && (this.strict = true), super.parseTopLevel(s);
|
|
2997
3074
|
}
|
|
2998
3075
|
raise(s, r) {
|
|
2999
|
-
let
|
|
3000
|
-
throw
|
|
3076
|
+
let o = e.acorn.getLineInfo(this.input, s), u = new SyntaxError(r);
|
|
3077
|
+
throw u.index = s, u.lineNumber = o.line, u.column = o.column + 1, u;
|
|
3001
3078
|
}
|
|
3002
3079
|
raiseRecoverable(s, r) {
|
|
3003
3080
|
this.raise(s, r);
|
|
@@ -3015,38 +3092,39 @@ var rt = () => (e) => {
|
|
|
3015
3092
|
let r = super.jsx_readString(s);
|
|
3016
3093
|
return this.type === t.string && (this[Q].jsxAttrValueToken = true), r;
|
|
3017
3094
|
}
|
|
3018
|
-
[
|
|
3095
|
+
[at](s) {
|
|
3019
3096
|
return s.type === "TemplateElement" && this[Q].templateElements.push(s), s.type.includes("Function") && !s.generator && (s.generator = false), s;
|
|
3020
3097
|
}
|
|
3021
3098
|
};
|
|
3022
3099
|
};
|
|
3023
|
-
var
|
|
3024
|
-
return this._regular === null && (this._regular =
|
|
3100
|
+
var pr = { _regular: null, _jsx: null, get regular() {
|
|
3101
|
+
return this._regular === null && (this._regular = A.extend(nt())), this._regular;
|
|
3025
3102
|
}, get jsx() {
|
|
3026
|
-
return this._jsx === null && (this._jsx =
|
|
3103
|
+
return this._jsx === null && (this._jsx = A.extend((0, Ai.default)(), nt())), this._jsx;
|
|
3027
3104
|
}, get(e) {
|
|
3028
3105
|
return !!(e && e.ecmaFeatures && e.ecmaFeatures.jsx) ? this.jsx : this.regular;
|
|
3029
3106
|
} };
|
|
3030
3107
|
function ki(e, t) {
|
|
3031
|
-
let i =
|
|
3108
|
+
let i = pr.get(t);
|
|
3032
3109
|
return new i(t, e).parse();
|
|
3033
3110
|
}
|
|
3034
|
-
var
|
|
3035
|
-
function
|
|
3111
|
+
var cr = { ecmaVersion: "latest", range: true, loc: false, comment: true, tokens: false, ecmaFeatures: { jsx: true, impliedStrict: false } };
|
|
3112
|
+
function lr(e) {
|
|
3036
3113
|
let { message: t, lineNumber: i, column: s } = e;
|
|
3037
|
-
return typeof i != "number" ? e :
|
|
3114
|
+
return typeof i != "number" ? e : Ae(t, { loc: { start: { line: i, column: s } }, cause: e });
|
|
3038
3115
|
}
|
|
3039
|
-
function
|
|
3040
|
-
let i =
|
|
3116
|
+
function fr(e, t) {
|
|
3117
|
+
let i = Ve(t?.filepath), s = (i ? [i] : Re).map((o) => () => ki(e, { ...cr, sourceType: o })), r;
|
|
3041
3118
|
try {
|
|
3042
|
-
r =
|
|
3043
|
-
} catch ({ errors: [
|
|
3044
|
-
throw
|
|
3119
|
+
r = ke(s);
|
|
3120
|
+
} catch ({ errors: [o] }) {
|
|
3121
|
+
throw lr(o);
|
|
3045
3122
|
}
|
|
3046
|
-
return
|
|
3123
|
+
return Pe(r, { parser: "espree", text: e });
|
|
3047
3124
|
}
|
|
3048
|
-
var
|
|
3049
|
-
var
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3125
|
+
var wi = Ie(fr);
|
|
3126
|
+
var dr = { acorn: _i, espree: wi };
|
|
3127
|
+
export {
|
|
3128
|
+
Pi as default,
|
|
3129
|
+
dr as parsers
|
|
3130
|
+
};
|