@angular/compiler 21.1.0-next.3 → 21.1.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Angular v21.1.0-next.3
3
- * (c) 2010-2025 Google LLC. https://angular.dev/
2
+ * @license Angular v21.1.0-rc.0
3
+ * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
6
6
 
@@ -1529,7 +1529,7 @@ class LiteralArrayExpr extends Expression {
1529
1529
  return new LiteralArrayExpr(this.entries.map(e => e.clone()), this.type, this.sourceSpan);
1530
1530
  }
1531
1531
  }
1532
- class LiteralMapEntry {
1532
+ class LiteralMapPropertyAssignment {
1533
1533
  key;
1534
1534
  value;
1535
1535
  quoted;
@@ -1542,7 +1542,25 @@ class LiteralMapEntry {
1542
1542
  return this.key === e.key && this.value.isEquivalent(e.value);
1543
1543
  }
1544
1544
  clone() {
1545
- return new LiteralMapEntry(this.key, this.value.clone(), this.quoted);
1545
+ return new LiteralMapPropertyAssignment(this.key, this.value.clone(), this.quoted);
1546
+ }
1547
+ isConstant() {
1548
+ return this.value.isConstant();
1549
+ }
1550
+ }
1551
+ class LiteralMapSpreadAssignment {
1552
+ expression;
1553
+ constructor(expression) {
1554
+ this.expression = expression;
1555
+ }
1556
+ isEquivalent(e) {
1557
+ return e instanceof LiteralMapSpreadAssignment && this.expression.isEquivalent(e.expression);
1558
+ }
1559
+ clone() {
1560
+ return new LiteralMapSpreadAssignment(this.expression.clone());
1561
+ }
1562
+ isConstant() {
1563
+ return this.expression.isConstant();
1546
1564
  }
1547
1565
  }
1548
1566
  class LiteralMapExpr extends Expression {
@@ -1559,7 +1577,7 @@ class LiteralMapExpr extends Expression {
1559
1577
  return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries);
1560
1578
  }
1561
1579
  isConstant() {
1562
- return this.entries.every(e => e.value.isConstant());
1580
+ return this.entries.every(e => e.isConstant());
1563
1581
  }
1564
1582
  visitExpression(visitor, context) {
1565
1583
  return visitor.visitLiteralMapExpr(this, context);
@@ -1588,6 +1606,25 @@ class CommaExpr extends Expression {
1588
1606
  return new CommaExpr(this.parts.map(p => p.clone()));
1589
1607
  }
1590
1608
  }
1609
+ class SpreadElementExpr extends Expression {
1610
+ expression;
1611
+ constructor(expression, sourceSpan) {
1612
+ super(null, sourceSpan);
1613
+ this.expression = expression;
1614
+ }
1615
+ isEquivalent(e) {
1616
+ return e instanceof SpreadElementExpr && this.expression.isEquivalent(e.expression);
1617
+ }
1618
+ isConstant() {
1619
+ return this.expression.isConstant();
1620
+ }
1621
+ visitExpression(visitor, context) {
1622
+ return visitor.visitSpreadElementExpr(this, context);
1623
+ }
1624
+ clone() {
1625
+ return new SpreadElementExpr(this.expression.clone(), this.sourceSpan);
1626
+ }
1627
+ }
1591
1628
  const NULL_EXPR = new LiteralExpr(null, null, null);
1592
1629
  const TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null);
1593
1630
  var StmtModifier;
@@ -1838,7 +1875,13 @@ let RecursiveAstVisitor$1 = class RecursiveAstVisitor {
1838
1875
  return this.visitExpression(ast, context);
1839
1876
  }
1840
1877
  visitLiteralMapExpr(ast, context) {
1841
- ast.entries.forEach(entry => entry.value.visitExpression(this, context));
1878
+ ast.entries.forEach(entry => {
1879
+ if (entry instanceof LiteralMapSpreadAssignment) {
1880
+ entry.expression.visitExpression(this, context);
1881
+ } else {
1882
+ entry.value.visitExpression(this, context);
1883
+ }
1884
+ });
1842
1885
  return this.visitExpression(ast, context);
1843
1886
  }
1844
1887
  visitCommaExpr(ast, context) {
@@ -1857,6 +1900,10 @@ let RecursiveAstVisitor$1 = class RecursiveAstVisitor {
1857
1900
  ast.expr.visitExpression(this, context);
1858
1901
  return this.visitExpression(ast, context);
1859
1902
  }
1903
+ visitSpreadElementExpr(ast, context) {
1904
+ ast.expression.visitExpression(this, context);
1905
+ return this.visitExpression(ast, context);
1906
+ }
1860
1907
  visitAllExpressions(exprs, context) {
1861
1908
  exprs.forEach(expr => expr.visitExpression(this, context));
1862
1909
  }
@@ -1922,7 +1969,7 @@ function literalArr(values, type, sourceSpan) {
1922
1969
  return new LiteralArrayExpr(values, type, sourceSpan);
1923
1970
  }
1924
1971
  function literalMap(values, type = null) {
1925
- return new LiteralMapExpr(values.map(e => new LiteralMapEntry(e.key, e.value, e.quoted)), type, null);
1972
+ return new LiteralMapExpr(values.map(e => new LiteralMapPropertyAssignment(e.key, e.value, e.quoted)), type, null);
1926
1973
  }
1927
1974
  function unary(operator, expr, type, sourceSpan) {
1928
1975
  return new UnaryOperatorExpr(operator, expr, type, sourceSpan);
@@ -2011,8 +2058,9 @@ var output_ast = /*#__PURE__*/Object.freeze({
2011
2058
  LeadingComment: LeadingComment,
2012
2059
  LiteralArrayExpr: LiteralArrayExpr,
2013
2060
  LiteralExpr: LiteralExpr,
2014
- LiteralMapEntry: LiteralMapEntry,
2015
2061
  LiteralMapExpr: LiteralMapExpr,
2062
+ LiteralMapPropertyAssignment: LiteralMapPropertyAssignment,
2063
+ LiteralMapSpreadAssignment: LiteralMapSpreadAssignment,
2016
2064
  LiteralPiece: LiteralPiece,
2017
2065
  LocalizedString: LocalizedString,
2018
2066
  MapType: MapType,
@@ -2029,6 +2077,7 @@ var output_ast = /*#__PURE__*/Object.freeze({
2029
2077
  RegularExpressionLiteralExpr: RegularExpressionLiteralExpr,
2030
2078
  ReturnStatement: ReturnStatement,
2031
2079
  STRING_TYPE: STRING_TYPE,
2080
+ SpreadElementExpr: SpreadElementExpr,
2032
2081
  Statement: Statement,
2033
2082
  get StmtModifier () { return StmtModifier; },
2034
2083
  TYPED_NULL_EXPR: TYPED_NULL_EXPR,
@@ -2067,7 +2116,6 @@ var output_ast = /*#__PURE__*/Object.freeze({
2067
2116
  });
2068
2117
 
2069
2118
  const CONSTANT_PREFIX = '_c';
2070
- const UNKNOWN_VALUE_KEY = variable('<unknown>');
2071
2119
  const KEY_CONTEXT = {};
2072
2120
  const POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS = 50;
2073
2121
  class FixupExpression extends Expression {
@@ -2148,25 +2196,6 @@ class ConstantPool {
2148
2196
  }
2149
2197
  return this.sharedConstants.get(key);
2150
2198
  }
2151
- getLiteralFactory(literal) {
2152
- if (literal instanceof LiteralArrayExpr) {
2153
- const argumentsForKey = literal.entries.map(e => e.isConstant() ? e : UNKNOWN_VALUE_KEY);
2154
- const key = GenericKeyFn.INSTANCE.keyOf(literalArr(argumentsForKey));
2155
- return this._getLiteralFactory(key, literal.entries, entries => literalArr(entries));
2156
- } else {
2157
- const expressionForKey = literalMap(literal.entries.map(e => ({
2158
- key: e.key,
2159
- value: e.value.isConstant() ? e.value : UNKNOWN_VALUE_KEY,
2160
- quoted: e.quoted
2161
- })));
2162
- const key = GenericKeyFn.INSTANCE.keyOf(expressionForKey);
2163
- return this._getLiteralFactory(key, literal.entries.map(e => e.value), entries => literalMap(entries.map((value, index) => ({
2164
- key: literal.entries[index].key,
2165
- value,
2166
- quoted: literal.entries[index].quoted
2167
- }))));
2168
- }
2169
- }
2170
2199
  getSharedFunctionReference(fn, prefix, useUniqueName = true) {
2171
2200
  const isArrow = fn instanceof ArrowFunctionExpr;
2172
2201
  for (const current of this.statements) {
@@ -2181,23 +2210,6 @@ class ConstantPool {
2181
2210
  this.statements.push(fn instanceof FunctionExpr ? fn.toDeclStmt(name, StmtModifier.Final) : new DeclareVarStmt(name, fn, INFERRED_TYPE, StmtModifier.Final, fn.sourceSpan));
2182
2211
  return variable(name);
2183
2212
  }
2184
- _getLiteralFactory(key, values, resultMap) {
2185
- let literalFactory = this.literalFactories.get(key);
2186
- const literalFactoryArguments = values.filter(e => !e.isConstant());
2187
- if (!literalFactory) {
2188
- const resultExpressions = values.map((e, index) => e.isConstant() ? this.getConstLiteral(e, true) : variable(`a${index}`));
2189
- const parameters = resultExpressions.filter(isVariable).map(e => new FnParam(e.name, DYNAMIC_TYPE));
2190
- const pureFunctionDeclaration = arrowFn(parameters, resultMap(resultExpressions), INFERRED_TYPE);
2191
- const name = this.freshName();
2192
- this.statements.push(new DeclareVarStmt(name, pureFunctionDeclaration, INFERRED_TYPE, StmtModifier.Final));
2193
- literalFactory = variable(name);
2194
- this.literalFactories.set(key, literalFactory);
2195
- }
2196
- return {
2197
- literalFactory,
2198
- literalFactoryArguments
2199
- };
2200
- }
2201
2213
  uniqueName(name, alwaysIncludeSuffix = true) {
2202
2214
  const count = this._claimedNames.get(name) ?? 0;
2203
2215
  const result = count === 0 && !alwaysIncludeSuffix ? `${name}` : `${name}${count}`;
@@ -2226,11 +2238,15 @@ class GenericKeyFn {
2226
2238
  } else if (expr instanceof LiteralMapExpr) {
2227
2239
  const entries = [];
2228
2240
  for (const entry of expr.entries) {
2229
- let key = entry.key;
2230
- if (entry.quoted) {
2231
- key = `"${key}"`;
2241
+ if (entry instanceof LiteralMapSpreadAssignment) {
2242
+ entries.push('...' + this.keyOf(entry.expression));
2243
+ } else {
2244
+ let key = entry.key;
2245
+ if (entry.quoted) {
2246
+ key = `"${key}"`;
2247
+ }
2248
+ entries.push(key + ':' + this.keyOf(entry.value));
2232
2249
  }
2233
- entries.push(key + ':' + this.keyOf(entry.value));
2234
2250
  }
2235
2251
  return `{${entries.join(',')}}`;
2236
2252
  } else if (expr instanceof ExternalExpr) {
@@ -2239,14 +2255,13 @@ class GenericKeyFn {
2239
2255
  return `read(${expr.name})`;
2240
2256
  } else if (expr instanceof TypeofExpr) {
2241
2257
  return `typeof(${this.keyOf(expr.expr)})`;
2258
+ } else if (expr instanceof SpreadElementExpr) {
2259
+ return `...${this.keyOf(expr.expression)}`;
2242
2260
  } else {
2243
2261
  throw new Error(`${this.constructor.name} does not handle expressions of type ${expr.constructor.name}`);
2244
2262
  }
2245
2263
  }
2246
2264
  }
2247
- function isVariable(e) {
2248
- return e instanceof ReadVarExpr;
2249
- }
2250
2265
  function isLongStringLiteral(expr) {
2251
2266
  return expr instanceof LiteralExpr && typeof expr.value === 'string' && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
2252
2267
  }
@@ -3666,8 +3681,13 @@ class AbstractEmitterVisitor {
3666
3681
  visitLiteralMapExpr(ast, ctx) {
3667
3682
  ctx.print(ast, `{`);
3668
3683
  this.visitAllObjects(entry => {
3669
- ctx.print(ast, `${escapeIdentifier(entry.key, this._escapeDollarInStrings, entry.quoted)}:`);
3670
- entry.value.visitExpression(this, ctx);
3684
+ if (entry instanceof LiteralMapSpreadAssignment) {
3685
+ ctx.print(ast, '...');
3686
+ entry.expression.visitExpression(this, ctx);
3687
+ } else {
3688
+ ctx.print(ast, `${escapeIdentifier(entry.key, this._escapeDollarInStrings, entry.quoted)}:`);
3689
+ entry.value.visitExpression(this, ctx);
3690
+ }
3671
3691
  }, ast.entries, ctx, ',');
3672
3692
  ctx.print(ast, `}`);
3673
3693
  return null;
@@ -3681,6 +3701,10 @@ class AbstractEmitterVisitor {
3681
3701
  visitParenthesizedExpr(ast, ctx) {
3682
3702
  ast.expr.visitExpression(this, ctx);
3683
3703
  }
3704
+ visitSpreadElementExpr(ast, ctx) {
3705
+ ctx.print(ast, '...');
3706
+ ast.expression.visitExpression(this, ctx);
3707
+ }
3684
3708
  visitAllExpressions(expressions, ctx, separator) {
3685
3709
  this.visitAllObjects(expr => expr.visitExpression(this, ctx), expressions, ctx, separator);
3686
3710
  }
@@ -3988,7 +4012,7 @@ class ImplicitReceiver extends AST {
3988
4012
  return visitor.visitImplicitReceiver(this, context);
3989
4013
  }
3990
4014
  }
3991
- class ThisReceiver extends ImplicitReceiver {
4015
+ class ThisReceiver extends AST {
3992
4016
  visit(visitor, context = null) {
3993
4017
  return visitor.visitThisReceiver?.(this, context);
3994
4018
  }
@@ -4106,6 +4130,16 @@ class LiteralArray extends AST {
4106
4130
  return visitor.visitLiteralArray(this, context);
4107
4131
  }
4108
4132
  }
4133
+ class SpreadElement extends AST {
4134
+ expression;
4135
+ constructor(span, sourceSpan, expression) {
4136
+ super(span, sourceSpan);
4137
+ this.expression = expression;
4138
+ }
4139
+ visit(visitor, context = null) {
4140
+ return visitor.visitSpreadElement(this, context);
4141
+ }
4142
+ }
4109
4143
  class LiteralMap extends AST {
4110
4144
  keys;
4111
4145
  values;
@@ -4432,6 +4466,9 @@ class RecursiveAstVisitor {
4432
4466
  this.visit(ast.expression, context);
4433
4467
  }
4434
4468
  visitRegularExpressionLiteral(ast, context) {}
4469
+ visitSpreadElement(ast, context) {
4470
+ this.visit(ast.expression, context);
4471
+ }
4435
4472
  visitAll(asts, context) {
4436
4473
  for (const ast of asts) {
4437
4474
  this.visit(ast, context);
@@ -4879,12 +4916,12 @@ class DeferredBlock extends BlockNode {
4879
4916
  }
4880
4917
  class SwitchBlock extends BlockNode {
4881
4918
  expression;
4882
- cases;
4919
+ groups;
4883
4920
  unknownBlocks;
4884
- constructor(expression, cases, unknownBlocks, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
4921
+ constructor(expression, groups, unknownBlocks, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
4885
4922
  super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
4886
4923
  this.expression = expression;
4887
- this.cases = cases;
4924
+ this.groups = groups;
4888
4925
  this.unknownBlocks = unknownBlocks;
4889
4926
  }
4890
4927
  visit(visitor) {
@@ -4893,16 +4930,26 @@ class SwitchBlock extends BlockNode {
4893
4930
  }
4894
4931
  class SwitchBlockCase extends BlockNode {
4895
4932
  expression;
4933
+ constructor(expression, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
4934
+ super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
4935
+ this.expression = expression;
4936
+ }
4937
+ visit(visitor) {
4938
+ return visitor.visitSwitchBlockCase(this);
4939
+ }
4940
+ }
4941
+ class SwitchBlockCaseGroup extends BlockNode {
4942
+ cases;
4896
4943
  children;
4897
4944
  i18n;
4898
- constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {
4945
+ constructor(cases, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) {
4899
4946
  super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
4900
- this.expression = expression;
4947
+ this.cases = cases;
4901
4948
  this.children = children;
4902
4949
  this.i18n = i18n;
4903
4950
  }
4904
4951
  visit(visitor) {
4905
- return visitor.visitSwitchBlockCase(this);
4952
+ return visitor.visitSwitchBlockCaseGroup(this);
4906
4953
  }
4907
4954
  }
4908
4955
  class ForLoopBlock extends BlockNode {
@@ -5216,9 +5263,11 @@ let RecursiveVisitor$1 = class RecursiveVisitor {
5216
5263
  visitAll$1(this, block.children);
5217
5264
  }
5218
5265
  visitSwitchBlock(block) {
5219
- visitAll$1(this, block.cases);
5266
+ visitAll$1(this, block.groups);
5220
5267
  }
5221
- visitSwitchBlockCase(block) {
5268
+ visitSwitchBlockCase(block) {}
5269
+ visitSwitchBlockCaseGroup(block) {
5270
+ visitAll$1(this, block.cases);
5222
5271
  visitAll$1(this, block.children);
5223
5272
  }
5224
5273
  visitForLoopBlock(block) {
@@ -6494,7 +6543,7 @@ class JitEmitterVisitor extends AbstractJsEmitterVisitor {
6494
6543
  this.refResolver = refResolver;
6495
6544
  }
6496
6545
  createReturnStmt(ctx) {
6497
- const stmt = new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map(resultVar => new LiteralMapEntry(resultVar, variable(resultVar), false))));
6546
+ const stmt = new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map(resultVar => new LiteralMapPropertyAssignment(resultVar, variable(resultVar), false))));
6498
6547
  stmt.visitStatement(this, ctx);
6499
6548
  }
6500
6549
  getArgs() {
@@ -7793,6 +7842,7 @@ function createControlOp(op) {
7793
7842
  return {
7794
7843
  kind: OpKind.Control,
7795
7844
  target: op.target,
7845
+ name: op.name,
7796
7846
  expression: op.expression,
7797
7847
  bindingKind: op.bindingKind,
7798
7848
  securityContext: op.securityContext,
@@ -8662,8 +8712,12 @@ function transformExpressionsInExpression(expr, transform, flags) {
8662
8712
  expr.entries[i] = transformExpressionsInExpression(expr.entries[i], transform, flags);
8663
8713
  }
8664
8714
  } else if (expr instanceof LiteralMapExpr) {
8665
- for (let i = 0; i < expr.entries.length; i++) {
8666
- expr.entries[i].value = transformExpressionsInExpression(expr.entries[i].value, transform, flags);
8715
+ for (const entry of expr.entries) {
8716
+ if (entry instanceof LiteralMapSpreadAssignment) {
8717
+ entry.expression = transformExpressionsInExpression(entry.expression, transform, flags);
8718
+ } else {
8719
+ entry.value = transformExpressionsInExpression(entry.value, transform, flags);
8720
+ }
8667
8721
  }
8668
8722
  } else if (expr instanceof ConditionalExpr) {
8669
8723
  expr.condition = transformExpressionsInExpression(expr.condition, transform, flags);
@@ -8698,6 +8752,8 @@ function transformExpressionsInExpression(expr, transform, flags) {
8698
8752
  }
8699
8753
  } else if (expr instanceof ParenthesizedExpr) {
8700
8754
  expr.expr = transformExpressionsInExpression(expr.expr, transform, flags);
8755
+ } else if (expr instanceof SpreadElementExpr) {
8756
+ expr.expression = transformExpressionsInExpression(expr.expression, transform, flags);
8701
8757
  } else if (expr instanceof ReadVarExpr || expr instanceof ExternalExpr || expr instanceof LiteralExpr || expr instanceof RegularExpressionLiteralExpr) ; else {
8702
8758
  throw new Error(`Unhandled expression kind: ${expr.constructor.name}`);
8703
8759
  }
@@ -9692,7 +9748,7 @@ function extractAttributes(job) {
9692
9748
  }
9693
9749
  break;
9694
9750
  case OpKind.Control:
9695
- OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.Property, null, 'field', null, null, null, op.securityContext), lookupElement$3(elements, op.target));
9751
+ OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.Property, null, op.name, null, null, null, op.securityContext), lookupElement$3(elements, op.target));
9696
9752
  break;
9697
9753
  case OpKind.TwoWayProperty:
9698
9754
  OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.TwoWayProperty, null, op.name, null, null, null, op.securityContext), lookupElement$3(elements, op.target));
@@ -9802,7 +9858,7 @@ function specializeBindings(job) {
9802
9858
  OpList.replace(op, createAttributeOp(op.target, null, op.name, op.expression, op.securityContext, false, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
9803
9859
  } else if (job.kind === CompilationJobKind.Host) {
9804
9860
  OpList.replace(op, createDomPropertyOp(op.name, op.expression, op.bindingKind, op.i18nContext, op.securityContext, op.sourceSpan));
9805
- } else if (op.name === 'field') {
9861
+ } else if (op.name === 'field' || op.name === 'formField') {
9806
9862
  OpList.replace(op, createControlOp(op));
9807
9863
  } else {
9808
9864
  OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));
@@ -13557,6 +13613,11 @@ class _Tokenizer {
13557
13613
  if (this._attemptCharCode($LBRACE)) {
13558
13614
  this._beginToken(25);
13559
13615
  this._endToken([]);
13616
+ } else if (this._isBlockStart() && (startToken.parts[0] === 'case' || startToken.parts[0] === 'default')) {
13617
+ this._beginToken(25);
13618
+ this._endToken([]);
13619
+ this._beginToken(26);
13620
+ this._endToken([]);
13560
13621
  } else {
13561
13622
  startToken.type = 28;
13562
13623
  }
@@ -15507,7 +15568,18 @@ class _Scanner {
15507
15568
  switch (peek) {
15508
15569
  case $PERIOD:
15509
15570
  this.advance();
15510
- return isDigit(this.peek) ? this.scanNumber(start) : newCharacterToken(start, this.index, $PERIOD);
15571
+ if (isDigit(this.peek)) {
15572
+ return this.scanNumber(start);
15573
+ }
15574
+ if (this.peek !== $PERIOD) {
15575
+ return newCharacterToken(start, this.index, $PERIOD);
15576
+ }
15577
+ this.advance();
15578
+ if (this.peek === $PERIOD) {
15579
+ this.advance();
15580
+ return newOperatorToken(start, this.index, '...');
15581
+ }
15582
+ return this.error(`Unexpected character [${String.fromCharCode(peek)}]`, 0);
15511
15583
  case $LPAREN:
15512
15584
  case $RPAREN:
15513
15585
  case $LBRACKET:
@@ -16462,14 +16534,14 @@ class _ParseAST {
16462
16534
  return new PrefixNot(this.span(start), this.sourceSpan(start), result);
16463
16535
  }
16464
16536
  } else if (this.next.isKeywordTypeof()) {
16465
- this.advance();
16466
16537
  const start = this.inputIndex;
16467
- let result = this.parsePrefix();
16538
+ this.advance();
16539
+ const result = this.parsePrefix();
16468
16540
  return new TypeofExpression(this.span(start), this.sourceSpan(start), result);
16469
16541
  } else if (this.next.isKeywordVoid()) {
16470
- this.advance();
16471
16542
  const start = this.inputIndex;
16472
- let result = this.parsePrefix();
16543
+ this.advance();
16544
+ const result = this.parsePrefix();
16473
16545
  return new VoidExpression(this.span(start), this.sourceSpan(start), result);
16474
16546
  }
16475
16547
  return this.parseCallChain();
@@ -16531,11 +16603,7 @@ class _ParseAST {
16531
16603
  this.advance();
16532
16604
  return new ThisReceiver(this.span(start), this.sourceSpan(start));
16533
16605
  } else if (this.consumeOptionalCharacter($LBRACKET)) {
16534
- this.rbracketsExpected++;
16535
- const elements = this.parseExpressionList($RBRACKET);
16536
- this.rbracketsExpected--;
16537
- this.expectCharacter($RBRACKET);
16538
- return new LiteralArray(this.span(start), this.sourceSpan(start), elements);
16606
+ return this.parseLiteralArray(start);
16539
16607
  } else if (this.next.isCharacter($LBRACE)) {
16540
16608
  return this.parseLiteralMap();
16541
16609
  } else if (this.next.isIdentifier()) {
@@ -16565,16 +16633,21 @@ class _ParseAST {
16565
16633
  return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
16566
16634
  }
16567
16635
  }
16568
- parseExpressionList(terminator) {
16569
- const result = [];
16636
+ parseLiteralArray(arrayStart) {
16637
+ this.rbracketsExpected++;
16638
+ const elements = [];
16570
16639
  do {
16571
- if (!this.next.isCharacter(terminator)) {
16572
- result.push(this.parsePipe());
16640
+ if (this.next.isOperator('...')) {
16641
+ elements.push(this.parseSpreadElement());
16642
+ } else if (!this.next.isCharacter($RBRACKET)) {
16643
+ elements.push(this.parsePipe());
16573
16644
  } else {
16574
16645
  break;
16575
16646
  }
16576
16647
  } while (this.consumeOptionalCharacter($COMMA));
16577
- return result;
16648
+ this.rbracketsExpected--;
16649
+ this.expectCharacter($RBRACKET);
16650
+ return new LiteralArray(this.span(arrayStart), this.sourceSpan(arrayStart), elements);
16578
16651
  }
16579
16652
  parseLiteralMap() {
16580
16653
  const keys = [];
@@ -16585,11 +16658,26 @@ class _ParseAST {
16585
16658
  this.rbracesExpected++;
16586
16659
  do {
16587
16660
  const keyStart = this.inputIndex;
16661
+ if (this.next.isOperator('...')) {
16662
+ this.advance();
16663
+ keys.push({
16664
+ kind: 'spread',
16665
+ span: this.span(keyStart),
16666
+ sourceSpan: this.sourceSpan(keyStart)
16667
+ });
16668
+ values.push(this.parsePipe());
16669
+ continue;
16670
+ }
16588
16671
  const quoted = this.next.isString();
16589
16672
  const key = this.expectIdentifierOrKeywordOrString();
16673
+ const keySpan = this.span(keyStart);
16674
+ const keySourceSpan = this.sourceSpan(keyStart);
16590
16675
  const literalMapKey = {
16676
+ kind: 'property',
16591
16677
  key,
16592
- quoted
16678
+ quoted,
16679
+ span: keySpan,
16680
+ sourceSpan: keySourceSpan
16593
16681
  };
16594
16682
  keys.push(literalMapKey);
16595
16683
  if (quoted) {
@@ -16599,9 +16687,7 @@ class _ParseAST {
16599
16687
  values.push(this.parsePipe());
16600
16688
  } else {
16601
16689
  literalMapKey.isShorthandInitialized = true;
16602
- const span = this.span(keyStart);
16603
- const sourceSpan = this.sourceSpan(keyStart);
16604
- values.push(new PropertyRead(span, sourceSpan, sourceSpan, new ImplicitReceiver(span, sourceSpan), key));
16690
+ values.push(new PropertyRead(keySpan, keySourceSpan, keySourceSpan, new ImplicitReceiver(keySpan, keySourceSpan), key));
16605
16691
  }
16606
16692
  } while (this.consumeOptionalCharacter($COMMA) && !this.next.isCharacter($RBRACE));
16607
16693
  this.rbracesExpected--;
@@ -16656,13 +16742,26 @@ class _ParseAST {
16656
16742
  return isSafe ? new SafeCall(span, sourceSpan, receiver, args, argumentSpan) : new Call(span, sourceSpan, receiver, args, argumentSpan);
16657
16743
  }
16658
16744
  parseCallArguments() {
16659
- if (this.next.isCharacter($RPAREN)) return [];
16745
+ if (this.next.isCharacter($RPAREN)) {
16746
+ return [];
16747
+ }
16660
16748
  const positionals = [];
16661
16749
  do {
16662
- positionals.push(this.parsePipe());
16750
+ positionals.push(this.next.isOperator('...') ? this.parseSpreadElement() : this.parsePipe());
16663
16751
  } while (this.consumeOptionalCharacter($COMMA));
16664
16752
  return positionals;
16665
16753
  }
16754
+ parseSpreadElement() {
16755
+ if (!this.next.isOperator('...')) {
16756
+ this.error("Spread element must start with '...' operator");
16757
+ }
16758
+ const spreadStart = this.inputIndex;
16759
+ this.advance();
16760
+ const expression = this.parsePipe();
16761
+ const span = this.span(spreadStart);
16762
+ const sourceSpan = this.sourceSpan(spreadStart);
16763
+ return new SpreadElement(span, sourceSpan, expression);
16764
+ }
16666
16765
  expectTemplateBindingKey() {
16667
16766
  let result = '';
16668
16767
  let operatorFound = false;
@@ -16947,7 +17046,12 @@ class SerializeExpressionVisitor {
16947
17046
  return `[${ast.expressions.map(e => e.visit(this, context)).join(', ')}]`;
16948
17047
  }
16949
17048
  visitLiteralMap(ast, context) {
16950
- return `{${zip(ast.keys.map(literal => literal.quoted ? `'${literal.key}'` : literal.key), ast.values.map(value => value.visit(this, context))).map(([key, value]) => `${key}: ${value}`).join(', ')}}`;
17049
+ return `{${zip(ast.keys.map(literal => {
17050
+ if (literal.kind === 'spread') {
17051
+ return '...';
17052
+ }
17053
+ return literal.quoted ? `'${literal.key}'` : literal.key;
17054
+ }), ast.values.map(value => value.visit(this, context))).map(([key, value]) => `${key}: ${value}`).join(', ')}}`;
16951
17055
  }
16952
17056
  visitLiteralPrimitive(ast) {
16953
17057
  if (ast.value === null) return 'null';
@@ -16973,7 +17077,7 @@ class SerializeExpressionVisitor {
16973
17077
  return `${ast.expression.visit(this, context)}!`;
16974
17078
  }
16975
17079
  visitPropertyRead(ast, context) {
16976
- if (ast.receiver instanceof ImplicitReceiver) {
17080
+ if (ast.receiver instanceof ImplicitReceiver || ast.receiver instanceof ThisReceiver) {
16977
17081
  return ast.name;
16978
17082
  } else {
16979
17083
  return `${ast.receiver.visit(this, context)}.${ast.name}`;
@@ -17020,6 +17124,9 @@ class SerializeExpressionVisitor {
17020
17124
  visitTaggedTemplateLiteral(ast, context) {
17021
17125
  return ast.tag.visit(this, context) + ast.template.visit(this, context);
17022
17126
  }
17127
+ visitSpreadElement(ast, context) {
17128
+ return `...${ast.expression.visit(this, context)}`;
17129
+ }
17023
17130
  visitParenthesizedExpression(ast, context) {
17024
17131
  return '(' + ast.expression.visit(this, context) + ')';
17025
17132
  }
@@ -17043,8 +17150,8 @@ function SECURITY_SCHEMA() {
17043
17150
  _SECURITY_SCHEMA = {};
17044
17151
  registerContext(SecurityContext.HTML, ['iframe|srcdoc', '*|innerHTML', '*|outerHTML']);
17045
17152
  registerContext(SecurityContext.STYLE, ['*|style']);
17046
- registerContext(SecurityContext.URL, ['*|formAction', 'area|href', 'area|ping', 'audio|src', 'a|href', 'a|xlink:href', 'a|ping', 'blockquote|cite', 'body|background', 'del|cite', 'form|action', 'img|src', 'input|src', 'ins|cite', 'q|cite', 'source|src', 'track|src', 'video|poster', 'video|src', 'annotation|href', 'annotation|xlink:href', 'annotation-xml|href', 'annotation-xml|xlink:href', 'maction|href', 'maction|xlink:href', 'malignmark|href', 'malignmark|xlink:href', 'math|href', 'math|xlink:href', 'mroot|href', 'mroot|xlink:href', 'msqrt|href', 'msqrt|xlink:href', 'merror|href', 'merror|xlink:href', 'mfrac|href', 'mfrac|xlink:href', 'mglyph|href', 'mglyph|xlink:href', 'msub|href', 'msub|xlink:href', 'msup|href', 'msup|xlink:href', 'msubsup|href', 'msubsup|xlink:href', 'mmultiscripts|href', 'mmultiscripts|xlink:href', 'mprescripts|href', 'mprescripts|xlink:href', 'mi|href', 'mi|xlink:href', 'mn|href', 'mn|xlink:href', 'mo|href', 'mo|xlink:href', 'mpadded|href', 'mpadded|xlink:href', 'mphantom|href', 'mphantom|xlink:href', 'mrow|href', 'mrow|xlink:href', 'ms|href', 'ms|xlink:href', 'mspace|href', 'mspace|xlink:href', 'mstyle|href', 'mstyle|xlink:href', 'mtable|href', 'mtable|xlink:href', 'mtd|href', 'mtd|xlink:href', 'mtr|href', 'mtr|xlink:href', 'mtext|href', 'mtext|xlink:href', 'mover|href', 'mover|xlink:href', 'munder|href', 'munder|xlink:href', 'munderover|href', 'munderover|xlink:href', 'semantics|href', 'semantics|xlink:href', 'none|href', 'none|xlink:href']);
17047
- registerContext(SecurityContext.RESOURCE_URL, ['applet|code', 'applet|codebase', 'base|href', 'embed|src', 'frame|src', 'head|profile', 'html|manifest', 'iframe|src', 'link|href', 'media|src', 'object|codebase', 'object|data', 'script|src']);
17153
+ registerContext(SecurityContext.URL, ['*|formAction', 'area|href', 'a|href', 'a|xlink:href', 'form|action', 'annotation|href', 'annotation|xlink:href', 'annotation-xml|href', 'annotation-xml|xlink:href', 'maction|href', 'maction|xlink:href', 'malignmark|href', 'malignmark|xlink:href', 'math|href', 'math|xlink:href', 'mroot|href', 'mroot|xlink:href', 'msqrt|href', 'msqrt|xlink:href', 'merror|href', 'merror|xlink:href', 'mfrac|href', 'mfrac|xlink:href', 'mglyph|href', 'mglyph|xlink:href', 'msub|href', 'msub|xlink:href', 'msup|href', 'msup|xlink:href', 'msubsup|href', 'msubsup|xlink:href', 'mmultiscripts|href', 'mmultiscripts|xlink:href', 'mprescripts|href', 'mprescripts|xlink:href', 'mi|href', 'mi|xlink:href', 'mn|href', 'mn|xlink:href', 'mo|href', 'mo|xlink:href', 'mpadded|href', 'mpadded|xlink:href', 'mphantom|href', 'mphantom|xlink:href', 'mrow|href', 'mrow|xlink:href', 'ms|href', 'ms|xlink:href', 'mspace|href', 'mspace|xlink:href', 'mstyle|href', 'mstyle|xlink:href', 'mtable|href', 'mtable|xlink:href', 'mtd|href', 'mtd|xlink:href', 'mtr|href', 'mtr|xlink:href', 'mtext|href', 'mtext|xlink:href', 'mover|href', 'mover|xlink:href', 'munder|href', 'munder|xlink:href', 'munderover|href', 'munderover|xlink:href', 'semantics|href', 'semantics|xlink:href', 'none|href', 'none|xlink:href', 'img|src', 'video|src']);
17154
+ registerContext(SecurityContext.RESOURCE_URL, ['base|href', 'embed|src', 'frame|src', 'iframe|src', 'link|href', 'object|codebase', 'object|data', 'script|src', 'script|href', 'script|xlink:href']);
17048
17155
  registerContext(SecurityContext.ATTRIBUTE_NO_BINDING, ['animate|attributeName', 'set|attributeName', 'animateMotion|attributeName', 'animateTransform|attributeName', 'unknown|attributeName', 'iframe|sandbox', 'iframe|allow', 'iframe|allowFullscreen', 'iframe|referrerPolicy', 'iframe|csp', 'iframe|fetchPriority', 'unknown|sandbox', 'unknown|allow', 'unknown|allowFullscreen', 'unknown|referrerPolicy', 'unknown|csp', 'unknown|fetchPriority']);
17049
17156
  }
17050
17157
  return _SECURITY_SCHEMA;
@@ -19143,6 +19250,16 @@ function transformLiteralArray(expr) {
19143
19250
  const derivedEntries = [];
19144
19251
  const nonConstantArgs = [];
19145
19252
  for (const entry of expr.entries) {
19253
+ if (entry instanceof SpreadElementExpr) {
19254
+ if (entry.expression.isConstant()) {
19255
+ derivedEntries.push(entry);
19256
+ } else {
19257
+ const idx = nonConstantArgs.length;
19258
+ nonConstantArgs.push(entry.expression);
19259
+ derivedEntries.push(new SpreadElementExpr(new PureFunctionParameterExpr(idx)));
19260
+ }
19261
+ continue;
19262
+ }
19146
19263
  if (entry.isConstant()) {
19147
19264
  derivedEntries.push(entry);
19148
19265
  } else {
@@ -19157,15 +19274,25 @@ function transformLiteralMap(expr) {
19157
19274
  let derivedEntries = [];
19158
19275
  const nonConstantArgs = [];
19159
19276
  for (const entry of expr.entries) {
19277
+ if (entry instanceof LiteralMapSpreadAssignment) {
19278
+ if (entry.expression.isConstant()) {
19279
+ derivedEntries.push(entry);
19280
+ } else {
19281
+ const idx = nonConstantArgs.length;
19282
+ nonConstantArgs.push(entry.expression);
19283
+ derivedEntries.push(new LiteralMapSpreadAssignment(new PureFunctionParameterExpr(idx)));
19284
+ }
19285
+ continue;
19286
+ }
19160
19287
  if (entry.value.isConstant()) {
19161
19288
  derivedEntries.push(entry);
19162
19289
  } else {
19163
19290
  const idx = nonConstantArgs.length;
19164
19291
  nonConstantArgs.push(entry.value);
19165
- derivedEntries.push(new LiteralMapEntry(entry.key, new PureFunctionParameterExpr(idx), entry.quoted));
19292
+ derivedEntries.push(new LiteralMapPropertyAssignment(entry.key, new PureFunctionParameterExpr(idx), entry.quoted));
19166
19293
  }
19167
19294
  }
19168
- return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
19295
+ return new PureFunctionExpr(new LiteralMapExpr(derivedEntries), nonConstantArgs);
19169
19296
  }
19170
19297
 
19171
19298
  function optimizeRegularExpressions(job) {
@@ -19446,13 +19573,14 @@ function ariaProperty(name, expression, sourceSpan) {
19446
19573
  function property(name, expression, sanitizer, sourceSpan) {
19447
19574
  return propertyBase(Identifiers.property, name, expression, sanitizer, sourceSpan);
19448
19575
  }
19449
- function control(expression, sanitizer, sourceSpan) {
19576
+ function control(name, expression, sanitizer, sourceSpan) {
19450
19577
  const args = [];
19451
19578
  if (expression instanceof Interpolation) {
19452
19579
  args.push(interpolationToExpression(expression, sourceSpan));
19453
19580
  } else {
19454
19581
  args.push(expression);
19455
19582
  }
19583
+ args.push(literal(name));
19456
19584
  if (sanitizer !== null) {
19457
19585
  args.push(sanitizer);
19458
19586
  }
@@ -19547,7 +19675,7 @@ function pipeBindV(slot, varOffset, args) {
19547
19675
  }
19548
19676
  function textInterpolate(strings, expressions, sourceSpan) {
19549
19677
  const interpolationArgs = collateInterpolationArgs(strings, expressions);
19550
- return callVariadicInstruction(TEXT_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);
19678
+ return callVariadicInstruction(TEXT_INTERPOLATE_CONFIG, [], interpolationArgs, sourceSpan);
19551
19679
  }
19552
19680
  function i18nExp(expr, sourceSpan) {
19553
19681
  return call(Identifiers.i18nExp, [expr], sourceSpan);
@@ -19584,7 +19712,7 @@ function syntheticHostProperty(name, expression, sourceSpan) {
19584
19712
  return call(Identifiers.syntheticHostProperty, [literal(name), expression], sourceSpan);
19585
19713
  }
19586
19714
  function pureFunction(varOffset, fn, args) {
19587
- return callVariadicInstructionExpr(PURE_FUNCTION_CONFIG, [literal(varOffset), fn], args, [], null);
19715
+ return callVariadicInstructionExpr(PURE_FUNCTION_CONFIG, [literal(varOffset), fn], args, null);
19588
19716
  }
19589
19717
  function attachSourceLocation(templatePath, locations) {
19590
19718
  return call(Identifiers.attachSourceLocations, [literal(templatePath), locations], null);
@@ -19607,7 +19735,7 @@ function collateInterpolationArgs(strings, expressions) {
19607
19735
  }
19608
19736
  function interpolationToExpression(interpolation, sourceSpan) {
19609
19737
  const interpolationArgs = collateInterpolationArgs(interpolation.strings, interpolation.expressions);
19610
- return callVariadicInstructionExpr(VALUE_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);
19738
+ return callVariadicInstructionExpr(VALUE_INTERPOLATE_CONFIG, [], interpolationArgs, sourceSpan);
19611
19739
  }
19612
19740
  function call(instruction, args, sourceSpan) {
19613
19741
  const expr = importExpr(instruction).callFn(args, sourceSpan);
@@ -19645,22 +19773,22 @@ const PURE_FUNCTION_CONFIG = {
19645
19773
  variable: Identifiers.pureFunctionV,
19646
19774
  mapping: n => n
19647
19775
  };
19648
- function callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan) {
19776
+ function callVariadicInstructionExpr(config, baseArgs, interpolationArgs, sourceSpan) {
19649
19777
  const n = config.mapping(interpolationArgs.length);
19650
19778
  const lastInterpolationArg = interpolationArgs.at(-1);
19651
- if (extraArgs.length === 0 && interpolationArgs.length > 1 && lastInterpolationArg instanceof LiteralExpr && lastInterpolationArg.value === '') {
19779
+ if (interpolationArgs.length > 1 && lastInterpolationArg instanceof LiteralExpr && lastInterpolationArg.value === '') {
19652
19780
  interpolationArgs.pop();
19653
19781
  }
19654
19782
  if (n < config.constant.length) {
19655
- return importExpr(config.constant[n]).callFn([...baseArgs, ...interpolationArgs, ...extraArgs], sourceSpan);
19783
+ return importExpr(config.constant[n]).callFn([...baseArgs, ...interpolationArgs], sourceSpan);
19656
19784
  } else if (config.variable !== null) {
19657
- return importExpr(config.variable).callFn([...baseArgs, literalArr(interpolationArgs), ...extraArgs], sourceSpan);
19785
+ return importExpr(config.variable).callFn([...baseArgs, literalArr(interpolationArgs)], sourceSpan);
19658
19786
  } else {
19659
19787
  throw new Error(`AssertionError: unable to call variadic function`);
19660
19788
  }
19661
19789
  }
19662
- function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs, sourceSpan) {
19663
- return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
19790
+ function callVariadicInstruction(config, baseArgs, interpolationArgs, sourceSpan) {
19791
+ return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, sourceSpan).toStmt());
19664
19792
  }
19665
19793
 
19666
19794
  const GLOBAL_TARGET_RESOLVERS = new Map([['window', Identifiers.resolveWindow], ['document', Identifiers.resolveDocument], ['body', Identifiers.resolveBody]]);
@@ -20003,7 +20131,7 @@ function reifyProperty(op) {
20003
20131
  return isAriaAttribute(op.name) ? ariaProperty(op.name, op.expression, op.sourceSpan) : property(op.name, op.expression, op.sanitizer, op.sourceSpan);
20004
20132
  }
20005
20133
  function reifyControl(op) {
20006
- return control(op.expression, op.sanitizer, op.sourceSpan);
20134
+ return control(op.name, op.expression, op.sanitizer, op.sourceSpan);
20007
20135
  }
20008
20136
  function reifyIrExpression(expr) {
20009
20137
  if (!isIrExpression(expr)) {
@@ -21800,7 +21928,7 @@ function ingestElement(unit, element) {
21800
21928
  ingestNodes(unit, element.children);
21801
21929
  const endOp = createElementEndOp(id, element.endSourceSpan ?? element.startSourceSpan);
21802
21930
  unit.create.push(endOp);
21803
- const fieldInput = element.inputs.find(input => input.name === 'field' && input.type === BindingType.Property);
21931
+ const fieldInput = element.inputs.find(input => (input.name === 'field' || input.name === 'formField') && input.type === BindingType.Property);
21804
21932
  if (fieldInput) {
21805
21933
  unit.create.push(createControlCreateOp(fieldInput.sourceSpan));
21806
21934
  }
@@ -21910,32 +22038,34 @@ function ingestIfBlock(unit, ifBlock) {
21910
22038
  unit.update.push(createConditionalOp(firstXref, null, conditions, ifBlock.sourceSpan));
21911
22039
  }
21912
22040
  function ingestSwitchBlock(unit, switchBlock) {
21913
- if (switchBlock.cases.length === 0) {
22041
+ if (switchBlock.groups.length === 0) {
21914
22042
  return;
21915
22043
  }
21916
22044
  let firstXref = null;
21917
22045
  let conditions = [];
21918
- for (let i = 0; i < switchBlock.cases.length; i++) {
21919
- const switchCase = switchBlock.cases[i];
22046
+ for (let i = 0; i < switchBlock.groups.length; i++) {
22047
+ const switchCaseGroup = switchBlock.groups[i];
21920
22048
  const cView = unit.job.allocateView(unit.xref);
21921
- const tagName = ingestControlFlowInsertionPoint(unit, cView.xref, switchCase);
22049
+ const tagName = ingestControlFlowInsertionPoint(unit, cView.xref, switchCaseGroup);
21922
22050
  let switchCaseI18nMeta = undefined;
21923
- if (switchCase.i18n !== undefined) {
21924
- if (!(switchCase.i18n instanceof BlockPlaceholder)) {
21925
- throw Error(`Unhandled i18n metadata type for switch block: ${switchCase.i18n?.constructor.name}`);
22051
+ if (switchCaseGroup.i18n !== undefined) {
22052
+ if (!(switchCaseGroup.i18n instanceof BlockPlaceholder)) {
22053
+ throw Error(`Unhandled i18n metadata type for switch block: ${switchCaseGroup.i18n?.constructor.name}`);
21926
22054
  }
21927
- switchCaseI18nMeta = switchCase.i18n;
22055
+ switchCaseI18nMeta = switchCaseGroup.i18n;
21928
22056
  }
21929
22057
  const createOp = i === 0 ? createConditionalCreateOp : createConditionalBranchCreateOp;
21930
- const conditionalCreateOp = createOp(cView.xref, TemplateKind.Block, tagName, 'Case', Namespace.HTML, switchCaseI18nMeta, switchCase.startSourceSpan, switchCase.sourceSpan);
22058
+ const conditionalCreateOp = createOp(cView.xref, TemplateKind.Block, tagName, 'Case', Namespace.HTML, switchCaseI18nMeta, switchCaseGroup.startSourceSpan, switchCaseGroup.sourceSpan);
21931
22059
  unit.create.push(conditionalCreateOp);
21932
22060
  if (firstXref === null) {
21933
22061
  firstXref = cView.xref;
21934
22062
  }
21935
- const caseExpr = switchCase.expression ? convertAst(switchCase.expression, unit.job, switchBlock.startSourceSpan) : null;
21936
- const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, conditionalCreateOp.xref, conditionalCreateOp.handle);
21937
- conditions.push(conditionalCaseExpr);
21938
- ingestNodes(cView, switchCase.children);
22063
+ for (const switchCase of switchCaseGroup.cases) {
22064
+ const caseExpr = switchCase.expression ? convertAst(switchCase.expression, unit.job, switchBlock.startSourceSpan) : null;
22065
+ const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, conditionalCreateOp.xref, conditionalCreateOp.handle);
22066
+ conditions.push(conditionalCaseExpr);
22067
+ }
22068
+ ingestNodes(cView, switchCaseGroup.children);
21939
22069
  }
21940
22070
  unit.update.push(createConditionalOp(firstXref, convertAst(switchBlock.expression, unit.job, null), conditions, switchBlock.sourceSpan));
21941
22071
  }
@@ -22161,8 +22291,7 @@ function convertAst(ast, job, baseSourceSpan) {
22161
22291
  if (ast instanceof ASTWithSource) {
22162
22292
  return convertAst(ast.ast, job, baseSourceSpan);
22163
22293
  } else if (ast instanceof PropertyRead) {
22164
- const isImplicitReceiver = ast.receiver instanceof ImplicitReceiver && !(ast.receiver instanceof ThisReceiver);
22165
- if (isImplicitReceiver) {
22294
+ if (ast.receiver instanceof ImplicitReceiver) {
22166
22295
  return new LexicalReadExpr(ast.name);
22167
22296
  } else {
22168
22297
  return new ReadPropExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.name, null, convertSourceSpan(ast.span, baseSourceSpan));
@@ -22198,8 +22327,8 @@ function convertAst(ast, job, baseSourceSpan) {
22198
22327
  throw new Error(`AssertionError: Chain in unknown context`);
22199
22328
  } else if (ast instanceof LiteralMap) {
22200
22329
  const entries = ast.keys.map((key, idx) => {
22201
- const value = ast.values[idx];
22202
- return new LiteralMapEntry(key.key, convertAst(value, job, baseSourceSpan), key.quoted);
22330
+ const value = convertAst(ast.values[idx], job, baseSourceSpan);
22331
+ return key.kind === 'spread' ? new LiteralMapSpreadAssignment(value) : new LiteralMapPropertyAssignment(key.key, value, key.quoted);
22203
22332
  });
22204
22333
  return new LiteralMapExpr(entries, undefined, convertSourceSpan(ast.span, baseSourceSpan));
22205
22334
  } else if (ast instanceof LiteralArray) {
@@ -22232,6 +22361,8 @@ function convertAst(ast, job, baseSourceSpan) {
22232
22361
  return new ParenthesizedExpr(convertAst(ast.expression, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));
22233
22362
  } else if (ast instanceof RegularExpressionLiteral) {
22234
22363
  return new RegularExpressionLiteralExpr(ast.body, ast.flags, baseSourceSpan);
22364
+ } else if (ast instanceof SpreadElement) {
22365
+ return new SpreadElementExpr(convertAst(ast.expression, job, baseSourceSpan));
22235
22366
  } else {
22236
22367
  throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan?.start.file.url}"`);
22237
22368
  }
@@ -22931,7 +23062,7 @@ class BindingParser {
22931
23062
  if (ast instanceof NonNullAssert) {
22932
23063
  return this._isAllowedAssignmentEvent(ast.expression);
22933
23064
  }
22934
- if (ast instanceof Call && ast.args.length === 1 && ast.receiver instanceof PropertyRead && ast.receiver.name === '$any' && ast.receiver.receiver instanceof ImplicitReceiver && !(ast.receiver.receiver instanceof ThisReceiver)) {
23065
+ if (ast instanceof Call && ast.args.length === 1 && ast.receiver instanceof PropertyRead && ast.receiver.name === '$any' && ast.receiver.receiver instanceof ImplicitReceiver) {
22935
23066
  return this._isAllowedAssignmentEvent(ast.args[0]);
22936
23067
  }
22937
23068
  if (ast instanceof PropertyRead || ast instanceof KeyedRead) {
@@ -23141,9 +23272,10 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
23141
23272
  function createSwitchBlock(ast, visitor, bindingParser) {
23142
23273
  const errors = validateSwitchBlock(ast);
23143
23274
  const primaryExpression = ast.parameters.length > 0 ? parseBlockParameterToBinding(ast.parameters[0], bindingParser) : bindingParser.parseBinding('', false, ast.sourceSpan, 0);
23144
- const cases = [];
23275
+ const groups = [];
23145
23276
  const unknownBlocks = [];
23146
- let defaultCase = null;
23277
+ let collectedCases = [];
23278
+ let firstCaseStart = null;
23147
23279
  for (const node of ast.children) {
23148
23280
  if (!(node instanceof Block)) {
23149
23281
  continue;
@@ -23152,19 +23284,34 @@ function createSwitchBlock(ast, visitor, bindingParser) {
23152
23284
  unknownBlocks.push(new UnknownBlock(node.name, node.sourceSpan, node.nameSpan));
23153
23285
  continue;
23154
23286
  }
23155
- const expression = node.name === 'case' ? parseBlockParameterToBinding(node.parameters[0], bindingParser) : null;
23156
- const ast = new SwitchBlockCase(expression, visitAll(visitor, node.children, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.nameSpan, node.i18n);
23157
- if (expression === null) {
23158
- defaultCase = ast;
23159
- } else {
23160
- cases.push(ast);
23287
+ const isCase = node.name === 'case';
23288
+ let expression = null;
23289
+ if (isCase) {
23290
+ expression = parseBlockParameterToBinding(node.parameters[0], bindingParser);
23161
23291
  }
23292
+ const switchCase = new SwitchBlockCase(expression, node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.nameSpan);
23293
+ collectedCases.push(switchCase);
23294
+ const caseWithoutBody = node.children.length === 0 && node.endSourceSpan !== null && node.endSourceSpan.start.offset === node.endSourceSpan.end.offset;
23295
+ if (caseWithoutBody) {
23296
+ if (firstCaseStart === null) {
23297
+ firstCaseStart = node.sourceSpan;
23298
+ }
23299
+ continue;
23300
+ }
23301
+ let sourceSpan = node.sourceSpan;
23302
+ let startSourceSpan = node.startSourceSpan;
23303
+ if (firstCaseStart !== null) {
23304
+ sourceSpan = new ParseSourceSpan(firstCaseStart.start, node.sourceSpan.end);
23305
+ startSourceSpan = new ParseSourceSpan(firstCaseStart.start, node.startSourceSpan.end);
23306
+ firstCaseStart = null;
23307
+ }
23308
+ const group = new SwitchBlockCaseGroup(collectedCases, visitAll(visitor, node.children, node.children), sourceSpan, startSourceSpan, node.endSourceSpan, node.nameSpan, node.i18n);
23309
+ groups.push(group);
23310
+ collectedCases = [];
23162
23311
  }
23163
- if (defaultCase !== null) {
23164
- cases.push(defaultCase);
23165
- }
23312
+ const node = new SwitchBlock(primaryExpression, groups, unknownBlocks, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan);
23166
23313
  return {
23167
- node: new SwitchBlock(primaryExpression, cases, unknownBlocks, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan),
23314
+ node,
23168
23315
  errors
23169
23316
  };
23170
23317
  }
@@ -23684,17 +23831,19 @@ function createViewportTrigger(start, isHydrationTrigger, bindingParser, paramet
23684
23831
  const parsed = bindingParser.parseBinding(parameters[0].expression, false, sourceSpan, sourceSpan.start.offset + start + parameters[0].start);
23685
23832
  if (!(parsed.ast instanceof LiteralMap)) {
23686
23833
  throw new Error('Options parameter of the "viewport" trigger must be an object literal');
23687
- } else if (parsed.ast.keys.some(key => key.key === 'root')) {
23834
+ } else if (parsed.ast.keys.some(key => key.kind === 'spread')) {
23835
+ throw new Error('Spread operator are not allowed in this context');
23836
+ } else if (parsed.ast.keys.some(key => key.kind === 'property' && key.key === 'root')) {
23688
23837
  throw new Error('The "root" option is not supported in the options parameter of the "viewport" trigger');
23689
23838
  }
23690
- const triggerIndex = parsed.ast.keys.findIndex(key => key.key === 'trigger');
23839
+ const triggerIndex = parsed.ast.keys.findIndex(key => key.kind === 'property' && key.key === 'trigger');
23691
23840
  if (triggerIndex === -1) {
23692
23841
  reference = null;
23693
23842
  options = parsed.ast;
23694
23843
  } else {
23695
23844
  const value = parsed.ast.values[triggerIndex];
23696
23845
  const triggerFilter = (_, index) => index !== triggerIndex;
23697
- if (!(value instanceof PropertyRead) || !(value.receiver instanceof ImplicitReceiver) || value.receiver instanceof ThisReceiver) {
23846
+ if (!(value instanceof PropertyRead) || !(value.receiver instanceof ImplicitReceiver)) {
23698
23847
  throw new Error(`"trigger" option of the "viewport" trigger must be an identifier`);
23699
23848
  }
23700
23849
  reference = value.name;
@@ -25099,10 +25248,13 @@ class CombinedRecursiveAstVisitor extends RecursiveAstVisitor {
25099
25248
  }
25100
25249
  visitSwitchBlock(block) {
25101
25250
  this.visit(block.expression);
25102
- this.visitAllTemplateNodes(block.cases);
25251
+ this.visitAllTemplateNodes(block.groups);
25103
25252
  }
25104
25253
  visitSwitchBlockCase(block) {
25105
25254
  block.expression && this.visit(block.expression);
25255
+ }
25256
+ visitSwitchBlockCaseGroup(block) {
25257
+ this.visitAllTemplateNodes(block.cases);
25106
25258
  this.visitAllTemplateNodes(block.children);
25107
25259
  }
25108
25260
  visitForLoopBlock(block) {
@@ -25261,7 +25413,7 @@ class Scope {
25261
25413
  this.visitVariable(nodeOrNodes.item);
25262
25414
  nodeOrNodes.contextVariables.forEach(v => this.visitVariable(v));
25263
25415
  nodeOrNodes.children.forEach(node => node.visit(this));
25264
- } else if (nodeOrNodes instanceof SwitchBlockCase || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlock || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading || nodeOrNodes instanceof Content) {
25416
+ } else if (nodeOrNodes instanceof SwitchBlockCaseGroup || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlock || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading || nodeOrNodes instanceof Content) {
25265
25417
  nodeOrNodes.children.forEach(node => node.visit(this));
25266
25418
  } else if (!(nodeOrNodes instanceof HostElement)) {
25267
25419
  nodeOrNodes.forEach(node => node.visit(this));
@@ -25297,9 +25449,10 @@ class Scope {
25297
25449
  this.ingestScopedNode(block);
25298
25450
  }
25299
25451
  visitSwitchBlock(block) {
25300
- block.cases.forEach(node => node.visit(this));
25452
+ block.groups.forEach(node => node.visit(this));
25301
25453
  }
25302
- visitSwitchBlockCase(block) {
25454
+ visitSwitchBlockCase(block) {}
25455
+ visitSwitchBlockCaseGroup(block) {
25303
25456
  this.ingestScopedNode(block);
25304
25457
  }
25305
25458
  visitForLoopBlock(block) {
@@ -25416,9 +25569,10 @@ class DirectiveBinder {
25416
25569
  block.children.forEach(child => child.visit(this));
25417
25570
  }
25418
25571
  visitSwitchBlock(block) {
25419
- block.cases.forEach(node => node.visit(this));
25572
+ block.groups.forEach(node => node.visit(this));
25420
25573
  }
25421
- visitSwitchBlockCase(block) {
25574
+ visitSwitchBlockCase(block) {}
25575
+ visitSwitchBlockCaseGroup(block) {
25422
25576
  block.children.forEach(node => node.visit(this));
25423
25577
  }
25424
25578
  visitForLoopBlock(block) {
@@ -25604,7 +25758,7 @@ class TemplateBinder extends CombinedRecursiveAstVisitor {
25604
25758
  this.deferBlocks.push([nodeOrNodes, this.scope]);
25605
25759
  nodeOrNodes.children.forEach(node => node.visit(this));
25606
25760
  this.nestingLevel.set(nodeOrNodes, this.level);
25607
- } else if (nodeOrNodes instanceof SwitchBlockCase || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading || nodeOrNodes instanceof Content) {
25761
+ } else if (nodeOrNodes instanceof SwitchBlockCaseGroup || nodeOrNodes instanceof ForLoopBlockEmpty || nodeOrNodes instanceof DeferredBlockError || nodeOrNodes instanceof DeferredBlockPlaceholder || nodeOrNodes instanceof DeferredBlockLoading || nodeOrNodes instanceof Content) {
25608
25762
  nodeOrNodes.children.forEach(node => node.visit(this));
25609
25763
  this.nestingLevel.set(nodeOrNodes, this.level);
25610
25764
  } else if (nodeOrNodes instanceof HostElement) {
@@ -25652,6 +25806,9 @@ class TemplateBinder extends CombinedRecursiveAstVisitor {
25652
25806
  }
25653
25807
  visitSwitchBlockCase(block) {
25654
25808
  block.expression?.visit(this);
25809
+ }
25810
+ visitSwitchBlockCaseGroup(block) {
25811
+ block.cases.forEach(caseNode => caseNode.visit(this));
25655
25812
  this.ingestScopedNode(block);
25656
25813
  }
25657
25814
  visitForLoopBlock(block) {
@@ -25696,7 +25853,7 @@ class TemplateBinder extends CombinedRecursiveAstVisitor {
25696
25853
  binder.ingest(node);
25697
25854
  }
25698
25855
  maybeMap(ast, name) {
25699
- if (!(ast.receiver instanceof ImplicitReceiver) || ast.receiver instanceof ThisReceiver) {
25856
+ if (!(ast.receiver instanceof ImplicitReceiver)) {
25700
25857
  return;
25701
25858
  }
25702
25859
  const target = this.scope.lookup(name);
@@ -28046,7 +28203,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
28046
28203
  function compileDeclareClassMetadata(metadata) {
28047
28204
  const definitionMap = new DefinitionMap();
28048
28205
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
28049
- definitionMap.set('version', literal('21.1.0-next.3'));
28206
+ definitionMap.set('version', literal('21.1.0-rc.0'));
28050
28207
  definitionMap.set('ngImport', importExpr(Identifiers.core));
28051
28208
  definitionMap.set('type', metadata.type);
28052
28209
  definitionMap.set('decorators', metadata.decorators);
@@ -28064,7 +28221,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
28064
28221
  callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
28065
28222
  callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
28066
28223
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
28067
- definitionMap.set('version', literal('21.1.0-next.3'));
28224
+ definitionMap.set('version', literal('21.1.0-rc.0'));
28068
28225
  definitionMap.set('ngImport', importExpr(Identifiers.core));
28069
28226
  definitionMap.set('type', metadata.type);
28070
28227
  definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -28137,7 +28294,7 @@ function createDirectiveDefinitionMap(meta) {
28137
28294
  const definitionMap = new DefinitionMap();
28138
28295
  const minVersion = getMinimumVersionForPartialOutput(meta);
28139
28296
  definitionMap.set('minVersion', literal(minVersion));
28140
- definitionMap.set('version', literal('21.1.0-next.3'));
28297
+ definitionMap.set('version', literal('21.1.0-rc.0'));
28141
28298
  definitionMap.set('type', meta.type.value);
28142
28299
  if (meta.isStandalone !== undefined) {
28143
28300
  definitionMap.set('isStandalone', literal(meta.isStandalone));
@@ -28463,13 +28620,16 @@ class BlockPresenceVisitor extends RecursiveVisitor$1 {
28463
28620
  visitSwitchBlockCase() {
28464
28621
  this.hasBlocks = true;
28465
28622
  }
28623
+ visitSwitchBlockCaseGroup() {
28624
+ this.hasBlocks = true;
28625
+ }
28466
28626
  }
28467
28627
 
28468
28628
  const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
28469
28629
  function compileDeclareFactoryFunction(meta) {
28470
28630
  const definitionMap = new DefinitionMap();
28471
28631
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
28472
- definitionMap.set('version', literal('21.1.0-next.3'));
28632
+ definitionMap.set('version', literal('21.1.0-rc.0'));
28473
28633
  definitionMap.set('ngImport', importExpr(Identifiers.core));
28474
28634
  definitionMap.set('type', meta.type.value);
28475
28635
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -28495,7 +28655,7 @@ function compileDeclareInjectableFromMetadata(meta) {
28495
28655
  function createInjectableDefinitionMap(meta) {
28496
28656
  const definitionMap = new DefinitionMap();
28497
28657
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
28498
- definitionMap.set('version', literal('21.1.0-next.3'));
28658
+ definitionMap.set('version', literal('21.1.0-rc.0'));
28499
28659
  definitionMap.set('ngImport', importExpr(Identifiers.core));
28500
28660
  definitionMap.set('type', meta.type.value);
28501
28661
  if (meta.providedIn !== undefined) {
@@ -28536,7 +28696,7 @@ function compileDeclareInjectorFromMetadata(meta) {
28536
28696
  function createInjectorDefinitionMap(meta) {
28537
28697
  const definitionMap = new DefinitionMap();
28538
28698
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
28539
- definitionMap.set('version', literal('21.1.0-next.3'));
28699
+ definitionMap.set('version', literal('21.1.0-rc.0'));
28540
28700
  definitionMap.set('ngImport', importExpr(Identifiers.core));
28541
28701
  definitionMap.set('type', meta.type.value);
28542
28702
  definitionMap.set('providers', meta.providers);
@@ -28563,7 +28723,7 @@ function createNgModuleDefinitionMap(meta) {
28563
28723
  throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
28564
28724
  }
28565
28725
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
28566
- definitionMap.set('version', literal('21.1.0-next.3'));
28726
+ definitionMap.set('version', literal('21.1.0-rc.0'));
28567
28727
  definitionMap.set('ngImport', importExpr(Identifiers.core));
28568
28728
  definitionMap.set('type', meta.type.value);
28569
28729
  if (meta.bootstrap.length > 0) {
@@ -28601,7 +28761,7 @@ function compileDeclarePipeFromMetadata(meta) {
28601
28761
  function createPipeDefinitionMap(meta) {
28602
28762
  const definitionMap = new DefinitionMap();
28603
28763
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
28604
- definitionMap.set('version', literal('21.1.0-next.3'));
28764
+ definitionMap.set('version', literal('21.1.0-rc.0'));
28605
28765
  definitionMap.set('ngImport', importExpr(Identifiers.core));
28606
28766
  definitionMap.set('type', meta.type.value);
28607
28767
  if (meta.isStandalone !== undefined) {
@@ -28675,9 +28835,9 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
28675
28835
  return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, null, StmtModifier.Final);
28676
28836
  }
28677
28837
 
28678
- const VERSION = new Version('21.1.0-next.3');
28838
+ const VERSION = new Version('21.1.0-rc.0');
28679
28839
 
28680
28840
  publishFacade(_global);
28681
28841
 
28682
- export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, ArrowFunctionExpr, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BindingPipeType, BindingType, Block, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CombinedRecursiveAstVisitor, CommaExpr, Comment, CompilerConfig, CompilerFacadeImpl, Component, Conditional, ConditionalExpr, ConstantPool, CssSelector, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, Directive, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr$1 as EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation$1 as Interpolation, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, LeadingComment, LetDeclaration, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParenthesizedExpr, ParenthesizedExpression, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser, PrefixNot, PropertyRead, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, RegularExpressionLiteral, RegularExpressionLiteralExpr, ResourceLoader, ReturnStatement, SCHEMA, SECURITY_SCHEMA, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, SelectorlessMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, StringToken, StringTokenKind, TagContentType, TaggedTemplateLiteral, TaggedTemplateLiteralExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, TemplateLiteralElementExpr, TemplateLiteralExpr, Text, ThisReceiver, BlockNode as TmplAstBlockNode, BoundAttribute as TmplAstBoundAttribute, BoundDeferredTrigger as TmplAstBoundDeferredTrigger, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Component$1 as TmplAstComponent, Content as TmplAstContent, DeferredBlock as TmplAstDeferredBlock, DeferredBlockError as TmplAstDeferredBlockError, DeferredBlockLoading as TmplAstDeferredBlockLoading, DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, DeferredTrigger as TmplAstDeferredTrigger, Directive$1 as TmplAstDirective, Element$1 as TmplAstElement, ForLoopBlock as TmplAstForLoopBlock, ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, HostElement as TmplAstHostElement, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu$1 as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, IfBlock as TmplAstIfBlock, IfBlockBranch as TmplAstIfBlockBranch, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, LetDeclaration$1 as TmplAstLetDeclaration, NeverDeferredTrigger as TmplAstNeverDeferredTrigger, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, SwitchBlock as TmplAstSwitchBlock, SwitchBlockCase as TmplAstSwitchBlockCase, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, UnknownBlock as TmplAstUnknownBlock, Variable as TmplAstVariable, ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, Token, TokenType, TransplantedType, TreeError, Type, TypeModifier, TypeofExpr, TypeofExpression, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation$1 as ViewEncapsulation, VoidExpr, VoidExpression, WrappedNodeExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ATTR_TO_PROP, compileClassDebugInfo, compileClassMetadata, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDeferResolverFunction, compileDirectiveFromMetadata, compileFactoryFunction, compileHmrInitializer, compileHmrUpdateCallback, compileInjectable, compileInjector, compileNgModule, compileOpaqueAsyncClassMetadata, compilePipeFromMetadata, computeMsgId, core, createCssSelectorFromNode, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, encapsulateStyle, escapeRegExp, findMatchingDirectivesAndPipes, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literal, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, setEnableTemplateSourceLocations, splitNsName, visitAll$1 as tmplAstVisitAll, verifyHostBindings, visitAll };
28842
+ export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, ArrowFunctionExpr, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BindingPipeType, BindingType, Block, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CombinedRecursiveAstVisitor, CommaExpr, Comment, CompilerConfig, CompilerFacadeImpl, Component, Conditional, ConditionalExpr, ConstantPool, CssSelector, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, Directive, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr$1 as EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation$1 as Interpolation, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, LeadingComment, LetDeclaration, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralMapPropertyAssignment, LiteralMapSpreadAssignment, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParenthesizedExpr, ParenthesizedExpression, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser, PrefixNot, PropertyRead, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, RegularExpressionLiteral, RegularExpressionLiteralExpr, ResourceLoader, ReturnStatement, SCHEMA, SECURITY_SCHEMA, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, SelectorlessMatcher, Serializer, SplitInterpolation, SpreadElement, SpreadElementExpr, Statement, StmtModifier, StringToken, StringTokenKind, TagContentType, TaggedTemplateLiteral, TaggedTemplateLiteralExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, TemplateLiteralElementExpr, TemplateLiteralExpr, Text, ThisReceiver, BlockNode as TmplAstBlockNode, BoundAttribute as TmplAstBoundAttribute, BoundDeferredTrigger as TmplAstBoundDeferredTrigger, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Component$1 as TmplAstComponent, Content as TmplAstContent, DeferredBlock as TmplAstDeferredBlock, DeferredBlockError as TmplAstDeferredBlockError, DeferredBlockLoading as TmplAstDeferredBlockLoading, DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, DeferredTrigger as TmplAstDeferredTrigger, Directive$1 as TmplAstDirective, Element$1 as TmplAstElement, ForLoopBlock as TmplAstForLoopBlock, ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, HostElement as TmplAstHostElement, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu$1 as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, IfBlock as TmplAstIfBlock, IfBlockBranch as TmplAstIfBlockBranch, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, LetDeclaration$1 as TmplAstLetDeclaration, NeverDeferredTrigger as TmplAstNeverDeferredTrigger, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, SwitchBlock as TmplAstSwitchBlock, SwitchBlockCase as TmplAstSwitchBlockCase, SwitchBlockCaseGroup as TmplAstSwitchBlockCaseGroup, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, UnknownBlock as TmplAstUnknownBlock, Variable as TmplAstVariable, ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, Token, TokenType, TransplantedType, TreeError, Type, TypeModifier, TypeofExpr, TypeofExpression, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation$1 as ViewEncapsulation, VoidExpr, VoidExpression, WrappedNodeExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ATTR_TO_PROP, compileClassDebugInfo, compileClassMetadata, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDeferResolverFunction, compileDirectiveFromMetadata, compileFactoryFunction, compileHmrInitializer, compileHmrUpdateCallback, compileInjectable, compileInjector, compileNgModule, compileOpaqueAsyncClassMetadata, compilePipeFromMetadata, computeMsgId, core, createCssSelectorFromNode, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, encapsulateStyle, escapeRegExp, findMatchingDirectivesAndPipes, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literal, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, setEnableTemplateSourceLocations, splitNsName, visitAll$1 as tmplAstVisitAll, verifyHostBindings, visitAll };
28683
28843
  //# sourceMappingURL=compiler.mjs.map