@angular/compiler 14.0.0-next.13 → 14.0.0-next.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/esm2020/src/compiler.mjs +3 -2
  2. package/esm2020/src/compiler_facade_interface.mjs +7 -1
  3. package/esm2020/src/core.mjs +6 -6
  4. package/esm2020/src/expression_parser/parser.mjs +12 -12
  5. package/esm2020/src/i18n/i18n_parser.mjs +3 -3
  6. package/esm2020/src/jit_compiler_facade.mjs +74 -42
  7. package/esm2020/src/ml_parser/html_whitespaces.mjs +2 -2
  8. package/esm2020/src/ml_parser/lexer.mjs +36 -36
  9. package/esm2020/src/ml_parser/parser.mjs +41 -41
  10. package/esm2020/src/render3/partial/api.mjs +1 -1
  11. package/esm2020/src/render3/partial/class_metadata.mjs +1 -1
  12. package/esm2020/src/render3/partial/component.mjs +28 -37
  13. package/esm2020/src/render3/partial/directive.mjs +6 -3
  14. package/esm2020/src/render3/partial/factory.mjs +1 -1
  15. package/esm2020/src/render3/partial/injectable.mjs +1 -1
  16. package/esm2020/src/render3/partial/injector.mjs +1 -1
  17. package/esm2020/src/render3/partial/ng_module.mjs +3 -3
  18. package/esm2020/src/render3/partial/pipe.mjs +6 -3
  19. package/esm2020/src/render3/r3_ast.mjs +3 -3
  20. package/esm2020/src/render3/r3_factory.mjs +6 -6
  21. package/esm2020/src/render3/r3_identifiers.mjs +2 -1
  22. package/esm2020/src/render3/r3_pipe_compiler.mjs +2 -1
  23. package/esm2020/src/render3/util.mjs +4 -4
  24. package/esm2020/src/render3/view/api.mjs +7 -2
  25. package/esm2020/src/render3/view/compiler.mjs +42 -35
  26. package/esm2020/src/render3/view/i18n/get_msg_utils.mjs +58 -5
  27. package/esm2020/src/render3/view/i18n/meta.mjs +4 -4
  28. package/esm2020/src/render3/view/i18n/util.mjs +2 -2
  29. package/esm2020/src/render3/view/style_parser.mjs +19 -19
  30. package/esm2020/src/render3/view/styling_builder.mjs +6 -6
  31. package/esm2020/src/render3/view/template.mjs +25 -25
  32. package/esm2020/src/render3/view/util.mjs +4 -4
  33. package/esm2020/src/selector.mjs +8 -8
  34. package/esm2020/src/template_parser/binding_parser.mjs +8 -8
  35. package/esm2020/src/util.mjs +8 -8
  36. package/esm2020/src/version.mjs +1 -1
  37. package/fesm2015/compiler.mjs +400 -300
  38. package/fesm2015/compiler.mjs.map +1 -1
  39. package/fesm2015/testing.mjs +1 -1
  40. package/fesm2020/compiler.mjs +408 -313
  41. package/fesm2020/compiler.mjs.map +1 -1
  42. package/fesm2020/testing.mjs +1 -1
  43. package/index.d.ts +4964 -5
  44. package/package.json +3 -3
  45. package/testing/index.d.ts +22 -5
  46. package/compiler.d.ts +0 -8
  47. package/public_api.d.ts +0 -13
  48. package/src/assertions.d.ts +0 -8
  49. package/src/chars.d.ts +0 -75
  50. package/src/compiler.d.ts +0 -77
  51. package/src/compiler_facade_interface.d.ts +0 -284
  52. package/src/compiler_util/expression_converter.d.ts +0 -71
  53. package/src/config.d.ts +0 -25
  54. package/src/constant_pool.d.ts +0 -37
  55. package/src/core.d.ts +0 -216
  56. package/src/expression_parser/ast.d.ts +0 -440
  57. package/src/expression_parser/lexer.d.ts +0 -47
  58. package/src/expression_parser/parser.d.ts +0 -315
  59. package/src/i18n/big_integer.d.ts +0 -108
  60. package/src/i18n/digest.d.ts +0 -44
  61. package/src/i18n/extractor_merger.d.ts +0 -27
  62. package/src/i18n/i18n_ast.d.ts +0 -148
  63. package/src/i18n/i18n_html_parser.d.ts +0 -19
  64. package/src/i18n/i18n_parser.d.ts +0 -18
  65. package/src/i18n/index.d.ts +0 -15
  66. package/src/i18n/message_bundle.d.ts +0 -28
  67. package/src/i18n/parse_util.d.ts +0 -14
  68. package/src/i18n/serializers/placeholder.d.ts +0 -25
  69. package/src/i18n/serializers/serializer.d.ts +0 -46
  70. package/src/i18n/serializers/xliff.d.ts +0 -19
  71. package/src/i18n/serializers/xliff2.d.ts +0 -19
  72. package/src/i18n/serializers/xmb.d.ts +0 -22
  73. package/src/i18n/serializers/xml_helper.d.ts +0 -52
  74. package/src/i18n/serializers/xtb.d.ts +0 -20
  75. package/src/i18n/translation_bundle.d.ts +0 -27
  76. package/src/injectable_compiler_2.d.ts +0 -24
  77. package/src/jit_compiler_facade.d.ts +0 -46
  78. package/src/ml_parser/ast.d.ts +0 -89
  79. package/src/ml_parser/entities.d.ts +0 -9
  80. package/src/ml_parser/html_parser.d.ts +0 -13
  81. package/src/ml_parser/html_tags.d.ts +0 -33
  82. package/src/ml_parser/html_whitespaces.d.ts +0 -45
  83. package/src/ml_parser/icu_ast_expander.d.ts +0 -42
  84. package/src/ml_parser/interpolation_config.d.ts +0 -14
  85. package/src/ml_parser/lexer.d.ts +0 -114
  86. package/src/ml_parser/parser.d.ts +0 -26
  87. package/src/ml_parser/tags.d.ts +0 -29
  88. package/src/ml_parser/tokens.d.ts +0 -141
  89. package/src/ml_parser/xml_parser.d.ts +0 -13
  90. package/src/ml_parser/xml_tags.d.ts +0 -24
  91. package/src/output/abstract_emitter.d.ts +0 -66
  92. package/src/output/abstract_js_emitter.d.ts +0 -19
  93. package/src/output/map_util.d.ts +0 -18
  94. package/src/output/output_ast.d.ts +0 -575
  95. package/src/output/output_jit.d.ts +0 -73
  96. package/src/output/output_jit_trusted_types.d.ts +0 -43
  97. package/src/output/source_map.d.ts +0 -29
  98. package/src/parse_util.d.ts +0 -75
  99. package/src/render3/partial/api.d.ts +0 -441
  100. package/src/render3/partial/class_metadata.d.ts +0 -10
  101. package/src/render3/partial/component.d.ts +0 -39
  102. package/src/render3/partial/directive.d.ts +0 -13
  103. package/src/render3/partial/factory.d.ts +0 -3
  104. package/src/render3/partial/injectable.d.ts +0 -19
  105. package/src/render3/partial/injector.d.ts +0 -3
  106. package/src/render3/partial/ng_module.d.ts +0 -3
  107. package/src/render3/partial/pipe.d.ts +0 -12
  108. package/src/render3/partial/util.d.ts +0 -33
  109. package/src/render3/r3_ast.d.ts +0 -211
  110. package/src/render3/r3_class_metadata_compiler.d.ts +0 -35
  111. package/src/render3/r3_factory.d.ts +0 -94
  112. package/src/render3/r3_identifiers.d.ts +0 -182
  113. package/src/render3/r3_injector_compiler.d.ts +0 -18
  114. package/src/render3/r3_jit.d.ts +0 -22
  115. package/src/render3/r3_module_compiler.d.ts +0 -103
  116. package/src/render3/r3_pipe_compiler.d.ts +0 -50
  117. package/src/render3/r3_template_transform.d.ts +0 -24
  118. package/src/render3/util.d.ts +0 -94
  119. package/src/render3/view/api.d.ts +0 -328
  120. package/src/render3/view/compiler.d.ts +0 -86
  121. package/src/render3/view/i18n/context.d.ts +0 -68
  122. package/src/render3/view/i18n/get_msg_utils.d.ts +0 -13
  123. package/src/render3/view/i18n/icu_serializer.d.ts +0 -9
  124. package/src/render3/view/i18n/localize_utils.d.ts +0 -24
  125. package/src/render3/view/i18n/meta.d.ts +0 -78
  126. package/src/render3/view/i18n/util.d.ts +0 -78
  127. package/src/render3/view/style_parser.d.ts +0 -18
  128. package/src/render3/view/styling_builder.d.ts +0 -211
  129. package/src/render3/view/t2_api.d.ts +0 -152
  130. package/src/render3/view/t2_binder.d.ts +0 -57
  131. package/src/render3/view/template.d.ts +0 -450
  132. package/src/render3/view/util.d.ts +0 -94
  133. package/src/resource_loader.d.ts +0 -17
  134. package/src/schema/dom_element_schema_registry.d.ts +0 -45
  135. package/src/schema/dom_security_schema.d.ts +0 -11
  136. package/src/schema/element_schema_registry.d.ts +0 -29
  137. package/src/schema/trusted_types_sinks.d.ts +0 -15
  138. package/src/selector.d.ts +0 -105
  139. package/src/shadow_css.d.ts +0 -76
  140. package/src/style_url_resolver.d.ts +0 -8
  141. package/src/template_parser/binding_parser.d.ts +0 -91
  142. package/src/template_parser/template_preparser.d.ts +0 -24
  143. package/src/util.d.ts +0 -42
  144. package/src/version.d.ts +0 -14
  145. package/testing/package.json +0 -9
  146. package/testing/public_api.d.ts +0 -13
  147. package/testing/src/testing.d.ts +0 -23
  148. package/testing/testing.d.ts +0 -4
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.0-next.13
2
+ * @license Angular v14.0.0-next.16
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -211,7 +211,7 @@ class CssSelector {
211
211
  let inNot = false;
212
212
  _SELECTOR_REGEXP.lastIndex = 0;
213
213
  while (match = _SELECTOR_REGEXP.exec(selector)) {
214
- if (match[1 /* NOT */]) {
214
+ if (match[1 /* SelectorRegexp.NOT */]) {
215
215
  if (inNot) {
216
216
  throw new Error('Nesting :not in a selector is not allowed');
217
217
  }
@@ -219,9 +219,9 @@ class CssSelector {
219
219
  current = new CssSelector();
220
220
  cssSelector.notSelectors.push(current);
221
221
  }
222
- const tag = match[2 /* TAG */];
222
+ const tag = match[2 /* SelectorRegexp.TAG */];
223
223
  if (tag) {
224
- const prefix = match[3 /* PREFIX */];
224
+ const prefix = match[3 /* SelectorRegexp.PREFIX */];
225
225
  if (prefix === '#') {
226
226
  // #hash
227
227
  current.addAttribute('id', tag.slice(1));
@@ -235,15 +235,15 @@ class CssSelector {
235
235
  current.setElement(tag);
236
236
  }
237
237
  }
238
- const attribute = match[4 /* ATTRIBUTE */];
238
+ const attribute = match[4 /* SelectorRegexp.ATTRIBUTE */];
239
239
  if (attribute) {
240
- current.addAttribute(current.unescapeAttribute(attribute), match[6 /* ATTRIBUTE_VALUE */]);
240
+ current.addAttribute(current.unescapeAttribute(attribute), match[6 /* SelectorRegexp.ATTRIBUTE_VALUE */]);
241
241
  }
242
- if (match[7 /* NOT_END */]) {
242
+ if (match[7 /* SelectorRegexp.NOT_END */]) {
243
243
  inNot = false;
244
244
  current = cssSelector;
245
245
  }
246
- if (match[8 /* SEPARATOR */]) {
246
+ if (match[8 /* SelectorRegexp.SEPARATOR */]) {
247
247
  if (inNot) {
248
248
  throw new Error('Multiple selectors in :not are not supported');
249
249
  }
@@ -611,26 +611,26 @@ var MissingTranslationStrategy;
611
611
  })(MissingTranslationStrategy || (MissingTranslationStrategy = {}));
612
612
  function parserSelectorToSimpleSelector(selector) {
613
613
  const classes = selector.classNames && selector.classNames.length ?
614
- [8 /* CLASS */, ...selector.classNames] :
614
+ [8 /* SelectorFlags.CLASS */, ...selector.classNames] :
615
615
  [];
616
616
  const elementName = selector.element && selector.element !== '*' ? selector.element : '';
617
617
  return [elementName, ...selector.attrs, ...classes];
618
618
  }
619
619
  function parserSelectorToNegativeSelector(selector) {
620
620
  const classes = selector.classNames && selector.classNames.length ?
621
- [8 /* CLASS */, ...selector.classNames] :
621
+ [8 /* SelectorFlags.CLASS */, ...selector.classNames] :
622
622
  [];
623
623
  if (selector.element) {
624
624
  return [
625
- 1 /* NOT */ | 4 /* ELEMENT */, selector.element, ...selector.attrs, ...classes
625
+ 1 /* SelectorFlags.NOT */ | 4 /* SelectorFlags.ELEMENT */, selector.element, ...selector.attrs, ...classes
626
626
  ];
627
627
  }
628
628
  else if (selector.attrs.length) {
629
- return [1 /* NOT */ | 2 /* ATTRIBUTE */, ...selector.attrs, ...classes];
629
+ return [1 /* SelectorFlags.NOT */ | 2 /* SelectorFlags.ATTRIBUTE */, ...selector.attrs, ...classes];
630
630
  }
631
631
  else {
632
632
  return selector.classNames && selector.classNames.length ?
633
- [1 /* NOT */ | 8 /* CLASS */, ...selector.classNames] :
633
+ [1 /* SelectorFlags.NOT */ | 8 /* SelectorFlags.CLASS */, ...selector.classNames] :
634
634
  [];
635
635
  }
636
636
  }
@@ -756,13 +756,13 @@ class Version {
756
756
  this.patch = splits.slice(2).join('.');
757
757
  }
758
758
  }
759
- const __window = typeof window !== 'undefined' && window;
760
- const __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
761
- self instanceof WorkerGlobalScope && self;
762
- const __global = typeof global !== 'undefined' && global;
763
- // Check __global first, because in Node tests both __global and __window may be defined and _global
764
- // should be __global in that case.
765
- const _global = __global || __window || __self;
759
+ // Check `global` first, because in Node tests both `global` and `window` may be defined and our
760
+ // `_global` variable should point to the NodeJS `global` in that case. Note: Typeof/Instanceof
761
+ // checks are considered side-effects in Terser. We explicitly mark this as side-effect free:
762
+ // https://github.com/terser/terser/issues/250.
763
+ const _global = ( /* @__PURE__ */(() => (typeof global !== 'undefined' && global) || (typeof window !== 'undefined' && window) ||
764
+ (typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
765
+ self instanceof WorkerGlobalScope && self))());
766
766
  function newArray(size, value) {
767
767
  const list = [];
768
768
  for (let i = 0; i < size; i++) {
@@ -2924,6 +2924,7 @@ Identifiers.contentQuery = { name: 'ɵɵcontentQuery', moduleName: CORE };
2924
2924
  Identifiers.NgOnChangesFeature = { name: 'ɵɵNgOnChangesFeature', moduleName: CORE };
2925
2925
  Identifiers.InheritDefinitionFeature = { name: 'ɵɵInheritDefinitionFeature', moduleName: CORE };
2926
2926
  Identifiers.CopyDefinitionFeature = { name: 'ɵɵCopyDefinitionFeature', moduleName: CORE };
2927
+ Identifiers.StandaloneFeature = { name: 'ɵɵStandaloneFeature', moduleName: CORE };
2927
2928
  Identifiers.ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE };
2928
2929
  Identifiers.listener = { name: 'ɵɵlistener', moduleName: CORE };
2929
2930
  Identifiers.getInheritedFactory = {
@@ -3665,10 +3666,10 @@ function createMayBeForwardRefExpression(expression, forwardRef) {
3665
3666
  */
3666
3667
  function convertFromMaybeForwardRefExpression({ expression, forwardRef }) {
3667
3668
  switch (forwardRef) {
3668
- case 0 /* None */:
3669
- case 1 /* Wrapped */:
3669
+ case 0 /* ForwardRefHandling.None */:
3670
+ case 1 /* ForwardRefHandling.Wrapped */:
3670
3671
  return expression;
3671
- case 2 /* Unwrapped */:
3672
+ case 2 /* ForwardRefHandling.Unwrapped */:
3672
3673
  return generateForwardRef(expression);
3673
3674
  }
3674
3675
  }
@@ -3792,14 +3793,14 @@ function compileInjectDependency(dep, target, index) {
3792
3793
  }
3793
3794
  else if (dep.attributeNameType === null) {
3794
3795
  // Build up the injection flags according to the metadata.
3795
- const flags = 0 /* Default */ | (dep.self ? 2 /* Self */ : 0) |
3796
- (dep.skipSelf ? 4 /* SkipSelf */ : 0) | (dep.host ? 1 /* Host */ : 0) |
3797
- (dep.optional ? 8 /* Optional */ : 0) |
3798
- (target === FactoryTarget$1.Pipe ? 16 /* ForPipe */ : 0);
3796
+ const flags = 0 /* InjectFlags.Default */ | (dep.self ? 2 /* InjectFlags.Self */ : 0) |
3797
+ (dep.skipSelf ? 4 /* InjectFlags.SkipSelf */ : 0) | (dep.host ? 1 /* InjectFlags.Host */ : 0) |
3798
+ (dep.optional ? 8 /* InjectFlags.Optional */ : 0) |
3799
+ (target === FactoryTarget$1.Pipe ? 16 /* InjectFlags.ForPipe */ : 0);
3799
3800
  // If this dependency is optional or otherwise has non-default flags, then additional
3800
3801
  // parameters describing how to inject the dependency must be passed to the inject function
3801
3802
  // that's being used.
3802
- let flagsParam = (flags !== 0 /* Default */ || dep.optional) ? literal(flags) : null;
3803
+ let flagsParam = (flags !== 0 /* InjectFlags.Default */ || dep.optional) ? literal(flags) : null;
3803
3804
  // Build up the arguments to the injectFn call.
3804
3805
  const injectArgs = [dep.token];
3805
3806
  if (flagsParam) {
@@ -3970,8 +3971,8 @@ class BoundEvent {
3970
3971
  this.keySpan = keySpan;
3971
3972
  }
3972
3973
  static fromParsedEvent(event) {
3973
- const target = event.type === 0 /* Regular */ ? event.targetOrPhase : null;
3974
- const phase = event.type === 1 /* Animation */ ? event.targetOrPhase : null;
3974
+ const target = event.type === 0 /* ParsedEventType.Regular */ ? event.targetOrPhase : null;
3975
+ const phase = event.type === 1 /* ParsedEventType.Animation */ ? event.targetOrPhase : null;
3975
3976
  if (event.keySpan === undefined) {
3976
3977
  throw new Error(`Unexpected state: keySpan must be defined for bound event but was not for ${event.name}: ${event.sourceSpan}`);
3977
3978
  }
@@ -4795,7 +4796,7 @@ function assembleBoundTextPlaceholders(meta, bindingStartIndex = 0, contextId =
4795
4796
  * @param useCamelCase whether to camelCase the placeholder name when formatting.
4796
4797
  * @returns A new map of formatted placeholder names to expressions.
4797
4798
  */
4798
- function i18nFormatPlaceholderNames(params = {}, useCamelCase) {
4799
+ function formatI18nPlaceholderNamesInMap(params = {}, useCamelCase) {
4799
4800
  const _params = {};
4800
4801
  if (params && Object.keys(params).length) {
4801
4802
  Object.keys(params).forEach(key => _params[formatI18nPlaceholderName(key, useCamelCase)] = params[key]);
@@ -5029,10 +5030,10 @@ function getQueryPredicate(query, constantPool) {
5029
5030
  else {
5030
5031
  // The original predicate may have been wrapped in a `forwardRef()` call.
5031
5032
  switch (query.predicate.forwardRef) {
5032
- case 0 /* None */:
5033
- case 2 /* Unwrapped */:
5033
+ case 0 /* ForwardRefHandling.None */:
5034
+ case 2 /* ForwardRefHandling.Unwrapped */:
5034
5035
  return query.predicate.expression;
5035
- case 1 /* Wrapped */:
5036
+ case 1 /* ForwardRefHandling.Wrapped */:
5036
5037
  return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);
5037
5038
  }
5038
5039
  }
@@ -6162,9 +6163,24 @@ function createPipeType(metadata) {
6162
6163
  return new ExpressionType(importExpr(Identifiers.PipeDeclaration, [
6163
6164
  typeWithParameters(metadata.type.type, metadata.typeArgumentCount),
6164
6165
  new ExpressionType(new LiteralExpr(metadata.pipeName)),
6166
+ new ExpressionType(new LiteralExpr(metadata.isStandalone)),
6165
6167
  ]));
6166
6168
  }
6167
6169
 
6170
+ /**
6171
+ * @license
6172
+ * Copyright Google LLC All Rights Reserved.
6173
+ *
6174
+ * Use of this source code is governed by an MIT-style license that can be
6175
+ * found in the LICENSE file at https://angular.io/license
6176
+ */
6177
+ var R3TemplateDependencyKind;
6178
+ (function (R3TemplateDependencyKind) {
6179
+ R3TemplateDependencyKind[R3TemplateDependencyKind["Directive"] = 0] = "Directive";
6180
+ R3TemplateDependencyKind[R3TemplateDependencyKind["Pipe"] = 1] = "Pipe";
6181
+ R3TemplateDependencyKind[R3TemplateDependencyKind["NgModule"] = 2] = "NgModule";
6182
+ })(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
6183
+
6168
6184
  /**
6169
6185
  * @license
6170
6186
  * Copyright Google LLC All Rights Reserved.
@@ -8417,7 +8433,7 @@ function parse(value) {
8417
8433
  const styles = [];
8418
8434
  let i = 0;
8419
8435
  let parenDepth = 0;
8420
- let quote = 0 /* QuoteNone */;
8436
+ let quote = 0 /* Char.QuoteNone */;
8421
8437
  let valueStart = 0;
8422
8438
  let propStart = 0;
8423
8439
  let currentProp = null;
@@ -8425,41 +8441,41 @@ function parse(value) {
8425
8441
  while (i < value.length) {
8426
8442
  const token = value.charCodeAt(i++);
8427
8443
  switch (token) {
8428
- case 40 /* OpenParen */:
8444
+ case 40 /* Char.OpenParen */:
8429
8445
  parenDepth++;
8430
8446
  break;
8431
- case 41 /* CloseParen */:
8447
+ case 41 /* Char.CloseParen */:
8432
8448
  parenDepth--;
8433
8449
  break;
8434
- case 39 /* QuoteSingle */:
8450
+ case 39 /* Char.QuoteSingle */:
8435
8451
  // valueStart needs to be there since prop values don't
8436
8452
  // have quotes in CSS
8437
8453
  valueHasQuotes = valueHasQuotes || valueStart > 0;
8438
- if (quote === 0 /* QuoteNone */) {
8439
- quote = 39 /* QuoteSingle */;
8454
+ if (quote === 0 /* Char.QuoteNone */) {
8455
+ quote = 39 /* Char.QuoteSingle */;
8440
8456
  }
8441
- else if (quote === 39 /* QuoteSingle */ && value.charCodeAt(i - 1) !== 92 /* BackSlash */) {
8442
- quote = 0 /* QuoteNone */;
8457
+ else if (quote === 39 /* Char.QuoteSingle */ && value.charCodeAt(i - 1) !== 92 /* Char.BackSlash */) {
8458
+ quote = 0 /* Char.QuoteNone */;
8443
8459
  }
8444
8460
  break;
8445
- case 34 /* QuoteDouble */:
8461
+ case 34 /* Char.QuoteDouble */:
8446
8462
  // same logic as above
8447
8463
  valueHasQuotes = valueHasQuotes || valueStart > 0;
8448
- if (quote === 0 /* QuoteNone */) {
8449
- quote = 34 /* QuoteDouble */;
8464
+ if (quote === 0 /* Char.QuoteNone */) {
8465
+ quote = 34 /* Char.QuoteDouble */;
8450
8466
  }
8451
- else if (quote === 34 /* QuoteDouble */ && value.charCodeAt(i - 1) !== 92 /* BackSlash */) {
8452
- quote = 0 /* QuoteNone */;
8467
+ else if (quote === 34 /* Char.QuoteDouble */ && value.charCodeAt(i - 1) !== 92 /* Char.BackSlash */) {
8468
+ quote = 0 /* Char.QuoteNone */;
8453
8469
  }
8454
8470
  break;
8455
- case 58 /* Colon */:
8456
- if (!currentProp && parenDepth === 0 && quote === 0 /* QuoteNone */) {
8471
+ case 58 /* Char.Colon */:
8472
+ if (!currentProp && parenDepth === 0 && quote === 0 /* Char.QuoteNone */) {
8457
8473
  currentProp = hyphenate(value.substring(propStart, i - 1).trim());
8458
8474
  valueStart = i;
8459
8475
  }
8460
8476
  break;
8461
- case 59 /* Semicolon */:
8462
- if (currentProp && valueStart > 0 && parenDepth === 0 && quote === 0 /* QuoteNone */) {
8477
+ case 59 /* Char.Semicolon */:
8478
+ if (currentProp && valueStart > 0 && parenDepth === 0 && quote === 0 /* Char.QuoteNone */) {
8463
8479
  const styleVal = value.substring(valueStart, i - 1).trim();
8464
8480
  styles.push(currentProp, valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal);
8465
8481
  propStart = i;
@@ -8479,7 +8495,7 @@ function parse(value) {
8479
8495
  function stripUnnecessaryQuotes(value) {
8480
8496
  const qS = value.charCodeAt(0);
8481
8497
  const qE = value.charCodeAt(value.length - 1);
8482
- if (qS == qE && (qS == 39 /* QuoteSingle */ || qS == 34 /* QuoteDouble */)) {
8498
+ if (qS == qE && (qS == 39 /* Char.QuoteSingle */ || qS == 34 /* Char.QuoteDouble */)) {
8483
8499
  const tempValue = value.substring(1, value.length - 1);
8484
8500
  // special case to avoid using a multi-quoted string that was just chomped
8485
8501
  // (e.g. `font-family: "Verdana", "sans-serif"`)
@@ -8630,13 +8646,13 @@ class StylingBuilder {
8630
8646
  let binding = null;
8631
8647
  let name = input.name;
8632
8648
  switch (input.type) {
8633
- case 0 /* Property */:
8649
+ case 0 /* BindingType.Property */:
8634
8650
  binding = this.registerInputBasedOnName(name, input.value, input.sourceSpan);
8635
8651
  break;
8636
- case 3 /* Style */:
8652
+ case 3 /* BindingType.Style */:
8637
8653
  binding = this.registerStyleInput(name, false, input.value, input.sourceSpan, input.unit);
8638
8654
  break;
8639
- case 2 /* Class */:
8655
+ case 2 /* BindingType.Class */:
8640
8656
  binding = this.registerClassInput(name, false, input.value, input.sourceSpan);
8641
8657
  break;
8642
8658
  }
@@ -8735,14 +8751,14 @@ class StylingBuilder {
8735
8751
  populateInitialStylingAttrs(attrs) {
8736
8752
  // [CLASS_MARKER, 'foo', 'bar', 'baz' ...]
8737
8753
  if (this._initialClassValues.length) {
8738
- attrs.push(literal(1 /* Classes */));
8754
+ attrs.push(literal(1 /* AttributeMarker.Classes */));
8739
8755
  for (let i = 0; i < this._initialClassValues.length; i++) {
8740
8756
  attrs.push(literal(this._initialClassValues[i]));
8741
8757
  }
8742
8758
  }
8743
8759
  // [STYLE_MARKER, 'width', '200px', 'height', '100px', ...]
8744
8760
  if (this._initialStyleValues.length) {
8745
- attrs.push(literal(2 /* Styles */));
8761
+ attrs.push(literal(2 /* AttributeMarker.Styles */));
8746
8762
  for (let i = 0; i < this._initialStyleValues.length; i += 2) {
8747
8763
  attrs.push(literal(this._initialStyleValues[i]), literal(this._initialStyleValues[i + 1]));
8748
8764
  }
@@ -9474,9 +9490,9 @@ class Parser$1 {
9474
9490
  this._checkNoInterpolation(input, location, interpolationConfig);
9475
9491
  const sourceToLex = this._stripComments(input);
9476
9492
  const tokens = this._lexer.tokenize(sourceToLex);
9477
- let flags = 1 /* Action */;
9493
+ let flags = 1 /* ParseFlags.Action */;
9478
9494
  if (isAssignmentEvent) {
9479
- flags |= 2 /* AssignmentEvent */;
9495
+ flags |= 2 /* ParseFlags.AssignmentEvent */;
9480
9496
  }
9481
9497
  const ast = new _ParseAST(input, location, absoluteOffset, tokens, flags, this.errors, 0).parseChain();
9482
9498
  return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
@@ -9505,7 +9521,7 @@ class Parser$1 {
9505
9521
  this._checkNoInterpolation(input, location, interpolationConfig);
9506
9522
  const sourceToLex = this._stripComments(input);
9507
9523
  const tokens = this._lexer.tokenize(sourceToLex);
9508
- return new _ParseAST(input, location, absoluteOffset, tokens, 0 /* None */, this.errors, 0)
9524
+ return new _ParseAST(input, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0)
9509
9525
  .parseChain();
9510
9526
  }
9511
9527
  /**
@@ -9536,7 +9552,7 @@ class Parser$1 {
9536
9552
  */
9537
9553
  parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {
9538
9554
  const tokens = this._lexer.tokenize(templateValue);
9539
- const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, 0 /* None */, this.errors, 0 /* relative offset */);
9555
+ const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0 /* relative offset */);
9540
9556
  return parser.parseTemplateBindings({
9541
9557
  source: templateKey,
9542
9558
  span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length),
@@ -9551,7 +9567,7 @@ class Parser$1 {
9551
9567
  const expressionText = expressions[i].text;
9552
9568
  const sourceToLex = this._stripComments(expressionText);
9553
9569
  const tokens = this._lexer.tokenize(sourceToLex);
9554
- const ast = new _ParseAST(input, location, absoluteOffset, tokens, 0 /* None */, this.errors, offsets[i])
9570
+ const ast = new _ParseAST(input, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, offsets[i])
9555
9571
  .parseChain();
9556
9572
  expressionNodes.push(ast);
9557
9573
  }
@@ -9565,7 +9581,7 @@ class Parser$1 {
9565
9581
  parseInterpolationExpression(expression, location, absoluteOffset) {
9566
9582
  const sourceToLex = this._stripComments(expression);
9567
9583
  const tokens = this._lexer.tokenize(sourceToLex);
9568
- const ast = new _ParseAST(expression, location, absoluteOffset, tokens, 0 /* None */, this.errors, 0)
9584
+ const ast = new _ParseAST(expression, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0)
9569
9585
  .parseChain();
9570
9586
  const strings = ['', '']; // The prefix and suffix strings are both empty
9571
9587
  return this.createInterpolationAst(strings, [ast], expression, location, absoluteOffset);
@@ -9922,7 +9938,7 @@ class _ParseAST {
9922
9938
  const expr = this.parsePipe();
9923
9939
  exprs.push(expr);
9924
9940
  if (this.consumeOptionalCharacter($SEMICOLON)) {
9925
- if (!(this.parseFlags & 1 /* Action */)) {
9941
+ if (!(this.parseFlags & 1 /* ParseFlags.Action */)) {
9926
9942
  this.error('Binding expression cannot contain chained expression');
9927
9943
  }
9928
9944
  while (this.consumeOptionalCharacter($SEMICOLON)) {
@@ -9946,7 +9962,7 @@ class _ParseAST {
9946
9962
  const start = this.inputIndex;
9947
9963
  let result = this.parseExpression();
9948
9964
  if (this.consumeOptionalOperator('|')) {
9949
- if (this.parseFlags & 1 /* Action */) {
9965
+ if (this.parseFlags & 1 /* ParseFlags.Action */) {
9950
9966
  this.error('Cannot have a pipe in an action expression');
9951
9967
  }
9952
9968
  do {
@@ -10299,7 +10315,7 @@ class _ParseAST {
10299
10315
  }
10300
10316
  else {
10301
10317
  if (this.consumeOptionalAssignment()) {
10302
- if (!(this.parseFlags & 1 /* Action */)) {
10318
+ if (!(this.parseFlags & 1 /* ParseFlags.Action */)) {
10303
10319
  this.error('Bindings cannot contain assignments');
10304
10320
  return new EmptyExpr(this.span(start), this.sourceSpan(start));
10305
10321
  }
@@ -10331,7 +10347,7 @@ class _ParseAST {
10331
10347
  // primary expression is substituted as LHS of the assignment operator to achieve
10332
10348
  // two-way-binding, such that the LHS could be the non-null operator. The grammar doesn't
10333
10349
  // naturally allow for this syntax, so assignment events are parsed specially.
10334
- if ((this.parseFlags & 2 /* AssignmentEvent */) && this.next.isOperator('!') &&
10350
+ if ((this.parseFlags & 2 /* ParseFlags.AssignmentEvent */) && this.next.isOperator('!') &&
10335
10351
  this.peek(1).isOperator('=')) {
10336
10352
  // First skip over the ! operator.
10337
10353
  this.advance();
@@ -10653,7 +10669,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
10653
10669
  let tokenIndex = 0;
10654
10670
  while (tokenIndex < interpolatedTokens.length) {
10655
10671
  const currentToken = interpolatedTokens[tokenIndex];
10656
- if (currentToken.type === 9 /* ENCODED_ENTITY */) {
10672
+ if (currentToken.type === 9 /* MlParserTokenType.ENCODED_ENTITY */) {
10657
10673
  const [decoded, encoded] = currentToken.parts;
10658
10674
  consumedInOriginalTemplate += encoded.length;
10659
10675
  consumedInInput += decoded.length;
@@ -13051,14 +13067,14 @@ class _Tokenizer {
13051
13067
  else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {
13052
13068
  // In (possibly interpolated) text the end of the text is given by `isTextEnd()`, while
13053
13069
  // the premature end of an interpolation is given by the start of a new HTML element.
13054
- this._consumeWithInterpolation(5 /* TEXT */, 8 /* INTERPOLATION */, () => this._isTextEnd(), () => this._isTagStart());
13070
+ this._consumeWithInterpolation(5 /* TokenType.TEXT */, 8 /* TokenType.INTERPOLATION */, () => this._isTextEnd(), () => this._isTagStart());
13055
13071
  }
13056
13072
  }
13057
13073
  catch (e) {
13058
13074
  this.handleError(e);
13059
13075
  }
13060
13076
  }
13061
- this._beginToken(24 /* EOF */);
13077
+ this._beginToken(24 /* TokenType.EOF */);
13062
13078
  this._endToken([]);
13063
13079
  }
13064
13080
  /**
@@ -13202,7 +13218,7 @@ class _Tokenizer {
13202
13218
  return char;
13203
13219
  }
13204
13220
  _consumeEntity(textTokenType) {
13205
- this._beginToken(9 /* ENCODED_ENTITY */);
13221
+ this._beginToken(9 /* TokenType.ENCODED_ENTITY */);
13206
13222
  const start = this._cursor.clone();
13207
13223
  this._cursor.advance();
13208
13224
  if (this._attemptCharCode($HASH)) {
@@ -13248,7 +13264,7 @@ class _Tokenizer {
13248
13264
  }
13249
13265
  }
13250
13266
  _consumeRawText(consumeEntities, endMarkerPredicate) {
13251
- this._beginToken(consumeEntities ? 6 /* ESCAPABLE_RAW_TEXT */ : 7 /* RAW_TEXT */);
13267
+ this._beginToken(consumeEntities ? 6 /* TokenType.ESCAPABLE_RAW_TEXT */ : 7 /* TokenType.RAW_TEXT */);
13252
13268
  const parts = [];
13253
13269
  while (true) {
13254
13270
  const tagCloseStart = this._cursor.clone();
@@ -13260,8 +13276,8 @@ class _Tokenizer {
13260
13276
  if (consumeEntities && this._cursor.peek() === $AMPERSAND) {
13261
13277
  this._endToken([this._processCarriageReturns(parts.join(''))]);
13262
13278
  parts.length = 0;
13263
- this._consumeEntity(6 /* ESCAPABLE_RAW_TEXT */);
13264
- this._beginToken(6 /* ESCAPABLE_RAW_TEXT */);
13279
+ this._consumeEntity(6 /* TokenType.ESCAPABLE_RAW_TEXT */);
13280
+ this._beginToken(6 /* TokenType.ESCAPABLE_RAW_TEXT */);
13265
13281
  }
13266
13282
  else {
13267
13283
  parts.push(this._readChar());
@@ -13270,25 +13286,25 @@ class _Tokenizer {
13270
13286
  this._endToken([this._processCarriageReturns(parts.join(''))]);
13271
13287
  }
13272
13288
  _consumeComment(start) {
13273
- this._beginToken(10 /* COMMENT_START */, start);
13289
+ this._beginToken(10 /* TokenType.COMMENT_START */, start);
13274
13290
  this._requireCharCode($MINUS);
13275
13291
  this._endToken([]);
13276
13292
  this._consumeRawText(false, () => this._attemptStr('-->'));
13277
- this._beginToken(11 /* COMMENT_END */);
13293
+ this._beginToken(11 /* TokenType.COMMENT_END */);
13278
13294
  this._requireStr('-->');
13279
13295
  this._endToken([]);
13280
13296
  }
13281
13297
  _consumeCdata(start) {
13282
- this._beginToken(12 /* CDATA_START */, start);
13298
+ this._beginToken(12 /* TokenType.CDATA_START */, start);
13283
13299
  this._requireStr('CDATA[');
13284
13300
  this._endToken([]);
13285
13301
  this._consumeRawText(false, () => this._attemptStr(']]>'));
13286
- this._beginToken(13 /* CDATA_END */);
13302
+ this._beginToken(13 /* TokenType.CDATA_END */);
13287
13303
  this._requireStr(']]>');
13288
13304
  this._endToken([]);
13289
13305
  }
13290
13306
  _consumeDocType(start) {
13291
- this._beginToken(18 /* DOC_TYPE */, start);
13307
+ this._beginToken(18 /* TokenType.DOC_TYPE */, start);
13292
13308
  const contentStart = this._cursor.clone();
13293
13309
  this._attemptUntilChar($GT);
13294
13310
  const content = this._cursor.getChars(contentStart);
@@ -13342,12 +13358,12 @@ class _Tokenizer {
13342
13358
  if (e instanceof _ControlFlowError) {
13343
13359
  if (openTagToken) {
13344
13360
  // We errored before we could close the opening tag, so it is incomplete.
13345
- openTagToken.type = 4 /* INCOMPLETE_TAG_OPEN */;
13361
+ openTagToken.type = 4 /* TokenType.INCOMPLETE_TAG_OPEN */;
13346
13362
  }
13347
13363
  else {
13348
13364
  // When the start tag is invalid, assume we want a "<" as text.
13349
13365
  // Back to back text tokens are merged at the end.
13350
- this._beginToken(5 /* TEXT */, start);
13366
+ this._beginToken(5 /* TokenType.TEXT */, start);
13351
13367
  this._endToken(['<']);
13352
13368
  }
13353
13369
  return;
@@ -13374,13 +13390,13 @@ class _Tokenizer {
13374
13390
  this._attemptCharCodeUntilFn(isNotWhitespace);
13375
13391
  return this._attemptCharCode($GT);
13376
13392
  });
13377
- this._beginToken(3 /* TAG_CLOSE */);
13393
+ this._beginToken(3 /* TokenType.TAG_CLOSE */);
13378
13394
  this._requireCharCodeUntilFn(code => code === $GT, 3);
13379
13395
  this._cursor.advance(); // Consume the `>`
13380
13396
  this._endToken([prefix, tagName]);
13381
13397
  }
13382
13398
  _consumeTagOpenStart(start) {
13383
- this._beginToken(0 /* TAG_OPEN_START */, start);
13399
+ this._beginToken(0 /* TokenType.TAG_OPEN_START */, start);
13384
13400
  const parts = this._consumePrefixAndName();
13385
13401
  return this._endToken(parts);
13386
13402
  }
@@ -13389,7 +13405,7 @@ class _Tokenizer {
13389
13405
  if (attrNameStart === $SQ || attrNameStart === $DQ) {
13390
13406
  throw this._createError(_unexpectedCharacterErrorMsg(attrNameStart), this._cursor.getSpan());
13391
13407
  }
13392
- this._beginToken(14 /* ATTR_NAME */);
13408
+ this._beginToken(14 /* TokenType.ATTR_NAME */);
13393
13409
  const prefixAndName = this._consumePrefixAndName();
13394
13410
  this._endToken(prefixAndName);
13395
13411
  }
@@ -13401,27 +13417,27 @@ class _Tokenizer {
13401
13417
  // In an attribute then end of the attribute value and the premature end to an interpolation
13402
13418
  // are both triggered by the `quoteChar`.
13403
13419
  const endPredicate = () => this._cursor.peek() === quoteChar;
13404
- this._consumeWithInterpolation(16 /* ATTR_VALUE_TEXT */, 17 /* ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);
13420
+ this._consumeWithInterpolation(16 /* TokenType.ATTR_VALUE_TEXT */, 17 /* TokenType.ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);
13405
13421
  this._consumeQuote(quoteChar);
13406
13422
  }
13407
13423
  else {
13408
13424
  const endPredicate = () => isNameEnd(this._cursor.peek());
13409
- this._consumeWithInterpolation(16 /* ATTR_VALUE_TEXT */, 17 /* ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);
13425
+ this._consumeWithInterpolation(16 /* TokenType.ATTR_VALUE_TEXT */, 17 /* TokenType.ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);
13410
13426
  }
13411
13427
  }
13412
13428
  _consumeQuote(quoteChar) {
13413
- this._beginToken(15 /* ATTR_QUOTE */);
13429
+ this._beginToken(15 /* TokenType.ATTR_QUOTE */);
13414
13430
  this._requireCharCode(quoteChar);
13415
13431
  this._endToken([String.fromCodePoint(quoteChar)]);
13416
13432
  }
13417
13433
  _consumeTagOpenEnd() {
13418
- const tokenType = this._attemptCharCode($SLASH) ? 2 /* TAG_OPEN_END_VOID */ : 1 /* TAG_OPEN_END */;
13434
+ const tokenType = this._attemptCharCode($SLASH) ? 2 /* TokenType.TAG_OPEN_END_VOID */ : 1 /* TokenType.TAG_OPEN_END */;
13419
13435
  this._beginToken(tokenType);
13420
13436
  this._requireCharCode($GT);
13421
13437
  this._endToken([]);
13422
13438
  }
13423
13439
  _consumeTagClose(start) {
13424
- this._beginToken(3 /* TAG_CLOSE */, start);
13440
+ this._beginToken(3 /* TokenType.TAG_CLOSE */, start);
13425
13441
  this._attemptCharCodeUntilFn(isNotWhitespace);
13426
13442
  const prefixAndName = this._consumePrefixAndName();
13427
13443
  this._attemptCharCodeUntilFn(isNotWhitespace);
@@ -13429,11 +13445,11 @@ class _Tokenizer {
13429
13445
  this._endToken(prefixAndName);
13430
13446
  }
13431
13447
  _consumeExpansionFormStart() {
13432
- this._beginToken(19 /* EXPANSION_FORM_START */);
13448
+ this._beginToken(19 /* TokenType.EXPANSION_FORM_START */);
13433
13449
  this._requireCharCode($LBRACE);
13434
13450
  this._endToken([]);
13435
- this._expansionCaseStack.push(19 /* EXPANSION_FORM_START */);
13436
- this._beginToken(7 /* RAW_TEXT */);
13451
+ this._expansionCaseStack.push(19 /* TokenType.EXPANSION_FORM_START */);
13452
+ this._beginToken(7 /* TokenType.RAW_TEXT */);
13437
13453
  const condition = this._readUntil($COMMA);
13438
13454
  const normalizedCondition = this._processCarriageReturns(condition);
13439
13455
  if (this._i18nNormalizeLineEndingsInICUs) {
@@ -13449,32 +13465,32 @@ class _Tokenizer {
13449
13465
  }
13450
13466
  this._requireCharCode($COMMA);
13451
13467
  this._attemptCharCodeUntilFn(isNotWhitespace);
13452
- this._beginToken(7 /* RAW_TEXT */);
13468
+ this._beginToken(7 /* TokenType.RAW_TEXT */);
13453
13469
  const type = this._readUntil($COMMA);
13454
13470
  this._endToken([type]);
13455
13471
  this._requireCharCode($COMMA);
13456
13472
  this._attemptCharCodeUntilFn(isNotWhitespace);
13457
13473
  }
13458
13474
  _consumeExpansionCaseStart() {
13459
- this._beginToken(20 /* EXPANSION_CASE_VALUE */);
13475
+ this._beginToken(20 /* TokenType.EXPANSION_CASE_VALUE */);
13460
13476
  const value = this._readUntil($LBRACE).trim();
13461
13477
  this._endToken([value]);
13462
13478
  this._attemptCharCodeUntilFn(isNotWhitespace);
13463
- this._beginToken(21 /* EXPANSION_CASE_EXP_START */);
13479
+ this._beginToken(21 /* TokenType.EXPANSION_CASE_EXP_START */);
13464
13480
  this._requireCharCode($LBRACE);
13465
13481
  this._endToken([]);
13466
13482
  this._attemptCharCodeUntilFn(isNotWhitespace);
13467
- this._expansionCaseStack.push(21 /* EXPANSION_CASE_EXP_START */);
13483
+ this._expansionCaseStack.push(21 /* TokenType.EXPANSION_CASE_EXP_START */);
13468
13484
  }
13469
13485
  _consumeExpansionCaseEnd() {
13470
- this._beginToken(22 /* EXPANSION_CASE_EXP_END */);
13486
+ this._beginToken(22 /* TokenType.EXPANSION_CASE_EXP_END */);
13471
13487
  this._requireCharCode($RBRACE);
13472
13488
  this._endToken([]);
13473
13489
  this._attemptCharCodeUntilFn(isNotWhitespace);
13474
13490
  this._expansionCaseStack.pop();
13475
13491
  }
13476
13492
  _consumeExpansionFormEnd() {
13477
- this._beginToken(23 /* EXPANSION_FORM_END */);
13493
+ this._beginToken(23 /* TokenType.EXPANSION_FORM_END */);
13478
13494
  this._requireCharCode($RBRACE);
13479
13495
  this._endToken([]);
13480
13496
  this._expansionCaseStack.pop();
@@ -13624,12 +13640,12 @@ class _Tokenizer {
13624
13640
  _isInExpansionCase() {
13625
13641
  return this._expansionCaseStack.length > 0 &&
13626
13642
  this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
13627
- 21 /* EXPANSION_CASE_EXP_START */;
13643
+ 21 /* TokenType.EXPANSION_CASE_EXP_START */;
13628
13644
  }
13629
13645
  _isInExpansionForm() {
13630
13646
  return this._expansionCaseStack.length > 0 &&
13631
13647
  this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
13632
- 19 /* EXPANSION_FORM_START */;
13648
+ 19 /* TokenType.EXPANSION_FORM_START */;
13633
13649
  }
13634
13650
  isExpansionFormStart() {
13635
13651
  if (this._cursor.peek() !== $LBRACE) {
@@ -13676,9 +13692,9 @@ function mergeTextTokens(srcTokens) {
13676
13692
  let lastDstToken = undefined;
13677
13693
  for (let i = 0; i < srcTokens.length; i++) {
13678
13694
  const token = srcTokens[i];
13679
- if ((lastDstToken && lastDstToken.type === 5 /* TEXT */ && token.type === 5 /* TEXT */) ||
13680
- (lastDstToken && lastDstToken.type === 16 /* ATTR_VALUE_TEXT */ &&
13681
- token.type === 16 /* ATTR_VALUE_TEXT */)) {
13695
+ if ((lastDstToken && lastDstToken.type === 5 /* TokenType.TEXT */ && token.type === 5 /* TokenType.TEXT */) ||
13696
+ (lastDstToken && lastDstToken.type === 16 /* TokenType.ATTR_VALUE_TEXT */ &&
13697
+ token.type === 16 /* TokenType.ATTR_VALUE_TEXT */)) {
13682
13698
  lastDstToken.parts[0] += token.parts[0];
13683
13699
  lastDstToken.sourceSpan.end = token.sourceSpan.end;
13684
13700
  }
@@ -13971,28 +13987,28 @@ class _TreeBuilder {
13971
13987
  this._advance();
13972
13988
  }
13973
13989
  build() {
13974
- while (this._peek.type !== 24 /* EOF */) {
13975
- if (this._peek.type === 0 /* TAG_OPEN_START */ ||
13976
- this._peek.type === 4 /* INCOMPLETE_TAG_OPEN */) {
13990
+ while (this._peek.type !== 24 /* TokenType.EOF */) {
13991
+ if (this._peek.type === 0 /* TokenType.TAG_OPEN_START */ ||
13992
+ this._peek.type === 4 /* TokenType.INCOMPLETE_TAG_OPEN */) {
13977
13993
  this._consumeStartTag(this._advance());
13978
13994
  }
13979
- else if (this._peek.type === 3 /* TAG_CLOSE */) {
13995
+ else if (this._peek.type === 3 /* TokenType.TAG_CLOSE */) {
13980
13996
  this._consumeEndTag(this._advance());
13981
13997
  }
13982
- else if (this._peek.type === 12 /* CDATA_START */) {
13998
+ else if (this._peek.type === 12 /* TokenType.CDATA_START */) {
13983
13999
  this._closeVoidElement();
13984
14000
  this._consumeCdata(this._advance());
13985
14001
  }
13986
- else if (this._peek.type === 10 /* COMMENT_START */) {
14002
+ else if (this._peek.type === 10 /* TokenType.COMMENT_START */) {
13987
14003
  this._closeVoidElement();
13988
14004
  this._consumeComment(this._advance());
13989
14005
  }
13990
- else if (this._peek.type === 5 /* TEXT */ || this._peek.type === 7 /* RAW_TEXT */ ||
13991
- this._peek.type === 6 /* ESCAPABLE_RAW_TEXT */) {
14006
+ else if (this._peek.type === 5 /* TokenType.TEXT */ || this._peek.type === 7 /* TokenType.RAW_TEXT */ ||
14007
+ this._peek.type === 6 /* TokenType.ESCAPABLE_RAW_TEXT */) {
13992
14008
  this._closeVoidElement();
13993
14009
  this._consumeText(this._advance());
13994
14010
  }
13995
- else if (this._peek.type === 19 /* EXPANSION_FORM_START */) {
14011
+ else if (this._peek.type === 19 /* TokenType.EXPANSION_FORM_START */) {
13996
14012
  this._consumeExpansion(this._advance());
13997
14013
  }
13998
14014
  else {
@@ -14018,11 +14034,11 @@ class _TreeBuilder {
14018
14034
  }
14019
14035
  _consumeCdata(_startToken) {
14020
14036
  this._consumeText(this._advance());
14021
- this._advanceIf(13 /* CDATA_END */);
14037
+ this._advanceIf(13 /* TokenType.CDATA_END */);
14022
14038
  }
14023
14039
  _consumeComment(token) {
14024
- const text = this._advanceIf(7 /* RAW_TEXT */);
14025
- this._advanceIf(11 /* COMMENT_END */);
14040
+ const text = this._advanceIf(7 /* TokenType.RAW_TEXT */);
14041
+ this._advanceIf(11 /* TokenType.COMMENT_END */);
14026
14042
  const value = text != null ? text.parts[0].trim() : null;
14027
14043
  this._addToParent(new Comment(value, token.sourceSpan));
14028
14044
  }
@@ -14031,14 +14047,14 @@ class _TreeBuilder {
14031
14047
  const type = this._advance();
14032
14048
  const cases = [];
14033
14049
  // read =
14034
- while (this._peek.type === 20 /* EXPANSION_CASE_VALUE */) {
14050
+ while (this._peek.type === 20 /* TokenType.EXPANSION_CASE_VALUE */) {
14035
14051
  const expCase = this._parseExpansionCase();
14036
14052
  if (!expCase)
14037
14053
  return; // error
14038
14054
  cases.push(expCase);
14039
14055
  }
14040
14056
  // read the final }
14041
- if (this._peek.type !== 23 /* EXPANSION_FORM_END */) {
14057
+ if (this._peek.type !== 23 /* TokenType.EXPANSION_FORM_END */) {
14042
14058
  this.errors.push(TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '}'.`));
14043
14059
  return;
14044
14060
  }
@@ -14049,7 +14065,7 @@ class _TreeBuilder {
14049
14065
  _parseExpansionCase() {
14050
14066
  const value = this._advance();
14051
14067
  // read {
14052
- if (this._peek.type !== 21 /* EXPANSION_CASE_EXP_START */) {
14068
+ if (this._peek.type !== 21 /* TokenType.EXPANSION_CASE_EXP_START */) {
14053
14069
  this.errors.push(TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '{'.`));
14054
14070
  return null;
14055
14071
  }
@@ -14059,7 +14075,7 @@ class _TreeBuilder {
14059
14075
  if (!exp)
14060
14076
  return null;
14061
14077
  const end = this._advance();
14062
- exp.push({ type: 24 /* EOF */, parts: [], sourceSpan: end.sourceSpan });
14078
+ exp.push({ type: 24 /* TokenType.EOF */, parts: [], sourceSpan: end.sourceSpan });
14063
14079
  // parse everything in between { and }
14064
14080
  const expansionCaseParser = new _TreeBuilder(exp, this.getTagDefinition);
14065
14081
  expansionCaseParser.build();
@@ -14073,14 +14089,14 @@ class _TreeBuilder {
14073
14089
  }
14074
14090
  _collectExpansionExpTokens(start) {
14075
14091
  const exp = [];
14076
- const expansionFormStack = [21 /* EXPANSION_CASE_EXP_START */];
14092
+ const expansionFormStack = [21 /* TokenType.EXPANSION_CASE_EXP_START */];
14077
14093
  while (true) {
14078
- if (this._peek.type === 19 /* EXPANSION_FORM_START */ ||
14079
- this._peek.type === 21 /* EXPANSION_CASE_EXP_START */) {
14094
+ if (this._peek.type === 19 /* TokenType.EXPANSION_FORM_START */ ||
14095
+ this._peek.type === 21 /* TokenType.EXPANSION_CASE_EXP_START */) {
14080
14096
  expansionFormStack.push(this._peek.type);
14081
14097
  }
14082
- if (this._peek.type === 22 /* EXPANSION_CASE_EXP_END */) {
14083
- if (lastOnStack(expansionFormStack, 21 /* EXPANSION_CASE_EXP_START */)) {
14098
+ if (this._peek.type === 22 /* TokenType.EXPANSION_CASE_EXP_END */) {
14099
+ if (lastOnStack(expansionFormStack, 21 /* TokenType.EXPANSION_CASE_EXP_START */)) {
14084
14100
  expansionFormStack.pop();
14085
14101
  if (expansionFormStack.length === 0)
14086
14102
  return exp;
@@ -14090,8 +14106,8 @@ class _TreeBuilder {
14090
14106
  return null;
14091
14107
  }
14092
14108
  }
14093
- if (this._peek.type === 23 /* EXPANSION_FORM_END */) {
14094
- if (lastOnStack(expansionFormStack, 19 /* EXPANSION_FORM_START */)) {
14109
+ if (this._peek.type === 23 /* TokenType.EXPANSION_FORM_END */) {
14110
+ if (lastOnStack(expansionFormStack, 19 /* TokenType.EXPANSION_FORM_START */)) {
14095
14111
  expansionFormStack.pop();
14096
14112
  }
14097
14113
  else {
@@ -14099,7 +14115,7 @@ class _TreeBuilder {
14099
14115
  return null;
14100
14116
  }
14101
14117
  }
14102
- if (this._peek.type === 24 /* EOF */) {
14118
+ if (this._peek.type === 24 /* TokenType.EOF */) {
14103
14119
  this.errors.push(TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`));
14104
14120
  return null;
14105
14121
  }
@@ -14118,18 +14134,18 @@ class _TreeBuilder {
14118
14134
  tokens[0] = { type: token.type, sourceSpan: token.sourceSpan, parts: [text] };
14119
14135
  }
14120
14136
  }
14121
- while (this._peek.type === 8 /* INTERPOLATION */ || this._peek.type === 5 /* TEXT */ ||
14122
- this._peek.type === 9 /* ENCODED_ENTITY */) {
14137
+ while (this._peek.type === 8 /* TokenType.INTERPOLATION */ || this._peek.type === 5 /* TokenType.TEXT */ ||
14138
+ this._peek.type === 9 /* TokenType.ENCODED_ENTITY */) {
14123
14139
  token = this._advance();
14124
14140
  tokens.push(token);
14125
- if (token.type === 8 /* INTERPOLATION */) {
14141
+ if (token.type === 8 /* TokenType.INTERPOLATION */) {
14126
14142
  // For backward compatibility we decode HTML entities that appear in interpolation
14127
14143
  // expressions. This is arguably a bug, but it could be a considerable breaking change to
14128
14144
  // fix it. It should be addressed in a larger project to refactor the entire parser/lexer
14129
14145
  // chain after View Engine has been removed.
14130
14146
  text += token.parts.join('').replace(/&([^;]+);/g, decodeEntity);
14131
14147
  }
14132
- else if (token.type === 9 /* ENCODED_ENTITY */) {
14148
+ else if (token.type === 9 /* TokenType.ENCODED_ENTITY */) {
14133
14149
  text += token.parts[0];
14134
14150
  }
14135
14151
  else {
@@ -14150,14 +14166,14 @@ class _TreeBuilder {
14150
14166
  _consumeStartTag(startTagToken) {
14151
14167
  const [prefix, name] = startTagToken.parts;
14152
14168
  const attrs = [];
14153
- while (this._peek.type === 14 /* ATTR_NAME */) {
14169
+ while (this._peek.type === 14 /* TokenType.ATTR_NAME */) {
14154
14170
  attrs.push(this._consumeAttr(this._advance()));
14155
14171
  }
14156
14172
  const fullName = this._getElementFullName(prefix, name, this._getParentElement());
14157
14173
  let selfClosing = false;
14158
14174
  // Note: There could have been a tokenizer error
14159
14175
  // so that we don't get a token for the end tag...
14160
- if (this._peek.type === 2 /* TAG_OPEN_END_VOID */) {
14176
+ if (this._peek.type === 2 /* TokenType.TAG_OPEN_END_VOID */) {
14161
14177
  this._advance();
14162
14178
  selfClosing = true;
14163
14179
  const tagDef = this.getTagDefinition(fullName);
@@ -14165,7 +14181,7 @@ class _TreeBuilder {
14165
14181
  this.errors.push(TreeError.create(fullName, startTagToken.sourceSpan, `Only void and foreign elements can be self closed "${startTagToken.parts[1]}"`));
14166
14182
  }
14167
14183
  }
14168
- else if (this._peek.type === 1 /* TAG_OPEN_END */) {
14184
+ else if (this._peek.type === 1 /* TokenType.TAG_OPEN_END */) {
14169
14185
  this._advance();
14170
14186
  selfClosing = false;
14171
14187
  }
@@ -14180,7 +14196,7 @@ class _TreeBuilder {
14180
14196
  // element start tag also represents the end tag.
14181
14197
  this._popElement(fullName, span);
14182
14198
  }
14183
- else if (startTagToken.type === 4 /* INCOMPLETE_TAG_OPEN */) {
14199
+ else if (startTagToken.type === 4 /* TokenType.INCOMPLETE_TAG_OPEN */) {
14184
14200
  // We already know the opening tag is not complete, so it is unlikely it has a corresponding
14185
14201
  // close tag. Let's optimistically parse it as a full element and emit an error.
14186
14202
  this._popElement(fullName, null);
@@ -14237,7 +14253,7 @@ class _TreeBuilder {
14237
14253
  const fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]);
14238
14254
  let attrEnd = attrName.sourceSpan.end;
14239
14255
  // Consume any quote
14240
- if (this._peek.type === 15 /* ATTR_QUOTE */) {
14256
+ if (this._peek.type === 15 /* TokenType.ATTR_QUOTE */) {
14241
14257
  this._advance();
14242
14258
  }
14243
14259
  // Consume the attribute value
@@ -14250,22 +14266,22 @@ class _TreeBuilder {
14250
14266
  // being able to consider `ATTR_VALUE_INTERPOLATION` as an option. This is because TS is not
14251
14267
  // able to see that `_advance()` will actually mutate `_peek`.
14252
14268
  const nextTokenType = this._peek.type;
14253
- if (nextTokenType === 16 /* ATTR_VALUE_TEXT */) {
14269
+ if (nextTokenType === 16 /* TokenType.ATTR_VALUE_TEXT */) {
14254
14270
  valueStartSpan = this._peek.sourceSpan;
14255
14271
  valueEnd = this._peek.sourceSpan.end;
14256
- while (this._peek.type === 16 /* ATTR_VALUE_TEXT */ ||
14257
- this._peek.type === 17 /* ATTR_VALUE_INTERPOLATION */ ||
14258
- this._peek.type === 9 /* ENCODED_ENTITY */) {
14272
+ while (this._peek.type === 16 /* TokenType.ATTR_VALUE_TEXT */ ||
14273
+ this._peek.type === 17 /* TokenType.ATTR_VALUE_INTERPOLATION */ ||
14274
+ this._peek.type === 9 /* TokenType.ENCODED_ENTITY */) {
14259
14275
  const valueToken = this._advance();
14260
14276
  valueTokens.push(valueToken);
14261
- if (valueToken.type === 17 /* ATTR_VALUE_INTERPOLATION */) {
14277
+ if (valueToken.type === 17 /* TokenType.ATTR_VALUE_INTERPOLATION */) {
14262
14278
  // For backward compatibility we decode HTML entities that appear in interpolation
14263
14279
  // expressions. This is arguably a bug, but it could be a considerable breaking change to
14264
14280
  // fix it. It should be addressed in a larger project to refactor the entire parser/lexer
14265
14281
  // chain after View Engine has been removed.
14266
14282
  value += valueToken.parts.join('').replace(/&([^;]+);/g, decodeEntity);
14267
14283
  }
14268
- else if (valueToken.type === 9 /* ENCODED_ENTITY */) {
14284
+ else if (valueToken.type === 9 /* TokenType.ENCODED_ENTITY */) {
14269
14285
  value += valueToken.parts[0];
14270
14286
  }
14271
14287
  else {
@@ -14275,7 +14291,7 @@ class _TreeBuilder {
14275
14291
  }
14276
14292
  }
14277
14293
  // Consume any quote
14278
- if (this._peek.type === 15 /* ATTR_QUOTE */) {
14294
+ if (this._peek.type === 15 /* TokenType.ATTR_QUOTE */) {
14279
14295
  const quoteToken = this._advance();
14280
14296
  attrEnd = quoteToken.sourceSpan.end;
14281
14297
  }
@@ -14405,7 +14421,7 @@ class WhitespaceVisitor {
14405
14421
  (context.prev instanceof Expansion || context.next instanceof Expansion);
14406
14422
  if (isNotBlank || hasExpansionSibling) {
14407
14423
  // Process the whitespace in the tokens of this Text node
14408
- const tokens = text.tokens.map(token => token.type === 5 /* TEXT */ ? createWhitespaceProcessedTextToken(token) : token);
14424
+ const tokens = text.tokens.map(token => token.type === 5 /* TokenType.TEXT */ ? createWhitespaceProcessedTextToken(token) : token);
14409
14425
  // Process the whitespace of the value of this Text node
14410
14426
  const value = processWhitespace(text.value);
14411
14427
  return new Text(value, text.sourceSpan, tokens, text.i18n);
@@ -15255,7 +15271,7 @@ class BindingParser {
15255
15271
  }
15256
15272
  createBoundElementProperty(elementSelector, boundProp, skipValidation = false, mapPropertyName = true) {
15257
15273
  if (boundProp.isAnimation) {
15258
- return new BoundElementProperty(boundProp.name, 4 /* Animation */, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
15274
+ return new BoundElementProperty(boundProp.name, 4 /* BindingType.Animation */, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
15259
15275
  }
15260
15276
  let unit = null;
15261
15277
  let bindingType = undefined;
@@ -15276,17 +15292,17 @@ class BindingParser {
15276
15292
  const name = boundPropertyName.substring(nsSeparatorIdx + 1);
15277
15293
  boundPropertyName = mergeNsAndName(ns, name);
15278
15294
  }
15279
- bindingType = 1 /* Attribute */;
15295
+ bindingType = 1 /* BindingType.Attribute */;
15280
15296
  }
15281
15297
  else if (parts[0] == CLASS_PREFIX) {
15282
15298
  boundPropertyName = parts[1];
15283
- bindingType = 2 /* Class */;
15299
+ bindingType = 2 /* BindingType.Class */;
15284
15300
  securityContexts = [SecurityContext.NONE];
15285
15301
  }
15286
15302
  else if (parts[0] == STYLE_PREFIX) {
15287
15303
  unit = parts.length > 2 ? parts[2] : null;
15288
15304
  boundPropertyName = parts[1];
15289
- bindingType = 3 /* Style */;
15305
+ bindingType = 3 /* BindingType.Style */;
15290
15306
  securityContexts = [SecurityContext.STYLE];
15291
15307
  }
15292
15308
  }
@@ -15295,7 +15311,7 @@ class BindingParser {
15295
15311
  const mappedPropName = this._schemaRegistry.getMappedPropName(boundProp.name);
15296
15312
  boundPropertyName = mapPropertyName ? mappedPropName : boundProp.name;
15297
15313
  securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, mappedPropName, false);
15298
- bindingType = 0 /* Property */;
15314
+ bindingType = 0 /* BindingType.Property */;
15299
15315
  if (!skipValidation) {
15300
15316
  this._validatePropertyOrAttributeName(mappedPropName, boundProp.sourceSpan, false);
15301
15317
  }
@@ -15327,7 +15343,7 @@ class BindingParser {
15327
15343
  const eventName = matches[0];
15328
15344
  const phase = matches[1].toLowerCase();
15329
15345
  const ast = this._parseAction(expression, isAssignmentEvent, handlerSpan);
15330
- targetEvents.push(new ParsedEvent(eventName, phase, 1 /* Animation */, ast, sourceSpan, handlerSpan, keySpan));
15346
+ targetEvents.push(new ParsedEvent(eventName, phase, 1 /* ParsedEventType.Animation */, ast, sourceSpan, handlerSpan, keySpan));
15331
15347
  if (eventName.length === 0) {
15332
15348
  this._reportError(`Animation event name is missing in binding`, sourceSpan);
15333
15349
  }
@@ -15345,7 +15361,7 @@ class BindingParser {
15345
15361
  const [target, eventName] = splitAtColon(name, [null, name]);
15346
15362
  const ast = this._parseAction(expression, isAssignmentEvent, handlerSpan);
15347
15363
  targetMatchableAttrs.push([name, ast.source]);
15348
- targetEvents.push(new ParsedEvent(eventName, target, 0 /* Regular */, ast, sourceSpan, handlerSpan, keySpan));
15364
+ targetEvents.push(new ParsedEvent(eventName, target, 0 /* ParsedEventType.Regular */, ast, sourceSpan, handlerSpan, keySpan));
15349
15365
  // Don't detect directives for event names for now,
15350
15366
  // so don't add the event name to the matchableAttrs
15351
15367
  }
@@ -16428,8 +16444,8 @@ class _I18nVisitor {
16428
16444
  let hasInterpolation = false;
16429
16445
  for (const token of tokens) {
16430
16446
  switch (token.type) {
16431
- case 8 /* INTERPOLATION */:
16432
- case 17 /* ATTR_VALUE_INTERPOLATION */:
16447
+ case 8 /* TokenType.INTERPOLATION */:
16448
+ case 17 /* TokenType.ATTR_VALUE_INTERPOLATION */:
16433
16449
  hasInterpolation = true;
16434
16450
  const expression = token.parts[1];
16435
16451
  const baseName = extractPlaceholderName(expression) || 'INTERPOLATION';
@@ -16758,25 +16774,78 @@ function parseI18nMeta(meta = '') {
16758
16774
  function i18nMetaToJSDoc(meta) {
16759
16775
  const tags = [];
16760
16776
  if (meta.description) {
16761
- tags.push({ tagName: "desc" /* Desc */, text: meta.description });
16777
+ tags.push({ tagName: "desc" /* o.JSDocTagName.Desc */, text: meta.description });
16762
16778
  }
16763
16779
  else {
16764
16780
  // Suppress the JSCompiler warning that a `@desc` was not given for this message.
16765
- tags.push({ tagName: "suppress" /* Suppress */, text: '{msgDescriptions}' });
16781
+ tags.push({ tagName: "suppress" /* o.JSDocTagName.Suppress */, text: '{msgDescriptions}' });
16766
16782
  }
16767
16783
  if (meta.meaning) {
16768
- tags.push({ tagName: "meaning" /* Meaning */, text: meta.meaning });
16784
+ tags.push({ tagName: "meaning" /* o.JSDocTagName.Meaning */, text: meta.meaning });
16769
16785
  }
16770
16786
  return jsDocComment(tags);
16771
16787
  }
16772
16788
 
16773
16789
  /** Closure uses `goog.getMsg(message)` to lookup translations */
16774
16790
  const GOOG_GET_MSG = 'goog.getMsg';
16775
- function createGoogleGetMsgStatements(variable$1, message, closureVar, params) {
16791
+ /**
16792
+ * Generates a `goog.getMsg()` statement and reassignment. The template:
16793
+ *
16794
+ * ```html
16795
+ * <div i18n>Sent from {{ sender }} to <span class="receiver">{{ receiver }}</span></div>
16796
+ * ```
16797
+ *
16798
+ * Generates:
16799
+ *
16800
+ * ```typescript
16801
+ * const MSG_FOO = goog.getMsg(
16802
+ * // Message template.
16803
+ * 'Sent from {$interpolation} to {$startTagSpan}{$interpolation_1}{$closeTagSpan}.',
16804
+ * // Placeholder values, set to magic strings which get replaced by the Angular runtime.
16805
+ * {
16806
+ * 'interpolation': '\uFFFD0\uFFFD',
16807
+ * 'startTagSpan': '\uFFFD1\uFFFD',
16808
+ * 'interpolation_1': '\uFFFD2\uFFFD',
16809
+ * 'closeTagSpan': '\uFFFD3\uFFFD',
16810
+ * },
16811
+ * // Options bag.
16812
+ * {
16813
+ * // Maps each placeholder to the original Angular source code which generates it's value.
16814
+ * original_code: {
16815
+ * 'interpolation': '{{ sender }}',
16816
+ * 'startTagSpan': '<span class="receiver">',
16817
+ * 'interploation_1': '{{ receiver }}',
16818
+ * 'closeTagSpan': '</span>',
16819
+ * },
16820
+ * },
16821
+ * );
16822
+ * const I18N_0 = MSG_FOO;
16823
+ * ```
16824
+ */
16825
+ function createGoogleGetMsgStatements(variable$1, message, closureVar, placeholderValues) {
16776
16826
  const messageString = serializeI18nMessageForGetMsg(message);
16777
16827
  const args = [literal(messageString)];
16778
- if (Object.keys(params).length) {
16779
- args.push(mapLiteral(params, true));
16828
+ if (Object.keys(placeholderValues).length) {
16829
+ // Message template parameters containing the magic strings replaced by the Angular runtime with
16830
+ // real data, e.g. `{'interpolation': '\uFFFD0\uFFFD'}`.
16831
+ args.push(mapLiteral(formatI18nPlaceholderNamesInMap(placeholderValues, true /* useCamelCase */), true /* quoted */));
16832
+ // Message options object, which contains original source code for placeholders (as they are
16833
+ // present in a template, e.g.
16834
+ // `{original_code: {'interpolation': '{{ name }}', 'startTagSpan': '<span>'}}`.
16835
+ args.push(mapLiteral({
16836
+ original_code: literalMap(Object.keys(placeholderValues)
16837
+ .map((param) => ({
16838
+ key: formatI18nPlaceholderName(param),
16839
+ quoted: true,
16840
+ value: message.placeholders[param] ?
16841
+ // Get source span for typical placeholder if it exists.
16842
+ literal(message.placeholders[param].sourceSpan.toString()) :
16843
+ // Otherwise must be an ICU expression, get it's source span.
16844
+ literal(message.placeholderToMessage[param]
16845
+ .nodes.map((node) => node.sourceSpan.toString())
16846
+ .join('')),
16847
+ }))),
16848
+ }));
16780
16849
  }
16781
16850
  // /**
16782
16851
  // * @desc description of message
@@ -16987,7 +17056,7 @@ function prepareEventListenerParameters(eventAst, handlerName = null, scope = nu
16987
17056
  statements.push(new ExpressionStatement(invokeInstruction(null, Identifiers.resetView, [])));
16988
17057
  }
16989
17058
  }
16990
- const eventName = type === 1 /* Animation */ ? prepareSyntheticListenerName(name, phase) : name;
17059
+ const eventName = type === 1 /* ParsedEventType.Animation */ ? prepareSyntheticListenerName(name, phase) : name;
16991
17060
  const fnName = handlerName && sanitizeIdentifier(handlerName);
16992
17061
  const fnArgs = [];
16993
17062
  if (implicitReceiverAccesses.has(eventArgumentName)) {
@@ -17139,10 +17208,10 @@ class TemplateDefinitionBuilder {
17139
17208
  const creationVariables = this._bindingScope.viewSnapshotStatements();
17140
17209
  const updateVariables = this._bindingScope.variableDeclarations().concat(this._tempVariables);
17141
17210
  const creationBlock = creationStatements.length > 0 ?
17142
- [renderFlagCheckIfStmt(1 /* Create */, creationVariables.concat(creationStatements))] :
17211
+ [renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, creationVariables.concat(creationStatements))] :
17143
17212
  [];
17144
17213
  const updateBlock = updateStatements.length > 0 ?
17145
- [renderFlagCheckIfStmt(2 /* Update */, updateVariables.concat(updateStatements))] :
17214
+ [renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateVariables.concat(updateStatements))] :
17146
17215
  [];
17147
17216
  return fn(
17148
17217
  // i.e. (rf: RenderFlags, ctx: any)
@@ -17180,7 +17249,7 @@ class TemplateDefinitionBuilder {
17180
17249
  const scopedName = this._bindingScope.freshReferenceName();
17181
17250
  const retrievalLevel = this.level;
17182
17251
  const lhs = variable(variable$1.name + scopedName);
17183
- this._bindingScope.set(retrievalLevel, variable$1.name, lhs, 1 /* CONTEXT */, (scope, relativeLevel) => {
17252
+ this._bindingScope.set(retrievalLevel, variable$1.name, lhs, 1 /* DeclarationPriority.CONTEXT */, (scope, relativeLevel) => {
17184
17253
  let rhs;
17185
17254
  if (scope.bindingLevel === retrievalLevel) {
17186
17255
  if (scope.isListenerScope() && scope.hasRestoreViewVariable()) {
@@ -17434,7 +17503,7 @@ class TemplateDefinitionBuilder {
17434
17503
  element.inputs.forEach(input => {
17435
17504
  const stylingInputWasSet = stylingBuilder.registerBoundInput(input);
17436
17505
  if (!stylingInputWasSet) {
17437
- if (input.type === 0 /* Property */ && input.i18n) {
17506
+ if (input.type === 0 /* BindingType.Property */ && input.i18n) {
17438
17507
  boundI18nAttrs.push(input);
17439
17508
  }
17440
17509
  else {
@@ -17507,7 +17576,7 @@ class TemplateDefinitionBuilder {
17507
17576
  // Generate element input bindings
17508
17577
  allOtherInputs.forEach(input => {
17509
17578
  const inputType = input.type;
17510
- if (inputType === 4 /* Animation */) {
17579
+ if (inputType === 4 /* BindingType.Animation */) {
17511
17580
  const value = input.value.visit(this._valueConverter);
17512
17581
  // animation bindings can be presented in the following formats:
17513
17582
  // 1. [@binding]="fooExp"
@@ -17534,7 +17603,7 @@ class TemplateDefinitionBuilder {
17534
17603
  if (value !== undefined) {
17535
17604
  const params = [];
17536
17605
  const [attrNamespace, attrName] = splitNsName(input.name);
17537
- const isAttributeBinding = inputType === 1 /* Attribute */;
17606
+ const isAttributeBinding = inputType === 1 /* BindingType.Attribute */;
17538
17607
  const sanitizationRef = resolveSanitizationFn(input.securityContext, isAttributeBinding);
17539
17608
  if (sanitizationRef)
17540
17609
  params.push(sanitizationRef);
@@ -17550,7 +17619,7 @@ class TemplateDefinitionBuilder {
17550
17619
  }
17551
17620
  }
17552
17621
  this.allocateBindingSlots(value);
17553
- if (inputType === 0 /* Property */) {
17622
+ if (inputType === 0 /* BindingType.Property */) {
17554
17623
  if (value instanceof Interpolation) {
17555
17624
  // prop="{{value}}" and friends
17556
17625
  this.interpolatedUpdateInstruction(getPropertyInterpolationExpression(value), elementIndex, attrName, input, value, params);
@@ -17564,7 +17633,7 @@ class TemplateDefinitionBuilder {
17564
17633
  });
17565
17634
  }
17566
17635
  }
17567
- else if (inputType === 1 /* Attribute */) {
17636
+ else if (inputType === 1 /* BindingType.Attribute */) {
17568
17637
  if (value instanceof Interpolation && getInterpolationArgsLength(value) > 1) {
17569
17638
  // attr.name="text{{value}}" and friends
17570
17639
  this.interpolatedUpdateInstruction(getAttributeInterpolationExpression(value), elementIndex, attrName, input, value, params);
@@ -17730,7 +17799,7 @@ class TemplateDefinitionBuilder {
17730
17799
  // - all ICU vars (such as `VAR_SELECT` or `VAR_PLURAL`) are replaced with correct values
17731
17800
  const transformFn = (raw) => {
17732
17801
  const params = Object.assign(Object.assign({}, vars), placeholders);
17733
- const formatted = i18nFormatPlaceholderNames(params, /* useCamelCase */ false);
17802
+ const formatted = formatI18nPlaceholderNamesInMap(params, /* useCamelCase */ false);
17734
17803
  return invokeInstruction(null, Identifiers.i18nPostprocess, [raw, mapLiteral(formatted, true)]);
17735
17804
  };
17736
17805
  // in case the whole i18n message is a single ICU - we do not need to
@@ -17961,13 +18030,13 @@ class TemplateDefinitionBuilder {
17961
18030
  const input = inputs[i];
17962
18031
  // We don't want the animation and attribute bindings in the
17963
18032
  // attributes array since they aren't used for directive matching.
17964
- if (input.type !== 4 /* Animation */ && input.type !== 1 /* Attribute */) {
18033
+ if (input.type !== 4 /* BindingType.Animation */ && input.type !== 1 /* BindingType.Attribute */) {
17965
18034
  addAttrExpr(input.name);
17966
18035
  }
17967
18036
  }
17968
18037
  for (let i = 0; i < outputs.length; i++) {
17969
18038
  const output = outputs[i];
17970
- if (output.type !== 1 /* Animation */) {
18039
+ if (output.type !== 1 /* ParsedEventType.Animation */) {
17971
18040
  addAttrExpr(output.name);
17972
18041
  }
17973
18042
  }
@@ -17976,15 +18045,15 @@ class TemplateDefinitionBuilder {
17976
18045
  // to the expressions. The marker is important because it tells the runtime
17977
18046
  // code that this is where attributes without values start...
17978
18047
  if (attrExprs.length !== attrsLengthBeforeInputs) {
17979
- attrExprs.splice(attrsLengthBeforeInputs, 0, literal(3 /* Bindings */));
18048
+ attrExprs.splice(attrsLengthBeforeInputs, 0, literal(3 /* core.AttributeMarker.Bindings */));
17980
18049
  }
17981
18050
  }
17982
18051
  if (templateAttrs.length) {
17983
- attrExprs.push(literal(4 /* Template */));
18052
+ attrExprs.push(literal(4 /* core.AttributeMarker.Template */));
17984
18053
  templateAttrs.forEach(attr => addAttrExpr(attr.name));
17985
18054
  }
17986
18055
  if (boundI18nAttrs.length) {
17987
- attrExprs.push(literal(6 /* I18n */));
18056
+ attrExprs.push(literal(6 /* core.AttributeMarker.I18n */));
17988
18057
  boundI18nAttrs.forEach(attr => addAttrExpr(attr.name));
17989
18058
  }
17990
18059
  return attrExprs;
@@ -18015,7 +18084,7 @@ class TemplateDefinitionBuilder {
18015
18084
  const variableName = this._bindingScope.freshReferenceName();
18016
18085
  const retrievalLevel = this.level;
18017
18086
  const lhs = variable(variableName);
18018
- this._bindingScope.set(retrievalLevel, reference.name, lhs, 0 /* DEFAULT */, (scope, relativeLevel) => {
18087
+ this._bindingScope.set(retrievalLevel, reference.name, lhs, 0 /* DeclarationPriority.DEFAULT */, (scope, relativeLevel) => {
18019
18088
  // e.g. nextContext(2);
18020
18089
  const nextContextStmt = relativeLevel > 0 ? [generateNextContextExpr(relativeLevel).toStmt()] : [];
18021
18090
  // e.g. const $foo$ = reference(1);
@@ -18029,7 +18098,7 @@ class TemplateDefinitionBuilder {
18029
18098
  prepareListenerParameter(tagName, outputAst, index) {
18030
18099
  return () => {
18031
18100
  const eventName = outputAst.name;
18032
- const bindingFnName = outputAst.type === 1 /* Animation */ ?
18101
+ const bindingFnName = outputAst.type === 1 /* ParsedEventType.Animation */ ?
18033
18102
  // synthetic @listener.foo values are treated the exact same as are standard listeners
18034
18103
  prepareSyntheticListenerFunctionName(eventName, outputAst.phase) :
18035
18104
  sanitizeIdentifier(eventName);
@@ -18149,7 +18218,7 @@ function getAttributeNameLiterals(name) {
18149
18218
  const nameLiteral = literal(attributeName);
18150
18219
  if (attributeNamespace) {
18151
18220
  return [
18152
- literal(0 /* NamespaceURI */), literal(attributeNamespace), nameLiteral
18221
+ literal(0 /* core.AttributeMarker.NamespaceURI */), literal(attributeNamespace), nameLiteral
18153
18222
  ];
18154
18223
  }
18155
18224
  return [nameLiteral];
@@ -18218,7 +18287,7 @@ class BindingScope {
18218
18287
  * @param declareLocalCallback The callback to invoke when declaring this local var
18219
18288
  * @param localRef Whether or not this is a local ref
18220
18289
  */
18221
- set(retrievalLevel, name, lhs, priority = 0 /* DEFAULT */, declareLocalCallback, localRef) {
18290
+ set(retrievalLevel, name, lhs, priority = 0 /* DeclarationPriority.DEFAULT */, declareLocalCallback, localRef) {
18222
18291
  if (this.map.has(name)) {
18223
18292
  if (localRef) {
18224
18293
  // Do not throw an error if it's a local ref and do not update existing value,
@@ -18274,7 +18343,7 @@ class BindingScope {
18274
18343
  return sharedCtxObj && sharedCtxObj.declare ? sharedCtxObj.lhs : null;
18275
18344
  }
18276
18345
  maybeGenerateSharedContextVar(value) {
18277
- if (value.priority === 1 /* CONTEXT */ &&
18346
+ if (value.priority === 1 /* DeclarationPriority.CONTEXT */ &&
18278
18347
  value.retrievalLevel < this.bindingLevel) {
18279
18348
  const sharedCtxObj = this.map.get(SHARED_CONTEXT_KEY + value.retrievalLevel);
18280
18349
  if (sharedCtxObj) {
@@ -18295,7 +18364,7 @@ class BindingScope {
18295
18364
  return [lhs.set(generateNextContextExpr(relativeLevel)).toConstDecl()];
18296
18365
  },
18297
18366
  declare: false,
18298
- priority: 2 /* SHARED_CONTEXT */,
18367
+ priority: 2 /* DeclarationPriority.SHARED_CONTEXT */,
18299
18368
  });
18300
18369
  }
18301
18370
  getComponentProperty(name) {
@@ -18392,7 +18461,7 @@ function getNgProjectAsLiteral(attribute) {
18392
18461
  // Parse the attribute value into a CssSelectorList. Note that we only take the
18393
18462
  // first selector, because we don't support multiple selectors in ngProjectAs.
18394
18463
  const parsedR3Selector = parseSelectorToR3Selector(attribute.value)[0];
18395
- return [literal(5 /* ProjectAs */), asLiteral(parsedR3Selector)];
18464
+ return [literal(5 /* core.AttributeMarker.ProjectAs */), asLiteral(parsedR3Selector)];
18396
18465
  }
18397
18466
  /**
18398
18467
  * Gets the instruction to generate for an interpolated property
@@ -18651,7 +18720,7 @@ const NG_I18N_CLOSURE_MODE = 'ngI18nClosureMode';
18651
18720
  function getTranslationDeclStmts(message, variable, closureVar, params = {}, transformFn) {
18652
18721
  const statements = [
18653
18722
  declareI18nVariable(variable),
18654
- ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable, message, closureVar, i18nFormatPlaceholderNames(params, /* useCamelCase */ true)), createLocalizeStatements(variable, message, i18nFormatPlaceholderNames(params, /* useCamelCase */ false))),
18723
+ ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable, message, closureVar, params), createLocalizeStatements(variable, message, formatI18nPlaceholderNamesInMap(params, /* useCamelCase */ false))),
18655
18724
  ];
18656
18725
  if (transformFn) {
18657
18726
  statements.push(new ExpressionStatement(variable.set(transformFn(variable))));
@@ -18745,6 +18814,10 @@ function addFeatures(definitionMap, meta) {
18745
18814
  if (meta.lifecycle.usesOnChanges) {
18746
18815
  features.push(importExpr(Identifiers.NgOnChangesFeature));
18747
18816
  }
18817
+ // TODO: better way of differentiating component vs directive metadata.
18818
+ if (meta.hasOwnProperty('template') && meta.isStandalone) {
18819
+ features.push(importExpr(Identifiers.StandaloneFeature));
18820
+ }
18748
18821
  if (features.length) {
18749
18822
  definitionMap.set('features', literalArr(features));
18750
18823
  }
@@ -18808,17 +18881,8 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
18808
18881
  definitionMap.set('consts', constsExpr);
18809
18882
  }
18810
18883
  definitionMap.set('template', templateFunctionExpression);
18811
- // e.g. `directives: [MyDirective]`
18812
- if (meta.directives.length > 0) {
18813
- const directivesList = literalArr(meta.directives.map(dir => dir.type));
18814
- const directivesExpr = compileDeclarationList(directivesList, meta.declarationListEmitMode);
18815
- definitionMap.set('directives', directivesExpr);
18816
- }
18817
- // e.g. `pipes: [MyPipe]`
18818
- if (meta.pipes.size > 0) {
18819
- const pipesList = literalArr(Array.from(meta.pipes.values()));
18820
- const pipesExpr = compileDeclarationList(pipesList, meta.declarationListEmitMode);
18821
- definitionMap.set('pipes', pipesExpr);
18884
+ if (meta.declarations.length > 0) {
18885
+ definitionMap.set('dependencies', compileDeclarationList(literalArr(meta.declarations.map(decl => decl.type)), meta.declarationListEmitMode));
18822
18886
  }
18823
18887
  if (meta.encapsulation === null) {
18824
18888
  meta.encapsulation = ViewEncapsulation.Emulated;
@@ -18828,8 +18892,15 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
18828
18892
  const styleValues = meta.encapsulation == ViewEncapsulation.Emulated ?
18829
18893
  compileStyles(meta.styles, CONTENT_ATTR, HOST_ATTR) :
18830
18894
  meta.styles;
18831
- const strings = styleValues.map(str => constantPool.getConstLiteral(literal(str)));
18832
- definitionMap.set('styles', literalArr(strings));
18895
+ const styleNodes = styleValues.reduce((result, style) => {
18896
+ if (style.trim().length > 0) {
18897
+ result.push(constantPool.getConstLiteral(literal(style)));
18898
+ }
18899
+ return result;
18900
+ }, []);
18901
+ if (styleNodes.length > 0) {
18902
+ definitionMap.set('styles', literalArr(styleNodes));
18903
+ }
18833
18904
  }
18834
18905
  else if (meta.encapsulation === ViewEncapsulation.Emulated) {
18835
18906
  // If there is no style, don't generate css selectors on elements
@@ -18856,8 +18927,9 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
18856
18927
  * to be consumed by upstream compilations.
18857
18928
  */
18858
18929
  function createComponentType(meta) {
18859
- const typeParams = createDirectiveTypeParams(meta);
18930
+ const typeParams = createBaseDirectiveTypeParams(meta);
18860
18931
  typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));
18932
+ typeParams.push(expressionType(literal(meta.isStandalone)));
18861
18933
  return expressionType(importExpr(Identifiers.ComponentDeclaration, typeParams));
18862
18934
  }
18863
18935
  /**
@@ -18866,13 +18938,13 @@ function createComponentType(meta) {
18866
18938
  */
18867
18939
  function compileDeclarationList(list, mode) {
18868
18940
  switch (mode) {
18869
- case 0 /* Direct */:
18941
+ case 0 /* DeclarationListEmitMode.Direct */:
18870
18942
  // directives: [MyDir],
18871
18943
  return list;
18872
- case 1 /* Closure */:
18944
+ case 1 /* DeclarationListEmitMode.Closure */:
18873
18945
  // directives: function () { return [MyDir]; }
18874
18946
  return fn([], [new ReturnStatement(list)]);
18875
- case 2 /* ClosureResolved */:
18947
+ case 2 /* DeclarationListEmitMode.ClosureResolved */:
18876
18948
  // directives: function () { return [MyDir].map(ng.resolveForwardRef); }
18877
18949
  const resolvedList = list.prop('map').callFn([importExpr(Identifiers.resolveForwardRef)]);
18878
18950
  return fn([], [new ReturnStatement(resolvedList)]);
@@ -18890,9 +18962,9 @@ function prepareQueryParams(query, constantPool) {
18890
18962
  * @param query
18891
18963
  */
18892
18964
  function toQueryFlags(query) {
18893
- return (query.descendants ? 1 /* descendants */ : 0 /* none */) |
18894
- (query.static ? 2 /* isStatic */ : 0 /* none */) |
18895
- (query.emitDistinctChangesOnly ? 4 /* emitDistinctChangesOnly */ : 0 /* none */);
18965
+ return (query.descendants ? 1 /* QueryFlags.descendants */ : 0 /* QueryFlags.none */) |
18966
+ (query.static ? 2 /* QueryFlags.isStatic */ : 0 /* QueryFlags.none */) |
18967
+ (query.emitDistinctChangesOnly ? 4 /* QueryFlags.emitDistinctChangesOnly */ : 0 /* QueryFlags.none */);
18896
18968
  }
18897
18969
  function convertAttributesToExpressions(attributes) {
18898
18970
  const values = [];
@@ -18926,8 +18998,8 @@ function createContentQueriesFunction(queries, constantPool, name) {
18926
18998
  new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null),
18927
18999
  new FnParam('dirIndex', null)
18928
19000
  ], [
18929
- renderFlagCheckIfStmt(1 /* Create */, createStatements),
18930
- renderFlagCheckIfStmt(2 /* Update */, updateStatements)
19001
+ renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, createStatements),
19002
+ renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateStatements)
18931
19003
  ], INFERRED_TYPE, null, contentQueriesFnName);
18932
19004
  }
18933
19005
  function stringAsType(str) {
@@ -18948,7 +19020,7 @@ function stringArrayAsType(arr) {
18948
19020
  return arr.length > 0 ? expressionType(literalArr(arr.map(value => literal(value)))) :
18949
19021
  NONE_TYPE;
18950
19022
  }
18951
- function createDirectiveTypeParams(meta) {
19023
+ function createBaseDirectiveTypeParams(meta) {
18952
19024
  // On the type side, remove newlines from the selector as it will need to fit into a TypeScript
18953
19025
  // string literal, which must be on one line.
18954
19026
  const selectorForType = meta.selector !== null ? meta.selector.replace(/\n/g, '') : null;
@@ -18966,7 +19038,11 @@ function createDirectiveTypeParams(meta) {
18966
19038
  * to be consumed by upstream compilations.
18967
19039
  */
18968
19040
  function createDirectiveType(meta) {
18969
- const typeParams = createDirectiveTypeParams(meta);
19041
+ const typeParams = createBaseDirectiveTypeParams(meta);
19042
+ // Directives have no NgContentSelectors slot, but instead express a `never` type
19043
+ // so that future fields align.
19044
+ typeParams.push(NONE_TYPE);
19045
+ typeParams.push(expressionType(literal(meta.isStandalone)));
18970
19046
  return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));
18971
19047
  }
18972
19048
  // Define and update any view queries
@@ -18989,8 +19065,8 @@ function createViewQueriesFunction(viewQueries, constantPool, name) {
18989
19065
  });
18990
19066
  const viewQueryFnName = name ? `${name}_Query` : null;
18991
19067
  return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [
18992
- renderFlagCheckIfStmt(1 /* Create */, createStatements),
18993
- renderFlagCheckIfStmt(2 /* Update */, updateStatements)
19068
+ renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, createStatements),
19069
+ renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateStatements)
18994
19070
  ], INFERRED_TYPE, null, viewQueryFnName);
18995
19071
  }
18996
19072
  // Return a host binding function or null if one is not necessary.
@@ -19130,10 +19206,10 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
19130
19206
  const hostBindingsFnName = name ? `${name}_HostBindings` : null;
19131
19207
  const statements = [];
19132
19208
  if (createInstructions.length > 0) {
19133
- statements.push(renderFlagCheckIfStmt(1 /* Create */, getInstructionStatements(createInstructions)));
19209
+ statements.push(renderFlagCheckIfStmt(1 /* core.RenderFlags.Create */, getInstructionStatements(createInstructions)));
19134
19210
  }
19135
19211
  if (updateInstructions.length > 0) {
19136
- statements.push(renderFlagCheckIfStmt(2 /* Update */, updateVariables.concat(getInstructionStatements(updateInstructions))));
19212
+ statements.push(renderFlagCheckIfStmt(2 /* core.RenderFlags.Update */, updateVariables.concat(getInstructionStatements(updateInstructions))));
19137
19213
  }
19138
19214
  return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], statements, INFERRED_TYPE, null, hostBindingsFnName);
19139
19215
  }
@@ -19174,12 +19250,12 @@ function createHostListeners(eventBindings, name) {
19174
19250
  const instructions = [];
19175
19251
  for (const binding of eventBindings) {
19176
19252
  let bindingName = binding.name && sanitizeIdentifier(binding.name);
19177
- const bindingFnName = binding.type === 1 /* Animation */ ?
19253
+ const bindingFnName = binding.type === 1 /* ParsedEventType.Animation */ ?
19178
19254
  prepareSyntheticListenerFunctionName(bindingName, binding.targetOrPhase) :
19179
19255
  bindingName;
19180
19256
  const handlerName = name && bindingName ? `${name}_${bindingFnName}_HostBindingHandler` : null;
19181
19257
  const params = prepareEventListenerParameters(BoundEvent.fromParsedEvent(binding), handlerName);
19182
- if (binding.type == 1 /* Animation */) {
19258
+ if (binding.type == 1 /* ParsedEventType.Animation */) {
19183
19259
  syntheticListenerParams.push(params);
19184
19260
  }
19185
19261
  else {
@@ -19228,7 +19304,7 @@ function parseHostBindings(host) {
19228
19304
  }
19229
19305
  }
19230
19306
  }
19231
- else if (matches[1 /* Binding */] != null) {
19307
+ else if (matches[1 /* HostBindingGroup.Binding */] != null) {
19232
19308
  if (typeof value !== 'string') {
19233
19309
  // TODO(alxhub): make this a diagnostic.
19234
19310
  throw new Error(`Property binding must be string`);
@@ -19236,14 +19312,14 @@ function parseHostBindings(host) {
19236
19312
  // synthetic properties (the ones that have a `@` as a prefix)
19237
19313
  // are still treated the same as regular properties. Therefore
19238
19314
  // there is no point in storing them in a separate map.
19239
- properties[matches[1 /* Binding */]] = value;
19315
+ properties[matches[1 /* HostBindingGroup.Binding */]] = value;
19240
19316
  }
19241
- else if (matches[2 /* Event */] != null) {
19317
+ else if (matches[2 /* HostBindingGroup.Event */] != null) {
19242
19318
  if (typeof value !== 'string') {
19243
19319
  // TODO(alxhub): make this a diagnostic.
19244
19320
  throw new Error(`Event binding must be string`);
19245
19321
  }
19246
- listeners[matches[2 /* Event */]] = value;
19322
+ listeners[matches[2 /* HostBindingGroup.Event */]] = value;
19247
19323
  }
19248
19324
  }
19249
19325
  return { attributes, listeners, properties, specialAttributes };
@@ -19329,10 +19405,10 @@ class CompilerFacadeImpl {
19329
19405
  internalType: new WrappedNodeExpr(facade.type),
19330
19406
  typeArgumentCount: facade.typeArgumentCount,
19331
19407
  providedIn: computeProvidedIn(facade.providedIn),
19332
- useClass: convertToProviderExpression(facade, USE_CLASS),
19333
- useFactory: wrapExpression(facade, USE_FACTORY),
19334
- useValue: convertToProviderExpression(facade, USE_VALUE),
19335
- useExisting: convertToProviderExpression(facade, USE_EXISTING),
19408
+ useClass: convertToProviderExpression(facade, 'useClass'),
19409
+ useFactory: wrapExpression(facade, 'useFactory'),
19410
+ useValue: convertToProviderExpression(facade, 'useValue'),
19411
+ useExisting: convertToProviderExpression(facade, 'useExisting'),
19336
19412
  deps: (_a = facade.deps) === null || _a === void 0 ? void 0 : _a.map(convertR3DependencyMetadata),
19337
19413
  },
19338
19414
  /* resolveForwardRefs */ true);
@@ -19346,10 +19422,10 @@ class CompilerFacadeImpl {
19346
19422
  internalType: new WrappedNodeExpr(facade.type),
19347
19423
  typeArgumentCount: 0,
19348
19424
  providedIn: computeProvidedIn(facade.providedIn),
19349
- useClass: convertToProviderExpression(facade, USE_CLASS),
19350
- useFactory: wrapExpression(facade, USE_FACTORY),
19351
- useValue: convertToProviderExpression(facade, USE_VALUE),
19352
- useExisting: convertToProviderExpression(facade, USE_EXISTING),
19425
+ useClass: convertToProviderExpression(facade, 'useClass'),
19426
+ useFactory: wrapExpression(facade, 'useFactory'),
19427
+ useValue: convertToProviderExpression(facade, 'useValue'),
19428
+ useExisting: convertToProviderExpression(facade, 'useExisting'),
19353
19429
  deps: (_a = facade.deps) === null || _a === void 0 ? void 0 : _a.map(convertR3DeclareDependencyMetadata),
19354
19430
  },
19355
19431
  /* resolveForwardRefs */ true);
@@ -19411,7 +19487,7 @@ class CompilerFacadeImpl {
19411
19487
  // Parse the template and check for errors.
19412
19488
  const { template, interpolation } = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation);
19413
19489
  // Compile the component metadata, including template, into an expression.
19414
- const meta = Object.assign(Object.assign(Object.assign({}, facade), convertDirectiveFacadeToMetadata(facade)), { selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(), template, declarationListEmitMode: 0 /* Direct */, styles: [...facade.styles, ...template.styles], encapsulation: facade.encapsulation, interpolation, changeDetection: facade.changeDetection, animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null, viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) :
19490
+ const meta = Object.assign(Object.assign(Object.assign({}, facade), convertDirectiveFacadeToMetadata(facade)), { selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(), template, declarations: facade.declarations.map(convertDeclarationFacadeToMetadata), declarationListEmitMode: 0 /* DeclarationListEmitMode.Direct */, styles: [...facade.styles, ...template.styles], encapsulation: facade.encapsulation, interpolation, changeDetection: facade.changeDetection, animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null, viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) :
19415
19491
  null, relativeContextFilePath: '', i18nUseExternalIds: true });
19416
19492
  const jitExpressionSourceMap = `ng:///${facade.name}.js`;
19417
19493
  return this.compileComponentFromMeta(angularCoreEnv, jitExpressionSourceMap, meta);
@@ -19474,10 +19550,6 @@ class CompilerFacadeImpl {
19474
19550
  return res['$def'];
19475
19551
  }
19476
19552
  }
19477
- const USE_CLASS = Object.keys({ useClass: null })[0];
19478
- const USE_FACTORY = Object.keys({ useFactory: null })[0];
19479
- const USE_VALUE = Object.keys({ useValue: null })[0];
19480
- const USE_EXISTING = Object.keys({ useExisting: null })[0];
19481
19553
  function convertToR3QueryMetadata(facade) {
19482
19554
  return Object.assign(Object.assign({}, facade), { predicate: convertQueryPredicate(facade.predicate), read: facade.read ? new WrappedNodeExpr(facade.read) : null, static: facade.static, emitDistinctChangesOnly: facade.emitDistinctChangesOnly });
19483
19555
  }
@@ -19498,7 +19570,7 @@ function convertQueryPredicate(predicate) {
19498
19570
  // The predicate is an array of strings so pass it through.
19499
19571
  predicate :
19500
19572
  // The predicate is a type - assume that we will need to unwrap any `forwardRef()` calls.
19501
- createMayBeForwardRefExpression(new WrappedNodeExpr(predicate), 1 /* Wrapped */);
19573
+ createMayBeForwardRefExpression(new WrappedNodeExpr(predicate), 1 /* ForwardRefHandling.Wrapped */);
19502
19574
  }
19503
19575
  function convertDirectiveFacadeToMetadata(facade) {
19504
19576
  const inputsFromMetadata = parseInputOutputs(facade.inputs || []);
@@ -19564,19 +19636,43 @@ function convertOpaqueValuesToExpressions(obj) {
19564
19636
  }
19565
19637
  return result;
19566
19638
  }
19567
- function convertDeclareComponentFacadeToMetadata(declaration, typeSourceSpan, sourceMapUrl) {
19568
- var _a, _b, _c, _d, _e, _f;
19569
- const { template, interpolation } = parseJitTemplate(declaration.template, declaration.type.name, sourceMapUrl, (_a = declaration.preserveWhitespaces) !== null && _a !== void 0 ? _a : false, declaration.interpolation);
19570
- return Object.assign(Object.assign({}, convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan)), { template, styles: (_b = declaration.styles) !== null && _b !== void 0 ? _b : [], directives: ((_c = declaration.components) !== null && _c !== void 0 ? _c : [])
19571
- .concat((_d = declaration.directives) !== null && _d !== void 0 ? _d : [])
19572
- .map(convertUsedDirectiveDeclarationToMetadata), pipes: convertUsedPipesToMetadata(declaration.pipes), viewProviders: declaration.viewProviders !== undefined ?
19573
- new WrappedNodeExpr(declaration.viewProviders) :
19574
- null, animations: declaration.animations !== undefined ? new WrappedNodeExpr(declaration.animations) :
19575
- null, changeDetection: (_e = declaration.changeDetection) !== null && _e !== void 0 ? _e : ChangeDetectionStrategy.Default, encapsulation: (_f = declaration.encapsulation) !== null && _f !== void 0 ? _f : ViewEncapsulation.Emulated, interpolation, declarationListEmitMode: 2 /* ClosureResolved */, relativeContextFilePath: '', i18nUseExternalIds: true });
19576
- }
19577
- function convertUsedDirectiveDeclarationToMetadata(declaration) {
19639
+ function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMapUrl) {
19640
+ var _a, _b, _c, _d;
19641
+ const { template, interpolation } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, (_a = decl.preserveWhitespaces) !== null && _a !== void 0 ? _a : false, decl.interpolation);
19642
+ const declarations = [];
19643
+ if (decl.dependencies) {
19644
+ for (const innerDep of decl.dependencies) {
19645
+ switch (innerDep.kind) {
19646
+ case 'directive':
19647
+ case 'component':
19648
+ declarations.push(convertDirectiveDeclarationToMetadata(innerDep));
19649
+ break;
19650
+ case 'pipe':
19651
+ declarations.push(convertPipeDeclarationToMetadata(innerDep));
19652
+ break;
19653
+ }
19654
+ }
19655
+ }
19656
+ else if (decl.components || decl.directives || decl.pipes) {
19657
+ // Existing declarations on NPM may not be using the new `dependencies` merged field, and may
19658
+ // have separate fields for dependencies instead. Unify them for JIT compilation.
19659
+ decl.components &&
19660
+ declarations.push(...decl.components.map(dir => convertDirectiveDeclarationToMetadata(dir, /* isComponent */ true)));
19661
+ decl.directives &&
19662
+ declarations.push(...decl.directives.map(dir => convertDirectiveDeclarationToMetadata(dir)));
19663
+ decl.pipes && declarations.push(...convertPipeMapToMetadata(decl.pipes));
19664
+ }
19665
+ return Object.assign(Object.assign({}, convertDeclareDirectiveFacadeToMetadata(decl, typeSourceSpan)), { template, styles: (_b = decl.styles) !== null && _b !== void 0 ? _b : [], declarations, viewProviders: decl.viewProviders !== undefined ? new WrappedNodeExpr(decl.viewProviders) :
19666
+ null, animations: decl.animations !== undefined ? new WrappedNodeExpr(decl.animations) : null, changeDetection: (_c = decl.changeDetection) !== null && _c !== void 0 ? _c : ChangeDetectionStrategy.Default, encapsulation: (_d = decl.encapsulation) !== null && _d !== void 0 ? _d : ViewEncapsulation.Emulated, interpolation, declarationListEmitMode: 2 /* DeclarationListEmitMode.ClosureResolved */, relativeContextFilePath: '', i18nUseExternalIds: true });
19667
+ }
19668
+ function convertDeclarationFacadeToMetadata(declaration) {
19669
+ return Object.assign(Object.assign({}, declaration), { type: new WrappedNodeExpr(declaration.type) });
19670
+ }
19671
+ function convertDirectiveDeclarationToMetadata(declaration, isComponent = null) {
19578
19672
  var _a, _b, _c;
19579
19673
  return {
19674
+ kind: R3TemplateDependencyKind.Directive,
19675
+ isComponent: isComponent || declaration.kind === 'component',
19580
19676
  selector: declaration.selector,
19581
19677
  type: new WrappedNodeExpr(declaration.type),
19582
19678
  inputs: (_a = declaration.inputs) !== null && _a !== void 0 ? _a : [],
@@ -19584,16 +19680,24 @@ function convertUsedDirectiveDeclarationToMetadata(declaration) {
19584
19680
  exportAs: (_c = declaration.exportAs) !== null && _c !== void 0 ? _c : null,
19585
19681
  };
19586
19682
  }
19587
- function convertUsedPipesToMetadata(declaredPipes) {
19588
- const pipes = new Map();
19589
- if (declaredPipes === undefined) {
19590
- return pipes;
19591
- }
19592
- for (const pipeName of Object.keys(declaredPipes)) {
19593
- const pipeType = declaredPipes[pipeName];
19594
- pipes.set(pipeName, new WrappedNodeExpr(pipeType));
19683
+ function convertPipeMapToMetadata(pipes) {
19684
+ if (!pipes) {
19685
+ return [];
19595
19686
  }
19596
- return pipes;
19687
+ return Object.keys(pipes).map(name => {
19688
+ return {
19689
+ kind: R3TemplateDependencyKind.Pipe,
19690
+ name,
19691
+ type: new WrappedNodeExpr(pipes[name]),
19692
+ };
19693
+ });
19694
+ }
19695
+ function convertPipeDeclarationToMetadata(pipe) {
19696
+ return {
19697
+ kind: R3TemplateDependencyKind.Pipe,
19698
+ name: pipe.name,
19699
+ type: new WrappedNodeExpr(pipe.type),
19700
+ };
19597
19701
  }
19598
19702
  function parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces, interpolation) {
19599
19703
  const interpolationConfig = interpolation ? InterpolationConfig.fromArray(interpolation) : DEFAULT_INTERPOLATION_CONFIG;
@@ -19615,7 +19719,7 @@ function parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces,
19615
19719
  */
19616
19720
  function convertToProviderExpression(obj, property) {
19617
19721
  if (obj.hasOwnProperty(property)) {
19618
- return createMayBeForwardRefExpression(new WrappedNodeExpr(obj[property]), 0 /* None */);
19722
+ return createMayBeForwardRefExpression(new WrappedNodeExpr(obj[property]), 0 /* ForwardRefHandling.None */);
19619
19723
  }
19620
19724
  else {
19621
19725
  return undefined;
@@ -19633,7 +19737,7 @@ function computeProvidedIn(providedIn) {
19633
19737
  const expression = typeof providedIn === 'function' ? new WrappedNodeExpr(providedIn) :
19634
19738
  new LiteralExpr(providedIn !== null && providedIn !== void 0 ? providedIn : null);
19635
19739
  // See `convertToProviderExpression()` for why this uses `ForwardRefHandling.None`.
19636
- return createMayBeForwardRefExpression(expression, 0 /* None */);
19740
+ return createMayBeForwardRefExpression(expression, 0 /* ForwardRefHandling.None */);
19637
19741
  }
19638
19742
  function convertR3DependencyMetadataArray(facades) {
19639
19743
  return facades == null ? null : facades.map(convertR3DependencyMetadata);
@@ -19742,7 +19846,7 @@ function publishFacade(global) {
19742
19846
  * Use of this source code is governed by an MIT-style license that can be
19743
19847
  * found in the LICENSE file at https://angular.io/license
19744
19848
  */
19745
- const VERSION = new Version('14.0.0-next.13');
19849
+ const VERSION = new Version('14.0.0-next.16');
19746
19850
 
19747
19851
  /**
19748
19852
  * @license
@@ -21769,7 +21873,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
21769
21873
  function compileDeclareClassMetadata(metadata) {
21770
21874
  const definitionMap = new DefinitionMap();
21771
21875
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
21772
- definitionMap.set('version', literal('14.0.0-next.13'));
21876
+ definitionMap.set('version', literal('14.0.0-next.16'));
21773
21877
  definitionMap.set('ngImport', importExpr(Identifiers.core));
21774
21878
  definitionMap.set('type', metadata.type);
21775
21879
  definitionMap.set('decorators', metadata.decorators);
@@ -21869,7 +21973,7 @@ function compileDependency(dep) {
21869
21973
  *
21870
21974
  * Do not include any prerelease in these versions as they are ignored.
21871
21975
  */
21872
- const MINIMUM_PARTIAL_LINKER_VERSION$5 = '12.0.0';
21976
+ const MINIMUM_PARTIAL_LINKER_VERSION$5 = '14.0.0';
21873
21977
  /**
21874
21978
  * Compile a directive declaration defined by the `R3DirectiveMetadata`.
21875
21979
  */
@@ -21886,9 +21990,12 @@ function compileDeclareDirectiveFromMetadata(meta) {
21886
21990
  function createDirectiveDefinitionMap(meta) {
21887
21991
  const definitionMap = new DefinitionMap();
21888
21992
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
21889
- definitionMap.set('version', literal('14.0.0-next.13'));
21993
+ definitionMap.set('version', literal('14.0.0-next.16'));
21890
21994
  // e.g. `type: MyDirective`
21891
21995
  definitionMap.set('type', meta.internalType);
21996
+ if (meta.isStandalone) {
21997
+ definitionMap.set('isStandalone', literal(meta.isStandalone));
21998
+ }
21892
21999
  // e.g. `selector: 'some-dir'`
21893
22000
  if (meta.selector !== null) {
21894
22001
  definitionMap.set('selector', literal(meta.selector));
@@ -21993,9 +22100,7 @@ function createComponentDefinitionMap(meta, template, templateInfo) {
21993
22100
  definitionMap.set('isInline', literal(true));
21994
22101
  }
21995
22102
  definitionMap.set('styles', toOptionalLiteralArray(meta.styles, literal));
21996
- definitionMap.set('components', compileUsedDirectiveMetadata(meta, directive => directive.isComponent === true));
21997
- definitionMap.set('directives', compileUsedDirectiveMetadata(meta, directive => directive.isComponent !== true));
21998
- definitionMap.set('pipes', compileUsedPipeMetadata(meta));
22103
+ definitionMap.set('dependencies', compileUsedDependenciesMetadata(meta));
21999
22104
  definitionMap.set('viewProviders', meta.viewProviders);
22000
22105
  definitionMap.set('animations', meta.animations);
22001
22106
  if (meta.changeDetection !== undefined) {
@@ -22051,43 +22156,35 @@ function computeEndLocation(file, contents) {
22051
22156
  } while (lineStart !== -1);
22052
22157
  return new ParseLocation(file, length, line, length - lastLineStart);
22053
22158
  }
22054
- /**
22055
- * Compiles the directives as registered in the component metadata into an array literal of the
22056
- * individual directives. If the component does not use any directives, then null is returned.
22057
- */
22058
- function compileUsedDirectiveMetadata(meta, predicate) {
22059
- const wrapType = meta.declarationListEmitMode !== 0 /* Direct */ ?
22159
+ function compileUsedDependenciesMetadata(meta) {
22160
+ const wrapType = meta.declarationListEmitMode !== 0 /* DeclarationListEmitMode.Direct */ ?
22060
22161
  generateForwardRef :
22061
22162
  (expr) => expr;
22062
- const directives = meta.directives.filter(predicate);
22063
- return toOptionalLiteralArray(directives, directive => {
22064
- const dirMeta = new DefinitionMap();
22065
- dirMeta.set('type', wrapType(directive.type));
22066
- dirMeta.set('selector', literal(directive.selector));
22067
- dirMeta.set('inputs', toOptionalLiteralArray(directive.inputs, literal));
22068
- dirMeta.set('outputs', toOptionalLiteralArray(directive.outputs, literal));
22069
- dirMeta.set('exportAs', toOptionalLiteralArray(directive.exportAs, literal));
22070
- return dirMeta.toLiteralMap();
22163
+ return toOptionalLiteralArray(meta.declarations, decl => {
22164
+ switch (decl.kind) {
22165
+ case R3TemplateDependencyKind.Directive:
22166
+ const dirMeta = new DefinitionMap();
22167
+ dirMeta.set('kind', literal(decl.isComponent ? 'component' : 'directive'));
22168
+ dirMeta.set('type', wrapType(decl.type));
22169
+ dirMeta.set('selector', literal(decl.selector));
22170
+ dirMeta.set('inputs', toOptionalLiteralArray(decl.inputs, literal));
22171
+ dirMeta.set('outputs', toOptionalLiteralArray(decl.outputs, literal));
22172
+ dirMeta.set('exportAs', toOptionalLiteralArray(decl.exportAs, literal));
22173
+ return dirMeta.toLiteralMap();
22174
+ case R3TemplateDependencyKind.Pipe:
22175
+ const pipeMeta = new DefinitionMap();
22176
+ pipeMeta.set('kind', literal('pipe'));
22177
+ pipeMeta.set('type', wrapType(decl.type));
22178
+ pipeMeta.set('name', literal(decl.name));
22179
+ return pipeMeta.toLiteralMap();
22180
+ case R3TemplateDependencyKind.NgModule:
22181
+ const ngModuleMeta = new DefinitionMap();
22182
+ ngModuleMeta.set('kind', literal('ngmodule'));
22183
+ ngModuleMeta.set('type', wrapType(decl.type));
22184
+ return ngModuleMeta.toLiteralMap();
22185
+ }
22071
22186
  });
22072
22187
  }
22073
- /**
22074
- * Compiles the pipes as registered in the component metadata into an object literal, where the
22075
- * pipe's name is used as key and a reference to its type as value. If the component does not use
22076
- * any pipes, then null is returned.
22077
- */
22078
- function compileUsedPipeMetadata(meta) {
22079
- if (meta.pipes.size === 0) {
22080
- return null;
22081
- }
22082
- const wrapType = meta.declarationListEmitMode !== 0 /* Direct */ ?
22083
- generateForwardRef :
22084
- (expr) => expr;
22085
- const entries = [];
22086
- for (const [name, pipe] of meta.pipes) {
22087
- entries.push({ key: name, value: wrapType(pipe), quoted: true });
22088
- }
22089
- return literalMap(entries);
22090
- }
22091
22188
 
22092
22189
  /**
22093
22190
  * @license
@@ -22107,7 +22204,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
22107
22204
  function compileDeclareFactoryFunction(meta) {
22108
22205
  const definitionMap = new DefinitionMap();
22109
22206
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
22110
- definitionMap.set('version', literal('14.0.0-next.13'));
22207
+ definitionMap.set('version', literal('14.0.0-next.16'));
22111
22208
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22112
22209
  definitionMap.set('type', meta.internalType);
22113
22210
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -22149,7 +22246,7 @@ function compileDeclareInjectableFromMetadata(meta) {
22149
22246
  function createInjectableDefinitionMap(meta) {
22150
22247
  const definitionMap = new DefinitionMap();
22151
22248
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
22152
- definitionMap.set('version', literal('14.0.0-next.13'));
22249
+ definitionMap.set('version', literal('14.0.0-next.16'));
22153
22250
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22154
22251
  definitionMap.set('type', meta.internalType);
22155
22252
  // Only generate providedIn property if it has a non-null value
@@ -22207,7 +22304,7 @@ function compileDeclareInjectorFromMetadata(meta) {
22207
22304
  function createInjectorDefinitionMap(meta) {
22208
22305
  const definitionMap = new DefinitionMap();
22209
22306
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
22210
- definitionMap.set('version', literal('14.0.0-next.13'));
22307
+ definitionMap.set('version', literal('14.0.0-next.16'));
22211
22308
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22212
22309
  definitionMap.set('type', meta.internalType);
22213
22310
  definitionMap.set('providers', meta.providers);
@@ -22231,7 +22328,7 @@ function createInjectorDefinitionMap(meta) {
22231
22328
  *
22232
22329
  * Do not include any prerelease in these versions as they are ignored.
22233
22330
  */
22234
- const MINIMUM_PARTIAL_LINKER_VERSION$1 = '12.0.0';
22331
+ const MINIMUM_PARTIAL_LINKER_VERSION$1 = '14.0.0';
22235
22332
  function compileDeclareNgModuleFromMetadata(meta) {
22236
22333
  const definitionMap = createNgModuleDefinitionMap(meta);
22237
22334
  const expression = importExpr(Identifiers.declareNgModule).callFn([definitionMap.toLiteralMap()]);
@@ -22244,7 +22341,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
22244
22341
  function createNgModuleDefinitionMap(meta) {
22245
22342
  const definitionMap = new DefinitionMap();
22246
22343
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
22247
- definitionMap.set('version', literal('14.0.0-next.13'));
22344
+ definitionMap.set('version', literal('14.0.0-next.16'));
22248
22345
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22249
22346
  definitionMap.set('type', meta.internalType);
22250
22347
  // We only generate the keys in the metadata if the arrays contain values.
@@ -22286,7 +22383,7 @@ function createNgModuleDefinitionMap(meta) {
22286
22383
  *
22287
22384
  * Do not include any prerelease in these versions as they are ignored.
22288
22385
  */
22289
- const MINIMUM_PARTIAL_LINKER_VERSION = '12.0.0';
22386
+ const MINIMUM_PARTIAL_LINKER_VERSION = '14.0.0';
22290
22387
  /**
22291
22388
  * Compile a Pipe declaration defined by the `R3PipeMetadata`.
22292
22389
  */
@@ -22302,10 +22399,13 @@ function compileDeclarePipeFromMetadata(meta) {
22302
22399
  function createPipeDefinitionMap(meta) {
22303
22400
  const definitionMap = new DefinitionMap();
22304
22401
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
22305
- definitionMap.set('version', literal('14.0.0-next.13'));
22402
+ definitionMap.set('version', literal('14.0.0-next.16'));
22306
22403
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22307
22404
  // e.g. `type: MyPipe`
22308
22405
  definitionMap.set('type', meta.internalType);
22406
+ if (meta.isStandalone) {
22407
+ definitionMap.set('isStandalone', literal(meta.isStandalone));
22408
+ }
22309
22409
  // e.g. `name: "myPipe"`
22310
22410
  definitionMap.set('name', literal(meta.pipeName));
22311
22411
  if (meta.pure === false) {
@@ -22352,5 +22452,5 @@ publishFacade(_global);
22352
22452
  * found in the LICENSE file at https://angular.io/license
22353
22453
  */
22354
22454
 
22355
- export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser$1 as Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3SelectorScopeMode, R3TargetBinder, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BoundAttribute as TmplAstBoundAttribute, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, Element$1 as TmplAstElement, Icu$1 as TmplAstIcu, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, Variable as TmplAstVariable, Token, TokenType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, compileClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compilePipeFromMetadata, computeMsgId, core, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, verifyHostBindings, visitAll };
22455
+ export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser$1 as Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BoundAttribute as TmplAstBoundAttribute, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, Element$1 as TmplAstElement, Icu$1 as TmplAstIcu, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, Variable as TmplAstVariable, Token, TokenType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, compileClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compilePipeFromMetadata, computeMsgId, core, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, verifyHostBindings, visitAll };
22356
22456
  //# sourceMappingURL=compiler.mjs.map