@angular-eslint/bundled-angular-compiler 20.1.2-alpha.16 → 20.1.2-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 (2) hide show
  1. package/dist/index.js +685 -715
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -32,6 +32,7 @@ __export(index_exports, {
32
32
  BinaryOperator: () => BinaryOperator,
33
33
  BinaryOperatorExpr: () => BinaryOperatorExpr,
34
34
  BindingPipe: () => BindingPipe,
35
+ BindingPipeType: () => BindingPipeType,
35
36
  BindingType: () => BindingType,
36
37
  Block: () => Block,
37
38
  BlockParameter: () => BlockParameter,
@@ -42,6 +43,7 @@ __export(index_exports, {
42
43
  Call: () => Call,
43
44
  Chain: () => Chain,
44
45
  ChangeDetectionStrategy: () => ChangeDetectionStrategy,
46
+ CombinedRecursiveAstVisitor: () => CombinedRecursiveAstVisitor,
45
47
  CommaExpr: () => CommaExpr,
46
48
  Comment: () => Comment2,
47
49
  CompilerConfig: () => CompilerConfig,
@@ -85,7 +87,6 @@ __export(index_exports, {
85
87
  JSDocComment: () => JSDocComment,
86
88
  JitEvaluator: () => JitEvaluator,
87
89
  KeyedRead: () => KeyedRead,
88
- KeyedWrite: () => KeyedWrite,
89
90
  LeadingComment: () => LeadingComment,
90
91
  LetDeclaration: () => LetDeclaration2,
91
92
  Lexer: () => Lexer,
@@ -118,10 +119,8 @@ __export(index_exports, {
118
119
  ParsedPropertyType: () => ParsedPropertyType,
119
120
  ParsedVariable: () => ParsedVariable,
120
121
  Parser: () => Parser2,
121
- ParserError: () => ParserError,
122
122
  PrefixNot: () => PrefixNot,
123
123
  PropertyRead: () => PropertyRead,
124
- PropertyWrite: () => PropertyWrite,
125
124
  R3Identifiers: () => Identifiers,
126
125
  R3NgModuleMetadataKind: () => R3NgModuleMetadataKind,
127
126
  R3SelectorScopeMode: () => R3SelectorScopeMode,
@@ -214,9 +213,6 @@ __export(index_exports, {
214
213
  VoidExpr: () => VoidExpr,
215
214
  VoidExpression: () => VoidExpression,
216
215
  WrappedNodeExpr: () => WrappedNodeExpr,
217
- WriteKeyExpr: () => WriteKeyExpr,
218
- WritePropExpr: () => WritePropExpr,
219
- WriteVarExpr: () => WriteVarExpr,
220
216
  Xliff: () => Xliff,
221
217
  Xliff2: () => Xliff2,
222
218
  Xmb: () => Xmb,
@@ -283,7 +279,7 @@ __export(index_exports, {
283
279
  });
284
280
  module.exports = __toCommonJS(index_exports);
285
281
 
286
- // ../../node_modules/.pnpm/@angular+compiler@20.0.6/node_modules/@angular/compiler/fesm2022/compiler.mjs
282
+ // ../../node_modules/.pnpm/@angular+compiler@20.1.0/node_modules/@angular/compiler/fesm2022/compiler.mjs
287
283
  var _SELECTOR_REGEXP = new RegExp(
288
284
  `(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
289
285
  // 8: ","
@@ -1174,24 +1170,34 @@ var BinaryOperator;
1174
1170
  (function(BinaryOperator2) {
1175
1171
  BinaryOperator2[BinaryOperator2["Equals"] = 0] = "Equals";
1176
1172
  BinaryOperator2[BinaryOperator2["NotEquals"] = 1] = "NotEquals";
1177
- BinaryOperator2[BinaryOperator2["Identical"] = 2] = "Identical";
1178
- BinaryOperator2[BinaryOperator2["NotIdentical"] = 3] = "NotIdentical";
1179
- BinaryOperator2[BinaryOperator2["Minus"] = 4] = "Minus";
1180
- BinaryOperator2[BinaryOperator2["Plus"] = 5] = "Plus";
1181
- BinaryOperator2[BinaryOperator2["Divide"] = 6] = "Divide";
1182
- BinaryOperator2[BinaryOperator2["Multiply"] = 7] = "Multiply";
1183
- BinaryOperator2[BinaryOperator2["Modulo"] = 8] = "Modulo";
1184
- BinaryOperator2[BinaryOperator2["And"] = 9] = "And";
1185
- BinaryOperator2[BinaryOperator2["Or"] = 10] = "Or";
1186
- BinaryOperator2[BinaryOperator2["BitwiseOr"] = 11] = "BitwiseOr";
1187
- BinaryOperator2[BinaryOperator2["BitwiseAnd"] = 12] = "BitwiseAnd";
1188
- BinaryOperator2[BinaryOperator2["Lower"] = 13] = "Lower";
1189
- BinaryOperator2[BinaryOperator2["LowerEquals"] = 14] = "LowerEquals";
1190
- BinaryOperator2[BinaryOperator2["Bigger"] = 15] = "Bigger";
1191
- BinaryOperator2[BinaryOperator2["BiggerEquals"] = 16] = "BiggerEquals";
1192
- BinaryOperator2[BinaryOperator2["NullishCoalesce"] = 17] = "NullishCoalesce";
1193
- BinaryOperator2[BinaryOperator2["Exponentiation"] = 18] = "Exponentiation";
1194
- BinaryOperator2[BinaryOperator2["In"] = 19] = "In";
1173
+ BinaryOperator2[BinaryOperator2["Assign"] = 2] = "Assign";
1174
+ BinaryOperator2[BinaryOperator2["Identical"] = 3] = "Identical";
1175
+ BinaryOperator2[BinaryOperator2["NotIdentical"] = 4] = "NotIdentical";
1176
+ BinaryOperator2[BinaryOperator2["Minus"] = 5] = "Minus";
1177
+ BinaryOperator2[BinaryOperator2["Plus"] = 6] = "Plus";
1178
+ BinaryOperator2[BinaryOperator2["Divide"] = 7] = "Divide";
1179
+ BinaryOperator2[BinaryOperator2["Multiply"] = 8] = "Multiply";
1180
+ BinaryOperator2[BinaryOperator2["Modulo"] = 9] = "Modulo";
1181
+ BinaryOperator2[BinaryOperator2["And"] = 10] = "And";
1182
+ BinaryOperator2[BinaryOperator2["Or"] = 11] = "Or";
1183
+ BinaryOperator2[BinaryOperator2["BitwiseOr"] = 12] = "BitwiseOr";
1184
+ BinaryOperator2[BinaryOperator2["BitwiseAnd"] = 13] = "BitwiseAnd";
1185
+ BinaryOperator2[BinaryOperator2["Lower"] = 14] = "Lower";
1186
+ BinaryOperator2[BinaryOperator2["LowerEquals"] = 15] = "LowerEquals";
1187
+ BinaryOperator2[BinaryOperator2["Bigger"] = 16] = "Bigger";
1188
+ BinaryOperator2[BinaryOperator2["BiggerEquals"] = 17] = "BiggerEquals";
1189
+ BinaryOperator2[BinaryOperator2["NullishCoalesce"] = 18] = "NullishCoalesce";
1190
+ BinaryOperator2[BinaryOperator2["Exponentiation"] = 19] = "Exponentiation";
1191
+ BinaryOperator2[BinaryOperator2["In"] = 20] = "In";
1192
+ BinaryOperator2[BinaryOperator2["AdditionAssignment"] = 21] = "AdditionAssignment";
1193
+ BinaryOperator2[BinaryOperator2["SubtractionAssignment"] = 22] = "SubtractionAssignment";
1194
+ BinaryOperator2[BinaryOperator2["MultiplicationAssignment"] = 23] = "MultiplicationAssignment";
1195
+ BinaryOperator2[BinaryOperator2["DivisionAssignment"] = 24] = "DivisionAssignment";
1196
+ BinaryOperator2[BinaryOperator2["RemainderAssignment"] = 25] = "RemainderAssignment";
1197
+ BinaryOperator2[BinaryOperator2["ExponentiationAssignment"] = 26] = "ExponentiationAssignment";
1198
+ BinaryOperator2[BinaryOperator2["AndAssignment"] = 27] = "AndAssignment";
1199
+ BinaryOperator2[BinaryOperator2["OrAssignment"] = 28] = "OrAssignment";
1200
+ BinaryOperator2[BinaryOperator2["NullishCoalesceAssignment"] = 29] = "NullishCoalesceAssignment";
1195
1201
  })(BinaryOperator || (BinaryOperator = {}));
1196
1202
  function nullSafeIsEquivalent(base, other) {
1197
1203
  if (base == null || other == null) {
@@ -1328,7 +1334,7 @@ var ReadVarExpr = class _ReadVarExpr extends Expression {
1328
1334
  return new _ReadVarExpr(this.name, this.type, this.sourceSpan);
1329
1335
  }
1330
1336
  set(value) {
1331
- return new WriteVarExpr(this.name, value, null, this.sourceSpan);
1337
+ return new BinaryOperatorExpr(BinaryOperator.Assign, this, value, null, this.sourceSpan);
1332
1338
  }
1333
1339
  };
1334
1340
  var TypeofExpr = class _TypeofExpr extends Expression {
@@ -1397,88 +1403,6 @@ var WrappedNodeExpr = class _WrappedNodeExpr extends Expression {
1397
1403
  return new _WrappedNodeExpr(this.node, this.type, this.sourceSpan);
1398
1404
  }
1399
1405
  };
1400
- var WriteVarExpr = class _WriteVarExpr extends Expression {
1401
- static {
1402
- __name(this, "WriteVarExpr");
1403
- }
1404
- name;
1405
- value;
1406
- constructor(name, value, type, sourceSpan) {
1407
- super(type || value.type, sourceSpan);
1408
- this.name = name;
1409
- this.value = value;
1410
- }
1411
- isEquivalent(e) {
1412
- return e instanceof _WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);
1413
- }
1414
- isConstant() {
1415
- return false;
1416
- }
1417
- visitExpression(visitor, context) {
1418
- return visitor.visitWriteVarExpr(this, context);
1419
- }
1420
- clone() {
1421
- return new _WriteVarExpr(this.name, this.value.clone(), this.type, this.sourceSpan);
1422
- }
1423
- toDeclStmt(type, modifiers) {
1424
- return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);
1425
- }
1426
- toConstDecl() {
1427
- return this.toDeclStmt(INFERRED_TYPE, StmtModifier.Final);
1428
- }
1429
- };
1430
- var WriteKeyExpr = class _WriteKeyExpr extends Expression {
1431
- static {
1432
- __name(this, "WriteKeyExpr");
1433
- }
1434
- receiver;
1435
- index;
1436
- value;
1437
- constructor(receiver, index, value, type, sourceSpan) {
1438
- super(type || value.type, sourceSpan);
1439
- this.receiver = receiver;
1440
- this.index = index;
1441
- this.value = value;
1442
- }
1443
- isEquivalent(e) {
1444
- return e instanceof _WriteKeyExpr && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);
1445
- }
1446
- isConstant() {
1447
- return false;
1448
- }
1449
- visitExpression(visitor, context) {
1450
- return visitor.visitWriteKeyExpr(this, context);
1451
- }
1452
- clone() {
1453
- return new _WriteKeyExpr(this.receiver.clone(), this.index.clone(), this.value.clone(), this.type, this.sourceSpan);
1454
- }
1455
- };
1456
- var WritePropExpr = class _WritePropExpr extends Expression {
1457
- static {
1458
- __name(this, "WritePropExpr");
1459
- }
1460
- receiver;
1461
- name;
1462
- value;
1463
- constructor(receiver, name, value, type, sourceSpan) {
1464
- super(type || value.type, sourceSpan);
1465
- this.receiver = receiver;
1466
- this.name = name;
1467
- this.value = value;
1468
- }
1469
- isEquivalent(e) {
1470
- return e instanceof _WritePropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name && this.value.isEquivalent(e.value);
1471
- }
1472
- isConstant() {
1473
- return false;
1474
- }
1475
- visitExpression(visitor, context) {
1476
- return visitor.visitWritePropExpr(this, context);
1477
- }
1478
- clone() {
1479
- return new _WritePropExpr(this.receiver.clone(), this.name, this.value.clone(), this.type, this.sourceSpan);
1480
- }
1481
- };
1482
1406
  var InvokeFunctionExpr = class _InvokeFunctionExpr extends Expression {
1483
1407
  static {
1484
1408
  __name(this, "InvokeFunctionExpr");
@@ -2024,6 +1948,10 @@ var BinaryOperatorExpr = class _BinaryOperatorExpr extends Expression {
2024
1948
  clone() {
2025
1949
  return new _BinaryOperatorExpr(this.operator, this.lhs.clone(), this.rhs.clone(), this.type, this.sourceSpan);
2026
1950
  }
1951
+ isAssignment() {
1952
+ const op = this.operator;
1953
+ return op === BinaryOperator.Assign || op === BinaryOperator.AdditionAssignment || op === BinaryOperator.SubtractionAssignment || op === BinaryOperator.MultiplicationAssignment || op === BinaryOperator.DivisionAssignment || op === BinaryOperator.RemainderAssignment || op === BinaryOperator.ExponentiationAssignment || op === BinaryOperator.AndAssignment || op === BinaryOperator.OrAssignment || op === BinaryOperator.NullishCoalesceAssignment;
1954
+ }
2027
1955
  };
2028
1956
  var ReadPropExpr = class _ReadPropExpr extends Expression {
2029
1957
  static {
@@ -2050,7 +1978,7 @@ var ReadPropExpr = class _ReadPropExpr extends Expression {
2050
1978
  return visitor.visitReadPropExpr(this, context);
2051
1979
  }
2052
1980
  set(value) {
2053
- return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);
1981
+ return new BinaryOperatorExpr(BinaryOperator.Assign, this.receiver.prop(this.name), value, null, this.sourceSpan);
2054
1982
  }
2055
1983
  clone() {
2056
1984
  return new _ReadPropExpr(this.receiver.clone(), this.name, this.type, this.sourceSpan);
@@ -2077,7 +2005,7 @@ var ReadKeyExpr = class _ReadKeyExpr extends Expression {
2077
2005
  return visitor.visitReadKeyExpr(this, context);
2078
2006
  }
2079
2007
  set(value) {
2080
- return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);
2008
+ return new BinaryOperatorExpr(BinaryOperator.Assign, this.receiver.key(this.index), value, null, this.sourceSpan);
2081
2009
  }
2082
2010
  clone() {
2083
2011
  return new _ReadKeyExpr(this.receiver.clone(), this.index.clone(), this.type, this.sourceSpan);
@@ -2370,21 +2298,6 @@ var RecursiveAstVisitor$1 = class RecursiveAstVisitor {
2370
2298
  visitReadVarExpr(ast, context) {
2371
2299
  return this.visitExpression(ast, context);
2372
2300
  }
2373
- visitWriteVarExpr(ast, context) {
2374
- ast.value.visitExpression(this, context);
2375
- return this.visitExpression(ast, context);
2376
- }
2377
- visitWriteKeyExpr(ast, context) {
2378
- ast.receiver.visitExpression(this, context);
2379
- ast.index.visitExpression(this, context);
2380
- ast.value.visitExpression(this, context);
2381
- return this.visitExpression(ast, context);
2382
- }
2383
- visitWritePropExpr(ast, context) {
2384
- ast.receiver.visitExpression(this, context);
2385
- ast.value.visitExpression(this, context);
2386
- return this.visitExpression(ast, context);
2387
- }
2388
2301
  visitDynamicImportExpr(ast, context) {
2389
2302
  return this.visitExpression(ast, context);
2390
2303
  }
@@ -2703,9 +2616,6 @@ var output_ast = /* @__PURE__ */ Object.freeze({
2703
2616
  UnaryOperatorExpr,
2704
2617
  VoidExpr,
2705
2618
  WrappedNodeExpr,
2706
- WriteKeyExpr,
2707
- WritePropExpr,
2708
- WriteVarExpr,
2709
2619
  areAllEquivalent,
2710
2620
  arrowFn,
2711
2621
  expressionType,
@@ -2799,23 +2709,23 @@ var ConstantPool = class {
2799
2709
  }
2800
2710
  if (!newValue && !fixup.shared || newValue && forceShared) {
2801
2711
  const name = this.freshName();
2802
- let definition;
2712
+ let value;
2803
2713
  let usage;
2804
2714
  if (this.isClosureCompilerEnabled && isLongStringLiteral(literal2)) {
2805
- definition = variable(name).set(new FunctionExpr(
2715
+ value = new FunctionExpr(
2806
2716
  [],
2807
2717
  // Params.
2808
2718
  [
2809
2719
  // Statements.
2810
2720
  new ReturnStatement(literal2)
2811
2721
  ]
2812
- ));
2722
+ );
2813
2723
  usage = variable(name).callFn([]);
2814
2724
  } else {
2815
- definition = variable(name).set(literal2);
2725
+ value = literal2;
2816
2726
  usage = variable(name);
2817
2727
  }
2818
- this.statements.push(definition.toDeclStmt(INFERRED_TYPE, StmtModifier.Final));
2728
+ this.statements.push(new DeclareVarStmt(name, value, INFERRED_TYPE, StmtModifier.Final));
2819
2729
  fixup.fixup(usage);
2820
2730
  }
2821
2731
  return fixup;
@@ -2872,7 +2782,7 @@ var ConstantPool = class {
2872
2782
  const parameters = resultExpressions.filter(isVariable).map((e) => new FnParam(e.name, DYNAMIC_TYPE));
2873
2783
  const pureFunctionDeclaration = arrowFn(parameters, resultMap(resultExpressions), INFERRED_TYPE);
2874
2784
  const name = this.freshName();
2875
- this.statements.push(variable(name).set(pureFunctionDeclaration).toDeclStmt(INFERRED_TYPE, StmtModifier.Final));
2785
+ this.statements.push(new DeclareVarStmt(name, pureFunctionDeclaration, INFERRED_TYPE, StmtModifier.Final));
2876
2786
  literalFactory = variable(name);
2877
2787
  this.literalFactories.set(key, literalFactory);
2878
2788
  }
@@ -2957,6 +2867,23 @@ var Identifiers = class {
2957
2867
  static element = { name: "\u0275\u0275element", moduleName: CORE };
2958
2868
  static elementStart = { name: "\u0275\u0275elementStart", moduleName: CORE };
2959
2869
  static elementEnd = { name: "\u0275\u0275elementEnd", moduleName: CORE };
2870
+ static domElement = { name: "\u0275\u0275domElement", moduleName: CORE };
2871
+ static domElementStart = { name: "\u0275\u0275domElementStart", moduleName: CORE };
2872
+ static domElementEnd = { name: "\u0275\u0275domElementEnd", moduleName: CORE };
2873
+ static domElementContainer = {
2874
+ name: "\u0275\u0275domElementContainer",
2875
+ moduleName: CORE
2876
+ };
2877
+ static domElementContainerStart = {
2878
+ name: "\u0275\u0275domElementContainerStart",
2879
+ moduleName: CORE
2880
+ };
2881
+ static domElementContainerEnd = {
2882
+ name: "\u0275\u0275domElementContainerEnd",
2883
+ moduleName: CORE
2884
+ };
2885
+ static domTemplate = { name: "\u0275\u0275domTemplate", moduleName: CORE };
2886
+ static domListener = { name: "\u0275\u0275domListener", moduleName: CORE };
2960
2887
  static advance = { name: "\u0275\u0275advance", moduleName: CORE };
2961
2888
  static syntheticHostProperty = {
2962
2889
  name: "\u0275\u0275syntheticHostProperty",
@@ -3569,6 +3496,38 @@ var _EmittedLine = class {
3569
3496
  this.indent = indent;
3570
3497
  }
3571
3498
  };
3499
+ var BINARY_OPERATORS$1 = /* @__PURE__ */ new Map([
3500
+ [BinaryOperator.And, "&&"],
3501
+ [BinaryOperator.Bigger, ">"],
3502
+ [BinaryOperator.BiggerEquals, ">="],
3503
+ [BinaryOperator.BitwiseOr, "|"],
3504
+ [BinaryOperator.BitwiseAnd, "&"],
3505
+ [BinaryOperator.Divide, "/"],
3506
+ [BinaryOperator.Assign, "="],
3507
+ [BinaryOperator.Equals, "=="],
3508
+ [BinaryOperator.Identical, "==="],
3509
+ [BinaryOperator.Lower, "<"],
3510
+ [BinaryOperator.LowerEquals, "<="],
3511
+ [BinaryOperator.Minus, "-"],
3512
+ [BinaryOperator.Modulo, "%"],
3513
+ [BinaryOperator.Exponentiation, "**"],
3514
+ [BinaryOperator.Multiply, "*"],
3515
+ [BinaryOperator.NotEquals, "!="],
3516
+ [BinaryOperator.NotIdentical, "!=="],
3517
+ [BinaryOperator.NullishCoalesce, "??"],
3518
+ [BinaryOperator.Or, "||"],
3519
+ [BinaryOperator.Plus, "+"],
3520
+ [BinaryOperator.In, "in"],
3521
+ [BinaryOperator.AdditionAssignment, "+="],
3522
+ [BinaryOperator.SubtractionAssignment, "-="],
3523
+ [BinaryOperator.MultiplicationAssignment, "*="],
3524
+ [BinaryOperator.DivisionAssignment, "/="],
3525
+ [BinaryOperator.RemainderAssignment, "%="],
3526
+ [BinaryOperator.ExponentiationAssignment, "**="],
3527
+ [BinaryOperator.AndAssignment, "&&="],
3528
+ [BinaryOperator.OrAssignment, "||="],
3529
+ [BinaryOperator.NullishCoalesceAssignment, "??="]
3530
+ ]);
3572
3531
  var EmitterVisitorContext = class _EmitterVisitorContext {
3573
3532
  static {
3574
3533
  __name(this, "EmitterVisitorContext");
@@ -3765,46 +3724,6 @@ var AbstractEmitterVisitor = class {
3765
3724
  ctx.println(stmt, `}`);
3766
3725
  return null;
3767
3726
  }
3768
- visitWriteVarExpr(expr, ctx) {
3769
- const lineWasEmpty = ctx.lineIsEmpty();
3770
- if (!lineWasEmpty) {
3771
- ctx.print(expr, "(");
3772
- }
3773
- ctx.print(expr, `${expr.name} = `);
3774
- expr.value.visitExpression(this, ctx);
3775
- if (!lineWasEmpty) {
3776
- ctx.print(expr, ")");
3777
- }
3778
- return null;
3779
- }
3780
- visitWriteKeyExpr(expr, ctx) {
3781
- const lineWasEmpty = ctx.lineIsEmpty();
3782
- if (!lineWasEmpty) {
3783
- ctx.print(expr, "(");
3784
- }
3785
- expr.receiver.visitExpression(this, ctx);
3786
- ctx.print(expr, `[`);
3787
- expr.index.visitExpression(this, ctx);
3788
- ctx.print(expr, `] = `);
3789
- expr.value.visitExpression(this, ctx);
3790
- if (!lineWasEmpty) {
3791
- ctx.print(expr, ")");
3792
- }
3793
- return null;
3794
- }
3795
- visitWritePropExpr(expr, ctx) {
3796
- const lineWasEmpty = ctx.lineIsEmpty();
3797
- if (!lineWasEmpty) {
3798
- ctx.print(expr, "(");
3799
- }
3800
- expr.receiver.visitExpression(this, ctx);
3801
- ctx.print(expr, `.${expr.name} = `);
3802
- expr.value.visitExpression(this, ctx);
3803
- if (!lineWasEmpty) {
3804
- ctx.print(expr, ")");
3805
- }
3806
- return null;
3807
- }
3808
3727
  visitInvokeFunctionExpr(expr, ctx) {
3809
3728
  const shouldParenthesize = expr.fn instanceof ArrowFunctionExpr;
3810
3729
  if (shouldParenthesize) {
@@ -3923,76 +3842,15 @@ var AbstractEmitterVisitor = class {
3923
3842
  return null;
3924
3843
  }
3925
3844
  visitBinaryOperatorExpr(ast, ctx) {
3926
- let opStr;
3927
- switch (ast.operator) {
3928
- case BinaryOperator.Equals:
3929
- opStr = "==";
3930
- break;
3931
- case BinaryOperator.Identical:
3932
- opStr = "===";
3933
- break;
3934
- case BinaryOperator.NotEquals:
3935
- opStr = "!=";
3936
- break;
3937
- case BinaryOperator.NotIdentical:
3938
- opStr = "!==";
3939
- break;
3940
- case BinaryOperator.And:
3941
- opStr = "&&";
3942
- break;
3943
- case BinaryOperator.BitwiseOr:
3944
- opStr = "|";
3945
- break;
3946
- case BinaryOperator.BitwiseAnd:
3947
- opStr = "&";
3948
- break;
3949
- case BinaryOperator.Or:
3950
- opStr = "||";
3951
- break;
3952
- case BinaryOperator.Plus:
3953
- opStr = "+";
3954
- break;
3955
- case BinaryOperator.Minus:
3956
- opStr = "-";
3957
- break;
3958
- case BinaryOperator.Divide:
3959
- opStr = "/";
3960
- break;
3961
- case BinaryOperator.Multiply:
3962
- opStr = "*";
3963
- break;
3964
- case BinaryOperator.Modulo:
3965
- opStr = "%";
3966
- break;
3967
- case BinaryOperator.Exponentiation:
3968
- opStr = "**";
3969
- break;
3970
- case BinaryOperator.Lower:
3971
- opStr = "<";
3972
- break;
3973
- case BinaryOperator.LowerEquals:
3974
- opStr = "<=";
3975
- break;
3976
- case BinaryOperator.Bigger:
3977
- opStr = ">";
3978
- break;
3979
- case BinaryOperator.BiggerEquals:
3980
- opStr = ">=";
3981
- break;
3982
- case BinaryOperator.NullishCoalesce:
3983
- opStr = "??";
3984
- break;
3985
- case BinaryOperator.In:
3986
- opStr = "in";
3987
- break;
3988
- default:
3989
- throw new Error(`Unknown operator ${ast.operator}`);
3845
+ const operator = BINARY_OPERATORS$1.get(ast.operator);
3846
+ if (!operator) {
3847
+ throw new Error(`Unknown operator ${ast.operator}`);
3990
3848
  }
3991
3849
  const parens = ast !== this.lastIfCondition;
3992
3850
  if (parens)
3993
3851
  ctx.print(ast, `(`);
3994
3852
  ast.lhs.visitExpression(this, ctx);
3995
- ctx.print(ast, ` ${opStr} `);
3853
+ ctx.print(ast, ` ${operator} `);
3996
3854
  ast.rhs.visitExpression(this, ctx);
3997
3855
  if (parens)
3998
3856
  ctx.print(ast, `)`);
@@ -4180,7 +4038,7 @@ function compileFactoryFunction(meta) {
4180
4038
  let retExpr = null;
4181
4039
  function makeConditionalFactory(nonCtorExpr) {
4182
4040
  const r = variable("__ngConditionalFactory__");
4183
- body.push(r.set(NULL_EXPR).toDeclStmt());
4041
+ body.push(new DeclareVarStmt(r.name, NULL_EXPR, INFERRED_TYPE));
4184
4042
  const ctorStmt = ctorExpr !== null ? r.set(ctorExpr).toStmt() : importExpr(Identifiers.invalidFactory).callFn([]).toStmt();
4185
4043
  body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));
4186
4044
  return r;
@@ -4309,21 +4167,6 @@ function getInjectFn(target) {
4309
4167
  }
4310
4168
  }
4311
4169
  __name(getInjectFn, "getInjectFn");
4312
- var ParserError = class {
4313
- static {
4314
- __name(this, "ParserError");
4315
- }
4316
- input;
4317
- errLocation;
4318
- ctxLocation;
4319
- message;
4320
- constructor(message, input, errLocation, ctxLocation) {
4321
- this.input = input;
4322
- this.errLocation = errLocation;
4323
- this.ctxLocation = ctxLocation;
4324
- this.message = `Parser Error: ${message} ${errLocation} [${input}] in ${ctxLocation}`;
4325
- }
4326
- };
4327
4170
  var ParseSpan = class {
4328
4171
  static {
4329
4172
  __name(this, "ParseSpan");
@@ -4430,23 +4273,6 @@ var PropertyRead = class extends ASTWithName {
4430
4273
  return visitor.visitPropertyRead(this, context);
4431
4274
  }
4432
4275
  };
4433
- var PropertyWrite = class extends ASTWithName {
4434
- static {
4435
- __name(this, "PropertyWrite");
4436
- }
4437
- receiver;
4438
- name;
4439
- value;
4440
- constructor(span, sourceSpan, nameSpan, receiver, name, value) {
4441
- super(span, sourceSpan, nameSpan);
4442
- this.receiver = receiver;
4443
- this.name = name;
4444
- this.value = value;
4445
- }
4446
- visit(visitor, context = null) {
4447
- return visitor.visitPropertyWrite(this, context);
4448
- }
4449
- };
4450
4276
  var SafePropertyRead = class extends ASTWithName {
4451
4277
  static {
4452
4278
  __name(this, "SafePropertyRead");
@@ -4492,23 +4318,11 @@ var SafeKeyedRead = class extends AST {
4492
4318
  return visitor.visitSafeKeyedRead(this, context);
4493
4319
  }
4494
4320
  };
4495
- var KeyedWrite = class extends AST {
4496
- static {
4497
- __name(this, "KeyedWrite");
4498
- }
4499
- receiver;
4500
- key;
4501
- value;
4502
- constructor(span, sourceSpan, receiver, key, value) {
4503
- super(span, sourceSpan);
4504
- this.receiver = receiver;
4505
- this.key = key;
4506
- this.value = value;
4507
- }
4508
- visit(visitor, context = null) {
4509
- return visitor.visitKeyedWrite(this, context);
4510
- }
4511
- };
4321
+ var BindingPipeType;
4322
+ (function(BindingPipeType2) {
4323
+ BindingPipeType2[BindingPipeType2["ReferencedByName"] = 0] = "ReferencedByName";
4324
+ BindingPipeType2[BindingPipeType2["ReferencedDirectly"] = 1] = "ReferencedDirectly";
4325
+ })(BindingPipeType || (BindingPipeType = {}));
4512
4326
  var BindingPipe = class extends ASTWithName {
4513
4327
  static {
4514
4328
  __name(this, "BindingPipe");
@@ -4516,11 +4330,13 @@ var BindingPipe = class extends ASTWithName {
4516
4330
  exp;
4517
4331
  name;
4518
4332
  args;
4519
- constructor(span, sourceSpan, exp, name, args, nameSpan) {
4333
+ type;
4334
+ constructor(span, sourceSpan, exp, name, args, type, nameSpan) {
4520
4335
  super(span, sourceSpan, nameSpan);
4521
4336
  this.exp = exp;
4522
4337
  this.name = name;
4523
4338
  this.args = args;
4339
+ this.type = type;
4524
4340
  }
4525
4341
  visit(visitor, context = null) {
4526
4342
  return visitor.visitPipe(this, context);
@@ -4598,6 +4414,9 @@ var Binary = class extends AST {
4598
4414
  visit(visitor, context = null) {
4599
4415
  return visitor.visitBinary(this, context);
4600
4416
  }
4417
+ static isAssignmentOperation(op) {
4418
+ return op === "=" || op === "+=" || op === "-=" || op === "*=" || op === "/=" || op === "%=" || op === "**=" || op === "&&=" || op === "||=" || op === "??=";
4419
+ }
4601
4420
  };
4602
4421
  var Unary = class _Unary extends Binary {
4603
4422
  static {
@@ -4894,11 +4713,6 @@ var RecursiveAstVisitor2 = class {
4894
4713
  this.visit(ast.receiver, context);
4895
4714
  this.visit(ast.key, context);
4896
4715
  }
4897
- visitKeyedWrite(ast, context) {
4898
- this.visit(ast.receiver, context);
4899
- this.visit(ast.key, context);
4900
- this.visit(ast.value, context);
4901
- }
4902
4716
  visitLiteralArray(ast, context) {
4903
4717
  this.visitAll(ast.expressions, context);
4904
4718
  }
@@ -4922,10 +4736,6 @@ var RecursiveAstVisitor2 = class {
4922
4736
  visitPropertyRead(ast, context) {
4923
4737
  this.visit(ast.receiver, context);
4924
4738
  }
4925
- visitPropertyWrite(ast, context) {
4926
- this.visit(ast.receiver, context);
4927
- this.visit(ast.value, context);
4928
- }
4929
4739
  visitSafePropertyRead(ast, context) {
4930
4740
  this.visit(ast.receiver, context);
4931
4741
  }
@@ -4977,7 +4787,7 @@ var ParsedProperty = class {
4977
4787
  keySpan;
4978
4788
  valueSpan;
4979
4789
  isLiteral;
4980
- isAnimation;
4790
+ isLegacyAnimation;
4981
4791
  constructor(name, expression, type, sourceSpan, keySpan, valueSpan) {
4982
4792
  this.name = name;
4983
4793
  this.expression = expression;
@@ -4986,20 +4796,20 @@ var ParsedProperty = class {
4986
4796
  this.keySpan = keySpan;
4987
4797
  this.valueSpan = valueSpan;
4988
4798
  this.isLiteral = this.type === ParsedPropertyType.LITERAL_ATTR;
4989
- this.isAnimation = this.type === ParsedPropertyType.ANIMATION;
4799
+ this.isLegacyAnimation = this.type === ParsedPropertyType.LEGACY_ANIMATION;
4990
4800
  }
4991
4801
  };
4992
4802
  var ParsedPropertyType;
4993
4803
  (function(ParsedPropertyType2) {
4994
4804
  ParsedPropertyType2[ParsedPropertyType2["DEFAULT"] = 0] = "DEFAULT";
4995
4805
  ParsedPropertyType2[ParsedPropertyType2["LITERAL_ATTR"] = 1] = "LITERAL_ATTR";
4996
- ParsedPropertyType2[ParsedPropertyType2["ANIMATION"] = 2] = "ANIMATION";
4806
+ ParsedPropertyType2[ParsedPropertyType2["LEGACY_ANIMATION"] = 2] = "LEGACY_ANIMATION";
4997
4807
  ParsedPropertyType2[ParsedPropertyType2["TWO_WAY"] = 3] = "TWO_WAY";
4998
4808
  })(ParsedPropertyType || (ParsedPropertyType = {}));
4999
4809
  var ParsedEventType;
5000
4810
  (function(ParsedEventType2) {
5001
4811
  ParsedEventType2[ParsedEventType2["Regular"] = 0] = "Regular";
5002
- ParsedEventType2[ParsedEventType2["Animation"] = 1] = "Animation";
4812
+ ParsedEventType2[ParsedEventType2["LegacyAnimation"] = 1] = "LegacyAnimation";
5003
4813
  ParsedEventType2[ParsedEventType2["TwoWay"] = 2] = "TwoWay";
5004
4814
  })(ParsedEventType || (ParsedEventType = {}));
5005
4815
  var ParsedEvent = class {
@@ -5046,7 +4856,7 @@ var BindingType;
5046
4856
  BindingType2[BindingType2["Attribute"] = 1] = "Attribute";
5047
4857
  BindingType2[BindingType2["Class"] = 2] = "Class";
5048
4858
  BindingType2[BindingType2["Style"] = 3] = "Style";
5049
- BindingType2[BindingType2["Animation"] = 4] = "Animation";
4859
+ BindingType2[BindingType2["LegacyAnimation"] = 4] = "LegacyAnimation";
5050
4860
  BindingType2[BindingType2["TwoWay"] = 5] = "TwoWay";
5051
4861
  })(BindingType || (BindingType = {}));
5052
4862
  var BoundElementProperty = class {
@@ -5237,7 +5047,7 @@ var BoundEvent = class _BoundEvent {
5237
5047
  }
5238
5048
  static fromParsedEvent(event) {
5239
5049
  const target = event.type === ParsedEventType.Regular ? event.targetOrPhase : null;
5240
- const phase = event.type === ParsedEventType.Animation ? event.targetOrPhase : null;
5050
+ const phase = event.type === ParsedEventType.LegacyAnimation ? event.targetOrPhase : null;
5241
5051
  if (event.keySpan === void 0) {
5242
5052
  throw new Error(`Unexpected state: keySpan must be defined for bound event but was not for ${event.name}: ${event.sourceSpan}`);
5243
5053
  }
@@ -5258,11 +5068,12 @@ var Element$1 = class Element {
5258
5068
  directives;
5259
5069
  children;
5260
5070
  references;
5071
+ isSelfClosing;
5261
5072
  sourceSpan;
5262
5073
  startSourceSpan;
5263
5074
  endSourceSpan;
5264
5075
  i18n;
5265
- constructor(name, attributes, inputs, outputs, directives, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5076
+ constructor(name, attributes, inputs, outputs, directives, children, references, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5266
5077
  this.name = name;
5267
5078
  this.attributes = attributes;
5268
5079
  this.inputs = inputs;
@@ -5270,6 +5081,7 @@ var Element$1 = class Element {
5270
5081
  this.directives = directives;
5271
5082
  this.children = children;
5272
5083
  this.references = references;
5084
+ this.isSelfClosing = isSelfClosing;
5273
5085
  this.sourceSpan = sourceSpan;
5274
5086
  this.startSourceSpan = startSourceSpan;
5275
5087
  this.endSourceSpan = endSourceSpan;
@@ -5642,11 +5454,12 @@ var Component$1 = class Component {
5642
5454
  directives;
5643
5455
  children;
5644
5456
  references;
5457
+ isSelfClosing;
5645
5458
  sourceSpan;
5646
5459
  startSourceSpan;
5647
5460
  endSourceSpan;
5648
5461
  i18n;
5649
- constructor(componentName, tagName, fullName, attributes, inputs, outputs, directives, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5462
+ constructor(componentName, tagName, fullName, attributes, inputs, outputs, directives, children, references, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5650
5463
  this.componentName = componentName;
5651
5464
  this.tagName = tagName;
5652
5465
  this.fullName = fullName;
@@ -5656,6 +5469,7 @@ var Component$1 = class Component {
5656
5469
  this.directives = directives;
5657
5470
  this.children = children;
5658
5471
  this.references = references;
5472
+ this.isSelfClosing = isSelfClosing;
5659
5473
  this.sourceSpan = sourceSpan;
5660
5474
  this.startSourceSpan = startSourceSpan;
5661
5475
  this.endSourceSpan = endSourceSpan;
@@ -5706,11 +5520,12 @@ var Template = class {
5706
5520
  children;
5707
5521
  references;
5708
5522
  variables;
5523
+ isSelfClosing;
5709
5524
  sourceSpan;
5710
5525
  startSourceSpan;
5711
5526
  endSourceSpan;
5712
5527
  i18n;
5713
- constructor(tagName, attributes, inputs, outputs, directives, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5528
+ constructor(tagName, attributes, inputs, outputs, directives, templateAttrs, children, references, variables, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5714
5529
  this.tagName = tagName;
5715
5530
  this.attributes = attributes;
5716
5531
  this.inputs = inputs;
@@ -5720,6 +5535,7 @@ var Template = class {
5720
5535
  this.children = children;
5721
5536
  this.references = references;
5722
5537
  this.variables = variables;
5538
+ this.isSelfClosing = isSelfClosing;
5723
5539
  this.sourceSpan = sourceSpan;
5724
5540
  this.startSourceSpan = startSourceSpan;
5725
5541
  this.endSourceSpan = endSourceSpan;
@@ -5736,15 +5552,17 @@ var Content = class {
5736
5552
  selector;
5737
5553
  attributes;
5738
5554
  children;
5555
+ isSelfClosing;
5739
5556
  sourceSpan;
5740
5557
  startSourceSpan;
5741
5558
  endSourceSpan;
5742
5559
  i18n;
5743
5560
  name = "ng-content";
5744
- constructor(selector, attributes, children, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5561
+ constructor(selector, attributes, children, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
5745
5562
  this.selector = selector;
5746
5563
  this.attributes = attributes;
5747
5564
  this.children = children;
5565
+ this.isSelfClosing = isSelfClosing;
5748
5566
  this.sourceSpan = sourceSpan;
5749
5567
  this.startSourceSpan = startSourceSpan;
5750
5568
  this.endSourceSpan = endSourceSpan;
@@ -5932,7 +5750,7 @@ function visitAll$1(visitor, nodes) {
5932
5750
  const result = [];
5933
5751
  if (visitor.visit) {
5934
5752
  for (const node of nodes) {
5935
- visitor.visit(node) || node.visit(visitor);
5753
+ visitor.visit(node);
5936
5754
  }
5937
5755
  } else {
5938
5756
  for (const node of nodes) {
@@ -7119,7 +6937,7 @@ var ParseErrorLevel;
7119
6937
  ParseErrorLevel2[ParseErrorLevel2["WARNING"] = 0] = "WARNING";
7120
6938
  ParseErrorLevel2[ParseErrorLevel2["ERROR"] = 1] = "ERROR";
7121
6939
  })(ParseErrorLevel || (ParseErrorLevel = {}));
7122
- var ParseError = class {
6940
+ var ParseError = class extends Error {
7123
6941
  static {
7124
6942
  __name(this, "ParseError");
7125
6943
  }
@@ -7128,10 +6946,12 @@ var ParseError = class {
7128
6946
  level;
7129
6947
  relatedError;
7130
6948
  constructor(span, msg, level = ParseErrorLevel.ERROR, relatedError) {
6949
+ super(msg);
7131
6950
  this.span = span;
7132
6951
  this.msg = msg;
7133
6952
  this.level = level;
7134
6953
  this.relatedError = relatedError;
6954
+ Object.setPrototypeOf(this, new.target.prototype);
7135
6955
  }
7136
6956
  contextualMessage() {
7137
6957
  const ctx = this.span.start.getContext(100, 3);
@@ -7633,7 +7453,11 @@ function tupleOfTypes(types) {
7633
7453
  __name(tupleOfTypes, "tupleOfTypes");
7634
7454
  function compilePipeFromMetadata(metadata) {
7635
7455
  const definitionMapValues = [];
7636
- definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
7456
+ definitionMapValues.push({
7457
+ key: "name",
7458
+ value: literal(metadata.pipeName ?? metadata.name),
7459
+ quoted: false
7460
+ });
7637
7461
  definitionMapValues.push({ key: "type", value: metadata.type.value, quoted: false });
7638
7462
  definitionMapValues.push({ key: "pure", value: literal(metadata.pure), quoted: false });
7639
7463
  if (metadata.isStandalone === false) {
@@ -8600,7 +8424,7 @@ var BindingKind;
8600
8424
  BindingKind2[BindingKind2["Property"] = 3] = "Property";
8601
8425
  BindingKind2[BindingKind2["Template"] = 4] = "Template";
8602
8426
  BindingKind2[BindingKind2["I18n"] = 5] = "I18n";
8603
- BindingKind2[BindingKind2["Animation"] = 6] = "Animation";
8427
+ BindingKind2[BindingKind2["LegacyAnimation"] = 6] = "LegacyAnimation";
8604
8428
  BindingKind2[BindingKind2["TwoWayProperty"] = 7] = "TwoWayProperty";
8605
8429
  })(BindingKind || (BindingKind = {}));
8606
8430
  var I18nParamResolutionTime;
@@ -8751,13 +8575,13 @@ function createBindingOp(target, kind, name, expression, unit, securityContext,
8751
8575
  };
8752
8576
  }
8753
8577
  __name(createBindingOp, "createBindingOp");
8754
- function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {
8578
+ function createPropertyOp(target, name, expression, isLegacyAnimationTrigger, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) {
8755
8579
  return {
8756
8580
  kind: OpKind.Property,
8757
8581
  target,
8758
8582
  name,
8759
8583
  expression,
8760
- isAnimationTrigger,
8584
+ isLegacyAnimationTrigger,
8761
8585
  securityContext,
8762
8586
  sanitizer: null,
8763
8587
  isStructuralTemplateAttribute,
@@ -9922,13 +9746,6 @@ function transformExpressionsInExpression(expr, transform2, flags) {
9922
9746
  } else if (expr instanceof ReadKeyExpr) {
9923
9747
  expr.receiver = transformExpressionsInExpression(expr.receiver, transform2, flags);
9924
9748
  expr.index = transformExpressionsInExpression(expr.index, transform2, flags);
9925
- } else if (expr instanceof WritePropExpr) {
9926
- expr.receiver = transformExpressionsInExpression(expr.receiver, transform2, flags);
9927
- expr.value = transformExpressionsInExpression(expr.value, transform2, flags);
9928
- } else if (expr instanceof WriteKeyExpr) {
9929
- expr.receiver = transformExpressionsInExpression(expr.receiver, transform2, flags);
9930
- expr.index = transformExpressionsInExpression(expr.index, transform2, flags);
9931
- expr.value = transformExpressionsInExpression(expr.value, transform2, flags);
9932
9749
  } else if (expr instanceof InvokeFunctionExpr) {
9933
9750
  expr.fn = transformExpressionsInExpression(expr.fn, transform2, flags);
9934
9751
  for (let i = 0; i < expr.args.length; i++) {
@@ -9952,8 +9769,6 @@ function transformExpressionsInExpression(expr, transform2, flags) {
9952
9769
  expr.expr = transformExpressionsInExpression(expr.expr, transform2, flags);
9953
9770
  } else if (expr instanceof VoidExpr) {
9954
9771
  expr.expr = transformExpressionsInExpression(expr.expr, transform2, flags);
9955
- } else if (expr instanceof WriteVarExpr) {
9956
- expr.value = transformExpressionsInExpression(expr.value, transform2, flags);
9957
9772
  } else if (expr instanceof LocalizedString) {
9958
9773
  for (let i = 0; i < expr.expressions.length; i++) {
9959
9774
  expr.expressions[i] = transformExpressionsInExpression(expr.expressions[i], transform2, flags);
@@ -10147,7 +9962,7 @@ var OpList = class _OpList {
10147
9962
  oldOp.next = null;
10148
9963
  let prev = oldPrev;
10149
9964
  for (const newOp of newOps) {
10150
- this.assertIsUnowned(newOp);
9965
+ _OpList.assertIsUnowned(newOp);
10151
9966
  newOp.debugListId = listId;
10152
9967
  prev.next = newOp;
10153
9968
  newOp.prev = prev;
@@ -10183,7 +9998,7 @@ var OpList = class _OpList {
10183
9998
  static insertBefore(op, target) {
10184
9999
  if (Array.isArray(op)) {
10185
10000
  for (const o of op) {
10186
- this.insertBefore(o, target);
10001
+ _OpList.insertBefore(o, target);
10187
10002
  }
10188
10003
  return;
10189
10004
  }
@@ -10418,7 +10233,7 @@ function createTextOp(xref, initialValue, icuPlaceholder, sourceSpan) {
10418
10233
  };
10419
10234
  }
10420
10235
  __name(createTextOp, "createTextOp");
10421
- function createListenerOp(target, targetSlot, name, tag, handlerOps, animationPhase, eventTarget, hostListener, sourceSpan) {
10236
+ function createListenerOp(target, targetSlot, name, tag, handlerOps, legacyAnimationPhase, eventTarget, hostListener, sourceSpan) {
10422
10237
  const handlerList = new OpList();
10423
10238
  handlerList.push(handlerOps);
10424
10239
  return {
@@ -10431,8 +10246,8 @@ function createListenerOp(target, targetSlot, name, tag, handlerOps, animationPh
10431
10246
  handlerOps: handlerList,
10432
10247
  handlerFnName: null,
10433
10248
  consumesDollarEvent: false,
10434
- isAnimationListener: animationPhase !== null,
10435
- animationPhase,
10249
+ isLegacyAnimationListener: legacyAnimationPhase !== null,
10250
+ legacyAnimationPhase,
10436
10251
  eventTarget,
10437
10252
  sourceSpan,
10438
10253
  ...NEW_OP
@@ -10677,12 +10492,12 @@ function createSourceLocationOp(templatePath, locations) {
10677
10492
  };
10678
10493
  }
10679
10494
  __name(createSourceLocationOp, "createSourceLocationOp");
10680
- function createDomPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {
10495
+ function createDomPropertyOp(name, expression, isLegacyAnimationTrigger, i18nContext, securityContext, sourceSpan) {
10681
10496
  return {
10682
10497
  kind: OpKind.DomProperty,
10683
10498
  name,
10684
10499
  expression,
10685
- isAnimationTrigger,
10500
+ isLegacyAnimationTrigger,
10686
10501
  i18nContext,
10687
10502
  securityContext,
10688
10503
  sanitizer: null,
@@ -10699,6 +10514,11 @@ var CompilationJobKind;
10699
10514
  CompilationJobKind2[CompilationJobKind2["Host"] = 1] = "Host";
10700
10515
  CompilationJobKind2[CompilationJobKind2["Both"] = 2] = "Both";
10701
10516
  })(CompilationJobKind || (CompilationJobKind = {}));
10517
+ var TemplateCompilationMode;
10518
+ (function(TemplateCompilationMode2) {
10519
+ TemplateCompilationMode2[TemplateCompilationMode2["Full"] = 0] = "Full";
10520
+ TemplateCompilationMode2[TemplateCompilationMode2["DomOnly"] = 1] = "DomOnly";
10521
+ })(TemplateCompilationMode || (TemplateCompilationMode = {}));
10702
10522
  var CompilationJob = class {
10703
10523
  static {
10704
10524
  __name(this, "CompilationJob");
@@ -10706,10 +10526,12 @@ var CompilationJob = class {
10706
10526
  componentName;
10707
10527
  pool;
10708
10528
  compatibility;
10709
- constructor(componentName, pool, compatibility) {
10529
+ mode;
10530
+ constructor(componentName, pool, compatibility, mode) {
10710
10531
  this.componentName = componentName;
10711
10532
  this.pool = pool;
10712
10533
  this.compatibility = compatibility;
10534
+ this.mode = mode;
10713
10535
  }
10714
10536
  kind = CompilationJobKind.Both;
10715
10537
  /**
@@ -10733,8 +10555,8 @@ var ComponentCompilationJob = class extends CompilationJob {
10733
10555
  allDeferrableDepsFn;
10734
10556
  relativeTemplatePath;
10735
10557
  enableDebugLocations;
10736
- constructor(componentName, pool, compatibility, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations) {
10737
- super(componentName, pool, compatibility);
10558
+ constructor(componentName, pool, compatibility, mode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations) {
10559
+ super(componentName, pool, compatibility, mode);
10738
10560
  this.relativeContextFilePath = relativeContextFilePath;
10739
10561
  this.i18nUseExternalIds = i18nUseExternalIds;
10740
10562
  this.deferMeta = deferMeta;
@@ -10877,8 +10699,8 @@ var HostBindingCompilationJob = class extends CompilationJob {
10877
10699
  static {
10878
10700
  __name(this, "HostBindingCompilationJob");
10879
10701
  }
10880
- constructor(componentName, pool, compatibility) {
10881
- super(componentName, pool, compatibility);
10702
+ constructor(componentName, pool, compatibility, mode) {
10703
+ super(componentName, pool, compatibility, mode);
10882
10704
  this.root = new HostBindingCompilationUnit(this);
10883
10705
  }
10884
10706
  kind = CompilationJobKind.Host;
@@ -11065,7 +10887,7 @@ function extractAttributes(job) {
11065
10887
  extractAttributeOp(unit, op, elements);
11066
10888
  break;
11067
10889
  case OpKind.Property:
11068
- if (!op.isAnimationTrigger) {
10890
+ if (!op.isLegacyAnimationTrigger) {
11069
10891
  let bindingKind;
11070
10892
  if (op.i18nMessage !== null && op.templateKind === null) {
11071
10893
  bindingKind = BindingKind.I18n;
@@ -11127,7 +10949,7 @@ function extractAttributes(job) {
11127
10949
  }
11128
10950
  break;
11129
10951
  case OpKind.Listener:
11130
- if (!op.isAnimationListener) {
10952
+ if (!op.isLegacyAnimationListener) {
11131
10953
  const extractedAttributeOp = createExtractedAttributeOp(
11132
10954
  op.target,
11133
10955
  BindingKind.Property,
@@ -11237,11 +11059,11 @@ function specializeBindings(job) {
11237
11059
  }
11238
11060
  break;
11239
11061
  case BindingKind.Property:
11240
- case BindingKind.Animation:
11062
+ case BindingKind.LegacyAnimation:
11241
11063
  if (job.kind === CompilationJobKind.Host) {
11242
- OpList.replace(op, createDomPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.securityContext, op.sourceSpan));
11064
+ OpList.replace(op, createDomPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.LegacyAnimation, op.i18nContext, op.securityContext, op.sourceSpan));
11243
11065
  } else {
11244
- OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));
11066
+ OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.LegacyAnimation, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));
11245
11067
  }
11246
11068
  break;
11247
11069
  case BindingKind.TwoWayProperty:
@@ -11281,7 +11103,15 @@ var CHAIN_COMPATIBILITY = /* @__PURE__ */ new Map([
11281
11103
  [Identifiers.twoWayListener, Identifiers.twoWayListener],
11282
11104
  [Identifiers.declareLet, Identifiers.declareLet],
11283
11105
  [Identifiers.conditionalCreate, Identifiers.conditionalBranchCreate],
11284
- [Identifiers.conditionalBranchCreate, Identifiers.conditionalBranchCreate]
11106
+ [Identifiers.conditionalBranchCreate, Identifiers.conditionalBranchCreate],
11107
+ [Identifiers.domElement, Identifiers.domElement],
11108
+ [Identifiers.domElementStart, Identifiers.domElementStart],
11109
+ [Identifiers.domElementEnd, Identifiers.domElementEnd],
11110
+ [Identifiers.domElementContainer, Identifiers.domElementContainer],
11111
+ [Identifiers.domElementContainerStart, Identifiers.domElementContainerStart],
11112
+ [Identifiers.domElementContainerEnd, Identifiers.domElementContainerEnd],
11113
+ [Identifiers.domListener, Identifiers.domListener],
11114
+ [Identifiers.domTemplate, Identifiers.domTemplate]
11285
11115
  ]);
11286
11116
  var MAX_CHAIN_LENGTH = 256;
11287
11117
  function chain(job) {
@@ -11378,6 +11208,7 @@ var BINARY_OPERATORS = /* @__PURE__ */ new Map([
11378
11208
  ["|", BinaryOperator.BitwiseOr],
11379
11209
  ["&", BinaryOperator.BitwiseAnd],
11380
11210
  ["/", BinaryOperator.Divide],
11211
+ ["=", BinaryOperator.Assign],
11381
11212
  ["==", BinaryOperator.Equals],
11382
11213
  ["===", BinaryOperator.Identical],
11383
11214
  ["<", BinaryOperator.Lower],
@@ -11391,7 +11222,16 @@ var BINARY_OPERATORS = /* @__PURE__ */ new Map([
11391
11222
  ["??", BinaryOperator.NullishCoalesce],
11392
11223
  ["||", BinaryOperator.Or],
11393
11224
  ["+", BinaryOperator.Plus],
11394
- ["in", BinaryOperator.In]
11225
+ ["in", BinaryOperator.In],
11226
+ ["+=", BinaryOperator.AdditionAssignment],
11227
+ ["-=", BinaryOperator.SubtractionAssignment],
11228
+ ["*=", BinaryOperator.MultiplicationAssignment],
11229
+ ["/=", BinaryOperator.DivisionAssignment],
11230
+ ["%=", BinaryOperator.RemainderAssignment],
11231
+ ["**=", BinaryOperator.ExponentiationAssignment],
11232
+ ["&&=", BinaryOperator.AndAssignment],
11233
+ ["||=", BinaryOperator.OrAssignment],
11234
+ ["??=", BinaryOperator.NullishCoalesceAssignment]
11395
11235
  ]);
11396
11236
  function namespaceForKey(namespacePrefixKey) {
11397
11237
  const NAMESPACES = /* @__PURE__ */ new Map([
@@ -12607,14 +12447,16 @@ var Element2 = class extends NodeWithI18n {
12607
12447
  attrs;
12608
12448
  directives;
12609
12449
  children;
12450
+ isSelfClosing;
12610
12451
  startSourceSpan;
12611
12452
  endSourceSpan;
12612
- constructor(name, attrs, directives, children, sourceSpan, startSourceSpan, endSourceSpan = null, i18n2) {
12453
+ constructor(name, attrs, directives, children, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan = null, i18n2) {
12613
12454
  super(sourceSpan, i18n2);
12614
12455
  this.name = name;
12615
12456
  this.attrs = attrs;
12616
12457
  this.directives = directives;
12617
12458
  this.children = children;
12459
+ this.isSelfClosing = isSelfClosing;
12618
12460
  this.startSourceSpan = startSourceSpan;
12619
12461
  this.endSourceSpan = endSourceSpan;
12620
12462
  }
@@ -12669,9 +12511,10 @@ var Component2 = class extends NodeWithI18n {
12669
12511
  attrs;
12670
12512
  directives;
12671
12513
  children;
12514
+ isSelfClosing;
12672
12515
  startSourceSpan;
12673
12516
  endSourceSpan;
12674
- constructor(componentName, tagName, fullName, attrs, directives, children, sourceSpan, startSourceSpan, endSourceSpan = null, i18n2) {
12517
+ constructor(componentName, tagName, fullName, attrs, directives, children, isSelfClosing, sourceSpan, startSourceSpan, endSourceSpan = null, i18n2) {
12675
12518
  super(sourceSpan, i18n2);
12676
12519
  this.componentName = componentName;
12677
12520
  this.tagName = tagName;
@@ -12679,6 +12522,7 @@ var Component2 = class extends NodeWithI18n {
12679
12522
  this.attrs = attrs;
12680
12523
  this.directives = directives;
12681
12524
  this.children = children;
12525
+ this.isSelfClosing = isSelfClosing;
12682
12526
  this.startSourceSpan = startSourceSpan;
12683
12527
  this.endSourceSpan = endSourceSpan;
12684
12528
  }
@@ -14940,16 +14784,6 @@ var NAMED_ENTITIES = {
14940
14784
  };
14941
14785
  var NGSP_UNICODE = "\uE500";
14942
14786
  NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
14943
- var TokenError = class extends ParseError {
14944
- static {
14945
- __name(this, "TokenError");
14946
- }
14947
- tokenType;
14948
- constructor(errorMsg, tokenType, span) {
14949
- super(span, errorMsg);
14950
- this.tokenType = tokenType;
14951
- }
14952
- };
14953
14787
  var TokenizeResult = class {
14954
14788
  static {
14955
14789
  __name(this, "TokenizeResult");
@@ -14988,15 +14822,6 @@ var CharacterReferenceType;
14988
14822
  CharacterReferenceType2["HEX"] = "hexadecimal";
14989
14823
  CharacterReferenceType2["DEC"] = "decimal";
14990
14824
  })(CharacterReferenceType || (CharacterReferenceType = {}));
14991
- var _ControlFlowError = class {
14992
- static {
14993
- __name(this, "_ControlFlowError");
14994
- }
14995
- error;
14996
- constructor(error) {
14997
- this.error = error;
14998
- }
14999
- };
15000
14825
  var _Tokenizer = class {
15001
14826
  static {
15002
14827
  __name(this, "_Tokenizer");
@@ -15264,10 +15089,10 @@ var _Tokenizer = class {
15264
15089
  }
15265
15090
  _endToken(parts, end) {
15266
15091
  if (this._currentTokenStart === null) {
15267
- throw new TokenError("Programming error - attempted to end a token when there was no start to the token", this._currentTokenType, this._cursor.getSpan(end));
15092
+ throw new ParseError(this._cursor.getSpan(end), "Programming error - attempted to end a token when there was no start to the token");
15268
15093
  }
15269
15094
  if (this._currentTokenType === null) {
15270
- throw new TokenError("Programming error - attempted to end a token which has no token type", null, this._cursor.getSpan(this._currentTokenStart));
15095
+ throw new ParseError(this._cursor.getSpan(this._currentTokenStart), "Programming error - attempted to end a token which has no token type");
15271
15096
  }
15272
15097
  const token = {
15273
15098
  type: this._currentTokenType,
@@ -15283,17 +15108,17 @@ var _Tokenizer = class {
15283
15108
  if (this._isInExpansionForm()) {
15284
15109
  msg += ` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`;
15285
15110
  }
15286
- const error = new TokenError(msg, this._currentTokenType, span);
15111
+ const error = new ParseError(span, msg);
15287
15112
  this._currentTokenStart = null;
15288
15113
  this._currentTokenType = null;
15289
- return new _ControlFlowError(error);
15114
+ return error;
15290
15115
  }
15291
15116
  handleError(e) {
15292
15117
  if (e instanceof CursorError) {
15293
15118
  e = this._createError(e.msg, this._cursor.getSpan(e.cursor));
15294
15119
  }
15295
- if (e instanceof _ControlFlowError) {
15296
- this.errors.push(e.error);
15120
+ if (e instanceof ParseError) {
15121
+ this.errors.push(e);
15297
15122
  } else {
15298
15123
  throw e;
15299
15124
  }
@@ -15533,7 +15358,7 @@ var _Tokenizer = class {
15533
15358
  this._consumeTagOpenEnd();
15534
15359
  }
15535
15360
  } catch (e) {
15536
- if (e instanceof _ControlFlowError) {
15361
+ if (e instanceof ParseError) {
15537
15362
  if (openToken) {
15538
15363
  openToken.type = openToken.type === 33 ? 37 : 4;
15539
15364
  } else {
@@ -16224,15 +16049,17 @@ var EscapedCharacterCursor = class _EscapedCharacterCursor extends PlainCharacte
16224
16049
  }
16225
16050
  }
16226
16051
  };
16227
- var CursorError = class {
16052
+ var CursorError = class extends Error {
16228
16053
  static {
16229
16054
  __name(this, "CursorError");
16230
16055
  }
16231
16056
  msg;
16232
16057
  cursor;
16233
16058
  constructor(msg, cursor) {
16059
+ super(msg);
16234
16060
  this.msg = msg;
16235
16061
  this.cursor = cursor;
16062
+ Object.setPrototypeOf(this, new.target.prototype);
16236
16063
  }
16237
16064
  };
16238
16065
  var TreeError = class _TreeError extends ParseError {
@@ -16271,7 +16098,7 @@ var Parser$1 = class Parser {
16271
16098
  const tokenizeResult = tokenize(source, url, this.getTagDefinition, options);
16272
16099
  const parser = new _TreeBuilder(tokenizeResult.tokens, this.getTagDefinition);
16273
16100
  parser.build();
16274
- return new ParseTreeResult(parser.rootNodes, tokenizeResult.errors.concat(parser.errors));
16101
+ return new ParseTreeResult(parser.rootNodes, [...tokenizeResult.errors, ...parser.errors]);
16275
16102
  }
16276
16103
  };
16277
16104
  var _TreeBuilder = class __TreeBuilder {
@@ -16507,7 +16334,7 @@ var _TreeBuilder = class __TreeBuilder {
16507
16334
  const end = this._peek.sourceSpan.fullStart;
16508
16335
  const span = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);
16509
16336
  const startSpan = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart);
16510
- const el = new Element2(fullName, attrs, directives, [], span, startSpan, void 0);
16337
+ const el = new Element2(fullName, attrs, directives, [], selfClosing, span, startSpan, void 0);
16511
16338
  const parent = this._getContainer();
16512
16339
  const isClosedByChild = parent !== null && !!this._getTagDefinition(parent)?.isClosedByChild(el.name);
16513
16340
  this._pushContainer(el, isClosedByChild);
@@ -16531,7 +16358,7 @@ var _TreeBuilder = class __TreeBuilder {
16531
16358
  const end = this._peek.sourceSpan.fullStart;
16532
16359
  const span = new ParseSourceSpan(startToken.sourceSpan.start, end, startToken.sourceSpan.fullStart);
16533
16360
  const startSpan = new ParseSourceSpan(startToken.sourceSpan.start, end, startToken.sourceSpan.fullStart);
16534
- const node = new Component2(componentName, tagName, fullName, attrs, directives, [], span, startSpan, void 0);
16361
+ const node = new Component2(componentName, tagName, fullName, attrs, directives, [], selfClosing, span, startSpan, void 0);
16535
16362
  const parent = this._getContainer();
16536
16363
  const isClosedByChild = parent !== null && node.tagName !== null && !!this._getTagDefinition(parent)?.isClosedByChild(node.tagName);
16537
16364
  this._pushContainer(node, isClosedByChild);
@@ -16857,11 +16684,11 @@ var WhitespaceVisitor = class {
16857
16684
  }
16858
16685
  visitElement(element2, context) {
16859
16686
  if (SKIP_WS_TRIM_TAGS.has(element2.name) || hasPreserveWhitespacesAttr(element2.attrs)) {
16860
- const newElement2 = new Element2(element2.name, visitAllWithSiblings(this, element2.attrs), visitAllWithSiblings(this, element2.directives), element2.children, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
16687
+ const newElement2 = new Element2(element2.name, visitAllWithSiblings(this, element2.attrs), visitAllWithSiblings(this, element2.directives), element2.children, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
16861
16688
  this.originalNodeMap?.set(newElement2, element2);
16862
16689
  return newElement2;
16863
16690
  }
16864
- const newElement = new Element2(element2.name, element2.attrs, element2.directives, visitAllWithSiblings(this, element2.children), element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
16691
+ const newElement = new Element2(element2.name, element2.attrs, element2.directives, visitAllWithSiblings(this, element2.children), element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
16865
16692
  this.originalNodeMap?.set(newElement, element2);
16866
16693
  return newElement;
16867
16694
  }
@@ -16922,11 +16749,11 @@ var WhitespaceVisitor = class {
16922
16749
  }
16923
16750
  visitComponent(node, context) {
16924
16751
  if (node.tagName && SKIP_WS_TRIM_TAGS.has(node.tagName) || hasPreserveWhitespacesAttr(node.attrs)) {
16925
- const newElement2 = new Component2(node.componentName, node.tagName, node.fullName, visitAllWithSiblings(this, node.attrs), visitAllWithSiblings(this, node.directives), node.children, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
16752
+ const newElement2 = new Component2(node.componentName, node.tagName, node.fullName, visitAllWithSiblings(this, node.attrs), visitAllWithSiblings(this, node.directives), node.children, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
16926
16753
  this.originalNodeMap?.set(newElement2, node);
16927
16754
  return newElement2;
16928
16755
  }
16929
- const newElement = new Component2(node.componentName, node.tagName, node.fullName, node.attrs, node.directives, visitAllWithSiblings(this, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
16756
+ const newElement = new Component2(node.componentName, node.tagName, node.fullName, node.attrs, node.directives, visitAllWithSiblings(this, node.children), node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.i18n);
16930
16757
  this.originalNodeMap?.set(newElement, node);
16931
16758
  return newElement;
16932
16759
  }
@@ -17247,13 +17074,17 @@ var _Scanner = class {
17247
17074
  case $HASH:
17248
17075
  return this.scanPrivateIdentifier();
17249
17076
  case $PLUS:
17077
+ return this.scanComplexOperator(start, "+", $EQ, "=");
17250
17078
  case $MINUS:
17079
+ return this.scanComplexOperator(start, "-", $EQ, "=");
17251
17080
  case $SLASH:
17081
+ return this.scanComplexOperator(start, "/", $EQ, "=");
17252
17082
  case $PERCENT:
17083
+ return this.scanComplexOperator(start, "%", $EQ, "=");
17253
17084
  case $CARET:
17254
- return this.scanOperator(start, String.fromCharCode(peek));
17085
+ return this.scanOperator(start, "^");
17255
17086
  case $STAR:
17256
- return this.scanComplexOperator(start, "*", $STAR, "*");
17087
+ return this.scanStar(start);
17257
17088
  case $QUESTION:
17258
17089
  return this.scanQuestion(start);
17259
17090
  case $LT:
@@ -17263,9 +17094,9 @@ var _Scanner = class {
17263
17094
  case $EQ:
17264
17095
  return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, "=", $EQ, "=");
17265
17096
  case $AMPERSAND:
17266
- return this.scanComplexOperator(start, "&", $AMPERSAND, "&");
17097
+ return this.scanComplexOperator(start, "&", $AMPERSAND, "&", $EQ, "=");
17267
17098
  case $BAR:
17268
- return this.scanComplexOperator(start, "|", $BAR, "|");
17099
+ return this.scanComplexOperator(start, "|", $BAR, "|", $EQ, "=");
17269
17100
  case $NBSP:
17270
17101
  while (isWhitespace(this.peek))
17271
17102
  this.advance();
@@ -17398,12 +17229,19 @@ var _Scanner = class {
17398
17229
  }
17399
17230
  scanQuestion(start) {
17400
17231
  this.advance();
17401
- let str = "?";
17402
- if (this.peek === $QUESTION || this.peek === $PERIOD) {
17403
- str += this.peek === $PERIOD ? "." : "?";
17232
+ let operator = "?";
17233
+ if (this.peek === $QUESTION) {
17234
+ operator += "?";
17235
+ this.advance();
17236
+ if (this.peek === $EQ) {
17237
+ operator += "=";
17238
+ this.advance();
17239
+ }
17240
+ } else if (this.peek === $PERIOD) {
17241
+ operator += ".";
17404
17242
  this.advance();
17405
17243
  }
17406
- return newOperatorToken(start, this.index, str);
17244
+ return newOperatorToken(start, this.index, operator);
17407
17245
  }
17408
17246
  scanTemplateLiteralPart(start) {
17409
17247
  let buffer = "";
@@ -17460,6 +17298,22 @@ var _Scanner = class {
17460
17298
  buffer += String.fromCharCode(unescapedCode);
17461
17299
  return buffer;
17462
17300
  }
17301
+ scanStar(start) {
17302
+ this.advance();
17303
+ let operator = "*";
17304
+ if (this.peek === $STAR) {
17305
+ operator += "*";
17306
+ this.advance();
17307
+ if (this.peek === $EQ) {
17308
+ operator += "=";
17309
+ this.advance();
17310
+ }
17311
+ } else if (this.peek === $EQ) {
17312
+ operator += "=";
17313
+ this.advance();
17314
+ }
17315
+ return newOperatorToken(start, this.index, operator);
17316
+ }
17463
17317
  };
17464
17318
  function isIdentifierStart(code) {
17465
17319
  return $a <= code && code <= $z || $A <= code && code <= $Z || code == $_ || code == $$;
@@ -17528,25 +17382,32 @@ var TemplateBindingParseResult = class {
17528
17382
  this.errors = errors;
17529
17383
  }
17530
17384
  };
17385
+ function getLocation(span) {
17386
+ return span.start.toString() || "(unknown)";
17387
+ }
17388
+ __name(getLocation, "getLocation");
17531
17389
  var Parser2 = class {
17532
17390
  static {
17533
17391
  __name(this, "Parser");
17534
17392
  }
17535
17393
  _lexer;
17536
- errors = [];
17537
- constructor(_lexer) {
17394
+ _supportsDirectPipeReferences;
17395
+ constructor(_lexer, _supportsDirectPipeReferences = false) {
17538
17396
  this._lexer = _lexer;
17397
+ this._supportsDirectPipeReferences = _supportsDirectPipeReferences;
17539
17398
  }
17540
- parseAction(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17541
- this._checkNoInterpolation(input, location, interpolationConfig);
17399
+ parseAction(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17400
+ const errors = [];
17401
+ this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
17542
17402
  const sourceToLex = this._stripComments(input);
17543
17403
  const tokens = this._lexer.tokenize(sourceToLex);
17544
- const ast = new _ParseAST(input, location, absoluteOffset, tokens, 1, this.errors, 0).parseChain();
17545
- return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
17404
+ const ast = new _ParseAST(input, parseSourceSpan, absoluteOffset, tokens, 1, errors, 0, this._supportsDirectPipeReferences).parseChain();
17405
+ return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
17546
17406
  }
17547
- parseBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17548
- const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);
17549
- return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
17407
+ parseBinding(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17408
+ const errors = [];
17409
+ const ast = this._parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors);
17410
+ return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
17550
17411
  }
17551
17412
  checkSimpleExpression(ast) {
17552
17413
  const checker = new SimpleExpressionChecker();
@@ -17554,22 +17415,20 @@ var Parser2 = class {
17554
17415
  return checker.errors;
17555
17416
  }
17556
17417
  // Host bindings parsed here
17557
- parseSimpleBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17558
- const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);
17559
- const errors = this.checkSimpleExpression(ast);
17560
- if (errors.length > 0) {
17561
- this._reportError(`Host binding expression cannot contain ${errors.join(" ")}`, input, location);
17418
+ parseSimpleBinding(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17419
+ const errors = [];
17420
+ const ast = this._parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors);
17421
+ const simplExpressionErrors = this.checkSimpleExpression(ast);
17422
+ if (simplExpressionErrors.length > 0) {
17423
+ errors.push(getParseError(`Host binding expression cannot contain ${simplExpressionErrors.join(" ")}`, input, "", parseSourceSpan));
17562
17424
  }
17563
- return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
17564
- }
17565
- _reportError(message, input, errLocation, ctxLocation) {
17566
- this.errors.push(new ParserError(message, input, errLocation, ctxLocation));
17425
+ return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
17567
17426
  }
17568
- _parseBindingAst(input, location, absoluteOffset, interpolationConfig) {
17569
- this._checkNoInterpolation(input, location, interpolationConfig);
17427
+ _parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors) {
17428
+ this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
17570
17429
  const sourceToLex = this._stripComments(input);
17571
17430
  const tokens = this._lexer.tokenize(sourceToLex);
17572
- return new _ParseAST(input, location, absoluteOffset, tokens, 0, this.errors, 0).parseChain();
17431
+ return new _ParseAST(input, parseSourceSpan, absoluteOffset, tokens, 0, errors, 0, this._supportsDirectPipeReferences).parseChain();
17573
17432
  }
17574
17433
  /**
17575
17434
  * Parse microsyntax template expression and return a list of bindings or
@@ -17597,53 +17456,48 @@ var Parser2 = class {
17597
17456
  * @param absoluteKeyOffset start of the `templateKey`
17598
17457
  * @param absoluteValueOffset start of the `templateValue`
17599
17458
  */
17600
- parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {
17459
+ parseTemplateBindings(templateKey, templateValue, parseSourceSpan, absoluteKeyOffset, absoluteValueOffset) {
17601
17460
  const tokens = this._lexer.tokenize(templateValue);
17602
- const parser = new _ParseAST(
17603
- templateValue,
17604
- templateUrl,
17605
- absoluteValueOffset,
17606
- tokens,
17607
- 0,
17608
- this.errors,
17609
- 0
17610
- /* relative offset */
17611
- );
17461
+ const errors = [];
17462
+ const parser = new _ParseAST(templateValue, parseSourceSpan, absoluteValueOffset, tokens, 0, errors, 0, this._supportsDirectPipeReferences);
17612
17463
  return parser.parseTemplateBindings({
17613
17464
  source: templateKey,
17614
17465
  span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length)
17615
17466
  });
17616
17467
  }
17617
- parseInterpolation(input, location, absoluteOffset, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17618
- const { strings, expressions, offsets } = this.splitInterpolation(input, location, interpolatedTokens, interpolationConfig);
17468
+ parseInterpolation(input, parseSourceSpan, absoluteOffset, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17469
+ const errors = [];
17470
+ const { strings, expressions, offsets } = this.splitInterpolation(input, parseSourceSpan, errors, interpolatedTokens, interpolationConfig);
17619
17471
  if (expressions.length === 0)
17620
17472
  return null;
17621
17473
  const expressionNodes = [];
17622
17474
  for (let i = 0; i < expressions.length; ++i) {
17475
+ const expressionSpan = interpolatedTokens?.[i * 2 + 1]?.sourceSpan;
17623
17476
  const expressionText = expressions[i].text;
17624
17477
  const sourceToLex = this._stripComments(expressionText);
17625
17478
  const tokens = this._lexer.tokenize(sourceToLex);
17626
- const ast = new _ParseAST(input, location, absoluteOffset, tokens, 0, this.errors, offsets[i]).parseChain();
17479
+ const ast = new _ParseAST(expressionSpan ? expressionText : input, expressionSpan || parseSourceSpan, absoluteOffset, tokens, 0, errors, offsets[i], this._supportsDirectPipeReferences).parseChain();
17627
17480
  expressionNodes.push(ast);
17628
17481
  }
17629
- return this.createInterpolationAst(strings.map((s) => s.text), expressionNodes, input, location, absoluteOffset);
17482
+ return this.createInterpolationAst(strings.map((s) => s.text), expressionNodes, input, getLocation(parseSourceSpan), absoluteOffset, errors);
17630
17483
  }
17631
17484
  /**
17632
17485
  * Similar to `parseInterpolation`, but treats the provided string as a single expression
17633
17486
  * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).
17634
17487
  * This is used for parsing the switch expression in ICUs.
17635
17488
  */
17636
- parseInterpolationExpression(expression, location, absoluteOffset) {
17489
+ parseInterpolationExpression(expression, parseSourceSpan, absoluteOffset) {
17637
17490
  const sourceToLex = this._stripComments(expression);
17638
17491
  const tokens = this._lexer.tokenize(sourceToLex);
17639
- const ast = new _ParseAST(expression, location, absoluteOffset, tokens, 0, this.errors, 0).parseChain();
17492
+ const errors = [];
17493
+ const ast = new _ParseAST(expression, parseSourceSpan, absoluteOffset, tokens, 0, errors, 0, this._supportsDirectPipeReferences).parseChain();
17640
17494
  const strings = ["", ""];
17641
- return this.createInterpolationAst(strings, [ast], expression, location, absoluteOffset);
17495
+ return this.createInterpolationAst(strings, [ast], expression, getLocation(parseSourceSpan), absoluteOffset, errors);
17642
17496
  }
17643
- createInterpolationAst(strings, expressions, input, location, absoluteOffset) {
17497
+ createInterpolationAst(strings, expressions, input, location, absoluteOffset, errors) {
17644
17498
  const span = new ParseSpan(0, input.length);
17645
17499
  const interpolation = new Interpolation$1(span, span.toAbsolute(absoluteOffset), strings, expressions);
17646
- return new ASTWithSource(interpolation, input, location, absoluteOffset, this.errors);
17500
+ return new ASTWithSource(interpolation, input, location, absoluteOffset, errors);
17647
17501
  }
17648
17502
  /**
17649
17503
  * Splits a string of text into "raw" text segments and expressions present in interpolations in
@@ -17652,7 +17506,7 @@ var Parser2 = class {
17652
17506
  * `SplitInterpolation` with splits that look like
17653
17507
  * <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>
17654
17508
  */
17655
- splitInterpolation(input, location, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17509
+ splitInterpolation(input, parseSourceSpan, errors, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
17656
17510
  const strings = [];
17657
17511
  const expressions = [];
17658
17512
  const offsets = [];
@@ -17683,7 +17537,7 @@ var Parser2 = class {
17683
17537
  const fullEnd = exprEnd + interpEnd.length;
17684
17538
  const text2 = input.substring(exprStart, exprEnd);
17685
17539
  if (text2.trim().length === 0) {
17686
- this._reportError("Blank expressions are not allowed in interpolated strings", input, `at column ${i} in`, location);
17540
+ errors.push(getParseError("Blank expressions are not allowed in interpolated strings", input, `at column ${i} in`, parseSourceSpan));
17687
17541
  }
17688
17542
  expressions.push({ text: text2, start: fullStart, end: fullEnd });
17689
17543
  const startInOriginalTemplate = inputToTemplateIndexMap?.get(fullStart) ?? fullStart;
@@ -17704,9 +17558,9 @@ var Parser2 = class {
17704
17558
  }
17705
17559
  return new SplitInterpolation(strings, expressions, offsets);
17706
17560
  }
17707
- wrapLiteralPrimitive(input, location, absoluteOffset) {
17561
+ wrapLiteralPrimitive(input, sourceSpanOrLocation, absoluteOffset) {
17708
17562
  const span = new ParseSpan(0, input == null ? 0 : input.length);
17709
- return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input, location, absoluteOffset, this.errors);
17563
+ return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input, typeof sourceSpanOrLocation === "string" ? sourceSpanOrLocation : getLocation(sourceSpanOrLocation), absoluteOffset, []);
17710
17564
  }
17711
17565
  _stripComments(input) {
17712
17566
  const i = this._commentStart(input);
@@ -17727,7 +17581,7 @@ var Parser2 = class {
17727
17581
  }
17728
17582
  return null;
17729
17583
  }
17730
- _checkNoInterpolation(input, location, { start, end }) {
17584
+ _checkNoInterpolation(errors, input, parseSourceSpan, { start, end }) {
17731
17585
  let startIndex = -1;
17732
17586
  let endIndex = -1;
17733
17587
  for (const charIndex of this._forEachUnquotedChar(input, 0)) {
@@ -17743,7 +17597,7 @@ var Parser2 = class {
17743
17597
  }
17744
17598
  }
17745
17599
  if (startIndex > -1 && endIndex > -1) {
17746
- this._reportError(`Got interpolation (${start}${end}) where expression was expected`, input, `at column ${startIndex} in`, location);
17600
+ errors.push(getParseError(`Got interpolation (${start}${end}) where expression was expected`, input, `at column ${startIndex} in`, parseSourceSpan));
17747
17601
  }
17748
17602
  }
17749
17603
  /**
@@ -17790,12 +17644,13 @@ var _ParseAST = class {
17790
17644
  __name(this, "_ParseAST");
17791
17645
  }
17792
17646
  input;
17793
- location;
17647
+ parseSourceSpan;
17794
17648
  absoluteOffset;
17795
17649
  tokens;
17796
17650
  parseFlags;
17797
17651
  errors;
17798
17652
  offset;
17653
+ supportsDirectPipeReferences;
17799
17654
  rparensExpected = 0;
17800
17655
  rbracketsExpected = 0;
17801
17656
  rbracesExpected = 0;
@@ -17806,14 +17661,15 @@ var _ParseAST = class {
17806
17661
  // and may change for subsequent expressions visited by the parser.
17807
17662
  sourceSpanCache = /* @__PURE__ */ new Map();
17808
17663
  index = 0;
17809
- constructor(input, location, absoluteOffset, tokens, parseFlags, errors, offset) {
17664
+ constructor(input, parseSourceSpan, absoluteOffset, tokens, parseFlags, errors, offset, supportsDirectPipeReferences) {
17810
17665
  this.input = input;
17811
- this.location = location;
17666
+ this.parseSourceSpan = parseSourceSpan;
17812
17667
  this.absoluteOffset = absoluteOffset;
17813
17668
  this.tokens = tokens;
17814
17669
  this.parseFlags = parseFlags;
17815
17670
  this.errors = errors;
17816
17671
  this.offset = offset;
17672
+ this.supportsDirectPipeReferences = supportsDirectPipeReferences;
17817
17673
  }
17818
17674
  peek(offset) {
17819
17675
  const i = this.index + offset;
@@ -17925,6 +17781,9 @@ var _ParseAST = class {
17925
17781
  return false;
17926
17782
  }
17927
17783
  }
17784
+ isAssignmentOperator(token) {
17785
+ return token.type === TokenType.Operator && Binary.isAssignmentOperation(token.strValue);
17786
+ }
17928
17787
  expectOperator(operator) {
17929
17788
  if (this.consumeOptionalOperator(operator))
17930
17789
  return;
@@ -18011,7 +17870,14 @@ var _ParseAST = class {
18011
17870
  while (this.consumeOptionalCharacter($COLON)) {
18012
17871
  args.push(this.parseExpression());
18013
17872
  }
18014
- result = new BindingPipe(this.span(start), this.sourceSpan(start, fullSpanEnd), result, nameId, args, nameSpan);
17873
+ let type;
17874
+ if (this.supportsDirectPipeReferences) {
17875
+ const charCode = nameId.charCodeAt(0);
17876
+ type = charCode === $_ || charCode >= $A && charCode <= $Z ? BindingPipeType.ReferencedDirectly : BindingPipeType.ReferencedByName;
17877
+ } else {
17878
+ type = BindingPipeType.ReferencedByName;
17879
+ }
17880
+ result = new BindingPipe(this.span(start), this.sourceSpan(start, fullSpanEnd), result, nameId, args, type, nameSpan);
18015
17881
  } while (this.consumeOptionalOperator("|"));
18016
17882
  }
18017
17883
  return result;
@@ -18324,27 +18190,29 @@ var _ParseAST = class {
18324
18190
  return id2;
18325
18191
  });
18326
18192
  const nameSpan = this.sourceSpan(nameStart);
18327
- let receiver;
18328
18193
  if (isSafe) {
18329
- if (this.consumeOptionalOperator("=")) {
18194
+ if (this.isAssignmentOperator(this.next)) {
18195
+ this.advance();
18330
18196
  this.error("The '?.' operator cannot be used in the assignment");
18331
- receiver = new EmptyExpr$1(this.span(start), this.sourceSpan(start));
18197
+ return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
18332
18198
  } else {
18333
- receiver = new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
18199
+ return new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
18334
18200
  }
18335
18201
  } else {
18336
- if (this.consumeOptionalOperator("=")) {
18202
+ if (this.isAssignmentOperator(this.next)) {
18203
+ const operation = this.next.strValue;
18204
+ this.advance();
18337
18205
  if (!(this.parseFlags & 1)) {
18338
18206
  this.error("Bindings cannot contain assignments");
18339
18207
  return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
18340
18208
  }
18209
+ const receiver = new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
18341
18210
  const value = this.parseConditional();
18342
- receiver = new PropertyWrite(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id, value);
18211
+ return new Binary(this.span(start), this.sourceSpan(start), operation, receiver, value);
18343
18212
  } else {
18344
- receiver = new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
18213
+ return new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id);
18345
18214
  }
18346
18215
  }
18347
- return receiver;
18348
18216
  }
18349
18217
  parseCall(receiver, start, isSafe) {
18350
18218
  const argumentStart = this.inputIndex;
@@ -18437,12 +18305,15 @@ var _ParseAST = class {
18437
18305
  }
18438
18306
  this.rbracketsExpected--;
18439
18307
  this.expectCharacter($RBRACKET);
18440
- if (this.consumeOptionalOperator("=")) {
18308
+ if (this.isAssignmentOperator(this.next)) {
18309
+ const operation = this.next.strValue;
18310
+ this.advance();
18441
18311
  if (isSafe) {
18442
18312
  this.error("The '?.' operator cannot be used in the assignment");
18443
18313
  } else {
18314
+ const binaryReceiver = new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key);
18444
18315
  const value = this.parseConditional();
18445
- return new KeyedWrite(this.span(start), this.sourceSpan(start), receiver, key, value);
18316
+ return new Binary(this.span(start), this.sourceSpan(start), operation, binaryReceiver, value);
18446
18317
  }
18447
18318
  } else {
18448
18319
  return isSafe ? new SafeKeyedRead(this.span(start), this.sourceSpan(start), receiver, key) : new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key);
@@ -18499,7 +18370,7 @@ var _ParseAST = class {
18499
18370
  const ast = this.parsePipe();
18500
18371
  const { start, end } = ast.span;
18501
18372
  const value = this.input.substring(start, end);
18502
- return new ASTWithSource(ast, value, this.location, this.absoluteOffset + start, this.errors);
18373
+ return new ASTWithSource(ast, value, getLocation(this.parseSourceSpan), this.absoluteOffset + start, this.errors);
18503
18374
  }
18504
18375
  /**
18505
18376
  * Return the binding for a variable declared using `as`. Note that the order
@@ -18600,13 +18471,11 @@ var _ParseAST = class {
18600
18471
  * Records an error and skips over the token stream until reaching a recoverable point. See
18601
18472
  * `this.skip` for more details on token skipping.
18602
18473
  */
18603
- error(message, index = null) {
18604
- this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));
18474
+ error(message, index = this.index) {
18475
+ this.errors.push(getParseError(message, this.input, this.getErrorLocationText(index), this.parseSourceSpan));
18605
18476
  this.skip();
18606
18477
  }
18607
- locationText(index = null) {
18608
- if (index == null)
18609
- index = this.index;
18478
+ getErrorLocationText(index) {
18610
18479
  return index < this.tokens.length ? `at column ${this.tokens[index].index + 1} in` : `at the end of the expression`;
18611
18480
  }
18612
18481
  /**
@@ -18638,7 +18507,7 @@ var _ParseAST = class {
18638
18507
  * none of the calling productions are not expecting the closing token else we will never
18639
18508
  * make progress in the case of an extraneous group closing symbol (such as a stray ')').
18640
18509
  * That is, we skip a closing symbol if we are not in a grouping production.
18641
- * - '=' in a `Writable` context
18510
+ * - Assignment in a `Writable` context
18642
18511
  * - In this context, we are able to recover after seeing the `=` operator, which
18643
18512
  * signals the presence of an independent rvalue expression following the `=` operator.
18644
18513
  *
@@ -18647,15 +18516,24 @@ var _ParseAST = class {
18647
18516
  */
18648
18517
  skip() {
18649
18518
  let n = this.next;
18650
- while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) && !n.isOperator("|") && (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) && (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) && (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET)) && (!(this.context & ParseContextFlags.Writable) || !n.isOperator("="))) {
18519
+ while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) && !n.isOperator("|") && (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) && (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) && (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET)) && (!(this.context & ParseContextFlags.Writable) || !this.isAssignmentOperator(n))) {
18651
18520
  if (this.next.isError()) {
18652
- this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location));
18521
+ this.errors.push(getParseError(this.next.toString(), this.input, this.getErrorLocationText(this.next.index), this.parseSourceSpan));
18653
18522
  }
18654
18523
  this.advance();
18655
18524
  n = this.next;
18656
18525
  }
18657
18526
  }
18658
18527
  };
18528
+ function getParseError(message, input, locationText, parseSourceSpan) {
18529
+ if (locationText.length > 0) {
18530
+ locationText = ` ${locationText} `;
18531
+ }
18532
+ const location = getLocation(parseSourceSpan);
18533
+ const error = `Parser Error: ${message}${locationText}[${input}] in ${location}`;
18534
+ return new ParseError(parseSourceSpan, error);
18535
+ }
18536
+ __name(getParseError, "getParseError");
18659
18537
  var SimpleExpressionChecker = class extends RecursiveAstVisitor2 {
18660
18538
  static {
18661
18539
  __name(this, "SimpleExpressionChecker");
@@ -18719,9 +18597,6 @@ var SerializeExpressionVisitor = class {
18719
18597
  visitKeyedRead(ast, context) {
18720
18598
  return `${ast.receiver.visit(this, context)}[${ast.key.visit(this, context)}]`;
18721
18599
  }
18722
- visitKeyedWrite(ast, context) {
18723
- return `${ast.receiver.visit(this, context)}[${ast.key.visit(this, context)}] = ${ast.value.visit(this, context)}`;
18724
- }
18725
18600
  visitLiteralArray(ast, context) {
18726
18601
  return `[${ast.expressions.map((e) => e.visit(this, context)).join(", ")}]`;
18727
18602
  }
@@ -18759,13 +18634,6 @@ var SerializeExpressionVisitor = class {
18759
18634
  return `${ast.receiver.visit(this, context)}.${ast.name}`;
18760
18635
  }
18761
18636
  }
18762
- visitPropertyWrite(ast, context) {
18763
- if (ast.receiver instanceof ImplicitReceiver) {
18764
- return `${ast.name} = ${ast.value.visit(this, context)}`;
18765
- } else {
18766
- return `${ast.receiver.visit(this, context)}.${ast.name} = ${ast.value.visit(this, context)}`;
18767
- }
18768
- }
18769
18637
  visitSafePropertyRead(ast, context) {
18770
18638
  return `${ast.receiver.visit(this, context)}?.${ast.name}`;
18771
18639
  }
@@ -19768,7 +19636,7 @@ var _I18nVisitor = class {
19768
19636
  const expr = this._expressionParser.parseBinding(
19769
19637
  expression,
19770
19638
  /* location */
19771
- token.sourceSpan.start.toString(),
19639
+ token.sourceSpan,
19772
19640
  /* absoluteOffset */
19773
19641
  token.sourceSpan.start.offset,
19774
19642
  this._interpolationConfig
@@ -19818,14 +19686,6 @@ function extractPlaceholderName(input) {
19818
19686
  return input.split(_CUSTOM_PH_EXP)[2];
19819
19687
  }
19820
19688
  __name(extractPlaceholderName, "extractPlaceholderName");
19821
- var I18nError = class extends ParseError {
19822
- static {
19823
- __name(this, "I18nError");
19824
- }
19825
- constructor(span, msg) {
19826
- super(span, msg);
19827
- }
19828
- };
19829
19689
  var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
19830
19690
  // NOTE: All strings in this set *must* be lowercase!
19831
19691
  // TrustedHTML
@@ -20031,7 +19891,7 @@ var I18nMetaVisitor = class {
20031
19891
  }
20032
19892
  }
20033
19893
  _reportError(node, msg) {
20034
- this._errors.push(new I18nError(node.sourceSpan, msg));
19894
+ this._errors.push(new ParseError(node.sourceSpan, msg));
20035
19895
  }
20036
19896
  };
20037
19897
  var I18N_MEANING_SEPARATOR = "|";
@@ -20092,7 +19952,7 @@ function createGoogleGetMsgStatements(variable$1, message, closureVar, placehold
20092
19952
  })))
20093
19953
  }));
20094
19954
  }
20095
- const googGetMsgStmt = closureVar.set(variable(GOOG_GET_MSG).callFn(args)).toConstDecl();
19955
+ const googGetMsgStmt = new DeclareVarStmt(closureVar.name, variable(GOOG_GET_MSG).callFn(args), INFERRED_TYPE, StmtModifier.Final);
20096
19956
  googGetMsgStmt.addLeadingComment(i18nMetaToJSDoc(message));
20097
19957
  const i18nAssignmentStmt = new ExpressionStatement(variable$1.set(closureVar));
20098
19958
  return [googGetMsgStmt, i18nAssignmentStmt];
@@ -20642,7 +20502,7 @@ function addNamesToView(unit, baseName, state, compatibility) {
20642
20502
  switch (op.kind) {
20643
20503
  case OpKind.Property:
20644
20504
  case OpKind.DomProperty:
20645
- if (op.isAnimationTrigger) {
20505
+ if (op.isLegacyAnimationTrigger) {
20646
20506
  op.name = "@" + op.name;
20647
20507
  }
20648
20508
  break;
@@ -20654,8 +20514,8 @@ function addNamesToView(unit, baseName, state, compatibility) {
20654
20514
  throw new Error(`Expected a slot to be assigned`);
20655
20515
  }
20656
20516
  let animation = "";
20657
- if (op.isAnimationListener) {
20658
- op.name = `@${op.name}.${op.animationPhase}`;
20517
+ if (op.isLegacyAnimationListener) {
20518
+ op.name = `@${op.name}.${op.legacyAnimationPhase}`;
20659
20519
  animation = "animation";
20660
20520
  }
20661
20521
  if (op.hostListener) {
@@ -20879,7 +20739,7 @@ function kindWithInterpolationTest(kind, interpolation) {
20879
20739
  }
20880
20740
  __name(kindWithInterpolationTest, "kindWithInterpolationTest");
20881
20741
  function basicListenerKindTest(op) {
20882
- return op.kind === OpKind.Listener && !(op.hostListener && op.isAnimationListener) || op.kind === OpKind.TwoWayListener;
20742
+ return op.kind === OpKind.Listener && !(op.hostListener && op.isLegacyAnimationListener) || op.kind === OpKind.TwoWayListener;
20883
20743
  }
20884
20744
  __name(basicListenerKindTest, "basicListenerKindTest");
20885
20745
  function nonInterpolationPropertyKindTest(op) {
@@ -20887,7 +20747,7 @@ function nonInterpolationPropertyKindTest(op) {
20887
20747
  }
20888
20748
  __name(nonInterpolationPropertyKindTest, "nonInterpolationPropertyKindTest");
20889
20749
  var CREATE_ORDERING = [
20890
- { test: /* @__PURE__ */ __name((op) => op.kind === OpKind.Listener && op.hostListener && op.isAnimationListener, "test") },
20750
+ { test: /* @__PURE__ */ __name((op) => op.kind === OpKind.Listener && op.hostListener && op.isLegacyAnimationListener, "test") },
20891
20751
  { test: basicListenerKindTest }
20892
20752
  ];
20893
20753
  var UPDATE_ORDERING = [
@@ -21234,6 +21094,38 @@ function elementOrContainerBase(instruction, slot, tag, constIndex, localRefInde
21234
21094
  return call(instruction, args, sourceSpan);
21235
21095
  }
21236
21096
  __name(elementOrContainerBase, "elementOrContainerBase");
21097
+ function templateBase(instruction, slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan) {
21098
+ const args = [
21099
+ literal(slot),
21100
+ templateFnRef,
21101
+ literal(decls),
21102
+ literal(vars),
21103
+ literal(tag),
21104
+ literal(constIndex)
21105
+ ];
21106
+ if (localRefs !== null) {
21107
+ args.push(literal(localRefs));
21108
+ args.push(importExpr(Identifiers.templateRefExtractor));
21109
+ }
21110
+ while (args[args.length - 1].isEquivalent(NULL_EXPR)) {
21111
+ args.pop();
21112
+ }
21113
+ return call(instruction, args, sourceSpan);
21114
+ }
21115
+ __name(templateBase, "templateBase");
21116
+ function propertyBase(instruction, name, expression, sanitizer, sourceSpan) {
21117
+ const args = [literal(name)];
21118
+ if (expression instanceof Interpolation2) {
21119
+ args.push(interpolationToExpression(expression, sourceSpan));
21120
+ } else {
21121
+ args.push(expression);
21122
+ }
21123
+ if (sanitizer !== null) {
21124
+ args.push(sanitizer);
21125
+ }
21126
+ return call(instruction, args, sourceSpan);
21127
+ }
21128
+ __name(propertyBase, "propertyBase");
21237
21129
  function elementEnd(sourceSpan) {
21238
21130
  return call(Identifiers.elementEnd, [], sourceSpan);
21239
21131
  }
@@ -21267,22 +21159,7 @@ function elementContainerEnd() {
21267
21159
  }
21268
21160
  __name(elementContainerEnd, "elementContainerEnd");
21269
21161
  function template(slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan) {
21270
- const args = [
21271
- literal(slot),
21272
- templateFnRef,
21273
- literal(decls),
21274
- literal(vars),
21275
- literal(tag),
21276
- literal(constIndex)
21277
- ];
21278
- if (localRefs !== null) {
21279
- args.push(literal(localRefs));
21280
- args.push(importExpr(Identifiers.templateRefExtractor));
21281
- }
21282
- while (args[args.length - 1].isEquivalent(NULL_EXPR)) {
21283
- args.pop();
21284
- }
21285
- return call(Identifiers.templateCreate, args, sourceSpan);
21162
+ return templateBase(Identifiers.templateCreate, slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan);
21286
21163
  }
21287
21164
  __name(template, "template");
21288
21165
  function disableBindings() {
@@ -21641,16 +21518,7 @@ function i18nAttributes(slot, i18nAttributesConfig) {
21641
21518
  }
21642
21519
  __name(i18nAttributes, "i18nAttributes");
21643
21520
  function property(name, expression, sanitizer, sourceSpan) {
21644
- const args = [literal(name)];
21645
- if (expression instanceof Interpolation2) {
21646
- args.push(interpolationToExpression(expression, sourceSpan));
21647
- } else {
21648
- args.push(expression);
21649
- }
21650
- if (sanitizer !== null) {
21651
- args.push(sanitizer);
21652
- }
21653
- return call(Identifiers.property, args, sourceSpan);
21521
+ return propertyBase(Identifiers.property, name, expression, sanitizer, sourceSpan);
21654
21522
  }
21655
21523
  __name(property, "property");
21656
21524
  function twoWayProperty(name, expression, sanitizer, sourceSpan) {
@@ -21704,6 +21572,58 @@ function classMap(expression, sourceSpan) {
21704
21572
  return call(Identifiers.classMap, [value], sourceSpan);
21705
21573
  }
21706
21574
  __name(classMap, "classMap");
21575
+ function domElement(slot, tag, constIndex, localRefIndex, sourceSpan) {
21576
+ return elementOrContainerBase(Identifiers.domElement, slot, tag, constIndex, localRefIndex, sourceSpan);
21577
+ }
21578
+ __name(domElement, "domElement");
21579
+ function domElementStart(slot, tag, constIndex, localRefIndex, sourceSpan) {
21580
+ return elementOrContainerBase(Identifiers.domElementStart, slot, tag, constIndex, localRefIndex, sourceSpan);
21581
+ }
21582
+ __name(domElementStart, "domElementStart");
21583
+ function domElementEnd(sourceSpan) {
21584
+ return call(Identifiers.domElementEnd, [], sourceSpan);
21585
+ }
21586
+ __name(domElementEnd, "domElementEnd");
21587
+ function domElementContainerStart(slot, constIndex, localRefIndex, sourceSpan) {
21588
+ return elementOrContainerBase(
21589
+ Identifiers.domElementContainerStart,
21590
+ slot,
21591
+ /* tag */
21592
+ null,
21593
+ constIndex,
21594
+ localRefIndex,
21595
+ sourceSpan
21596
+ );
21597
+ }
21598
+ __name(domElementContainerStart, "domElementContainerStart");
21599
+ function domElementContainer(slot, constIndex, localRefIndex, sourceSpan) {
21600
+ return elementOrContainerBase(
21601
+ Identifiers.domElementContainer,
21602
+ slot,
21603
+ /* tag */
21604
+ null,
21605
+ constIndex,
21606
+ localRefIndex,
21607
+ sourceSpan
21608
+ );
21609
+ }
21610
+ __name(domElementContainer, "domElementContainer");
21611
+ function domElementContainerEnd() {
21612
+ return call(Identifiers.domElementContainerEnd, [], null);
21613
+ }
21614
+ __name(domElementContainerEnd, "domElementContainerEnd");
21615
+ function domListener(name, handlerFn, eventTargetResolver, sourceSpan) {
21616
+ const args = [literal(name), handlerFn];
21617
+ if (eventTargetResolver !== null) {
21618
+ args.push(importExpr(eventTargetResolver));
21619
+ }
21620
+ return call(Identifiers.domListener, args, sourceSpan);
21621
+ }
21622
+ __name(domListener, "domListener");
21623
+ function domTemplate(slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan) {
21624
+ return templateBase(Identifiers.domTemplate, slot, templateFnRef, decls, vars, tag, constIndex, localRefs, sourceSpan);
21625
+ }
21626
+ __name(domTemplate, "domTemplate");
21707
21627
  var PIPE_BINDINGS = [
21708
21628
  Identifiers.pipeBind1,
21709
21629
  Identifiers.pipeBind2,
@@ -21736,11 +21656,7 @@ function i18nApply(slot, sourceSpan) {
21736
21656
  }
21737
21657
  __name(i18nApply, "i18nApply");
21738
21658
  function domProperty(name, expression, sanitizer, sourceSpan) {
21739
- const args = [literal(name), expression];
21740
- if (sanitizer !== null) {
21741
- args.push(sanitizer);
21742
- }
21743
- return call(Identifiers.domProperty, args, sourceSpan);
21659
+ return propertyBase(Identifiers.domProperty, name, expression, sanitizer, sourceSpan);
21744
21660
  }
21745
21661
  __name(domProperty, "domProperty");
21746
21662
  function syntheticHostProperty(name, expression, sourceSpan) {
@@ -21869,6 +21785,14 @@ var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([
21869
21785
  ["document", Identifiers.resolveDocument],
21870
21786
  ["body", Identifiers.resolveBody]
21871
21787
  ]);
21788
+ var DOM_PROPERTY_REMAPPING = /* @__PURE__ */ new Map([
21789
+ ["class", "className"],
21790
+ ["for", "htmlFor"],
21791
+ ["formaction", "formAction"],
21792
+ ["innerHtml", "innerHTML"],
21793
+ ["readonly", "readOnly"],
21794
+ ["tabindex", "tabIndex"]
21795
+ ]);
21872
21796
  function reify(job) {
21873
21797
  for (const unit of job.units) {
21874
21798
  reifyCreateOperations(unit, unit.create);
@@ -21884,22 +21808,22 @@ function reifyCreateOperations(unit, ops) {
21884
21808
  OpList.replace(op, text(op.handle.slot, op.initialValue, op.sourceSpan));
21885
21809
  break;
21886
21810
  case OpKind.ElementStart:
21887
- OpList.replace(op, elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan));
21811
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan) : elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan));
21888
21812
  break;
21889
21813
  case OpKind.Element:
21890
- OpList.replace(op, element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan));
21814
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElement(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan) : element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan));
21891
21815
  break;
21892
21816
  case OpKind.ElementEnd:
21893
- OpList.replace(op, elementEnd(op.sourceSpan));
21817
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementEnd(op.sourceSpan) : elementEnd(op.sourceSpan));
21894
21818
  break;
21895
21819
  case OpKind.ContainerStart:
21896
- OpList.replace(op, elementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.startSourceSpan));
21820
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.startSourceSpan) : elementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.startSourceSpan));
21897
21821
  break;
21898
21822
  case OpKind.Container:
21899
- OpList.replace(op, elementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan));
21823
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan) : elementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan));
21900
21824
  break;
21901
21825
  case OpKind.ContainerEnd:
21902
- OpList.replace(op, elementContainerEnd());
21826
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly ? domElementContainerEnd() : elementContainerEnd());
21903
21827
  break;
21904
21828
  case OpKind.I18nStart:
21905
21829
  OpList.replace(op, i18nStart(op.handle.slot, op.messageIndex, op.subTemplateIndex, op.sourceSpan));
@@ -21924,7 +21848,11 @@ function reifyCreateOperations(unit, ops) {
21924
21848
  throw new Error(`AssertionError: local refs array should have been extracted into a constant`);
21925
21849
  }
21926
21850
  const childView = unit.job.views.get(op.xref);
21927
- OpList.replace(op, template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.startSourceSpan));
21851
+ OpList.replace(
21852
+ op,
21853
+ // Block templates can't have directives so we can always generate them as DOM-only.
21854
+ op.templateKind === TemplateKind.Block || unit.job.mode === TemplateCompilationMode.DomOnly ? domTemplate(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.startSourceSpan) : template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.startSourceSpan)
21855
+ );
21928
21856
  break;
21929
21857
  case OpKind.DisableBindings:
21930
21858
  OpList.replace(op, disableBindings());
@@ -21944,7 +21872,7 @@ function reifyCreateOperations(unit, ops) {
21944
21872
  if (eventTargetResolver === void 0) {
21945
21873
  throw new Error(`Unexpected global target '${op.eventTarget}' defined for '${op.name}' event. Supported list of global targets: window,document,body.`);
21946
21874
  }
21947
- OpList.replace(op, listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isAnimationListener, op.sourceSpan));
21875
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly && !op.hostListener && !op.isLegacyAnimationListener ? domListener(op.name, listenerFn, eventTargetResolver, op.sourceSpan) : listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isLegacyAnimationListener, op.sourceSpan));
21948
21876
  break;
21949
21877
  case OpKind.TwoWayListener:
21950
21878
  OpList.replace(op, twoWayListener(op.name, reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, true), op.sourceSpan));
@@ -22096,7 +22024,7 @@ function reifyCreateOperations(unit, ops) {
22096
22024
  }
22097
22025
  }
22098
22026
  __name(reifyCreateOperations, "reifyCreateOperations");
22099
- function reifyUpdateOperations(_unit, ops) {
22027
+ function reifyUpdateOperations(unit, ops) {
22100
22028
  for (const op of ops) {
22101
22029
  transformExpressionsInOp(op, reifyIrExpression, VisitorContextFlag.None);
22102
22030
  switch (op.kind) {
@@ -22104,7 +22032,7 @@ function reifyUpdateOperations(_unit, ops) {
22104
22032
  OpList.replace(op, advance(op.delta, op.sourceSpan));
22105
22033
  break;
22106
22034
  case OpKind.Property:
22107
- OpList.replace(op, property(op.name, op.expression, op.sanitizer, op.sourceSpan));
22035
+ OpList.replace(op, unit.job.mode === TemplateCompilationMode.DomOnly && !op.isLegacyAnimationTrigger ? domProperty(DOM_PROPERTY_REMAPPING.get(op.name) ?? op.name, op.expression, op.sanitizer, op.sourceSpan) : property(op.name, op.expression, op.sanitizer, op.sourceSpan));
22108
22036
  break;
22109
22037
  case OpKind.TwoWayProperty:
22110
22038
  OpList.replace(op, twoWayProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
@@ -22137,10 +22065,10 @@ function reifyUpdateOperations(_unit, ops) {
22137
22065
  if (op.expression instanceof Interpolation2) {
22138
22066
  throw new Error("not yet handled");
22139
22067
  } else {
22140
- if (op.isAnimationTrigger) {
22068
+ if (op.isLegacyAnimationTrigger) {
22141
22069
  OpList.replace(op, syntheticHostProperty(op.name, op.expression, op.sourceSpan));
22142
22070
  } else {
22143
- OpList.replace(op, domProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
22071
+ OpList.replace(op, domProperty(DOM_PROPERTY_REMAPPING.get(op.name) ?? op.name, op.expression, op.sanitizer, op.sourceSpan));
22144
22072
  }
22145
22073
  }
22146
22074
  break;
@@ -23763,22 +23691,22 @@ function isSingleI18nIcu(meta) {
23763
23691
  return isI18nRootNode(meta) && meta.nodes.length === 1 && meta.nodes[0] instanceof Icu2;
23764
23692
  }
23765
23693
  __name(isSingleI18nIcu, "isSingleI18nIcu");
23766
- function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations) {
23767
- const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations);
23694
+ function ingestComponent(componentName, template2, constantPool, compilationMode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations) {
23695
+ const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, compilationMode, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn, relativeTemplatePath, enableDebugLocations);
23768
23696
  ingestNodes(job.root, template2);
23769
23697
  return job;
23770
23698
  }
23771
23699
  __name(ingestComponent, "ingestComponent");
23772
23700
  function ingestHostBinding(input, bindingParser, constantPool) {
23773
- const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode);
23701
+ const job = new HostBindingCompilationJob(input.componentName, constantPool, compatibilityMode, TemplateCompilationMode.DomOnly);
23774
23702
  for (const property2 of input.properties ?? []) {
23775
23703
  let bindingKind = BindingKind.Property;
23776
23704
  if (property2.name.startsWith("attr.")) {
23777
23705
  property2.name = property2.name.substring("attr.".length);
23778
23706
  bindingKind = BindingKind.Attribute;
23779
23707
  }
23780
- if (property2.isAnimation) {
23781
- bindingKind = BindingKind.Animation;
23708
+ if (property2.isLegacyAnimation) {
23709
+ bindingKind = BindingKind.LegacyAnimation;
23782
23710
  }
23783
23711
  const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, property2.name, bindingKind === BindingKind.Attribute).filter((context) => context !== SecurityContext.NONE);
23784
23712
  ingestDomProperty(job, property2, bindingKind, securityContexts);
@@ -23839,7 +23767,7 @@ function ingestHostAttribute(job, name, value, securityContexts) {
23839
23767
  }
23840
23768
  __name(ingestHostAttribute, "ingestHostAttribute");
23841
23769
  function ingestHostEvent(job, event) {
23842
- const [phase, target] = event.type !== ParsedEventType.Animation ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
23770
+ const [phase, target] = event.type !== ParsedEventType.LegacyAnimation ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
23843
23771
  const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);
23844
23772
  job.root.create.push(eventBinding);
23845
23773
  }
@@ -24259,20 +24187,6 @@ function convertAst(ast, job, baseSourceSpan) {
24259
24187
  } else {
24260
24188
  return new ReadPropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, null, convertSourceSpan(ast.span, baseSourceSpan));
24261
24189
  }
24262
- } else if (ast instanceof PropertyWrite) {
24263
- if (ast.receiver instanceof ImplicitReceiver) {
24264
- return new WritePropExpr(
24265
- // TODO: Is it correct to always use the root context in place of the implicit receiver?
24266
- new ContextExpr(job.root.xref),
24267
- ast.name,
24268
- convertAst(ast.value, job, baseSourceSpan),
24269
- null,
24270
- convertSourceSpan(ast.span, baseSourceSpan)
24271
- );
24272
- }
24273
- return new WritePropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, convertAst(ast.value, job, baseSourceSpan), void 0, convertSourceSpan(ast.span, baseSourceSpan));
24274
- } else if (ast instanceof KeyedWrite) {
24275
- return new WriteKeyExpr(convertAst(ast.receiver, job, baseSourceSpan), convertAst(ast.key, job, baseSourceSpan), convertAst(ast.value, job, baseSourceSpan), void 0, convertSourceSpan(ast.span, baseSourceSpan));
24276
24190
  } else if (ast instanceof Call) {
24277
24191
  if (ast.receiver instanceof ImplicitReceiver) {
24278
24192
  throw new Error(`Unexpected ImplicitReceiver`);
@@ -24368,7 +24282,7 @@ var BINDING_KINDS = /* @__PURE__ */ new Map([
24368
24282
  [BindingType.Attribute, BindingKind.Attribute],
24369
24283
  [BindingType.Class, BindingKind.ClassName],
24370
24284
  [BindingType.Style, BindingKind.StyleProperty],
24371
- [BindingType.Animation, BindingKind.Animation]
24285
+ [BindingType.LegacyAnimation, BindingKind.LegacyAnimation]
24372
24286
  ]);
24373
24287
  function isPlainTemplate(tmpl) {
24374
24288
  return splitNsName(tmpl.tagName ?? "")[1] === NG_TEMPLATE_TAG_NAME;
@@ -24403,7 +24317,7 @@ function ingestElementBindings(unit, op, element2) {
24403
24317
  unit.create.push(bindings.filter((b) => b?.kind === OpKind.ExtractedAttribute));
24404
24318
  unit.update.push(bindings.filter((b) => b?.kind === OpKind.Binding));
24405
24319
  for (const output of element2.outputs) {
24406
- if (output.type === ParsedEventType.Animation && output.phase === null) {
24320
+ if (output.type === ParsedEventType.LegacyAnimation && output.phase === null) {
24407
24321
  throw Error("Animation listener should have a phase");
24408
24322
  }
24409
24323
  if (output.type === ParsedEventType.TwoWay) {
@@ -24437,7 +24351,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
24437
24351
  unit.create.push(bindings.filter((b) => b?.kind === OpKind.ExtractedAttribute));
24438
24352
  unit.update.push(bindings.filter((b) => b?.kind === OpKind.Binding));
24439
24353
  for (const output of template2.outputs) {
24440
- if (output.type === ParsedEventType.Animation && output.phase === null) {
24354
+ if (output.type === ParsedEventType.LegacyAnimation && output.phase === null) {
24441
24355
  throw Error("Animation listener should have a phase");
24442
24356
  }
24443
24357
  if (templateKind === TemplateKind.NgTemplate) {
@@ -24447,7 +24361,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
24447
24361
  unit.create.push(createListenerOp(op.xref, op.handle, output.name, op.tag, makeListenerHandlerOps(unit, output.handler, output.handlerSpan), output.phase, output.target, false, output.sourceSpan));
24448
24362
  }
24449
24363
  }
24450
- if (templateKind === TemplateKind.Structural && output.type !== ParsedEventType.Animation) {
24364
+ if (templateKind === TemplateKind.Structural && output.type !== ParsedEventType.LegacyAnimation) {
24451
24365
  const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
24452
24366
  unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, null, output.name, null, null, null, securityContext));
24453
24367
  }
@@ -24470,7 +24384,7 @@ function createTemplateBinding(view, xref, type, name, value, unit, securityCont
24470
24384
  return createExtractedAttributeOp(xref, BindingKind.TwoWayProperty, null, name, null, null, i18nMessage, securityContext);
24471
24385
  }
24472
24386
  }
24473
- if (!isTextBinding && (type === BindingType.Attribute || type === BindingType.Animation)) {
24387
+ if (!isTextBinding && (type === BindingType.Attribute || type === BindingType.LegacyAnimation)) {
24474
24388
  return null;
24475
24389
  }
24476
24390
  }
@@ -24566,7 +24480,7 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
24566
24480
  unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
24567
24481
  }
24568
24482
  for (const attr of root.inputs) {
24569
- if (attr.type !== BindingType.Animation && attr.type !== BindingType.Attribute) {
24483
+ if (attr.type !== BindingType.LegacyAnimation && attr.type !== BindingType.Attribute) {
24570
24484
  const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
24571
24485
  unit.create.push(createExtractedAttributeOp(xref, BindingKind.Property, null, attr.name, null, null, null, securityContext));
24572
24486
  }
@@ -24728,7 +24642,7 @@ var ATTRIBUTE_PREFIX = "attr";
24728
24642
  var CLASS_PREFIX = "class";
24729
24643
  var STYLE_PREFIX = "style";
24730
24644
  var TEMPLATE_ATTR_PREFIX$1 = "*";
24731
- var ANIMATE_PROP_PREFIX = "animate-";
24645
+ var LEGACY_ANIMATE_PROP_PREFIX = "animate-";
24732
24646
  var BindingParser = class {
24733
24647
  static {
24734
24648
  __name(this, "BindingParser");
@@ -24798,16 +24712,16 @@ var BindingParser = class {
24798
24712
  return targetEvents;
24799
24713
  }
24800
24714
  parseInterpolation(value, sourceSpan, interpolatedTokens) {
24801
- const sourceInfo = sourceSpan.start.toString();
24802
24715
  const absoluteOffset = sourceSpan.fullStart.offset;
24803
24716
  try {
24804
- const ast = this._exprParser.parseInterpolation(value, sourceInfo, absoluteOffset, interpolatedTokens, this._interpolationConfig);
24805
- if (ast)
24806
- this._reportExpressionParserErrors(ast.errors, sourceSpan);
24717
+ const ast = this._exprParser.parseInterpolation(value, sourceSpan, absoluteOffset, interpolatedTokens, this._interpolationConfig);
24718
+ if (ast) {
24719
+ this.errors.push(...ast.errors);
24720
+ }
24807
24721
  return ast;
24808
24722
  } catch (e) {
24809
24723
  this._reportError(`${e}`, sourceSpan);
24810
- return this._exprParser.wrapLiteralPrimitive("ERROR", sourceInfo, absoluteOffset);
24724
+ return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
24811
24725
  }
24812
24726
  }
24813
24727
  /**
@@ -24816,16 +24730,16 @@ var BindingParser = class {
24816
24730
  * This is used for parsing the switch expression in ICUs.
24817
24731
  */
24818
24732
  parseInterpolationExpression(expression, sourceSpan) {
24819
- const sourceInfo = sourceSpan.start.toString();
24820
24733
  const absoluteOffset = sourceSpan.start.offset;
24821
24734
  try {
24822
- const ast = this._exprParser.parseInterpolationExpression(expression, sourceInfo, absoluteOffset);
24823
- if (ast)
24824
- this._reportExpressionParserErrors(ast.errors, sourceSpan);
24735
+ const ast = this._exprParser.parseInterpolationExpression(expression, sourceSpan, absoluteOffset);
24736
+ if (ast) {
24737
+ this.errors.push(...ast.errors);
24738
+ }
24825
24739
  return ast;
24826
24740
  } catch (e) {
24827
24741
  this._reportError(`${e}`, sourceSpan);
24828
- return this._exprParser.wrapLiteralPrimitive("ERROR", sourceInfo, absoluteOffset);
24742
+ return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
24829
24743
  }
24830
24744
  }
24831
24745
  /**
@@ -24878,10 +24792,9 @@ var BindingParser = class {
24878
24792
  * @param absoluteValueOffset start of the `tplValue`
24879
24793
  */
24880
24794
  _parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset) {
24881
- const sourceInfo = sourceSpan.start.toString();
24882
24795
  try {
24883
- const bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceInfo, absoluteKeyOffset, absoluteValueOffset);
24884
- this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);
24796
+ const bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, sourceSpan, absoluteKeyOffset, absoluteValueOffset);
24797
+ bindingsResult.errors.forEach((e) => this.errors.push(e));
24885
24798
  bindingsResult.warnings.forEach((warning) => {
24886
24799
  this._reportError(warning, sourceSpan, ParseErrorLevel.WARNING);
24887
24800
  });
@@ -24892,7 +24805,7 @@ var BindingParser = class {
24892
24805
  }
24893
24806
  }
24894
24807
  parseLiteralAttr(name, value, sourceSpan, absoluteOffset, valueSpan, targetMatchableAttrs, targetProps, keySpan) {
24895
- if (isAnimationLabel(name)) {
24808
+ if (isLegacyAnimationLabel(name)) {
24896
24809
  name = name.substring(1);
24897
24810
  if (keySpan !== void 0) {
24898
24811
  keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
@@ -24900,7 +24813,7 @@ var BindingParser = class {
24900
24813
  if (value) {
24901
24814
  this._reportError(`Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.`, sourceSpan, ParseErrorLevel.ERROR);
24902
24815
  }
24903
- this._parseAnimation(name, value, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
24816
+ this._parseLegacyAnimation(name, value, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
24904
24817
  } else {
24905
24818
  targetProps.push(new ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, "", absoluteOffset), ParsedPropertyType.LITERAL_ATTR, sourceSpan, keySpan, valueSpan));
24906
24819
  }
@@ -24909,22 +24822,22 @@ var BindingParser = class {
24909
24822
  if (name.length === 0) {
24910
24823
  this._reportError(`Property name is missing in binding`, sourceSpan);
24911
24824
  }
24912
- let isAnimationProp = false;
24913
- if (name.startsWith(ANIMATE_PROP_PREFIX)) {
24914
- isAnimationProp = true;
24915
- name = name.substring(ANIMATE_PROP_PREFIX.length);
24825
+ let isLegacyAnimationProp = false;
24826
+ if (name.startsWith(LEGACY_ANIMATE_PROP_PREFIX)) {
24827
+ isLegacyAnimationProp = true;
24828
+ name = name.substring(LEGACY_ANIMATE_PROP_PREFIX.length);
24916
24829
  if (keySpan !== void 0) {
24917
- keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + ANIMATE_PROP_PREFIX.length, keySpan.end.offset));
24830
+ keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + LEGACY_ANIMATE_PROP_PREFIX.length, keySpan.end.offset));
24918
24831
  }
24919
- } else if (isAnimationLabel(name)) {
24920
- isAnimationProp = true;
24832
+ } else if (isLegacyAnimationLabel(name)) {
24833
+ isLegacyAnimationProp = true;
24921
24834
  name = name.substring(1);
24922
24835
  if (keySpan !== void 0) {
24923
24836
  keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
24924
24837
  }
24925
24838
  }
24926
- if (isAnimationProp) {
24927
- this._parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
24839
+ if (isLegacyAnimationProp) {
24840
+ this._parseLegacyAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps);
24928
24841
  } else {
24929
24842
  this._parsePropertyAst(name, this.parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), isPartOfAssignmentBinding, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
24930
24843
  }
@@ -24941,29 +24854,29 @@ var BindingParser = class {
24941
24854
  targetMatchableAttrs.push([name, ast.source]);
24942
24855
  targetProps.push(new ParsedProperty(name, ast, isPartOfAssignmentBinding ? ParsedPropertyType.TWO_WAY : ParsedPropertyType.DEFAULT, sourceSpan, keySpan, valueSpan));
24943
24856
  }
24944
- _parseAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
24857
+ _parseLegacyAnimation(name, expression, sourceSpan, absoluteOffset, keySpan, valueSpan, targetMatchableAttrs, targetProps) {
24945
24858
  if (name.length === 0) {
24946
24859
  this._reportError("Animation trigger is missing", sourceSpan);
24947
24860
  }
24948
24861
  const ast = this.parseBinding(expression || "undefined", false, valueSpan || sourceSpan, absoluteOffset);
24949
24862
  targetMatchableAttrs.push([name, ast.source]);
24950
- targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.ANIMATION, sourceSpan, keySpan, valueSpan));
24863
+ targetProps.push(new ParsedProperty(name, ast, ParsedPropertyType.LEGACY_ANIMATION, sourceSpan, keySpan, valueSpan));
24951
24864
  }
24952
24865
  parseBinding(value, isHostBinding2, sourceSpan, absoluteOffset) {
24953
- const sourceInfo = (sourceSpan && sourceSpan.start || "(unknown)").toString();
24954
24866
  try {
24955
- const ast = isHostBinding2 ? this._exprParser.parseSimpleBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig) : this._exprParser.parseBinding(value, sourceInfo, absoluteOffset, this._interpolationConfig);
24956
- if (ast)
24957
- this._reportExpressionParserErrors(ast.errors, sourceSpan);
24867
+ const ast = isHostBinding2 ? this._exprParser.parseSimpleBinding(value, sourceSpan, absoluteOffset, this._interpolationConfig) : this._exprParser.parseBinding(value, sourceSpan, absoluteOffset, this._interpolationConfig);
24868
+ if (ast) {
24869
+ this.errors.push(...ast.errors);
24870
+ }
24958
24871
  return ast;
24959
24872
  } catch (e) {
24960
24873
  this._reportError(`${e}`, sourceSpan);
24961
- return this._exprParser.wrapLiteralPrimitive("ERROR", sourceInfo, absoluteOffset);
24874
+ return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
24962
24875
  }
24963
24876
  }
24964
24877
  createBoundElementProperty(elementSelector, boundProp, skipValidation = false, mapPropertyName = true) {
24965
- if (boundProp.isAnimation) {
24966
- return new BoundElementProperty(boundProp.name, BindingType.Animation, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
24878
+ if (boundProp.isLegacyAnimation) {
24879
+ return new BoundElementProperty(boundProp.name, BindingType.LegacyAnimation, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
24967
24880
  }
24968
24881
  let unit = null;
24969
24882
  let bindingType = void 0;
@@ -25011,12 +24924,12 @@ var BindingParser = class {
25011
24924
  if (name.length === 0) {
25012
24925
  this._reportError(`Event name is missing in binding`, sourceSpan);
25013
24926
  }
25014
- if (isAnimationLabel(name)) {
24927
+ if (isLegacyAnimationLabel(name)) {
25015
24928
  name = name.slice(1);
25016
24929
  if (keySpan !== void 0) {
25017
24930
  keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
25018
24931
  }
25019
- this._parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan);
24932
+ this._parseLegacyAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan);
25020
24933
  } else {
25021
24934
  this._parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan);
25022
24935
  }
@@ -25029,14 +24942,14 @@ var BindingParser = class {
25029
24942
  const [target, eventName] = splitAtColon(rawName, [null, rawName]);
25030
24943
  return { eventName, target };
25031
24944
  }
25032
- parseAnimationEventName(rawName) {
24945
+ parseLegacyAnimationEventName(rawName) {
25033
24946
  const matches = splitAtPeriod(rawName, [rawName, null]);
25034
24947
  return { eventName: matches[0], phase: matches[1] === null ? null : matches[1].toLowerCase() };
25035
24948
  }
25036
- _parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan) {
25037
- const { eventName, phase } = this.parseAnimationEventName(name);
24949
+ _parseLegacyAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan) {
24950
+ const { eventName, phase } = this.parseLegacyAnimationEventName(name);
25038
24951
  const ast = this._parseAction(expression, handlerSpan);
25039
- targetEvents.push(new ParsedEvent(eventName, phase, ParsedEventType.Animation, ast, sourceSpan, handlerSpan, keySpan));
24952
+ targetEvents.push(new ParsedEvent(eventName, phase, ParsedEventType.LegacyAnimation, ast, sourceSpan, handlerSpan, keySpan));
25040
24953
  if (eventName.length === 0) {
25041
24954
  this._reportError(`Animation event name is missing in binding`, sourceSpan);
25042
24955
  }
@@ -25060,30 +24973,24 @@ var BindingParser = class {
25060
24973
  targetEvents.push(new ParsedEvent(eventName, target, isAssignmentEvent ? ParsedEventType.TwoWay : ParsedEventType.Regular, ast, sourceSpan, handlerSpan, keySpan));
25061
24974
  }
25062
24975
  _parseAction(value, sourceSpan) {
25063
- const sourceInfo = (sourceSpan && sourceSpan.start || "(unknown").toString();
25064
24976
  const absoluteOffset = sourceSpan && sourceSpan.start ? sourceSpan.start.offset : 0;
25065
24977
  try {
25066
- const ast = this._exprParser.parseAction(value, sourceInfo, absoluteOffset, this._interpolationConfig);
24978
+ const ast = this._exprParser.parseAction(value, sourceSpan, absoluteOffset, this._interpolationConfig);
25067
24979
  if (ast) {
25068
- this._reportExpressionParserErrors(ast.errors, sourceSpan);
24980
+ this.errors.push(...ast.errors);
25069
24981
  }
25070
24982
  if (!ast || ast.ast instanceof EmptyExpr$1) {
25071
24983
  this._reportError(`Empty expressions are not allowed`, sourceSpan);
25072
- return this._exprParser.wrapLiteralPrimitive("ERROR", sourceInfo, absoluteOffset);
24984
+ return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
25073
24985
  }
25074
24986
  return ast;
25075
24987
  } catch (e) {
25076
24988
  this._reportError(`${e}`, sourceSpan);
25077
- return this._exprParser.wrapLiteralPrimitive("ERROR", sourceInfo, absoluteOffset);
24989
+ return this._exprParser.wrapLiteralPrimitive("ERROR", sourceSpan, absoluteOffset);
25078
24990
  }
25079
24991
  }
25080
- _reportError(message, sourceSpan, level = ParseErrorLevel.ERROR, relatedError) {
25081
- this.errors.push(new ParseError(sourceSpan, message, level, relatedError));
25082
- }
25083
- _reportExpressionParserErrors(errors, sourceSpan) {
25084
- for (const error of errors) {
25085
- this._reportError(error.message, sourceSpan, void 0, error);
25086
- }
24992
+ _reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {
24993
+ this.errors.push(new ParseError(sourceSpan, message, level));
25087
24994
  }
25088
24995
  /**
25089
24996
  * @param propName the name of the property / attribute
@@ -25116,10 +25023,10 @@ var BindingParser = class {
25116
25023
  return false;
25117
25024
  }
25118
25025
  };
25119
- function isAnimationLabel(name) {
25026
+ function isLegacyAnimationLabel(name) {
25120
25027
  return name[0] == "@";
25121
25028
  }
25122
- __name(isAnimationLabel, "isAnimationLabel");
25029
+ __name(isLegacyAnimationLabel, "isLegacyAnimationLabel");
25123
25030
  function calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {
25124
25031
  let ctxs;
25125
25032
  const nameToContext = /* @__PURE__ */ __name((elName) => registry.securityContext(elName, propName, isAttribute), "nameToContext");
@@ -26131,16 +26038,16 @@ var HtmlAstToIvyAst = class {
26131
26038
  if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {
26132
26039
  const selector = preparsedElement.selectAttr;
26133
26040
  const attrs = element2.attrs.map((attr) => this.visitAttribute(attr));
26134
- parsedElement = new Content(selector, attrs, children, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
26041
+ parsedElement = new Content(selector, attrs, children, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
26135
26042
  this.ngContentSelectors.push(selector);
26136
26043
  } else if (isTemplateElement) {
26137
26044
  const attrs = this.categorizePropertyAttributes(element2.name, parsedProperties, i18nAttrsMeta);
26138
26045
  parsedElement = new Template(element2.name, attributes, attrs.bound, boundEvents, directives, [
26139
26046
  /* no template attributes */
26140
- ], children, references, variables, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
26047
+ ], children, references, variables, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
26141
26048
  } else {
26142
26049
  const attrs = this.categorizePropertyAttributes(element2.name, parsedProperties, i18nAttrsMeta);
26143
- parsedElement = new Element$1(element2.name, attributes, attrs.bound, boundEvents, directives, children, references, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
26050
+ parsedElement = new Element$1(element2.name, attributes, attrs.bound, boundEvents, directives, children, references, element2.isSelfClosing, element2.sourceSpan, element2.startSourceSpan, element2.endSourceSpan, element2.i18n);
26144
26051
  }
26145
26052
  if (elementHasInlineTemplate) {
26146
26053
  parsedElement = this.wrapInTemplate(parsedElement, templateParsedProperties, templateVariables, i18nAttrsMeta, isTemplateElement, isI18nRootElement);
@@ -26216,7 +26123,7 @@ var HtmlAstToIvyAst = class {
26216
26123
  children = visitAll(this, component.children, component.children);
26217
26124
  }
26218
26125
  const attrs = this.categorizePropertyAttributes(component.tagName, parsedProperties, i18nAttrsMeta);
26219
- let node = new Component$1(component.componentName, component.tagName, component.fullName, attributes, attrs.bound, boundEvents, directives, children, references, component.sourceSpan, component.startSourceSpan, component.endSourceSpan, component.i18n);
26126
+ let node = new Component$1(component.componentName, component.tagName, component.fullName, attributes, attrs.bound, boundEvents, directives, children, references, component.isSelfClosing, component.sourceSpan, component.startSourceSpan, component.endSourceSpan, component.i18n);
26220
26127
  if (elementHasInlineTemplate) {
26221
26128
  node = this.wrapInTemplate(node, templateParsedProperties, templateVariables, i18nAttrsMeta, false, isI18nRootElement);
26222
26129
  }
@@ -26545,7 +26452,7 @@ var HtmlAstToIvyAst = class {
26545
26452
  // Do not copy over the directives.
26546
26453
  ], templateAttrs, [node], [
26547
26454
  // Do not copy over the references.
26548
- ], templateVariables, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, i18n2);
26455
+ ], templateVariables, false, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, i18n2);
26549
26456
  }
26550
26457
  _visitTextWithInterpolation(value, sourceSpan, interpolatedTokens, i18n2) {
26551
26458
  const valueNoNgsp = replaceNgsp(value);
@@ -26626,6 +26533,7 @@ var NonBindableVisitor = class {
26626
26533
  children,
26627
26534
  /* references */
26628
26535
  [],
26536
+ ast.isSelfClosing,
26629
26537
  ast.sourceSpan,
26630
26538
  ast.startSourceSpan,
26631
26539
  ast.endSourceSpan
@@ -26678,6 +26586,7 @@ var NonBindableVisitor = class {
26678
26586
  children,
26679
26587
  /* references */
26680
26588
  [],
26589
+ ast.isSelfClosing,
26681
26590
  ast.sourceSpan,
26682
26591
  ast.startSourceSpan,
26683
26592
  ast.endSourceSpan
@@ -26707,7 +26616,8 @@ __name(textContents, "textContents");
26707
26616
  var LEADING_TRIVIA_CHARS = [" ", "\n", "\r", " "];
26708
26617
  function parseTemplate(template2, templateUrl, options = {}) {
26709
26618
  const { interpolationConfig, preserveWhitespaces, enableI18nLegacyMessageIdFormat } = options;
26710
- const bindingParser = makeBindingParser(interpolationConfig);
26619
+ const selectorlessEnabled = options.enableSelectorless ?? false;
26620
+ const bindingParser = makeBindingParser(interpolationConfig, selectorlessEnabled);
26711
26621
  const htmlParser = new HtmlParser();
26712
26622
  const parseResult = htmlParser.parse(template2, templateUrl, {
26713
26623
  leadingTriviaChars: LEADING_TRIVIA_CHARS,
@@ -26715,7 +26625,7 @@ function parseTemplate(template2, templateUrl, options = {}) {
26715
26625
  tokenizeExpansionForms: true,
26716
26626
  tokenizeBlocks: options.enableBlockSyntax ?? true,
26717
26627
  tokenizeLet: options.enableLetSyntax ?? true,
26718
- selectorlessEnabled: options.enableSelectorless ?? false
26628
+ selectorlessEnabled
26719
26629
  });
26720
26630
  if (!options.alwaysAttemptHtmlToR3AstConversion && parseResult.errors && parseResult.errors.length > 0) {
26721
26631
  const parsedTemplate2 = {
@@ -26803,8 +26713,8 @@ function parseTemplate(template2, templateUrl, options = {}) {
26803
26713
  }
26804
26714
  __name(parseTemplate, "parseTemplate");
26805
26715
  var elementRegistry = new DomElementSchemaRegistry();
26806
- function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
26807
- return new BindingParser(new Parser2(new Lexer()), interpolationConfig, elementRegistry, []);
26716
+ function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, selectorlessEnabled = false) {
26717
+ return new BindingParser(new Parser2(new Lexer(), selectorlessEnabled), interpolationConfig, elementRegistry, []);
26808
26718
  }
26809
26719
  __name(makeBindingParser, "makeBindingParser");
26810
26720
  var COMPONENT_VARIABLE = "%COMP%";
@@ -26900,7 +26810,8 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
26900
26810
  constantPool.statements.push(new DeclareVarStmt(fnName, meta.defer.dependenciesFn, void 0, StmtModifier.Final));
26901
26811
  allDeferrableDepsFn = variable(fnName);
26902
26812
  }
26903
- const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.defer, allDeferrableDepsFn, meta.relativeTemplatePath, getTemplateSourceLocationsEnabled());
26813
+ const compilationMode = meta.isStandalone && !meta.hasDirectiveDependencies ? TemplateCompilationMode.DomOnly : TemplateCompilationMode.Full;
26814
+ const tpl = ingestComponent(meta.name, meta.template.nodes, constantPool, compilationMode, meta.relativeContextFilePath, meta.i18nUseExternalIds, meta.defer, allDeferrableDepsFn, meta.relativeTemplatePath, getTemplateSourceLocationsEnabled());
26904
26815
  transform(tpl, CompilationJobKind.Tmpl);
26905
26816
  const templateFn = emitTemplateFn(tpl, constantPool);
26906
26817
  if (tpl.contentSelectors !== null) {
@@ -27232,6 +27143,127 @@ function compileDeferResolverFunction(meta) {
27232
27143
  return arrowFn([], literalArr(depExpressions));
27233
27144
  }
27234
27145
  __name(compileDeferResolverFunction, "compileDeferResolverFunction");
27146
+ var CombinedRecursiveAstVisitor = class extends RecursiveAstVisitor2 {
27147
+ static {
27148
+ __name(this, "CombinedRecursiveAstVisitor");
27149
+ }
27150
+ visit(node) {
27151
+ if (node instanceof ASTWithSource) {
27152
+ this.visit(node.ast);
27153
+ } else {
27154
+ node.visit(this);
27155
+ }
27156
+ }
27157
+ visitElement(element2) {
27158
+ this.visitAllTemplateNodes(element2.attributes);
27159
+ this.visitAllTemplateNodes(element2.inputs);
27160
+ this.visitAllTemplateNodes(element2.outputs);
27161
+ this.visitAllTemplateNodes(element2.directives);
27162
+ this.visitAllTemplateNodes(element2.references);
27163
+ this.visitAllTemplateNodes(element2.children);
27164
+ }
27165
+ visitTemplate(template2) {
27166
+ this.visitAllTemplateNodes(template2.attributes);
27167
+ this.visitAllTemplateNodes(template2.inputs);
27168
+ this.visitAllTemplateNodes(template2.outputs);
27169
+ this.visitAllTemplateNodes(template2.directives);
27170
+ this.visitAllTemplateNodes(template2.templateAttrs);
27171
+ this.visitAllTemplateNodes(template2.variables);
27172
+ this.visitAllTemplateNodes(template2.references);
27173
+ this.visitAllTemplateNodes(template2.children);
27174
+ }
27175
+ visitContent(content) {
27176
+ this.visitAllTemplateNodes(content.children);
27177
+ }
27178
+ visitBoundAttribute(attribute2) {
27179
+ this.visit(attribute2.value);
27180
+ }
27181
+ visitBoundEvent(attribute2) {
27182
+ this.visit(attribute2.handler);
27183
+ }
27184
+ visitBoundText(text2) {
27185
+ this.visit(text2.value);
27186
+ }
27187
+ visitIcu(icu) {
27188
+ Object.keys(icu.vars).forEach((key) => this.visit(icu.vars[key]));
27189
+ Object.keys(icu.placeholders).forEach((key) => this.visit(icu.placeholders[key]));
27190
+ }
27191
+ visitDeferredBlock(deferred) {
27192
+ deferred.visitAll(this);
27193
+ }
27194
+ visitDeferredTrigger(trigger) {
27195
+ if (trigger instanceof BoundDeferredTrigger) {
27196
+ this.visit(trigger.value);
27197
+ }
27198
+ }
27199
+ visitDeferredBlockPlaceholder(block) {
27200
+ this.visitAllTemplateNodes(block.children);
27201
+ }
27202
+ visitDeferredBlockError(block) {
27203
+ this.visitAllTemplateNodes(block.children);
27204
+ }
27205
+ visitDeferredBlockLoading(block) {
27206
+ this.visitAllTemplateNodes(block.children);
27207
+ }
27208
+ visitSwitchBlock(block) {
27209
+ this.visit(block.expression);
27210
+ this.visitAllTemplateNodes(block.cases);
27211
+ }
27212
+ visitSwitchBlockCase(block) {
27213
+ block.expression && this.visit(block.expression);
27214
+ this.visitAllTemplateNodes(block.children);
27215
+ }
27216
+ visitForLoopBlock(block) {
27217
+ block.item.visit(this);
27218
+ this.visitAllTemplateNodes(block.contextVariables);
27219
+ this.visit(block.expression);
27220
+ this.visitAllTemplateNodes(block.children);
27221
+ block.empty?.visit(this);
27222
+ }
27223
+ visitForLoopBlockEmpty(block) {
27224
+ this.visitAllTemplateNodes(block.children);
27225
+ }
27226
+ visitIfBlock(block) {
27227
+ this.visitAllTemplateNodes(block.branches);
27228
+ }
27229
+ visitIfBlockBranch(block) {
27230
+ block.expression && this.visit(block.expression);
27231
+ block.expressionAlias?.visit(this);
27232
+ this.visitAllTemplateNodes(block.children);
27233
+ }
27234
+ visitLetDeclaration(decl) {
27235
+ this.visit(decl.value);
27236
+ }
27237
+ visitComponent(component) {
27238
+ this.visitAllTemplateNodes(component.attributes);
27239
+ this.visitAllTemplateNodes(component.inputs);
27240
+ this.visitAllTemplateNodes(component.outputs);
27241
+ this.visitAllTemplateNodes(component.directives);
27242
+ this.visitAllTemplateNodes(component.references);
27243
+ this.visitAllTemplateNodes(component.children);
27244
+ }
27245
+ visitDirective(directive) {
27246
+ this.visitAllTemplateNodes(directive.attributes);
27247
+ this.visitAllTemplateNodes(directive.inputs);
27248
+ this.visitAllTemplateNodes(directive.outputs);
27249
+ this.visitAllTemplateNodes(directive.references);
27250
+ }
27251
+ visitVariable(variable2) {
27252
+ }
27253
+ visitReference(reference2) {
27254
+ }
27255
+ visitTextAttribute(attribute2) {
27256
+ }
27257
+ visitText(text2) {
27258
+ }
27259
+ visitUnknownBlock(block) {
27260
+ }
27261
+ visitAllTemplateNodes(nodes) {
27262
+ for (const node of nodes) {
27263
+ this.visit(node);
27264
+ }
27265
+ }
27266
+ };
27235
27267
  function diff(fullList, itemsToExclude) {
27236
27268
  const exclude = new Set(itemsToExclude);
27237
27269
  return fullList.filter((item) => !exclude.has(item));
@@ -27309,9 +27341,7 @@ var R3TargetBinder = class {
27309
27341
  if (target.template) {
27310
27342
  const scope = Scope2.apply(target.template);
27311
27343
  extractScopedNodeEntities(scope, scopedNodeEntities);
27312
- if (this.directiveMatcher !== null) {
27313
- DirectiveBinder.apply(target.template, this.directiveMatcher, directives, eagerDirectives, missingDirectives, bindings, references);
27314
- }
27344
+ DirectiveBinder.apply(target.template, this.directiveMatcher, directives, eagerDirectives, missingDirectives, bindings, references);
27315
27345
  TemplateBinder.applyWithScope(target.template, scope, expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks);
27316
27346
  }
27317
27347
  if (target.host) {
@@ -27615,6 +27645,12 @@ var DirectiveBinder = class _DirectiveBinder {
27615
27645
  const cssSelector = createCssSelectorFromNode(node);
27616
27646
  this.directiveMatcher.match(cssSelector, (_, results) => directives.push(...results));
27617
27647
  this.trackSelectorBasedBindingsAndDirectives(node, directives);
27648
+ } else {
27649
+ node.references.forEach((ref) => {
27650
+ if (ref.value.trim() === "") {
27651
+ this.references.set(ref, node);
27652
+ }
27653
+ });
27618
27654
  }
27619
27655
  node.directives.forEach((directive) => directive.visit(this));
27620
27656
  node.children.forEach((child) => child.visit(this));
@@ -27700,7 +27736,7 @@ var DirectiveBinder = class _DirectiveBinder {
27700
27736
  visitLetDeclaration(decl) {
27701
27737
  }
27702
27738
  };
27703
- var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27739
+ var TemplateBinder = class _TemplateBinder extends CombinedRecursiveAstVisitor {
27704
27740
  static {
27705
27741
  __name(this, "TemplateBinder");
27706
27742
  }
@@ -27713,7 +27749,7 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27713
27749
  scope;
27714
27750
  rootNode;
27715
27751
  level;
27716
- visitNode;
27752
+ visitNode = /* @__PURE__ */ __name((node) => node.visit(this), "visitNode");
27717
27753
  constructor(bindings, symbols, usedPipes, eagerPipes, deferBlocks, nestingLevel, scope, rootNode, level) {
27718
27754
  super();
27719
27755
  this.bindings = bindings;
@@ -27725,17 +27761,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27725
27761
  this.scope = scope;
27726
27762
  this.rootNode = rootNode;
27727
27763
  this.level = level;
27728
- this.visitNode = (node) => node.visit(this);
27729
- }
27730
- // This method is defined to reconcile the type of TemplateBinder since both
27731
- // RecursiveAstVisitor and Visitor define the visit() method in their
27732
- // interfaces.
27733
- visit(node, context) {
27734
- if (node instanceof AST) {
27735
- node.visit(this, context);
27736
- } else {
27737
- node.visit(this);
27738
- }
27739
27764
  }
27740
27765
  /**
27741
27766
  * Process a template and extract metadata about expressions and symbols within.
@@ -27787,13 +27812,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27787
27812
  nodeOrNodes.forEach(this.visitNode);
27788
27813
  }
27789
27814
  }
27790
- visitElement(element2) {
27791
- element2.inputs.forEach(this.visitNode);
27792
- element2.outputs.forEach(this.visitNode);
27793
- element2.directives.forEach(this.visitNode);
27794
- element2.children.forEach(this.visitNode);
27795
- element2.references.forEach(this.visitNode);
27796
- }
27797
27815
  visitTemplate(template2) {
27798
27816
  template2.inputs.forEach(this.visitNode);
27799
27817
  template2.outputs.forEach(this.visitNode);
@@ -27812,38 +27830,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27812
27830
  this.symbols.set(reference2, this.rootNode);
27813
27831
  }
27814
27832
  }
27815
- visitComponent(component) {
27816
- component.inputs.forEach(this.visitNode);
27817
- component.outputs.forEach(this.visitNode);
27818
- component.directives.forEach(this.visitNode);
27819
- component.children.forEach(this.visitNode);
27820
- component.references.forEach(this.visitNode);
27821
- }
27822
- visitDirective(directive) {
27823
- directive.inputs.forEach(this.visitNode);
27824
- directive.outputs.forEach(this.visitNode);
27825
- directive.references.forEach(this.visitNode);
27826
- }
27827
- // Unused template visitors
27828
- visitText(text2) {
27829
- }
27830
- visitTextAttribute(attribute2) {
27831
- }
27832
- visitUnknownBlock(block) {
27833
- }
27834
- visitDeferredTrigger() {
27835
- }
27836
- visitIcu(icu) {
27837
- Object.keys(icu.vars).forEach((key) => icu.vars[key].visit(this));
27838
- Object.keys(icu.placeholders).forEach((key) => icu.placeholders[key].visit(this));
27839
- }
27840
- // The remaining visitors are concerned with processing AST expressions within template bindings
27841
- visitBoundAttribute(attribute2) {
27842
- attribute2.value.visit(this);
27843
- }
27844
- visitBoundEvent(event) {
27845
- event.handler.visit(this);
27846
- }
27847
27833
  visitDeferredBlock(deferred) {
27848
27834
  this.ingestScopedNode(deferred);
27849
27835
  deferred.triggers.when?.value.visit(this);
@@ -27863,10 +27849,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27863
27849
  visitDeferredBlockLoading(block) {
27864
27850
  this.ingestScopedNode(block);
27865
27851
  }
27866
- visitSwitchBlock(block) {
27867
- block.expression.visit(this);
27868
- block.cases.forEach(this.visitNode);
27869
- }
27870
27852
  visitSwitchBlockCase(block) {
27871
27853
  block.expression?.visit(this);
27872
27854
  this.ingestScopedNode(block);
@@ -27879,9 +27861,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27879
27861
  visitForLoopBlockEmpty(block) {
27880
27862
  this.ingestScopedNode(block);
27881
27863
  }
27882
- visitIfBlock(block) {
27883
- block.branches.forEach((node) => node.visit(this));
27884
- }
27885
27864
  visitIfBlockBranch(block) {
27886
27865
  block.expression?.visit(this);
27887
27866
  this.ingestScopedNode(block);
@@ -27889,11 +27868,8 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27889
27868
  visitContent(content) {
27890
27869
  this.ingestScopedNode(content);
27891
27870
  }
27892
- visitBoundText(text2) {
27893
- text2.value.visit(this);
27894
- }
27895
27871
  visitLetDeclaration(decl) {
27896
- decl.value.visit(this);
27872
+ super.visitLetDeclaration(decl);
27897
27873
  if (this.rootNode !== null) {
27898
27874
  this.symbols.set(decl, this.rootNode);
27899
27875
  }
@@ -27915,10 +27891,6 @@ var TemplateBinder = class _TemplateBinder extends RecursiveAstVisitor2 {
27915
27891
  this.maybeMap(ast, ast.name);
27916
27892
  return super.visitSafePropertyRead(ast, context);
27917
27893
  }
27918
- visitPropertyWrite(ast, context) {
27919
- this.maybeMap(ast, ast.name);
27920
- return super.visitPropertyWrite(ast, context);
27921
- }
27922
27894
  ingestScopedNode(node) {
27923
27895
  const childScope = this.scope.getChildScope(node);
27924
27896
  const binder = new _TemplateBinder(this.bindings, this.symbols, this.usedPipes, this.eagerPipes, this.deferBlocks, this.nestingLevel, childScope, node, this.level + 1);
@@ -28504,6 +28476,7 @@ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMap
28504
28476
  decl.directives && declarations.push(...decl.directives.map((dir) => convertDirectiveDeclarationToMetadata(dir)));
28505
28477
  decl.pipes && declarations.push(...convertPipeMapToMetadata(decl.pipes));
28506
28478
  }
28479
+ const hasDirectiveDependencies = declarations.every(({ kind }) => kind === R3TemplateDependencyKind.Directive || kind === R3TemplateDependencyKind.NgModule);
28507
28480
  return {
28508
28481
  ...convertDeclareDirectiveFacadeToMetadata(decl, typeSourceSpan),
28509
28482
  template: template2,
@@ -28518,7 +28491,8 @@ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMap
28518
28491
  declarationListEmitMode: 2,
28519
28492
  relativeContextFilePath: "",
28520
28493
  i18nUseExternalIds: true,
28521
- relativeTemplatePath: null
28494
+ relativeTemplatePath: null,
28495
+ hasDirectiveDependencies
28522
28496
  };
28523
28497
  }
28524
28498
  __name(convertDeclareComponentFacadeToMetadata, "convertDeclareComponentFacadeToMetadata");
@@ -28881,7 +28855,7 @@ var _Visitor3 = class {
28881
28855
  merge(nodes, translations, interpolationConfig) {
28882
28856
  this._init(_VisitorMode.Merge, interpolationConfig);
28883
28857
  this._translations = translations;
28884
- const wrapper = new Element2("wrapper", [], [], nodes, void 0, void 0, void 0);
28858
+ const wrapper = new Element2("wrapper", [], [], nodes, false, void 0, void 0, void 0);
28885
28859
  const translatedNode = wrapper.visit(this, null);
28886
28860
  if (this._inI18nBlock) {
28887
28861
  this._reportError(nodes[nodes.length - 1], "Unclosed block");
@@ -29048,9 +29022,9 @@ var _Visitor3 = class {
29048
29022
  this._inImplicitNode = wasInImplicitNode;
29049
29023
  if (this._mode === _VisitorMode.Merge) {
29050
29024
  if (node instanceof Element2) {
29051
- return new Element2(node.name, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
29025
+ return new Element2(node.name, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
29052
29026
  } else {
29053
- return new Component2(node.componentName, node.tagName, node.fullName, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
29027
+ return new Component2(node.componentName, node.tagName, node.fullName, this._translateAttributes(node), this._translateDirectives(node), childNodes, node.isSelfClosing, node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
29054
29028
  }
29055
29029
  }
29056
29030
  return null;
@@ -29250,7 +29224,7 @@ var _Visitor3 = class {
29250
29224
  this._msgCountAtSectionStart = void 0;
29251
29225
  }
29252
29226
  _reportError(node, msg) {
29253
- this._errors.push(new I18nError(node.sourceSpan, msg));
29227
+ this._errors.push(new ParseError(node.sourceSpan, msg));
29254
29228
  }
29255
29229
  };
29256
29230
  function _isOpeningComment(n) {
@@ -29552,7 +29526,7 @@ var XliffParser = class {
29552
29526
  visitDirective(directive, context) {
29553
29527
  }
29554
29528
  _addError(node, message) {
29555
- this._errors.push(new I18nError(node.sourceSpan, message));
29529
+ this._errors.push(new ParseError(node.sourceSpan, message));
29556
29530
  }
29557
29531
  };
29558
29532
  var XmlToI18n$2 = class XmlToI18n {
@@ -29618,7 +29592,7 @@ var XmlToI18n$2 = class XmlToI18n {
29618
29592
  this._addError(directive, "Unexpected node");
29619
29593
  }
29620
29594
  _addError(node, message) {
29621
- this._errors.push(new I18nError(node.sourceSpan, message));
29595
+ this._errors.push(new ParseError(node.sourceSpan, message));
29622
29596
  }
29623
29597
  };
29624
29598
  function getCtypeForTag(tag) {
@@ -29886,7 +29860,7 @@ var Xliff2Parser = class {
29886
29860
  visitDirective(directive, context) {
29887
29861
  }
29888
29862
  _addError(node, message) {
29889
- this._errors.push(new I18nError(node.sourceSpan, message));
29863
+ this._errors.push(new ParseError(node.sourceSpan, message));
29890
29864
  }
29891
29865
  };
29892
29866
  var XmlToI18n$1 = class XmlToI18n2 {
@@ -29967,7 +29941,7 @@ var XmlToI18n$1 = class XmlToI18n2 {
29967
29941
  this._addError(directive, "Unexpected node");
29968
29942
  }
29969
29943
  _addError(node, message) {
29970
- this._errors.push(new I18nError(node.sourceSpan, message));
29944
+ this._errors.push(new ParseError(node.sourceSpan, message));
29971
29945
  }
29972
29946
  };
29973
29947
  function getTypeForTag(tag) {
@@ -30119,7 +30093,7 @@ var XtbParser = class {
30119
30093
  this._addError(directive, "Unexpected node");
30120
30094
  }
30121
30095
  _addError(node, message) {
30122
- this._errors.push(new I18nError(node.sourceSpan, message));
30096
+ this._errors.push(new ParseError(node.sourceSpan, message));
30123
30097
  }
30124
30098
  };
30125
30099
  var XmlToI18n3 = class {
@@ -30182,7 +30156,7 @@ var XmlToI18n3 = class {
30182
30156
  this._addError(directive, "Unexpected node");
30183
30157
  }
30184
30158
  _addError(node, message) {
30185
- this._errors.push(new I18nError(node.sourceSpan, message));
30159
+ this._errors.push(new ParseError(node.sourceSpan, message));
30186
30160
  }
30187
30161
  };
30188
30162
  var TranslationBundle = class _TranslationBundle {
@@ -30330,7 +30304,7 @@ var I18nToHtmlVisitor = class {
30330
30304
  return text2;
30331
30305
  }
30332
30306
  _addError(el, msg) {
30333
- this._errors.push(new I18nError(el.sourceSpan, msg));
30307
+ this._errors.push(new ParseError(el.sourceSpan, msg));
30334
30308
  }
30335
30309
  };
30336
30310
  var I18NHtmlParser = class {
@@ -30523,7 +30497,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
30523
30497
  function compileDeclareClassMetadata(metadata) {
30524
30498
  const definitionMap = new DefinitionMap();
30525
30499
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
30526
- definitionMap.set("version", literal("20.0.6"));
30500
+ definitionMap.set("version", literal("20.1.0"));
30527
30501
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30528
30502
  definitionMap.set("type", metadata.type);
30529
30503
  definitionMap.set("decorators", metadata.decorators);
@@ -30542,7 +30516,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
30542
30516
  callbackReturnDefinitionMap.set("ctorParameters", metadata.ctorParameters ?? literal(null));
30543
30517
  callbackReturnDefinitionMap.set("propDecorators", metadata.propDecorators ?? literal(null));
30544
30518
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
30545
- definitionMap.set("version", literal("20.0.6"));
30519
+ definitionMap.set("version", literal("20.1.0"));
30546
30520
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30547
30521
  definitionMap.set("type", metadata.type);
30548
30522
  definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
@@ -30611,7 +30585,7 @@ function createDirectiveDefinitionMap(meta) {
30611
30585
  const definitionMap = new DefinitionMap();
30612
30586
  const minVersion = getMinimumVersionForPartialOutput(meta);
30613
30587
  definitionMap.set("minVersion", literal(minVersion));
30614
- definitionMap.set("version", literal("20.0.6"));
30588
+ definitionMap.set("version", literal("20.1.0"));
30615
30589
  definitionMap.set("type", meta.type.value);
30616
30590
  if (meta.isStandalone !== void 0) {
30617
30591
  definitionMap.set("isStandalone", literal(meta.isStandalone));
@@ -30938,7 +30912,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION$4 = "12.0.0";
30938
30912
  function compileDeclareFactoryFunction(meta) {
30939
30913
  const definitionMap = new DefinitionMap();
30940
30914
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
30941
- definitionMap.set("version", literal("20.0.6"));
30915
+ definitionMap.set("version", literal("20.1.0"));
30942
30916
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30943
30917
  definitionMap.set("type", meta.type.value);
30944
30918
  definitionMap.set("deps", compileDependencies(meta.deps));
@@ -30961,7 +30935,7 @@ __name(compileDeclareInjectableFromMetadata, "compileDeclareInjectableFromMetada
30961
30935
  function createInjectableDefinitionMap(meta) {
30962
30936
  const definitionMap = new DefinitionMap();
30963
30937
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
30964
- definitionMap.set("version", literal("20.0.6"));
30938
+ definitionMap.set("version", literal("20.1.0"));
30965
30939
  definitionMap.set("ngImport", importExpr(Identifiers.core));
30966
30940
  definitionMap.set("type", meta.type.value);
30967
30941
  if (meta.providedIn !== void 0) {
@@ -30999,7 +30973,7 @@ __name(compileDeclareInjectorFromMetadata, "compileDeclareInjectorFromMetadata")
30999
30973
  function createInjectorDefinitionMap(meta) {
31000
30974
  const definitionMap = new DefinitionMap();
31001
30975
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
31002
- definitionMap.set("version", literal("20.0.6"));
30976
+ definitionMap.set("version", literal("20.1.0"));
31003
30977
  definitionMap.set("ngImport", importExpr(Identifiers.core));
31004
30978
  definitionMap.set("type", meta.type.value);
31005
30979
  definitionMap.set("providers", meta.providers);
@@ -31023,7 +30997,7 @@ function createNgModuleDefinitionMap(meta) {
31023
30997
  throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
31024
30998
  }
31025
30999
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
31026
- definitionMap.set("version", literal("20.0.6"));
31000
+ definitionMap.set("version", literal("20.1.0"));
31027
31001
  definitionMap.set("ngImport", importExpr(Identifiers.core));
31028
31002
  definitionMap.set("type", meta.type.value);
31029
31003
  if (meta.bootstrap.length > 0) {
@@ -31058,13 +31032,13 @@ __name(compileDeclarePipeFromMetadata, "compileDeclarePipeFromMetadata");
31058
31032
  function createPipeDefinitionMap(meta) {
31059
31033
  const definitionMap = new DefinitionMap();
31060
31034
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
31061
- definitionMap.set("version", literal("20.0.6"));
31035
+ definitionMap.set("version", literal("20.1.0"));
31062
31036
  definitionMap.set("ngImport", importExpr(Identifiers.core));
31063
31037
  definitionMap.set("type", meta.type.value);
31064
31038
  if (meta.isStandalone !== void 0) {
31065
31039
  definitionMap.set("isStandalone", literal(meta.isStandalone));
31066
31040
  }
31067
- definitionMap.set("name", literal(meta.pipeName));
31041
+ definitionMap.set("name", literal(meta.pipeName ?? meta.name));
31068
31042
  if (meta.pure === false) {
31069
31043
  definitionMap.set("pure", literal(meta.pure));
31070
31044
  }
@@ -31155,7 +31129,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
31155
31129
  return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
31156
31130
  }
31157
31131
  __name(compileHmrUpdateCallback, "compileHmrUpdateCallback");
31158
- var VERSION = new Version("20.0.6");
31132
+ var VERSION = new Version("20.1.0");
31159
31133
  publishFacade(_global);
31160
31134
  // Annotate the CommonJS export names for ESM import in node:
31161
31135
  0 && (module.exports = {
@@ -31170,6 +31144,7 @@ publishFacade(_global);
31170
31144
  BinaryOperator,
31171
31145
  BinaryOperatorExpr,
31172
31146
  BindingPipe,
31147
+ BindingPipeType,
31173
31148
  BindingType,
31174
31149
  Block,
31175
31150
  BlockParameter,
@@ -31180,6 +31155,7 @@ publishFacade(_global);
31180
31155
  Call,
31181
31156
  Chain,
31182
31157
  ChangeDetectionStrategy,
31158
+ CombinedRecursiveAstVisitor,
31183
31159
  CommaExpr,
31184
31160
  Comment,
31185
31161
  CompilerConfig,
@@ -31223,7 +31199,6 @@ publishFacade(_global);
31223
31199
  JSDocComment,
31224
31200
  JitEvaluator,
31225
31201
  KeyedRead,
31226
- KeyedWrite,
31227
31202
  LeadingComment,
31228
31203
  LetDeclaration,
31229
31204
  Lexer,
@@ -31256,10 +31231,8 @@ publishFacade(_global);
31256
31231
  ParsedPropertyType,
31257
31232
  ParsedVariable,
31258
31233
  Parser,
31259
- ParserError,
31260
31234
  PrefixNot,
31261
31235
  PropertyRead,
31262
- PropertyWrite,
31263
31236
  R3Identifiers,
31264
31237
  R3NgModuleMetadataKind,
31265
31238
  R3SelectorScopeMode,
@@ -31352,9 +31325,6 @@ publishFacade(_global);
31352
31325
  VoidExpr,
31353
31326
  VoidExpression,
31354
31327
  WrappedNodeExpr,
31355
- WriteKeyExpr,
31356
- WritePropExpr,
31357
- WriteVarExpr,
31358
31328
  Xliff,
31359
31329
  Xliff2,
31360
31330
  Xmb,
@@ -31423,7 +31393,7 @@ publishFacade(_global);
31423
31393
 
31424
31394
  @angular/compiler/fesm2022/compiler.mjs:
31425
31395
  (**
31426
- * @license Angular v20.0.6
31396
+ * @license Angular v20.1.0
31427
31397
  * (c) 2010-2025 Google LLC. https://angular.io/
31428
31398
  * License: MIT
31429
31399
  *)