oxfmt 0.43.0 → 0.45.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/configuration_schema.json +8 -8
- package/dist/{acorn-BnWlLI9w.js → acorn-DazAYFEC.js} +1 -1
- package/dist/{angular-BS7_jn7o.js → angular-Aph8b0ut.js} +1303 -1197
- package/dist/{apis-mHnrEtPz.js → apis-rMlkuPw1.js} +3 -3
- package/dist/{babel-Fkr5EfJ9.js → babel-9g4Z1xEA.js} +1 -1
- package/dist/{bindings-mh4tfrCL.js → bindings-CBKV8AbA.js} +26 -26
- package/dist/{chunk-DSjvVL_1-BYdvZw3N.js → chunk-DSjvVL_1-CHQFAj82.js} +1 -1
- package/dist/cli-worker.d.ts +2 -2
- package/dist/cli-worker.js +1 -1
- package/dist/cli.js +69 -25
- package/dist/{dist-D4weCFEt.js → dist-CKaxC7ER.js} +16 -16
- package/dist/{estree-BdH1ynKb.js → estree-ClUlOUIs.js} +2 -2
- package/dist/{flow-JTvJzd2b.js → flow-QdRUnlQt.js} +1 -1
- package/dist/{glimmer-Dj-rhc3H.js → glimmer-C693tJkh.js} +1 -1
- package/dist/{graphql-BTqRh-7l.js → graphql-za2YLVGc.js} +1 -1
- package/dist/{html-cr_GTtzg.js → html-B2VMTsz7.js} +1113 -1011
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -2
- package/dist/{jiti-Bb1dT6Cw-CnTrJOrf.js → jiti-Bb1dT6Cw-DzTewG1l.js} +2 -2
- package/dist/{markdown-4I9EsAQD.js → markdown-BOatMac3.js} +1 -1
- package/dist/{meriyah-Dyll-d_f.js → meriyah-zZMvz4-D.js} +1 -1
- package/dist/{migrate-prettier-CpiJRvlG.js → migrate-prettier-B19hw9Dn.js} +1 -1
- package/dist/{postcss-k2aCwkzC.js → postcss-CBTRJb4w.js} +1 -1
- package/dist/{prettier-Dwwk1Fyx.js → prettier-CU6WrYtk.js} +17 -17
- package/dist/{resolve-pWjAK-4f-ColMfOaZ.js → resolve-pWjAK-4f-Uu3Cl5SX.js} +2 -2
- package/dist/{sorter-BZkvDMjt-BJdi7rG8.js → sorter-BZkvDMjt-ChoLEMxn.js} +7 -7
- package/dist/{sorter-DNWmw8Iu.js → sorter-QhZPi-JI.js} +2 -2
- package/dist/{typescript-G7g7T3yt.js → typescript-4s6b9-t0.js} +1 -1
- package/dist/{utils-D8dQkKEd-BtAa7w-M.js → utils-D8dQkKEd-BAc2jbyI.js} +1 -1
- package/dist/{v3-D-mr2VVh-CisVsFM0.js → v3-D-mr2VVh-D0Hfzxl7.js} +5 -5
- package/dist/{v4-C-HWEQJm-CbHL6UrB.js → v4-C-HWEQJm-BMcGKt4s.js} +5 -5
- package/dist/{yaml-BID5Twob.js → yaml-DNtivWD8.js} +1 -1
- package/package.json +27 -20
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/prettier@3.8.
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
//#region ../../node_modules/.pnpm/prettier@3.8.2/node_modules/prettier/plugins/angular.mjs
|
|
2
|
+
var Or = Object.defineProperty;
|
|
3
|
+
var Dr = Object.getPrototypeOf;
|
|
4
|
+
var Br = Reflect.get;
|
|
5
|
+
var gn = (t) => {
|
|
6
6
|
throw TypeError(t);
|
|
7
7
|
};
|
|
8
|
-
var
|
|
9
|
-
for (var n in e)
|
|
8
|
+
var vn = (t, e) => {
|
|
9
|
+
for (var n in e) Or(t, n, {
|
|
10
10
|
get: e[n],
|
|
11
11
|
enumerable: !0
|
|
12
12
|
});
|
|
13
13
|
};
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
__ng_action: () =>
|
|
22
|
-
__ng_binding: () =>
|
|
23
|
-
__ng_directive: () =>
|
|
24
|
-
__ng_interpolation: () =>
|
|
14
|
+
var lt = (t, e, n) => e.has(t) || gn("Cannot " + n);
|
|
15
|
+
var j = (t, e, n) => (lt(t, e, "read from private field"), n ? n.call(t) : e.get(t)), Me = (t, e, n) => e.has(t) ? gn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), ct = (t, e, n, s) => (lt(t, e, "write to private field"), s ? s.call(t, n) : e.set(t, n), n), v = (t, e, n) => (lt(t, e, "access private method"), n);
|
|
16
|
+
var wn = (t, e, n) => Br(Dr(t), n, e);
|
|
17
|
+
var Rr = {};
|
|
18
|
+
vn(Rr, { parsers: () => fn });
|
|
19
|
+
var fn = {};
|
|
20
|
+
vn(fn, {
|
|
21
|
+
__ng_action: () => no,
|
|
22
|
+
__ng_binding: () => so,
|
|
23
|
+
__ng_directive: () => io,
|
|
24
|
+
__ng_interpolation: () => ro
|
|
25
25
|
});
|
|
26
|
-
function
|
|
26
|
+
function Fr(t) {
|
|
27
27
|
return typeof t == "string" ? (e) => e === t : (e) => t.test(e);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
let s =
|
|
31
|
-
for (let
|
|
32
|
-
let
|
|
33
|
-
if (s(
|
|
29
|
+
function Sn(t, e, n) {
|
|
30
|
+
let s = Fr(e);
|
|
31
|
+
for (let r = n; r < t.length; r++) {
|
|
32
|
+
let i = t[r];
|
|
33
|
+
if (s(i)) return r;
|
|
34
34
|
}
|
|
35
35
|
throw new Error(`Cannot find character ${e} from index ${n} in ${JSON.stringify(t)}`);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function En(t) {
|
|
38
38
|
return t.slice(0, 1).toLowerCase() + t.slice(1);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Re(t) {
|
|
41
41
|
let { start: e, end: n } = t;
|
|
42
42
|
return {
|
|
43
43
|
start: e,
|
|
@@ -45,76 +45,76 @@ function be(t) {
|
|
|
45
45
|
range: [e, n]
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function xn(t) {
|
|
49
49
|
return !!t.extra?.parenthesized;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return t.type === "TSNonNullExpression" && !
|
|
51
|
+
function ve(t) {
|
|
52
|
+
return t.type === "TSNonNullExpression" && !xn(t) ? ve(t.expression) : (t.type === "OptionalCallExpression" || t.type === "OptionalMemberExpression") && !xn(t);
|
|
53
53
|
}
|
|
54
54
|
new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`, "g");
|
|
55
|
-
var
|
|
55
|
+
var yn;
|
|
56
56
|
(function(t) {
|
|
57
57
|
t[t.Emulated = 0] = "Emulated", t[t.None = 2] = "None", t[t.ShadowDom = 3] = "ShadowDom", t[t.ExperimentalIsolatedShadowDom = 4] = "ExperimentalIsolatedShadowDom";
|
|
58
|
-
})(
|
|
59
|
-
var
|
|
58
|
+
})(yn || (yn = {}));
|
|
59
|
+
var Cn;
|
|
60
60
|
(function(t) {
|
|
61
|
-
t[t.OnPush = 0] = "OnPush", t[t.Default = 1] = "Default";
|
|
62
|
-
})(
|
|
63
|
-
var
|
|
61
|
+
t[t.OnPush = 0] = "OnPush", t[t.Default = 1] = "Default", t[t.Eager = 1] = "Eager";
|
|
62
|
+
})(Cn || (Cn = {}));
|
|
63
|
+
var _n;
|
|
64
64
|
(function(t) {
|
|
65
65
|
t[t.None = 0] = "None", t[t.SignalBased = 1] = "SignalBased", t[t.HasDecoratorInputTransform = 2] = "HasDecoratorInputTransform";
|
|
66
|
-
})(
|
|
67
|
-
var
|
|
66
|
+
})(_n || (_n = {}));
|
|
67
|
+
var P;
|
|
68
68
|
(function(t) {
|
|
69
69
|
t[t.NONE = 0] = "NONE", t[t.HTML = 1] = "HTML", t[t.STYLE = 2] = "STYLE", t[t.SCRIPT = 3] = "SCRIPT", t[t.URL = 4] = "URL", t[t.RESOURCE_URL = 5] = "RESOURCE_URL", t[t.ATTRIBUTE_NO_BINDING = 6] = "ATTRIBUTE_NO_BINDING";
|
|
70
|
-
})(
|
|
71
|
-
var
|
|
70
|
+
})(P || (P = {}));
|
|
71
|
+
var kn;
|
|
72
72
|
(function(t) {
|
|
73
73
|
t[t.Error = 0] = "Error", t[t.Warning = 1] = "Warning", t[t.Ignore = 2] = "Ignore";
|
|
74
|
-
})(
|
|
75
|
-
var
|
|
74
|
+
})(kn || (kn = {}));
|
|
75
|
+
var Tn;
|
|
76
76
|
(function(t) {
|
|
77
77
|
t[t.Directive = 0] = "Directive", t[t.Component = 1] = "Component", t[t.Injectable = 2] = "Injectable", t[t.Pipe = 3] = "Pipe", t[t.NgModule = 4] = "NgModule";
|
|
78
|
-
})(
|
|
79
|
-
var
|
|
78
|
+
})(Tn || (Tn = {}));
|
|
79
|
+
var bn;
|
|
80
80
|
(function(t) {
|
|
81
81
|
t[t.Directive = 0] = "Directive", t[t.Pipe = 1] = "Pipe", t[t.NgModule = 2] = "NgModule";
|
|
82
|
-
})(
|
|
83
|
-
var
|
|
82
|
+
})(bn || (bn = {}));
|
|
83
|
+
var An;
|
|
84
84
|
(function(t) {
|
|
85
85
|
t[t.Emulated = 0] = "Emulated", t[t.None = 2] = "None", t[t.ShadowDom = 3] = "ShadowDom", t[t.ExperimentalIsolatedShadowDom = 4] = "ExperimentalIsolatedShadowDom";
|
|
86
|
-
})(
|
|
87
|
-
var
|
|
86
|
+
})(An || (An = {}));
|
|
87
|
+
var In;
|
|
88
88
|
(function(t) {
|
|
89
89
|
t[t.Little = 0] = "Little", t[t.Big = 1] = "Big";
|
|
90
|
-
})(
|
|
91
|
-
var
|
|
90
|
+
})(In || (In = {}));
|
|
91
|
+
var Nn;
|
|
92
92
|
(function(t) {
|
|
93
93
|
t[t.None = 0] = "None", t[t.Const = 1] = "Const";
|
|
94
|
-
})(
|
|
95
|
-
var
|
|
94
|
+
})(Nn || (Nn = {}));
|
|
95
|
+
var Pn;
|
|
96
96
|
(function(t) {
|
|
97
97
|
t[t.Dynamic = 0] = "Dynamic", t[t.Bool = 1] = "Bool", t[t.String = 2] = "String", t[t.Int = 3] = "Int", t[t.Number = 4] = "Number", t[t.Function = 5] = "Function", t[t.Inferred = 6] = "Inferred", t[t.None = 7] = "None";
|
|
98
|
-
})(
|
|
99
|
-
var
|
|
98
|
+
})(Pn || (Pn = {}));
|
|
99
|
+
var Ln;
|
|
100
100
|
(function(t) {
|
|
101
101
|
t[t.Minus = 0] = "Minus", t[t.Plus = 1] = "Plus";
|
|
102
|
-
})(
|
|
103
|
-
var
|
|
102
|
+
})(Ln || (Ln = {}));
|
|
103
|
+
var u;
|
|
104
104
|
(function(t) {
|
|
105
|
-
t[t.Equals = 0] = "Equals", t[t.NotEquals = 1] = "NotEquals", t[t.Assign = 2] = "Assign", t[t.Identical = 3] = "Identical", t[t.NotIdentical = 4] = "NotIdentical", t[t.Minus = 5] = "Minus", t[t.Plus = 6] = "Plus", t[t.Divide = 7] = "Divide", t[t.Multiply = 8] = "Multiply", t[t.Modulo = 9] = "Modulo", t[t.And = 10] = "And", t[t.Or = 11] = "Or", t[t.BitwiseOr = 12] = "BitwiseOr", t[t.BitwiseAnd = 13] = "BitwiseAnd", t[t.Lower = 14] = "Lower", t[t.LowerEquals = 15] = "LowerEquals", t[t.Bigger = 16] = "Bigger", t[t.BiggerEquals = 17] = "BiggerEquals", t[t.NullishCoalesce = 18] = "NullishCoalesce", t[t.Exponentiation = 19] = "Exponentiation", t[t.In = 20] = "In", t[t.
|
|
106
|
-
})(
|
|
107
|
-
function
|
|
105
|
+
t[t.Equals = 0] = "Equals", t[t.NotEquals = 1] = "NotEquals", t[t.Assign = 2] = "Assign", t[t.Identical = 3] = "Identical", t[t.NotIdentical = 4] = "NotIdentical", t[t.Minus = 5] = "Minus", t[t.Plus = 6] = "Plus", t[t.Divide = 7] = "Divide", t[t.Multiply = 8] = "Multiply", t[t.Modulo = 9] = "Modulo", t[t.And = 10] = "And", t[t.Or = 11] = "Or", t[t.BitwiseOr = 12] = "BitwiseOr", t[t.BitwiseAnd = 13] = "BitwiseAnd", t[t.Lower = 14] = "Lower", t[t.LowerEquals = 15] = "LowerEquals", t[t.Bigger = 16] = "Bigger", t[t.BiggerEquals = 17] = "BiggerEquals", t[t.NullishCoalesce = 18] = "NullishCoalesce", t[t.Exponentiation = 19] = "Exponentiation", t[t.In = 20] = "In", t[t.InstanceOf = 21] = "InstanceOf", t[t.AdditionAssignment = 22] = "AdditionAssignment", t[t.SubtractionAssignment = 23] = "SubtractionAssignment", t[t.MultiplicationAssignment = 24] = "MultiplicationAssignment", t[t.DivisionAssignment = 25] = "DivisionAssignment", t[t.RemainderAssignment = 26] = "RemainderAssignment", t[t.ExponentiationAssignment = 27] = "ExponentiationAssignment", t[t.AndAssignment = 28] = "AndAssignment", t[t.OrAssignment = 29] = "OrAssignment", t[t.NullishCoalesceAssignment = 30] = "NullishCoalesceAssignment";
|
|
106
|
+
})(u || (u = {}));
|
|
107
|
+
function Vr(t, e) {
|
|
108
108
|
return t == null || e == null ? t == e : t.isEquivalent(e);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Ur(t, e, n) {
|
|
111
111
|
let s = t.length;
|
|
112
112
|
if (s !== e.length) return !1;
|
|
113
|
-
for (let
|
|
113
|
+
for (let r = 0; r < s; r++) if (!n(t[r], e[r])) return !1;
|
|
114
114
|
return !0;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
return
|
|
116
|
+
function oe(t, e) {
|
|
117
|
+
return Ur(t, e, (n, s) => n.isEquivalent(s));
|
|
118
118
|
}
|
|
119
119
|
var S = class {
|
|
120
120
|
type;
|
|
@@ -123,84 +123,84 @@ var S = class {
|
|
|
123
123
|
this.type = e || null, this.sourceSpan = n || null;
|
|
124
124
|
}
|
|
125
125
|
prop(e, n) {
|
|
126
|
-
return new
|
|
126
|
+
return new xt(this, e, null, n);
|
|
127
127
|
}
|
|
128
128
|
key(e, n, s) {
|
|
129
|
-
return new
|
|
129
|
+
return new St(this, e, n, s);
|
|
130
130
|
}
|
|
131
131
|
callFn(e, n, s) {
|
|
132
|
-
return new
|
|
132
|
+
return new dt(this, e, null, n, s);
|
|
133
133
|
}
|
|
134
134
|
instantiate(e, n, s) {
|
|
135
|
-
return new
|
|
135
|
+
return new mt(this, e, n, s);
|
|
136
136
|
}
|
|
137
137
|
conditional(e, n = null, s) {
|
|
138
|
-
return new
|
|
138
|
+
return new wt(this, e, n, null, s);
|
|
139
139
|
}
|
|
140
140
|
equals(e, n) {
|
|
141
|
-
return new
|
|
141
|
+
return new w(u.Equals, this, e, null, n);
|
|
142
142
|
}
|
|
143
143
|
notEquals(e, n) {
|
|
144
|
-
return new
|
|
144
|
+
return new w(u.NotEquals, this, e, null, n);
|
|
145
145
|
}
|
|
146
146
|
identical(e, n) {
|
|
147
|
-
return new
|
|
147
|
+
return new w(u.Identical, this, e, null, n);
|
|
148
148
|
}
|
|
149
149
|
notIdentical(e, n) {
|
|
150
|
-
return new
|
|
150
|
+
return new w(u.NotIdentical, this, e, null, n);
|
|
151
151
|
}
|
|
152
152
|
minus(e, n) {
|
|
153
|
-
return new
|
|
153
|
+
return new w(u.Minus, this, e, null, n);
|
|
154
154
|
}
|
|
155
155
|
plus(e, n) {
|
|
156
|
-
return new
|
|
156
|
+
return new w(u.Plus, this, e, null, n);
|
|
157
157
|
}
|
|
158
158
|
divide(e, n) {
|
|
159
|
-
return new
|
|
159
|
+
return new w(u.Divide, this, e, null, n);
|
|
160
160
|
}
|
|
161
161
|
multiply(e, n) {
|
|
162
|
-
return new
|
|
162
|
+
return new w(u.Multiply, this, e, null, n);
|
|
163
163
|
}
|
|
164
164
|
modulo(e, n) {
|
|
165
|
-
return new
|
|
165
|
+
return new w(u.Modulo, this, e, null, n);
|
|
166
166
|
}
|
|
167
167
|
power(e, n) {
|
|
168
|
-
return new
|
|
168
|
+
return new w(u.Exponentiation, this, e, null, n);
|
|
169
169
|
}
|
|
170
170
|
and(e, n) {
|
|
171
|
-
return new
|
|
171
|
+
return new w(u.And, this, e, null, n);
|
|
172
172
|
}
|
|
173
173
|
bitwiseOr(e, n) {
|
|
174
|
-
return new
|
|
174
|
+
return new w(u.BitwiseOr, this, e, null, n);
|
|
175
175
|
}
|
|
176
176
|
bitwiseAnd(e, n) {
|
|
177
|
-
return new
|
|
177
|
+
return new w(u.BitwiseAnd, this, e, null, n);
|
|
178
178
|
}
|
|
179
179
|
or(e, n) {
|
|
180
|
-
return new
|
|
180
|
+
return new w(u.Or, this, e, null, n);
|
|
181
181
|
}
|
|
182
182
|
lower(e, n) {
|
|
183
|
-
return new
|
|
183
|
+
return new w(u.Lower, this, e, null, n);
|
|
184
184
|
}
|
|
185
185
|
lowerEquals(e, n) {
|
|
186
|
-
return new
|
|
186
|
+
return new w(u.LowerEquals, this, e, null, n);
|
|
187
187
|
}
|
|
188
188
|
bigger(e, n) {
|
|
189
|
-
return new
|
|
189
|
+
return new w(u.Bigger, this, e, null, n);
|
|
190
190
|
}
|
|
191
191
|
biggerEquals(e, n) {
|
|
192
|
-
return new
|
|
192
|
+
return new w(u.BiggerEquals, this, e, null, n);
|
|
193
193
|
}
|
|
194
194
|
isBlank(e) {
|
|
195
195
|
return this.equals(TYPED_NULL_EXPR, e);
|
|
196
196
|
}
|
|
197
197
|
nullishCoalesce(e, n) {
|
|
198
|
-
return new
|
|
198
|
+
return new w(u.NullishCoalesce, this, e, null, n);
|
|
199
199
|
}
|
|
200
200
|
toStmt() {
|
|
201
|
-
return new
|
|
201
|
+
return new De(this, null);
|
|
202
202
|
}
|
|
203
|
-
},
|
|
203
|
+
}, ht = class t extends S {
|
|
204
204
|
name;
|
|
205
205
|
constructor(e, n, s) {
|
|
206
206
|
super(n, s), this.name = e;
|
|
@@ -218,9 +218,9 @@ var S = class {
|
|
|
218
218
|
return new t(this.name, this.type, this.sourceSpan);
|
|
219
219
|
}
|
|
220
220
|
set(e) {
|
|
221
|
-
return new
|
|
221
|
+
return new w(u.Assign, this, e, null, this.sourceSpan);
|
|
222
222
|
}
|
|
223
|
-
},
|
|
223
|
+
}, ft = class t extends S {
|
|
224
224
|
expr;
|
|
225
225
|
constructor(e, n, s) {
|
|
226
226
|
super(n, s), this.expr = e;
|
|
@@ -238,18 +238,18 @@ var S = class {
|
|
|
238
238
|
return new t(this.expr.clone());
|
|
239
239
|
}
|
|
240
240
|
};
|
|
241
|
-
var
|
|
241
|
+
var dt = class t extends S {
|
|
242
242
|
fn;
|
|
243
243
|
args;
|
|
244
244
|
pure;
|
|
245
|
-
constructor(e, n, s,
|
|
246
|
-
super(s,
|
|
245
|
+
constructor(e, n, s, r, i = !1) {
|
|
246
|
+
super(s, r), this.fn = e, this.args = n, this.pure = i;
|
|
247
247
|
}
|
|
248
248
|
get receiver() {
|
|
249
249
|
return this.fn;
|
|
250
250
|
}
|
|
251
251
|
isEquivalent(e) {
|
|
252
|
-
return e instanceof t && this.fn.isEquivalent(e.fn) &&
|
|
252
|
+
return e instanceof t && this.fn.isEquivalent(e.fn) && oe(this.args, e.args) && this.pure === e.pure;
|
|
253
253
|
}
|
|
254
254
|
isConstant() {
|
|
255
255
|
return !1;
|
|
@@ -261,14 +261,14 @@ var at = class t extends S {
|
|
|
261
261
|
return new t(this.fn.clone(), this.args.map((e) => e.clone()), this.type, this.sourceSpan, this.pure);
|
|
262
262
|
}
|
|
263
263
|
};
|
|
264
|
-
var
|
|
264
|
+
var mt = class t extends S {
|
|
265
265
|
classExpr;
|
|
266
266
|
args;
|
|
267
|
-
constructor(e, n, s,
|
|
268
|
-
super(s,
|
|
267
|
+
constructor(e, n, s, r) {
|
|
268
|
+
super(s, r), this.classExpr = e, this.args = n;
|
|
269
269
|
}
|
|
270
270
|
isEquivalent(e) {
|
|
271
|
-
return e instanceof t && this.classExpr.isEquivalent(e.classExpr) &&
|
|
271
|
+
return e instanceof t && this.classExpr.isEquivalent(e.classExpr) && oe(this.args, e.args);
|
|
272
272
|
}
|
|
273
273
|
isConstant() {
|
|
274
274
|
return !1;
|
|
@@ -279,7 +279,7 @@ var lt = class t extends S {
|
|
|
279
279
|
clone() {
|
|
280
280
|
return new t(this.classExpr.clone(), this.args.map((e) => e.clone()), this.type, this.sourceSpan);
|
|
281
281
|
}
|
|
282
|
-
},
|
|
282
|
+
}, gt = class t extends S {
|
|
283
283
|
body;
|
|
284
284
|
flags;
|
|
285
285
|
constructor(e, n, s) {
|
|
@@ -297,7 +297,7 @@ var lt = class t extends S {
|
|
|
297
297
|
clone() {
|
|
298
298
|
return new t(this.body, this.flags, this.sourceSpan);
|
|
299
299
|
}
|
|
300
|
-
},
|
|
300
|
+
}, Oe = class t extends S {
|
|
301
301
|
value;
|
|
302
302
|
constructor(e, n, s) {
|
|
303
303
|
super(n, s), this.value = e;
|
|
@@ -315,11 +315,11 @@ var lt = class t extends S {
|
|
|
315
315
|
return new t(this.value, this.type, this.sourceSpan);
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
|
-
var
|
|
318
|
+
var vt = class t extends S {
|
|
319
319
|
value;
|
|
320
320
|
typeParams;
|
|
321
|
-
constructor(e, n, s = null,
|
|
322
|
-
super(n,
|
|
321
|
+
constructor(e, n, s = null, r) {
|
|
322
|
+
super(n, r), this.value = e, this.typeParams = s;
|
|
323
323
|
}
|
|
324
324
|
isEquivalent(e) {
|
|
325
325
|
return e instanceof t && this.value.name === e.value.name && this.value.moduleName === e.value.moduleName;
|
|
@@ -334,15 +334,15 @@ var ut = class t extends S {
|
|
|
334
334
|
return new t(this.value, this.type, this.typeParams, this.sourceSpan);
|
|
335
335
|
}
|
|
336
336
|
};
|
|
337
|
-
var
|
|
337
|
+
var wt = class t extends S {
|
|
338
338
|
condition;
|
|
339
339
|
falseCase;
|
|
340
340
|
trueCase;
|
|
341
|
-
constructor(e, n, s = null,
|
|
342
|
-
super(
|
|
341
|
+
constructor(e, n, s = null, r, i) {
|
|
342
|
+
super(r || n.type, i), this.condition = e, this.falseCase = s, this.trueCase = n;
|
|
343
343
|
}
|
|
344
344
|
isEquivalent(e) {
|
|
345
|
-
return e instanceof t && this.condition.isEquivalent(e.condition) && this.trueCase.isEquivalent(e.trueCase) &&
|
|
345
|
+
return e instanceof t && this.condition.isEquivalent(e.condition) && this.trueCase.isEquivalent(e.trueCase) && Vr(this.falseCase, e.falseCase);
|
|
346
346
|
}
|
|
347
347
|
isConstant() {
|
|
348
348
|
return !1;
|
|
@@ -354,12 +354,12 @@ var pt = class t extends S {
|
|
|
354
354
|
return new t(this.condition.clone(), this.trueCase.clone(), this.falseCase?.clone(), this.type, this.sourceSpan);
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
|
-
var
|
|
357
|
+
var w = class t extends S {
|
|
358
358
|
operator;
|
|
359
359
|
rhs;
|
|
360
360
|
lhs;
|
|
361
|
-
constructor(e, n, s,
|
|
362
|
-
super(
|
|
361
|
+
constructor(e, n, s, r, i) {
|
|
362
|
+
super(r || n.type, i), this.operator = e, this.rhs = s, this.lhs = n;
|
|
363
363
|
}
|
|
364
364
|
isEquivalent(e) {
|
|
365
365
|
return e instanceof t && this.operator === e.operator && this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);
|
|
@@ -375,13 +375,13 @@ var x = class t extends S {
|
|
|
375
375
|
}
|
|
376
376
|
isAssignment() {
|
|
377
377
|
let e = this.operator;
|
|
378
|
-
return e ===
|
|
378
|
+
return e === u.Assign || e === u.AdditionAssignment || e === u.SubtractionAssignment || e === u.MultiplicationAssignment || e === u.DivisionAssignment || e === u.RemainderAssignment || e === u.ExponentiationAssignment || e === u.AndAssignment || e === u.OrAssignment || e === u.NullishCoalesceAssignment;
|
|
379
379
|
}
|
|
380
|
-
},
|
|
380
|
+
}, xt = class t extends S {
|
|
381
381
|
receiver;
|
|
382
382
|
name;
|
|
383
|
-
constructor(e, n, s,
|
|
384
|
-
super(s,
|
|
383
|
+
constructor(e, n, s, r) {
|
|
384
|
+
super(s, r), this.receiver = e, this.name = n;
|
|
385
385
|
}
|
|
386
386
|
get index() {
|
|
387
387
|
return this.name;
|
|
@@ -396,16 +396,16 @@ var x = class t extends S {
|
|
|
396
396
|
return e.visitReadPropExpr(this, n);
|
|
397
397
|
}
|
|
398
398
|
set(e) {
|
|
399
|
-
return new
|
|
399
|
+
return new w(u.Assign, this.receiver.prop(this.name), e, null, this.sourceSpan);
|
|
400
400
|
}
|
|
401
401
|
clone() {
|
|
402
402
|
return new t(this.receiver.clone(), this.name, this.type, this.sourceSpan);
|
|
403
403
|
}
|
|
404
|
-
},
|
|
404
|
+
}, St = class t extends S {
|
|
405
405
|
receiver;
|
|
406
406
|
index;
|
|
407
|
-
constructor(e, n, s,
|
|
408
|
-
super(s,
|
|
407
|
+
constructor(e, n, s, r) {
|
|
408
|
+
super(s, r), this.receiver = e, this.index = n;
|
|
409
409
|
}
|
|
410
410
|
isEquivalent(e) {
|
|
411
411
|
return e instanceof t && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index);
|
|
@@ -417,12 +417,12 @@ var x = class t extends S {
|
|
|
417
417
|
return e.visitReadKeyExpr(this, n);
|
|
418
418
|
}
|
|
419
419
|
set(e) {
|
|
420
|
-
return new
|
|
420
|
+
return new w(u.Assign, this.receiver.key(this.index), e, null, this.sourceSpan);
|
|
421
421
|
}
|
|
422
422
|
clone() {
|
|
423
423
|
return new t(this.receiver.clone(), this.index.clone(), this.type, this.sourceSpan);
|
|
424
424
|
}
|
|
425
|
-
},
|
|
425
|
+
}, Et = class t extends S {
|
|
426
426
|
entries;
|
|
427
427
|
constructor(e, n, s) {
|
|
428
428
|
super(n, s), this.entries = e;
|
|
@@ -431,7 +431,7 @@ var x = class t extends S {
|
|
|
431
431
|
return this.entries.every((e) => e.isConstant());
|
|
432
432
|
}
|
|
433
433
|
isEquivalent(e) {
|
|
434
|
-
return e instanceof t &&
|
|
434
|
+
return e instanceof t && oe(this.entries, e.entries);
|
|
435
435
|
}
|
|
436
436
|
visitExpression(e, n) {
|
|
437
437
|
return e.visitLiteralArrayExpr(this, n);
|
|
@@ -440,7 +440,7 @@ var x = class t extends S {
|
|
|
440
440
|
return new t(this.entries.map((e) => e.clone()), this.type, this.sourceSpan);
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
|
-
var
|
|
443
|
+
var yt = class t {
|
|
444
444
|
expression;
|
|
445
445
|
constructor(e) {
|
|
446
446
|
this.expression = e;
|
|
@@ -454,14 +454,14 @@ var mt = class t {
|
|
|
454
454
|
isConstant() {
|
|
455
455
|
return this.expression.isConstant();
|
|
456
456
|
}
|
|
457
|
-
},
|
|
457
|
+
}, Ct = class t extends S {
|
|
458
458
|
entries;
|
|
459
459
|
valueType = null;
|
|
460
460
|
constructor(e, n, s) {
|
|
461
461
|
super(n, s), this.entries = e, n && (this.valueType = n.valueType);
|
|
462
462
|
}
|
|
463
463
|
isEquivalent(e) {
|
|
464
|
-
return e instanceof t &&
|
|
464
|
+
return e instanceof t && oe(this.entries, e.entries);
|
|
465
465
|
}
|
|
466
466
|
isConstant() {
|
|
467
467
|
return this.entries.every((e) => e.isConstant());
|
|
@@ -473,7 +473,7 @@ var mt = class t {
|
|
|
473
473
|
return new t(this.entries.map((n) => n.clone()), this.type, this.sourceSpan);
|
|
474
474
|
}
|
|
475
475
|
};
|
|
476
|
-
var
|
|
476
|
+
var _t = class t extends S {
|
|
477
477
|
expression;
|
|
478
478
|
constructor(e, n) {
|
|
479
479
|
super(null, n), this.expression = e;
|
|
@@ -490,15 +490,15 @@ var vt = class t extends S {
|
|
|
490
490
|
clone() {
|
|
491
491
|
return new t(this.expression.clone(), this.sourceSpan);
|
|
492
492
|
}
|
|
493
|
-
},
|
|
493
|
+
}, ae;
|
|
494
494
|
(function(t) {
|
|
495
495
|
t[t.None = 0] = "None", t[t.Final = 1] = "Final", t[t.Private = 2] = "Private", t[t.Exported = 4] = "Exported", t[t.Static = 8] = "Static";
|
|
496
|
-
})(
|
|
497
|
-
var
|
|
496
|
+
})(ae || (ae = {}));
|
|
497
|
+
var le = class {
|
|
498
498
|
modifiers;
|
|
499
499
|
sourceSpan;
|
|
500
500
|
leadingComments;
|
|
501
|
-
constructor(e =
|
|
501
|
+
constructor(e = ae.None, n = null, s) {
|
|
502
502
|
this.modifiers = e, this.sourceSpan = n, this.leadingComments = s;
|
|
503
503
|
}
|
|
504
504
|
hasModifier(e) {
|
|
@@ -507,11 +507,10 @@ var xt = class {
|
|
|
507
507
|
addLeadingComment(e) {
|
|
508
508
|
this.leadingComments = this.leadingComments ?? [], this.leadingComments.push(e);
|
|
509
509
|
}
|
|
510
|
-
}
|
|
511
|
-
var wt = class t extends xt {
|
|
510
|
+
}, De = class t extends le {
|
|
512
511
|
expr;
|
|
513
512
|
constructor(e, n, s) {
|
|
514
|
-
super(
|
|
513
|
+
super(ae.None, n, s), this.expr = e;
|
|
515
514
|
}
|
|
516
515
|
isEquivalent(e) {
|
|
517
516
|
return e instanceof t && this.expr.isEquivalent(e.expr);
|
|
@@ -523,34 +522,31 @@ var wt = class t extends xt {
|
|
|
523
522
|
(class t {
|
|
524
523
|
static INSTANCE = new t();
|
|
525
524
|
keyOf(e) {
|
|
526
|
-
if (e instanceof
|
|
527
|
-
if (e instanceof
|
|
528
|
-
if (e instanceof
|
|
529
|
-
if (e instanceof
|
|
525
|
+
if (e instanceof Oe && typeof e.value == "string") return `"${e.value}"`;
|
|
526
|
+
if (e instanceof Oe) return String(e.value);
|
|
527
|
+
if (e instanceof gt) return `/${e.body}/${e.flags ?? ""}`;
|
|
528
|
+
if (e instanceof Et) {
|
|
530
529
|
let n = [];
|
|
531
530
|
for (let s of e.entries) n.push(this.keyOf(s));
|
|
532
531
|
return `[${n.join(",")}]`;
|
|
533
|
-
} else if (e instanceof
|
|
532
|
+
} else if (e instanceof Ct) {
|
|
534
533
|
let n = [];
|
|
535
|
-
for (let s of e.entries) if (s instanceof
|
|
534
|
+
for (let s of e.entries) if (s instanceof yt) n.push("..." + this.keyOf(s.expression));
|
|
536
535
|
else {
|
|
537
|
-
let
|
|
538
|
-
s.quoted && (
|
|
536
|
+
let r = s.key;
|
|
537
|
+
s.quoted && (r = `"${r}"`), n.push(r + ":" + this.keyOf(s.value));
|
|
539
538
|
}
|
|
540
539
|
return `{${n.join(",")}}`;
|
|
541
540
|
} else {
|
|
542
|
-
if (e instanceof
|
|
543
|
-
if (e instanceof
|
|
544
|
-
if (e instanceof
|
|
545
|
-
if (e instanceof
|
|
541
|
+
if (e instanceof vt) return `import("${e.value.moduleName}", ${e.value.name})`;
|
|
542
|
+
if (e instanceof ht) return `read(${e.name})`;
|
|
543
|
+
if (e instanceof ft) return `typeof(${this.keyOf(e.expr)})`;
|
|
544
|
+
if (e instanceof _t) return `...${this.keyOf(e.expression)}`;
|
|
546
545
|
throw new Error(`${this.constructor.name} does not handle expressions of type ${e.constructor.name}`);
|
|
547
546
|
}
|
|
548
547
|
}
|
|
549
548
|
});
|
|
550
|
-
var o = "@angular/core",
|
|
551
|
-
static NEW_METHOD = "factory";
|
|
552
|
-
static TRANSFORM_METHOD = "transform";
|
|
553
|
-
static PATCH_DEPS = "patchedDeps";
|
|
549
|
+
var o = "@angular/core", c = class {
|
|
554
550
|
static core = {
|
|
555
551
|
name: null,
|
|
556
552
|
moduleName: o
|
|
@@ -1275,6 +1271,10 @@ var o = "@angular/core", l = class {
|
|
|
1275
1271
|
name: "ɵɵreadContextLet",
|
|
1276
1272
|
moduleName: o
|
|
1277
1273
|
};
|
|
1274
|
+
static arrowFunction = {
|
|
1275
|
+
name: "ɵɵarrowFunction",
|
|
1276
|
+
moduleName: o
|
|
1277
|
+
};
|
|
1278
1278
|
static attachSourceLocations = {
|
|
1279
1279
|
name: "ɵɵattachSourceLocations",
|
|
1280
1280
|
moduleName: o
|
|
@@ -1283,6 +1283,10 @@ var o = "@angular/core", l = class {
|
|
|
1283
1283
|
name: "ɵɵNgOnChangesFeature",
|
|
1284
1284
|
moduleName: o
|
|
1285
1285
|
};
|
|
1286
|
+
static ControlFeature = {
|
|
1287
|
+
name: "ɵɵControlFeature",
|
|
1288
|
+
moduleName: o
|
|
1289
|
+
};
|
|
1286
1290
|
static InheritDefinitionFeature = {
|
|
1287
1291
|
name: "ɵɵInheritDefinitionFeature",
|
|
1288
1292
|
moduleName: o
|
|
@@ -1384,7 +1388,7 @@ var o = "@angular/core", l = class {
|
|
|
1384
1388
|
moduleName: o
|
|
1385
1389
|
};
|
|
1386
1390
|
};
|
|
1387
|
-
var
|
|
1391
|
+
var bt = class {
|
|
1388
1392
|
full;
|
|
1389
1393
|
major;
|
|
1390
1394
|
minor;
|
|
@@ -1396,49 +1400,50 @@ var St = class {
|
|
|
1396
1400
|
}
|
|
1397
1401
|
};
|
|
1398
1402
|
new Map([
|
|
1399
|
-
[
|
|
1400
|
-
[
|
|
1401
|
-
[
|
|
1402
|
-
[
|
|
1403
|
-
[
|
|
1404
|
-
[
|
|
1405
|
-
[
|
|
1406
|
-
[
|
|
1407
|
-
[
|
|
1408
|
-
[
|
|
1409
|
-
[
|
|
1410
|
-
[
|
|
1411
|
-
[
|
|
1412
|
-
[
|
|
1413
|
-
[
|
|
1414
|
-
[
|
|
1415
|
-
[
|
|
1416
|
-
[
|
|
1417
|
-
[
|
|
1418
|
-
[
|
|
1419
|
-
[
|
|
1420
|
-
[
|
|
1421
|
-
[
|
|
1422
|
-
[
|
|
1423
|
-
[
|
|
1424
|
-
[
|
|
1425
|
-
[
|
|
1426
|
-
[
|
|
1427
|
-
[
|
|
1428
|
-
[
|
|
1403
|
+
[u.And, "&&"],
|
|
1404
|
+
[u.Bigger, ">"],
|
|
1405
|
+
[u.BiggerEquals, ">="],
|
|
1406
|
+
[u.BitwiseOr, "|"],
|
|
1407
|
+
[u.BitwiseAnd, "&"],
|
|
1408
|
+
[u.Divide, "/"],
|
|
1409
|
+
[u.Assign, "="],
|
|
1410
|
+
[u.Equals, "=="],
|
|
1411
|
+
[u.Identical, "==="],
|
|
1412
|
+
[u.Lower, "<"],
|
|
1413
|
+
[u.LowerEquals, "<="],
|
|
1414
|
+
[u.Minus, "-"],
|
|
1415
|
+
[u.Modulo, "%"],
|
|
1416
|
+
[u.Exponentiation, "**"],
|
|
1417
|
+
[u.Multiply, "*"],
|
|
1418
|
+
[u.NotEquals, "!="],
|
|
1419
|
+
[u.NotIdentical, "!=="],
|
|
1420
|
+
[u.NullishCoalesce, "??"],
|
|
1421
|
+
[u.Or, "||"],
|
|
1422
|
+
[u.Plus, "+"],
|
|
1423
|
+
[u.In, "in"],
|
|
1424
|
+
[u.InstanceOf, "instanceof"],
|
|
1425
|
+
[u.AdditionAssignment, "+="],
|
|
1426
|
+
[u.SubtractionAssignment, "-="],
|
|
1427
|
+
[u.MultiplicationAssignment, "*="],
|
|
1428
|
+
[u.DivisionAssignment, "/="],
|
|
1429
|
+
[u.RemainderAssignment, "%="],
|
|
1430
|
+
[u.ExponentiationAssignment, "**="],
|
|
1431
|
+
[u.AndAssignment, "&&="],
|
|
1432
|
+
[u.OrAssignment, "||="],
|
|
1433
|
+
[u.NullishCoalesceAssignment, "??="]
|
|
1429
1434
|
]);
|
|
1430
|
-
var
|
|
1435
|
+
var Rn;
|
|
1431
1436
|
(function(t) {
|
|
1432
1437
|
t[t.Class = 0] = "Class", t[t.Function = 1] = "Function";
|
|
1433
|
-
})(
|
|
1434
|
-
var
|
|
1438
|
+
})(Rn || (Rn = {}));
|
|
1439
|
+
var K = class {
|
|
1435
1440
|
start;
|
|
1436
1441
|
end;
|
|
1437
1442
|
constructor(e, n) {
|
|
1438
1443
|
this.start = e, this.end = n;
|
|
1439
1444
|
}
|
|
1440
1445
|
toAbsolute(e) {
|
|
1441
|
-
return new
|
|
1446
|
+
return new O(e + this.start, e + this.end);
|
|
1442
1447
|
}
|
|
1443
1448
|
}, g = class {
|
|
1444
1449
|
span;
|
|
@@ -1449,22 +1454,24 @@ var X = class {
|
|
|
1449
1454
|
toString() {
|
|
1450
1455
|
return "AST";
|
|
1451
1456
|
}
|
|
1452
|
-
},
|
|
1457
|
+
}, Ae = class extends g {
|
|
1453
1458
|
nameSpan;
|
|
1454
1459
|
constructor(e, n, s) {
|
|
1455
1460
|
super(e, n), this.nameSpan = s;
|
|
1456
1461
|
}
|
|
1457
|
-
},
|
|
1458
|
-
visit(e, n = null) {
|
|
1459
|
-
|
|
1462
|
+
}, A = class extends g {
|
|
1463
|
+
visit(e, n = null) {
|
|
1464
|
+
return e.visitEmptyExpr?.(this, n);
|
|
1465
|
+
}
|
|
1466
|
+
}, ce = class extends g {
|
|
1460
1467
|
visit(e, n = null) {
|
|
1461
1468
|
return e.visitImplicitReceiver(this, n);
|
|
1462
1469
|
}
|
|
1463
|
-
},
|
|
1470
|
+
}, At = class extends g {
|
|
1464
1471
|
visit(e, n = null) {
|
|
1465
1472
|
return e.visitThisReceiver?.(this, n);
|
|
1466
1473
|
}
|
|
1467
|
-
},
|
|
1474
|
+
}, It = class extends g {
|
|
1468
1475
|
expressions;
|
|
1469
1476
|
constructor(e, n, s) {
|
|
1470
1477
|
super(e, n), this.expressions = s;
|
|
@@ -1472,63 +1479,63 @@ var X = class {
|
|
|
1472
1479
|
visit(e, n = null) {
|
|
1473
1480
|
return e.visitChain(this, n);
|
|
1474
1481
|
}
|
|
1475
|
-
},
|
|
1482
|
+
}, Nt = class extends g {
|
|
1476
1483
|
condition;
|
|
1477
1484
|
trueExp;
|
|
1478
1485
|
falseExp;
|
|
1479
|
-
constructor(e, n, s,
|
|
1480
|
-
super(e, n), this.condition = s, this.trueExp =
|
|
1486
|
+
constructor(e, n, s, r, i) {
|
|
1487
|
+
super(e, n), this.condition = s, this.trueExp = r, this.falseExp = i;
|
|
1481
1488
|
}
|
|
1482
1489
|
visit(e, n = null) {
|
|
1483
1490
|
return e.visitConditional(this, n);
|
|
1484
1491
|
}
|
|
1485
|
-
},
|
|
1492
|
+
}, ye = class extends Ae {
|
|
1486
1493
|
receiver;
|
|
1487
1494
|
name;
|
|
1488
|
-
constructor(e, n, s,
|
|
1489
|
-
super(e, n, s), this.receiver =
|
|
1495
|
+
constructor(e, n, s, r, i) {
|
|
1496
|
+
super(e, n, s), this.receiver = r, this.name = i;
|
|
1490
1497
|
}
|
|
1491
1498
|
visit(e, n = null) {
|
|
1492
1499
|
return e.visitPropertyRead(this, n);
|
|
1493
1500
|
}
|
|
1494
|
-
},
|
|
1501
|
+
}, Pt = class extends Ae {
|
|
1495
1502
|
receiver;
|
|
1496
1503
|
name;
|
|
1497
|
-
constructor(e, n, s,
|
|
1498
|
-
super(e, n, s), this.receiver =
|
|
1504
|
+
constructor(e, n, s, r, i) {
|
|
1505
|
+
super(e, n, s), this.receiver = r, this.name = i;
|
|
1499
1506
|
}
|
|
1500
1507
|
visit(e, n = null) {
|
|
1501
1508
|
return e.visitSafePropertyRead(this, n);
|
|
1502
1509
|
}
|
|
1503
|
-
},
|
|
1510
|
+
}, Fe = class extends g {
|
|
1504
1511
|
receiver;
|
|
1505
1512
|
key;
|
|
1506
|
-
constructor(e, n, s,
|
|
1507
|
-
super(e, n), this.receiver = s, this.key =
|
|
1513
|
+
constructor(e, n, s, r) {
|
|
1514
|
+
super(e, n), this.receiver = s, this.key = r;
|
|
1508
1515
|
}
|
|
1509
1516
|
visit(e, n = null) {
|
|
1510
1517
|
return e.visitKeyedRead(this, n);
|
|
1511
1518
|
}
|
|
1512
|
-
},
|
|
1519
|
+
}, Lt = class extends g {
|
|
1513
1520
|
receiver;
|
|
1514
1521
|
key;
|
|
1515
|
-
constructor(e, n, s,
|
|
1516
|
-
super(e, n), this.receiver = s, this.key =
|
|
1522
|
+
constructor(e, n, s, r) {
|
|
1523
|
+
super(e, n), this.receiver = s, this.key = r;
|
|
1517
1524
|
}
|
|
1518
1525
|
visit(e, n = null) {
|
|
1519
1526
|
return e.visitSafeKeyedRead(this, n);
|
|
1520
1527
|
}
|
|
1521
|
-
},
|
|
1528
|
+
}, Ce;
|
|
1522
1529
|
(function(t) {
|
|
1523
1530
|
t[t.ReferencedByName = 0] = "ReferencedByName", t[t.ReferencedDirectly = 1] = "ReferencedDirectly";
|
|
1524
|
-
})(
|
|
1525
|
-
var
|
|
1531
|
+
})(Ce || (Ce = {}));
|
|
1532
|
+
var Mt = class extends Ae {
|
|
1526
1533
|
exp;
|
|
1527
1534
|
name;
|
|
1528
1535
|
args;
|
|
1529
1536
|
type;
|
|
1530
|
-
constructor(e, n, s,
|
|
1531
|
-
super(e, n,
|
|
1537
|
+
constructor(e, n, s, r, i, a, p) {
|
|
1538
|
+
super(e, n, p), this.exp = s, this.name = r, this.args = i, this.type = a;
|
|
1532
1539
|
}
|
|
1533
1540
|
visit(e, n = null) {
|
|
1534
1541
|
return e.visitPipe(this, n);
|
|
@@ -1541,7 +1548,7 @@ var kt = class extends Se {
|
|
|
1541
1548
|
visit(e, n = null) {
|
|
1542
1549
|
return e.visitLiteralPrimitive(this, n);
|
|
1543
1550
|
}
|
|
1544
|
-
},
|
|
1551
|
+
}, Rt = class extends g {
|
|
1545
1552
|
expressions;
|
|
1546
1553
|
constructor(e, n, s) {
|
|
1547
1554
|
super(e, n), this.expressions = s;
|
|
@@ -1549,7 +1556,7 @@ var kt = class extends Se {
|
|
|
1549
1556
|
visit(e, n = null) {
|
|
1550
1557
|
return e.visitLiteralArray(this, n);
|
|
1551
1558
|
}
|
|
1552
|
-
},
|
|
1559
|
+
}, $t = class extends g {
|
|
1553
1560
|
expression;
|
|
1554
1561
|
constructor(e, n, s) {
|
|
1555
1562
|
super(e, n), this.expression = s;
|
|
@@ -1557,20 +1564,20 @@ var kt = class extends Se {
|
|
|
1557
1564
|
visit(e, n = null) {
|
|
1558
1565
|
return e.visitSpreadElement(this, n);
|
|
1559
1566
|
}
|
|
1560
|
-
},
|
|
1567
|
+
}, Ot = class extends g {
|
|
1561
1568
|
keys;
|
|
1562
1569
|
values;
|
|
1563
|
-
constructor(e, n, s,
|
|
1564
|
-
super(e, n), this.keys = s, this.values =
|
|
1570
|
+
constructor(e, n, s, r) {
|
|
1571
|
+
super(e, n), this.keys = s, this.values = r;
|
|
1565
1572
|
}
|
|
1566
1573
|
visit(e, n = null) {
|
|
1567
1574
|
return e.visitLiteralMap(this, n);
|
|
1568
1575
|
}
|
|
1569
|
-
},
|
|
1576
|
+
}, Hr = class extends g {
|
|
1570
1577
|
strings;
|
|
1571
1578
|
expressions;
|
|
1572
|
-
constructor(e, n, s,
|
|
1573
|
-
super(e, n), this.strings = s, this.expressions =
|
|
1579
|
+
constructor(e, n, s, r) {
|
|
1580
|
+
super(e, n), this.strings = s, this.expressions = r;
|
|
1574
1581
|
}
|
|
1575
1582
|
visit(e, n = null) {
|
|
1576
1583
|
return e.visitInterpolation(this, n);
|
|
@@ -1579,8 +1586,8 @@ var kt = class extends Se {
|
|
|
1579
1586
|
operation;
|
|
1580
1587
|
left;
|
|
1581
1588
|
right;
|
|
1582
|
-
constructor(e, n, s,
|
|
1583
|
-
super(e, n), this.operation = s, this.left =
|
|
1589
|
+
constructor(e, n, s, r, i) {
|
|
1590
|
+
super(e, n), this.operation = s, this.left = r, this.right = i;
|
|
1584
1591
|
}
|
|
1585
1592
|
visit(e, n = null) {
|
|
1586
1593
|
return e.visitBinary(this, n);
|
|
@@ -1588,7 +1595,7 @@ var kt = class extends Se {
|
|
|
1588
1595
|
static isAssignmentOperation(e) {
|
|
1589
1596
|
return e === "=" || e === "+=" || e === "-=" || e === "*=" || e === "/=" || e === "%=" || e === "**=" || e === "&&=" || e === "||=" || e === "??=";
|
|
1590
1597
|
}
|
|
1591
|
-
},
|
|
1598
|
+
}, _e = class t extends E {
|
|
1592
1599
|
operator;
|
|
1593
1600
|
expr;
|
|
1594
1601
|
left = null;
|
|
@@ -1600,13 +1607,13 @@ var kt = class extends Se {
|
|
|
1600
1607
|
static createPlus(e, n, s) {
|
|
1601
1608
|
return new t(e, n, "+", s, "-", s, new I(e, n, 0));
|
|
1602
1609
|
}
|
|
1603
|
-
constructor(e, n, s,
|
|
1604
|
-
super(e, n,
|
|
1610
|
+
constructor(e, n, s, r, i, a, p) {
|
|
1611
|
+
super(e, n, i, a, p), this.operator = s, this.expr = r;
|
|
1605
1612
|
}
|
|
1606
1613
|
visit(e, n = null) {
|
|
1607
1614
|
return e.visitUnary !== void 0 ? e.visitUnary(this, n) : e.visitBinary(this, n);
|
|
1608
1615
|
}
|
|
1609
|
-
},
|
|
1616
|
+
}, Ve = class extends g {
|
|
1610
1617
|
expression;
|
|
1611
1618
|
constructor(e, n, s) {
|
|
1612
1619
|
super(e, n), this.expression = s;
|
|
@@ -1614,7 +1621,7 @@ var kt = class extends Se {
|
|
|
1614
1621
|
visit(e, n = null) {
|
|
1615
1622
|
return e.visitPrefixNot(this, n);
|
|
1616
1623
|
}
|
|
1617
|
-
},
|
|
1624
|
+
}, Ue = class extends g {
|
|
1618
1625
|
expression;
|
|
1619
1626
|
constructor(e, n, s) {
|
|
1620
1627
|
super(e, n), this.expression = s;
|
|
@@ -1622,7 +1629,7 @@ var kt = class extends Se {
|
|
|
1622
1629
|
visit(e, n = null) {
|
|
1623
1630
|
return e.visitTypeofExpression(this, n);
|
|
1624
1631
|
}
|
|
1625
|
-
},
|
|
1632
|
+
}, He = class extends g {
|
|
1626
1633
|
expression;
|
|
1627
1634
|
constructor(e, n, s) {
|
|
1628
1635
|
super(e, n), this.expression = s;
|
|
@@ -1630,7 +1637,7 @@ var kt = class extends Se {
|
|
|
1630
1637
|
visit(e, n = null) {
|
|
1631
1638
|
return e.visitVoidExpression(this, n);
|
|
1632
1639
|
}
|
|
1633
|
-
},
|
|
1640
|
+
}, Dt = class extends g {
|
|
1634
1641
|
expression;
|
|
1635
1642
|
constructor(e, n, s) {
|
|
1636
1643
|
super(e, n), this.expression = s;
|
|
@@ -1638,45 +1645,45 @@ var kt = class extends Se {
|
|
|
1638
1645
|
visit(e, n = null) {
|
|
1639
1646
|
return e.visitNonNullAssert(this, n);
|
|
1640
1647
|
}
|
|
1641
|
-
},
|
|
1648
|
+
}, Bt = class extends g {
|
|
1642
1649
|
receiver;
|
|
1643
1650
|
args;
|
|
1644
1651
|
argumentSpan;
|
|
1645
|
-
constructor(e, n, s,
|
|
1646
|
-
super(e, n), this.receiver = s, this.args =
|
|
1652
|
+
constructor(e, n, s, r, i) {
|
|
1653
|
+
super(e, n), this.receiver = s, this.args = r, this.argumentSpan = i;
|
|
1647
1654
|
}
|
|
1648
1655
|
visit(e, n = null) {
|
|
1649
1656
|
return e.visitCall(this, n);
|
|
1650
1657
|
}
|
|
1651
|
-
},
|
|
1658
|
+
}, Ft = class extends g {
|
|
1652
1659
|
receiver;
|
|
1653
1660
|
args;
|
|
1654
1661
|
argumentSpan;
|
|
1655
|
-
constructor(e, n, s,
|
|
1656
|
-
super(e, n), this.receiver = s, this.args =
|
|
1662
|
+
constructor(e, n, s, r, i) {
|
|
1663
|
+
super(e, n), this.receiver = s, this.args = r, this.argumentSpan = i;
|
|
1657
1664
|
}
|
|
1658
1665
|
visit(e, n = null) {
|
|
1659
1666
|
return e.visitSafeCall(this, n);
|
|
1660
1667
|
}
|
|
1661
|
-
},
|
|
1668
|
+
}, We = class extends g {
|
|
1662
1669
|
tag;
|
|
1663
1670
|
template;
|
|
1664
|
-
constructor(e, n, s,
|
|
1665
|
-
super(e, n), this.tag = s, this.template =
|
|
1671
|
+
constructor(e, n, s, r) {
|
|
1672
|
+
super(e, n), this.tag = s, this.template = r;
|
|
1666
1673
|
}
|
|
1667
1674
|
visit(e, n) {
|
|
1668
1675
|
return e.visitTaggedTemplateLiteral(this, n);
|
|
1669
1676
|
}
|
|
1670
|
-
},
|
|
1677
|
+
}, qe = class extends g {
|
|
1671
1678
|
elements;
|
|
1672
1679
|
expressions;
|
|
1673
|
-
constructor(e, n, s,
|
|
1674
|
-
super(e, n), this.elements = s, this.expressions =
|
|
1680
|
+
constructor(e, n, s, r) {
|
|
1681
|
+
super(e, n), this.elements = s, this.expressions = r;
|
|
1675
1682
|
}
|
|
1676
1683
|
visit(e, n) {
|
|
1677
1684
|
return e.visitTemplateLiteral(this, n);
|
|
1678
1685
|
}
|
|
1679
|
-
},
|
|
1686
|
+
}, je = class extends g {
|
|
1680
1687
|
text;
|
|
1681
1688
|
constructor(e, n, s) {
|
|
1682
1689
|
super(e, n), this.text = s;
|
|
@@ -1684,7 +1691,7 @@ var kt = class extends Se {
|
|
|
1684
1691
|
visit(e, n) {
|
|
1685
1692
|
return e.visitTemplateLiteralElement(this, n);
|
|
1686
1693
|
}
|
|
1687
|
-
},
|
|
1694
|
+
}, Ie = class extends g {
|
|
1688
1695
|
expression;
|
|
1689
1696
|
constructor(e, n, s) {
|
|
1690
1697
|
super(e, n), this.expression = s;
|
|
@@ -1692,28 +1699,44 @@ var kt = class extends Se {
|
|
|
1692
1699
|
visit(e, n) {
|
|
1693
1700
|
return e.visitParenthesizedExpression(this, n);
|
|
1694
1701
|
}
|
|
1695
|
-
},
|
|
1702
|
+
}, Vt = class {
|
|
1703
|
+
name;
|
|
1704
|
+
span;
|
|
1705
|
+
sourceSpan;
|
|
1706
|
+
constructor(e, n, s) {
|
|
1707
|
+
this.name = e, this.span = n, this.sourceSpan = s;
|
|
1708
|
+
}
|
|
1709
|
+
}, Ut = class extends g {
|
|
1710
|
+
parameters;
|
|
1711
|
+
body;
|
|
1712
|
+
constructor(e, n, s, r) {
|
|
1713
|
+
super(e, n), this.parameters = s, this.body = r;
|
|
1714
|
+
}
|
|
1715
|
+
visit(e, n) {
|
|
1716
|
+
return e.visitArrowFunction(this, n);
|
|
1717
|
+
}
|
|
1718
|
+
}, Ht = class extends g {
|
|
1696
1719
|
body;
|
|
1697
1720
|
flags;
|
|
1698
|
-
constructor(e, n, s,
|
|
1699
|
-
super(e, n), this.body = s, this.flags =
|
|
1721
|
+
constructor(e, n, s, r) {
|
|
1722
|
+
super(e, n), this.body = s, this.flags = r;
|
|
1700
1723
|
}
|
|
1701
1724
|
visit(e, n) {
|
|
1702
1725
|
return e.visitRegularExpressionLiteral(this, n);
|
|
1703
1726
|
}
|
|
1704
|
-
},
|
|
1727
|
+
}, O = class {
|
|
1705
1728
|
start;
|
|
1706
1729
|
end;
|
|
1707
1730
|
constructor(e, n) {
|
|
1708
1731
|
this.start = e, this.end = n;
|
|
1709
1732
|
}
|
|
1710
|
-
},
|
|
1733
|
+
}, U = class extends g {
|
|
1711
1734
|
ast;
|
|
1712
1735
|
source;
|
|
1713
1736
|
location;
|
|
1714
1737
|
errors;
|
|
1715
|
-
constructor(e, n, s,
|
|
1716
|
-
super(new
|
|
1738
|
+
constructor(e, n, s, r, i) {
|
|
1739
|
+
super(new K(0, n === null ? 0 : n.length), new O(r, n === null ? r : r + n.length)), this.ast = e, this.source = n, this.location = s, this.errors = i;
|
|
1717
1740
|
}
|
|
1718
1741
|
visit(e, n = null) {
|
|
1719
1742
|
return e.visitASTWithSource ? e.visitASTWithSource(this, n) : this.ast.visit(e, n);
|
|
@@ -1721,21 +1744,21 @@ var kt = class extends Se {
|
|
|
1721
1744
|
toString() {
|
|
1722
1745
|
return `${this.source} in ${this.location}`;
|
|
1723
1746
|
}
|
|
1724
|
-
},
|
|
1747
|
+
}, ue = class {
|
|
1725
1748
|
sourceSpan;
|
|
1726
1749
|
key;
|
|
1727
1750
|
value;
|
|
1728
1751
|
constructor(e, n, s) {
|
|
1729
1752
|
this.sourceSpan = e, this.key = n, this.value = s;
|
|
1730
1753
|
}
|
|
1731
|
-
},
|
|
1754
|
+
}, Ne = class {
|
|
1732
1755
|
sourceSpan;
|
|
1733
1756
|
key;
|
|
1734
1757
|
value;
|
|
1735
1758
|
constructor(e, n, s) {
|
|
1736
1759
|
this.sourceSpan = e, this.key = n, this.value = s;
|
|
1737
1760
|
}
|
|
1738
|
-
},
|
|
1761
|
+
}, Wt = class {
|
|
1739
1762
|
visit(e, n) {
|
|
1740
1763
|
e.visit(this, n);
|
|
1741
1764
|
}
|
|
@@ -1799,8 +1822,8 @@ var kt = class extends Se {
|
|
|
1799
1822
|
visitTemplateLiteral(e, n) {
|
|
1800
1823
|
for (let s = 0; s < e.elements.length; s++) {
|
|
1801
1824
|
this.visit(e.elements[s], n);
|
|
1802
|
-
let
|
|
1803
|
-
|
|
1825
|
+
let r = s < e.expressions.length ? e.expressions[s] : null;
|
|
1826
|
+
r !== null && this.visit(r, n);
|
|
1804
1827
|
}
|
|
1805
1828
|
}
|
|
1806
1829
|
visitTemplateLiteralElement(e, n) {}
|
|
@@ -1810,206 +1833,206 @@ var kt = class extends Se {
|
|
|
1810
1833
|
visitParenthesizedExpression(e, n) {
|
|
1811
1834
|
this.visit(e.expression, n);
|
|
1812
1835
|
}
|
|
1836
|
+
visitArrowFunction(e, n) {
|
|
1837
|
+
this.visit(e.body, n);
|
|
1838
|
+
}
|
|
1813
1839
|
visitRegularExpressionLiteral(e, n) {}
|
|
1814
1840
|
visitSpreadElement(e, n) {
|
|
1815
1841
|
this.visit(e.expression, n);
|
|
1816
1842
|
}
|
|
1843
|
+
visitEmptyExpr(e, n) {}
|
|
1817
1844
|
visitAll(e, n) {
|
|
1818
1845
|
for (let s of e) this.visit(s, n);
|
|
1819
1846
|
}
|
|
1820
1847
|
};
|
|
1821
|
-
var
|
|
1848
|
+
var $n;
|
|
1822
1849
|
(function(t) {
|
|
1823
1850
|
t[t.DEFAULT = 0] = "DEFAULT", t[t.LITERAL_ATTR = 1] = "LITERAL_ATTR", t[t.LEGACY_ANIMATION = 2] = "LEGACY_ANIMATION", t[t.TWO_WAY = 3] = "TWO_WAY", t[t.ANIMATION = 4] = "ANIMATION";
|
|
1824
|
-
})(
|
|
1825
|
-
var
|
|
1851
|
+
})($n || ($n = {}));
|
|
1852
|
+
var On;
|
|
1826
1853
|
(function(t) {
|
|
1827
1854
|
t[t.Regular = 0] = "Regular", t[t.LegacyAnimation = 1] = "LegacyAnimation", t[t.TwoWay = 2] = "TwoWay", t[t.Animation = 3] = "Animation";
|
|
1828
|
-
})(
|
|
1829
|
-
var
|
|
1855
|
+
})(On || (On = {}));
|
|
1856
|
+
var M;
|
|
1830
1857
|
(function(t) {
|
|
1831
1858
|
t[t.Property = 0] = "Property", t[t.Attribute = 1] = "Attribute", t[t.Class = 2] = "Class", t[t.Style = 3] = "Style", t[t.LegacyAnimation = 4] = "LegacyAnimation", t[t.TwoWay = 5] = "TwoWay", t[t.Animation = 6] = "Animation";
|
|
1832
|
-
})(
|
|
1833
|
-
var
|
|
1859
|
+
})(M || (M = {}));
|
|
1860
|
+
var Dn;
|
|
1834
1861
|
(function(t) {
|
|
1835
1862
|
t[t.RAW_TEXT = 0] = "RAW_TEXT", t[t.ESCAPABLE_RAW_TEXT = 1] = "ESCAPABLE_RAW_TEXT", t[t.PARSABLE_DATA = 2] = "PARSABLE_DATA";
|
|
1836
|
-
})(
|
|
1837
|
-
var
|
|
1838
|
-
var
|
|
1839
|
-
var
|
|
1840
|
-
var
|
|
1841
|
-
var
|
|
1842
|
-
var
|
|
1843
|
-
var
|
|
1844
|
-
function
|
|
1845
|
-
return t >=
|
|
1863
|
+
})(Dn || (Dn = {}));
|
|
1864
|
+
var we = 0;
|
|
1865
|
+
var vs = 9, $e = 10, qr = 11, jr = 12, zr = 13, ws = 32, Gr = 33, xs = 34, Xr = 35, Zt = 36, Jr = 37, Bn = 38, Ss = 39, X = 40, N = 41, Fn = 42, Es = 43, F = 44, ys = 45, z = 46, ze = 47, J = 58, Ee = 59, Yr = 60, y = 61, Vn = 62, Un = 63, Qr = 48;
|
|
1866
|
+
var Kr = 57, en = 65, Zr = 69;
|
|
1867
|
+
var tn = 90, ie = 91, ut = 92, Q = 93, ei = 94, Ze = 95, Cs = 97;
|
|
1868
|
+
var ti = 101, ni = 102, si = 110, ri = 114, ii = 116, oi = 117, ai = 118;
|
|
1869
|
+
var _s = 122, ke = 123, Hn = 124, ne = 125, ks = 160;
|
|
1870
|
+
var qt = 96;
|
|
1871
|
+
function li(t) {
|
|
1872
|
+
return t >= vs && t <= ws || t == ks;
|
|
1846
1873
|
}
|
|
1847
|
-
function
|
|
1848
|
-
return
|
|
1874
|
+
function G(t) {
|
|
1875
|
+
return Qr <= t && t <= Kr;
|
|
1849
1876
|
}
|
|
1850
|
-
function
|
|
1851
|
-
return t >=
|
|
1877
|
+
function jt(t) {
|
|
1878
|
+
return t >= Cs && t <= _s || t >= en && t <= tn;
|
|
1852
1879
|
}
|
|
1853
|
-
function
|
|
1854
|
-
return t ===
|
|
1880
|
+
function Wn(t) {
|
|
1881
|
+
return t === Ss || t === xs || t === qt;
|
|
1855
1882
|
}
|
|
1856
|
-
var
|
|
1883
|
+
var Ge = class t {
|
|
1857
1884
|
file;
|
|
1858
1885
|
offset;
|
|
1859
1886
|
line;
|
|
1860
1887
|
col;
|
|
1861
|
-
constructor(e, n, s,
|
|
1862
|
-
this.file = e, this.offset = n, this.line = s, this.col =
|
|
1888
|
+
constructor(e, n, s, r) {
|
|
1889
|
+
this.file = e, this.offset = n, this.line = s, this.col = r;
|
|
1863
1890
|
}
|
|
1864
1891
|
toString() {
|
|
1865
1892
|
return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url;
|
|
1866
1893
|
}
|
|
1867
1894
|
moveBy(e) {
|
|
1868
|
-
let n = this.file.content, s = n.length,
|
|
1869
|
-
for (;
|
|
1870
|
-
|
|
1871
|
-
let
|
|
1872
|
-
a =
|
|
1895
|
+
let n = this.file.content, s = n.length, r = this.offset, i = this.line, a = this.col;
|
|
1896
|
+
for (; r > 0 && e < 0;) if (r--, e++, n.charCodeAt(r) == $e) {
|
|
1897
|
+
i--;
|
|
1898
|
+
let h = n.substring(0, r - 1).lastIndexOf(String.fromCharCode($e));
|
|
1899
|
+
a = h > 0 ? r - h : r;
|
|
1873
1900
|
} else a--;
|
|
1874
|
-
for (;
|
|
1875
|
-
let
|
|
1876
|
-
|
|
1901
|
+
for (; r < s && e > 0;) {
|
|
1902
|
+
let p = n.charCodeAt(r);
|
|
1903
|
+
r++, e--, p == $e ? (i++, a = 0) : a++;
|
|
1877
1904
|
}
|
|
1878
|
-
return new t(this.file,
|
|
1905
|
+
return new t(this.file, r, i, a);
|
|
1879
1906
|
}
|
|
1880
1907
|
getContext(e, n) {
|
|
1881
|
-
let s = this.file.content,
|
|
1882
|
-
if (
|
|
1883
|
-
|
|
1884
|
-
let
|
|
1885
|
-
for (; a < e &&
|
|
1886
|
-
` && ++
|
|
1887
|
-
for (a = 0,
|
|
1888
|
-
` && ++
|
|
1908
|
+
let s = this.file.content, r = this.offset;
|
|
1909
|
+
if (r != null) {
|
|
1910
|
+
r > s.length - 1 && (r = s.length - 1);
|
|
1911
|
+
let i = r, a = 0, p = 0;
|
|
1912
|
+
for (; a < e && r > 0 && (r--, a++, !(s[r] == `
|
|
1913
|
+
` && ++p == n)););
|
|
1914
|
+
for (a = 0, p = 0; a < e && i < s.length - 1 && (i++, a++, !(s[i] == `
|
|
1915
|
+
` && ++p == n)););
|
|
1889
1916
|
return {
|
|
1890
|
-
before: s.substring(
|
|
1891
|
-
after: s.substring(this.offset,
|
|
1917
|
+
before: s.substring(r, this.offset),
|
|
1918
|
+
after: s.substring(this.offset, i + 1)
|
|
1892
1919
|
};
|
|
1893
1920
|
}
|
|
1894
1921
|
return null;
|
|
1895
1922
|
}
|
|
1896
|
-
},
|
|
1923
|
+
}, Xe = class {
|
|
1897
1924
|
content;
|
|
1898
1925
|
url;
|
|
1899
1926
|
constructor(e, n) {
|
|
1900
1927
|
this.content = e, this.url = n;
|
|
1901
1928
|
}
|
|
1902
|
-
},
|
|
1929
|
+
}, Je = class {
|
|
1903
1930
|
start;
|
|
1904
1931
|
end;
|
|
1905
1932
|
fullStart;
|
|
1906
1933
|
details;
|
|
1907
|
-
constructor(e, n, s = e,
|
|
1908
|
-
this.start = e, this.end = n, this.fullStart = s, this.details =
|
|
1934
|
+
constructor(e, n, s = e, r = null) {
|
|
1935
|
+
this.start = e, this.end = n, this.fullStart = s, this.details = r;
|
|
1909
1936
|
}
|
|
1910
1937
|
toString() {
|
|
1911
1938
|
return this.start.file.content.substring(this.start.offset, this.end.offset);
|
|
1912
1939
|
}
|
|
1913
|
-
},
|
|
1940
|
+
}, Ye;
|
|
1914
1941
|
(function(t) {
|
|
1915
1942
|
t[t.WARNING = 0] = "WARNING", t[t.ERROR = 1] = "ERROR";
|
|
1916
|
-
})(
|
|
1917
|
-
var
|
|
1943
|
+
})(Ye || (Ye = {}));
|
|
1944
|
+
var Pe = class extends Error {
|
|
1918
1945
|
span;
|
|
1919
1946
|
msg;
|
|
1920
1947
|
level;
|
|
1921
1948
|
relatedError;
|
|
1922
|
-
constructor(e, n, s =
|
|
1923
|
-
super(n), this.span = e, this.msg = n, this.level = s, this.relatedError =
|
|
1949
|
+
constructor(e, n, s = Ye.ERROR, r) {
|
|
1950
|
+
super(n), this.span = e, this.msg = n, this.level = s, this.relatedError = r, Object.setPrototypeOf(this, new.target.prototype);
|
|
1924
1951
|
}
|
|
1925
1952
|
contextualMessage() {
|
|
1926
1953
|
let e = this.span.start.getContext(100, 3);
|
|
1927
|
-
return e ? `${this.msg} ("${e.before}[${
|
|
1954
|
+
return e ? `${this.msg} ("${e.before}[${Ye[this.level]} ->]${e.after}")` : this.msg;
|
|
1928
1955
|
}
|
|
1929
1956
|
toString() {
|
|
1930
1957
|
let e = this.span.details ? `, ${this.span.details}` : "";
|
|
1931
1958
|
return `${this.contextualMessage()}: ${this.span.start}${e}`;
|
|
1932
1959
|
}
|
|
1933
1960
|
};
|
|
1934
|
-
var
|
|
1961
|
+
var qn;
|
|
1935
1962
|
(function(t) {
|
|
1936
1963
|
t[t.Inline = 0] = "Inline", t[t.SideEffect = 1] = "SideEffect", t[t.Omit = 2] = "Omit";
|
|
1937
|
-
})(
|
|
1938
|
-
var
|
|
1964
|
+
})(qn || (qn = {}));
|
|
1965
|
+
var jn;
|
|
1939
1966
|
(function(t) {
|
|
1940
1967
|
t[t.Global = 0] = "Global", t[t.Local = 1] = "Local";
|
|
1941
|
-
})(
|
|
1942
|
-
var
|
|
1968
|
+
})(jn || (jn = {}));
|
|
1969
|
+
var zn;
|
|
1943
1970
|
(function(t) {
|
|
1944
1971
|
t[t.Directive = 0] = "Directive", t[t.Pipe = 1] = "Pipe", t[t.NgModule = 2] = "NgModule";
|
|
1945
|
-
})(
|
|
1946
|
-
var
|
|
1947
|
-
new RegExp("(:nth-[-\\w]+)" +
|
|
1948
|
-
new RegExp(
|
|
1949
|
-
var
|
|
1950
|
-
new RegExp(`${
|
|
1951
|
-
var
|
|
1952
|
-
new RegExp(`${
|
|
1953
|
-
var
|
|
1954
|
-
new RegExp(
|
|
1955
|
-
new RegExp(`(\\s*(?:${
|
|
1956
|
-
var
|
|
1957
|
-
new RegExp(
|
|
1958
|
-
new RegExp(
|
|
1959
|
-
new RegExp(
|
|
1960
|
-
var
|
|
1972
|
+
})(zn || (zn = {}));
|
|
1973
|
+
var ci = "(:(where|is)\\()?", Ts = "-shadowcsshost", ui = "-shadowcsscontext", zt = "[^)(]*", nn = `(?:\\((${`(?:\\(${`(?:\\(${zt}\\)|${zt})+?`}\\)|${zt})+?`})\\))`;
|
|
1974
|
+
new RegExp("(:nth-[-\\w]+)" + nn, "g");
|
|
1975
|
+
new RegExp(Ts + nn + "?([^,{]*)", "gim");
|
|
1976
|
+
var fi = ui + nn + "?([^{]*)";
|
|
1977
|
+
new RegExp(`${ci}(${fi})`, "gim");
|
|
1978
|
+
var di = Ts + "-no-combinator";
|
|
1979
|
+
new RegExp(`${di}(?![^(]*\\))`, "g");
|
|
1980
|
+
var bs = "%COMMENT%";
|
|
1981
|
+
new RegExp(bs, "g");
|
|
1982
|
+
new RegExp(`(\\s*(?:${bs}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`, "g");
|
|
1983
|
+
var mi = "%COMMA_IN_PLACEHOLDER%", gi = "%SEMI_IN_PLACEHOLDER%", vi = "%COLON_IN_PLACEHOLDER%";
|
|
1984
|
+
new RegExp(mi, "g");
|
|
1985
|
+
new RegExp(gi, "g");
|
|
1986
|
+
new RegExp(vi, "g");
|
|
1987
|
+
var l;
|
|
1961
1988
|
(function(t) {
|
|
1962
1989
|
t[t.ListEnd = 0] = "ListEnd", t[t.Statement = 1] = "Statement", t[t.Variable = 2] = "Variable", t[t.ElementStart = 3] = "ElementStart", t[t.Element = 4] = "Element", t[t.Template = 5] = "Template", t[t.ElementEnd = 6] = "ElementEnd", t[t.ContainerStart = 7] = "ContainerStart", t[t.Container = 8] = "Container", t[t.ContainerEnd = 9] = "ContainerEnd", t[t.DisableBindings = 10] = "DisableBindings", t[t.ConditionalCreate = 11] = "ConditionalCreate", t[t.ConditionalBranchCreate = 12] = "ConditionalBranchCreate", t[t.Conditional = 13] = "Conditional", t[t.EnableBindings = 14] = "EnableBindings", t[t.Text = 15] = "Text", t[t.Listener = 16] = "Listener", t[t.InterpolateText = 17] = "InterpolateText", t[t.Binding = 18] = "Binding", t[t.Property = 19] = "Property", t[t.StyleProp = 20] = "StyleProp", t[t.ClassProp = 21] = "ClassProp", t[t.StyleMap = 22] = "StyleMap", t[t.ClassMap = 23] = "ClassMap", t[t.Advance = 24] = "Advance", t[t.Pipe = 25] = "Pipe", t[t.Attribute = 26] = "Attribute", t[t.ExtractedAttribute = 27] = "ExtractedAttribute", t[t.Defer = 28] = "Defer", t[t.DeferOn = 29] = "DeferOn", t[t.DeferWhen = 30] = "DeferWhen", t[t.I18nMessage = 31] = "I18nMessage", t[t.DomProperty = 32] = "DomProperty", t[t.Namespace = 33] = "Namespace", t[t.ProjectionDef = 34] = "ProjectionDef", t[t.Projection = 35] = "Projection", t[t.RepeaterCreate = 36] = "RepeaterCreate", t[t.Repeater = 37] = "Repeater", t[t.TwoWayProperty = 38] = "TwoWayProperty", t[t.TwoWayListener = 39] = "TwoWayListener", t[t.DeclareLet = 40] = "DeclareLet", t[t.StoreLet = 41] = "StoreLet", t[t.I18nStart = 42] = "I18nStart", t[t.I18n = 43] = "I18n", t[t.I18nEnd = 44] = "I18nEnd", t[t.I18nExpression = 45] = "I18nExpression", t[t.I18nApply = 46] = "I18nApply", t[t.IcuStart = 47] = "IcuStart", t[t.IcuEnd = 48] = "IcuEnd", t[t.IcuPlaceholder = 49] = "IcuPlaceholder", t[t.I18nContext = 50] = "I18nContext", t[t.I18nAttributes = 51] = "I18nAttributes", t[t.SourceLocation = 52] = "SourceLocation", t[t.Animation = 53] = "Animation", t[t.AnimationString = 54] = "AnimationString", t[t.AnimationBinding = 55] = "AnimationBinding", t[t.AnimationListener = 56] = "AnimationListener", t[t.Control = 57] = "Control", t[t.ControlCreate = 58] = "ControlCreate";
|
|
1963
|
-
})(
|
|
1964
|
-
var
|
|
1990
|
+
})(l || (l = {}));
|
|
1991
|
+
var Z;
|
|
1965
1992
|
(function(t) {
|
|
1966
|
-
t[t.LexicalRead = 0] = "LexicalRead", t[t.Context = 1] = "Context", t[t.TrackContext = 2] = "TrackContext", t[t.ReadVariable = 3] = "ReadVariable", t[t.NextContext = 4] = "NextContext", t[t.Reference = 5] = "Reference", t[t.StoreLet = 6] = "StoreLet", t[t.ContextLetReference = 7] = "ContextLetReference", t[t.GetCurrentView = 8] = "GetCurrentView", t[t.RestoreView = 9] = "RestoreView", t[t.ResetView = 10] = "ResetView", t[t.PureFunctionExpr = 11] = "PureFunctionExpr", t[t.PureFunctionParameterExpr = 12] = "PureFunctionParameterExpr", t[t.PipeBinding = 13] = "PipeBinding", t[t.PipeBindingVariadic = 14] = "PipeBindingVariadic", t[t.SafePropertyRead = 15] = "SafePropertyRead", t[t.SafeKeyedRead = 16] = "SafeKeyedRead", t[t.SafeInvokeFunction = 17] = "SafeInvokeFunction", t[t.SafeTernaryExpr = 18] = "SafeTernaryExpr", t[t.EmptyExpr = 19] = "EmptyExpr", t[t.AssignTemporaryExpr = 20] = "AssignTemporaryExpr", t[t.ReadTemporaryExpr = 21] = "ReadTemporaryExpr", t[t.SlotLiteralExpr = 22] = "SlotLiteralExpr", t[t.ConditionalCase = 23] = "ConditionalCase", t[t.ConstCollected = 24] = "ConstCollected", t[t.TwoWayBindingSet = 25] = "TwoWayBindingSet";
|
|
1967
|
-
})(
|
|
1968
|
-
var
|
|
1993
|
+
t[t.LexicalRead = 0] = "LexicalRead", t[t.Context = 1] = "Context", t[t.TrackContext = 2] = "TrackContext", t[t.ReadVariable = 3] = "ReadVariable", t[t.NextContext = 4] = "NextContext", t[t.Reference = 5] = "Reference", t[t.StoreLet = 6] = "StoreLet", t[t.ContextLetReference = 7] = "ContextLetReference", t[t.GetCurrentView = 8] = "GetCurrentView", t[t.RestoreView = 9] = "RestoreView", t[t.ResetView = 10] = "ResetView", t[t.PureFunctionExpr = 11] = "PureFunctionExpr", t[t.PureFunctionParameterExpr = 12] = "PureFunctionParameterExpr", t[t.PipeBinding = 13] = "PipeBinding", t[t.PipeBindingVariadic = 14] = "PipeBindingVariadic", t[t.SafePropertyRead = 15] = "SafePropertyRead", t[t.SafeKeyedRead = 16] = "SafeKeyedRead", t[t.SafeInvokeFunction = 17] = "SafeInvokeFunction", t[t.SafeTernaryExpr = 18] = "SafeTernaryExpr", t[t.EmptyExpr = 19] = "EmptyExpr", t[t.AssignTemporaryExpr = 20] = "AssignTemporaryExpr", t[t.ReadTemporaryExpr = 21] = "ReadTemporaryExpr", t[t.SlotLiteralExpr = 22] = "SlotLiteralExpr", t[t.ConditionalCase = 23] = "ConditionalCase", t[t.ConstCollected = 24] = "ConstCollected", t[t.TwoWayBindingSet = 25] = "TwoWayBindingSet", t[t.ArrowFunction = 26] = "ArrowFunction";
|
|
1994
|
+
})(Z || (Z = {}));
|
|
1995
|
+
var Gn;
|
|
1969
1996
|
(function(t) {
|
|
1970
1997
|
t[t.None = 0] = "None", t[t.AlwaysInline = 1] = "AlwaysInline";
|
|
1971
|
-
})(
|
|
1972
|
-
var
|
|
1998
|
+
})(Gn || (Gn = {}));
|
|
1999
|
+
var Xn;
|
|
1973
2000
|
(function(t) {
|
|
1974
2001
|
t[t.Context = 0] = "Context", t[t.Identifier = 1] = "Identifier", t[t.SavedView = 2] = "SavedView", t[t.Alias = 3] = "Alias";
|
|
1975
|
-
})(
|
|
1976
|
-
var
|
|
1977
|
-
(function(t) {
|
|
1978
|
-
t[t.Normal = 0] = "Normal", t[t.TemplateDefinitionBuilder = 1] = "TemplateDefinitionBuilder";
|
|
1979
|
-
})(Fn || (Fn = {}));
|
|
1980
|
-
var M;
|
|
2002
|
+
})(Xn || (Xn = {}));
|
|
2003
|
+
var R;
|
|
1981
2004
|
(function(t) {
|
|
1982
2005
|
t[t.Attribute = 0] = "Attribute", t[t.ClassName = 1] = "ClassName", t[t.StyleProperty = 2] = "StyleProperty", t[t.Property = 3] = "Property", t[t.Template = 4] = "Template", t[t.I18n = 5] = "I18n", t[t.LegacyAnimation = 6] = "LegacyAnimation", t[t.TwoWayProperty = 7] = "TwoWayProperty", t[t.Animation = 8] = "Animation";
|
|
1983
|
-
})(
|
|
1984
|
-
var
|
|
2006
|
+
})(R || (R = {}));
|
|
2007
|
+
var Jn;
|
|
1985
2008
|
(function(t) {
|
|
1986
2009
|
t[t.Creation = 0] = "Creation", t[t.Postproccessing = 1] = "Postproccessing";
|
|
1987
|
-
})(
|
|
1988
|
-
var
|
|
2010
|
+
})(Jn || (Jn = {}));
|
|
2011
|
+
var Yn;
|
|
1989
2012
|
(function(t) {
|
|
1990
2013
|
t[t.I18nText = 0] = "I18nText", t[t.I18nAttribute = 1] = "I18nAttribute";
|
|
1991
|
-
})(
|
|
1992
|
-
var
|
|
2014
|
+
})(Yn || (Yn = {}));
|
|
2015
|
+
var Qn;
|
|
1993
2016
|
(function(t) {
|
|
1994
2017
|
t[t.None = 0] = "None", t[t.ElementTag = 1] = "ElementTag", t[t.TemplateTag = 2] = "TemplateTag", t[t.OpenTag = 4] = "OpenTag", t[t.CloseTag = 8] = "CloseTag", t[t.ExpressionIndex = 16] = "ExpressionIndex";
|
|
1995
|
-
})(
|
|
1996
|
-
var
|
|
2018
|
+
})(Qn || (Qn = {}));
|
|
2019
|
+
var Kn;
|
|
1997
2020
|
(function(t) {
|
|
1998
2021
|
t[t.HTML = 0] = "HTML", t[t.SVG = 1] = "SVG", t[t.Math = 2] = "Math";
|
|
1999
|
-
})(
|
|
2000
|
-
var
|
|
2022
|
+
})(Kn || (Kn = {}));
|
|
2023
|
+
var $;
|
|
2001
2024
|
(function(t) {
|
|
2002
2025
|
t[t.Idle = 0] = "Idle", t[t.Immediate = 1] = "Immediate", t[t.Timer = 2] = "Timer", t[t.Hover = 3] = "Hover", t[t.Interaction = 4] = "Interaction", t[t.Viewport = 5] = "Viewport", t[t.Never = 6] = "Never";
|
|
2003
|
-
})(
|
|
2004
|
-
var
|
|
2026
|
+
})($ || ($ = {}));
|
|
2027
|
+
var Zn;
|
|
2005
2028
|
(function(t) {
|
|
2006
2029
|
t[t.RootI18n = 0] = "RootI18n", t[t.Icu = 1] = "Icu", t[t.Attr = 2] = "Attr";
|
|
2007
|
-
})(
|
|
2008
|
-
var
|
|
2030
|
+
})(Zn || (Zn = {}));
|
|
2031
|
+
var es;
|
|
2009
2032
|
(function(t) {
|
|
2010
2033
|
t[t.NgTemplate = 0] = "NgTemplate", t[t.Structural = 1] = "Structural", t[t.Block = 2] = "Block";
|
|
2011
|
-
})(
|
|
2012
|
-
var
|
|
2034
|
+
})(es || (es = {}));
|
|
2035
|
+
var pe = class {
|
|
2013
2036
|
strings;
|
|
2014
2037
|
expressions;
|
|
2015
2038
|
i18nPlaceholders;
|
|
@@ -2017,123 +2040,124 @@ var je = class {
|
|
|
2017
2040
|
if (this.strings = e, this.expressions = n, this.i18nPlaceholders = s, s.length !== 0 && s.length !== n.length) throw new Error(`Expected ${n.length} placeholders to match interpolation expression count, but got ${s.length}`);
|
|
2018
2041
|
}
|
|
2019
2042
|
};
|
|
2020
|
-
var
|
|
2043
|
+
var W;
|
|
2021
2044
|
(function(t) {
|
|
2022
|
-
t[t.None = 0] = "None", t[t.InChildOperation = 1] = "InChildOperation";
|
|
2023
|
-
})(
|
|
2045
|
+
t[t.None = 0] = "None", t[t.InChildOperation = 1] = "InChildOperation", t[t.InArrowFunctionOperation = 2] = "InArrowFunctionOperation";
|
|
2046
|
+
})(W || (W = {}));
|
|
2024
2047
|
new Set([
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2048
|
+
l.Element,
|
|
2049
|
+
l.ElementStart,
|
|
2050
|
+
l.Container,
|
|
2051
|
+
l.ContainerStart,
|
|
2052
|
+
l.Template,
|
|
2053
|
+
l.RepeaterCreate,
|
|
2054
|
+
l.ConditionalCreate,
|
|
2055
|
+
l.ConditionalBranchCreate
|
|
2033
2056
|
]);
|
|
2034
|
-
var
|
|
2057
|
+
var os;
|
|
2035
2058
|
(function(t) {
|
|
2036
2059
|
t[t.Tmpl = 0] = "Tmpl", t[t.Host = 1] = "Host", t[t.Both = 2] = "Both";
|
|
2037
|
-
})(
|
|
2038
|
-
var
|
|
2060
|
+
})(os || (os = {}));
|
|
2061
|
+
var as;
|
|
2039
2062
|
(function(t) {
|
|
2040
2063
|
t[t.Full = 0] = "Full", t[t.DomOnly = 1] = "DomOnly";
|
|
2041
|
-
})(
|
|
2064
|
+
})(as || (as = {}));
|
|
2042
2065
|
new Map([
|
|
2043
|
-
[
|
|
2044
|
-
[
|
|
2045
|
-
[
|
|
2046
|
-
[
|
|
2047
|
-
[
|
|
2048
|
-
[
|
|
2049
|
-
[
|
|
2050
|
-
[
|
|
2051
|
-
[
|
|
2052
|
-
[
|
|
2053
|
-
[
|
|
2054
|
-
[
|
|
2055
|
-
[
|
|
2056
|
-
[
|
|
2057
|
-
[
|
|
2058
|
-
[
|
|
2059
|
-
[
|
|
2060
|
-
[
|
|
2061
|
-
[
|
|
2062
|
-
[
|
|
2063
|
-
[
|
|
2064
|
-
[
|
|
2065
|
-
[
|
|
2066
|
-
[
|
|
2067
|
-
[
|
|
2068
|
-
[
|
|
2069
|
-
[
|
|
2070
|
-
[
|
|
2071
|
-
[
|
|
2072
|
-
[
|
|
2073
|
-
[
|
|
2074
|
-
[
|
|
2075
|
-
[
|
|
2076
|
-
[
|
|
2077
|
-
[
|
|
2066
|
+
[c.ariaProperty, c.ariaProperty],
|
|
2067
|
+
[c.attribute, c.attribute],
|
|
2068
|
+
[c.classProp, c.classProp],
|
|
2069
|
+
[c.element, c.element],
|
|
2070
|
+
[c.elementContainer, c.elementContainer],
|
|
2071
|
+
[c.elementContainerEnd, c.elementContainerEnd],
|
|
2072
|
+
[c.elementContainerStart, c.elementContainerStart],
|
|
2073
|
+
[c.elementEnd, c.elementEnd],
|
|
2074
|
+
[c.elementStart, c.elementStart],
|
|
2075
|
+
[c.domProperty, c.domProperty],
|
|
2076
|
+
[c.i18nExp, c.i18nExp],
|
|
2077
|
+
[c.listener, c.listener],
|
|
2078
|
+
[c.listener, c.listener],
|
|
2079
|
+
[c.property, c.property],
|
|
2080
|
+
[c.styleProp, c.styleProp],
|
|
2081
|
+
[c.syntheticHostListener, c.syntheticHostListener],
|
|
2082
|
+
[c.syntheticHostProperty, c.syntheticHostProperty],
|
|
2083
|
+
[c.templateCreate, c.templateCreate],
|
|
2084
|
+
[c.twoWayProperty, c.twoWayProperty],
|
|
2085
|
+
[c.twoWayListener, c.twoWayListener],
|
|
2086
|
+
[c.declareLet, c.declareLet],
|
|
2087
|
+
[c.conditionalCreate, c.conditionalBranchCreate],
|
|
2088
|
+
[c.conditionalBranchCreate, c.conditionalBranchCreate],
|
|
2089
|
+
[c.domElement, c.domElement],
|
|
2090
|
+
[c.domElementStart, c.domElementStart],
|
|
2091
|
+
[c.domElementEnd, c.domElementEnd],
|
|
2092
|
+
[c.domElementContainer, c.domElementContainer],
|
|
2093
|
+
[c.domElementContainerStart, c.domElementContainerStart],
|
|
2094
|
+
[c.domElementContainerEnd, c.domElementContainerEnd],
|
|
2095
|
+
[c.domListener, c.domListener],
|
|
2096
|
+
[c.domTemplate, c.domTemplate],
|
|
2097
|
+
[c.animationEnter, c.animationEnter],
|
|
2098
|
+
[c.animationLeave, c.animationLeave],
|
|
2099
|
+
[c.animationEnterListener, c.animationEnterListener],
|
|
2100
|
+
[c.animationLeaveListener, c.animationLeaveListener]
|
|
2078
2101
|
]);
|
|
2079
2102
|
new Map([
|
|
2080
|
-
["&&",
|
|
2081
|
-
[">",
|
|
2082
|
-
[">=",
|
|
2083
|
-
["|",
|
|
2084
|
-
["&",
|
|
2085
|
-
["/",
|
|
2086
|
-
["=",
|
|
2087
|
-
["==",
|
|
2088
|
-
["===",
|
|
2089
|
-
["<",
|
|
2090
|
-
["<=",
|
|
2091
|
-
["-",
|
|
2092
|
-
["%",
|
|
2093
|
-
["**",
|
|
2094
|
-
["*",
|
|
2095
|
-
["!=",
|
|
2096
|
-
["!==",
|
|
2097
|
-
["??",
|
|
2098
|
-
["||",
|
|
2099
|
-
["+",
|
|
2100
|
-
["in",
|
|
2101
|
-
["
|
|
2102
|
-
["
|
|
2103
|
-
["
|
|
2104
|
-
["
|
|
2105
|
-
["
|
|
2106
|
-
["
|
|
2107
|
-
["
|
|
2108
|
-
["
|
|
2109
|
-
["
|
|
2103
|
+
["&&", u.And],
|
|
2104
|
+
[">", u.Bigger],
|
|
2105
|
+
[">=", u.BiggerEquals],
|
|
2106
|
+
["|", u.BitwiseOr],
|
|
2107
|
+
["&", u.BitwiseAnd],
|
|
2108
|
+
["/", u.Divide],
|
|
2109
|
+
["=", u.Assign],
|
|
2110
|
+
["==", u.Equals],
|
|
2111
|
+
["===", u.Identical],
|
|
2112
|
+
["<", u.Lower],
|
|
2113
|
+
["<=", u.LowerEquals],
|
|
2114
|
+
["-", u.Minus],
|
|
2115
|
+
["%", u.Modulo],
|
|
2116
|
+
["**", u.Exponentiation],
|
|
2117
|
+
["*", u.Multiply],
|
|
2118
|
+
["!=", u.NotEquals],
|
|
2119
|
+
["!==", u.NotIdentical],
|
|
2120
|
+
["??", u.NullishCoalesce],
|
|
2121
|
+
["||", u.Or],
|
|
2122
|
+
["+", u.Plus],
|
|
2123
|
+
["in", u.In],
|
|
2124
|
+
["instanceof", u.InstanceOf],
|
|
2125
|
+
["+=", u.AdditionAssignment],
|
|
2126
|
+
["-=", u.SubtractionAssignment],
|
|
2127
|
+
["*=", u.MultiplicationAssignment],
|
|
2128
|
+
["/=", u.DivisionAssignment],
|
|
2129
|
+
["%=", u.RemainderAssignment],
|
|
2130
|
+
["**=", u.ExponentiationAssignment],
|
|
2131
|
+
["&&=", u.AndAssignment],
|
|
2132
|
+
["||=", u.OrAssignment],
|
|
2133
|
+
["??=", u.NullishCoalesceAssignment]
|
|
2110
2134
|
]);
|
|
2111
2135
|
Object.freeze([]);
|
|
2112
2136
|
new Map([
|
|
2113
|
-
[
|
|
2114
|
-
[
|
|
2115
|
-
[
|
|
2137
|
+
[l.ElementEnd, [l.ElementStart, l.Element]],
|
|
2138
|
+
[l.ContainerEnd, [l.ContainerStart, l.Container]],
|
|
2139
|
+
[l.I18nEnd, [l.I18nStart, l.I18n]]
|
|
2116
2140
|
]);
|
|
2117
|
-
new Set([
|
|
2118
|
-
var
|
|
2119
|
-
|
|
2120
|
-
var
|
|
2141
|
+
new Set([l.Pipe]);
|
|
2142
|
+
var yi = {};
|
|
2143
|
+
yi.ngsp = "";
|
|
2144
|
+
var ls;
|
|
2121
2145
|
(function(t) {
|
|
2122
2146
|
t.HEX = "hexadecimal", t.DEC = "decimal";
|
|
2123
|
-
})(
|
|
2124
|
-
var
|
|
2147
|
+
})(ls || (ls = {}));
|
|
2148
|
+
var Is = ` \f
|
|
2125
2149
|
\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`;
|
|
2126
|
-
new RegExp(`[^${
|
|
2127
|
-
new RegExp(`[${
|
|
2128
|
-
var
|
|
2150
|
+
new RegExp(`[^${Is}]`);
|
|
2151
|
+
new RegExp(`[${Is}]{2,}`, "g");
|
|
2152
|
+
var f;
|
|
2129
2153
|
(function(t) {
|
|
2130
2154
|
t[t.Character = 0] = "Character", t[t.Identifier = 1] = "Identifier", t[t.PrivateIdentifier = 2] = "PrivateIdentifier", t[t.Keyword = 3] = "Keyword", t[t.String = 4] = "String", t[t.Operator = 5] = "Operator", t[t.Number = 6] = "Number", t[t.RegExpBody = 7] = "RegExpBody", t[t.RegExpFlags = 8] = "RegExpFlags", t[t.Error = 9] = "Error";
|
|
2131
|
-
})(
|
|
2132
|
-
var
|
|
2155
|
+
})(f || (f = {}));
|
|
2156
|
+
var H;
|
|
2133
2157
|
(function(t) {
|
|
2134
2158
|
t[t.Plain = 0] = "Plain", t[t.TemplateLiteralPart = 1] = "TemplateLiteralPart", t[t.TemplateLiteralEnd = 2] = "TemplateLiteralEnd";
|
|
2135
|
-
})(
|
|
2136
|
-
var
|
|
2159
|
+
})(H || (H = {}));
|
|
2160
|
+
var _i = [
|
|
2137
2161
|
"var",
|
|
2138
2162
|
"let",
|
|
2139
2163
|
"as",
|
|
@@ -2146,141 +2170,145 @@ var lr = [
|
|
|
2146
2170
|
"this",
|
|
2147
2171
|
"typeof",
|
|
2148
2172
|
"void",
|
|
2149
|
-
"in"
|
|
2150
|
-
|
|
2173
|
+
"in",
|
|
2174
|
+
"instanceof"
|
|
2175
|
+
], Le = class {
|
|
2151
2176
|
tokenize(e) {
|
|
2152
|
-
return new
|
|
2177
|
+
return new Jt(e).scan();
|
|
2153
2178
|
}
|
|
2154
|
-
},
|
|
2179
|
+
}, b = class {
|
|
2155
2180
|
index;
|
|
2156
2181
|
end;
|
|
2157
2182
|
type;
|
|
2158
2183
|
numValue;
|
|
2159
2184
|
strValue;
|
|
2160
|
-
constructor(e, n, s,
|
|
2161
|
-
this.index = e, this.end = n, this.type = s, this.numValue =
|
|
2185
|
+
constructor(e, n, s, r, i) {
|
|
2186
|
+
this.index = e, this.end = n, this.type = s, this.numValue = r, this.strValue = i;
|
|
2162
2187
|
}
|
|
2163
2188
|
isCharacter(e) {
|
|
2164
|
-
return this.type ===
|
|
2189
|
+
return this.type === f.Character && this.numValue === e;
|
|
2165
2190
|
}
|
|
2166
2191
|
isNumber() {
|
|
2167
|
-
return this.type ===
|
|
2192
|
+
return this.type === f.Number;
|
|
2168
2193
|
}
|
|
2169
2194
|
isString() {
|
|
2170
|
-
return this.type ===
|
|
2195
|
+
return this.type === f.String;
|
|
2171
2196
|
}
|
|
2172
2197
|
isOperator(e) {
|
|
2173
|
-
return this.type ===
|
|
2198
|
+
return this.type === f.Operator && this.strValue === e;
|
|
2174
2199
|
}
|
|
2175
2200
|
isIdentifier() {
|
|
2176
|
-
return this.type ===
|
|
2201
|
+
return this.type === f.Identifier;
|
|
2177
2202
|
}
|
|
2178
2203
|
isPrivateIdentifier() {
|
|
2179
|
-
return this.type ===
|
|
2204
|
+
return this.type === f.PrivateIdentifier;
|
|
2180
2205
|
}
|
|
2181
2206
|
isKeyword() {
|
|
2182
|
-
return this.type ===
|
|
2207
|
+
return this.type === f.Keyword;
|
|
2183
2208
|
}
|
|
2184
2209
|
isKeywordLet() {
|
|
2185
|
-
return this.type ===
|
|
2210
|
+
return this.type === f.Keyword && this.strValue === "let";
|
|
2186
2211
|
}
|
|
2187
2212
|
isKeywordAs() {
|
|
2188
|
-
return this.type ===
|
|
2213
|
+
return this.type === f.Keyword && this.strValue === "as";
|
|
2189
2214
|
}
|
|
2190
2215
|
isKeywordNull() {
|
|
2191
|
-
return this.type ===
|
|
2216
|
+
return this.type === f.Keyword && this.strValue === "null";
|
|
2192
2217
|
}
|
|
2193
2218
|
isKeywordUndefined() {
|
|
2194
|
-
return this.type ===
|
|
2219
|
+
return this.type === f.Keyword && this.strValue === "undefined";
|
|
2195
2220
|
}
|
|
2196
2221
|
isKeywordTrue() {
|
|
2197
|
-
return this.type ===
|
|
2222
|
+
return this.type === f.Keyword && this.strValue === "true";
|
|
2198
2223
|
}
|
|
2199
2224
|
isKeywordFalse() {
|
|
2200
|
-
return this.type ===
|
|
2225
|
+
return this.type === f.Keyword && this.strValue === "false";
|
|
2201
2226
|
}
|
|
2202
2227
|
isKeywordThis() {
|
|
2203
|
-
return this.type ===
|
|
2228
|
+
return this.type === f.Keyword && this.strValue === "this";
|
|
2204
2229
|
}
|
|
2205
2230
|
isKeywordTypeof() {
|
|
2206
|
-
return this.type ===
|
|
2231
|
+
return this.type === f.Keyword && this.strValue === "typeof";
|
|
2207
2232
|
}
|
|
2208
2233
|
isKeywordVoid() {
|
|
2209
|
-
return this.type ===
|
|
2234
|
+
return this.type === f.Keyword && this.strValue === "void";
|
|
2210
2235
|
}
|
|
2211
2236
|
isKeywordIn() {
|
|
2212
|
-
return this.type ===
|
|
2237
|
+
return this.type === f.Keyword && this.strValue === "in";
|
|
2238
|
+
}
|
|
2239
|
+
isKeywordInstanceOf() {
|
|
2240
|
+
return this.type === f.Keyword && this.strValue === "instanceof";
|
|
2213
2241
|
}
|
|
2214
2242
|
isError() {
|
|
2215
|
-
return this.type ===
|
|
2243
|
+
return this.type === f.Error;
|
|
2216
2244
|
}
|
|
2217
2245
|
isRegExpBody() {
|
|
2218
|
-
return this.type ===
|
|
2246
|
+
return this.type === f.RegExpBody;
|
|
2219
2247
|
}
|
|
2220
2248
|
isRegExpFlags() {
|
|
2221
|
-
return this.type ===
|
|
2249
|
+
return this.type === f.RegExpFlags;
|
|
2222
2250
|
}
|
|
2223
2251
|
toNumber() {
|
|
2224
|
-
return this.type ===
|
|
2252
|
+
return this.type === f.Number ? this.numValue : -1;
|
|
2225
2253
|
}
|
|
2226
2254
|
isTemplateLiteralPart() {
|
|
2227
|
-
return this.isString() && this.kind ===
|
|
2255
|
+
return this.isString() && this.kind === H.TemplateLiteralPart;
|
|
2228
2256
|
}
|
|
2229
2257
|
isTemplateLiteralEnd() {
|
|
2230
|
-
return this.isString() && this.kind ===
|
|
2258
|
+
return this.isString() && this.kind === H.TemplateLiteralEnd;
|
|
2231
2259
|
}
|
|
2232
2260
|
isTemplateLiteralInterpolationStart() {
|
|
2233
2261
|
return this.isOperator("${");
|
|
2234
2262
|
}
|
|
2235
2263
|
toString() {
|
|
2236
2264
|
switch (this.type) {
|
|
2237
|
-
case
|
|
2238
|
-
case
|
|
2239
|
-
case
|
|
2240
|
-
case
|
|
2241
|
-
case
|
|
2242
|
-
case
|
|
2243
|
-
case
|
|
2244
|
-
case
|
|
2245
|
-
case
|
|
2246
|
-
case
|
|
2265
|
+
case f.Character:
|
|
2266
|
+
case f.Identifier:
|
|
2267
|
+
case f.Keyword:
|
|
2268
|
+
case f.Operator:
|
|
2269
|
+
case f.PrivateIdentifier:
|
|
2270
|
+
case f.String:
|
|
2271
|
+
case f.Error:
|
|
2272
|
+
case f.RegExpBody:
|
|
2273
|
+
case f.RegExpFlags: return this.strValue;
|
|
2274
|
+
case f.Number: return this.numValue.toString();
|
|
2247
2275
|
default: return null;
|
|
2248
2276
|
}
|
|
2249
2277
|
}
|
|
2250
|
-
},
|
|
2278
|
+
}, Te = class extends b {
|
|
2251
2279
|
kind;
|
|
2252
|
-
constructor(e, n, s,
|
|
2253
|
-
super(e, n,
|
|
2280
|
+
constructor(e, n, s, r) {
|
|
2281
|
+
super(e, n, f.String, 0, s), this.kind = r;
|
|
2254
2282
|
}
|
|
2255
2283
|
};
|
|
2256
|
-
function
|
|
2257
|
-
return new
|
|
2284
|
+
function xe(t, e, n) {
|
|
2285
|
+
return new b(t, e, f.Character, n, String.fromCharCode(n));
|
|
2258
2286
|
}
|
|
2259
|
-
function
|
|
2260
|
-
return new
|
|
2287
|
+
function ki(t, e, n) {
|
|
2288
|
+
return new b(t, e, f.Identifier, 0, n);
|
|
2261
2289
|
}
|
|
2262
|
-
function
|
|
2263
|
-
return new
|
|
2290
|
+
function Ti(t, e, n) {
|
|
2291
|
+
return new b(t, e, f.PrivateIdentifier, 0, n);
|
|
2264
2292
|
}
|
|
2265
|
-
function
|
|
2266
|
-
return new
|
|
2293
|
+
function bi(t, e, n) {
|
|
2294
|
+
return new b(t, e, f.Keyword, 0, n);
|
|
2267
2295
|
}
|
|
2268
|
-
function
|
|
2269
|
-
return new
|
|
2296
|
+
function B(t, e, n) {
|
|
2297
|
+
return new b(t, e, f.Operator, 0, n);
|
|
2270
2298
|
}
|
|
2271
|
-
function
|
|
2272
|
-
return new
|
|
2299
|
+
function Ai(t, e, n) {
|
|
2300
|
+
return new b(t, e, f.Number, n, "");
|
|
2273
2301
|
}
|
|
2274
|
-
function
|
|
2275
|
-
return new
|
|
2302
|
+
function Ii(t, e, n) {
|
|
2303
|
+
return new b(t, e, f.Error, 0, n);
|
|
2276
2304
|
}
|
|
2277
|
-
function
|
|
2278
|
-
return new
|
|
2305
|
+
function Ni(t, e, n) {
|
|
2306
|
+
return new b(t, e, f.RegExpBody, 0, n);
|
|
2279
2307
|
}
|
|
2280
|
-
function
|
|
2281
|
-
return new
|
|
2308
|
+
function Pi(t, e, n) {
|
|
2309
|
+
return new b(t, e, f.RegExpFlags, 0, n);
|
|
2282
2310
|
}
|
|
2283
|
-
var
|
|
2311
|
+
var Se = new b(-1, -1, f.Character, 0, ""), Jt = class {
|
|
2284
2312
|
input;
|
|
2285
2313
|
tokens = [];
|
|
2286
2314
|
length;
|
|
@@ -2296,224 +2324,231 @@ var Ae = new A(-1, -1, h.Character, 0, ""), Ft = class {
|
|
|
2296
2324
|
return this.tokens;
|
|
2297
2325
|
}
|
|
2298
2326
|
advance() {
|
|
2299
|
-
this.peek = ++this.index >= this.length ?
|
|
2327
|
+
this.peek = ++this.index >= this.length ? we : this.input.charCodeAt(this.index);
|
|
2300
2328
|
}
|
|
2301
2329
|
scanToken() {
|
|
2302
|
-
let e = this.input, n = this.length, s = this.peek,
|
|
2303
|
-
for (; s <=
|
|
2304
|
-
s =
|
|
2330
|
+
let e = this.input, n = this.length, s = this.peek, r = this.index;
|
|
2331
|
+
for (; s <= ws;) if (++r >= n) {
|
|
2332
|
+
s = we;
|
|
2305
2333
|
break;
|
|
2306
|
-
} else s = e.charCodeAt(
|
|
2307
|
-
if (this.peek = s, this.index =
|
|
2308
|
-
if (
|
|
2309
|
-
if (
|
|
2310
|
-
let
|
|
2334
|
+
} else s = e.charCodeAt(r);
|
|
2335
|
+
if (this.peek = s, this.index = r, r >= n) return null;
|
|
2336
|
+
if (cs(s)) return this.scanIdentifier();
|
|
2337
|
+
if (G(s)) return this.scanNumber(r);
|
|
2338
|
+
let i = r;
|
|
2311
2339
|
switch (s) {
|
|
2312
|
-
case
|
|
2313
|
-
case
|
|
2314
|
-
case
|
|
2315
|
-
case
|
|
2316
|
-
case G:
|
|
2340
|
+
case z: return this.advance(), G(this.peek) ? this.scanNumber(i) : this.peek !== z ? xe(i, this.index, z) : (this.advance(), this.peek === z ? (this.advance(), B(i, this.index, "...")) : this.error(`Unexpected character [${String.fromCharCode(s)}]`, 0));
|
|
2341
|
+
case X:
|
|
2342
|
+
case N:
|
|
2343
|
+
case ie:
|
|
2317
2344
|
case Q:
|
|
2318
|
-
case
|
|
2319
|
-
case
|
|
2320
|
-
case
|
|
2321
|
-
case
|
|
2322
|
-
case
|
|
2323
|
-
case
|
|
2324
|
-
case
|
|
2325
|
-
case
|
|
2326
|
-
case
|
|
2327
|
-
case
|
|
2328
|
-
case
|
|
2329
|
-
case
|
|
2330
|
-
case
|
|
2331
|
-
case
|
|
2332
|
-
case
|
|
2333
|
-
case
|
|
2334
|
-
case
|
|
2335
|
-
case
|
|
2336
|
-
case
|
|
2337
|
-
case
|
|
2338
|
-
case
|
|
2339
|
-
case
|
|
2340
|
-
|
|
2345
|
+
case F:
|
|
2346
|
+
case J:
|
|
2347
|
+
case Ee: return this.scanCharacter(i, s);
|
|
2348
|
+
case ke: return this.scanOpenBrace(i, s);
|
|
2349
|
+
case ne: return this.scanCloseBrace(i, s);
|
|
2350
|
+
case Ss:
|
|
2351
|
+
case xs: return this.scanString();
|
|
2352
|
+
case qt: return this.advance(), this.scanTemplateLiteralPart(i);
|
|
2353
|
+
case Xr: return this.scanPrivateIdentifier();
|
|
2354
|
+
case Es: return this.scanComplexOperator(i, "+", y, "=");
|
|
2355
|
+
case ys: return this.scanComplexOperator(i, "-", y, "=");
|
|
2356
|
+
case ze: return this.isStartOfRegex() ? this.scanRegex(r) : this.scanComplexOperator(i, "/", y, "=");
|
|
2357
|
+
case Jr: return this.scanComplexOperator(i, "%", y, "=");
|
|
2358
|
+
case ei: return this.scanOperator(i, "^");
|
|
2359
|
+
case Fn: return this.scanStar(i);
|
|
2360
|
+
case Un: return this.scanQuestion(i);
|
|
2361
|
+
case Yr:
|
|
2362
|
+
case Vn: return this.scanComplexOperator(i, String.fromCharCode(s), y, "=");
|
|
2363
|
+
case Gr: return this.scanComplexOperator(i, "!", y, "=", y, "=");
|
|
2364
|
+
case y: return this.scanEquals(i);
|
|
2365
|
+
case Bn: return this.scanComplexOperator(i, "&", Bn, "&", y, "=");
|
|
2366
|
+
case Hn: return this.scanComplexOperator(i, "|", Hn, "|", y, "=");
|
|
2367
|
+
case ks:
|
|
2368
|
+
for (; li(this.peek);) this.advance();
|
|
2341
2369
|
return this.scanToken();
|
|
2342
2370
|
}
|
|
2343
2371
|
return this.advance(), this.error(`Unexpected character [${String.fromCharCode(s)}]`, 0);
|
|
2344
2372
|
}
|
|
2345
2373
|
scanCharacter(e, n) {
|
|
2346
|
-
return this.advance(),
|
|
2374
|
+
return this.advance(), xe(e, this.index, n);
|
|
2347
2375
|
}
|
|
2348
2376
|
scanOperator(e, n) {
|
|
2349
|
-
return this.advance(),
|
|
2377
|
+
return this.advance(), B(e, this.index, n);
|
|
2350
2378
|
}
|
|
2351
2379
|
scanOpenBrace(e, n) {
|
|
2352
|
-
return this.braceStack.push("expression"), this.advance(),
|
|
2380
|
+
return this.braceStack.push("expression"), this.advance(), xe(e, this.index, n);
|
|
2353
2381
|
}
|
|
2354
2382
|
scanCloseBrace(e, n) {
|
|
2355
|
-
return this.advance(), this.braceStack.pop() === "interpolation" ? (this.tokens.push(
|
|
2383
|
+
return this.advance(), this.braceStack.pop() === "interpolation" ? (this.tokens.push(xe(e, this.index, ne)), this.scanTemplateLiteralPart(this.index)) : xe(e, this.index, n);
|
|
2384
|
+
}
|
|
2385
|
+
scanComplexOperator(e, n, s, r, i, a) {
|
|
2386
|
+
this.advance();
|
|
2387
|
+
let p = n;
|
|
2388
|
+
return this.peek == s && (this.advance(), p += r), i != null && this.peek == i && (this.advance(), p += a), B(e, this.index, p);
|
|
2356
2389
|
}
|
|
2357
|
-
|
|
2390
|
+
scanEquals(e) {
|
|
2358
2391
|
this.advance();
|
|
2359
|
-
let
|
|
2360
|
-
|
|
2392
|
+
let n = "=";
|
|
2393
|
+
if (this.peek === y) this.advance(), n += "=";
|
|
2394
|
+
else if (this.peek === Vn) return this.advance(), n += ">", B(e, this.index, n);
|
|
2395
|
+
return this.peek === y && (this.advance(), n += "="), B(e, this.index, n);
|
|
2361
2396
|
}
|
|
2362
2397
|
scanIdentifier() {
|
|
2363
2398
|
let e = this.index;
|
|
2364
|
-
for (this.advance();
|
|
2399
|
+
for (this.advance(); us(this.peek);) this.advance();
|
|
2365
2400
|
let n = this.input.substring(e, this.index);
|
|
2366
|
-
return
|
|
2401
|
+
return _i.indexOf(n) > -1 ? bi(e, this.index, n) : ki(e, this.index, n);
|
|
2367
2402
|
}
|
|
2368
2403
|
scanPrivateIdentifier() {
|
|
2369
2404
|
let e = this.index;
|
|
2370
|
-
if (this.advance(), !
|
|
2371
|
-
for (;
|
|
2405
|
+
if (this.advance(), !cs(this.peek)) return this.error("Invalid character [#]", -1);
|
|
2406
|
+
for (; us(this.peek);) this.advance();
|
|
2372
2407
|
let n = this.input.substring(e, this.index);
|
|
2373
|
-
return
|
|
2408
|
+
return Ti(e, this.index, n);
|
|
2374
2409
|
}
|
|
2375
2410
|
scanNumber(e) {
|
|
2376
2411
|
let n = this.index === e, s = !1;
|
|
2377
2412
|
for (this.advance();;) {
|
|
2378
|
-
if (!
|
|
2379
|
-
if (!
|
|
2413
|
+
if (!G(this.peek)) if (this.peek === Ze) {
|
|
2414
|
+
if (!G(this.input.charCodeAt(this.index - 1)) || !G(this.input.charCodeAt(this.index + 1))) return this.error("Invalid numeric separator", 0);
|
|
2380
2415
|
s = !0;
|
|
2381
|
-
} else if (this.peek ===
|
|
2382
|
-
else if (
|
|
2383
|
-
if (this.advance(),
|
|
2416
|
+
} else if (this.peek === z) n = !1;
|
|
2417
|
+
else if (Li(this.peek)) {
|
|
2418
|
+
if (this.advance(), Mi(this.peek) && this.advance(), !G(this.peek)) return this.error("Invalid exponent", -1);
|
|
2384
2419
|
n = !1;
|
|
2385
2420
|
} else break;
|
|
2386
2421
|
this.advance();
|
|
2387
2422
|
}
|
|
2388
|
-
let
|
|
2389
|
-
s && (
|
|
2390
|
-
let
|
|
2391
|
-
return
|
|
2423
|
+
let r = this.input.substring(e, this.index);
|
|
2424
|
+
s && (r = r.replace(/_/g, ""));
|
|
2425
|
+
let i = n ? $i(r) : parseFloat(r);
|
|
2426
|
+
return Ai(e, this.index, i);
|
|
2392
2427
|
}
|
|
2393
2428
|
scanString() {
|
|
2394
2429
|
let e = this.index, n = this.peek;
|
|
2395
2430
|
this.advance();
|
|
2396
|
-
let s = "",
|
|
2397
|
-
for (; this.peek != n;) if (this.peek ==
|
|
2398
|
-
let
|
|
2399
|
-
if (typeof
|
|
2400
|
-
s =
|
|
2431
|
+
let s = "", r = this.index, i = this.input;
|
|
2432
|
+
for (; this.peek != n;) if (this.peek == ut) {
|
|
2433
|
+
let p = this.scanStringBackslash(s, r);
|
|
2434
|
+
if (typeof p != "string") return p;
|
|
2435
|
+
s = p, r = this.index;
|
|
2401
2436
|
} else {
|
|
2402
|
-
if (this.peek ==
|
|
2437
|
+
if (this.peek == we) return this.error("Unterminated quote", 0);
|
|
2403
2438
|
this.advance();
|
|
2404
2439
|
}
|
|
2405
|
-
let a =
|
|
2406
|
-
return this.advance(), new
|
|
2440
|
+
let a = i.substring(r, this.index);
|
|
2441
|
+
return this.advance(), new Te(e, this.index, s + a, H.Plain);
|
|
2407
2442
|
}
|
|
2408
2443
|
scanQuestion(e) {
|
|
2409
2444
|
this.advance();
|
|
2410
2445
|
let n = "?";
|
|
2411
|
-
return this.peek ===
|
|
2446
|
+
return this.peek === Un ? (n += "?", this.advance(), this.peek === y && (n += "=", this.advance())) : this.peek === z && (n += ".", this.advance()), B(e, this.index, n);
|
|
2412
2447
|
}
|
|
2413
2448
|
scanTemplateLiteralPart(e) {
|
|
2414
2449
|
let n = "", s = this.index;
|
|
2415
|
-
for (; this.peek !==
|
|
2416
|
-
let
|
|
2417
|
-
if (typeof
|
|
2418
|
-
n =
|
|
2419
|
-
} else if (this.peek ===
|
|
2420
|
-
let
|
|
2421
|
-
if (this.advance(), this.peek ===
|
|
2450
|
+
for (; this.peek !== qt;) if (this.peek === ut) {
|
|
2451
|
+
let i = this.scanStringBackslash(n, s);
|
|
2452
|
+
if (typeof i != "string") return i;
|
|
2453
|
+
n = i, s = this.index;
|
|
2454
|
+
} else if (this.peek === Zt) {
|
|
2455
|
+
let i = this.index;
|
|
2456
|
+
if (this.advance(), this.peek === ke) return this.braceStack.push("interpolation"), this.tokens.push(new Te(e, i, n + this.input.substring(s, i), H.TemplateLiteralPart)), this.advance(), B(i, this.index, this.input.substring(i, this.index));
|
|
2422
2457
|
} else {
|
|
2423
|
-
if (this.peek ===
|
|
2458
|
+
if (this.peek === we) return this.error("Unterminated template literal", 0);
|
|
2424
2459
|
this.advance();
|
|
2425
2460
|
}
|
|
2426
|
-
let
|
|
2427
|
-
return this.advance(), new
|
|
2461
|
+
let r = this.input.substring(s, this.index);
|
|
2462
|
+
return this.advance(), new Te(e, this.index, n + r, H.TemplateLiteralEnd);
|
|
2428
2463
|
}
|
|
2429
2464
|
error(e, n) {
|
|
2430
2465
|
let s = this.index + n;
|
|
2431
|
-
return
|
|
2466
|
+
return Ii(s, this.index, `Lexer Error: ${e} at column ${s} in expression [${this.input}]`);
|
|
2432
2467
|
}
|
|
2433
2468
|
scanStringBackslash(e, n) {
|
|
2434
2469
|
e += this.input.substring(n, this.index);
|
|
2435
2470
|
let s;
|
|
2436
|
-
if (this.advance(), this.peek ===
|
|
2437
|
-
let
|
|
2438
|
-
if (/^[0-9a-f]+$/i.test(
|
|
2439
|
-
else return this.error(`Invalid unicode escape [\\u${
|
|
2440
|
-
for (let
|
|
2441
|
-
} else s =
|
|
2471
|
+
if (this.advance(), this.peek === oi) {
|
|
2472
|
+
let r = this.input.substring(this.index + 1, this.index + 5);
|
|
2473
|
+
if (/^[0-9a-f]+$/i.test(r)) s = parseInt(r, 16);
|
|
2474
|
+
else return this.error(`Invalid unicode escape [\\u${r}]`, 0);
|
|
2475
|
+
for (let i = 0; i < 5; i++) this.advance();
|
|
2476
|
+
} else s = Ri(this.peek), this.advance();
|
|
2442
2477
|
return e += String.fromCharCode(s), e;
|
|
2443
2478
|
}
|
|
2444
2479
|
scanStar(e) {
|
|
2445
2480
|
this.advance();
|
|
2446
2481
|
let n = "*";
|
|
2447
|
-
return this.peek ===
|
|
2482
|
+
return this.peek === Fn ? (n += "*", this.advance(), this.peek === y && (n += "=", this.advance())) : this.peek === y && (n += "=", this.advance()), B(e, this.index, n);
|
|
2448
2483
|
}
|
|
2449
2484
|
isStartOfRegex() {
|
|
2450
2485
|
if (this.tokens.length === 0) return !0;
|
|
2451
2486
|
let e = this.tokens[this.tokens.length - 1];
|
|
2452
2487
|
if (e.isOperator("!")) {
|
|
2453
2488
|
let n = this.tokens.length > 1 ? this.tokens[this.tokens.length - 2] : null;
|
|
2454
|
-
return n === null || n.type !==
|
|
2489
|
+
return n === null || n.type !== f.Identifier && !n.isCharacter(N) && !n.isCharacter(Q);
|
|
2455
2490
|
}
|
|
2456
|
-
return e.type ===
|
|
2491
|
+
return e.type === f.Operator || e.isCharacter(X) || e.isCharacter(ie) || e.isCharacter(F) || e.isCharacter(J);
|
|
2457
2492
|
}
|
|
2458
2493
|
scanRegex(e) {
|
|
2459
2494
|
this.advance();
|
|
2460
|
-
let n = this.index, s = !1,
|
|
2495
|
+
let n = this.index, s = !1, r = !1;
|
|
2461
2496
|
for (;;) {
|
|
2462
|
-
let
|
|
2463
|
-
if (
|
|
2497
|
+
let h = this.peek;
|
|
2498
|
+
if (h === we) return this.error("Unterminated regular expression", 0);
|
|
2464
2499
|
if (s) s = !1;
|
|
2465
|
-
else if (
|
|
2466
|
-
else if (
|
|
2467
|
-
else if (
|
|
2468
|
-
else if (
|
|
2500
|
+
else if (h === ut) s = !0;
|
|
2501
|
+
else if (h === ie) r = !0;
|
|
2502
|
+
else if (h === Q) r = !1;
|
|
2503
|
+
else if (h === ze && !r) break;
|
|
2469
2504
|
this.advance();
|
|
2470
2505
|
}
|
|
2471
|
-
let
|
|
2506
|
+
let i = this.input.substring(n, this.index);
|
|
2472
2507
|
this.advance();
|
|
2473
|
-
let a =
|
|
2474
|
-
return
|
|
2508
|
+
let a = Ni(e, this.index, i), p = this.scanRegexFlags(this.index);
|
|
2509
|
+
return p !== null ? (this.tokens.push(a), p) : a;
|
|
2475
2510
|
}
|
|
2476
2511
|
scanRegexFlags(e) {
|
|
2477
|
-
if (!
|
|
2478
|
-
for (;
|
|
2479
|
-
return
|
|
2512
|
+
if (!jt(this.peek)) return null;
|
|
2513
|
+
for (; jt(this.peek);) this.advance();
|
|
2514
|
+
return Pi(e, this.index, this.input.substring(e, this.index));
|
|
2480
2515
|
}
|
|
2481
2516
|
};
|
|
2482
|
-
function
|
|
2483
|
-
return
|
|
2517
|
+
function cs(t) {
|
|
2518
|
+
return Cs <= t && t <= _s || en <= t && t <= tn || t == Ze || t == Zt;
|
|
2484
2519
|
}
|
|
2485
|
-
function
|
|
2486
|
-
return
|
|
2520
|
+
function us(t) {
|
|
2521
|
+
return jt(t) || G(t) || t == Ze || t == Zt;
|
|
2487
2522
|
}
|
|
2488
|
-
function
|
|
2489
|
-
return t ==
|
|
2523
|
+
function Li(t) {
|
|
2524
|
+
return t == ti || t == Zr;
|
|
2490
2525
|
}
|
|
2491
|
-
function
|
|
2492
|
-
return t ==
|
|
2526
|
+
function Mi(t) {
|
|
2527
|
+
return t == ys || t == Es;
|
|
2493
2528
|
}
|
|
2494
|
-
function
|
|
2529
|
+
function Ri(t) {
|
|
2495
2530
|
switch (t) {
|
|
2496
|
-
case
|
|
2497
|
-
case
|
|
2498
|
-
case
|
|
2499
|
-
case
|
|
2500
|
-
case
|
|
2531
|
+
case si: return $e;
|
|
2532
|
+
case ni: return jr;
|
|
2533
|
+
case ri: return zr;
|
|
2534
|
+
case ii: return vs;
|
|
2535
|
+
case ai: return qr;
|
|
2501
2536
|
default: return t;
|
|
2502
2537
|
}
|
|
2503
2538
|
}
|
|
2504
|
-
function
|
|
2539
|
+
function $i(t) {
|
|
2505
2540
|
let e = parseInt(t);
|
|
2506
2541
|
if (isNaN(e)) throw new Error("Invalid integer literal when parsing " + t);
|
|
2507
2542
|
return e;
|
|
2508
2543
|
}
|
|
2509
|
-
var
|
|
2544
|
+
var Yt = class {
|
|
2510
2545
|
strings;
|
|
2511
2546
|
expressions;
|
|
2512
2547
|
offsets;
|
|
2513
2548
|
constructor(e, n, s) {
|
|
2514
2549
|
this.strings = e, this.expressions = n, this.offsets = s;
|
|
2515
2550
|
}
|
|
2516
|
-
},
|
|
2551
|
+
}, Qt = class {
|
|
2517
2552
|
templateBindings;
|
|
2518
2553
|
warnings;
|
|
2519
2554
|
errors;
|
|
@@ -2521,106 +2556,106 @@ var Vt = class {
|
|
|
2521
2556
|
this.templateBindings = e, this.warnings = n, this.errors = s;
|
|
2522
2557
|
}
|
|
2523
2558
|
};
|
|
2524
|
-
function
|
|
2559
|
+
function V(t) {
|
|
2525
2560
|
return t.start.toString() || "(unknown)";
|
|
2526
2561
|
}
|
|
2527
|
-
var
|
|
2562
|
+
var he = class {
|
|
2528
2563
|
_lexer;
|
|
2529
2564
|
_supportsDirectPipeReferences;
|
|
2530
2565
|
constructor(e, n = !1) {
|
|
2531
2566
|
this._lexer = e, this._supportsDirectPipeReferences = n;
|
|
2532
2567
|
}
|
|
2533
2568
|
parseAction(e, n, s) {
|
|
2534
|
-
let
|
|
2535
|
-
this._checkNoInterpolation(
|
|
2536
|
-
let { stripped:
|
|
2537
|
-
return new
|
|
2569
|
+
let r = [];
|
|
2570
|
+
this._checkNoInterpolation(r, e, n);
|
|
2571
|
+
let { stripped: i } = this._stripComments(e);
|
|
2572
|
+
return new U(new Y(e, n, s, this._lexer.tokenize(i), 1, r, 0, this._supportsDirectPipeReferences).parseChain(), e, V(n), s, r);
|
|
2538
2573
|
}
|
|
2539
2574
|
parseBinding(e, n, s) {
|
|
2540
|
-
let
|
|
2541
|
-
return new
|
|
2575
|
+
let r = [];
|
|
2576
|
+
return new U(this._parseBindingAst(e, n, s, r), e, V(n), s, r);
|
|
2542
2577
|
}
|
|
2543
2578
|
checkSimpleExpression(e) {
|
|
2544
|
-
let n = new
|
|
2579
|
+
let n = new Kt();
|
|
2545
2580
|
return e.visit(n), n.errors;
|
|
2546
2581
|
}
|
|
2547
2582
|
parseSimpleBinding(e, n, s) {
|
|
2548
|
-
let
|
|
2549
|
-
return a.length > 0 &&
|
|
2583
|
+
let r = [], i = this._parseBindingAst(e, n, s, r), a = this.checkSimpleExpression(i);
|
|
2584
|
+
return a.length > 0 && r.push(re(`Host binding expression cannot contain ${a.join(" ")}`, e, "", n)), new U(i, e, V(n), s, r);
|
|
2550
2585
|
}
|
|
2551
|
-
_parseBindingAst(e, n, s,
|
|
2552
|
-
this._checkNoInterpolation(
|
|
2553
|
-
let { stripped:
|
|
2554
|
-
return new
|
|
2586
|
+
_parseBindingAst(e, n, s, r) {
|
|
2587
|
+
this._checkNoInterpolation(r, e, n);
|
|
2588
|
+
let { stripped: i } = this._stripComments(e);
|
|
2589
|
+
return new Y(e, n, s, this._lexer.tokenize(i), 0, r, 0, this._supportsDirectPipeReferences).parseChain();
|
|
2555
2590
|
}
|
|
2556
|
-
parseTemplateBindings(e, n, s,
|
|
2557
|
-
return new
|
|
2591
|
+
parseTemplateBindings(e, n, s, r, i) {
|
|
2592
|
+
return new Y(n, s, i, this._lexer.tokenize(n), 0, [], 0, this._supportsDirectPipeReferences).parseTemplateBindings({
|
|
2558
2593
|
source: e,
|
|
2559
|
-
span: new
|
|
2594
|
+
span: new O(r, r + e.length)
|
|
2560
2595
|
});
|
|
2561
2596
|
}
|
|
2562
|
-
parseInterpolation(e, n, s,
|
|
2563
|
-
let
|
|
2564
|
-
if (
|
|
2597
|
+
parseInterpolation(e, n, s, r) {
|
|
2598
|
+
let i = [], { strings: a, expressions: p, offsets: h } = this.splitInterpolation(e, n, i, r);
|
|
2599
|
+
if (p.length === 0) return null;
|
|
2565
2600
|
let d = [];
|
|
2566
|
-
for (let
|
|
2567
|
-
let D =
|
|
2568
|
-
if (
|
|
2569
|
-
|
|
2601
|
+
for (let x = 0; x < p.length; ++x) {
|
|
2602
|
+
let D = r?.[x * 2 + 1]?.sourceSpan, k = p[x].text, { stripped: T, hasComments: C } = this._stripComments(k), q = this._lexer.tokenize(T);
|
|
2603
|
+
if (C && T.trim().length === 0 && q.length === 0) {
|
|
2604
|
+
i.push(re("Interpolation expression cannot only contain a comment", e, `at column ${p[x].start} in`, n));
|
|
2570
2605
|
continue;
|
|
2571
2606
|
}
|
|
2572
|
-
let
|
|
2573
|
-
d.push(
|
|
2607
|
+
let ge = new Y(D ? k : e, D || n, s, q, 0, i, h[x], this._supportsDirectPipeReferences).parseChain();
|
|
2608
|
+
d.push(ge);
|
|
2574
2609
|
}
|
|
2575
|
-
return this.createInterpolationAst(a.map((
|
|
2610
|
+
return this.createInterpolationAst(a.map((x) => x.text), d, e, V(n), s, i);
|
|
2576
2611
|
}
|
|
2577
2612
|
parseInterpolationExpression(e, n, s) {
|
|
2578
|
-
let { stripped:
|
|
2579
|
-
return this.createInterpolationAst(["", ""], [
|
|
2580
|
-
}
|
|
2581
|
-
createInterpolationAst(e, n, s,
|
|
2582
|
-
let
|
|
2583
|
-
return new
|
|
2584
|
-
}
|
|
2585
|
-
splitInterpolation(e, n, s,
|
|
2586
|
-
let
|
|
2587
|
-
for (; d < e.length;) if (
|
|
2588
|
-
let
|
|
2589
|
-
if (
|
|
2590
|
-
|
|
2613
|
+
let { stripped: r } = this._stripComments(e), i = this._lexer.tokenize(r), a = [], p = new Y(e, n, s, i, 0, a, 0, this._supportsDirectPipeReferences).parseChain();
|
|
2614
|
+
return this.createInterpolationAst(["", ""], [p], e, V(n), s, a);
|
|
2615
|
+
}
|
|
2616
|
+
createInterpolationAst(e, n, s, r, i, a) {
|
|
2617
|
+
let p = new K(0, s.length);
|
|
2618
|
+
return new U(new Hr(p, p.toAbsolute(i), e, n), s, r, i, a);
|
|
2619
|
+
}
|
|
2620
|
+
splitInterpolation(e, n, s, r) {
|
|
2621
|
+
let i = [], a = [], p = [], h = r ? Oi(r) : null, d = 0, x = !1, D = !1, k = "{{", T = "}}";
|
|
2622
|
+
for (; d < e.length;) if (x) {
|
|
2623
|
+
let C = d, q = C + 2, ge = this._getInterpolationEndIndex(e, T, q);
|
|
2624
|
+
if (ge === -1) {
|
|
2625
|
+
x = !1, D = !0;
|
|
2591
2626
|
break;
|
|
2592
2627
|
}
|
|
2593
|
-
let
|
|
2594
|
-
|
|
2595
|
-
text:
|
|
2596
|
-
start:
|
|
2597
|
-
end:
|
|
2628
|
+
let dn = ge + 2, mn = e.substring(q, ge);
|
|
2629
|
+
mn.trim().length === 0 && s.push(re("Blank expressions are not allowed in interpolated strings", e, `at column ${d} in`, n)), a.push({
|
|
2630
|
+
text: mn,
|
|
2631
|
+
start: C,
|
|
2632
|
+
end: dn
|
|
2598
2633
|
});
|
|
2599
|
-
let
|
|
2600
|
-
|
|
2634
|
+
let $r = (h?.get(C) ?? C) + 2;
|
|
2635
|
+
p.push($r), d = dn, x = !1;
|
|
2601
2636
|
} else {
|
|
2602
|
-
let
|
|
2603
|
-
d = e.indexOf(
|
|
2604
|
-
let
|
|
2605
|
-
|
|
2606
|
-
text:
|
|
2607
|
-
start:
|
|
2637
|
+
let C = d;
|
|
2638
|
+
d = e.indexOf(k, d), d === -1 && (d = e.length);
|
|
2639
|
+
let q = e.substring(C, d);
|
|
2640
|
+
i.push({
|
|
2641
|
+
text: q,
|
|
2642
|
+
start: C,
|
|
2608
2643
|
end: d
|
|
2609
|
-
}),
|
|
2644
|
+
}), x = !0;
|
|
2610
2645
|
}
|
|
2611
|
-
if (!
|
|
2612
|
-
let
|
|
2613
|
-
|
|
2614
|
-
} else
|
|
2646
|
+
if (!x) if (D) {
|
|
2647
|
+
let C = i[i.length - 1];
|
|
2648
|
+
C.text += e.substring(d), C.end = e.length;
|
|
2649
|
+
} else i.push({
|
|
2615
2650
|
text: e.substring(d),
|
|
2616
2651
|
start: d,
|
|
2617
2652
|
end: e.length
|
|
2618
2653
|
});
|
|
2619
|
-
return new
|
|
2654
|
+
return new Yt(i, a, p);
|
|
2620
2655
|
}
|
|
2621
2656
|
wrapLiteralPrimitive(e, n, s) {
|
|
2622
|
-
let
|
|
2623
|
-
return new
|
|
2657
|
+
let r = new K(0, e == null ? 0 : e.length);
|
|
2658
|
+
return new U(new I(r, r.toAbsolute(s), e), e, typeof n == "string" ? n : V(n), s, []);
|
|
2624
2659
|
}
|
|
2625
2660
|
_stripComments(e) {
|
|
2626
2661
|
let n = this._commentStart(e);
|
|
@@ -2635,37 +2670,37 @@ var oe = class {
|
|
|
2635
2670
|
_commentStart(e) {
|
|
2636
2671
|
let n = null;
|
|
2637
2672
|
for (let s = 0; s < e.length - 1; s++) {
|
|
2638
|
-
let
|
|
2639
|
-
if (
|
|
2640
|
-
n ===
|
|
2673
|
+
let r = e.charCodeAt(s), i = e.charCodeAt(s + 1);
|
|
2674
|
+
if (r === ze && i == ze && n == null) return s;
|
|
2675
|
+
n === r ? n = null : n == null && Wn(r) && (n = r);
|
|
2641
2676
|
}
|
|
2642
2677
|
return null;
|
|
2643
2678
|
}
|
|
2644
2679
|
_checkNoInterpolation(e, n, s) {
|
|
2645
|
-
let
|
|
2646
|
-
for (let a of this._forEachUnquotedChar(n, 0)) if (
|
|
2647
|
-
else if (
|
|
2648
|
-
|
|
2680
|
+
let r = -1, i = -1;
|
|
2681
|
+
for (let a of this._forEachUnquotedChar(n, 0)) if (r === -1) n.startsWith("{{") && (r = a);
|
|
2682
|
+
else if (i = this._getInterpolationEndIndex(n, "}}", a), i > -1) break;
|
|
2683
|
+
r > -1 && i > -1 && e.push(re("Got interpolation ({{}}) where expression was expected", n, `at column ${r} in`, s));
|
|
2649
2684
|
}
|
|
2650
2685
|
_getInterpolationEndIndex(e, n, s) {
|
|
2651
|
-
for (let
|
|
2652
|
-
if (e.startsWith(n,
|
|
2653
|
-
if (e.startsWith("//",
|
|
2686
|
+
for (let r of this._forEachUnquotedChar(e, s)) {
|
|
2687
|
+
if (e.startsWith(n, r)) return r;
|
|
2688
|
+
if (e.startsWith("//", r)) return e.indexOf(n, r);
|
|
2654
2689
|
}
|
|
2655
2690
|
return -1;
|
|
2656
2691
|
}
|
|
2657
2692
|
*_forEachUnquotedChar(e, n) {
|
|
2658
|
-
let s = null,
|
|
2659
|
-
for (let
|
|
2660
|
-
let a = e[
|
|
2661
|
-
|
|
2693
|
+
let s = null, r = 0;
|
|
2694
|
+
for (let i = n; i < e.length; i++) {
|
|
2695
|
+
let a = e[i];
|
|
2696
|
+
Wn(e.charCodeAt(i)) && (s === null || s === a) && r % 2 === 0 ? s = s === null ? a : null : s === null && (yield i), r = a === "\\" ? r + 1 : 0;
|
|
2662
2697
|
}
|
|
2663
2698
|
}
|
|
2664
|
-
},
|
|
2699
|
+
}, se;
|
|
2665
2700
|
(function(t) {
|
|
2666
2701
|
t[t.None = 0] = "None", t[t.Writable = 1] = "Writable";
|
|
2667
|
-
})(
|
|
2668
|
-
var
|
|
2702
|
+
})(se || (se = {}));
|
|
2703
|
+
var ps = new Set([
|
|
2669
2704
|
"d",
|
|
2670
2705
|
"g",
|
|
2671
2706
|
"i",
|
|
@@ -2674,7 +2709,7 @@ var ts = new Set([
|
|
|
2674
2709
|
"u",
|
|
2675
2710
|
"v",
|
|
2676
2711
|
"y"
|
|
2677
|
-
]),
|
|
2712
|
+
]), Y = class {
|
|
2678
2713
|
input;
|
|
2679
2714
|
parseSourceSpan;
|
|
2680
2715
|
absoluteOffset;
|
|
@@ -2686,15 +2721,15 @@ var ts = new Set([
|
|
|
2686
2721
|
rparensExpected = 0;
|
|
2687
2722
|
rbracketsExpected = 0;
|
|
2688
2723
|
rbracesExpected = 0;
|
|
2689
|
-
context =
|
|
2724
|
+
context = se.None;
|
|
2690
2725
|
sourceSpanCache = /* @__PURE__ */ new Map();
|
|
2691
2726
|
index = 0;
|
|
2692
|
-
constructor(e, n, s,
|
|
2693
|
-
this.input = e, this.parseSourceSpan = n, this.absoluteOffset = s, this.tokens =
|
|
2727
|
+
constructor(e, n, s, r, i, a, p, h) {
|
|
2728
|
+
this.input = e, this.parseSourceSpan = n, this.absoluteOffset = s, this.tokens = r, this.parseFlags = i, this.errors = a, this.offset = p, this.supportsDirectPipeReferences = h;
|
|
2694
2729
|
}
|
|
2695
2730
|
peek(e) {
|
|
2696
2731
|
let n = this.index + e;
|
|
2697
|
-
return n < this.tokens.length ? this.tokens[n] :
|
|
2732
|
+
return n < this.tokens.length ? this.tokens[n] : Se;
|
|
2698
2733
|
}
|
|
2699
2734
|
get next() {
|
|
2700
2735
|
return this.peek(0);
|
|
@@ -2714,10 +2749,10 @@ var ts = new Set([
|
|
|
2714
2749
|
span(e, n) {
|
|
2715
2750
|
let s = this.currentEndIndex;
|
|
2716
2751
|
if (n !== void 0 && n > this.currentEndIndex && (s = n), e > s) {
|
|
2717
|
-
let
|
|
2718
|
-
s = e, e =
|
|
2752
|
+
let r = s;
|
|
2753
|
+
s = e, e = r;
|
|
2719
2754
|
}
|
|
2720
|
-
return new
|
|
2755
|
+
return new K(e, s);
|
|
2721
2756
|
}
|
|
2722
2757
|
sourceSpan(e, n) {
|
|
2723
2758
|
let s = `${e}@${this.inputIndex}:${n}`;
|
|
@@ -2747,13 +2782,13 @@ var ts = new Set([
|
|
|
2747
2782
|
return this.next.isOperator(e) ? (this.advance(), !0) : !1;
|
|
2748
2783
|
}
|
|
2749
2784
|
isAssignmentOperator(e) {
|
|
2750
|
-
return e.type ===
|
|
2785
|
+
return e.type === f.Operator && E.isAssignmentOperation(e.strValue);
|
|
2751
2786
|
}
|
|
2752
2787
|
expectOperator(e) {
|
|
2753
2788
|
this.consumeOptionalOperator(e) || this.error(`Missing expected operator ${e}`);
|
|
2754
2789
|
}
|
|
2755
2790
|
prettyPrintToken(e) {
|
|
2756
|
-
return e ===
|
|
2791
|
+
return e === Se ? "end of input" : `token ${e}`;
|
|
2757
2792
|
}
|
|
2758
2793
|
expectIdentifierOrKeyword() {
|
|
2759
2794
|
let e = this.next;
|
|
@@ -2767,33 +2802,33 @@ var ts = new Set([
|
|
|
2767
2802
|
let e = [], n = this.inputIndex;
|
|
2768
2803
|
for (; this.index < this.tokens.length;) {
|
|
2769
2804
|
let s = this.parsePipe();
|
|
2770
|
-
if (e.push(s), this.consumeOptionalCharacter(
|
|
2805
|
+
if (e.push(s), this.consumeOptionalCharacter(Ee)) for (this.parseFlags & 1 || this.error("Binding expression cannot contain chained expression"); this.consumeOptionalCharacter(Ee););
|
|
2771
2806
|
else if (this.index < this.tokens.length) {
|
|
2772
|
-
let
|
|
2773
|
-
if (this.error(`Unexpected token '${this.next}'`), this.index ===
|
|
2807
|
+
let r = this.index;
|
|
2808
|
+
if (this.error(`Unexpected token '${this.next}'`), this.index === r) break;
|
|
2774
2809
|
}
|
|
2775
2810
|
}
|
|
2776
2811
|
if (e.length === 0) {
|
|
2777
|
-
let s = this.offset,
|
|
2778
|
-
return new
|
|
2812
|
+
let s = this.offset, r = this.offset + this.input.length;
|
|
2813
|
+
return new A(this.span(s, r), this.sourceSpan(s, r));
|
|
2779
2814
|
}
|
|
2780
|
-
return e.length == 1 ? e[0] : new
|
|
2815
|
+
return e.length == 1 ? e[0] : new It(this.span(n), this.sourceSpan(n), e);
|
|
2781
2816
|
}
|
|
2782
2817
|
parsePipe() {
|
|
2783
2818
|
let e = this.inputIndex, n = this.parseExpression();
|
|
2784
2819
|
if (this.consumeOptionalOperator("|")) {
|
|
2785
2820
|
this.parseFlags & 1 && this.error("Cannot have a pipe in an action expression");
|
|
2786
2821
|
do {
|
|
2787
|
-
let s = this.inputIndex,
|
|
2788
|
-
|
|
2789
|
-
let
|
|
2790
|
-
for (; this.consumeOptionalCharacter(
|
|
2791
|
-
let
|
|
2822
|
+
let s = this.inputIndex, r = this.expectIdentifierOrKeyword(), i, a;
|
|
2823
|
+
r !== null ? i = this.sourceSpan(s) : (r = "", a = this.next.index !== -1 ? this.next.index : this.input.length + this.offset, i = new K(a, a).toAbsolute(this.absoluteOffset));
|
|
2824
|
+
let p = [];
|
|
2825
|
+
for (; this.consumeOptionalCharacter(J);) p.push(this.parseExpression());
|
|
2826
|
+
let h;
|
|
2792
2827
|
if (this.supportsDirectPipeReferences) {
|
|
2793
|
-
let d =
|
|
2794
|
-
|
|
2795
|
-
} else
|
|
2796
|
-
n = new
|
|
2828
|
+
let d = r.charCodeAt(0);
|
|
2829
|
+
h = d === Ze || d >= en && d <= tn ? Ce.ReferencedDirectly : Ce.ReferencedByName;
|
|
2830
|
+
} else h = Ce.ReferencedByName;
|
|
2831
|
+
n = new Mt(this.span(e), this.sourceSpan(e, a), n, r, p, h, i);
|
|
2797
2832
|
} while (this.consumeOptionalOperator("|"));
|
|
2798
2833
|
}
|
|
2799
2834
|
return n;
|
|
@@ -2804,13 +2839,13 @@ var ts = new Set([
|
|
|
2804
2839
|
parseConditional() {
|
|
2805
2840
|
let e = this.inputIndex, n = this.parseLogicalOr();
|
|
2806
2841
|
if (this.consumeOptionalOperator("?")) {
|
|
2807
|
-
let s = this.parsePipe(),
|
|
2808
|
-
if (this.consumeOptionalCharacter(
|
|
2842
|
+
let s = this.parsePipe(), r;
|
|
2843
|
+
if (this.consumeOptionalCharacter(J)) r = this.parsePipe();
|
|
2809
2844
|
else {
|
|
2810
|
-
let
|
|
2811
|
-
this.error(`Conditional expression ${a} requires all 3 expressions`),
|
|
2845
|
+
let i = this.inputIndex, a = this.input.substring(e, i);
|
|
2846
|
+
this.error(`Conditional expression ${a} requires all 3 expressions`), r = new A(this.span(e), this.sourceSpan(e));
|
|
2812
2847
|
}
|
|
2813
|
-
return new
|
|
2848
|
+
return new Nt(this.span(e), this.sourceSpan(e), n, s, r);
|
|
2814
2849
|
} else return n;
|
|
2815
2850
|
}
|
|
2816
2851
|
parseLogicalOr() {
|
|
@@ -2839,7 +2874,7 @@ var ts = new Set([
|
|
|
2839
2874
|
}
|
|
2840
2875
|
parseEquality() {
|
|
2841
2876
|
let e = this.inputIndex, n = this.parseRelational();
|
|
2842
|
-
for (; this.next.type ==
|
|
2877
|
+
for (; this.next.type == f.Operator;) {
|
|
2843
2878
|
let s = this.next.strValue;
|
|
2844
2879
|
switch (s) {
|
|
2845
2880
|
case "==":
|
|
@@ -2847,8 +2882,8 @@ var ts = new Set([
|
|
|
2847
2882
|
case "!=":
|
|
2848
2883
|
case "!==":
|
|
2849
2884
|
this.advance();
|
|
2850
|
-
let
|
|
2851
|
-
n = new E(this.span(e), this.sourceSpan(e), s, n,
|
|
2885
|
+
let r = this.parseRelational();
|
|
2886
|
+
n = new E(this.span(e), this.sourceSpan(e), s, n, r);
|
|
2852
2887
|
continue;
|
|
2853
2888
|
}
|
|
2854
2889
|
break;
|
|
@@ -2857,7 +2892,7 @@ var ts = new Set([
|
|
|
2857
2892
|
}
|
|
2858
2893
|
parseRelational() {
|
|
2859
2894
|
let e = this.inputIndex, n = this.parseAdditive();
|
|
2860
|
-
for (; this.next.type ==
|
|
2895
|
+
for (; this.next.type == f.Operator || this.next.isKeywordIn() || this.next.isKeywordInstanceOf();) {
|
|
2861
2896
|
let s = this.next.strValue;
|
|
2862
2897
|
switch (s) {
|
|
2863
2898
|
case "<":
|
|
@@ -2865,9 +2900,10 @@ var ts = new Set([
|
|
|
2865
2900
|
case "<=":
|
|
2866
2901
|
case ">=":
|
|
2867
2902
|
case "in":
|
|
2903
|
+
case "instanceof":
|
|
2868
2904
|
this.advance();
|
|
2869
|
-
let
|
|
2870
|
-
n = new E(this.span(e), this.sourceSpan(e), s, n,
|
|
2905
|
+
let r = this.parseAdditive();
|
|
2906
|
+
n = new E(this.span(e), this.sourceSpan(e), s, n, r);
|
|
2871
2907
|
continue;
|
|
2872
2908
|
}
|
|
2873
2909
|
break;
|
|
@@ -2876,14 +2912,14 @@ var ts = new Set([
|
|
|
2876
2912
|
}
|
|
2877
2913
|
parseAdditive() {
|
|
2878
2914
|
let e = this.inputIndex, n = this.parseMultiplicative();
|
|
2879
|
-
for (; this.next.type ==
|
|
2915
|
+
for (; this.next.type == f.Operator;) {
|
|
2880
2916
|
let s = this.next.strValue;
|
|
2881
2917
|
switch (s) {
|
|
2882
2918
|
case "+":
|
|
2883
2919
|
case "-":
|
|
2884
2920
|
this.advance();
|
|
2885
|
-
let
|
|
2886
|
-
n = new E(this.span(e), this.sourceSpan(e), s, n,
|
|
2921
|
+
let r = this.parseMultiplicative();
|
|
2922
|
+
n = new E(this.span(e), this.sourceSpan(e), s, n, r);
|
|
2887
2923
|
continue;
|
|
2888
2924
|
}
|
|
2889
2925
|
break;
|
|
@@ -2892,15 +2928,15 @@ var ts = new Set([
|
|
|
2892
2928
|
}
|
|
2893
2929
|
parseMultiplicative() {
|
|
2894
2930
|
let e = this.inputIndex, n = this.parseExponentiation();
|
|
2895
|
-
for (; this.next.type ==
|
|
2931
|
+
for (; this.next.type == f.Operator;) {
|
|
2896
2932
|
let s = this.next.strValue;
|
|
2897
2933
|
switch (s) {
|
|
2898
2934
|
case "*":
|
|
2899
2935
|
case "%":
|
|
2900
2936
|
case "/":
|
|
2901
2937
|
this.advance();
|
|
2902
|
-
let
|
|
2903
|
-
n = new E(this.span(e), this.sourceSpan(e), s, n,
|
|
2938
|
+
let r = this.parseExponentiation();
|
|
2939
|
+
n = new E(this.span(e), this.sourceSpan(e), s, n, r);
|
|
2904
2940
|
continue;
|
|
2905
2941
|
}
|
|
2906
2942
|
break;
|
|
@@ -2909,71 +2945,72 @@ var ts = new Set([
|
|
|
2909
2945
|
}
|
|
2910
2946
|
parseExponentiation() {
|
|
2911
2947
|
let e = this.inputIndex, n = this.parsePrefix();
|
|
2912
|
-
for (; this.next.type ==
|
|
2913
|
-
(n instanceof
|
|
2948
|
+
for (; this.next.type == f.Operator && this.next.strValue === "**";) {
|
|
2949
|
+
(n instanceof _e || n instanceof Ve || n instanceof Ue || n instanceof He) && this.error("Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence"), this.advance();
|
|
2914
2950
|
let s = this.parseExponentiation();
|
|
2915
2951
|
n = new E(this.span(e), this.sourceSpan(e), "**", n, s);
|
|
2916
2952
|
}
|
|
2917
2953
|
return n;
|
|
2918
2954
|
}
|
|
2919
2955
|
parsePrefix() {
|
|
2920
|
-
if (this.next.type ==
|
|
2956
|
+
if (this.next.type == f.Operator) {
|
|
2921
2957
|
let e = this.inputIndex, n = this.next.strValue, s;
|
|
2922
2958
|
switch (n) {
|
|
2923
|
-
case "+": return this.advance(), s = this.parsePrefix(),
|
|
2924
|
-
case "-": return this.advance(), s = this.parsePrefix(),
|
|
2925
|
-
case "!": return this.advance(), s = this.parsePrefix(), new
|
|
2959
|
+
case "+": return this.advance(), s = this.parsePrefix(), _e.createPlus(this.span(e), this.sourceSpan(e), s);
|
|
2960
|
+
case "-": return this.advance(), s = this.parsePrefix(), _e.createMinus(this.span(e), this.sourceSpan(e), s);
|
|
2961
|
+
case "!": return this.advance(), s = this.parsePrefix(), new Ve(this.span(e), this.sourceSpan(e), s);
|
|
2926
2962
|
}
|
|
2927
2963
|
} else if (this.next.isKeywordTypeof()) {
|
|
2928
2964
|
let e = this.inputIndex;
|
|
2929
2965
|
this.advance();
|
|
2930
2966
|
let n = this.parsePrefix();
|
|
2931
|
-
return new
|
|
2967
|
+
return new Ue(this.span(e), this.sourceSpan(e), n);
|
|
2932
2968
|
} else if (this.next.isKeywordVoid()) {
|
|
2933
2969
|
let e = this.inputIndex;
|
|
2934
2970
|
this.advance();
|
|
2935
2971
|
let n = this.parsePrefix();
|
|
2936
|
-
return new
|
|
2972
|
+
return new He(this.span(e), this.sourceSpan(e), n);
|
|
2937
2973
|
}
|
|
2938
2974
|
return this.parseCallChain();
|
|
2939
2975
|
}
|
|
2940
2976
|
parseCallChain() {
|
|
2941
2977
|
let e = this.inputIndex, n = this.parsePrimary();
|
|
2942
|
-
for (;;) if (this.consumeOptionalCharacter(
|
|
2943
|
-
else if (this.consumeOptionalOperator("?.")) this.consumeOptionalCharacter(
|
|
2944
|
-
else if (this.consumeOptionalCharacter(
|
|
2945
|
-
else if (this.consumeOptionalCharacter(
|
|
2946
|
-
else if (this.consumeOptionalOperator("!")) n = new
|
|
2978
|
+
for (;;) if (this.consumeOptionalCharacter(z)) n = this.parseAccessMember(n, e, !1);
|
|
2979
|
+
else if (this.consumeOptionalOperator("?.")) this.consumeOptionalCharacter(X) ? n = this.parseCall(n, e, !0) : n = this.consumeOptionalCharacter(ie) ? this.parseKeyedReadOrWrite(n, e, !0) : this.parseAccessMember(n, e, !0);
|
|
2980
|
+
else if (this.consumeOptionalCharacter(ie)) n = this.parseKeyedReadOrWrite(n, e, !1);
|
|
2981
|
+
else if (this.consumeOptionalCharacter(X)) n = this.parseCall(n, e, !1);
|
|
2982
|
+
else if (this.consumeOptionalOperator("!")) n = new Dt(this.span(e), this.sourceSpan(e), n);
|
|
2947
2983
|
else if (this.next.isTemplateLiteralEnd()) n = this.parseNoInterpolationTaggedTemplateLiteral(n, e);
|
|
2948
2984
|
else if (this.next.isTemplateLiteralPart()) n = this.parseTaggedTemplateLiteral(n, e);
|
|
2949
2985
|
else return n;
|
|
2950
2986
|
}
|
|
2951
2987
|
parsePrimary() {
|
|
2952
2988
|
let e = this.inputIndex;
|
|
2953
|
-
if (this.
|
|
2989
|
+
if (this.isArrowFunction()) return this.parseArrowFunction(e);
|
|
2990
|
+
if (this.consumeOptionalCharacter(X)) {
|
|
2954
2991
|
this.rparensExpected++;
|
|
2955
2992
|
let n = this.parsePipe();
|
|
2956
|
-
return this.consumeOptionalCharacter(
|
|
2993
|
+
return this.consumeOptionalCharacter(N) || (this.error("Missing closing parentheses"), this.consumeOptionalCharacter(N)), this.rparensExpected--, new Ie(this.span(e), this.sourceSpan(e), n);
|
|
2957
2994
|
} else {
|
|
2958
2995
|
if (this.next.isKeywordNull()) return this.advance(), new I(this.span(e), this.sourceSpan(e), null);
|
|
2959
2996
|
if (this.next.isKeywordUndefined()) return this.advance(), new I(this.span(e), this.sourceSpan(e), void 0);
|
|
2960
2997
|
if (this.next.isKeywordTrue()) return this.advance(), new I(this.span(e), this.sourceSpan(e), !0);
|
|
2961
2998
|
if (this.next.isKeywordFalse()) return this.advance(), new I(this.span(e), this.sourceSpan(e), !1);
|
|
2962
2999
|
if (this.next.isKeywordIn()) return this.advance(), new I(this.span(e), this.sourceSpan(e), "in");
|
|
2963
|
-
if (this.next.isKeywordThis()) return this.advance(), new
|
|
2964
|
-
if (this.consumeOptionalCharacter(
|
|
2965
|
-
if (this.next.isCharacter(
|
|
2966
|
-
if (this.next.isIdentifier()) return this.parseAccessMember(new
|
|
3000
|
+
if (this.next.isKeywordThis()) return this.advance(), new At(this.span(e), this.sourceSpan(e));
|
|
3001
|
+
if (this.consumeOptionalCharacter(ie)) return this.parseLiteralArray(e);
|
|
3002
|
+
if (this.next.isCharacter(ke)) return this.parseLiteralMap();
|
|
3003
|
+
if (this.next.isIdentifier()) return this.parseAccessMember(new ce(this.span(e), this.sourceSpan(e)), e, !1);
|
|
2967
3004
|
if (this.next.isNumber()) {
|
|
2968
3005
|
let n = this.next.toNumber();
|
|
2969
3006
|
return this.advance(), new I(this.span(e), this.sourceSpan(e), n);
|
|
2970
3007
|
} else {
|
|
2971
3008
|
if (this.next.isTemplateLiteralEnd()) return this.parseNoInterpolationTemplateLiteral();
|
|
2972
3009
|
if (this.next.isTemplateLiteralPart()) return this.parseTemplateLiteral();
|
|
2973
|
-
if (this.next.isString() && this.next.kind ===
|
|
3010
|
+
if (this.next.isString() && this.next.kind === H.Plain) {
|
|
2974
3011
|
let n = this.next.toString();
|
|
2975
3012
|
return this.advance(), new I(this.span(e), this.sourceSpan(e), n);
|
|
2976
|
-
} else return this.next.isPrivateIdentifier() ? (this._reportErrorForPrivateIdentifier(this.next, null), new
|
|
3013
|
+
} else return this.next.isPrivateIdentifier() ? (this._reportErrorForPrivateIdentifier(this.next, null), new A(this.span(e), this.sourceSpan(e))) : this.next.isRegExpBody() ? this.parseRegularExpressionLiteral() : this.index >= this.tokens.length ? (this.error(`Unexpected end of expression: ${this.input}`), new A(this.span(e), this.sourceSpan(e))) : (this.error(`Unexpected token ${this.next}`), new A(this.span(e), this.sourceSpan(e)));
|
|
2977
3014
|
}
|
|
2978
3015
|
}
|
|
2979
3016
|
}
|
|
@@ -2982,67 +3019,67 @@ var ts = new Set([
|
|
|
2982
3019
|
let n = [];
|
|
2983
3020
|
do
|
|
2984
3021
|
if (this.next.isOperator("...")) n.push(this.parseSpreadElement());
|
|
2985
|
-
else if (!this.next.isCharacter(
|
|
3022
|
+
else if (!this.next.isCharacter(Q)) n.push(this.parsePipe());
|
|
2986
3023
|
else break;
|
|
2987
|
-
while (this.consumeOptionalCharacter(
|
|
2988
|
-
return this.rbracketsExpected--, this.expectCharacter(
|
|
3024
|
+
while (this.consumeOptionalCharacter(F));
|
|
3025
|
+
return this.rbracketsExpected--, this.expectCharacter(Q), new Rt(this.span(e), this.sourceSpan(e), n);
|
|
2989
3026
|
}
|
|
2990
3027
|
parseLiteralMap() {
|
|
2991
3028
|
let e = [], n = [], s = this.inputIndex;
|
|
2992
|
-
if (this.expectCharacter(
|
|
3029
|
+
if (this.expectCharacter(ke), !this.consumeOptionalCharacter(ne)) {
|
|
2993
3030
|
this.rbracesExpected++;
|
|
2994
3031
|
do {
|
|
2995
|
-
let
|
|
3032
|
+
let r = this.inputIndex;
|
|
2996
3033
|
if (this.next.isOperator("...")) {
|
|
2997
3034
|
this.advance(), e.push({
|
|
2998
3035
|
kind: "spread",
|
|
2999
|
-
span: this.span(
|
|
3000
|
-
sourceSpan: this.sourceSpan(
|
|
3036
|
+
span: this.span(r),
|
|
3037
|
+
sourceSpan: this.sourceSpan(r)
|
|
3001
3038
|
}), n.push(this.parsePipe());
|
|
3002
3039
|
continue;
|
|
3003
3040
|
}
|
|
3004
|
-
let
|
|
3041
|
+
let i = this.next.isString(), a = this.expectIdentifierOrKeywordOrString(), p = this.span(r), h = this.sourceSpan(r), d = {
|
|
3005
3042
|
kind: "property",
|
|
3006
3043
|
key: a,
|
|
3007
|
-
quoted:
|
|
3008
|
-
span:
|
|
3009
|
-
sourceSpan:
|
|
3044
|
+
quoted: i,
|
|
3045
|
+
span: p,
|
|
3046
|
+
sourceSpan: h
|
|
3010
3047
|
};
|
|
3011
|
-
e.push(d),
|
|
3012
|
-
} while (this.consumeOptionalCharacter(
|
|
3013
|
-
this.rbracesExpected--, this.expectCharacter(
|
|
3048
|
+
e.push(d), i ? (this.expectCharacter(J), n.push(this.parsePipe())) : this.consumeOptionalCharacter(J) ? n.push(this.parsePipe()) : (d.isShorthandInitialized = !0, n.push(new ye(p, h, h, new ce(p, h), a)));
|
|
3049
|
+
} while (this.consumeOptionalCharacter(F) && !this.next.isCharacter(ne));
|
|
3050
|
+
this.rbracesExpected--, this.expectCharacter(ne);
|
|
3014
3051
|
}
|
|
3015
|
-
return new
|
|
3052
|
+
return new Ot(this.span(s), this.sourceSpan(s), e, n);
|
|
3016
3053
|
}
|
|
3017
3054
|
parseAccessMember(e, n, s) {
|
|
3018
|
-
let
|
|
3019
|
-
let
|
|
3020
|
-
return
|
|
3021
|
-
}), a = this.sourceSpan(
|
|
3022
|
-
if (s) return this.isAssignmentOperator(this.next) ? (this.advance(), this.error("The '?.' operator cannot be used in the assignment"), new
|
|
3055
|
+
let r = this.inputIndex, i = this.withContext(se.Writable, () => {
|
|
3056
|
+
let p = this.expectIdentifierOrKeyword() ?? "";
|
|
3057
|
+
return p.length === 0 && this.error("Expected identifier for property access", e.span.end), p;
|
|
3058
|
+
}), a = this.sourceSpan(r);
|
|
3059
|
+
if (s) return this.isAssignmentOperator(this.next) ? (this.advance(), this.error("The '?.' operator cannot be used in the assignment"), new A(this.span(n), this.sourceSpan(n))) : new Pt(this.span(n), this.sourceSpan(n), a, e, i);
|
|
3023
3060
|
if (this.isAssignmentOperator(this.next)) {
|
|
3024
|
-
let
|
|
3025
|
-
if (!(this.parseFlags & 1)) return this.advance(), this.error("Bindings cannot contain assignments"), new
|
|
3026
|
-
let
|
|
3061
|
+
let p = this.next.strValue;
|
|
3062
|
+
if (!(this.parseFlags & 1)) return this.advance(), this.error("Bindings cannot contain assignments"), new A(this.span(n), this.sourceSpan(n));
|
|
3063
|
+
let h = new ye(this.span(n), this.sourceSpan(n), a, e, i);
|
|
3027
3064
|
this.advance();
|
|
3028
3065
|
let d = this.parseConditional();
|
|
3029
|
-
return new E(this.span(n), this.sourceSpan(n),
|
|
3030
|
-
} else return new
|
|
3066
|
+
return new E(this.span(n), this.sourceSpan(n), p, h, d);
|
|
3067
|
+
} else return new ye(this.span(n), this.sourceSpan(n), a, e, i);
|
|
3031
3068
|
}
|
|
3032
3069
|
parseCall(e, n, s) {
|
|
3033
|
-
let
|
|
3070
|
+
let r = this.inputIndex;
|
|
3034
3071
|
this.rparensExpected++;
|
|
3035
|
-
let
|
|
3036
|
-
this.expectCharacter(
|
|
3037
|
-
let
|
|
3038
|
-
return s ? new
|
|
3072
|
+
let i = this.parseCallArguments(), a = this.span(r, this.inputIndex).toAbsolute(this.absoluteOffset);
|
|
3073
|
+
this.expectCharacter(N), this.rparensExpected--;
|
|
3074
|
+
let p = this.span(n), h = this.sourceSpan(n);
|
|
3075
|
+
return s ? new Ft(p, h, e, i, a) : new Bt(p, h, e, i, a);
|
|
3039
3076
|
}
|
|
3040
3077
|
parseCallArguments() {
|
|
3041
|
-
if (this.next.isCharacter(
|
|
3078
|
+
if (this.next.isCharacter(N)) return [];
|
|
3042
3079
|
let e = [];
|
|
3043
3080
|
do
|
|
3044
3081
|
e.push(this.next.isOperator("...") ? this.parseSpreadElement() : this.parsePipe());
|
|
3045
|
-
while (this.consumeOptionalCharacter(
|
|
3082
|
+
while (this.consumeOptionalCharacter(F));
|
|
3046
3083
|
return e;
|
|
3047
3084
|
}
|
|
3048
3085
|
parseSpreadElement() {
|
|
@@ -3050,7 +3087,7 @@ var ts = new Set([
|
|
|
3050
3087
|
let e = this.inputIndex;
|
|
3051
3088
|
this.advance();
|
|
3052
3089
|
let n = this.parsePipe();
|
|
3053
|
-
return new
|
|
3090
|
+
return new $t(this.span(e), this.sourceSpan(e), n);
|
|
3054
3091
|
}
|
|
3055
3092
|
expectTemplateBindingKey() {
|
|
3056
3093
|
let e = "", n = !1, s = this.currentAbsoluteOffset;
|
|
@@ -3059,7 +3096,7 @@ var ts = new Set([
|
|
|
3059
3096
|
while (n);
|
|
3060
3097
|
return {
|
|
3061
3098
|
source: e,
|
|
3062
|
-
span: new
|
|
3099
|
+
span: new O(s, s + e.length)
|
|
3063
3100
|
};
|
|
3064
3101
|
}
|
|
3065
3102
|
parseTemplateBindings(e) {
|
|
@@ -3068,49 +3105,49 @@ var ts = new Set([
|
|
|
3068
3105
|
let s = this.parseLetBinding();
|
|
3069
3106
|
if (s) n.push(s);
|
|
3070
3107
|
else {
|
|
3071
|
-
let
|
|
3072
|
-
|
|
3108
|
+
let r = this.expectTemplateBindingKey(), i = this.parseAsBinding(r);
|
|
3109
|
+
i ? n.push(i) : (r.source = e.source + r.source.charAt(0).toUpperCase() + r.source.substring(1), n.push(...this.parseDirectiveKeywordBindings(r)));
|
|
3073
3110
|
}
|
|
3074
3111
|
this.consumeStatementTerminator();
|
|
3075
3112
|
}
|
|
3076
|
-
return new
|
|
3113
|
+
return new Qt(n, [], this.errors);
|
|
3077
3114
|
}
|
|
3078
3115
|
parseKeyedReadOrWrite(e, n, s) {
|
|
3079
|
-
return this.withContext(
|
|
3116
|
+
return this.withContext(se.Writable, () => {
|
|
3080
3117
|
this.rbracketsExpected++;
|
|
3081
|
-
let
|
|
3082
|
-
if (
|
|
3083
|
-
let
|
|
3118
|
+
let r = this.parsePipe();
|
|
3119
|
+
if (r instanceof A && this.error("Key access cannot be empty"), this.rbracketsExpected--, this.expectCharacter(Q), this.isAssignmentOperator(this.next)) {
|
|
3120
|
+
let i = this.next.strValue;
|
|
3084
3121
|
if (s) this.advance(), this.error("The '?.' operator cannot be used in the assignment");
|
|
3085
3122
|
else {
|
|
3086
|
-
let a = new
|
|
3123
|
+
let a = new Fe(this.span(n), this.sourceSpan(n), e, r);
|
|
3087
3124
|
this.advance();
|
|
3088
|
-
let
|
|
3089
|
-
return new E(this.span(n), this.sourceSpan(n),
|
|
3125
|
+
let p = this.parseConditional();
|
|
3126
|
+
return new E(this.span(n), this.sourceSpan(n), i, a, p);
|
|
3090
3127
|
}
|
|
3091
|
-
} else return s ? new
|
|
3092
|
-
return new
|
|
3128
|
+
} else return s ? new Lt(this.span(n), this.sourceSpan(n), e, r) : new Fe(this.span(n), this.sourceSpan(n), e, r);
|
|
3129
|
+
return new A(this.span(n), this.sourceSpan(n));
|
|
3093
3130
|
});
|
|
3094
3131
|
}
|
|
3095
3132
|
parseDirectiveKeywordBindings(e) {
|
|
3096
3133
|
let n = [];
|
|
3097
|
-
this.consumeOptionalCharacter(
|
|
3098
|
-
let s = this.getDirectiveBoundTarget(),
|
|
3099
|
-
|
|
3100
|
-
let a = new
|
|
3101
|
-
return n.push(new
|
|
3134
|
+
this.consumeOptionalCharacter(J);
|
|
3135
|
+
let s = this.getDirectiveBoundTarget(), r = this.currentAbsoluteOffset, i = this.parseAsBinding(e);
|
|
3136
|
+
i || (this.consumeStatementTerminator(), r = this.currentAbsoluteOffset);
|
|
3137
|
+
let a = new O(e.span.start, r);
|
|
3138
|
+
return n.push(new Ne(a, e, s)), i && n.push(i), n;
|
|
3102
3139
|
}
|
|
3103
3140
|
getDirectiveBoundTarget() {
|
|
3104
|
-
if (this.next ===
|
|
3141
|
+
if (this.next === Se || this.peekKeywordAs() || this.peekKeywordLet()) return null;
|
|
3105
3142
|
let e = this.parsePipe(), { start: n, end: s } = e.span;
|
|
3106
|
-
return new
|
|
3143
|
+
return new U(e, this.input.substring(n, s), V(this.parseSourceSpan), this.absoluteOffset + n, this.errors);
|
|
3107
3144
|
}
|
|
3108
3145
|
parseAsBinding(e) {
|
|
3109
3146
|
if (!this.peekKeywordAs()) return null;
|
|
3110
3147
|
this.advance();
|
|
3111
3148
|
let n = this.expectTemplateBindingKey();
|
|
3112
3149
|
this.consumeStatementTerminator();
|
|
3113
|
-
return new
|
|
3150
|
+
return new ue(new O(e.span.start, this.currentAbsoluteOffset), n, e);
|
|
3114
3151
|
}
|
|
3115
3152
|
parseLetBinding() {
|
|
3116
3153
|
if (!this.peekKeywordLet()) return null;
|
|
@@ -3118,57 +3155,98 @@ var ts = new Set([
|
|
|
3118
3155
|
this.advance();
|
|
3119
3156
|
let n = this.expectTemplateBindingKey(), s = null;
|
|
3120
3157
|
this.consumeOptionalOperator("=") && (s = this.expectTemplateBindingKey()), this.consumeStatementTerminator();
|
|
3121
|
-
return new
|
|
3158
|
+
return new ue(new O(e, this.currentAbsoluteOffset), n, s);
|
|
3122
3159
|
}
|
|
3123
3160
|
parseNoInterpolationTaggedTemplateLiteral(e, n) {
|
|
3124
3161
|
let s = this.parseNoInterpolationTemplateLiteral();
|
|
3125
|
-
return new
|
|
3162
|
+
return new We(this.span(n), this.sourceSpan(n), e, s);
|
|
3126
3163
|
}
|
|
3127
3164
|
parseNoInterpolationTemplateLiteral() {
|
|
3128
3165
|
let e = this.next.strValue, n = this.inputIndex;
|
|
3129
3166
|
this.advance();
|
|
3130
|
-
let s = this.span(n),
|
|
3131
|
-
return new
|
|
3167
|
+
let s = this.span(n), r = this.sourceSpan(n);
|
|
3168
|
+
return new qe(s, r, [new je(s, r, e)], []);
|
|
3132
3169
|
}
|
|
3133
3170
|
parseTaggedTemplateLiteral(e, n) {
|
|
3134
3171
|
let s = this.parseTemplateLiteral();
|
|
3135
|
-
return new
|
|
3172
|
+
return new We(this.span(n), this.sourceSpan(n), e, s);
|
|
3136
3173
|
}
|
|
3137
3174
|
parseTemplateLiteral() {
|
|
3138
3175
|
let e = [], n = [], s = this.inputIndex;
|
|
3139
|
-
for (; this.next !==
|
|
3140
|
-
let
|
|
3141
|
-
if (
|
|
3142
|
-
let
|
|
3143
|
-
if (this.advance(), e.push(new
|
|
3144
|
-
} else if (
|
|
3176
|
+
for (; this.next !== Se;) {
|
|
3177
|
+
let r = this.next;
|
|
3178
|
+
if (r.isTemplateLiteralPart() || r.isTemplateLiteralEnd()) {
|
|
3179
|
+
let i = this.inputIndex;
|
|
3180
|
+
if (this.advance(), e.push(new je(this.span(i), this.sourceSpan(i), r.strValue)), r.isTemplateLiteralEnd()) break;
|
|
3181
|
+
} else if (r.isTemplateLiteralInterpolationStart()) {
|
|
3145
3182
|
this.advance(), this.rbracesExpected++;
|
|
3146
|
-
let
|
|
3147
|
-
|
|
3183
|
+
let i = this.parsePipe();
|
|
3184
|
+
i instanceof A ? this.error("Template literal interpolation cannot be empty") : n.push(i), this.rbracesExpected--;
|
|
3148
3185
|
} else this.advance();
|
|
3149
3186
|
}
|
|
3150
|
-
return new
|
|
3187
|
+
return new qe(this.span(s), this.sourceSpan(s), e, n);
|
|
3151
3188
|
}
|
|
3152
3189
|
parseRegularExpressionLiteral() {
|
|
3153
3190
|
let e = this.next;
|
|
3154
|
-
if (this.advance(), !e.isRegExpBody()) return new
|
|
3191
|
+
if (this.advance(), !e.isRegExpBody()) return new A(this.span(this.inputIndex), this.sourceSpan(this.inputIndex));
|
|
3155
3192
|
let n = null;
|
|
3156
3193
|
if (this.next.isRegExpFlags()) {
|
|
3157
3194
|
n = this.next, this.advance();
|
|
3158
|
-
let
|
|
3195
|
+
let i = /* @__PURE__ */ new Set();
|
|
3159
3196
|
for (let a = 0; a < n.strValue.length; a++) {
|
|
3160
|
-
let
|
|
3161
|
-
|
|
3197
|
+
let p = n.strValue[a];
|
|
3198
|
+
ps.has(p) ? i.has(p) ? this.error(`Duplicate regular expression flag "${p}"`, n.index + a) : i.add(p) : this.error(`Unsupported regular expression flag "${p}". The supported flags are: ` + Array.from(ps, (h) => `"${h}"`).join(", "), n.index + a);
|
|
3162
3199
|
}
|
|
3163
3200
|
}
|
|
3164
|
-
let s = e.index,
|
|
3165
|
-
return new
|
|
3201
|
+
let s = e.index, r = n ? n.end : e.end;
|
|
3202
|
+
return new Ht(this.span(s, r), this.sourceSpan(s, r), e.strValue, n ? n.strValue : null);
|
|
3203
|
+
}
|
|
3204
|
+
parseArrowFunction(e) {
|
|
3205
|
+
let n;
|
|
3206
|
+
if (this.next.isIdentifier()) {
|
|
3207
|
+
let r = this.next;
|
|
3208
|
+
this.advance(), n = [this.getArrowFunctionIdentifierArg(r)];
|
|
3209
|
+
} else this.next.isCharacter(X) ? (this.rparensExpected++, this.advance(), n = this.parseArrowFunctionParameters(), this.rparensExpected--) : (n = [], this.error(`Unexpected token ${this.next}`));
|
|
3210
|
+
this.expectOperator("=>");
|
|
3211
|
+
let s;
|
|
3212
|
+
if (this.next.isCharacter(ke)) this.error("Multi-line arrow functions are not supported. If you meant to return an object literal, wrap it with parentheses."), s = new A(this.span(e), this.sourceSpan(e));
|
|
3213
|
+
else {
|
|
3214
|
+
let r = this.parseFlags;
|
|
3215
|
+
this.parseFlags = 1, s = this.parseExpression(), this.parseFlags = r;
|
|
3216
|
+
}
|
|
3217
|
+
return new Ut(this.span(e), this.sourceSpan(e), n, s);
|
|
3218
|
+
}
|
|
3219
|
+
parseArrowFunctionParameters() {
|
|
3220
|
+
let e = [];
|
|
3221
|
+
if (!this.consumeOptionalCharacter(N)) for (; this.next !== Se;) if (this.next.isIdentifier()) {
|
|
3222
|
+
let n = this.next;
|
|
3223
|
+
if (this.advance(), e.push(this.getArrowFunctionIdentifierArg(n)), this.consumeOptionalCharacter(N)) break;
|
|
3224
|
+
this.expectCharacter(F);
|
|
3225
|
+
} else {
|
|
3226
|
+
this.error(`Unexpected token ${this.next}`);
|
|
3227
|
+
break;
|
|
3228
|
+
}
|
|
3229
|
+
return e;
|
|
3230
|
+
}
|
|
3231
|
+
getArrowFunctionIdentifierArg(e) {
|
|
3232
|
+
return new Vt(e.strValue, this.span(e.index), this.sourceSpan(e.index));
|
|
3233
|
+
}
|
|
3234
|
+
isArrowFunction() {
|
|
3235
|
+
let e = this.index, n = this.tokens;
|
|
3236
|
+
if (e > n.length - 2) return !1;
|
|
3237
|
+
if (n[e].isIdentifier() && n[e + 1].isOperator("=>")) return !0;
|
|
3238
|
+
if (n[e].isCharacter(X)) {
|
|
3239
|
+
let s = e + 1;
|
|
3240
|
+
for (; s < n.length && !(!n[s].isIdentifier() && !n[s].isCharacter(F)); s++);
|
|
3241
|
+
return s < n.length - 1 && n[s].isCharacter(N) && n[s + 1].isOperator("=>");
|
|
3242
|
+
}
|
|
3243
|
+
return !1;
|
|
3166
3244
|
}
|
|
3167
3245
|
consumeStatementTerminator() {
|
|
3168
|
-
this.consumeOptionalCharacter(
|
|
3246
|
+
this.consumeOptionalCharacter(Ee) || this.consumeOptionalCharacter(F);
|
|
3169
3247
|
}
|
|
3170
3248
|
error(e, n = this.index) {
|
|
3171
|
-
this.errors.push(
|
|
3249
|
+
this.errors.push(re(e, this.input, this.getErrorLocationText(n), this.parseSourceSpan)), this.skip();
|
|
3172
3250
|
}
|
|
3173
3251
|
getErrorLocationText(e) {
|
|
3174
3252
|
return e < this.tokens.length ? `at column ${this.tokens[e].index + 1} in` : "at the end of the expression";
|
|
@@ -3179,36 +3257,36 @@ var ts = new Set([
|
|
|
3179
3257
|
}
|
|
3180
3258
|
skip() {
|
|
3181
3259
|
let e = this.next;
|
|
3182
|
-
for (; this.index < this.tokens.length && !e.isCharacter(
|
|
3260
|
+
for (; this.index < this.tokens.length && !e.isCharacter(Ee) && !e.isOperator("|") && (this.rparensExpected <= 0 || !e.isCharacter(N)) && (this.rbracesExpected <= 0 || !e.isCharacter(ne)) && (this.rbracketsExpected <= 0 || !e.isCharacter(Q)) && (!(this.context & se.Writable) || !this.isAssignmentOperator(e));) this.next.isError() && this.errors.push(re(this.next.toString(), this.input, this.getErrorLocationText(this.next.index), this.parseSourceSpan)), this.advance(), e = this.next;
|
|
3183
3261
|
}
|
|
3184
3262
|
};
|
|
3185
|
-
function
|
|
3263
|
+
function re(t, e, n, s) {
|
|
3186
3264
|
n.length > 0 && (n = ` ${n} `);
|
|
3187
|
-
let
|
|
3188
|
-
return new
|
|
3265
|
+
let r = V(s);
|
|
3266
|
+
return new Pe(s, `Parser Error: ${t}${n}[${e}] in ${r}`);
|
|
3189
3267
|
}
|
|
3190
|
-
var
|
|
3268
|
+
var Kt = class extends Wt {
|
|
3191
3269
|
errors = [];
|
|
3192
3270
|
visitPipe() {
|
|
3193
3271
|
this.errors.push("pipes");
|
|
3194
3272
|
}
|
|
3195
3273
|
};
|
|
3196
|
-
function
|
|
3197
|
-
let e = /* @__PURE__ */ new Map(), n = 0, s = 0,
|
|
3198
|
-
for (;
|
|
3199
|
-
let
|
|
3200
|
-
if (
|
|
3201
|
-
let [a,
|
|
3202
|
-
n +=
|
|
3274
|
+
function Oi(t) {
|
|
3275
|
+
let e = /* @__PURE__ */ new Map(), n = 0, s = 0, r = 0;
|
|
3276
|
+
for (; r < t.length;) {
|
|
3277
|
+
let i = t[r];
|
|
3278
|
+
if (i.type === 9) {
|
|
3279
|
+
let [a, p] = i.parts;
|
|
3280
|
+
n += p.length, s += a.length;
|
|
3203
3281
|
} else {
|
|
3204
|
-
let a =
|
|
3282
|
+
let a = i.parts.reduce((p, h) => p + h.length, 0);
|
|
3205
3283
|
s += a, n += a;
|
|
3206
3284
|
}
|
|
3207
|
-
e.set(s, n),
|
|
3285
|
+
e.set(s, n), r++;
|
|
3208
3286
|
}
|
|
3209
3287
|
return e;
|
|
3210
3288
|
}
|
|
3211
|
-
var
|
|
3289
|
+
var Di = new Map(Object.entries({
|
|
3212
3290
|
class: "className",
|
|
3213
3291
|
for: "htmlFor",
|
|
3214
3292
|
formaction: "formAction",
|
|
@@ -3264,267 +3342,294 @@ var Er = new Map(Object.entries({
|
|
|
3264
3342
|
"aria-valuenow": "ariaValueNow",
|
|
3265
3343
|
"aria-valuetext": "ariaValueText"
|
|
3266
3344
|
}));
|
|
3267
|
-
Array.from(
|
|
3268
|
-
new
|
|
3269
|
-
function
|
|
3345
|
+
Array.from(Di).reduce((t, [e, n]) => (t.set(e, n), t), /* @__PURE__ */ new Map());
|
|
3346
|
+
new he(new Le());
|
|
3347
|
+
function L(t) {
|
|
3270
3348
|
return (e) => e.kind === t;
|
|
3271
3349
|
}
|
|
3272
|
-
function
|
|
3273
|
-
return (n) => n.kind === t && e === n.expression instanceof
|
|
3350
|
+
function be(t, e) {
|
|
3351
|
+
return (n) => n.kind === t && e === n.expression instanceof pe;
|
|
3274
3352
|
}
|
|
3275
|
-
|
|
3276
|
-
|
|
3353
|
+
L(l.StyleMap), L(l.ClassMap), L(l.StyleProp), L(l.ClassProp), be(l.Attribute, !0), be(l.Property, !0), be(l.Attribute, !1), L(l.Control);
|
|
3354
|
+
be(l.DomProperty, !0), be(l.DomProperty, !1), L(l.Attribute), L(l.StyleMap), L(l.ClassMap), L(l.StyleProp), L(l.ClassProp);
|
|
3277
3355
|
new Set([
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3356
|
+
l.Listener,
|
|
3357
|
+
l.TwoWayListener,
|
|
3358
|
+
l.AnimationListener,
|
|
3359
|
+
l.StyleMap,
|
|
3360
|
+
l.ClassMap,
|
|
3361
|
+
l.StyleProp,
|
|
3362
|
+
l.ClassProp,
|
|
3363
|
+
l.Property,
|
|
3364
|
+
l.TwoWayProperty,
|
|
3365
|
+
l.DomProperty,
|
|
3366
|
+
l.Attribute,
|
|
3367
|
+
l.Animation,
|
|
3368
|
+
l.Control
|
|
3291
3369
|
]);
|
|
3292
3370
|
new Map([
|
|
3293
|
-
[
|
|
3294
|
-
none:
|
|
3295
|
-
prefetch:
|
|
3296
|
-
hydrate:
|
|
3371
|
+
[$.Idle, {
|
|
3372
|
+
none: c.deferOnIdle,
|
|
3373
|
+
prefetch: c.deferPrefetchOnIdle,
|
|
3374
|
+
hydrate: c.deferHydrateOnIdle
|
|
3297
3375
|
}],
|
|
3298
|
-
[
|
|
3299
|
-
none:
|
|
3300
|
-
prefetch:
|
|
3301
|
-
hydrate:
|
|
3376
|
+
[$.Immediate, {
|
|
3377
|
+
none: c.deferOnImmediate,
|
|
3378
|
+
prefetch: c.deferPrefetchOnImmediate,
|
|
3379
|
+
hydrate: c.deferHydrateOnImmediate
|
|
3302
3380
|
}],
|
|
3303
|
-
[
|
|
3304
|
-
none:
|
|
3305
|
-
prefetch:
|
|
3306
|
-
hydrate:
|
|
3381
|
+
[$.Timer, {
|
|
3382
|
+
none: c.deferOnTimer,
|
|
3383
|
+
prefetch: c.deferPrefetchOnTimer,
|
|
3384
|
+
hydrate: c.deferHydrateOnTimer
|
|
3307
3385
|
}],
|
|
3308
|
-
[
|
|
3309
|
-
none:
|
|
3310
|
-
prefetch:
|
|
3311
|
-
hydrate:
|
|
3386
|
+
[$.Hover, {
|
|
3387
|
+
none: c.deferOnHover,
|
|
3388
|
+
prefetch: c.deferPrefetchOnHover,
|
|
3389
|
+
hydrate: c.deferHydrateOnHover
|
|
3312
3390
|
}],
|
|
3313
|
-
[
|
|
3314
|
-
none:
|
|
3315
|
-
prefetch:
|
|
3316
|
-
hydrate:
|
|
3391
|
+
[$.Interaction, {
|
|
3392
|
+
none: c.deferOnInteraction,
|
|
3393
|
+
prefetch: c.deferPrefetchOnInteraction,
|
|
3394
|
+
hydrate: c.deferHydrateOnInteraction
|
|
3317
3395
|
}],
|
|
3318
|
-
[
|
|
3319
|
-
none:
|
|
3320
|
-
prefetch:
|
|
3321
|
-
hydrate:
|
|
3396
|
+
[$.Viewport, {
|
|
3397
|
+
none: c.deferOnViewport,
|
|
3398
|
+
prefetch: c.deferPrefetchOnViewport,
|
|
3399
|
+
hydrate: c.deferHydrateOnViewport
|
|
3322
3400
|
}],
|
|
3323
|
-
[
|
|
3324
|
-
none:
|
|
3325
|
-
prefetch:
|
|
3326
|
-
hydrate:
|
|
3401
|
+
[$.Never, {
|
|
3402
|
+
none: c.deferHydrateNever,
|
|
3403
|
+
prefetch: c.deferHydrateNever,
|
|
3404
|
+
hydrate: c.deferHydrateNever
|
|
3327
3405
|
}]
|
|
3328
3406
|
]);
|
|
3329
|
-
|
|
3330
|
-
|
|
3407
|
+
c.pipeBind1, c.pipeBind2, c.pipeBind3, c.pipeBind4;
|
|
3408
|
+
c.interpolate, c.interpolate1, c.interpolate2, c.interpolate3, c.interpolate4, c.interpolate5, c.interpolate6, c.interpolate7, c.interpolate8, c.interpolateV;
|
|
3331
3409
|
new Map([
|
|
3332
|
-
["window",
|
|
3333
|
-
["document",
|
|
3334
|
-
["body",
|
|
3410
|
+
["window", c.resolveWindow],
|
|
3411
|
+
["document", c.resolveDocument],
|
|
3412
|
+
["body", c.resolveBody]
|
|
3335
3413
|
]);
|
|
3336
3414
|
new Map([
|
|
3337
|
-
[
|
|
3338
|
-
[
|
|
3339
|
-
[
|
|
3340
|
-
[
|
|
3341
|
-
[
|
|
3342
|
-
[
|
|
3415
|
+
[P.HTML, c.sanitizeHtml],
|
|
3416
|
+
[P.RESOURCE_URL, c.sanitizeResourceUrl],
|
|
3417
|
+
[P.SCRIPT, c.sanitizeScript],
|
|
3418
|
+
[P.STYLE, c.sanitizeStyle],
|
|
3419
|
+
[P.URL, c.sanitizeUrl],
|
|
3420
|
+
[P.ATTRIBUTE_NO_BINDING, c.validateAttribute]
|
|
3343
3421
|
]);
|
|
3344
|
-
new Map([[
|
|
3345
|
-
var
|
|
3422
|
+
new Map([[P.HTML, c.trustConstantHtml], [P.RESOURCE_URL, c.trustConstantResourceUrl]]);
|
|
3423
|
+
var hs;
|
|
3346
3424
|
(function(t) {
|
|
3347
3425
|
t[t.None = 0] = "None", t[t.ViewContextRead = 1] = "ViewContextRead", t[t.ViewContextWrite = 2] = "ViewContextWrite", t[t.SideEffectful = 4] = "SideEffectful";
|
|
3348
|
-
})(
|
|
3426
|
+
})(hs || (hs = {}));
|
|
3427
|
+
new Set([
|
|
3428
|
+
l.Container,
|
|
3429
|
+
l.ContainerStart,
|
|
3430
|
+
l.ContainerEnd,
|
|
3431
|
+
l.Element,
|
|
3432
|
+
l.ElementStart,
|
|
3433
|
+
l.ElementEnd,
|
|
3434
|
+
l.Template
|
|
3435
|
+
]);
|
|
3349
3436
|
new Map([
|
|
3350
|
-
[
|
|
3351
|
-
[
|
|
3352
|
-
[
|
|
3353
|
-
[
|
|
3354
|
-
[
|
|
3355
|
-
[
|
|
3356
|
-
[
|
|
3437
|
+
[M.Property, R.Property],
|
|
3438
|
+
[M.TwoWay, R.TwoWayProperty],
|
|
3439
|
+
[M.Attribute, R.Attribute],
|
|
3440
|
+
[M.Class, R.ClassName],
|
|
3441
|
+
[M.Style, R.StyleProperty],
|
|
3442
|
+
[M.LegacyAnimation, R.LegacyAnimation],
|
|
3443
|
+
[M.Animation, R.Animation]
|
|
3357
3444
|
]);
|
|
3358
|
-
var
|
|
3445
|
+
var fs;
|
|
3359
3446
|
(function(t) {
|
|
3360
3447
|
t[t.NG_CONTENT = 0] = "NG_CONTENT", t[t.STYLE = 1] = "STYLE", t[t.STYLESHEET = 2] = "STYLESHEET", t[t.SCRIPT = 3] = "SCRIPT", t[t.OTHER = 4] = "OTHER";
|
|
3361
|
-
})(
|
|
3362
|
-
var
|
|
3448
|
+
})(fs || (fs = {}));
|
|
3449
|
+
var ds;
|
|
3363
3450
|
(function(t) {
|
|
3364
3451
|
t.IDLE = "idle", t.TIMER = "timer", t.INTERACTION = "interaction", t.IMMEDIATE = "immediate", t.HOVER = "hover", t.VIEWPORT = "viewport", t.NEVER = "never";
|
|
3365
|
-
})(
|
|
3366
|
-
var
|
|
3367
|
-
`${
|
|
3368
|
-
`${
|
|
3369
|
-
var
|
|
3452
|
+
})(ds || (ds = {}));
|
|
3453
|
+
var Ns = "%COMP%";
|
|
3454
|
+
`${Ns}`;
|
|
3455
|
+
`${Ns}`;
|
|
3456
|
+
var ms;
|
|
3370
3457
|
(function(t) {
|
|
3371
3458
|
t[t.Extract = 0] = "Extract", t[t.Merge = 1] = "Merge";
|
|
3372
|
-
})(
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3459
|
+
})(ms || (ms = {}));
|
|
3460
|
+
var gs;
|
|
3461
|
+
(function(t) {
|
|
3462
|
+
t[t.Selector = 0] = "Selector", t[t.HostDirective = 1] = "HostDirective";
|
|
3463
|
+
})(gs || (gs = {}));
|
|
3464
|
+
new bt("21.2.8");
|
|
3465
|
+
var Fi = "test.html";
|
|
3466
|
+
function Ps(t) {
|
|
3467
|
+
let e = new Xe(t, Fi), n = new Ge(e, 0, 0, 0), s = n.moveBy(t.length);
|
|
3377
3468
|
return {
|
|
3378
3469
|
text: t,
|
|
3379
3470
|
file: e,
|
|
3380
3471
|
start: n,
|
|
3381
3472
|
end: s,
|
|
3382
|
-
sourceSpan: new
|
|
3473
|
+
sourceSpan: new Je(n, s)
|
|
3383
3474
|
};
|
|
3384
3475
|
}
|
|
3385
|
-
var
|
|
3386
|
-
function
|
|
3387
|
-
return
|
|
3476
|
+
var Vi;
|
|
3477
|
+
function Ls() {
|
|
3478
|
+
return Vi ?? (Vi = new he(new Le()));
|
|
3388
3479
|
}
|
|
3389
|
-
var
|
|
3390
|
-
function
|
|
3391
|
-
let e =
|
|
3480
|
+
var Ui = (t) => he.prototype._commentStart(t);
|
|
3481
|
+
function Hi(t) {
|
|
3482
|
+
let e = Ui(t);
|
|
3392
3483
|
return e === null ? [] : [{
|
|
3393
3484
|
type: "CommentLine",
|
|
3394
3485
|
value: t.slice(e + 2),
|
|
3395
|
-
...
|
|
3486
|
+
...Re({
|
|
3396
3487
|
start: e,
|
|
3397
3488
|
end: t.length
|
|
3398
3489
|
})
|
|
3399
3490
|
}];
|
|
3400
3491
|
}
|
|
3401
|
-
function
|
|
3492
|
+
function Ms(t) {
|
|
3402
3493
|
let { result: e } = t;
|
|
3403
3494
|
if (e.errors.length !== 0) {
|
|
3404
3495
|
let [n] = e.errors;
|
|
3405
|
-
if (!(n instanceof
|
|
3496
|
+
if (!(n instanceof Pe)) throw n;
|
|
3406
3497
|
let { message: s } = n;
|
|
3407
3498
|
{
|
|
3408
3499
|
let a = s.match(/ in .*?@\d+:\d+$/);
|
|
3409
3500
|
a && (s = s.slice(0, a.index));
|
|
3410
3501
|
}
|
|
3411
|
-
let
|
|
3502
|
+
let r = t.start;
|
|
3412
3503
|
{
|
|
3413
3504
|
let a = s.match(/at column (?<index>\d+)/);
|
|
3414
|
-
a && (s = s.slice(0, a.index),
|
|
3505
|
+
a && (s = s.slice(0, a.index), r = r.moveBy(Number(a.groups.index)));
|
|
3415
3506
|
}
|
|
3416
|
-
let
|
|
3417
|
-
throw Object.assign(
|
|
3418
|
-
location:
|
|
3507
|
+
let i = new SyntaxError(s.trim(), { cause: n });
|
|
3508
|
+
throw Object.assign(i, {
|
|
3509
|
+
location: r,
|
|
3419
3510
|
span: n.span
|
|
3420
|
-
}),
|
|
3511
|
+
}), i.cause ?? (i.cause = n), i;
|
|
3421
3512
|
}
|
|
3422
3513
|
return t;
|
|
3423
3514
|
}
|
|
3424
|
-
var
|
|
3425
|
-
let n =
|
|
3426
|
-
return
|
|
3515
|
+
var tt = (t) => (e) => {
|
|
3516
|
+
let n = Ps(e);
|
|
3517
|
+
return Ms({
|
|
3427
3518
|
...n,
|
|
3428
|
-
result:
|
|
3429
|
-
comments:
|
|
3519
|
+
result: Ls()[t](e, n.sourceSpan, 0),
|
|
3520
|
+
comments: Hi(e)
|
|
3430
3521
|
});
|
|
3431
|
-
},
|
|
3432
|
-
let e =
|
|
3433
|
-
return
|
|
3522
|
+
}, Rs = tt("parseAction"), $s = tt("parseBinding"), Os = tt("parseSimpleBinding"), Ds = tt("parseInterpolationExpression"), Bs = (t) => {
|
|
3523
|
+
let e = Ps(t);
|
|
3524
|
+
return Ms({
|
|
3434
3525
|
...e,
|
|
3435
|
-
result:
|
|
3526
|
+
result: Ls().parseTemplateBindings("", t, e.sourceSpan, 0, 0),
|
|
3436
3527
|
comments: []
|
|
3437
3528
|
});
|
|
3438
3529
|
};
|
|
3439
|
-
var
|
|
3530
|
+
var nt = class {
|
|
3440
3531
|
text;
|
|
3441
3532
|
constructor(t) {
|
|
3442
3533
|
this.text = t;
|
|
3443
3534
|
}
|
|
3444
3535
|
getCharacterIndex(t, e) {
|
|
3445
|
-
return
|
|
3536
|
+
return Sn(this.text, t, e);
|
|
3446
3537
|
}
|
|
3447
3538
|
transformSpan(t) {
|
|
3448
|
-
return
|
|
3539
|
+
return Re(t);
|
|
3449
3540
|
}
|
|
3450
3541
|
createNode(t, e) {
|
|
3451
|
-
let n = t.start, s = t.end,
|
|
3452
|
-
e && (Array.isArray(e) ? ([n, s] = e,
|
|
3453
|
-
|
|
3454
|
-
if (!(typeof n == "number" && typeof s == "number" &&
|
|
3455
|
-
let
|
|
3542
|
+
let n = t.start, s = t.end, r = t.range;
|
|
3543
|
+
e && (Array.isArray(e) ? ([n, s] = e, r = e) : ({start: n, end: s} = e.sourceSpan ?? e, r = [n, s]));
|
|
3544
|
+
r ? [n, s] = r : typeof n == "number" && typeof s == "number" && (r = [n, s]);
|
|
3545
|
+
if (!(typeof n == "number" && typeof s == "number" && r)) throw new Error("Missing location information");
|
|
3546
|
+
let i = {
|
|
3456
3547
|
...t,
|
|
3457
3548
|
start: n,
|
|
3458
3549
|
end: s,
|
|
3459
|
-
range:
|
|
3550
|
+
range: r
|
|
3460
3551
|
};
|
|
3461
|
-
switch (
|
|
3552
|
+
switch (i.type) {
|
|
3462
3553
|
case "NumericLiteral":
|
|
3463
3554
|
case "StringLiteral":
|
|
3464
3555
|
case "RegExpLiteral": {
|
|
3465
|
-
let a = this.text.slice(n, s), { value:
|
|
3466
|
-
|
|
3467
|
-
...
|
|
3556
|
+
let a = this.text.slice(n, s), { value: p } = i;
|
|
3557
|
+
i.extra = {
|
|
3558
|
+
...i.extra,
|
|
3468
3559
|
raw: a,
|
|
3469
|
-
rawValue:
|
|
3560
|
+
rawValue: p
|
|
3470
3561
|
};
|
|
3471
3562
|
break;
|
|
3472
3563
|
}
|
|
3473
3564
|
}
|
|
3474
|
-
return
|
|
3565
|
+
return i;
|
|
3475
3566
|
}
|
|
3476
3567
|
};
|
|
3477
|
-
var
|
|
3568
|
+
var Fs = Object.defineProperty, Vs = (t, e) => {
|
|
3478
3569
|
let n = {};
|
|
3479
|
-
for (var s in t)
|
|
3570
|
+
for (var s in t) Fs(n, s, {
|
|
3480
3571
|
get: t[s],
|
|
3481
3572
|
enumerable: !0
|
|
3482
3573
|
});
|
|
3483
|
-
return e &&
|
|
3574
|
+
return e && Fs(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
3484
3575
|
};
|
|
3485
|
-
var
|
|
3576
|
+
var Us = (t, e) => ({
|
|
3486
3577
|
type: "ArrayExpression",
|
|
3487
3578
|
elements: e.transformChildren(t.expressions)
|
|
3488
3579
|
});
|
|
3489
|
-
var
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3580
|
+
var Wi = {
|
|
3581
|
+
id: null,
|
|
3582
|
+
generator: !1,
|
|
3583
|
+
async: !1,
|
|
3584
|
+
expression: !0
|
|
3585
|
+
}, Hs = (t, e) => ({
|
|
3586
|
+
type: "ArrowFunctionExpression",
|
|
3587
|
+
params: t.parameters.map((n) => e.createNode({
|
|
3588
|
+
type: "Identifier",
|
|
3589
|
+
name: n.name
|
|
3590
|
+
}, n.sourceSpan)),
|
|
3591
|
+
body: e.transformChild(t.body),
|
|
3592
|
+
...Wi
|
|
3593
|
+
});
|
|
3594
|
+
var Ws = (t, e) => e.transformChild(t.ast);
|
|
3595
|
+
var qi = (t) => t === "&&" || t === "||" || t === "??", qs = (t, e) => {
|
|
3596
|
+
let { operation: n } = t, [s, r] = e.transformChildren([t.left, t.right]);
|
|
3597
|
+
return qi(n) ? {
|
|
3493
3598
|
type: "LogicalExpression",
|
|
3494
3599
|
operator: n,
|
|
3495
3600
|
left: s,
|
|
3496
|
-
right:
|
|
3601
|
+
right: r
|
|
3497
3602
|
} : E.isAssignmentOperation(n) ? {
|
|
3498
3603
|
type: "AssignmentExpression",
|
|
3499
3604
|
left: s,
|
|
3500
|
-
right:
|
|
3605
|
+
right: r,
|
|
3501
3606
|
operator: n
|
|
3502
3607
|
} : {
|
|
3503
3608
|
left: s,
|
|
3504
|
-
right:
|
|
3609
|
+
right: r,
|
|
3505
3610
|
type: "BinaryExpression",
|
|
3506
3611
|
operator: n
|
|
3507
3612
|
};
|
|
3508
3613
|
};
|
|
3509
|
-
var
|
|
3510
|
-
let s = n.transformChildren(e.args),
|
|
3511
|
-
return t ||
|
|
3614
|
+
var ji = { optional: !1 }, zi = { optional: !0 }, js = ({ optional: t }) => (e, n) => {
|
|
3615
|
+
let s = n.transformChildren(e.args), r = n.transformChild(e.receiver);
|
|
3616
|
+
return t || ve(r) ? {
|
|
3512
3617
|
type: "OptionalCallExpression",
|
|
3513
|
-
callee:
|
|
3618
|
+
callee: r,
|
|
3514
3619
|
arguments: s,
|
|
3515
3620
|
optional: t
|
|
3516
3621
|
} : {
|
|
3517
3622
|
type: "CallExpression",
|
|
3518
|
-
callee:
|
|
3623
|
+
callee: r,
|
|
3519
3624
|
arguments: s
|
|
3520
3625
|
};
|
|
3521
|
-
},
|
|
3522
|
-
var
|
|
3626
|
+
}, zs = js(ji), Gs = js(zi);
|
|
3627
|
+
var Xs = (t, e) => ({
|
|
3523
3628
|
type: "NGChainedExpression",
|
|
3524
3629
|
expressions: e.transformChildren(t.expressions)
|
|
3525
3630
|
});
|
|
3526
|
-
var
|
|
3527
|
-
let [n, s,
|
|
3631
|
+
var Js = (t, e) => {
|
|
3632
|
+
let [n, s, r] = e.transformChildren([
|
|
3528
3633
|
t.condition,
|
|
3529
3634
|
t.trueExp,
|
|
3530
3635
|
t.falseExp
|
|
@@ -3533,15 +3638,16 @@ var Bs = (t, e) => {
|
|
|
3533
3638
|
type: "ConditionalExpression",
|
|
3534
3639
|
test: n,
|
|
3535
3640
|
consequent: s,
|
|
3536
|
-
alternate:
|
|
3641
|
+
alternate: r
|
|
3537
3642
|
};
|
|
3538
3643
|
};
|
|
3539
|
-
var
|
|
3644
|
+
var Ys = () => ({ type: "NGEmptyExpression" });
|
|
3645
|
+
var Qs = (t, e) => {
|
|
3540
3646
|
let { expressions: n } = t;
|
|
3541
3647
|
if (n.length !== 1) throw new Error("Unexpected 'Interpolation'");
|
|
3542
3648
|
return e.transformChild(n[0]);
|
|
3543
3649
|
};
|
|
3544
|
-
var
|
|
3650
|
+
var Ks = (t) => {
|
|
3545
3651
|
let { value: e } = t;
|
|
3546
3652
|
switch (typeof e) {
|
|
3547
3653
|
case "boolean": return {
|
|
@@ -3563,83 +3669,83 @@ var Fs = (t) => {
|
|
|
3563
3669
|
};
|
|
3564
3670
|
default: throw new Error(`Unexpected 'LiteralPrimitive' value type ${typeof e}`);
|
|
3565
3671
|
}
|
|
3566
|
-
},
|
|
3672
|
+
}, Zs = (t) => ({
|
|
3567
3673
|
type: "RegExpLiteral",
|
|
3568
3674
|
pattern: t.body,
|
|
3569
3675
|
flags: t.flags ?? ""
|
|
3570
3676
|
});
|
|
3571
|
-
var
|
|
3677
|
+
var Gi = {
|
|
3572
3678
|
computed: !0,
|
|
3573
3679
|
optional: !1
|
|
3574
|
-
},
|
|
3680
|
+
}, Xi = {
|
|
3575
3681
|
computed: !0,
|
|
3576
3682
|
optional: !0
|
|
3577
|
-
},
|
|
3683
|
+
}, Ji = {
|
|
3578
3684
|
computed: !1,
|
|
3579
3685
|
optional: !1
|
|
3580
|
-
},
|
|
3686
|
+
}, Yi = {
|
|
3581
3687
|
computed: !1,
|
|
3582
3688
|
optional: !0
|
|
3583
|
-
},
|
|
3584
|
-
let { receiver:
|
|
3689
|
+
}, st = ({ computed: t, optional: e }) => (n, s) => {
|
|
3690
|
+
let { receiver: r } = n, i;
|
|
3585
3691
|
if (t) {
|
|
3586
|
-
let { key:
|
|
3587
|
-
|
|
3692
|
+
let { key: p } = n;
|
|
3693
|
+
i = s.transformChild(p);
|
|
3588
3694
|
} else {
|
|
3589
|
-
let
|
|
3590
|
-
if (
|
|
3695
|
+
let p = r instanceof ce, { name: h, nameSpan: d } = n;
|
|
3696
|
+
if (i = s.create({
|
|
3591
3697
|
type: "Identifier",
|
|
3592
|
-
name:
|
|
3593
|
-
}, d,
|
|
3698
|
+
name: h
|
|
3699
|
+
}, d, p ? s.ancestors : []), p) return i;
|
|
3594
3700
|
}
|
|
3595
|
-
let a = s.transformChild(
|
|
3596
|
-
return e ||
|
|
3701
|
+
let a = s.transformChild(r);
|
|
3702
|
+
return e || ve(a) ? {
|
|
3597
3703
|
type: "OptionalMemberExpression",
|
|
3598
3704
|
optional: e,
|
|
3599
|
-
property:
|
|
3705
|
+
property: i,
|
|
3600
3706
|
object: a,
|
|
3601
3707
|
computed: t
|
|
3602
3708
|
} : {
|
|
3603
3709
|
type: "MemberExpression",
|
|
3604
|
-
property:
|
|
3710
|
+
property: i,
|
|
3605
3711
|
object: a,
|
|
3606
3712
|
computed: t
|
|
3607
3713
|
};
|
|
3608
|
-
},
|
|
3609
|
-
var
|
|
3714
|
+
}, er = st(Gi), tr = st(Xi), nr = st(Ji), sr = st(Yi);
|
|
3715
|
+
var rr = (t, e) => ({
|
|
3610
3716
|
type: "TSNonNullExpression",
|
|
3611
3717
|
expression: e.transformChild(t.expression)
|
|
3612
3718
|
});
|
|
3613
|
-
var
|
|
3614
|
-
let { keys: n, values: s } = t,
|
|
3719
|
+
var ir = (t, e) => {
|
|
3720
|
+
let { keys: n, values: s } = t, r = (i, a = t) => e.create(i, a, [t, ...e.ancestors]);
|
|
3615
3721
|
return {
|
|
3616
3722
|
type: "ObjectExpression",
|
|
3617
|
-
properties: n.map((
|
|
3618
|
-
let
|
|
3619
|
-
if (
|
|
3723
|
+
properties: n.map((i, a) => {
|
|
3724
|
+
let p = s[a], h = [i.sourceSpan.start, p.sourceSpan.end];
|
|
3725
|
+
if (i.kind === "spread") return r({
|
|
3620
3726
|
type: "SpreadElement",
|
|
3621
|
-
argument: e.transformChild(
|
|
3622
|
-
},
|
|
3623
|
-
let d = !!
|
|
3624
|
-
return
|
|
3727
|
+
argument: e.transformChild(p)
|
|
3728
|
+
}, h);
|
|
3729
|
+
let d = !!i.isShorthandInitialized;
|
|
3730
|
+
return r({
|
|
3625
3731
|
type: "ObjectProperty",
|
|
3626
|
-
key: i
|
|
3732
|
+
key: r(i.quoted ? {
|
|
3627
3733
|
type: "StringLiteral",
|
|
3628
|
-
value:
|
|
3734
|
+
value: i.key
|
|
3629
3735
|
} : {
|
|
3630
3736
|
type: "Identifier",
|
|
3631
|
-
name:
|
|
3632
|
-
},
|
|
3633
|
-
value: e.transformChild(
|
|
3737
|
+
name: i.key
|
|
3738
|
+
}, i.sourceSpan),
|
|
3739
|
+
value: e.transformChild(p),
|
|
3634
3740
|
shorthand: d,
|
|
3635
3741
|
computed: !1,
|
|
3636
3742
|
method: !1
|
|
3637
|
-
},
|
|
3743
|
+
}, h);
|
|
3638
3744
|
})
|
|
3639
3745
|
};
|
|
3640
3746
|
};
|
|
3641
|
-
var
|
|
3642
|
-
var
|
|
3747
|
+
var or = (t, e) => e.transformChild(t.expression);
|
|
3748
|
+
var ar = (t, e) => ({
|
|
3643
3749
|
type: "NGPipeExpression",
|
|
3644
3750
|
left: e.transformChild(t.exp),
|
|
3645
3751
|
right: e.create({
|
|
@@ -3648,20 +3754,20 @@ var Xs = (t, e) => ({
|
|
|
3648
3754
|
}, t.nameSpan),
|
|
3649
3755
|
arguments: e.transformChildren(t.args)
|
|
3650
3756
|
});
|
|
3651
|
-
var
|
|
3757
|
+
var lr = (t, e) => ({
|
|
3652
3758
|
type: "SpreadElement",
|
|
3653
3759
|
argument: e.transformChild(t.expression)
|
|
3654
3760
|
});
|
|
3655
|
-
var
|
|
3761
|
+
var cr = (t, e) => ({
|
|
3656
3762
|
type: "TaggedTemplateExpression",
|
|
3657
3763
|
tag: e.transformChild(t.tag),
|
|
3658
3764
|
quasi: e.transformChild(t.template)
|
|
3659
|
-
}),
|
|
3765
|
+
}), ur = (t, e) => ({
|
|
3660
3766
|
type: "TemplateLiteral",
|
|
3661
3767
|
quasis: e.transformChildren(t.elements),
|
|
3662
3768
|
expressions: e.transformChildren(t.expressions)
|
|
3663
|
-
}),
|
|
3664
|
-
let [n] = e.ancestors, { elements: s } = n,
|
|
3769
|
+
}), pr = (t, e) => {
|
|
3770
|
+
let [n] = e.ancestors, { elements: s } = n, r = s.indexOf(t), i = r === 0, a = r === s.length - 1, p = t.sourceSpan.end - (a ? 1 : 0), h = t.sourceSpan.start + (i ? 1 : 0), d = e.text.slice(h, p);
|
|
3665
3771
|
return {
|
|
3666
3772
|
type: "TemplateElement",
|
|
3667
3773
|
value: {
|
|
@@ -3669,68 +3775,70 @@ var Ys = (t, e) => ({
|
|
|
3669
3775
|
raw: d
|
|
3670
3776
|
},
|
|
3671
3777
|
tail: a,
|
|
3672
|
-
range: [
|
|
3778
|
+
range: [h, p]
|
|
3673
3779
|
};
|
|
3674
3780
|
};
|
|
3675
|
-
var
|
|
3676
|
-
var
|
|
3781
|
+
var hr = () => ({ type: "ThisExpression" });
|
|
3782
|
+
var sn = (t) => (e, n) => ({
|
|
3677
3783
|
type: "UnaryExpression",
|
|
3678
3784
|
prefix: !0,
|
|
3679
3785
|
operator: t,
|
|
3680
3786
|
argument: n.transformChild(e.expression)
|
|
3681
|
-
}),
|
|
3787
|
+
}), fr = sn("!"), dr = sn("typeof"), mr = sn("void"), gr = (t, e) => ({
|
|
3682
3788
|
type: "UnaryExpression",
|
|
3683
3789
|
prefix: !0,
|
|
3684
3790
|
argument: e.transformChild(t.expr),
|
|
3685
3791
|
operator: t.operator
|
|
3686
3792
|
});
|
|
3687
|
-
var
|
|
3793
|
+
var Qi = (t) => {
|
|
3688
3794
|
throw new Error(`Unexpected node type '${t.constructor.name}'`);
|
|
3689
|
-
},
|
|
3690
|
-
var
|
|
3691
|
-
visitASTWithSource: () =>
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3795
|
+
}, vr = Qi;
|
|
3796
|
+
var xr = Vs({
|
|
3797
|
+
visitASTWithSource: () => Ws,
|
|
3798
|
+
visitArrowFunction: () => Hs,
|
|
3799
|
+
visitBinary: () => qs,
|
|
3800
|
+
visitCall: () => zs,
|
|
3801
|
+
visitChain: () => Xs,
|
|
3802
|
+
visitConditional: () => Js,
|
|
3803
|
+
visitEmptyExpr: () => Ys,
|
|
3804
|
+
visitImplicitReceiver: () => vr,
|
|
3805
|
+
visitInterpolation: () => Qs,
|
|
3806
|
+
visitKeyedRead: () => er,
|
|
3807
|
+
visitLiteralArray: () => Us,
|
|
3808
|
+
visitLiteralMap: () => ir,
|
|
3809
|
+
visitLiteralPrimitive: () => Ks,
|
|
3810
|
+
visitNonNullAssert: () => rr,
|
|
3811
|
+
visitParenthesizedExpression: () => or,
|
|
3812
|
+
visitPipe: () => ar,
|
|
3813
|
+
visitPrefixNot: () => fr,
|
|
3814
|
+
visitPropertyRead: () => nr,
|
|
3815
|
+
visitRegularExpressionLiteral: () => Zs,
|
|
3816
|
+
visitSafeCall: () => Gs,
|
|
3817
|
+
visitSafeKeyedRead: () => tr,
|
|
3818
|
+
visitSafePropertyRead: () => sr,
|
|
3819
|
+
visitSpreadElement: () => lr,
|
|
3820
|
+
visitTaggedTemplateLiteral: () => cr,
|
|
3821
|
+
visitTemplateLiteral: () => ur,
|
|
3822
|
+
visitTemplateLiteralElement: () => pr,
|
|
3823
|
+
visitThisReceiver: () => hr,
|
|
3824
|
+
visitTypeofExpression: () => dr,
|
|
3825
|
+
visitUnary: () => gr,
|
|
3826
|
+
visitVoidExpression: () => mr
|
|
3719
3827
|
});
|
|
3720
|
-
var
|
|
3828
|
+
var rt = class rn extends nt {
|
|
3721
3829
|
node;
|
|
3722
3830
|
ancestors;
|
|
3723
3831
|
constructor({ node: e, text: n, ancestors: s = [] }) {
|
|
3724
3832
|
super(n), this.node = e, this.ancestors = s;
|
|
3725
3833
|
}
|
|
3726
3834
|
create(e, n, s = this.ancestors) {
|
|
3727
|
-
return s[0] instanceof
|
|
3835
|
+
return s[0] instanceof Ie && (e.extra = {
|
|
3728
3836
|
...e.extra,
|
|
3729
3837
|
parenthesized: !0
|
|
3730
3838
|
}), super.createNode(e, e.range ?? n ?? this.node);
|
|
3731
3839
|
}
|
|
3732
3840
|
transformChild(e) {
|
|
3733
|
-
return new
|
|
3841
|
+
return new rn({
|
|
3734
3842
|
node: e,
|
|
3735
3843
|
ancestors: [this.node, ...this.ancestors],
|
|
3736
3844
|
text: this.text
|
|
@@ -3740,20 +3848,18 @@ var Ke = class Jt extends Ye {
|
|
|
3740
3848
|
return e.map((n) => this.transformChild(n));
|
|
3741
3849
|
}
|
|
3742
3850
|
transform() {
|
|
3743
|
-
let { node: e } = this;
|
|
3744
|
-
if (e instanceof b) return this.create({ type: "NGEmptyExpression" });
|
|
3745
|
-
let n = e.visit(oi, this);
|
|
3851
|
+
let { node: e } = this, n = e.visit(xr, this);
|
|
3746
3852
|
return this.create(n, this.node);
|
|
3747
3853
|
}
|
|
3748
3854
|
static transform(e, n) {
|
|
3749
|
-
return new
|
|
3855
|
+
return new rn({
|
|
3750
3856
|
node: e,
|
|
3751
3857
|
text: n,
|
|
3752
3858
|
ancestors: []
|
|
3753
3859
|
}).transform();
|
|
3754
3860
|
}
|
|
3755
3861
|
};
|
|
3756
|
-
var
|
|
3862
|
+
var Sr = class extends rt {
|
|
3757
3863
|
constructor(t) {
|
|
3758
3864
|
super({
|
|
3759
3865
|
node: t,
|
|
@@ -3761,59 +3867,59 @@ var ai = class extends Ke {
|
|
|
3761
3867
|
});
|
|
3762
3868
|
}
|
|
3763
3869
|
};
|
|
3764
|
-
var
|
|
3765
|
-
var
|
|
3766
|
-
function
|
|
3870
|
+
var Er = (t, e) => rt.transform(t, e), yr = (t) => new Sr(t).transform();
|
|
3871
|
+
var Cr = (t, e) => (n, s, ...r) => n | 1 && s == null ? void 0 : (e.call(s) ?? s[t]).apply(s, r);
|
|
3872
|
+
function Ki(t) {
|
|
3767
3873
|
return this[t < 0 ? this.length + t : t];
|
|
3768
3874
|
}
|
|
3769
|
-
var
|
|
3770
|
-
if (Array.isArray(this) || typeof this == "string") return
|
|
3875
|
+
var _r = Cr("at", function() {
|
|
3876
|
+
if (Array.isArray(this) || typeof this == "string") return Ki;
|
|
3771
3877
|
});
|
|
3772
|
-
function
|
|
3773
|
-
return t instanceof
|
|
3878
|
+
function kr(t) {
|
|
3879
|
+
return t instanceof Ne;
|
|
3774
3880
|
}
|
|
3775
|
-
function
|
|
3776
|
-
return t instanceof
|
|
3881
|
+
function Tr(t) {
|
|
3882
|
+
return t instanceof ue;
|
|
3777
3883
|
}
|
|
3778
|
-
var
|
|
3884
|
+
var de, te, m, br, _, on, an, ln, Ar, Ir, Nr, Pr, me, eo = (me = class extends nt {
|
|
3779
3885
|
constructor(n, s) {
|
|
3780
3886
|
super(s);
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
for (let
|
|
3887
|
+
Me(this, m);
|
|
3888
|
+
Me(this, de);
|
|
3889
|
+
Me(this, te);
|
|
3890
|
+
ct(this, de, n), ct(this, te, s);
|
|
3891
|
+
for (let r of n) v(this, m, Ar).call(this, r);
|
|
3786
3892
|
}
|
|
3787
3893
|
get expressions() {
|
|
3788
|
-
return v(this, m,
|
|
3789
|
-
}
|
|
3790
|
-
},
|
|
3791
|
-
return
|
|
3792
|
-
},
|
|
3793
|
-
return
|
|
3794
|
-
},
|
|
3795
|
-
return
|
|
3796
|
-
},
|
|
3797
|
-
return
|
|
3798
|
-
},
|
|
3799
|
-
let s =
|
|
3894
|
+
return v(this, m, Nr).call(this);
|
|
3895
|
+
}
|
|
3896
|
+
}, de = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakSet(), br = function() {
|
|
3897
|
+
return j(this, de)[0].key;
|
|
3898
|
+
}, _ = function(n, s) {
|
|
3899
|
+
return wn(me.prototype, this, "createNode").call(this, n, s);
|
|
3900
|
+
}, on = function(n) {
|
|
3901
|
+
return Er(n, this.text);
|
|
3902
|
+
}, an = function(n) {
|
|
3903
|
+
return En(n.slice(j(this, m, br).source.length));
|
|
3904
|
+
}, ln = function(n) {
|
|
3905
|
+
let s = j(this, te);
|
|
3800
3906
|
if (s[n.start] !== "\"" && s[n.start] !== "'") return;
|
|
3801
|
-
let
|
|
3907
|
+
let r = s[n.start], i = !1;
|
|
3802
3908
|
for (let a = n.start + 1; a < s.length; a++) switch (s[a]) {
|
|
3803
|
-
case
|
|
3909
|
+
case r: if (!i) {
|
|
3804
3910
|
n.end = a + 1;
|
|
3805
3911
|
return;
|
|
3806
3912
|
}
|
|
3807
3913
|
default:
|
|
3808
|
-
|
|
3914
|
+
i = !1;
|
|
3809
3915
|
break;
|
|
3810
3916
|
case "\\":
|
|
3811
|
-
|
|
3917
|
+
i = !i;
|
|
3812
3918
|
break;
|
|
3813
3919
|
}
|
|
3814
|
-
},
|
|
3815
|
-
v(this, m,
|
|
3816
|
-
},
|
|
3920
|
+
}, Ar = function(n) {
|
|
3921
|
+
v(this, m, ln).call(this, n.key.span), Tr(n) && n.value && v(this, m, ln).call(this, n.value.span);
|
|
3922
|
+
}, Ir = function(n) {
|
|
3817
3923
|
if (!n.value || n.value.source) return n.value;
|
|
3818
3924
|
let s = this.getCharacterIndex(/\S/, n.sourceSpan.start);
|
|
3819
3925
|
return {
|
|
@@ -3823,116 +3929,116 @@ var ae, J, m, di, C, Yt, Qt, Kt, mi, gi, vi, xi, le, Br = (le = class extends Ye
|
|
|
3823
3929
|
end: s
|
|
3824
3930
|
}
|
|
3825
3931
|
};
|
|
3826
|
-
},
|
|
3827
|
-
let n =
|
|
3828
|
-
for (let [
|
|
3829
|
-
if (a &&
|
|
3830
|
-
let d = v(this, m,
|
|
3932
|
+
}, Nr = function() {
|
|
3933
|
+
let n = j(this, de), [s] = n, r = j(this, te).slice(s.sourceSpan.start, s.sourceSpan.end).trim().length === 0 ? n.slice(1) : n, i = [], a = null;
|
|
3934
|
+
for (let [p, h] of r.entries()) {
|
|
3935
|
+
if (a && kr(a) && Tr(h) && h.value && h.value.source === a.key.source) {
|
|
3936
|
+
let d = v(this, m, _).call(this, {
|
|
3831
3937
|
type: "NGMicrosyntaxKey",
|
|
3832
|
-
name:
|
|
3833
|
-
},
|
|
3938
|
+
name: h.key.source
|
|
3939
|
+
}, h.key.span), x = (T, C) => ({
|
|
3834
3940
|
...T,
|
|
3835
3941
|
...this.transformSpan({
|
|
3836
3942
|
start: T.start,
|
|
3837
|
-
end:
|
|
3943
|
+
end: C
|
|
3838
3944
|
})
|
|
3839
3945
|
}), D = (T) => ({
|
|
3840
|
-
...
|
|
3946
|
+
...x(T, d.end),
|
|
3841
3947
|
alias: d
|
|
3842
|
-
}),
|
|
3843
|
-
if (
|
|
3844
|
-
else if (
|
|
3845
|
-
let T = D(
|
|
3846
|
-
|
|
3847
|
-
...
|
|
3948
|
+
}), k = i.pop();
|
|
3949
|
+
if (k.type === "NGMicrosyntaxExpression") i.push(D(k));
|
|
3950
|
+
else if (k.type === "NGMicrosyntaxKeyedExpression") {
|
|
3951
|
+
let T = D(k.expression);
|
|
3952
|
+
i.push(x({
|
|
3953
|
+
...k,
|
|
3848
3954
|
expression: T
|
|
3849
3955
|
}, T.end));
|
|
3850
|
-
} else throw new Error(`Unexpected type ${
|
|
3851
|
-
} else
|
|
3852
|
-
a =
|
|
3956
|
+
} else throw new Error(`Unexpected type ${k.type}`);
|
|
3957
|
+
} else i.push(v(this, m, Pr).call(this, h, p));
|
|
3958
|
+
a = h;
|
|
3853
3959
|
}
|
|
3854
|
-
return v(this, m,
|
|
3960
|
+
return v(this, m, _).call(this, {
|
|
3855
3961
|
type: "NGMicrosyntax",
|
|
3856
|
-
body:
|
|
3857
|
-
},
|
|
3858
|
-
start:
|
|
3859
|
-
end:
|
|
3962
|
+
body: i
|
|
3963
|
+
}, i.length === 0 ? n[0].sourceSpan : {
|
|
3964
|
+
start: i[0].start,
|
|
3965
|
+
end: _r(0, i, -1).end
|
|
3860
3966
|
});
|
|
3861
|
-
},
|
|
3862
|
-
if (
|
|
3863
|
-
let { key:
|
|
3864
|
-
return
|
|
3967
|
+
}, Pr = function(n, s) {
|
|
3968
|
+
if (kr(n)) {
|
|
3969
|
+
let { key: r, value: i } = n;
|
|
3970
|
+
return i ? s === 0 ? v(this, m, _).call(this, {
|
|
3865
3971
|
type: "NGMicrosyntaxExpression",
|
|
3866
|
-
expression: v(this, m,
|
|
3972
|
+
expression: v(this, m, on).call(this, i.ast),
|
|
3867
3973
|
alias: null
|
|
3868
|
-
},
|
|
3974
|
+
}, i) : v(this, m, _).call(this, {
|
|
3869
3975
|
type: "NGMicrosyntaxKeyedExpression",
|
|
3870
|
-
key: v(this, m,
|
|
3976
|
+
key: v(this, m, _).call(this, {
|
|
3871
3977
|
type: "NGMicrosyntaxKey",
|
|
3872
|
-
name: v(this, m,
|
|
3873
|
-
},
|
|
3874
|
-
expression: v(this, m,
|
|
3978
|
+
name: v(this, m, an).call(this, r.source)
|
|
3979
|
+
}, r.span),
|
|
3980
|
+
expression: v(this, m, _).call(this, {
|
|
3875
3981
|
type: "NGMicrosyntaxExpression",
|
|
3876
|
-
expression: v(this, m,
|
|
3982
|
+
expression: v(this, m, on).call(this, i.ast),
|
|
3877
3983
|
alias: null
|
|
3878
|
-
},
|
|
3879
|
-
}, [
|
|
3984
|
+
}, i)
|
|
3985
|
+
}, [r.span.start, i.sourceSpan.end]) : v(this, m, _).call(this, {
|
|
3880
3986
|
type: "NGMicrosyntaxKey",
|
|
3881
|
-
name: v(this, m,
|
|
3882
|
-
},
|
|
3987
|
+
name: v(this, m, an).call(this, r.source)
|
|
3988
|
+
}, r.span);
|
|
3883
3989
|
} else {
|
|
3884
|
-
let { key:
|
|
3885
|
-
if (/^let\s$/.test(
|
|
3990
|
+
let { key: r, sourceSpan: i } = n;
|
|
3991
|
+
if (/^let\s$/.test(j(this, te).slice(i.start, i.start + 4))) {
|
|
3886
3992
|
let { value: a } = n;
|
|
3887
|
-
return v(this, m,
|
|
3993
|
+
return v(this, m, _).call(this, {
|
|
3888
3994
|
type: "NGMicrosyntaxLet",
|
|
3889
|
-
key: v(this, m,
|
|
3995
|
+
key: v(this, m, _).call(this, {
|
|
3890
3996
|
type: "NGMicrosyntaxKey",
|
|
3891
|
-
name:
|
|
3892
|
-
},
|
|
3893
|
-
value: a ? v(this, m,
|
|
3997
|
+
name: r.source
|
|
3998
|
+
}, r.span),
|
|
3999
|
+
value: a ? v(this, m, _).call(this, {
|
|
3894
4000
|
type: "NGMicrosyntaxKey",
|
|
3895
4001
|
name: a.source
|
|
3896
4002
|
}, a.span) : null
|
|
3897
|
-
}, [
|
|
4003
|
+
}, [i.start, a ? a.span.end : r.span.end]);
|
|
3898
4004
|
} else {
|
|
3899
|
-
let a = v(this, m,
|
|
3900
|
-
return v(this, m,
|
|
4005
|
+
let a = v(this, m, Ir).call(this, n);
|
|
4006
|
+
return v(this, m, _).call(this, {
|
|
3901
4007
|
type: "NGMicrosyntaxAs",
|
|
3902
|
-
key: v(this, m,
|
|
4008
|
+
key: v(this, m, _).call(this, {
|
|
3903
4009
|
type: "NGMicrosyntaxKey",
|
|
3904
4010
|
name: a.source
|
|
3905
4011
|
}, a.span),
|
|
3906
|
-
alias: v(this, m,
|
|
4012
|
+
alias: v(this, m, _).call(this, {
|
|
3907
4013
|
type: "NGMicrosyntaxKey",
|
|
3908
|
-
name:
|
|
3909
|
-
},
|
|
3910
|
-
}, [a.span.start,
|
|
4014
|
+
name: r.source
|
|
4015
|
+
}, r.span)
|
|
4016
|
+
}, [a.span.start, r.span.end]);
|
|
3911
4017
|
}
|
|
3912
4018
|
}
|
|
3913
|
-
},
|
|
3914
|
-
function
|
|
3915
|
-
return new
|
|
4019
|
+
}, me);
|
|
4020
|
+
function Lr(t, e) {
|
|
4021
|
+
return new eo(t, e).expressions;
|
|
3916
4022
|
}
|
|
3917
|
-
var
|
|
4023
|
+
var it = (t) => (e) => {
|
|
3918
4024
|
let { result: n, comments: s } = t(e);
|
|
3919
|
-
return Object.assign(
|
|
3920
|
-
},
|
|
3921
|
-
|
|
3922
|
-
var
|
|
3923
|
-
function
|
|
4025
|
+
return Object.assign(yr(n), { comments: s });
|
|
4026
|
+
}, ot = it(Rs), cn = it($s);
|
|
4027
|
+
it(Os);
|
|
4028
|
+
var un = it(Ds), pn = (t) => Lr(Bs(t).result.templateBindings, t);
|
|
4029
|
+
function hn(t) {
|
|
3924
4030
|
let e = t.range?.[0] ?? t.start, n = (t.declaration?.decorators ?? t.decorators)?.[0];
|
|
3925
|
-
return n ? Math.min(
|
|
4031
|
+
return n ? Math.min(hn(n), e) : e;
|
|
3926
4032
|
}
|
|
3927
|
-
function
|
|
4033
|
+
function Mr(t) {
|
|
3928
4034
|
return t.range?.[1] ?? t.end;
|
|
3929
4035
|
}
|
|
3930
|
-
function
|
|
4036
|
+
function at(t) {
|
|
3931
4037
|
return {
|
|
3932
4038
|
astFormat: "estree",
|
|
3933
4039
|
parse(e) {
|
|
3934
4040
|
let n = t(e), { comments: s } = n;
|
|
3935
|
-
return delete n.comments, t ===
|
|
4041
|
+
return delete n.comments, t === ot && n.type !== "NGChainedExpression" && (n = {
|
|
3936
4042
|
...n,
|
|
3937
4043
|
type: "NGChainedExpression",
|
|
3938
4044
|
expressions: [n]
|
|
@@ -3942,10 +4048,10 @@ function tt(t) {
|
|
|
3942
4048
|
comments: s
|
|
3943
4049
|
};
|
|
3944
4050
|
},
|
|
3945
|
-
locStart:
|
|
3946
|
-
locEnd:
|
|
4051
|
+
locStart: hn,
|
|
4052
|
+
locEnd: Mr
|
|
3947
4053
|
};
|
|
3948
4054
|
}
|
|
3949
|
-
var
|
|
4055
|
+
var no = at(ot), so = at(cn), ro = at(un), io = at(pn);
|
|
3950
4056
|
//#endregion
|
|
3951
|
-
export {
|
|
4057
|
+
export { Rr as default, fn as parsers };
|