@angular/compiler 21.0.0-next.4 → 21.0.0-next.6

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,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.0.0-next.4
2
+ * @license Angular v21.0.0-next.6
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1237,6 +1237,27 @@ class InstantiateExpr extends Expression {
1237
1237
  return new InstantiateExpr(this.classExpr.clone(), this.args.map((arg) => arg.clone()), this.type, this.sourceSpan);
1238
1238
  }
1239
1239
  }
1240
+ let RegularExpressionLiteral$1 = class RegularExpressionLiteral extends Expression {
1241
+ body;
1242
+ flags;
1243
+ constructor(body, flags, sourceSpan) {
1244
+ super(null, sourceSpan);
1245
+ this.body = body;
1246
+ this.flags = flags;
1247
+ }
1248
+ isEquivalent(e) {
1249
+ return e instanceof RegularExpressionLiteral && this.body === e.body && this.flags === e.flags;
1250
+ }
1251
+ isConstant() {
1252
+ return true;
1253
+ }
1254
+ visitExpression(visitor, context) {
1255
+ return visitor.visitRegularExpressionLiteral(this, context);
1256
+ }
1257
+ clone() {
1258
+ return new RegularExpressionLiteral(this.body, this.flags, this.sourceSpan);
1259
+ }
1260
+ };
1240
1261
  class LiteralExpr extends Expression {
1241
1262
  value;
1242
1263
  constructor(value, type, sourceSpan) {
@@ -2030,6 +2051,9 @@ let RecursiveAstVisitor$1 = class RecursiveAstVisitor {
2030
2051
  visitLiteralExpr(ast, context) {
2031
2052
  return this.visitExpression(ast, context);
2032
2053
  }
2054
+ visitRegularExpressionLiteral(ast, context) {
2055
+ return this.visitExpression(ast, context);
2056
+ }
2033
2057
  visitLocalizedString(ast, context) {
2034
2058
  return this.visitExpression(ast, context);
2035
2059
  }
@@ -2290,6 +2314,7 @@ var output_ast = /*#__PURE__*/Object.freeze({
2290
2314
  ReadPropExpr: ReadPropExpr,
2291
2315
  ReadVarExpr: ReadVarExpr,
2292
2316
  RecursiveAstVisitor: RecursiveAstVisitor$1,
2317
+ RegularExpressionLiteral: RegularExpressionLiteral$1,
2293
2318
  ReturnStatement: ReturnStatement,
2294
2319
  STRING_TYPE: STRING_TYPE,
2295
2320
  Statement: Statement,
@@ -2565,6 +2590,9 @@ class GenericKeyFn {
2565
2590
  else if (expr instanceof LiteralExpr) {
2566
2591
  return String(expr.value);
2567
2592
  }
2593
+ else if (expr instanceof RegularExpressionLiteral$1) {
2594
+ return `/${expr.body}/${expr.flags ?? ''}`;
2595
+ }
2568
2596
  else if (expr instanceof LiteralArrayExpr) {
2569
2597
  const entries = [];
2570
2598
  for (const entry of expr.entries) {
@@ -3566,6 +3594,10 @@ class AbstractEmitterVisitor {
3566
3594
  }
3567
3595
  return null;
3568
3596
  }
3597
+ visitRegularExpressionLiteral(ast, ctx) {
3598
+ ctx.print(ast, `/${ast.body}/${ast.flags || ''}`);
3599
+ return null;
3600
+ }
3569
3601
  visitLocalizedString(ast, ctx) {
3570
3602
  const head = ast.serializeI18nHead();
3571
3603
  ctx.print(ast, '$localize `' + head.raw);
@@ -4374,6 +4406,18 @@ class ParenthesizedExpression extends AST {
4374
4406
  return visitor.visitParenthesizedExpression(this, context);
4375
4407
  }
4376
4408
  }
4409
+ class RegularExpressionLiteral extends AST {
4410
+ body;
4411
+ flags;
4412
+ constructor(span, sourceSpan, body, flags) {
4413
+ super(span, sourceSpan);
4414
+ this.body = body;
4415
+ this.flags = flags;
4416
+ }
4417
+ visit(visitor, context) {
4418
+ return visitor.visitRegularExpressionLiteral(this, context);
4419
+ }
4420
+ }
4377
4421
  /**
4378
4422
  * Records the absolute position of a text span in a source file, where `start` and `end` are the
4379
4423
  * starting and ending byte offsets, respectively, of the text span in a source file.
@@ -4534,6 +4578,7 @@ class RecursiveAstVisitor {
4534
4578
  visitParenthesizedExpression(ast, context) {
4535
4579
  this.visit(ast.expression, context);
4536
4580
  }
4581
+ visitRegularExpressionLiteral(ast, context) { }
4537
4582
  // This is not part of the AstVisitor interface, just a helper method
4538
4583
  visitAll(asts, context) {
4539
4584
  for (const ast of asts) {
@@ -6385,48 +6430,6 @@ function createFactoryFunction(type) {
6385
6430
  return arrowFn([t], type.prop('ɵfac').callFn([variable(t.name)]));
6386
6431
  }
6387
6432
 
6388
- const UNUSABLE_INTERPOLATION_REGEXPS = [
6389
- /@/, // control flow reserved symbol
6390
- /^\s*$/, // empty
6391
- /[<>]/, // html tag
6392
- /^[{}]$/, // i18n expansion
6393
- /&(#|[a-z])/i, // character reference,
6394
- /^\/\//, // comment
6395
- ];
6396
- function assertInterpolationSymbols(identifier, value) {
6397
- if (value != null && !(Array.isArray(value) && value.length == 2)) {
6398
- throw new Error(`Expected '${identifier}' to be an array, [start, end].`);
6399
- }
6400
- else if (value != null) {
6401
- const start = value[0];
6402
- const end = value[1];
6403
- // Check for unusable interpolation symbols
6404
- UNUSABLE_INTERPOLATION_REGEXPS.forEach((regexp) => {
6405
- if (regexp.test(start) || regexp.test(end)) {
6406
- throw new Error(`['${start}', '${end}'] contains unusable interpolation symbol.`);
6407
- }
6408
- });
6409
- }
6410
- }
6411
-
6412
- class InterpolationConfig {
6413
- start;
6414
- end;
6415
- static fromArray(markers) {
6416
- if (!markers) {
6417
- return DEFAULT_INTERPOLATION_CONFIG;
6418
- }
6419
- assertInterpolationSymbols('interpolation', markers);
6420
- return new InterpolationConfig(markers[0], markers[1]);
6421
- }
6422
- constructor(start, end) {
6423
- this.start = start;
6424
- this.end = end;
6425
- }
6426
- }
6427
- const DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}');
6428
- const DEFAULT_CONTAINER_BLOCKS = new Set(['switch']);
6429
-
6430
6433
  const $EOF = 0;
6431
6434
  const $BSPACE = 8;
6432
6435
  const $TAB = 9;
@@ -10449,7 +10452,8 @@ function transformExpressionsInExpression(expr, transform, flags) {
10449
10452
  }
10450
10453
  else if (expr instanceof ReadVarExpr ||
10451
10454
  expr instanceof ExternalExpr ||
10452
- expr instanceof LiteralExpr) ;
10455
+ expr instanceof LiteralExpr ||
10456
+ expr instanceof RegularExpressionLiteral$1) ;
10453
10457
  else {
10454
10458
  throw new Error(`Unhandled expression kind: ${expr.constructor.name}`);
10455
10459
  }
@@ -11827,6 +11831,16 @@ function extractAttributeOp(unit, op, elements) {
11827
11831
  }
11828
11832
  }
11829
11833
 
11834
+ const ARIA_PREFIX = 'aria-';
11835
+ /**
11836
+ * Returns whether `name` is an ARIA attribute name.
11837
+ *
11838
+ * This is a heuristic based on whether name begins with and is longer than `aria-`.
11839
+ */
11840
+ function isAriaAttribute(name) {
11841
+ return name.startsWith(ARIA_PREFIX) && name.length > ARIA_PREFIX.length;
11842
+ }
11843
+
11830
11844
  /**
11831
11845
  * Looks up an element in the given map by xref ID.
11832
11846
  */
@@ -11872,7 +11886,15 @@ function specializeBindings(job) {
11872
11886
  break;
11873
11887
  case BindingKind.Property:
11874
11888
  case BindingKind.LegacyAnimation:
11875
- if (job.kind === CompilationJobKind.Host) {
11889
+ // Convert a property binding targeting an ARIA attribute (e.g. [aria-label]) into an
11890
+ // attribute binding when we know it can't also target an input. Note that a `Host` job is
11891
+ // always `DomOnly`, so this condition must be checked first.
11892
+ if (job.mode === TemplateCompilationMode.DomOnly && isAriaAttribute(op.name)) {
11893
+ OpList.replace(op, createAttributeOp(op.target,
11894
+ /* namespace= */ null, op.name, op.expression, op.securityContext,
11895
+ /* isTextAttribute= */ false, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
11896
+ }
11897
+ else if (job.kind === CompilationJobKind.Host) {
11876
11898
  OpList.replace(op, createDomPropertyOp(op.name, op.expression, op.bindingKind, op.i18nContext, op.securityContext, op.sourceSpan));
11877
11899
  }
11878
11900
  else {
@@ -15989,12 +16011,15 @@ const SUPPORTED_BLOCKS = [
15989
16011
  '@loading',
15990
16012
  '@error',
15991
16013
  ];
16014
+ const INTERPOLATION = {
16015
+ start: '{{',
16016
+ end: '}}',
16017
+ };
15992
16018
  // See https://www.w3.org/TR/html51/syntax.html#writing-html-documents
15993
16019
  class _Tokenizer {
15994
16020
  _getTagDefinition;
15995
16021
  _cursor;
15996
16022
  _tokenizeIcu;
15997
- _interpolationConfig;
15998
16023
  _leadingTriviaCodePoints;
15999
16024
  _currentTokenStart = null;
16000
16025
  _currentTokenType = null;
@@ -16017,7 +16042,6 @@ class _Tokenizer {
16017
16042
  constructor(_file, _getTagDefinition, options) {
16018
16043
  this._getTagDefinition = _getTagDefinition;
16019
16044
  this._tokenizeIcu = options.tokenizeExpansionForms || false;
16020
- this._interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;
16021
16045
  this._leadingTriviaCodePoints =
16022
16046
  options.leadingTriviaChars && options.leadingTriviaChars.map((c) => c.codePointAt(0) || 0);
16023
16047
  const range = options.range || {
@@ -16848,7 +16872,7 @@ class _Tokenizer {
16848
16872
  const parts = [];
16849
16873
  while (!endPredicate()) {
16850
16874
  const current = this._cursor.clone();
16851
- if (this._interpolationConfig && this._attemptStr(this._interpolationConfig.start)) {
16875
+ if (this._attemptStr(INTERPOLATION.start)) {
16852
16876
  this._endToken([this._processCarriageReturns(parts.join(''))], current);
16853
16877
  parts.length = 0;
16854
16878
  this._consumeInterpolation(interpolationTokenType, current, endInterpolation);
@@ -16880,7 +16904,7 @@ class _Tokenizer {
16880
16904
  _consumeInterpolation(interpolationTokenType, interpolationStart, prematureEndPredicate) {
16881
16905
  const parts = [];
16882
16906
  this._beginToken(interpolationTokenType, interpolationStart);
16883
- parts.push(this._interpolationConfig.start);
16907
+ parts.push(INTERPOLATION.start);
16884
16908
  // Find the end of the interpolation, ignoring content inside quotes.
16885
16909
  const expressionStart = this._cursor.clone();
16886
16910
  let inQuote = null;
@@ -16898,10 +16922,10 @@ class _Tokenizer {
16898
16922
  return;
16899
16923
  }
16900
16924
  if (inQuote === null) {
16901
- if (this._attemptStr(this._interpolationConfig.end)) {
16925
+ if (this._attemptStr(INTERPOLATION.end)) {
16902
16926
  // We are not in a string, and we hit the end interpolation marker
16903
16927
  parts.push(this._getProcessedChars(expressionStart, current));
16904
- parts.push(this._interpolationConfig.end);
16928
+ parts.push(INTERPOLATION.end);
16905
16929
  this._endToken(parts);
16906
16930
  return;
16907
16931
  }
@@ -17040,13 +17064,10 @@ class _Tokenizer {
17040
17064
  if (this._cursor.peek() !== $LBRACE) {
17041
17065
  return false;
17042
17066
  }
17043
- if (this._interpolationConfig) {
17044
- const start = this._cursor.clone();
17045
- const isInterpolation = this._attemptStr(this._interpolationConfig.start);
17046
- this._cursor = start;
17047
- return !isInterpolation;
17048
- }
17049
- return true;
17067
+ const start = this._cursor.clone();
17068
+ const isInterpolation = this._attemptStr(INTERPOLATION.start);
17069
+ this._cursor = start;
17070
+ return !isInterpolation;
17050
17071
  }
17051
17072
  }
17052
17073
  function isNotWhitespace(code) {
@@ -18249,7 +18270,9 @@ var TokenType;
18249
18270
  TokenType[TokenType["String"] = 4] = "String";
18250
18271
  TokenType[TokenType["Operator"] = 5] = "Operator";
18251
18272
  TokenType[TokenType["Number"] = 6] = "Number";
18252
- TokenType[TokenType["Error"] = 7] = "Error";
18273
+ TokenType[TokenType["RegExpBody"] = 7] = "RegExpBody";
18274
+ TokenType[TokenType["RegExpFlags"] = 8] = "RegExpFlags";
18275
+ TokenType[TokenType["Error"] = 9] = "Error";
18253
18276
  })(TokenType || (TokenType = {}));
18254
18277
  var StringTokenKind;
18255
18278
  (function (StringTokenKind) {
@@ -18344,6 +18367,12 @@ class Token {
18344
18367
  isError() {
18345
18368
  return this.type === TokenType.Error;
18346
18369
  }
18370
+ isRegExpBody() {
18371
+ return this.type === TokenType.RegExpBody;
18372
+ }
18373
+ isRegExpFlags() {
18374
+ return this.type === TokenType.RegExpFlags;
18375
+ }
18347
18376
  toNumber() {
18348
18377
  return this.type === TokenType.Number ? this.numValue : -1;
18349
18378
  }
@@ -18358,9 +18387,6 @@ class Token {
18358
18387
  isTemplateLiteralInterpolationStart() {
18359
18388
  return this.isOperator('${');
18360
18389
  }
18361
- isTemplateLiteralInterpolationEnd() {
18362
- return this.isOperator('}');
18363
- }
18364
18390
  toString() {
18365
18391
  switch (this.type) {
18366
18392
  case TokenType.Character:
@@ -18370,6 +18396,8 @@ class Token {
18370
18396
  case TokenType.PrivateIdentifier:
18371
18397
  case TokenType.String:
18372
18398
  case TokenType.Error:
18399
+ case TokenType.RegExpBody:
18400
+ case TokenType.RegExpFlags:
18373
18401
  return this.strValue;
18374
18402
  case TokenType.Number:
18375
18403
  return this.numValue.toString();
@@ -18406,6 +18434,12 @@ function newNumberToken(index, end, n) {
18406
18434
  function newErrorToken(index, end, message) {
18407
18435
  return new Token(index, end, TokenType.Error, 0, message);
18408
18436
  }
18437
+ function newRegExpBodyToken(index, end, text) {
18438
+ return new Token(index, end, TokenType.RegExpBody, 0, text);
18439
+ }
18440
+ function newRegExpFlagsToken(index, end, text) {
18441
+ return new Token(index, end, TokenType.RegExpFlags, 0, text);
18442
+ }
18409
18443
  const EOF = new Token(-1, -1, TokenType.Character, 0, '');
18410
18444
  class _Scanner {
18411
18445
  input;
@@ -18489,7 +18523,9 @@ class _Scanner {
18489
18523
  case $MINUS:
18490
18524
  return this.scanComplexOperator(start, '-', $EQ, '=');
18491
18525
  case $SLASH:
18492
- return this.scanComplexOperator(start, '/', $EQ, '=');
18526
+ return this.isStartOfRegex()
18527
+ ? this.scanRegex(index)
18528
+ : this.scanComplexOperator(start, '/', $EQ, '=');
18493
18529
  case $PERCENT:
18494
18530
  return this.scanComplexOperator(start, '%', $EQ, '=');
18495
18531
  case $CARET:
@@ -18533,7 +18569,7 @@ class _Scanner {
18533
18569
  this.advance();
18534
18570
  const currentBrace = this.braceStack.pop();
18535
18571
  if (currentBrace === 'interpolation') {
18536
- this.tokens.push(newOperatorToken(start, this.index, '}'));
18572
+ this.tokens.push(newCharacterToken(start, this.index, $RBRACE));
18537
18573
  return this.scanTemplateLiteralPart(this.index);
18538
18574
  }
18539
18575
  return newCharacterToken(start, this.index, code);
@@ -18752,6 +18788,81 @@ class _Scanner {
18752
18788
  }
18753
18789
  return newOperatorToken(start, this.index, operator);
18754
18790
  }
18791
+ isStartOfRegex() {
18792
+ if (this.tokens.length === 0) {
18793
+ return true;
18794
+ }
18795
+ const prevToken = this.tokens[this.tokens.length - 1];
18796
+ // If a slash is preceded by a `!` operator, we need to distinguish whether it's a
18797
+ // negation or a non-null assertion. Regexes can only be precded by negations.
18798
+ if (prevToken.isOperator('!')) {
18799
+ const beforePrevToken = this.tokens.length > 1 ? this.tokens[this.tokens.length - 2] : null;
18800
+ const isNegation = beforePrevToken === null ||
18801
+ (beforePrevToken.type !== TokenType.Identifier &&
18802
+ !beforePrevToken.isCharacter($RPAREN) &&
18803
+ !beforePrevToken.isCharacter($RBRACKET));
18804
+ return isNegation;
18805
+ }
18806
+ // Only consider the slash a regex if it's preceded either by:
18807
+ // - Any operator, aside from `!` which is special-cased above.
18808
+ // - Opening paren (e.g. `(/a/)`).
18809
+ // - Opening bracket (e.g. `[/a/]`).
18810
+ // - A comma (e.g. `[1, /a/]`).
18811
+ // - A colon (e.g. `{foo: /a/}`).
18812
+ return (prevToken.type === TokenType.Operator ||
18813
+ prevToken.isCharacter($LPAREN) ||
18814
+ prevToken.isCharacter($LBRACKET) ||
18815
+ prevToken.isCharacter($COMMA) ||
18816
+ prevToken.isCharacter($COLON));
18817
+ }
18818
+ scanRegex(tokenStart) {
18819
+ this.advance();
18820
+ const textStart = this.index;
18821
+ let inEscape = false;
18822
+ let inCharacterClass = false;
18823
+ while (true) {
18824
+ const peek = this.peek;
18825
+ if (peek === $EOF) {
18826
+ return this.error('Unterminated regular expression', 0);
18827
+ }
18828
+ if (inEscape) {
18829
+ inEscape = false;
18830
+ }
18831
+ else if (peek === $BACKSLASH) {
18832
+ inEscape = true;
18833
+ }
18834
+ else if (peek === $LBRACKET) {
18835
+ inCharacterClass = true;
18836
+ }
18837
+ else if (peek === $RBRACKET) {
18838
+ inCharacterClass = false;
18839
+ }
18840
+ else if (peek === $SLASH && !inCharacterClass) {
18841
+ break;
18842
+ }
18843
+ this.advance();
18844
+ }
18845
+ // Note that we want the text without the slashes,
18846
+ // but we still want the slashes to be part of the span.
18847
+ const value = this.input.substring(textStart, this.index);
18848
+ this.advance();
18849
+ const bodyToken = newRegExpBodyToken(tokenStart, this.index, value);
18850
+ const flagsToken = this.scanRegexFlags(this.index);
18851
+ if (flagsToken !== null) {
18852
+ this.tokens.push(bodyToken);
18853
+ return flagsToken;
18854
+ }
18855
+ return bodyToken;
18856
+ }
18857
+ scanRegexFlags(start) {
18858
+ if (!isAsciiLetter(this.peek)) {
18859
+ return null;
18860
+ }
18861
+ while (isAsciiLetter(this.peek)) {
18862
+ this.advance();
18863
+ }
18864
+ return newRegExpFlagsToken(start, this.index, this.input.substring(start, this.index));
18865
+ }
18755
18866
  }
18756
18867
  function isIdentifierStart(code) {
18757
18868
  return (($a <= code && code <= $z) ||
@@ -18822,17 +18933,17 @@ class Parser {
18822
18933
  this._lexer = _lexer;
18823
18934
  this._supportsDirectPipeReferences = _supportsDirectPipeReferences;
18824
18935
  }
18825
- parseAction(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
18936
+ parseAction(input, parseSourceSpan, absoluteOffset) {
18826
18937
  const errors = [];
18827
- this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
18938
+ this._checkNoInterpolation(errors, input, parseSourceSpan);
18828
18939
  const { stripped: sourceToLex } = this._stripComments(input);
18829
18940
  const tokens = this._lexer.tokenize(sourceToLex);
18830
18941
  const ast = new _ParseAST(input, parseSourceSpan, absoluteOffset, tokens, 1 /* ParseFlags.Action */, errors, 0, this._supportsDirectPipeReferences).parseChain();
18831
18942
  return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
18832
18943
  }
18833
- parseBinding(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
18944
+ parseBinding(input, parseSourceSpan, absoluteOffset) {
18834
18945
  const errors = [];
18835
- const ast = this._parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors);
18946
+ const ast = this._parseBindingAst(input, parseSourceSpan, absoluteOffset, errors);
18836
18947
  return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
18837
18948
  }
18838
18949
  checkSimpleExpression(ast) {
@@ -18841,17 +18952,17 @@ class Parser {
18841
18952
  return checker.errors;
18842
18953
  }
18843
18954
  // Host bindings parsed here
18844
- parseSimpleBinding(input, parseSourceSpan, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
18955
+ parseSimpleBinding(input, parseSourceSpan, absoluteOffset) {
18845
18956
  const errors = [];
18846
- const ast = this._parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors);
18957
+ const ast = this._parseBindingAst(input, parseSourceSpan, absoluteOffset, errors);
18847
18958
  const simplExpressionErrors = this.checkSimpleExpression(ast);
18848
18959
  if (simplExpressionErrors.length > 0) {
18849
18960
  errors.push(getParseError(`Host binding expression cannot contain ${simplExpressionErrors.join(' ')}`, input, '', parseSourceSpan));
18850
18961
  }
18851
18962
  return new ASTWithSource(ast, input, getLocation(parseSourceSpan), absoluteOffset, errors);
18852
18963
  }
18853
- _parseBindingAst(input, parseSourceSpan, absoluteOffset, interpolationConfig, errors) {
18854
- this._checkNoInterpolation(errors, input, parseSourceSpan, interpolationConfig);
18964
+ _parseBindingAst(input, parseSourceSpan, absoluteOffset, errors) {
18965
+ this._checkNoInterpolation(errors, input, parseSourceSpan);
18855
18966
  const { stripped: sourceToLex } = this._stripComments(input);
18856
18967
  const tokens = this._lexer.tokenize(sourceToLex);
18857
18968
  return new _ParseAST(input, parseSourceSpan, absoluteOffset, tokens, 0 /* ParseFlags.None */, errors, 0, this._supportsDirectPipeReferences).parseChain();
@@ -18891,9 +19002,9 @@ class Parser {
18891
19002
  span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length),
18892
19003
  });
18893
19004
  }
18894
- parseInterpolation(input, parseSourceSpan, absoluteOffset, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
19005
+ parseInterpolation(input, parseSourceSpan, absoluteOffset, interpolatedTokens) {
18895
19006
  const errors = [];
18896
- const { strings, expressions, offsets } = this.splitInterpolation(input, parseSourceSpan, errors, interpolatedTokens, interpolationConfig);
19007
+ const { strings, expressions, offsets } = this.splitInterpolation(input, parseSourceSpan, errors, interpolatedTokens);
18897
19008
  if (expressions.length === 0)
18898
19009
  return null;
18899
19010
  const expressionNodes = [];
@@ -18940,7 +19051,7 @@ class Parser {
18940
19051
  * `SplitInterpolation` with splits that look like
18941
19052
  * <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>
18942
19053
  */
18943
- splitInterpolation(input, parseSourceSpan, errors, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
19054
+ splitInterpolation(input, parseSourceSpan, errors, interpolatedTokens) {
18944
19055
  const strings = [];
18945
19056
  const expressions = [];
18946
19057
  const offsets = [];
@@ -18950,7 +19061,8 @@ class Parser {
18950
19061
  let i = 0;
18951
19062
  let atInterpolation = false;
18952
19063
  let extendLastString = false;
18953
- let { start: interpStart, end: interpEnd } = interpolationConfig;
19064
+ const interpStart = '{{';
19065
+ const interpEnd = '}}';
18954
19066
  while (i < input.length) {
18955
19067
  if (!atInterpolation) {
18956
19068
  // parse until starting {{
@@ -19029,24 +19141,24 @@ class Parser {
19029
19141
  }
19030
19142
  return null;
19031
19143
  }
19032
- _checkNoInterpolation(errors, input, parseSourceSpan, { start, end }) {
19144
+ _checkNoInterpolation(errors, input, parseSourceSpan) {
19033
19145
  let startIndex = -1;
19034
19146
  let endIndex = -1;
19035
19147
  for (const charIndex of this._forEachUnquotedChar(input, 0)) {
19036
19148
  if (startIndex === -1) {
19037
- if (input.startsWith(start)) {
19149
+ if (input.startsWith('{{')) {
19038
19150
  startIndex = charIndex;
19039
19151
  }
19040
19152
  }
19041
19153
  else {
19042
- endIndex = this._getInterpolationEndIndex(input, end, charIndex);
19154
+ endIndex = this._getInterpolationEndIndex(input, '}}', charIndex);
19043
19155
  if (endIndex > -1) {
19044
19156
  break;
19045
19157
  }
19046
19158
  }
19047
19159
  }
19048
19160
  if (startIndex > -1 && endIndex > -1) {
19049
- errors.push(getParseError(`Got interpolation (${start}${end}) where expression was expected`, input, `at column ${startIndex} in`, parseSourceSpan));
19161
+ errors.push(getParseError(`Got interpolation ({{}}) where expression was expected`, input, `at column ${startIndex} in`, parseSourceSpan));
19050
19162
  }
19051
19163
  }
19052
19164
  /**
@@ -19103,6 +19215,8 @@ var ParseContextFlags;
19103
19215
  */
19104
19216
  ParseContextFlags[ParseContextFlags["Writable"] = 1] = "Writable";
19105
19217
  })(ParseContextFlags || (ParseContextFlags = {}));
19218
+ /** Possible flags that can be used in a regex literal. */
19219
+ const SUPPORTED_REGEX_FLAGS = new Set(['d', 'g', 'i', 'm', 's', 'u', 'v', 'y']);
19106
19220
  class _ParseAST {
19107
19221
  input;
19108
19222
  parseSourceSpan;
@@ -19672,6 +19786,9 @@ class _ParseAST {
19672
19786
  this._reportErrorForPrivateIdentifier(this.next, null);
19673
19787
  return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
19674
19788
  }
19789
+ else if (this.next.isRegExpBody()) {
19790
+ return this.parseRegularExpressionLiteral();
19791
+ }
19675
19792
  else if (this.index >= this.tokens.length) {
19676
19793
  this.error(`Unexpected end of expression: ${this.input}`);
19677
19794
  return new EmptyExpr$1(this.span(start), this.sourceSpan(start));
@@ -20027,6 +20144,7 @@ class _ParseAST {
20027
20144
  }
20028
20145
  else if (token.isTemplateLiteralInterpolationStart()) {
20029
20146
  this.advance();
20147
+ this.rbracesExpected++;
20030
20148
  const expression = this.parsePipe();
20031
20149
  if (expression instanceof EmptyExpr$1) {
20032
20150
  this.error('Template literal interpolation cannot be empty');
@@ -20034,6 +20152,7 @@ class _ParseAST {
20034
20152
  else {
20035
20153
  expressions.push(expression);
20036
20154
  }
20155
+ this.rbracesExpected--;
20037
20156
  }
20038
20157
  else {
20039
20158
  this.advance();
@@ -20041,6 +20160,35 @@ class _ParseAST {
20041
20160
  }
20042
20161
  return new TemplateLiteral(this.span(start), this.sourceSpan(start), elements, expressions);
20043
20162
  }
20163
+ parseRegularExpressionLiteral() {
20164
+ const bodyToken = this.next;
20165
+ this.advance();
20166
+ if (!bodyToken.isRegExpBody()) {
20167
+ return new EmptyExpr$1(this.span(this.inputIndex), this.sourceSpan(this.inputIndex));
20168
+ }
20169
+ let flagsToken = null;
20170
+ if (this.next.isRegExpFlags()) {
20171
+ flagsToken = this.next;
20172
+ this.advance();
20173
+ const seenFlags = new Set();
20174
+ for (let i = 0; i < flagsToken.strValue.length; i++) {
20175
+ const char = flagsToken.strValue[i];
20176
+ if (!SUPPORTED_REGEX_FLAGS.has(char)) {
20177
+ this.error(`Unsupported regular expression flag "${char}". The supported flags are: ` +
20178
+ Array.from(SUPPORTED_REGEX_FLAGS, (f) => `"${f}"`).join(', '), flagsToken.index + i);
20179
+ }
20180
+ else if (seenFlags.has(char)) {
20181
+ this.error(`Duplicate regular expression flag "${char}"`, flagsToken.index + i);
20182
+ }
20183
+ else {
20184
+ seenFlags.add(char);
20185
+ }
20186
+ }
20187
+ }
20188
+ const start = bodyToken.index;
20189
+ const end = flagsToken ? flagsToken.end : bodyToken.end;
20190
+ return new RegularExpressionLiteral(this.span(start, end), this.sourceSpan(start, end), bodyToken.strValue, flagsToken ? flagsToken.strValue : null);
20191
+ }
20044
20192
  /**
20045
20193
  * Consume the optional statement terminator: semicolon or comma.
20046
20194
  */
@@ -20254,6 +20402,9 @@ class SerializeExpressionVisitor {
20254
20402
  visitVoidExpression(ast, context) {
20255
20403
  return `void ${ast.expression.visit(this, context)}`;
20256
20404
  }
20405
+ visitRegularExpressionLiteral(ast, context) {
20406
+ return `/${ast.body}/${ast.flags || ''}`;
20407
+ }
20257
20408
  visitASTWithSource(ast, context) {
20258
20409
  return ast.ast.visit(this, context);
20259
20410
  }
@@ -21175,10 +21326,10 @@ class PlaceholderRegistry {
21175
21326
 
21176
21327
  const _expParser = new Parser(new Lexer());
21177
21328
  /**
21178
- * Returns a function converting html nodes to an i18n Message given an interpolationConfig
21329
+ * Returns a function converting html nodes to an i18n Message
21179
21330
  */
21180
- function createI18nMessageFactory(interpolationConfig, containerBlocks, retainEmptyTokens, preserveExpressionWhitespace) {
21181
- const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks, retainEmptyTokens, preserveExpressionWhitespace);
21331
+ function createI18nMessageFactory(containerBlocks, retainEmptyTokens, preserveExpressionWhitespace) {
21332
+ const visitor = new _I18nVisitor(_expParser, containerBlocks, retainEmptyTokens, preserveExpressionWhitespace);
21182
21333
  return (nodes, meaning, description, customId, visitNodeFn) => visitor.toI18nMessage(nodes, meaning, description, customId, visitNodeFn);
21183
21334
  }
21184
21335
  function noopVisitNodeFn(_html, i18n) {
@@ -21186,13 +21337,11 @@ function noopVisitNodeFn(_html, i18n) {
21186
21337
  }
21187
21338
  class _I18nVisitor {
21188
21339
  _expressionParser;
21189
- _interpolationConfig;
21190
21340
  _containerBlocks;
21191
21341
  _retainEmptyTokens;
21192
21342
  _preserveExpressionWhitespace;
21193
- constructor(_expressionParser, _interpolationConfig, _containerBlocks, _retainEmptyTokens, _preserveExpressionWhitespace) {
21343
+ constructor(_expressionParser, _containerBlocks, _retainEmptyTokens, _preserveExpressionWhitespace) {
21194
21344
  this._expressionParser = _expressionParser;
21195
- this._interpolationConfig = _interpolationConfig;
21196
21345
  this._containerBlocks = _containerBlocks;
21197
21346
  this._retainEmptyTokens = _retainEmptyTokens;
21198
21347
  this._preserveExpressionWhitespace = _preserveExpressionWhitespace;
@@ -21414,7 +21563,7 @@ class _I18nVisitor {
21414
21563
  const expression = token.parts[1];
21415
21564
  const expr = this._expressionParser.parseBinding(expression,
21416
21565
  /* location */ token.sourceSpan,
21417
- /* absoluteOffset */ token.sourceSpan.start.offset, this._interpolationConfig);
21566
+ /* absoluteOffset */ token.sourceSpan.start.offset);
21418
21567
  return serialize(expr);
21419
21568
  }
21420
21569
  }
@@ -21479,6 +21628,51 @@ function extractPlaceholderName(input) {
21479
21628
  return input.split(_CUSTOM_PH_EXP)[2];
21480
21629
  }
21481
21630
 
21631
+ const UNUSABLE_INTERPOLATION_REGEXPS = [
21632
+ /@/, // control flow reserved symbol
21633
+ /^\s*$/, // empty
21634
+ /[<>]/, // html tag
21635
+ /^[{}]$/, // i18n expansion
21636
+ /&(#|[a-z])/i, // character reference,
21637
+ /^\/\//, // comment
21638
+ ];
21639
+ function assertInterpolationSymbols(identifier, value) {
21640
+ if (value != null && !(Array.isArray(value) && value.length == 2)) {
21641
+ throw new Error(`Expected '${identifier}' to be an array, [start, end].`);
21642
+ }
21643
+ else if (value != null) {
21644
+ const start = value[0];
21645
+ const end = value[1];
21646
+ // Check for unusable interpolation symbols
21647
+ UNUSABLE_INTERPOLATION_REGEXPS.forEach((regexp) => {
21648
+ if (regexp.test(start) || regexp.test(end)) {
21649
+ throw new Error(`['${start}', '${end}'] contains unusable interpolation symbol.`);
21650
+ }
21651
+ });
21652
+ }
21653
+ }
21654
+
21655
+ class InterpolationConfig {
21656
+ start;
21657
+ end;
21658
+ static fromArray(markers) {
21659
+ if (!markers) {
21660
+ return DEFAULT_INTERPOLATION_CONFIG;
21661
+ }
21662
+ assertInterpolationSymbols('interpolation', markers);
21663
+ return new InterpolationConfig(markers[0], markers[1]);
21664
+ }
21665
+ constructor(start, end) {
21666
+ this.start = start;
21667
+ this.end = end;
21668
+ }
21669
+ }
21670
+ /**
21671
+ * This symbol is referenced inside G3 and will require some cleanup.
21672
+ */
21673
+ const DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}');
21674
+ const DEFAULT_CONTAINER_BLOCKS = new Set(['switch']);
21675
+
21482
21676
  /**
21483
21677
  * Set of tagName|propertyName corresponding to Trusted Types sinks. Properties applying to all
21484
21678
  * tags use '*'.
@@ -21540,7 +21734,6 @@ const setI18nRefs = (originalNodeMap) => {
21540
21734
  * stored with other element's and attribute's information.
21541
21735
  */
21542
21736
  class I18nMetaVisitor {
21543
- interpolationConfig;
21544
21737
  keepI18nAttrs;
21545
21738
  enableI18nLegacyMessageIdFormat;
21546
21739
  containerBlocks;
@@ -21549,7 +21742,7 @@ class I18nMetaVisitor {
21549
21742
  // whether visited nodes contain i18n information
21550
21743
  hasI18nMeta = false;
21551
21744
  _errors = [];
21552
- constructor(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false, containerBlocks = DEFAULT_CONTAINER_BLOCKS, preserveSignificantWhitespace = true,
21745
+ constructor(keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false, containerBlocks = DEFAULT_CONTAINER_BLOCKS, preserveSignificantWhitespace = true,
21553
21746
  // When dropping significant whitespace we need to retain empty tokens or
21554
21747
  // else we won't be able to reuse source spans because empty tokens would be
21555
21748
  // removed and cause a mismatch. Unfortunately this still needs to be
@@ -21557,7 +21750,6 @@ class I18nMetaVisitor {
21557
21750
  // sure the number of nodes don't change between parses, even when
21558
21751
  // `preserveSignificantWhitespace` changes.
21559
21752
  retainEmptyTokens = !preserveSignificantWhitespace) {
21560
- this.interpolationConfig = interpolationConfig;
21561
21753
  this.keepI18nAttrs = keepI18nAttrs;
21562
21754
  this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat;
21563
21755
  this.containerBlocks = containerBlocks;
@@ -21566,7 +21758,7 @@ class I18nMetaVisitor {
21566
21758
  }
21567
21759
  _generateI18nMessage(nodes, meta = '', visitNodeFn) {
21568
21760
  const { meaning, description, customId } = this._parseMetadata(meta);
21569
- const createI18nMessage = createI18nMessageFactory(this.interpolationConfig, this.containerBlocks, this.retainEmptyTokens,
21761
+ const createI18nMessage = createI18nMessageFactory(this.containerBlocks, this.retainEmptyTokens,
21570
21762
  /* preserveExpressionWhitespace */ this.preserveSignificantWhitespace);
21571
21763
  const message = createI18nMessage(nodes, meaning, description, customId, visitNodeFn);
21572
21764
  this._setMessageId(message, meta);
@@ -23356,6 +23548,27 @@ function transformLiteralMap(expr) {
23356
23548
  return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
23357
23549
  }
23358
23550
 
23551
+ /** Optimizes regular expressions used in expressions. */
23552
+ function optimizeRegularExpressions(job) {
23553
+ for (const view of job.units) {
23554
+ for (const op of view.ops()) {
23555
+ transformExpressionsInOp(op, (expr) => {
23556
+ if (expr instanceof RegularExpressionLiteral$1 &&
23557
+ // We can't optimize global regexes, because they're stateful.
23558
+ (expr.flags === null || !expr.flags.includes('g'))) {
23559
+ return job.pool.getSharedConstant(new RegularExpressionConstant(), expr);
23560
+ }
23561
+ return expr;
23562
+ }, VisitorContextFlag.None);
23563
+ }
23564
+ }
23565
+ }
23566
+ class RegularExpressionConstant extends GenericKeyFn {
23567
+ toSharedConstantDeclaration(declName, keyExpr) {
23568
+ return new DeclareVarStmt(declName, keyExpr, undefined, StmtModifier.Final);
23569
+ }
23570
+ }
23571
+
23359
23572
  // This file contains helpers for generating calls to Ivy instructions. In particular, each
23360
23573
  // instruction type is represented as a function, which may select a specific instruction variant
23361
23574
  // depending on the exact arguments.
@@ -23969,7 +24182,6 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
23969
24182
  return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
23970
24183
  }
23971
24184
 
23972
- const ARIA_PREFIX = 'aria';
23973
24185
  /**
23974
24186
  * Map of target resolvers for event listeners.
23975
24187
  */
@@ -24348,33 +24560,6 @@ function reifyUpdateOperations(unit, ops) {
24348
24560
  }
24349
24561
  }
24350
24562
  }
24351
- /**
24352
- * Converts an ARIA property name to its corresponding attribute name, if necessary.
24353
- *
24354
- * For example, converts `ariaLabel` to `aria-label`.
24355
- *
24356
- * https://www.w3.org/TR/wai-aria-1.2/#accessibilityroleandproperties-correspondence
24357
- *
24358
- * This must be kept in sync with the the function of the same name in
24359
- * packages/core/src/render3/instructions/aria_property.ts.
24360
- *
24361
- * @param name A property name that starts with `aria`.
24362
- * @returns The corresponding attribute name.
24363
- */
24364
- function ariaAttrName(name) {
24365
- return name.charAt(ARIA_PREFIX.length) !== '-'
24366
- ? ARIA_PREFIX + '-' + name.slice(ARIA_PREFIX.length).toLowerCase()
24367
- : name; // Property already has attribute name.
24368
- }
24369
- /**
24370
- * Returns whether `name` is an ARIA property (or attribute) name.
24371
- *
24372
- * This is a heuristic based on whether name begins with and is longer than `aria`. For example,
24373
- * this returns true for both `ariaLabel` and `aria-label`.
24374
- */
24375
- function isAriaProperty(name) {
24376
- return name.startsWith(ARIA_PREFIX) && name.length > ARIA_PREFIX.length;
24377
- }
24378
24563
  /**
24379
24564
  * Reifies a DOM property binding operation.
24380
24565
  *
@@ -24385,9 +24570,7 @@ function isAriaProperty(name) {
24385
24570
  * @returns A statement to update the property at runtime.
24386
24571
  */
24387
24572
  function reifyDomProperty(op) {
24388
- return isAriaProperty(op.name)
24389
- ? attribute(ariaAttrName(op.name), op.expression, null, null, op.sourceSpan)
24390
- : domProperty(DOM_PROPERTY_REMAPPING.get(op.name) ?? op.name, op.expression, op.sanitizer, op.sourceSpan);
24573
+ return domProperty(DOM_PROPERTY_REMAPPING.get(op.name) ?? op.name, op.expression, op.sanitizer, op.sourceSpan);
24391
24574
  }
24392
24575
  /**
24393
24576
  * Reifies a property binding operation.
@@ -24399,7 +24582,7 @@ function reifyDomProperty(op) {
24399
24582
  * @returns A statement to update the property at runtime.
24400
24583
  */
24401
24584
  function reifyProperty(op) {
24402
- return isAriaProperty(op.name)
24585
+ return isAriaAttribute(op.name)
24403
24586
  ? ariaProperty(op.name, op.expression, op.sourceSpan)
24404
24587
  : property(op.name, op.expression, op.sanitizer, op.sourceSpan);
24405
24588
  }
@@ -26447,6 +26630,7 @@ function wrapI18nIcus(job) {
26447
26630
  */
26448
26631
  const phases = [
26449
26632
  { kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
26633
+ { kind: CompilationJobKind.Both, fn: optimizeRegularExpressions },
26450
26634
  { kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
26451
26635
  { kind: CompilationJobKind.Tmpl, fn: emitNamespaceChanges },
26452
26636
  { kind: CompilationJobKind.Tmpl, fn: propagateI18nBlocks },
@@ -27293,6 +27477,9 @@ function convertAst(ast, job, baseSourceSpan) {
27293
27477
  else if (ast instanceof ParenthesizedExpression) {
27294
27478
  return new ParenthesizedExpr(convertAst(ast.expression, job, baseSourceSpan), undefined, convertSourceSpan(ast.span, baseSourceSpan));
27295
27479
  }
27480
+ else if (ast instanceof RegularExpressionLiteral) {
27481
+ return new RegularExpressionLiteral$1(ast.body, ast.flags, baseSourceSpan);
27482
+ }
27296
27483
  else {
27297
27484
  throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan?.start.file.url}"`);
27298
27485
  }
@@ -27898,18 +28085,13 @@ const LEGACY_ANIMATE_PROP_PREFIX = 'animate-';
27898
28085
  */
27899
28086
  class BindingParser {
27900
28087
  _exprParser;
27901
- _interpolationConfig;
27902
28088
  _schemaRegistry;
27903
28089
  errors;
27904
- constructor(_exprParser, _interpolationConfig, _schemaRegistry, errors) {
28090
+ constructor(_exprParser, _schemaRegistry, errors) {
27905
28091
  this._exprParser = _exprParser;
27906
- this._interpolationConfig = _interpolationConfig;
27907
28092
  this._schemaRegistry = _schemaRegistry;
27908
28093
  this.errors = errors;
27909
28094
  }
27910
- get interpolationConfig() {
27911
- return this._interpolationConfig;
27912
- }
27913
28095
  createBoundHostProperties(properties, sourceSpan) {
27914
28096
  const boundProps = [];
27915
28097
  for (const propName of Object.keys(properties)) {
@@ -27953,7 +28135,7 @@ class BindingParser {
27953
28135
  parseInterpolation(value, sourceSpan, interpolatedTokens) {
27954
28136
  const absoluteOffset = sourceSpan.fullStart.offset;
27955
28137
  try {
27956
- const ast = this._exprParser.parseInterpolation(value, sourceSpan, absoluteOffset, interpolatedTokens, this._interpolationConfig);
28138
+ const ast = this._exprParser.parseInterpolation(value, sourceSpan, absoluteOffset, interpolatedTokens);
27957
28139
  if (ast) {
27958
28140
  this.errors.push(...ast.errors);
27959
28141
  }
@@ -28125,8 +28307,8 @@ class BindingParser {
28125
28307
  parseBinding(value, isHostBinding, sourceSpan, absoluteOffset) {
28126
28308
  try {
28127
28309
  const ast = isHostBinding
28128
- ? this._exprParser.parseSimpleBinding(value, sourceSpan, absoluteOffset, this._interpolationConfig)
28129
- : this._exprParser.parseBinding(value, sourceSpan, absoluteOffset, this._interpolationConfig);
28310
+ ? this._exprParser.parseSimpleBinding(value, sourceSpan, absoluteOffset)
28311
+ : this._exprParser.parseBinding(value, sourceSpan, absoluteOffset);
28130
28312
  if (ast) {
28131
28313
  this.errors.push(...ast.errors);
28132
28314
  }
@@ -28261,7 +28443,7 @@ class BindingParser {
28261
28443
  _parseAction(value, sourceSpan) {
28262
28444
  const absoluteOffset = sourceSpan && sourceSpan.start ? sourceSpan.start.offset : 0;
28263
28445
  try {
28264
- const ast = this._exprParser.parseAction(value, sourceSpan, absoluteOffset, this._interpolationConfig);
28446
+ const ast = this._exprParser.parseAction(value, sourceSpan, absoluteOffset);
28265
28447
  if (ast) {
28266
28448
  this.errors.push(...ast.errors);
28267
28449
  }
@@ -29527,6 +29709,13 @@ class HtmlAstToIvyAst {
29527
29709
  }
29528
29710
  else {
29529
29711
  const attrs = this.categorizePropertyAttributes(element.name, parsedProperties, i18nAttrsMeta);
29712
+ if (element.name === 'ng-container') {
29713
+ for (const bound of attrs.bound) {
29714
+ if (bound.type === BindingType.Attribute) {
29715
+ this.reportError(`Attribute bindings are not supported on ng-container. Use property bindings instead.`, bound.sourceSpan);
29716
+ }
29717
+ }
29718
+ }
29530
29719
  parsedElement = new Element$1(element.name, attributes, attrs.bound, boundEvents, directives, children, references, element.isSelfClosing, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.isVoid, element.i18n);
29531
29720
  }
29532
29721
  if (elementHasInlineTemplate) {
@@ -30111,9 +30300,9 @@ const LEADING_TRIVIA_CHARS = [' ', '\n', '\r', '\t'];
30111
30300
  * @param options options to modify how the template is parsed
30112
30301
  */
30113
30302
  function parseTemplate(template, templateUrl, options = {}) {
30114
- const { interpolationConfig, preserveWhitespaces, enableI18nLegacyMessageIdFormat } = options;
30303
+ const { preserveWhitespaces, enableI18nLegacyMessageIdFormat } = options;
30115
30304
  const selectorlessEnabled = options.enableSelectorless ?? false;
30116
- const bindingParser = makeBindingParser(interpolationConfig, selectorlessEnabled);
30305
+ const bindingParser = makeBindingParser(selectorlessEnabled);
30117
30306
  const htmlParser = new HtmlParser();
30118
30307
  const parseResult = htmlParser.parse(template, templateUrl, {
30119
30308
  leadingTriviaChars: LEADING_TRIVIA_CHARS,
@@ -30127,7 +30316,6 @@ function parseTemplate(template, templateUrl, options = {}) {
30127
30316
  parseResult.errors &&
30128
30317
  parseResult.errors.length > 0) {
30129
30318
  const parsedTemplate = {
30130
- interpolationConfig,
30131
30319
  preserveWhitespaces,
30132
30320
  errors: parseResult.errors,
30133
30321
  nodes: [],
@@ -30150,7 +30338,7 @@ function parseTemplate(template, templateUrl, options = {}) {
30150
30338
  // before we run whitespace removal process, because existing i18n
30151
30339
  // extraction process (ng extract-i18n) relies on a raw content to generate
30152
30340
  // message ids
30153
- const i18nMetaVisitor = new I18nMetaVisitor(interpolationConfig,
30341
+ const i18nMetaVisitor = new I18nMetaVisitor(
30154
30342
  /* keepI18nAttrs */ !preserveWhitespaces, enableI18nLegacyMessageIdFormat,
30155
30343
  /* containerBlocks */ undefined, options.preserveSignificantWhitespace, retainEmptyTokens);
30156
30344
  const i18nMetaResult = i18nMetaVisitor.visitAllWithErrors(rootNodes);
@@ -30158,7 +30346,6 @@ function parseTemplate(template, templateUrl, options = {}) {
30158
30346
  i18nMetaResult.errors &&
30159
30347
  i18nMetaResult.errors.length > 0) {
30160
30348
  const parsedTemplate = {
30161
- interpolationConfig,
30162
30349
  preserveWhitespaces,
30163
30350
  errors: i18nMetaResult.errors,
30164
30351
  nodes: [],
@@ -30193,7 +30380,7 @@ function parseTemplate(template, templateUrl, options = {}) {
30193
30380
  // template. During this pass i18n IDs generated at the first pass will be preserved, so we can
30194
30381
  // mimic existing extraction process (ng extract-i18n)
30195
30382
  if (i18nMetaVisitor.hasI18nMeta) {
30196
- rootNodes = visitAll(new I18nMetaVisitor(interpolationConfig,
30383
+ rootNodes = visitAll(new I18nMetaVisitor(
30197
30384
  /* keepI18nAttrs */ false,
30198
30385
  /* enableI18nLegacyMessageIdFormat */ undefined,
30199
30386
  /* containerBlocks */ undefined,
@@ -30203,7 +30390,6 @@ function parseTemplate(template, templateUrl, options = {}) {
30203
30390
  const { nodes, errors, styleUrls, styles, ngContentSelectors, commentNodes } = htmlAstToRender3Ast(rootNodes, bindingParser, { collectCommentNodes: !!options.collectCommentNodes });
30204
30391
  errors.push(...parseResult.errors, ...i18nMetaResult.errors);
30205
30392
  const parsedTemplate = {
30206
- interpolationConfig,
30207
30393
  preserveWhitespaces,
30208
30394
  errors: errors.length > 0 ? errors : null,
30209
30395
  nodes,
@@ -30220,8 +30406,8 @@ const elementRegistry = new DomElementSchemaRegistry();
30220
30406
  /**
30221
30407
  * Construct a `BindingParser` with a default configuration.
30222
30408
  */
30223
- function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, selectorlessEnabled = false) {
30224
- return new BindingParser(new Parser(new Lexer(), selectorlessEnabled), interpolationConfig, elementRegistry, []);
30409
+ function makeBindingParser(selectorlessEnabled = false) {
30410
+ return new BindingParser(new Parser(new Lexer(), selectorlessEnabled), elementRegistry, []);
30225
30411
  }
30226
30412
 
30227
30413
  const COMPONENT_VARIABLE = '%COMP%';
@@ -31943,7 +32129,7 @@ class CompilerFacadeImpl {
31943
32129
  }
31944
32130
  compileComponent(angularCoreEnv, sourceMapUrl, facade) {
31945
32131
  // Parse the template and check for errors.
31946
- const { template, interpolation, defer } = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation, undefined);
32132
+ const { template, defer } = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, undefined);
31947
32133
  // Compile the component metadata, including template, into an expression.
31948
32134
  const meta = {
31949
32135
  ...facade,
@@ -31955,7 +32141,6 @@ class CompilerFacadeImpl {
31955
32141
  defer,
31956
32142
  styles: [...facade.styles, ...template.styles],
31957
32143
  encapsulation: facade.encapsulation,
31958
- interpolation,
31959
32144
  changeDetection: facade.changeDetection ?? null,
31960
32145
  animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null,
31961
32146
  viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) : null,
@@ -31973,7 +32158,7 @@ class CompilerFacadeImpl {
31973
32158
  }
31974
32159
  compileComponentFromMeta(angularCoreEnv, sourceMapUrl, meta) {
31975
32160
  const constantPool = new ConstantPool();
31976
- const bindingParser = makeBindingParser(meta.interpolation);
32161
+ const bindingParser = makeBindingParser();
31977
32162
  const res = compileComponentFromMetadata(meta, constantPool, bindingParser);
31978
32163
  return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool.statements);
31979
32164
  }
@@ -32179,7 +32364,7 @@ function convertOpaqueValuesToExpressions(obj) {
32179
32364
  return result;
32180
32365
  }
32181
32366
  function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMapUrl) {
32182
- const { template, interpolation, defer } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, decl.preserveWhitespaces ?? false, decl.interpolation, decl.deferBlockDependencies);
32367
+ const { template, defer } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, decl.preserveWhitespaces ?? false, decl.deferBlockDependencies);
32183
32368
  const declarations = [];
32184
32369
  if (decl.dependencies) {
32185
32370
  for (const innerDep of decl.dependencies) {
@@ -32214,7 +32399,6 @@ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMap
32214
32399
  defer,
32215
32400
  changeDetection: decl.changeDetection ?? ChangeDetectionStrategy.Default,
32216
32401
  encapsulation: decl.encapsulation ?? ViewEncapsulation$1.Emulated,
32217
- interpolation,
32218
32402
  declarationListEmitMode: 2 /* DeclarationListEmitMode.ClosureResolved */,
32219
32403
  relativeContextFilePath: '',
32220
32404
  i18nUseExternalIds: true,
@@ -32258,15 +32442,9 @@ function convertPipeDeclarationToMetadata(pipe) {
32258
32442
  type: new WrappedNodeExpr(pipe.type),
32259
32443
  };
32260
32444
  }
32261
- function parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces, interpolation, deferBlockDependencies) {
32262
- const interpolationConfig = interpolation
32263
- ? InterpolationConfig.fromArray(interpolation)
32264
- : DEFAULT_INTERPOLATION_CONFIG;
32445
+ function parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces, deferBlockDependencies) {
32265
32446
  // Parse the template and check for errors.
32266
- const parsed = parseTemplate(template, sourceMapUrl, {
32267
- preserveWhitespaces,
32268
- interpolationConfig,
32269
- });
32447
+ const parsed = parseTemplate(template, sourceMapUrl, { preserveWhitespaces });
32270
32448
  if (parsed.errors !== null) {
32271
32449
  const errors = parsed.errors.map((err) => err.toString()).join(', ');
32272
32450
  throw new Error(`Errors during JIT compilation of template for ${typeName}: ${errors}`);
@@ -32275,7 +32453,6 @@ function parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces,
32275
32453
  const boundTarget = binder.bind({ template: parsed.nodes });
32276
32454
  return {
32277
32455
  template: parsed,
32278
- interpolation: interpolationConfig,
32279
32456
  defer: createR3ComponentDeferMetadata(boundTarget, deferBlockDependencies),
32280
32457
  };
32281
32458
  }
@@ -32513,13 +32690,13 @@ let i18nCommentsWarned = false;
32513
32690
  /**
32514
32691
  * Extract translatable messages from an html AST
32515
32692
  */
32516
- function extractMessages(nodes, interpolationConfig, implicitTags, implicitAttrs, preserveSignificantWhitespace) {
32693
+ function extractMessages(nodes, implicitTags, implicitAttrs, preserveSignificantWhitespace) {
32517
32694
  const visitor = new _Visitor(implicitTags, implicitAttrs, preserveSignificantWhitespace);
32518
- return visitor.extract(nodes, interpolationConfig);
32695
+ return visitor.extract(nodes);
32519
32696
  }
32520
- function mergeTranslations(nodes, translations, interpolationConfig, implicitTags, implicitAttrs) {
32697
+ function mergeTranslations(nodes, translations, implicitTags, implicitAttrs) {
32521
32698
  const visitor = new _Visitor(implicitTags, implicitAttrs);
32522
- return visitor.merge(nodes, translations, interpolationConfig);
32699
+ return visitor.merge(nodes, translations);
32523
32700
  }
32524
32701
  class ExtractionResult {
32525
32702
  messages;
@@ -32574,8 +32751,8 @@ class _Visitor {
32574
32751
  /**
32575
32752
  * Extracts the messages from the tree
32576
32753
  */
32577
- extract(nodes, interpolationConfig) {
32578
- this._init(_VisitorMode.Extract, interpolationConfig);
32754
+ extract(nodes) {
32755
+ this._init(_VisitorMode.Extract);
32579
32756
  nodes.forEach((node) => node.visit(this, null));
32580
32757
  if (this._inI18nBlock) {
32581
32758
  this._reportError(nodes[nodes.length - 1], 'Unclosed block');
@@ -32585,8 +32762,8 @@ class _Visitor {
32585
32762
  /**
32586
32763
  * Returns a tree where all translatable nodes are translated
32587
32764
  */
32588
- merge(nodes, translations, interpolationConfig) {
32589
- this._init(_VisitorMode.Merge, interpolationConfig);
32765
+ merge(nodes, translations) {
32766
+ this._init(_VisitorMode.Merge);
32590
32767
  this._translations = translations;
32591
32768
  // Construct a single fake root element
32592
32769
  const wrapper = new Element('wrapper', [], [], nodes, false, undefined, undefined, undefined, false);
@@ -32691,7 +32868,7 @@ class _Visitor {
32691
32868
  visitDirective(directive, context) {
32692
32869
  throw new Error('unreachable code');
32693
32870
  }
32694
- _init(mode, interpolationConfig) {
32871
+ _init(mode) {
32695
32872
  this._mode = mode;
32696
32873
  this._inI18nBlock = false;
32697
32874
  this._inI18nNode = false;
@@ -32701,7 +32878,7 @@ class _Visitor {
32701
32878
  this._errors = [];
32702
32879
  this._messages = [];
32703
32880
  this._inImplicitNode = false;
32704
- this._createI18nMessage = createI18nMessageFactory(interpolationConfig, DEFAULT_CONTAINER_BLOCKS,
32881
+ this._createI18nMessage = createI18nMessageFactory(DEFAULT_CONTAINER_BLOCKS,
32705
32882
  // When dropping significant whitespace we need to retain whitespace tokens or
32706
32883
  // else we won't be able to reuse source spans because empty tokens would be
32707
32884
  // removed and cause a mismatch.
@@ -34044,12 +34221,11 @@ class I18NHtmlParser {
34044
34221
  }
34045
34222
  }
34046
34223
  parse(source, url, options = {}) {
34047
- const interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG;
34048
- const parseResult = this._htmlParser.parse(source, url, { interpolationConfig, ...options });
34224
+ const parseResult = this._htmlParser.parse(source, url, { ...options });
34049
34225
  if (parseResult.errors.length) {
34050
34226
  return new ParseTreeResult(parseResult.rootNodes, parseResult.errors);
34051
34227
  }
34052
- return mergeTranslations(parseResult.rootNodes, this._translationBundle, interpolationConfig, [], {});
34228
+ return mergeTranslations(parseResult.rootNodes, this._translationBundle, [], {});
34053
34229
  }
34054
34230
  }
34055
34231
  function createSerializer(format) {
@@ -34086,11 +34262,8 @@ class MessageBundle {
34086
34262
  this._locale = _locale;
34087
34263
  this._preserveWhitespace = _preserveWhitespace;
34088
34264
  }
34089
- updateFromTemplate(source, url, interpolationConfig) {
34090
- const htmlParserResult = this._htmlParser.parse(source, url, {
34091
- tokenizeExpansionForms: true,
34092
- interpolationConfig,
34093
- });
34265
+ updateFromTemplate(source, url) {
34266
+ const htmlParserResult = this._htmlParser.parse(source, url, { tokenizeExpansionForms: true });
34094
34267
  if (htmlParserResult.errors.length) {
34095
34268
  return htmlParserResult.errors;
34096
34269
  }
@@ -34100,7 +34273,7 @@ class MessageBundle {
34100
34273
  const rootNodes = this._preserveWhitespace
34101
34274
  ? htmlParserResult.rootNodes
34102
34275
  : visitAllWithSiblings(new WhitespaceVisitor(/* preserveSignificantWhitespace */ false), htmlParserResult.rootNodes);
34103
- const i18nParserResult = extractMessages(rootNodes, interpolationConfig, this._implicitTags, this._implicitAttrs,
34276
+ const i18nParserResult = extractMessages(rootNodes, this._implicitTags, this._implicitAttrs,
34104
34277
  /* preserveSignificantWhitespace */ this._preserveWhitespace);
34105
34278
  if (i18nParserResult.errors.length) {
34106
34279
  return i18nParserResult.errors;
@@ -34261,7 +34434,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
34261
34434
  function compileDeclareClassMetadata(metadata) {
34262
34435
  const definitionMap = new DefinitionMap();
34263
34436
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
34264
- definitionMap.set('version', literal('21.0.0-next.4'));
34437
+ definitionMap.set('version', literal('21.0.0-next.6'));
34265
34438
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34266
34439
  definitionMap.set('type', metadata.type);
34267
34440
  definitionMap.set('decorators', metadata.decorators);
@@ -34279,7 +34452,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
34279
34452
  callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
34280
34453
  callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
34281
34454
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
34282
- definitionMap.set('version', literal('21.0.0-next.4'));
34455
+ definitionMap.set('version', literal('21.0.0-next.6'));
34283
34456
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34284
34457
  definitionMap.set('type', metadata.type);
34285
34458
  definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -34374,7 +34547,7 @@ function createDirectiveDefinitionMap(meta) {
34374
34547
  const definitionMap = new DefinitionMap();
34375
34548
  const minVersion = getMinimumVersionForPartialOutput(meta);
34376
34549
  definitionMap.set('minVersion', literal(minVersion));
34377
- definitionMap.set('version', literal('21.0.0-next.4'));
34550
+ definitionMap.set('version', literal('21.0.0-next.6'));
34378
34551
  // e.g. `type: MyDirective`
34379
34552
  definitionMap.set('type', meta.type.value);
34380
34553
  if (meta.isStandalone !== undefined) {
@@ -34644,9 +34817,6 @@ function createComponentDefinitionMap(meta, template, templateInfo) {
34644
34817
  if (meta.encapsulation !== ViewEncapsulation$1.Emulated) {
34645
34818
  definitionMap.set('encapsulation', importExpr(Identifiers.ViewEncapsulation).prop(ViewEncapsulation$1[meta.encapsulation]));
34646
34819
  }
34647
- if (meta.interpolation !== DEFAULT_INTERPOLATION_CONFIG) {
34648
- definitionMap.set('interpolation', literalArr([literal(meta.interpolation.start), literal(meta.interpolation.end)]));
34649
- }
34650
34820
  if (template.preserveWhitespaces === true) {
34651
34821
  definitionMap.set('preserveWhitespaces', literal(true));
34652
34822
  }
@@ -34790,7 +34960,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
34790
34960
  function compileDeclareFactoryFunction(meta) {
34791
34961
  const definitionMap = new DefinitionMap();
34792
34962
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
34793
- definitionMap.set('version', literal('21.0.0-next.4'));
34963
+ definitionMap.set('version', literal('21.0.0-next.6'));
34794
34964
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34795
34965
  definitionMap.set('type', meta.type.value);
34796
34966
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -34825,7 +34995,7 @@ function compileDeclareInjectableFromMetadata(meta) {
34825
34995
  function createInjectableDefinitionMap(meta) {
34826
34996
  const definitionMap = new DefinitionMap();
34827
34997
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
34828
- definitionMap.set('version', literal('21.0.0-next.4'));
34998
+ definitionMap.set('version', literal('21.0.0-next.6'));
34829
34999
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34830
35000
  definitionMap.set('type', meta.type.value);
34831
35001
  // Only generate providedIn property if it has a non-null value
@@ -34876,7 +35046,7 @@ function compileDeclareInjectorFromMetadata(meta) {
34876
35046
  function createInjectorDefinitionMap(meta) {
34877
35047
  const definitionMap = new DefinitionMap();
34878
35048
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
34879
- definitionMap.set('version', literal('21.0.0-next.4'));
35049
+ definitionMap.set('version', literal('21.0.0-next.6'));
34880
35050
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34881
35051
  definitionMap.set('type', meta.type.value);
34882
35052
  definitionMap.set('providers', meta.providers);
@@ -34909,7 +35079,7 @@ function createNgModuleDefinitionMap(meta) {
34909
35079
  throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
34910
35080
  }
34911
35081
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
34912
- definitionMap.set('version', literal('21.0.0-next.4'));
35082
+ definitionMap.set('version', literal('21.0.0-next.6'));
34913
35083
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34914
35084
  definitionMap.set('type', meta.type.value);
34915
35085
  // We only generate the keys in the metadata if the arrays contain values.
@@ -34960,7 +35130,7 @@ function compileDeclarePipeFromMetadata(meta) {
34960
35130
  function createPipeDefinitionMap(meta) {
34961
35131
  const definitionMap = new DefinitionMap();
34962
35132
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
34963
- definitionMap.set('version', literal('21.0.0-next.4'));
35133
+ definitionMap.set('version', literal('21.0.0-next.6'));
34964
35134
  definitionMap.set('ngImport', importExpr(Identifiers.core));
34965
35135
  // e.g. `type: MyPipe`
34966
35136
  definitionMap.set('type', meta.type.value);
@@ -35116,7 +35286,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
35116
35286
  * @description
35117
35287
  * Entry point for all public APIs of the compiler package.
35118
35288
  */
35119
- const VERSION = new Version('21.0.0-next.4');
35289
+ const VERSION = new Version('21.0.0-next.6');
35120
35290
 
35121
35291
  //////////////////////////////////////
35122
35292
  // THIS FILE HAS GLOBAL SIDE EFFECT //
@@ -35142,5 +35312,5 @@ const VERSION = new Version('21.0.0-next.4');
35142
35312
  // the late binding of the Compiler to the @angular/core for jit compilation.
35143
35313
  publishFacade(_global);
35144
35314
 
35145
- 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, DEFAULT_INTERPOLATION_CONFIG, 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, InterpolationConfig, 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, 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 };
35315
+ 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, DEFAULT_INTERPOLATION_CONFIG, 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, InterpolationConfig, 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, 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 };
35146
35316
  //# sourceMappingURL=compiler.mjs.map