@kubb/core 3.0.0-alpha.15 → 3.0.0-alpha.17

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.
Files changed (108) hide show
  1. package/dist/acorn-BDQRFTH5.js +3009 -0
  2. package/dist/acorn-BDQRFTH5.js.map +1 -0
  3. package/dist/acorn-SWAHAI7X.cjs +3015 -0
  4. package/dist/acorn-SWAHAI7X.cjs.map +1 -0
  5. package/dist/angular-7QLNOURG.js +1537 -0
  6. package/dist/angular-7QLNOURG.js.map +1 -0
  7. package/dist/angular-W2RY3LST.cjs +1543 -0
  8. package/dist/angular-W2RY3LST.cjs.map +1 -0
  9. package/dist/babel-GWHGORSH.js +6899 -0
  10. package/dist/babel-GWHGORSH.js.map +1 -0
  11. package/dist/babel-Z3QMLNRG.cjs +6905 -0
  12. package/dist/babel-Z3QMLNRG.cjs.map +1 -0
  13. package/dist/{chunk-HSOPQXAZ.cjs → chunk-73IP2I4Z.cjs} +36 -35
  14. package/dist/chunk-73IP2I4Z.cjs.map +1 -0
  15. package/dist/{chunk-LCONSKJV.cjs → chunk-B32U3U36.cjs} +8 -8
  16. package/dist/{chunk-LCONSKJV.cjs.map → chunk-B32U3U36.cjs.map} +1 -1
  17. package/dist/{chunk-GWZ4GG5H.cjs → chunk-BUNKJZH3.cjs} +10 -10
  18. package/dist/{chunk-GWZ4GG5H.cjs.map → chunk-BUNKJZH3.cjs.map} +1 -1
  19. package/dist/{chunk-U4NVHXG7.cjs → chunk-GDBJNFFQ.cjs} +4 -4
  20. package/dist/{chunk-U4NVHXG7.cjs.map → chunk-GDBJNFFQ.cjs.map} +1 -1
  21. package/dist/{chunk-Z5PJTU5Y.cjs → chunk-IR265SBR.cjs} +12 -4
  22. package/dist/chunk-IR265SBR.cjs.map +1 -0
  23. package/dist/{chunk-IUN6LRFH.js → chunk-IS3U2E4B.js} +5 -4
  24. package/dist/chunk-IS3U2E4B.js.map +1 -0
  25. package/dist/{chunk-E6CN2CZC.js → chunk-JSL2IBGJ.js} +3 -3
  26. package/dist/{chunk-E6CN2CZC.js.map → chunk-JSL2IBGJ.js.map} +1 -1
  27. package/dist/chunk-KHG35XCD.cjs +12933 -0
  28. package/dist/chunk-KHG35XCD.cjs.map +1 -0
  29. package/dist/chunk-OSWGRZMH.js +12927 -0
  30. package/dist/chunk-OSWGRZMH.js.map +1 -0
  31. package/dist/chunk-PZ5AY32C.js +9 -0
  32. package/dist/chunk-PZ5AY32C.js.map +1 -0
  33. package/dist/{chunk-7SY2AKJK.cjs → chunk-PZZ736XC.cjs} +6 -6
  34. package/dist/{chunk-7SY2AKJK.cjs.map → chunk-PZZ736XC.cjs.map} +1 -1
  35. package/dist/{chunk-HBQM723K.js → chunk-ZEL4DI72.js} +3 -3
  36. package/dist/{chunk-HBQM723K.js.map → chunk-ZEL4DI72.js.map} +1 -1
  37. package/dist/estree-4BFMOGHF.js +4367 -0
  38. package/dist/estree-4BFMOGHF.js.map +1 -0
  39. package/dist/estree-GUB2QUYV.cjs +4375 -0
  40. package/dist/estree-GUB2QUYV.cjs.map +1 -0
  41. package/dist/flow-KXNVL5TH.cjs +26268 -0
  42. package/dist/flow-KXNVL5TH.cjs.map +1 -0
  43. package/dist/flow-VXQDDICF.js +26262 -0
  44. package/dist/flow-VXQDDICF.js.map +1 -0
  45. package/dist/glimmer-7L53E5R3.cjs +2852 -0
  46. package/dist/glimmer-7L53E5R3.cjs.map +1 -0
  47. package/dist/glimmer-FBL5UTXI.js +2844 -0
  48. package/dist/glimmer-FBL5UTXI.js.map +1 -0
  49. package/dist/graphql-NAYJ7XUI.cjs +1250 -0
  50. package/dist/graphql-NAYJ7XUI.cjs.map +1 -0
  51. package/dist/graphql-VWUEBAX7.js +1241 -0
  52. package/dist/graphql-VWUEBAX7.js.map +1 -0
  53. package/dist/html-A4Q53WOG.cjs +2754 -0
  54. package/dist/html-A4Q53WOG.cjs.map +1 -0
  55. package/dist/html-SRQHPYU4.js +2745 -0
  56. package/dist/html-SRQHPYU4.js.map +1 -0
  57. package/dist/index.cjs +35 -35
  58. package/dist/index.cjs.map +1 -1
  59. package/dist/index.js +6 -5
  60. package/dist/index.js.map +1 -1
  61. package/dist/logger.cjs +7 -7
  62. package/dist/logger.js +3 -2
  63. package/dist/markdown-7H53GZRF.js +3319 -0
  64. package/dist/markdown-7H53GZRF.js.map +1 -0
  65. package/dist/markdown-UCYRKIQU.cjs +3328 -0
  66. package/dist/markdown-UCYRKIQU.cjs.map +1 -0
  67. package/dist/meriyah-FOV342OF.cjs +2356 -0
  68. package/dist/meriyah-FOV342OF.cjs.map +1 -0
  69. package/dist/meriyah-MBZURH4I.js +2350 -0
  70. package/dist/meriyah-MBZURH4I.js.map +1 -0
  71. package/dist/mocks.cjs +23350 -18
  72. package/dist/mocks.cjs.map +1 -1
  73. package/dist/mocks.d.cts +2 -1
  74. package/dist/mocks.d.ts +2 -1
  75. package/dist/mocks.js +23312 -17
  76. package/dist/mocks.js.map +1 -1
  77. package/dist/postcss-2ZEP7RB4.cjs +4945 -0
  78. package/dist/postcss-2ZEP7RB4.cjs.map +1 -0
  79. package/dist/postcss-TPQQRMEX.js +4936 -0
  80. package/dist/postcss-TPQQRMEX.js.map +1 -0
  81. package/dist/{prompt-WQQUN22Z.js → prompt-EWVFJSYF.js} +4 -3
  82. package/dist/prompt-EWVFJSYF.js.map +1 -0
  83. package/dist/{prompt-KR6JRAMC.cjs → prompt-HYWTP2ND.cjs} +62 -62
  84. package/dist/{prompt-KR6JRAMC.cjs.map → prompt-HYWTP2ND.cjs.map} +1 -1
  85. package/dist/transformers.cjs +23 -23
  86. package/dist/transformers.js +1 -0
  87. package/dist/transformers.js.map +1 -1
  88. package/dist/typescript-HWISSPX7.cjs +19 -0
  89. package/dist/typescript-HWISSPX7.cjs.map +1 -0
  90. package/dist/typescript-IRGFXOHK.js +4 -0
  91. package/dist/typescript-IRGFXOHK.js.map +1 -0
  92. package/dist/utils.cjs +17 -17
  93. package/dist/utils.js +2 -1
  94. package/dist/yaml-HOYUWFS4.cjs +4216 -0
  95. package/dist/yaml-HOYUWFS4.cjs.map +1 -0
  96. package/dist/yaml-Q6KMUOXF.js +4207 -0
  97. package/dist/yaml-Q6KMUOXF.js.map +1 -0
  98. package/package.json +8 -8
  99. package/src/FileManager.ts +1 -1
  100. package/src/__snapshots__/barrel.json +2 -0
  101. package/src/__snapshots__/grouped.json +12 -6
  102. package/src/__snapshots__/ordered.json +12 -6
  103. package/src/build.ts +1 -1
  104. package/src/utils/parser.ts +1 -0
  105. package/dist/chunk-HSOPQXAZ.cjs.map +0 -1
  106. package/dist/chunk-IUN6LRFH.js.map +0 -1
  107. package/dist/chunk-Z5PJTU5Y.cjs.map +0 -1
  108. package/dist/prompt-WQQUN22Z.js.map +0 -1
@@ -0,0 +1,1543 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var chunkIR265SBR_cjs = require('./chunk-IR265SBR.cjs');
6
+
7
+ // ../../node_modules/.pnpm/prettier@3.3.3/node_modules/prettier/plugins/angular.mjs
8
+ chunkIR265SBR_cjs.init_cjs_shims();
9
+ var Je = Object.defineProperty;
10
+ var ae = (r3) => {
11
+ throw TypeError(r3);
12
+ };
13
+ var oe = (r3, t) => {
14
+ for (var e in t) Je(r3, e, { get: t[e], enumerable: true });
15
+ };
16
+ var Ut = (r3, t, e) => t.has(r3) || ae("Cannot " + e);
17
+ var O = (r3, t, e) => (Ut(r3, t, "read from private field"), e ? e.call(r3) : t.get(r3));
18
+ var P = (r3, t, e) => t.has(r3) ? ae("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r3) : t.set(r3, e);
19
+ var Y = (r3, t, e, s) => (Ut(r3, t, "write to private field"), t.set(r3, e), e);
20
+ var c = (r3, t, e) => (Ut(r3, t, "access private method"), e);
21
+ var ne = {};
22
+ oe(ne, { parsers: () => ie });
23
+ var ie = {};
24
+ oe(ie, { __ng_action: () => js, __ng_binding: () => Ys, __ng_directive: () => Js, __ng_interpolation: () => Zs });
25
+ var Z = class {
26
+ constructor(t, e, s, i) {
27
+ this.input = e, this.errLocation = s, this.ctxLocation = i, this.message = `Parser Error: ${t} ${s} [${e}] in ${i}`;
28
+ }
29
+ };
30
+ var b = class {
31
+ constructor(t, e) {
32
+ this.start = t, this.end = e;
33
+ }
34
+ toAbsolute(t) {
35
+ return new L(t + this.start, t + this.end);
36
+ }
37
+ };
38
+ var m = class {
39
+ constructor(t, e) {
40
+ this.span = t, this.sourceSpan = e;
41
+ }
42
+ toString() {
43
+ return "AST";
44
+ }
45
+ };
46
+ var J = class extends m {
47
+ constructor(t, e, s) {
48
+ super(t, e), this.nameSpan = s;
49
+ }
50
+ };
51
+ var $ = class extends m {
52
+ visit(t, e = null) {
53
+ }
54
+ };
55
+ var K = class extends m {
56
+ visit(t, e = null) {
57
+ return t.visitImplicitReceiver(this, e);
58
+ }
59
+ };
60
+ var Lt = class extends K {
61
+ visit(t, e = null) {
62
+ var s;
63
+ return (s = t.visitThisReceiver) == null ? void 0 : s.call(t, this, e);
64
+ }
65
+ };
66
+ var X = class extends m {
67
+ constructor(t, e, s) {
68
+ super(t, e), this.expressions = s;
69
+ }
70
+ visit(t, e = null) {
71
+ return t.visitChain(this, e);
72
+ }
73
+ };
74
+ var tt = class extends m {
75
+ constructor(t, e, s, i, n) {
76
+ super(t, e), this.condition = s, this.trueExp = i, this.falseExp = n;
77
+ }
78
+ visit(t, e = null) {
79
+ return t.visitConditional(this, e);
80
+ }
81
+ };
82
+ var M = class extends J {
83
+ constructor(t, e, s, i, n) {
84
+ super(t, e, s), this.receiver = i, this.name = n;
85
+ }
86
+ visit(t, e = null) {
87
+ return t.visitPropertyRead(this, e);
88
+ }
89
+ };
90
+ var et = class extends J {
91
+ constructor(t, e, s, i, n, a) {
92
+ super(t, e, s), this.receiver = i, this.name = n, this.value = a;
93
+ }
94
+ visit(t, e = null) {
95
+ return t.visitPropertyWrite(this, e);
96
+ }
97
+ };
98
+ var _ = class extends J {
99
+ constructor(t, e, s, i, n) {
100
+ super(t, e, s), this.receiver = i, this.name = n;
101
+ }
102
+ visit(t, e = null) {
103
+ return t.visitSafePropertyRead(this, e);
104
+ }
105
+ };
106
+ var st = class extends m {
107
+ constructor(t, e, s, i) {
108
+ super(t, e), this.receiver = s, this.key = i;
109
+ }
110
+ visit(t, e = null) {
111
+ return t.visitKeyedRead(this, e);
112
+ }
113
+ };
114
+ var U = class extends m {
115
+ constructor(t, e, s, i) {
116
+ super(t, e), this.receiver = s, this.key = i;
117
+ }
118
+ visit(t, e = null) {
119
+ return t.visitSafeKeyedRead(this, e);
120
+ }
121
+ };
122
+ var rt = class extends m {
123
+ constructor(t, e, s, i, n) {
124
+ super(t, e), this.receiver = s, this.key = i, this.value = n;
125
+ }
126
+ visit(t, e = null) {
127
+ return t.visitKeyedWrite(this, e);
128
+ }
129
+ };
130
+ var it = class extends J {
131
+ constructor(t, e, s, i, n, a) {
132
+ super(t, e, a), this.exp = s, this.name = i, this.args = n;
133
+ }
134
+ visit(t, e = null) {
135
+ return t.visitPipe(this, e);
136
+ }
137
+ };
138
+ var E = class extends m {
139
+ constructor(t, e, s) {
140
+ super(t, e), this.value = s;
141
+ }
142
+ visit(t, e = null) {
143
+ return t.visitLiteralPrimitive(this, e);
144
+ }
145
+ };
146
+ var nt = class extends m {
147
+ constructor(t, e, s) {
148
+ super(t, e), this.expressions = s;
149
+ }
150
+ visit(t, e = null) {
151
+ return t.visitLiteralArray(this, e);
152
+ }
153
+ };
154
+ var at = class extends m {
155
+ constructor(t, e, s, i) {
156
+ super(t, e), this.keys = s, this.values = i;
157
+ }
158
+ visit(t, e = null) {
159
+ return t.visitLiteralMap(this, e);
160
+ }
161
+ };
162
+ var ot = class extends m {
163
+ constructor(t, e, s, i) {
164
+ super(t, e), this.strings = s, this.expressions = i;
165
+ }
166
+ visit(t, e = null) {
167
+ return t.visitInterpolation(this, e);
168
+ }
169
+ };
170
+ var A = class extends m {
171
+ constructor(t, e, s, i, n) {
172
+ super(t, e), this.operation = s, this.left = i, this.right = n;
173
+ }
174
+ visit(t, e = null) {
175
+ return t.visitBinary(this, e);
176
+ }
177
+ };
178
+ var F = class r extends A {
179
+ static createMinus(t, e, s) {
180
+ return new r(t, e, "-", s, "-", new E(t, e, 0), s);
181
+ }
182
+ static createPlus(t, e, s) {
183
+ return new r(t, e, "+", s, "-", s, new E(t, e, 0));
184
+ }
185
+ constructor(t, e, s, i, n, a, o) {
186
+ super(t, e, n, a, o), this.operator = s, this.expr = i, this.left = null, this.right = null, this.operation = null;
187
+ }
188
+ visit(t, e = null) {
189
+ return t.visitUnary !== void 0 ? t.visitUnary(this, e) : t.visitBinary(this, e);
190
+ }
191
+ };
192
+ var ct = class extends m {
193
+ constructor(t, e, s) {
194
+ super(t, e), this.expression = s;
195
+ }
196
+ visit(t, e = null) {
197
+ return t.visitPrefixNot(this, e);
198
+ }
199
+ };
200
+ var ht = class extends m {
201
+ constructor(t, e, s) {
202
+ super(t, e), this.expression = s;
203
+ }
204
+ visit(t, e = null) {
205
+ return t.visitNonNullAssert(this, e);
206
+ }
207
+ };
208
+ var pt = class extends m {
209
+ constructor(t, e, s, i, n) {
210
+ super(t, e), this.receiver = s, this.args = i, this.argumentSpan = n;
211
+ }
212
+ visit(t, e = null) {
213
+ return t.visitCall(this, e);
214
+ }
215
+ };
216
+ var D = class extends m {
217
+ constructor(t, e, s, i, n) {
218
+ super(t, e), this.receiver = s, this.args = i, this.argumentSpan = n;
219
+ }
220
+ visit(t, e = null) {
221
+ return t.visitSafeCall(this, e);
222
+ }
223
+ };
224
+ var L = class {
225
+ constructor(t, e) {
226
+ this.start = t, this.end = e;
227
+ }
228
+ };
229
+ var R = class extends m {
230
+ constructor(t, e, s, i, n) {
231
+ super(new b(0, e === null ? 0 : e.length), new L(i, e === null ? i : i + e.length)), this.ast = t, this.source = e, this.location = s, this.errors = n;
232
+ }
233
+ visit(t, e = null) {
234
+ return t.visitASTWithSource ? t.visitASTWithSource(this, e) : this.ast.visit(t, e);
235
+ }
236
+ toString() {
237
+ return `${this.source} in ${this.location}`;
238
+ }
239
+ };
240
+ var W = class {
241
+ constructor(t, e, s) {
242
+ this.sourceSpan = t, this.key = e, this.value = s;
243
+ }
244
+ };
245
+ var ut = class {
246
+ constructor(t, e, s) {
247
+ this.sourceSpan = t, this.key = e, this.value = s;
248
+ }
249
+ };
250
+ var Rt = class {
251
+ visit(t, e) {
252
+ t.visit(this, e);
253
+ }
254
+ visitUnary(t, e) {
255
+ this.visit(t.expr, e);
256
+ }
257
+ visitBinary(t, e) {
258
+ this.visit(t.left, e), this.visit(t.right, e);
259
+ }
260
+ visitChain(t, e) {
261
+ this.visitAll(t.expressions, e);
262
+ }
263
+ visitConditional(t, e) {
264
+ this.visit(t.condition, e), this.visit(t.trueExp, e), this.visit(t.falseExp, e);
265
+ }
266
+ visitPipe(t, e) {
267
+ this.visit(t.exp, e), this.visitAll(t.args, e);
268
+ }
269
+ visitImplicitReceiver(t, e) {
270
+ }
271
+ visitThisReceiver(t, e) {
272
+ }
273
+ visitInterpolation(t, e) {
274
+ this.visitAll(t.expressions, e);
275
+ }
276
+ visitKeyedRead(t, e) {
277
+ this.visit(t.receiver, e), this.visit(t.key, e);
278
+ }
279
+ visitKeyedWrite(t, e) {
280
+ this.visit(t.receiver, e), this.visit(t.key, e), this.visit(t.value, e);
281
+ }
282
+ visitLiteralArray(t, e) {
283
+ this.visitAll(t.expressions, e);
284
+ }
285
+ visitLiteralMap(t, e) {
286
+ this.visitAll(t.values, e);
287
+ }
288
+ visitLiteralPrimitive(t, e) {
289
+ }
290
+ visitPrefixNot(t, e) {
291
+ this.visit(t.expression, e);
292
+ }
293
+ visitNonNullAssert(t, e) {
294
+ this.visit(t.expression, e);
295
+ }
296
+ visitPropertyRead(t, e) {
297
+ this.visit(t.receiver, e);
298
+ }
299
+ visitPropertyWrite(t, e) {
300
+ this.visit(t.receiver, e), this.visit(t.value, e);
301
+ }
302
+ visitSafePropertyRead(t, e) {
303
+ this.visit(t.receiver, e);
304
+ }
305
+ visitSafeKeyedRead(t, e) {
306
+ this.visit(t.receiver, e), this.visit(t.key, e);
307
+ }
308
+ visitCall(t, e) {
309
+ this.visit(t.receiver, e), this.visitAll(t.args, e);
310
+ }
311
+ visitSafeCall(t, e) {
312
+ this.visit(t.receiver, e), this.visitAll(t.args, e);
313
+ }
314
+ visitAll(t, e) {
315
+ for (let s of t) this.visit(s, e);
316
+ }
317
+ };
318
+ var ce;
319
+ (function(r3) {
320
+ r3[r3.DEFAULT = 0] = "DEFAULT", r3[r3.LITERAL_ATTR = 1] = "LITERAL_ATTR", r3[r3.ANIMATION = 2] = "ANIMATION", r3[r3.TWO_WAY = 3] = "TWO_WAY";
321
+ })(ce || (ce = {}));
322
+ var he;
323
+ (function(r3) {
324
+ r3[r3.Regular = 0] = "Regular", r3[r3.Animation = 1] = "Animation", r3[r3.TwoWay = 2] = "TwoWay";
325
+ })(he || (he = {}));
326
+ var pe;
327
+ (function(r3) {
328
+ r3[r3.Property = 0] = "Property", r3[r3.Attribute = 1] = "Attribute", r3[r3.Class = 2] = "Class", r3[r3.Style = 3] = "Style", r3[r3.Animation = 4] = "Animation", r3[r3.TwoWay = 5] = "TwoWay";
329
+ })(pe || (pe = {}));
330
+ function ue(r3) {
331
+ return r3 >= 9 && r3 <= 32 || r3 == 160;
332
+ }
333
+ function B(r3) {
334
+ return 48 <= r3 && r3 <= 57;
335
+ }
336
+ function le(r3) {
337
+ return r3 >= 97 && r3 <= 122 || r3 >= 65 && r3 <= 90;
338
+ }
339
+ function Ft(r3) {
340
+ return r3 === 39 || r3 === 34 || r3 === 96;
341
+ }
342
+ var l;
343
+ (function(r3) {
344
+ r3[r3.Character = 0] = "Character", r3[r3.Identifier = 1] = "Identifier", r3[r3.PrivateIdentifier = 2] = "PrivateIdentifier", r3[r3.Keyword = 3] = "Keyword", r3[r3.String = 4] = "String", r3[r3.Operator = 5] = "Operator", r3[r3.Number = 6] = "Number", r3[r3.Error = 7] = "Error";
345
+ })(l || (l = {}));
346
+ var ks = ["var", "let", "as", "null", "undefined", "true", "false", "if", "else", "this"];
347
+ var yt = class {
348
+ tokenize(t) {
349
+ let e = new Gt(t), s = [], i = e.scanToken();
350
+ for (; i != null; ) s.push(i), i = e.scanToken();
351
+ return s;
352
+ }
353
+ };
354
+ var I = class {
355
+ constructor(t, e, s, i, n) {
356
+ this.index = t, this.end = e, this.type = s, this.numValue = i, this.strValue = n;
357
+ }
358
+ isCharacter(t) {
359
+ return this.type == l.Character && this.numValue == t;
360
+ }
361
+ isNumber() {
362
+ return this.type == l.Number;
363
+ }
364
+ isString() {
365
+ return this.type == l.String;
366
+ }
367
+ isOperator(t) {
368
+ return this.type == l.Operator && this.strValue == t;
369
+ }
370
+ isIdentifier() {
371
+ return this.type == l.Identifier;
372
+ }
373
+ isPrivateIdentifier() {
374
+ return this.type == l.PrivateIdentifier;
375
+ }
376
+ isKeyword() {
377
+ return this.type == l.Keyword;
378
+ }
379
+ isKeywordLet() {
380
+ return this.type == l.Keyword && this.strValue == "let";
381
+ }
382
+ isKeywordAs() {
383
+ return this.type == l.Keyword && this.strValue == "as";
384
+ }
385
+ isKeywordNull() {
386
+ return this.type == l.Keyword && this.strValue == "null";
387
+ }
388
+ isKeywordUndefined() {
389
+ return this.type == l.Keyword && this.strValue == "undefined";
390
+ }
391
+ isKeywordTrue() {
392
+ return this.type == l.Keyword && this.strValue == "true";
393
+ }
394
+ isKeywordFalse() {
395
+ return this.type == l.Keyword && this.strValue == "false";
396
+ }
397
+ isKeywordThis() {
398
+ return this.type == l.Keyword && this.strValue == "this";
399
+ }
400
+ isError() {
401
+ return this.type == l.Error;
402
+ }
403
+ toNumber() {
404
+ return this.type == l.Number ? this.numValue : -1;
405
+ }
406
+ toString() {
407
+ switch (this.type) {
408
+ case l.Character:
409
+ case l.Identifier:
410
+ case l.Keyword:
411
+ case l.Operator:
412
+ case l.PrivateIdentifier:
413
+ case l.String:
414
+ case l.Error:
415
+ return this.strValue;
416
+ case l.Number:
417
+ return this.numValue.toString();
418
+ default:
419
+ return null;
420
+ }
421
+ }
422
+ };
423
+ function ge(r3, t, e) {
424
+ return new I(r3, t, l.Character, e, String.fromCharCode(e));
425
+ }
426
+ function Ns(r3, t, e) {
427
+ return new I(r3, t, l.Identifier, 0, e);
428
+ }
429
+ function Ls(r3, t, e) {
430
+ return new I(r3, t, l.PrivateIdentifier, 0, e);
431
+ }
432
+ function Rs(r3, t, e) {
433
+ return new I(r3, t, l.Keyword, 0, e);
434
+ }
435
+ function Wt(r3, t, e) {
436
+ return new I(r3, t, l.Operator, 0, e);
437
+ }
438
+ function Ps(r3, t, e) {
439
+ return new I(r3, t, l.String, 0, e);
440
+ }
441
+ function bs(r3, t, e) {
442
+ return new I(r3, t, l.Number, e, "");
443
+ }
444
+ function Ks(r3, t, e) {
445
+ return new I(r3, t, l.Error, 0, e);
446
+ }
447
+ var Bt = new I(-1, -1, l.Character, 0, "");
448
+ var Gt = class {
449
+ constructor(t) {
450
+ this.input = t, this.peek = 0, this.index = -1, this.length = t.length, this.advance();
451
+ }
452
+ advance() {
453
+ this.peek = ++this.index >= this.length ? 0 : this.input.charCodeAt(this.index);
454
+ }
455
+ scanToken() {
456
+ let t = this.input, e = this.length, s = this.peek, i = this.index;
457
+ for (; s <= 32; ) if (++i >= e) {
458
+ s = 0;
459
+ break;
460
+ } else s = t.charCodeAt(i);
461
+ if (this.peek = s, this.index = i, i >= e) return null;
462
+ if (me(s)) return this.scanIdentifier();
463
+ if (B(s)) return this.scanNumber(i);
464
+ let n = i;
465
+ switch (s) {
466
+ case 46:
467
+ return this.advance(), B(this.peek) ? this.scanNumber(n) : ge(n, this.index, 46);
468
+ case 40:
469
+ case 41:
470
+ case 123:
471
+ case 125:
472
+ case 91:
473
+ case 93:
474
+ case 44:
475
+ case 58:
476
+ case 59:
477
+ return this.scanCharacter(n, s);
478
+ case 39:
479
+ case 34:
480
+ return this.scanString();
481
+ case 35:
482
+ return this.scanPrivateIdentifier();
483
+ case 43:
484
+ case 45:
485
+ case 42:
486
+ case 47:
487
+ case 37:
488
+ case 94:
489
+ return this.scanOperator(n, String.fromCharCode(s));
490
+ case 63:
491
+ return this.scanQuestion(n);
492
+ case 60:
493
+ case 62:
494
+ return this.scanComplexOperator(n, String.fromCharCode(s), 61, "=");
495
+ case 33:
496
+ case 61:
497
+ return this.scanComplexOperator(n, String.fromCharCode(s), 61, "=", 61, "=");
498
+ case 38:
499
+ return this.scanComplexOperator(n, "&", 38, "&");
500
+ case 124:
501
+ return this.scanComplexOperator(n, "|", 124, "|");
502
+ case 160:
503
+ for (; ue(this.peek); ) this.advance();
504
+ return this.scanToken();
505
+ }
506
+ return this.advance(), this.error(`Unexpected character [${String.fromCharCode(s)}]`, 0);
507
+ }
508
+ scanCharacter(t, e) {
509
+ return this.advance(), ge(t, this.index, e);
510
+ }
511
+ scanOperator(t, e) {
512
+ return this.advance(), Wt(t, this.index, e);
513
+ }
514
+ scanComplexOperator(t, e, s, i, n, a) {
515
+ this.advance();
516
+ let o = e;
517
+ return this.peek == s && (this.advance(), o += i), n != null && this.peek == n && (this.advance(), o += a), Wt(t, this.index, o);
518
+ }
519
+ scanIdentifier() {
520
+ let t = this.index;
521
+ for (this.advance(); Se(this.peek); ) this.advance();
522
+ let e = this.input.substring(t, this.index);
523
+ return ks.indexOf(e) > -1 ? Rs(t, this.index, e) : Ns(t, this.index, e);
524
+ }
525
+ scanPrivateIdentifier() {
526
+ let t = this.index;
527
+ if (this.advance(), !me(this.peek)) return this.error("Invalid character [#]", -1);
528
+ for (; Se(this.peek); ) this.advance();
529
+ let e = this.input.substring(t, this.index);
530
+ return Ls(t, this.index, e);
531
+ }
532
+ scanNumber(t) {
533
+ let e = this.index === t, s = false;
534
+ for (this.advance(); ; ) {
535
+ if (!B(this.peek)) if (this.peek === 95) {
536
+ if (!B(this.input.charCodeAt(this.index - 1)) || !B(this.input.charCodeAt(this.index + 1))) return this.error("Invalid numeric separator", 0);
537
+ s = true;
538
+ } else if (this.peek === 46) e = false;
539
+ else if (Bs(this.peek)) {
540
+ if (this.advance(), Ts(this.peek) && this.advance(), !B(this.peek)) return this.error("Invalid exponent", -1);
541
+ e = false;
542
+ } else break;
543
+ this.advance();
544
+ }
545
+ let i = this.input.substring(t, this.index);
546
+ s && (i = i.replace(/_/g, ""));
547
+ let n = e ? _s(i) : parseFloat(i);
548
+ return bs(t, this.index, n);
549
+ }
550
+ scanString() {
551
+ let t = this.index, e = this.peek;
552
+ this.advance();
553
+ let s = "", i = this.index, n = this.input;
554
+ for (; this.peek != e; ) if (this.peek == 92) {
555
+ s += n.substring(i, this.index);
556
+ let o;
557
+ if (this.advance(), this.peek == 117) {
558
+ let p = n.substring(this.index + 1, this.index + 5);
559
+ if (/^[0-9a-f]+$/i.test(p)) o = parseInt(p, 16);
560
+ else return this.error(`Invalid unicode escape [\\u${p}]`, 0);
561
+ for (let u = 0; u < 5; u++) this.advance();
562
+ } else o = Ms(this.peek), this.advance();
563
+ s += String.fromCharCode(o), i = this.index;
564
+ } else {
565
+ if (this.peek == 0) return this.error("Unterminated quote", 0);
566
+ this.advance();
567
+ }
568
+ let a = n.substring(i, this.index);
569
+ return this.advance(), Ps(t, this.index, s + a);
570
+ }
571
+ scanQuestion(t) {
572
+ this.advance();
573
+ let e = "?";
574
+ return (this.peek === 63 || this.peek === 46) && (e += this.peek === 46 ? "." : "?", this.advance()), Wt(t, this.index, e);
575
+ }
576
+ error(t, e) {
577
+ let s = this.index + e;
578
+ return Ks(s, this.index, `Lexer Error: ${t} at column ${s} in expression [${this.input}]`);
579
+ }
580
+ };
581
+ function me(r3) {
582
+ return 97 <= r3 && r3 <= 122 || 65 <= r3 && r3 <= 90 || r3 == 95 || r3 == 36;
583
+ }
584
+ function Se(r3) {
585
+ return le(r3) || B(r3) || r3 == 95 || r3 == 36;
586
+ }
587
+ function Bs(r3) {
588
+ return r3 == 101 || r3 == 69;
589
+ }
590
+ function Ts(r3) {
591
+ return r3 == 45 || r3 == 43;
592
+ }
593
+ function Ms(r3) {
594
+ switch (r3) {
595
+ case 110:
596
+ return 10;
597
+ case 102:
598
+ return 12;
599
+ case 114:
600
+ return 13;
601
+ case 116:
602
+ return 9;
603
+ case 118:
604
+ return 11;
605
+ default:
606
+ return r3;
607
+ }
608
+ }
609
+ function _s(r3) {
610
+ let t = parseInt(r3);
611
+ if (isNaN(t)) throw new Error("Invalid integer literal when parsing " + r3);
612
+ return t;
613
+ }
614
+ var Us = [/@/, /^\s*$/, /[<>]/, /^[{}]$/, /&(#|[a-z])/i, /^\/\//];
615
+ function Ee(r3, t) {
616
+ if (t != null && !(Array.isArray(t) && t.length == 2)) throw new Error(`Expected '${r3}' to be an array, [start, end].`);
617
+ if (t != null) {
618
+ let e = t[0], s = t[1];
619
+ Us.forEach((i) => {
620
+ if (i.test(e) || i.test(s)) throw new Error(`['${e}', '${s}'] contains unusable interpolation symbol.`);
621
+ });
622
+ }
623
+ }
624
+ var Qt = class r2 {
625
+ static fromArray(t) {
626
+ return t ? (Ee("interpolation", t), new r2(t[0], t[1])) : Q;
627
+ }
628
+ constructor(t, e) {
629
+ this.start = t, this.end = e;
630
+ }
631
+ };
632
+ var Q = new Qt("{{", "}}");
633
+ var zt = class {
634
+ constructor(t, e, s) {
635
+ this.strings = t, this.expressions = e, this.offsets = s;
636
+ }
637
+ };
638
+ var qt = class {
639
+ constructor(t, e, s) {
640
+ this.templateBindings = t, this.warnings = e, this.errors = s;
641
+ }
642
+ };
643
+ var mt = class {
644
+ constructor(t) {
645
+ this._lexer = t, this.errors = [];
646
+ }
647
+ parseAction(t, e, s, i = Q) {
648
+ this._checkNoInterpolation(t, e, i);
649
+ let n = this._stripComments(t), a = this._lexer.tokenize(n), o = new z(t, e, s, a, 1, this.errors, 0).parseChain();
650
+ return new R(o, t, e, s, this.errors);
651
+ }
652
+ parseBinding(t, e, s, i = Q) {
653
+ let n = this._parseBindingAst(t, e, s, i);
654
+ return new R(n, t, e, s, this.errors);
655
+ }
656
+ checkSimpleExpression(t) {
657
+ let e = new Ht();
658
+ return t.visit(e), e.errors;
659
+ }
660
+ parseSimpleBinding(t, e, s, i = Q) {
661
+ let n = this._parseBindingAst(t, e, s, i), a = this.checkSimpleExpression(n);
662
+ return a.length > 0 && this._reportError(`Host binding expression cannot contain ${a.join(" ")}`, t, e), new R(n, t, e, s, this.errors);
663
+ }
664
+ _reportError(t, e, s, i) {
665
+ this.errors.push(new Z(t, e, s, i));
666
+ }
667
+ _parseBindingAst(t, e, s, i) {
668
+ this._checkNoInterpolation(t, e, i);
669
+ let n = this._stripComments(t), a = this._lexer.tokenize(n);
670
+ return new z(t, e, s, a, 0, this.errors, 0).parseChain();
671
+ }
672
+ parseTemplateBindings(t, e, s, i, n) {
673
+ let a = this._lexer.tokenize(e);
674
+ return new z(e, s, n, a, 0, this.errors, 0).parseTemplateBindings({ source: t, span: new L(i, i + t.length) });
675
+ }
676
+ parseInterpolation(t, e, s, i, n = Q) {
677
+ let { strings: a, expressions: o, offsets: p } = this.splitInterpolation(t, e, i, n);
678
+ if (o.length === 0) return null;
679
+ let u = [];
680
+ for (let f = 0; f < o.length; ++f) {
681
+ let S = o[f].text, g = this._stripComments(S), y = this._lexer.tokenize(g), w = new z(t, e, s, y, 0, this.errors, p[f]).parseChain();
682
+ u.push(w);
683
+ }
684
+ return this.createInterpolationAst(a.map((f) => f.text), u, t, e, s);
685
+ }
686
+ parseInterpolationExpression(t, e, s) {
687
+ let i = this._stripComments(t), n = this._lexer.tokenize(i), a = new z(t, e, s, n, 0, this.errors, 0).parseChain(), o = ["", ""];
688
+ return this.createInterpolationAst(o, [a], t, e, s);
689
+ }
690
+ createInterpolationAst(t, e, s, i, n) {
691
+ let a = new b(0, s.length), o = new ot(a, a.toAbsolute(n), t, e);
692
+ return new R(o, s, i, n, this.errors);
693
+ }
694
+ splitInterpolation(t, e, s, i = Q) {
695
+ let n = [], a = [], o = [], p = s ? Fs(s) : null, u = 0, f = false, S = false, { start: g, end: y } = i;
696
+ for (; u < t.length; ) if (f) {
697
+ let w = u, H = w + g.length, j = this._getInterpolationEndIndex(t, y, H);
698
+ if (j === -1) {
699
+ f = false, S = true;
700
+ break;
701
+ }
702
+ let T = j + y.length, Nt = t.substring(H, j);
703
+ Nt.trim().length === 0 && this._reportError("Blank expressions are not allowed in interpolated strings", t, `at column ${u} in`, e), a.push({ text: Nt, start: w, end: T });
704
+ let Ze = ((p == null ? void 0 : p.get(w)) ?? w) + g.length;
705
+ o.push(Ze), u = T, f = false;
706
+ } else {
707
+ let w = u;
708
+ u = t.indexOf(g, u), u === -1 && (u = t.length);
709
+ let H = t.substring(w, u);
710
+ n.push({ text: H, start: w, end: u }), f = true;
711
+ }
712
+ if (!f) if (S) {
713
+ let w = n[n.length - 1];
714
+ w.text += t.substring(u), w.end = t.length;
715
+ } else n.push({ text: t.substring(u), start: u, end: t.length });
716
+ return new zt(n, a, o);
717
+ }
718
+ wrapLiteralPrimitive(t, e, s) {
719
+ let i = new b(0, t == null ? 0 : t.length);
720
+ return new R(new E(i, i.toAbsolute(s), t), t, e, s, this.errors);
721
+ }
722
+ _stripComments(t) {
723
+ let e = this._commentStart(t);
724
+ return e != null ? t.substring(0, e) : t;
725
+ }
726
+ _commentStart(t) {
727
+ let e = null;
728
+ for (let s = 0; s < t.length - 1; s++) {
729
+ let i = t.charCodeAt(s), n = t.charCodeAt(s + 1);
730
+ if (i === 47 && n == 47 && e == null) return s;
731
+ e === i ? e = null : e == null && Ft(i) && (e = i);
732
+ }
733
+ return null;
734
+ }
735
+ _checkNoInterpolation(t, e, { start: s, end: i }) {
736
+ let n = -1, a = -1;
737
+ for (let o of this._forEachUnquotedChar(t, 0)) if (n === -1) t.startsWith(s) && (n = o);
738
+ else if (a = this._getInterpolationEndIndex(t, i, o), a > -1) break;
739
+ n > -1 && a > -1 && this._reportError(`Got interpolation (${s}${i}) where expression was expected`, t, `at column ${n} in`, e);
740
+ }
741
+ _getInterpolationEndIndex(t, e, s) {
742
+ for (let i of this._forEachUnquotedChar(t, s)) {
743
+ if (t.startsWith(e, i)) return i;
744
+ if (t.startsWith("//", i)) return t.indexOf(e, i);
745
+ }
746
+ return -1;
747
+ }
748
+ *_forEachUnquotedChar(t, e) {
749
+ let s = null, i = 0;
750
+ for (let n = e; n < t.length; n++) {
751
+ let a = t[n];
752
+ Ft(t.charCodeAt(n)) && (s === null || s === a) && i % 2 === 0 ? s = s === null ? a : null : s === null && (yield n), i = a === "\\" ? i + 1 : 0;
753
+ }
754
+ }
755
+ };
756
+ var gt;
757
+ (function(r3) {
758
+ r3[r3.None = 0] = "None", r3[r3.Writable = 1] = "Writable";
759
+ })(gt || (gt = {}));
760
+ var z = class {
761
+ constructor(t, e, s, i, n, a, o) {
762
+ this.input = t, this.location = e, this.absoluteOffset = s, this.tokens = i, this.parseFlags = n, this.errors = a, this.offset = o, this.rparensExpected = 0, this.rbracketsExpected = 0, this.rbracesExpected = 0, this.context = gt.None, this.sourceSpanCache = /* @__PURE__ */ new Map(), this.index = 0;
763
+ }
764
+ peek(t) {
765
+ let e = this.index + t;
766
+ return e < this.tokens.length ? this.tokens[e] : Bt;
767
+ }
768
+ get next() {
769
+ return this.peek(0);
770
+ }
771
+ get atEOF() {
772
+ return this.index >= this.tokens.length;
773
+ }
774
+ get inputIndex() {
775
+ return this.atEOF ? this.currentEndIndex : this.next.index + this.offset;
776
+ }
777
+ get currentEndIndex() {
778
+ return this.index > 0 ? this.peek(-1).end + this.offset : this.tokens.length === 0 ? this.input.length + this.offset : this.next.index + this.offset;
779
+ }
780
+ get currentAbsoluteOffset() {
781
+ return this.absoluteOffset + this.inputIndex;
782
+ }
783
+ span(t, e) {
784
+ let s = this.currentEndIndex;
785
+ if (e !== void 0 && e > this.currentEndIndex && (s = e), t > s) {
786
+ let i = s;
787
+ s = t, t = i;
788
+ }
789
+ return new b(t, s);
790
+ }
791
+ sourceSpan(t, e) {
792
+ let s = `${t}@${this.inputIndex}:${e}`;
793
+ return this.sourceSpanCache.has(s) || this.sourceSpanCache.set(s, this.span(t, e).toAbsolute(this.absoluteOffset)), this.sourceSpanCache.get(s);
794
+ }
795
+ advance() {
796
+ this.index++;
797
+ }
798
+ withContext(t, e) {
799
+ this.context |= t;
800
+ let s = e();
801
+ return this.context ^= t, s;
802
+ }
803
+ consumeOptionalCharacter(t) {
804
+ return this.next.isCharacter(t) ? (this.advance(), true) : false;
805
+ }
806
+ peekKeywordLet() {
807
+ return this.next.isKeywordLet();
808
+ }
809
+ peekKeywordAs() {
810
+ return this.next.isKeywordAs();
811
+ }
812
+ expectCharacter(t) {
813
+ this.consumeOptionalCharacter(t) || this.error(`Missing expected ${String.fromCharCode(t)}`);
814
+ }
815
+ consumeOptionalOperator(t) {
816
+ return this.next.isOperator(t) ? (this.advance(), true) : false;
817
+ }
818
+ expectOperator(t) {
819
+ this.consumeOptionalOperator(t) || this.error(`Missing expected operator ${t}`);
820
+ }
821
+ prettyPrintToken(t) {
822
+ return t === Bt ? "end of input" : `token ${t}`;
823
+ }
824
+ expectIdentifierOrKeyword() {
825
+ let t = this.next;
826
+ return !t.isIdentifier() && !t.isKeyword() ? (t.isPrivateIdentifier() ? this._reportErrorForPrivateIdentifier(t, "expected identifier or keyword") : this.error(`Unexpected ${this.prettyPrintToken(t)}, expected identifier or keyword`), null) : (this.advance(), t.toString());
827
+ }
828
+ expectIdentifierOrKeywordOrString() {
829
+ let t = this.next;
830
+ return !t.isIdentifier() && !t.isKeyword() && !t.isString() ? (t.isPrivateIdentifier() ? this._reportErrorForPrivateIdentifier(t, "expected identifier, keyword or string") : this.error(`Unexpected ${this.prettyPrintToken(t)}, expected identifier, keyword, or string`), "") : (this.advance(), t.toString());
831
+ }
832
+ parseChain() {
833
+ let t = [], e = this.inputIndex;
834
+ for (; this.index < this.tokens.length; ) {
835
+ let s = this.parsePipe();
836
+ if (t.push(s), this.consumeOptionalCharacter(59)) for (this.parseFlags & 1 || this.error("Binding expression cannot contain chained expression"); this.consumeOptionalCharacter(59); ) ;
837
+ else if (this.index < this.tokens.length) {
838
+ let i = this.index;
839
+ if (this.error(`Unexpected token '${this.next}'`), this.index === i) break;
840
+ }
841
+ }
842
+ if (t.length === 0) {
843
+ let s = this.offset, i = this.offset + this.input.length;
844
+ return new $(this.span(s, i), this.sourceSpan(s, i));
845
+ }
846
+ return t.length == 1 ? t[0] : new X(this.span(e), this.sourceSpan(e), t);
847
+ }
848
+ parsePipe() {
849
+ let t = this.inputIndex, e = this.parseExpression();
850
+ if (this.consumeOptionalOperator("|")) {
851
+ this.parseFlags & 1 && this.error("Cannot have a pipe in an action expression");
852
+ do {
853
+ let s = this.inputIndex, i = this.expectIdentifierOrKeyword(), n, a;
854
+ i !== null ? n = this.sourceSpan(s) : (i = "", a = this.next.index !== -1 ? this.next.index : this.input.length + this.offset, n = new b(a, a).toAbsolute(this.absoluteOffset));
855
+ let o = [];
856
+ for (; this.consumeOptionalCharacter(58); ) o.push(this.parseExpression());
857
+ e = new it(this.span(t), this.sourceSpan(t, a), e, i, o, n);
858
+ } while (this.consumeOptionalOperator("|"));
859
+ }
860
+ return e;
861
+ }
862
+ parseExpression() {
863
+ return this.parseConditional();
864
+ }
865
+ parseConditional() {
866
+ let t = this.inputIndex, e = this.parseLogicalOr();
867
+ if (this.consumeOptionalOperator("?")) {
868
+ let s = this.parsePipe(), i;
869
+ if (this.consumeOptionalCharacter(58)) i = this.parsePipe();
870
+ else {
871
+ let n = this.inputIndex, a = this.input.substring(t, n);
872
+ this.error(`Conditional expression ${a} requires all 3 expressions`), i = new $(this.span(t), this.sourceSpan(t));
873
+ }
874
+ return new tt(this.span(t), this.sourceSpan(t), e, s, i);
875
+ } else return e;
876
+ }
877
+ parseLogicalOr() {
878
+ let t = this.inputIndex, e = this.parseLogicalAnd();
879
+ for (; this.consumeOptionalOperator("||"); ) {
880
+ let s = this.parseLogicalAnd();
881
+ e = new A(this.span(t), this.sourceSpan(t), "||", e, s);
882
+ }
883
+ return e;
884
+ }
885
+ parseLogicalAnd() {
886
+ let t = this.inputIndex, e = this.parseNullishCoalescing();
887
+ for (; this.consumeOptionalOperator("&&"); ) {
888
+ let s = this.parseNullishCoalescing();
889
+ e = new A(this.span(t), this.sourceSpan(t), "&&", e, s);
890
+ }
891
+ return e;
892
+ }
893
+ parseNullishCoalescing() {
894
+ let t = this.inputIndex, e = this.parseEquality();
895
+ for (; this.consumeOptionalOperator("??"); ) {
896
+ let s = this.parseEquality();
897
+ e = new A(this.span(t), this.sourceSpan(t), "??", e, s);
898
+ }
899
+ return e;
900
+ }
901
+ parseEquality() {
902
+ let t = this.inputIndex, e = this.parseRelational();
903
+ for (; this.next.type == l.Operator; ) {
904
+ let s = this.next.strValue;
905
+ switch (s) {
906
+ case "==":
907
+ case "===":
908
+ case "!=":
909
+ case "!==":
910
+ this.advance();
911
+ let i = this.parseRelational();
912
+ e = new A(this.span(t), this.sourceSpan(t), s, e, i);
913
+ continue;
914
+ }
915
+ break;
916
+ }
917
+ return e;
918
+ }
919
+ parseRelational() {
920
+ let t = this.inputIndex, e = this.parseAdditive();
921
+ for (; this.next.type == l.Operator; ) {
922
+ let s = this.next.strValue;
923
+ switch (s) {
924
+ case "<":
925
+ case ">":
926
+ case "<=":
927
+ case ">=":
928
+ this.advance();
929
+ let i = this.parseAdditive();
930
+ e = new A(this.span(t), this.sourceSpan(t), s, e, i);
931
+ continue;
932
+ }
933
+ break;
934
+ }
935
+ return e;
936
+ }
937
+ parseAdditive() {
938
+ let t = this.inputIndex, e = this.parseMultiplicative();
939
+ for (; this.next.type == l.Operator; ) {
940
+ let s = this.next.strValue;
941
+ switch (s) {
942
+ case "+":
943
+ case "-":
944
+ this.advance();
945
+ let i = this.parseMultiplicative();
946
+ e = new A(this.span(t), this.sourceSpan(t), s, e, i);
947
+ continue;
948
+ }
949
+ break;
950
+ }
951
+ return e;
952
+ }
953
+ parseMultiplicative() {
954
+ let t = this.inputIndex, e = this.parsePrefix();
955
+ for (; this.next.type == l.Operator; ) {
956
+ let s = this.next.strValue;
957
+ switch (s) {
958
+ case "*":
959
+ case "%":
960
+ case "/":
961
+ this.advance();
962
+ let i = this.parsePrefix();
963
+ e = new A(this.span(t), this.sourceSpan(t), s, e, i);
964
+ continue;
965
+ }
966
+ break;
967
+ }
968
+ return e;
969
+ }
970
+ parsePrefix() {
971
+ if (this.next.type == l.Operator) {
972
+ let t = this.inputIndex, e = this.next.strValue, s;
973
+ switch (e) {
974
+ case "+":
975
+ return this.advance(), s = this.parsePrefix(), F.createPlus(this.span(t), this.sourceSpan(t), s);
976
+ case "-":
977
+ return this.advance(), s = this.parsePrefix(), F.createMinus(this.span(t), this.sourceSpan(t), s);
978
+ case "!":
979
+ return this.advance(), s = this.parsePrefix(), new ct(this.span(t), this.sourceSpan(t), s);
980
+ }
981
+ }
982
+ return this.parseCallChain();
983
+ }
984
+ parseCallChain() {
985
+ let t = this.inputIndex, e = this.parsePrimary();
986
+ for (; ; ) if (this.consumeOptionalCharacter(46)) e = this.parseAccessMember(e, t, false);
987
+ else if (this.consumeOptionalOperator("?.")) this.consumeOptionalCharacter(40) ? e = this.parseCall(e, t, true) : e = this.consumeOptionalCharacter(91) ? this.parseKeyedReadOrWrite(e, t, true) : this.parseAccessMember(e, t, true);
988
+ else if (this.consumeOptionalCharacter(91)) e = this.parseKeyedReadOrWrite(e, t, false);
989
+ else if (this.consumeOptionalCharacter(40)) e = this.parseCall(e, t, false);
990
+ else if (this.consumeOptionalOperator("!")) e = new ht(this.span(t), this.sourceSpan(t), e);
991
+ else return e;
992
+ }
993
+ parsePrimary() {
994
+ let t = this.inputIndex;
995
+ if (this.consumeOptionalCharacter(40)) {
996
+ this.rparensExpected++;
997
+ let e = this.parsePipe();
998
+ return this.rparensExpected--, this.expectCharacter(41), e;
999
+ } else {
1000
+ if (this.next.isKeywordNull()) return this.advance(), new E(this.span(t), this.sourceSpan(t), null);
1001
+ if (this.next.isKeywordUndefined()) return this.advance(), new E(this.span(t), this.sourceSpan(t), void 0);
1002
+ if (this.next.isKeywordTrue()) return this.advance(), new E(this.span(t), this.sourceSpan(t), true);
1003
+ if (this.next.isKeywordFalse()) return this.advance(), new E(this.span(t), this.sourceSpan(t), false);
1004
+ if (this.next.isKeywordThis()) return this.advance(), new Lt(this.span(t), this.sourceSpan(t));
1005
+ if (this.consumeOptionalCharacter(91)) {
1006
+ this.rbracketsExpected++;
1007
+ let e = this.parseExpressionList(93);
1008
+ return this.rbracketsExpected--, this.expectCharacter(93), new nt(this.span(t), this.sourceSpan(t), e);
1009
+ } else {
1010
+ if (this.next.isCharacter(123)) return this.parseLiteralMap();
1011
+ if (this.next.isIdentifier()) return this.parseAccessMember(new K(this.span(t), this.sourceSpan(t)), t, false);
1012
+ if (this.next.isNumber()) {
1013
+ let e = this.next.toNumber();
1014
+ return this.advance(), new E(this.span(t), this.sourceSpan(t), e);
1015
+ } else if (this.next.isString()) {
1016
+ let e = this.next.toString();
1017
+ return this.advance(), new E(this.span(t), this.sourceSpan(t), e);
1018
+ } else return this.next.isPrivateIdentifier() ? (this._reportErrorForPrivateIdentifier(this.next, null), new $(this.span(t), this.sourceSpan(t))) : this.index >= this.tokens.length ? (this.error(`Unexpected end of expression: ${this.input}`), new $(this.span(t), this.sourceSpan(t))) : (this.error(`Unexpected token ${this.next}`), new $(this.span(t), this.sourceSpan(t)));
1019
+ }
1020
+ }
1021
+ }
1022
+ parseExpressionList(t) {
1023
+ let e = [];
1024
+ do
1025
+ if (!this.next.isCharacter(t)) e.push(this.parsePipe());
1026
+ else break;
1027
+ while (this.consumeOptionalCharacter(44));
1028
+ return e;
1029
+ }
1030
+ parseLiteralMap() {
1031
+ let t = [], e = [], s = this.inputIndex;
1032
+ if (this.expectCharacter(123), !this.consumeOptionalCharacter(125)) {
1033
+ this.rbracesExpected++;
1034
+ do {
1035
+ let i = this.inputIndex, n = this.next.isString(), a = this.expectIdentifierOrKeywordOrString(), o = { key: a, quoted: n };
1036
+ if (t.push(o), n) this.expectCharacter(58), e.push(this.parsePipe());
1037
+ else if (this.consumeOptionalCharacter(58)) e.push(this.parsePipe());
1038
+ else {
1039
+ o.isShorthandInitialized = true;
1040
+ let p = this.span(i), u = this.sourceSpan(i);
1041
+ e.push(new M(p, u, u, new K(p, u), a));
1042
+ }
1043
+ } while (this.consumeOptionalCharacter(44) && !this.next.isCharacter(125));
1044
+ this.rbracesExpected--, this.expectCharacter(125);
1045
+ }
1046
+ return new at(this.span(s), this.sourceSpan(s), t, e);
1047
+ }
1048
+ parseAccessMember(t, e, s) {
1049
+ let i = this.inputIndex, n = this.withContext(gt.Writable, () => {
1050
+ let p = this.expectIdentifierOrKeyword() ?? "";
1051
+ return p.length === 0 && this.error("Expected identifier for property access", t.span.end), p;
1052
+ }), a = this.sourceSpan(i), o;
1053
+ if (s) this.consumeOptionalOperator("=") ? (this.error("The '?.' operator cannot be used in the assignment"), o = new $(this.span(e), this.sourceSpan(e))) : o = new _(this.span(e), this.sourceSpan(e), a, t, n);
1054
+ else if (this.consumeOptionalOperator("=")) {
1055
+ if (!(this.parseFlags & 1)) return this.error("Bindings cannot contain assignments"), new $(this.span(e), this.sourceSpan(e));
1056
+ let p = this.parseConditional();
1057
+ o = new et(this.span(e), this.sourceSpan(e), a, t, n, p);
1058
+ } else o = new M(this.span(e), this.sourceSpan(e), a, t, n);
1059
+ return o;
1060
+ }
1061
+ parseCall(t, e, s) {
1062
+ let i = this.inputIndex;
1063
+ this.rparensExpected++;
1064
+ let n = this.parseCallArguments(), a = this.span(i, this.inputIndex).toAbsolute(this.absoluteOffset);
1065
+ this.expectCharacter(41), this.rparensExpected--;
1066
+ let o = this.span(e), p = this.sourceSpan(e);
1067
+ return s ? new D(o, p, t, n, a) : new pt(o, p, t, n, a);
1068
+ }
1069
+ parseCallArguments() {
1070
+ if (this.next.isCharacter(41)) return [];
1071
+ let t = [];
1072
+ do
1073
+ t.push(this.parsePipe());
1074
+ while (this.consumeOptionalCharacter(44));
1075
+ return t;
1076
+ }
1077
+ expectTemplateBindingKey() {
1078
+ let t = "", e = false, s = this.currentAbsoluteOffset;
1079
+ do
1080
+ t += this.expectIdentifierOrKeywordOrString(), e = this.consumeOptionalOperator("-"), e && (t += "-");
1081
+ while (e);
1082
+ return { source: t, span: new L(s, s + t.length) };
1083
+ }
1084
+ parseTemplateBindings(t) {
1085
+ let e = [];
1086
+ for (e.push(...this.parseDirectiveKeywordBindings(t)); this.index < this.tokens.length; ) {
1087
+ let s = this.parseLetBinding();
1088
+ if (s) e.push(s);
1089
+ else {
1090
+ let i = this.expectTemplateBindingKey(), n = this.parseAsBinding(i);
1091
+ n ? e.push(n) : (i.source = t.source + i.source.charAt(0).toUpperCase() + i.source.substring(1), e.push(...this.parseDirectiveKeywordBindings(i)));
1092
+ }
1093
+ this.consumeStatementTerminator();
1094
+ }
1095
+ return new qt(e, [], this.errors);
1096
+ }
1097
+ parseKeyedReadOrWrite(t, e, s) {
1098
+ return this.withContext(gt.Writable, () => {
1099
+ this.rbracketsExpected++;
1100
+ let i = this.parsePipe();
1101
+ if (i instanceof $ && this.error("Key access cannot be empty"), this.rbracketsExpected--, this.expectCharacter(93), this.consumeOptionalOperator("=")) if (s) this.error("The '?.' operator cannot be used in the assignment");
1102
+ else {
1103
+ let n = this.parseConditional();
1104
+ return new rt(this.span(e), this.sourceSpan(e), t, i, n);
1105
+ }
1106
+ else return s ? new U(this.span(e), this.sourceSpan(e), t, i) : new st(this.span(e), this.sourceSpan(e), t, i);
1107
+ return new $(this.span(e), this.sourceSpan(e));
1108
+ });
1109
+ }
1110
+ parseDirectiveKeywordBindings(t) {
1111
+ let e = [];
1112
+ this.consumeOptionalCharacter(58);
1113
+ let s = this.getDirectiveBoundTarget(), i = this.currentAbsoluteOffset, n = this.parseAsBinding(t);
1114
+ n || (this.consumeStatementTerminator(), i = this.currentAbsoluteOffset);
1115
+ let a = new L(t.span.start, i);
1116
+ return e.push(new ut(a, t, s)), n && e.push(n), e;
1117
+ }
1118
+ getDirectiveBoundTarget() {
1119
+ if (this.next === Bt || this.peekKeywordAs() || this.peekKeywordLet()) return null;
1120
+ let t = this.parsePipe(), { start: e, end: s } = t.span, i = this.input.substring(e, s);
1121
+ return new R(t, i, this.location, this.absoluteOffset + e, this.errors);
1122
+ }
1123
+ parseAsBinding(t) {
1124
+ if (!this.peekKeywordAs()) return null;
1125
+ this.advance();
1126
+ let e = this.expectTemplateBindingKey();
1127
+ this.consumeStatementTerminator();
1128
+ let s = new L(t.span.start, this.currentAbsoluteOffset);
1129
+ return new W(s, e, t);
1130
+ }
1131
+ parseLetBinding() {
1132
+ if (!this.peekKeywordLet()) return null;
1133
+ let t = this.currentAbsoluteOffset;
1134
+ this.advance();
1135
+ let e = this.expectTemplateBindingKey(), s = null;
1136
+ this.consumeOptionalOperator("=") && (s = this.expectTemplateBindingKey()), this.consumeStatementTerminator();
1137
+ let i = new L(t, this.currentAbsoluteOffset);
1138
+ return new W(i, e, s);
1139
+ }
1140
+ consumeStatementTerminator() {
1141
+ this.consumeOptionalCharacter(59) || this.consumeOptionalCharacter(44);
1142
+ }
1143
+ error(t, e = null) {
1144
+ this.errors.push(new Z(t, this.input, this.locationText(e), this.location)), this.skip();
1145
+ }
1146
+ locationText(t = null) {
1147
+ return t == null && (t = this.index), t < this.tokens.length ? `at column ${this.tokens[t].index + 1} in` : "at the end of the expression";
1148
+ }
1149
+ _reportErrorForPrivateIdentifier(t, e) {
1150
+ let s = `Private identifiers are not supported. Unexpected private identifier: ${t}`;
1151
+ e !== null && (s += `, ${e}`), this.error(s);
1152
+ }
1153
+ skip() {
1154
+ let t = this.next;
1155
+ for (; this.index < this.tokens.length && !t.isCharacter(59) && !t.isOperator("|") && (this.rparensExpected <= 0 || !t.isCharacter(41)) && (this.rbracesExpected <= 0 || !t.isCharacter(125)) && (this.rbracketsExpected <= 0 || !t.isCharacter(93)) && (!(this.context & gt.Writable) || !t.isOperator("=")); ) this.next.isError() && this.errors.push(new Z(this.next.toString(), this.input, this.locationText(), this.location)), this.advance(), t = this.next;
1156
+ }
1157
+ };
1158
+ var Ht = class extends Rt {
1159
+ constructor() {
1160
+ super(...arguments), this.errors = [];
1161
+ }
1162
+ visitPipe() {
1163
+ this.errors.push("pipes");
1164
+ }
1165
+ };
1166
+ function Fs(r3) {
1167
+ let t = /* @__PURE__ */ new Map(), e = 0, s = 0, i = 0;
1168
+ for (; i < r3.length; ) {
1169
+ let n = r3[i];
1170
+ if (n.type === 9) {
1171
+ let [a, o] = n.parts;
1172
+ e += o.length, s += a.length;
1173
+ } else {
1174
+ let a = n.parts.reduce((o, p) => o + p.length, 0);
1175
+ s += a, e += a;
1176
+ }
1177
+ t.set(s, e), i++;
1178
+ }
1179
+ return t;
1180
+ }
1181
+ function Ce({ start: r3, end: t }, e) {
1182
+ let s = r3, i = t;
1183
+ for (; i !== s && /\s/.test(e[i - 1]); ) i--;
1184
+ for (; s !== i && /\s/.test(e[s]); ) s++;
1185
+ return { start: s, end: i };
1186
+ }
1187
+ function Ws({ start: r3, end: t }, e) {
1188
+ let s = r3, i = t;
1189
+ for (; i !== e.length && /\s/.test(e[i]); ) i++;
1190
+ for (; s !== 0 && /\s/.test(e[s - 1]); ) s--;
1191
+ return { start: s, end: i };
1192
+ }
1193
+ function Gs(r3, t) {
1194
+ return t[r3.start - 1] === "(" && t[r3.end] === ")" ? { start: r3.start - 1, end: r3.end + 1 } : r3;
1195
+ }
1196
+ function Ae(r3, t, e) {
1197
+ let s = 0, i = { start: r3.start, end: r3.end };
1198
+ for (; ; ) {
1199
+ let n = Ws(i, t), a = Gs(n, t);
1200
+ if (n.start === a.start && n.end === a.end) break;
1201
+ i.start = a.start, i.end = a.end, s++;
1202
+ }
1203
+ return { hasParens: (e ? s - 1 : s) !== 0, outerSpan: Ce(e ? { start: i.start + 1, end: i.end - 1 } : i, t), innerSpan: Ce(r3, t) };
1204
+ }
1205
+ function Oe(r3) {
1206
+ return typeof r3 == "string" ? (t) => t === r3 : (t) => r3.test(t);
1207
+ }
1208
+ function Ie(r3, t, e) {
1209
+ let s = Oe(t);
1210
+ for (let i = e; i >= 0; i--) {
1211
+ let n = r3[i];
1212
+ if (s(n)) return i;
1213
+ }
1214
+ throw new Error(`Cannot find front char ${t} from index ${e} in ${JSON.stringify(r3)}`);
1215
+ }
1216
+ function ke(r3, t, e) {
1217
+ let s = Oe(t);
1218
+ for (let i = e; i < r3.length; i++) {
1219
+ let n = r3[i];
1220
+ if (s(n)) return i;
1221
+ }
1222
+ throw new Error(`Cannot find character ${t} from index ${e} in ${JSON.stringify(r3)}`);
1223
+ }
1224
+ function Ne(r3) {
1225
+ return r3.slice(0, 1).toLowerCase() + r3.slice(1);
1226
+ }
1227
+ function Ct(r3) {
1228
+ let { start: t, end: e } = r3;
1229
+ return { start: t, end: e, range: [t, e] };
1230
+ }
1231
+ var Vs = (r3) => mt.prototype._commentStart(r3);
1232
+ function Qs(r3, t) {
1233
+ let e = t ? Vs(r3) : null;
1234
+ if (e === null) return { text: r3, comments: [] };
1235
+ let s = { type: "CommentLine", value: r3.slice(e + 2), ...Ct({ start: e, end: r3.length }) };
1236
+ return { text: r3.slice(0, e), comments: [s] };
1237
+ }
1238
+ function At(r3, t = true) {
1239
+ return (e) => {
1240
+ let s = new yt(), i = new mt(s), { text: n, comments: a } = Qs(e, t), o = r3(n, i);
1241
+ if (o.errors.length !== 0) {
1242
+ let [{ message: p }] = o.errors;
1243
+ throw new SyntaxError(p.replace(/^Parser Error: | at column \d+ in [^]*$/g, ""));
1244
+ }
1245
+ return { result: o, comments: a, text: n };
1246
+ };
1247
+ }
1248
+ var Le = At((r3, t) => t.parseBinding(r3, "", 0));
1249
+ var Re = At((r3, t) => t.parseAction(r3, "", 0));
1250
+ var Pe = At((r3, t) => t.parseInterpolationExpression(r3, "", 0));
1251
+ var be = At((r3, t) => t.parseTemplateBindings("", r3, "", 0, 0), false);
1252
+ var Hs = (r3, t, e) => {
1253
+ if (!(r3 && t == null)) return Array.isArray(t) || typeof t == "string" ? t[e < 0 ? t.length + e : e] : t.at(e);
1254
+ };
1255
+ var Tt = Hs;
1256
+ var jt = class {
1257
+ text;
1258
+ constructor(t) {
1259
+ this.text = t;
1260
+ }
1261
+ getCharacterIndex(t, e) {
1262
+ return ke(this.text, t, e);
1263
+ }
1264
+ getCharacterLastIndex(t, e) {
1265
+ return Ie(this.text, t, e);
1266
+ }
1267
+ transformSpan(t, { stripSpaces: e = false, hasParentParens: s = false } = {}) {
1268
+ if (!e) return Ct(t);
1269
+ let { outerSpan: i, innerSpan: n, hasParens: a } = Ae(t, this.text, s), o = Ct(n);
1270
+ return a && (o.extra = { parenthesized: true, parenStart: i.start, parenEnd: i.end }), o;
1271
+ }
1272
+ createNode(t, { stripSpaces: e = true, hasParentParens: s = false } = {}) {
1273
+ let { type: i, start: n, end: a } = t, o = { ...t, ...this.transformSpan({ start: n, end: a }, { stripSpaces: e, hasParentParens: s }) };
1274
+ switch (i) {
1275
+ case "NumericLiteral":
1276
+ case "StringLiteral": {
1277
+ let p = this.text.slice(o.start, o.end), { value: u } = o;
1278
+ o.extra = { ...o.extra, raw: p, rawValue: u };
1279
+ break;
1280
+ }
1281
+ case "ObjectProperty": {
1282
+ let { shorthand: p } = o;
1283
+ p && (o.extra = { ...o.extra, shorthand: p });
1284
+ break;
1285
+ }
1286
+ }
1287
+ return o;
1288
+ }
1289
+ };
1290
+ var Ke = jt;
1291
+ function Zt(r3) {
1292
+ var t;
1293
+ return !!((t = r3.extra) != null && t.parenthesized);
1294
+ }
1295
+ function k(r3) {
1296
+ return Zt(r3) ? r3.extra.parenStart : r3.start;
1297
+ }
1298
+ function N(r3) {
1299
+ return Zt(r3) ? r3.extra.parenEnd : r3.end;
1300
+ }
1301
+ function Be(r3) {
1302
+ return (r3.type === "OptionalCallExpression" || r3.type === "OptionalMemberExpression") && !Zt(r3);
1303
+ }
1304
+ function Te(r3, t) {
1305
+ let { start: e, end: s } = r3.sourceSpan;
1306
+ return e >= s || /^\s+$/.test(t.slice(e, s));
1307
+ }
1308
+ var kt;
1309
+ var St;
1310
+ var h;
1311
+ var d;
1312
+ var Ot;
1313
+ var v;
1314
+ var Yt;
1315
+ var It = class extends Ke {
1316
+ constructor(e, s) {
1317
+ super(s);
1318
+ P(this, h);
1319
+ P(this, kt);
1320
+ P(this, St);
1321
+ Y(this, kt, e), Y(this, St, s);
1322
+ }
1323
+ get node() {
1324
+ return c(this, h, v).call(this, O(this, kt));
1325
+ }
1326
+ transformNode(e) {
1327
+ return c(this, h, Yt).call(this, e);
1328
+ }
1329
+ };
1330
+ kt = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakSet(), d = function(e, { stripSpaces: s = true, hasParentParens: i = false } = {}) {
1331
+ return this.createNode(e, { stripSpaces: s, hasParentParens: i });
1332
+ }, Ot = function(e, s, { computed: i, optional: n, end: a = N(s), hasParentParens: o = false }) {
1333
+ if (Te(e, O(this, St)) || e.sourceSpan.start === s.start) return s;
1334
+ let p = c(this, h, v).call(this, e), u = Be(p);
1335
+ return c(this, h, d).call(this, { type: n || u ? "OptionalMemberExpression" : "MemberExpression", object: p, property: s, computed: i, ...n ? { optional: true } : u ? { optional: false } : void 0, start: k(p), end: a }, { hasParentParens: o });
1336
+ }, v = function(e, s = false) {
1337
+ return c(this, h, Yt).call(this, e, s);
1338
+ }, Yt = function(e, s = false) {
1339
+ if (e instanceof ot) {
1340
+ let { expressions: i } = e;
1341
+ if (i.length !== 1) throw new Error("Unexpected 'Interpolation'");
1342
+ return c(this, h, v).call(this, i[0]);
1343
+ }
1344
+ if (e instanceof F) return c(this, h, d).call(this, { type: "UnaryExpression", prefix: true, argument: c(this, h, v).call(this, e.expr), operator: e.operator, ...e.sourceSpan }, { hasParentParens: s });
1345
+ if (e instanceof A) {
1346
+ let { left: i, operation: n, right: a } = e, o = c(this, h, v).call(this, i), p = c(this, h, v).call(this, a), u = k(o), f = N(p), S = { left: o, right: p, start: u, end: f };
1347
+ return n === "&&" || n === "||" || n === "??" ? c(this, h, d).call(this, { ...S, type: "LogicalExpression", operator: n }, { hasParentParens: s }) : c(this, h, d).call(this, { ...S, type: "BinaryExpression", operator: n }, { hasParentParens: s });
1348
+ }
1349
+ if (e instanceof it) {
1350
+ let { exp: i, name: n, args: a } = e, o = c(this, h, v).call(this, i), p = k(o), u = N(o), f = this.getCharacterIndex(/\S/, this.getCharacterIndex("|", u) + 1), S = c(this, h, d).call(this, { type: "Identifier", name: n, start: f, end: f + n.length }), g = a.map((y) => c(this, h, v).call(this, y));
1351
+ return c(this, h, d).call(this, { type: "NGPipeExpression", left: o, right: S, arguments: g, start: p, end: N(g.length === 0 ? S : Tt(false, g, -1)) }, { hasParentParens: s });
1352
+ }
1353
+ if (e instanceof X) return c(this, h, d).call(this, { type: "NGChainedExpression", expressions: e.expressions.map((i) => c(this, h, v).call(this, i)), ...e.sourceSpan }, { hasParentParens: s });
1354
+ if (e instanceof tt) {
1355
+ let { condition: i, trueExp: n, falseExp: a } = e, o = c(this, h, v).call(this, i), p = c(this, h, v).call(this, n), u = c(this, h, v).call(this, a);
1356
+ return c(this, h, d).call(this, { type: "ConditionalExpression", test: o, consequent: p, alternate: u, start: k(o), end: N(u) }, { hasParentParens: s });
1357
+ }
1358
+ if (e instanceof $) return c(this, h, d).call(this, { type: "NGEmptyExpression", ...e.sourceSpan }, { hasParentParens: s });
1359
+ if (e instanceof K) return c(this, h, d).call(this, { type: "ThisExpression", ...e.sourceSpan }, { hasParentParens: s });
1360
+ if (e instanceof st || e instanceof U) return c(this, h, Ot).call(this, e.receiver, c(this, h, v).call(this, e.key), { computed: true, optional: e instanceof U, end: e.sourceSpan.end, hasParentParens: s });
1361
+ if (e instanceof nt) return c(this, h, d).call(this, { type: "ArrayExpression", elements: e.expressions.map((i) => c(this, h, v).call(this, i)), ...e.sourceSpan }, { hasParentParens: s });
1362
+ if (e instanceof at) {
1363
+ let { keys: i, values: n } = e, a = n.map((p) => c(this, h, v).call(this, p)), o = i.map(({ key: p, quoted: u }, f) => {
1364
+ let S = a[f], g = k(S), y = N(S), w = this.getCharacterIndex(/\S/, f === 0 ? e.sourceSpan.start + 1 : this.getCharacterIndex(",", N(a[f - 1])) + 1), H = g === w ? y : this.getCharacterLastIndex(/\S/, this.getCharacterLastIndex(":", g - 1) - 1) + 1, j = { start: w, end: H }, T = u ? c(this, h, d).call(this, { type: "StringLiteral", value: p, ...j }) : c(this, h, d).call(this, { type: "Identifier", name: p, ...j }), Nt = T.end < T.start || w === g;
1365
+ return c(this, h, d).call(this, { type: "ObjectProperty", key: T, value: S, shorthand: Nt, computed: false, start: k(T), end: y });
1366
+ });
1367
+ return c(this, h, d).call(this, { type: "ObjectExpression", properties: o, ...e.sourceSpan }, { hasParentParens: s });
1368
+ }
1369
+ if (e instanceof E) {
1370
+ let { value: i } = e;
1371
+ switch (typeof i) {
1372
+ case "boolean":
1373
+ return c(this, h, d).call(this, { type: "BooleanLiteral", value: i, ...e.sourceSpan }, { hasParentParens: s });
1374
+ case "number":
1375
+ return c(this, h, d).call(this, { type: "NumericLiteral", value: i, ...e.sourceSpan }, { hasParentParens: s });
1376
+ case "object":
1377
+ return c(this, h, d).call(this, { type: "NullLiteral", ...e.sourceSpan }, { hasParentParens: s });
1378
+ case "string":
1379
+ return c(this, h, d).call(this, { type: "StringLiteral", value: i, ...e.sourceSpan }, { hasParentParens: s });
1380
+ case "undefined":
1381
+ return c(this, h, d).call(this, { type: "Identifier", name: "undefined", ...e.sourceSpan }, { hasParentParens: s });
1382
+ default:
1383
+ throw new Error(`Unexpected LiteralPrimitive value type ${typeof i}`);
1384
+ }
1385
+ }
1386
+ if (e instanceof pt || e instanceof D) {
1387
+ let i = e instanceof D, { receiver: n, args: a } = e, o = a.length === 1 ? [c(this, h, v).call(this, a[0], true)] : a.map((S) => c(this, h, v).call(this, S)), p = c(this, h, v).call(this, n), u = Be(p), f = i || u ? "OptionalCallExpression" : "CallExpression";
1388
+ return c(this, h, d).call(this, { type: f, callee: p, arguments: o, optional: f === "OptionalCallExpression" ? i : void 0, start: k(p), end: e.sourceSpan.end }, { hasParentParens: s });
1389
+ }
1390
+ if (e instanceof ht) {
1391
+ let i = c(this, h, v).call(this, e.expression);
1392
+ return c(this, h, d).call(this, { type: "TSNonNullExpression", expression: i, start: k(i), end: e.sourceSpan.end }, { hasParentParens: s });
1393
+ }
1394
+ if (e instanceof ct) {
1395
+ let i = c(this, h, v).call(this, e.expression);
1396
+ return c(this, h, d).call(this, { type: "UnaryExpression", prefix: true, operator: "!", argument: i, start: e.sourceSpan.start, end: N(i) }, { hasParentParens: s });
1397
+ }
1398
+ if (e instanceof M || e instanceof _) {
1399
+ let { receiver: i, name: n } = e, a = this.getCharacterLastIndex(/\S/, e.sourceSpan.end - 1) + 1, o = c(this, h, d).call(this, { type: "Identifier", name: n, start: a - n.length, end: a }, Te(i, O(this, St)) ? { hasParentParens: s } : {});
1400
+ return c(this, h, Ot).call(this, i, o, { computed: false, optional: e instanceof _, hasParentParens: s });
1401
+ }
1402
+ if (e instanceof rt) {
1403
+ let i = c(this, h, v).call(this, e.key), n = c(this, h, v).call(this, e.value), a = c(this, h, Ot).call(this, e.receiver, i, { computed: true, optional: false, end: this.getCharacterIndex("]", N(i)) + 1 });
1404
+ return c(this, h, d).call(this, { type: "AssignmentExpression", left: a, operator: "=", right: n, start: k(a), end: N(n) }, { hasParentParens: s });
1405
+ }
1406
+ if (e instanceof et) {
1407
+ let { receiver: i, name: n, value: a } = e, o = c(this, h, v).call(this, a), p = this.getCharacterLastIndex(/\S/, this.getCharacterLastIndex("=", k(o) - 1) - 1) + 1, u = c(this, h, d).call(this, { type: "Identifier", name: n, start: p - n.length, end: p }), f = c(this, h, Ot).call(this, i, u, { computed: false, optional: false });
1408
+ return c(this, h, d).call(this, { type: "AssignmentExpression", left: f, operator: "=", right: o, start: k(f), end: N(o) }, { hasParentParens: s });
1409
+ }
1410
+ throw Object.assign(new Error("Unexpected node"), { node: e });
1411
+ };
1412
+ function Me(r3, t) {
1413
+ return new It(r3, t).node;
1414
+ }
1415
+ function _e(r3) {
1416
+ return r3 instanceof ut;
1417
+ }
1418
+ function Ue(r3) {
1419
+ return r3 instanceof W;
1420
+ }
1421
+ var wt;
1422
+ var q;
1423
+ var x;
1424
+ var Fe;
1425
+ var C;
1426
+ var Xt;
1427
+ var te;
1428
+ var ee;
1429
+ var De;
1430
+ var We;
1431
+ var Ge;
1432
+ var Ve;
1433
+ var Jt = class extends It {
1434
+ constructor(e, s) {
1435
+ super(void 0, s);
1436
+ P(this, x);
1437
+ P(this, wt);
1438
+ P(this, q);
1439
+ Y(this, wt, e), Y(this, q, s);
1440
+ for (let i of e) c(this, x, De).call(this, i);
1441
+ }
1442
+ get expressions() {
1443
+ return c(this, x, Ge).call(this);
1444
+ }
1445
+ };
1446
+ wt = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakSet(), Fe = function() {
1447
+ return O(this, wt)[0].key;
1448
+ }, C = function(e, { stripSpaces: s = true } = {}) {
1449
+ return this.createNode(e, { stripSpaces: s });
1450
+ }, Xt = function(e) {
1451
+ return this.transformNode(e);
1452
+ }, te = function(e) {
1453
+ return Ne(e.slice(O(this, x, Fe).source.length));
1454
+ }, ee = function(e) {
1455
+ let s = O(this, q);
1456
+ if (s[e.start] !== '"' && s[e.start] !== "'") return;
1457
+ let i = s[e.start], n = false;
1458
+ for (let a = e.start + 1; a < s.length; a++) switch (s[a]) {
1459
+ case i:
1460
+ if (!n) {
1461
+ e.end = a + 1;
1462
+ return;
1463
+ }
1464
+ default:
1465
+ n = false;
1466
+ break;
1467
+ case "\\":
1468
+ n = !n;
1469
+ break;
1470
+ }
1471
+ }, De = function(e) {
1472
+ c(this, x, ee).call(this, e.key.span), Ue(e) && e.value && c(this, x, ee).call(this, e.value.span);
1473
+ }, We = function(e) {
1474
+ if (!e.value || e.value.source) return e.value;
1475
+ let s = this.getCharacterIndex(/\S/, e.sourceSpan.start);
1476
+ return { source: "$implicit", span: { start: s, end: s } };
1477
+ }, Ge = function() {
1478
+ let e = O(this, wt), [s] = e, i = O(this, q).slice(s.sourceSpan.start, s.sourceSpan.end).trim().length === 0 ? e.slice(1) : e, n = [], a = null;
1479
+ for (let [o, p] of i.entries()) {
1480
+ if (a && _e(a) && Ue(p) && p.value && p.value.source === a.key.source) {
1481
+ let u = c(this, x, C).call(this, { type: "NGMicrosyntaxKey", name: p.key.source, ...p.key.span }), f = (y, w) => ({ ...y, ...this.transformSpan({ start: y.start, end: w }) }), S = (y) => ({ ...f(y, u.end), alias: u }), g = n.pop();
1482
+ if (g.type === "NGMicrosyntaxExpression") n.push(S(g));
1483
+ else if (g.type === "NGMicrosyntaxKeyedExpression") {
1484
+ let y = S(g.expression);
1485
+ n.push(f({ ...g, expression: y }, y.end));
1486
+ } else throw new Error(`Unexpected type ${g.type}`);
1487
+ } else n.push(c(this, x, Ve).call(this, p, o));
1488
+ a = p;
1489
+ }
1490
+ return c(this, x, C).call(this, { type: "NGMicrosyntax", body: n, ...n.length === 0 ? e[0].sourceSpan : { start: n[0].start, end: Tt(false, n, -1).end } });
1491
+ }, Ve = function(e, s) {
1492
+ if (_e(e)) {
1493
+ let { key: i, value: n } = e;
1494
+ return n ? s === 0 ? c(this, x, C).call(this, { type: "NGMicrosyntaxExpression", expression: c(this, x, Xt).call(this, n.ast), alias: null, ...n.sourceSpan }) : c(this, x, C).call(this, { type: "NGMicrosyntaxKeyedExpression", key: c(this, x, C).call(this, { type: "NGMicrosyntaxKey", name: c(this, x, te).call(this, i.source), ...i.span }), expression: c(this, x, C).call(this, { type: "NGMicrosyntaxExpression", expression: c(this, x, Xt).call(this, n.ast), alias: null, ...n.sourceSpan }), start: i.span.start, end: n.sourceSpan.end }) : c(this, x, C).call(this, { type: "NGMicrosyntaxKey", name: c(this, x, te).call(this, i.source), ...i.span });
1495
+ } else {
1496
+ let { key: i, sourceSpan: n } = e;
1497
+ if (/^let\s$/.test(O(this, q).slice(n.start, n.start + 4))) {
1498
+ let { value: o } = e;
1499
+ return c(this, x, C).call(this, { type: "NGMicrosyntaxLet", key: c(this, x, C).call(this, { type: "NGMicrosyntaxKey", name: i.source, ...i.span }), value: o ? c(this, x, C).call(this, { type: "NGMicrosyntaxKey", name: o.source, ...o.span }) : null, start: n.start, end: o ? o.span.end : i.span.end });
1500
+ } else {
1501
+ let o = c(this, x, We).call(this, e);
1502
+ return c(this, x, C).call(this, { type: "NGMicrosyntaxAs", key: c(this, x, C).call(this, { type: "NGMicrosyntaxKey", name: o.source, ...o.span }), alias: c(this, x, C).call(this, { type: "NGMicrosyntaxKey", name: i.source, ...i.span }), start: o.span.start, end: i.span.end });
1503
+ }
1504
+ }
1505
+ };
1506
+ function Qe(r3, t) {
1507
+ return new Jt(r3, t).expressions;
1508
+ }
1509
+ function Mt({ result: { ast: r3 }, text: t, comments: e }) {
1510
+ return Object.assign(Me(r3, t), { comments: e });
1511
+ }
1512
+ function ze({ result: { templateBindings: r3 }, text: t }) {
1513
+ return Qe(r3, t);
1514
+ }
1515
+ var qe = (r3) => Mt(Le(r3));
1516
+ var He = (r3) => Mt(Pe(r3));
1517
+ var se = (r3) => Mt(Re(r3));
1518
+ var je = (r3) => ze(be(r3));
1519
+ function re(r3) {
1520
+ var s, i, n;
1521
+ let t = ((s = r3.range) == null ? void 0 : s[0]) ?? r3.start, e = (n = ((i = r3.declaration) == null ? void 0 : i.decorators) ?? r3.decorators) == null ? void 0 : n[0];
1522
+ return e ? Math.min(re(e), t) : t;
1523
+ }
1524
+ function Ye(r3) {
1525
+ var t;
1526
+ return ((t = r3.range) == null ? void 0 : t[1]) ?? r3.end;
1527
+ }
1528
+ function _t(r3) {
1529
+ return { astFormat: "estree", parse(t) {
1530
+ let e = r3(t);
1531
+ return { type: "NGRoot", node: r3 === se && e.type !== "NGChainedExpression" ? { ...e, type: "NGChainedExpression", expressions: [e] } : e };
1532
+ }, locStart: re, locEnd: Ye };
1533
+ }
1534
+ var js = _t(se);
1535
+ var Ys = _t(qe);
1536
+ var Zs = _t(He);
1537
+ var Js = _t(je);
1538
+ var Ur = ne;
1539
+
1540
+ exports.default = Ur;
1541
+ exports.parsers = ie;
1542
+ //# sourceMappingURL=angular-W2RY3LST.cjs.map
1543
+ //# sourceMappingURL=angular-W2RY3LST.cjs.map