@angular/compiler 14.0.0-next.0 → 14.0.0-next.11

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 (59) hide show
  1. package/esm2020/src/compiler.mjs +2 -3
  2. package/esm2020/src/compiler_facade_interface.mjs +1 -1
  3. package/esm2020/src/compiler_util/expression_converter.mjs +38 -44
  4. package/esm2020/src/expression_parser/ast.mjs +1 -35
  5. package/esm2020/src/expression_parser/parser.mjs +78 -40
  6. package/esm2020/src/jit_compiler_facade.mjs +6 -3
  7. package/esm2020/src/ml_parser/lexer.mjs +2 -2
  8. package/esm2020/src/output/output_ast.mjs +1 -1
  9. package/esm2020/src/parse_util.mjs +2 -2
  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/directive.mjs +1 -1
  13. package/esm2020/src/render3/partial/factory.mjs +1 -1
  14. package/esm2020/src/render3/partial/injectable.mjs +1 -1
  15. package/esm2020/src/render3/partial/injector.mjs +1 -1
  16. package/esm2020/src/render3/partial/ng_module.mjs +1 -1
  17. package/esm2020/src/render3/partial/pipe.mjs +1 -1
  18. package/esm2020/src/render3/r3_identifiers.mjs +3 -1
  19. package/esm2020/src/render3/r3_module_compiler.mjs +45 -8
  20. package/esm2020/src/render3/r3_pipe_compiler.mjs +4 -1
  21. package/esm2020/src/render3/r3_template_transform.mjs +9 -9
  22. package/esm2020/src/render3/view/api.mjs +1 -1
  23. package/esm2020/src/render3/view/compiler.mjs +44 -41
  24. package/esm2020/src/render3/view/i18n/get_msg_utils.mjs +2 -5
  25. package/esm2020/src/render3/view/i18n/meta.mjs +11 -6
  26. package/esm2020/src/render3/view/style_parser.mjs +2 -2
  27. package/esm2020/src/render3/view/styling_builder.mjs +3 -3
  28. package/esm2020/src/render3/view/template.mjs +100 -131
  29. package/esm2020/src/render3/view/util.mjs +94 -15
  30. package/esm2020/src/selector.mjs +3 -3
  31. package/esm2020/src/shadow_css.mjs +2 -2
  32. package/esm2020/src/template_parser/binding_parser.mjs +16 -16
  33. package/esm2020/src/version.mjs +1 -1
  34. package/fesm2015/compiler.mjs +798 -791
  35. package/fesm2015/compiler.mjs.map +1 -1
  36. package/fesm2015/testing.mjs +1 -1
  37. package/fesm2015/testing.mjs.map +1 -1
  38. package/fesm2020/compiler.mjs +794 -789
  39. package/fesm2020/compiler.mjs.map +1 -1
  40. package/fesm2020/testing.mjs +1 -1
  41. package/fesm2020/testing.mjs.map +1 -1
  42. package/package.json +10 -2
  43. package/src/compiler.d.ts +1 -2
  44. package/src/compiler_facade_interface.d.ts +4 -0
  45. package/src/compiler_util/expression_converter.d.ts +3 -4
  46. package/src/expression_parser/ast.d.ts +0 -25
  47. package/src/expression_parser/parser.d.ts +22 -6
  48. package/src/output/output_ast.d.ts +2 -1
  49. package/src/render3/partial/api.d.ts +10 -0
  50. package/src/render3/r3_identifiers.d.ts +2 -0
  51. package/src/render3/r3_module_compiler.d.ts +30 -4
  52. package/src/render3/r3_pipe_compiler.d.ts +4 -0
  53. package/src/render3/view/api.d.ts +4 -0
  54. package/src/render3/view/i18n/meta.d.ts +1 -1
  55. package/src/render3/view/template.d.ts +1 -4
  56. package/src/render3/view/util.d.ts +19 -2
  57. package/src/template_parser/binding_parser.d.ts +4 -3
  58. package/esm2020/src/identifiers.mjs +0 -92
  59. package/src/identifiers.d.ts +0 -44
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.0-next.0
2
+ * @license Angular v14.0.0-next.11
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -224,11 +224,11 @@ class CssSelector {
224
224
  const prefix = match[3 /* PREFIX */];
225
225
  if (prefix === '#') {
226
226
  // #hash
227
- current.addAttribute('id', tag.substr(1));
227
+ current.addAttribute('id', tag.slice(1));
228
228
  }
229
229
  else if (prefix === '.') {
230
230
  // Class
231
- current.addClassName(tag.substr(1));
231
+ current.addClassName(tag.slice(1));
232
232
  }
233
233
  else {
234
234
  // Element
@@ -2733,206 +2733,208 @@ function isLongStringLiteral(expr) {
2733
2733
  * Use of this source code is governed by an MIT-style license that can be
2734
2734
  * found in the LICENSE file at https://angular.io/license
2735
2735
  */
2736
- const CORE$1 = '@angular/core';
2737
- class Identifiers$1 {
2736
+ const CORE = '@angular/core';
2737
+ class Identifiers {
2738
2738
  }
2739
2739
  /* Methods */
2740
- Identifiers$1.NEW_METHOD = 'factory';
2741
- Identifiers$1.TRANSFORM_METHOD = 'transform';
2742
- Identifiers$1.PATCH_DEPS = 'patchedDeps';
2743
- Identifiers$1.core = { name: null, moduleName: CORE$1 };
2740
+ Identifiers.NEW_METHOD = 'factory';
2741
+ Identifiers.TRANSFORM_METHOD = 'transform';
2742
+ Identifiers.PATCH_DEPS = 'patchedDeps';
2743
+ Identifiers.core = { name: null, moduleName: CORE };
2744
2744
  /* Instructions */
2745
- Identifiers$1.namespaceHTML = { name: 'ɵɵnamespaceHTML', moduleName: CORE$1 };
2746
- Identifiers$1.namespaceMathML = { name: 'ɵɵnamespaceMathML', moduleName: CORE$1 };
2747
- Identifiers$1.namespaceSVG = { name: 'ɵɵnamespaceSVG', moduleName: CORE$1 };
2748
- Identifiers$1.element = { name: 'ɵɵelement', moduleName: CORE$1 };
2749
- Identifiers$1.elementStart = { name: 'ɵɵelementStart', moduleName: CORE$1 };
2750
- Identifiers$1.elementEnd = { name: 'ɵɵelementEnd', moduleName: CORE$1 };
2751
- Identifiers$1.advance = { name: 'ɵɵadvance', moduleName: CORE$1 };
2752
- Identifiers$1.syntheticHostProperty = { name: 'ɵɵsyntheticHostProperty', moduleName: CORE$1 };
2753
- Identifiers$1.syntheticHostListener = { name: 'ɵɵsyntheticHostListener', moduleName: CORE$1 };
2754
- Identifiers$1.attribute = { name: 'ɵɵattribute', moduleName: CORE$1 };
2755
- Identifiers$1.attributeInterpolate1 = { name: 'ɵɵattributeInterpolate1', moduleName: CORE$1 };
2756
- Identifiers$1.attributeInterpolate2 = { name: 'ɵɵattributeInterpolate2', moduleName: CORE$1 };
2757
- Identifiers$1.attributeInterpolate3 = { name: 'ɵɵattributeInterpolate3', moduleName: CORE$1 };
2758
- Identifiers$1.attributeInterpolate4 = { name: 'ɵɵattributeInterpolate4', moduleName: CORE$1 };
2759
- Identifiers$1.attributeInterpolate5 = { name: 'ɵɵattributeInterpolate5', moduleName: CORE$1 };
2760
- Identifiers$1.attributeInterpolate6 = { name: 'ɵɵattributeInterpolate6', moduleName: CORE$1 };
2761
- Identifiers$1.attributeInterpolate7 = { name: 'ɵɵattributeInterpolate7', moduleName: CORE$1 };
2762
- Identifiers$1.attributeInterpolate8 = { name: 'ɵɵattributeInterpolate8', moduleName: CORE$1 };
2763
- Identifiers$1.attributeInterpolateV = { name: 'ɵɵattributeInterpolateV', moduleName: CORE$1 };
2764
- Identifiers$1.classProp = { name: 'ɵɵclassProp', moduleName: CORE$1 };
2765
- Identifiers$1.elementContainerStart = { name: 'ɵɵelementContainerStart', moduleName: CORE$1 };
2766
- Identifiers$1.elementContainerEnd = { name: 'ɵɵelementContainerEnd', moduleName: CORE$1 };
2767
- Identifiers$1.elementContainer = { name: 'ɵɵelementContainer', moduleName: CORE$1 };
2768
- Identifiers$1.styleMap = { name: 'ɵɵstyleMap', moduleName: CORE$1 };
2769
- Identifiers$1.styleMapInterpolate1 = { name: 'ɵɵstyleMapInterpolate1', moduleName: CORE$1 };
2770
- Identifiers$1.styleMapInterpolate2 = { name: 'ɵɵstyleMapInterpolate2', moduleName: CORE$1 };
2771
- Identifiers$1.styleMapInterpolate3 = { name: 'ɵɵstyleMapInterpolate3', moduleName: CORE$1 };
2772
- Identifiers$1.styleMapInterpolate4 = { name: 'ɵɵstyleMapInterpolate4', moduleName: CORE$1 };
2773
- Identifiers$1.styleMapInterpolate5 = { name: 'ɵɵstyleMapInterpolate5', moduleName: CORE$1 };
2774
- Identifiers$1.styleMapInterpolate6 = { name: 'ɵɵstyleMapInterpolate6', moduleName: CORE$1 };
2775
- Identifiers$1.styleMapInterpolate7 = { name: 'ɵɵstyleMapInterpolate7', moduleName: CORE$1 };
2776
- Identifiers$1.styleMapInterpolate8 = { name: 'ɵɵstyleMapInterpolate8', moduleName: CORE$1 };
2777
- Identifiers$1.styleMapInterpolateV = { name: 'ɵɵstyleMapInterpolateV', moduleName: CORE$1 };
2778
- Identifiers$1.classMap = { name: 'ɵɵclassMap', moduleName: CORE$1 };
2779
- Identifiers$1.classMapInterpolate1 = { name: 'ɵɵclassMapInterpolate1', moduleName: CORE$1 };
2780
- Identifiers$1.classMapInterpolate2 = { name: 'ɵɵclassMapInterpolate2', moduleName: CORE$1 };
2781
- Identifiers$1.classMapInterpolate3 = { name: 'ɵɵclassMapInterpolate3', moduleName: CORE$1 };
2782
- Identifiers$1.classMapInterpolate4 = { name: 'ɵɵclassMapInterpolate4', moduleName: CORE$1 };
2783
- Identifiers$1.classMapInterpolate5 = { name: 'ɵɵclassMapInterpolate5', moduleName: CORE$1 };
2784
- Identifiers$1.classMapInterpolate6 = { name: 'ɵɵclassMapInterpolate6', moduleName: CORE$1 };
2785
- Identifiers$1.classMapInterpolate7 = { name: 'ɵɵclassMapInterpolate7', moduleName: CORE$1 };
2786
- Identifiers$1.classMapInterpolate8 = { name: 'ɵɵclassMapInterpolate8', moduleName: CORE$1 };
2787
- Identifiers$1.classMapInterpolateV = { name: 'ɵɵclassMapInterpolateV', moduleName: CORE$1 };
2788
- Identifiers$1.styleProp = { name: 'ɵɵstyleProp', moduleName: CORE$1 };
2789
- Identifiers$1.stylePropInterpolate1 = { name: 'ɵɵstylePropInterpolate1', moduleName: CORE$1 };
2790
- Identifiers$1.stylePropInterpolate2 = { name: 'ɵɵstylePropInterpolate2', moduleName: CORE$1 };
2791
- Identifiers$1.stylePropInterpolate3 = { name: 'ɵɵstylePropInterpolate3', moduleName: CORE$1 };
2792
- Identifiers$1.stylePropInterpolate4 = { name: 'ɵɵstylePropInterpolate4', moduleName: CORE$1 };
2793
- Identifiers$1.stylePropInterpolate5 = { name: 'ɵɵstylePropInterpolate5', moduleName: CORE$1 };
2794
- Identifiers$1.stylePropInterpolate6 = { name: 'ɵɵstylePropInterpolate6', moduleName: CORE$1 };
2795
- Identifiers$1.stylePropInterpolate7 = { name: 'ɵɵstylePropInterpolate7', moduleName: CORE$1 };
2796
- Identifiers$1.stylePropInterpolate8 = { name: 'ɵɵstylePropInterpolate8', moduleName: CORE$1 };
2797
- Identifiers$1.stylePropInterpolateV = { name: 'ɵɵstylePropInterpolateV', moduleName: CORE$1 };
2798
- Identifiers$1.nextContext = { name: 'ɵɵnextContext', moduleName: CORE$1 };
2799
- Identifiers$1.templateCreate = { name: 'ɵɵtemplate', moduleName: CORE$1 };
2800
- Identifiers$1.text = { name: 'ɵɵtext', moduleName: CORE$1 };
2801
- Identifiers$1.enableBindings = { name: 'ɵɵenableBindings', moduleName: CORE$1 };
2802
- Identifiers$1.disableBindings = { name: 'ɵɵdisableBindings', moduleName: CORE$1 };
2803
- Identifiers$1.getCurrentView = { name: 'ɵɵgetCurrentView', moduleName: CORE$1 };
2804
- Identifiers$1.textInterpolate = { name: 'ɵɵtextInterpolate', moduleName: CORE$1 };
2805
- Identifiers$1.textInterpolate1 = { name: 'ɵɵtextInterpolate1', moduleName: CORE$1 };
2806
- Identifiers$1.textInterpolate2 = { name: 'ɵɵtextInterpolate2', moduleName: CORE$1 };
2807
- Identifiers$1.textInterpolate3 = { name: 'ɵɵtextInterpolate3', moduleName: CORE$1 };
2808
- Identifiers$1.textInterpolate4 = { name: 'ɵɵtextInterpolate4', moduleName: CORE$1 };
2809
- Identifiers$1.textInterpolate5 = { name: 'ɵɵtextInterpolate5', moduleName: CORE$1 };
2810
- Identifiers$1.textInterpolate6 = { name: 'ɵɵtextInterpolate6', moduleName: CORE$1 };
2811
- Identifiers$1.textInterpolate7 = { name: 'ɵɵtextInterpolate7', moduleName: CORE$1 };
2812
- Identifiers$1.textInterpolate8 = { name: 'ɵɵtextInterpolate8', moduleName: CORE$1 };
2813
- Identifiers$1.textInterpolateV = { name: 'ɵɵtextInterpolateV', moduleName: CORE$1 };
2814
- Identifiers$1.restoreView = { name: 'ɵɵrestoreView', moduleName: CORE$1 };
2815
- Identifiers$1.pureFunction0 = { name: 'ɵɵpureFunction0', moduleName: CORE$1 };
2816
- Identifiers$1.pureFunction1 = { name: 'ɵɵpureFunction1', moduleName: CORE$1 };
2817
- Identifiers$1.pureFunction2 = { name: 'ɵɵpureFunction2', moduleName: CORE$1 };
2818
- Identifiers$1.pureFunction3 = { name: 'ɵɵpureFunction3', moduleName: CORE$1 };
2819
- Identifiers$1.pureFunction4 = { name: 'ɵɵpureFunction4', moduleName: CORE$1 };
2820
- Identifiers$1.pureFunction5 = { name: 'ɵɵpureFunction5', moduleName: CORE$1 };
2821
- Identifiers$1.pureFunction6 = { name: 'ɵɵpureFunction6', moduleName: CORE$1 };
2822
- Identifiers$1.pureFunction7 = { name: 'ɵɵpureFunction7', moduleName: CORE$1 };
2823
- Identifiers$1.pureFunction8 = { name: 'ɵɵpureFunction8', moduleName: CORE$1 };
2824
- Identifiers$1.pureFunctionV = { name: 'ɵɵpureFunctionV', moduleName: CORE$1 };
2825
- Identifiers$1.pipeBind1 = { name: 'ɵɵpipeBind1', moduleName: CORE$1 };
2826
- Identifiers$1.pipeBind2 = { name: 'ɵɵpipeBind2', moduleName: CORE$1 };
2827
- Identifiers$1.pipeBind3 = { name: 'ɵɵpipeBind3', moduleName: CORE$1 };
2828
- Identifiers$1.pipeBind4 = { name: 'ɵɵpipeBind4', moduleName: CORE$1 };
2829
- Identifiers$1.pipeBindV = { name: 'ɵɵpipeBindV', moduleName: CORE$1 };
2830
- Identifiers$1.hostProperty = { name: 'ɵɵhostProperty', moduleName: CORE$1 };
2831
- Identifiers$1.property = { name: 'ɵɵproperty', moduleName: CORE$1 };
2832
- Identifiers$1.propertyInterpolate = { name: 'ɵɵpropertyInterpolate', moduleName: CORE$1 };
2833
- Identifiers$1.propertyInterpolate1 = { name: 'ɵɵpropertyInterpolate1', moduleName: CORE$1 };
2834
- Identifiers$1.propertyInterpolate2 = { name: 'ɵɵpropertyInterpolate2', moduleName: CORE$1 };
2835
- Identifiers$1.propertyInterpolate3 = { name: 'ɵɵpropertyInterpolate3', moduleName: CORE$1 };
2836
- Identifiers$1.propertyInterpolate4 = { name: 'ɵɵpropertyInterpolate4', moduleName: CORE$1 };
2837
- Identifiers$1.propertyInterpolate5 = { name: 'ɵɵpropertyInterpolate5', moduleName: CORE$1 };
2838
- Identifiers$1.propertyInterpolate6 = { name: 'ɵɵpropertyInterpolate6', moduleName: CORE$1 };
2839
- Identifiers$1.propertyInterpolate7 = { name: 'ɵɵpropertyInterpolate7', moduleName: CORE$1 };
2840
- Identifiers$1.propertyInterpolate8 = { name: 'ɵɵpropertyInterpolate8', moduleName: CORE$1 };
2841
- Identifiers$1.propertyInterpolateV = { name: 'ɵɵpropertyInterpolateV', moduleName: CORE$1 };
2842
- Identifiers$1.i18n = { name: 'ɵɵi18n', moduleName: CORE$1 };
2843
- Identifiers$1.i18nAttributes = { name: 'ɵɵi18nAttributes', moduleName: CORE$1 };
2844
- Identifiers$1.i18nExp = { name: 'ɵɵi18nExp', moduleName: CORE$1 };
2845
- Identifiers$1.i18nStart = { name: 'ɵɵi18nStart', moduleName: CORE$1 };
2846
- Identifiers$1.i18nEnd = { name: 'ɵɵi18nEnd', moduleName: CORE$1 };
2847
- Identifiers$1.i18nApply = { name: 'ɵɵi18nApply', moduleName: CORE$1 };
2848
- Identifiers$1.i18nPostprocess = { name: 'ɵɵi18nPostprocess', moduleName: CORE$1 };
2849
- Identifiers$1.pipe = { name: 'ɵɵpipe', moduleName: CORE$1 };
2850
- Identifiers$1.projection = { name: 'ɵɵprojection', moduleName: CORE$1 };
2851
- Identifiers$1.projectionDef = { name: 'ɵɵprojectionDef', moduleName: CORE$1 };
2852
- Identifiers$1.reference = { name: 'ɵɵreference', moduleName: CORE$1 };
2853
- Identifiers$1.inject = { name: 'ɵɵinject', moduleName: CORE$1 };
2854
- Identifiers$1.injectAttribute = { name: 'ɵɵinjectAttribute', moduleName: CORE$1 };
2855
- Identifiers$1.directiveInject = { name: 'ɵɵdirectiveInject', moduleName: CORE$1 };
2856
- Identifiers$1.invalidFactory = { name: 'ɵɵinvalidFactory', moduleName: CORE$1 };
2857
- Identifiers$1.invalidFactoryDep = { name: 'ɵɵinvalidFactoryDep', moduleName: CORE$1 };
2858
- Identifiers$1.templateRefExtractor = { name: 'ɵɵtemplateRefExtractor', moduleName: CORE$1 };
2859
- Identifiers$1.forwardRef = { name: 'forwardRef', moduleName: CORE$1 };
2860
- Identifiers$1.resolveForwardRef = { name: 'resolveForwardRef', moduleName: CORE$1 };
2861
- Identifiers$1.ɵɵdefineInjectable = { name: 'ɵɵdefineInjectable', moduleName: CORE$1 };
2862
- Identifiers$1.declareInjectable = { name: 'ɵɵngDeclareInjectable', moduleName: CORE$1 };
2863
- Identifiers$1.InjectableDeclaration = { name: 'ɵɵInjectableDeclaration', moduleName: CORE$1 };
2864
- Identifiers$1.resolveWindow = { name: 'ɵɵresolveWindow', moduleName: CORE$1 };
2865
- Identifiers$1.resolveDocument = { name: 'ɵɵresolveDocument', moduleName: CORE$1 };
2866
- Identifiers$1.resolveBody = { name: 'ɵɵresolveBody', moduleName: CORE$1 };
2867
- Identifiers$1.defineComponent = { name: 'ɵɵdefineComponent', moduleName: CORE$1 };
2868
- Identifiers$1.declareComponent = { name: 'ɵɵngDeclareComponent', moduleName: CORE$1 };
2869
- Identifiers$1.setComponentScope = { name: 'ɵɵsetComponentScope', moduleName: CORE$1 };
2870
- Identifiers$1.ChangeDetectionStrategy = {
2745
+ Identifiers.namespaceHTML = { name: 'ɵɵnamespaceHTML', moduleName: CORE };
2746
+ Identifiers.namespaceMathML = { name: 'ɵɵnamespaceMathML', moduleName: CORE };
2747
+ Identifiers.namespaceSVG = { name: 'ɵɵnamespaceSVG', moduleName: CORE };
2748
+ Identifiers.element = { name: 'ɵɵelement', moduleName: CORE };
2749
+ Identifiers.elementStart = { name: 'ɵɵelementStart', moduleName: CORE };
2750
+ Identifiers.elementEnd = { name: 'ɵɵelementEnd', moduleName: CORE };
2751
+ Identifiers.advance = { name: 'ɵɵadvance', moduleName: CORE };
2752
+ Identifiers.syntheticHostProperty = { name: 'ɵɵsyntheticHostProperty', moduleName: CORE };
2753
+ Identifiers.syntheticHostListener = { name: 'ɵɵsyntheticHostListener', moduleName: CORE };
2754
+ Identifiers.attribute = { name: 'ɵɵattribute', moduleName: CORE };
2755
+ Identifiers.attributeInterpolate1 = { name: 'ɵɵattributeInterpolate1', moduleName: CORE };
2756
+ Identifiers.attributeInterpolate2 = { name: 'ɵɵattributeInterpolate2', moduleName: CORE };
2757
+ Identifiers.attributeInterpolate3 = { name: 'ɵɵattributeInterpolate3', moduleName: CORE };
2758
+ Identifiers.attributeInterpolate4 = { name: 'ɵɵattributeInterpolate4', moduleName: CORE };
2759
+ Identifiers.attributeInterpolate5 = { name: 'ɵɵattributeInterpolate5', moduleName: CORE };
2760
+ Identifiers.attributeInterpolate6 = { name: 'ɵɵattributeInterpolate6', moduleName: CORE };
2761
+ Identifiers.attributeInterpolate7 = { name: 'ɵɵattributeInterpolate7', moduleName: CORE };
2762
+ Identifiers.attributeInterpolate8 = { name: 'ɵɵattributeInterpolate8', moduleName: CORE };
2763
+ Identifiers.attributeInterpolateV = { name: 'ɵɵattributeInterpolateV', moduleName: CORE };
2764
+ Identifiers.classProp = { name: 'ɵɵclassProp', moduleName: CORE };
2765
+ Identifiers.elementContainerStart = { name: 'ɵɵelementContainerStart', moduleName: CORE };
2766
+ Identifiers.elementContainerEnd = { name: 'ɵɵelementContainerEnd', moduleName: CORE };
2767
+ Identifiers.elementContainer = { name: 'ɵɵelementContainer', moduleName: CORE };
2768
+ Identifiers.styleMap = { name: 'ɵɵstyleMap', moduleName: CORE };
2769
+ Identifiers.styleMapInterpolate1 = { name: 'ɵɵstyleMapInterpolate1', moduleName: CORE };
2770
+ Identifiers.styleMapInterpolate2 = { name: 'ɵɵstyleMapInterpolate2', moduleName: CORE };
2771
+ Identifiers.styleMapInterpolate3 = { name: 'ɵɵstyleMapInterpolate3', moduleName: CORE };
2772
+ Identifiers.styleMapInterpolate4 = { name: 'ɵɵstyleMapInterpolate4', moduleName: CORE };
2773
+ Identifiers.styleMapInterpolate5 = { name: 'ɵɵstyleMapInterpolate5', moduleName: CORE };
2774
+ Identifiers.styleMapInterpolate6 = { name: 'ɵɵstyleMapInterpolate6', moduleName: CORE };
2775
+ Identifiers.styleMapInterpolate7 = { name: 'ɵɵstyleMapInterpolate7', moduleName: CORE };
2776
+ Identifiers.styleMapInterpolate8 = { name: 'ɵɵstyleMapInterpolate8', moduleName: CORE };
2777
+ Identifiers.styleMapInterpolateV = { name: 'ɵɵstyleMapInterpolateV', moduleName: CORE };
2778
+ Identifiers.classMap = { name: 'ɵɵclassMap', moduleName: CORE };
2779
+ Identifiers.classMapInterpolate1 = { name: 'ɵɵclassMapInterpolate1', moduleName: CORE };
2780
+ Identifiers.classMapInterpolate2 = { name: 'ɵɵclassMapInterpolate2', moduleName: CORE };
2781
+ Identifiers.classMapInterpolate3 = { name: 'ɵɵclassMapInterpolate3', moduleName: CORE };
2782
+ Identifiers.classMapInterpolate4 = { name: 'ɵɵclassMapInterpolate4', moduleName: CORE };
2783
+ Identifiers.classMapInterpolate5 = { name: 'ɵɵclassMapInterpolate5', moduleName: CORE };
2784
+ Identifiers.classMapInterpolate6 = { name: 'ɵɵclassMapInterpolate6', moduleName: CORE };
2785
+ Identifiers.classMapInterpolate7 = { name: 'ɵɵclassMapInterpolate7', moduleName: CORE };
2786
+ Identifiers.classMapInterpolate8 = { name: 'ɵɵclassMapInterpolate8', moduleName: CORE };
2787
+ Identifiers.classMapInterpolateV = { name: 'ɵɵclassMapInterpolateV', moduleName: CORE };
2788
+ Identifiers.styleProp = { name: 'ɵɵstyleProp', moduleName: CORE };
2789
+ Identifiers.stylePropInterpolate1 = { name: 'ɵɵstylePropInterpolate1', moduleName: CORE };
2790
+ Identifiers.stylePropInterpolate2 = { name: 'ɵɵstylePropInterpolate2', moduleName: CORE };
2791
+ Identifiers.stylePropInterpolate3 = { name: 'ɵɵstylePropInterpolate3', moduleName: CORE };
2792
+ Identifiers.stylePropInterpolate4 = { name: 'ɵɵstylePropInterpolate4', moduleName: CORE };
2793
+ Identifiers.stylePropInterpolate5 = { name: 'ɵɵstylePropInterpolate5', moduleName: CORE };
2794
+ Identifiers.stylePropInterpolate6 = { name: 'ɵɵstylePropInterpolate6', moduleName: CORE };
2795
+ Identifiers.stylePropInterpolate7 = { name: 'ɵɵstylePropInterpolate7', moduleName: CORE };
2796
+ Identifiers.stylePropInterpolate8 = { name: 'ɵɵstylePropInterpolate8', moduleName: CORE };
2797
+ Identifiers.stylePropInterpolateV = { name: 'ɵɵstylePropInterpolateV', moduleName: CORE };
2798
+ Identifiers.nextContext = { name: 'ɵɵnextContext', moduleName: CORE };
2799
+ Identifiers.resetView = { name: 'ɵɵresetView', moduleName: CORE };
2800
+ Identifiers.templateCreate = { name: 'ɵɵtemplate', moduleName: CORE };
2801
+ Identifiers.text = { name: 'ɵɵtext', moduleName: CORE };
2802
+ Identifiers.enableBindings = { name: 'ɵɵenableBindings', moduleName: CORE };
2803
+ Identifiers.disableBindings = { name: 'ɵɵdisableBindings', moduleName: CORE };
2804
+ Identifiers.getCurrentView = { name: 'ɵɵgetCurrentView', moduleName: CORE };
2805
+ Identifiers.textInterpolate = { name: 'ɵɵtextInterpolate', moduleName: CORE };
2806
+ Identifiers.textInterpolate1 = { name: 'ɵɵtextInterpolate1', moduleName: CORE };
2807
+ Identifiers.textInterpolate2 = { name: 'ɵɵtextInterpolate2', moduleName: CORE };
2808
+ Identifiers.textInterpolate3 = { name: 'ɵɵtextInterpolate3', moduleName: CORE };
2809
+ Identifiers.textInterpolate4 = { name: 'ɵɵtextInterpolate4', moduleName: CORE };
2810
+ Identifiers.textInterpolate5 = { name: 'ɵɵtextInterpolate5', moduleName: CORE };
2811
+ Identifiers.textInterpolate6 = { name: 'ɵɵtextInterpolate6', moduleName: CORE };
2812
+ Identifiers.textInterpolate7 = { name: 'ɵɵtextInterpolate7', moduleName: CORE };
2813
+ Identifiers.textInterpolate8 = { name: 'ɵɵtextInterpolate8', moduleName: CORE };
2814
+ Identifiers.textInterpolateV = { name: 'ɵɵtextInterpolateV', moduleName: CORE };
2815
+ Identifiers.restoreView = { name: 'ɵɵrestoreView', moduleName: CORE };
2816
+ Identifiers.pureFunction0 = { name: 'ɵɵpureFunction0', moduleName: CORE };
2817
+ Identifiers.pureFunction1 = { name: 'ɵɵpureFunction1', moduleName: CORE };
2818
+ Identifiers.pureFunction2 = { name: 'ɵɵpureFunction2', moduleName: CORE };
2819
+ Identifiers.pureFunction3 = { name: 'ɵɵpureFunction3', moduleName: CORE };
2820
+ Identifiers.pureFunction4 = { name: 'ɵɵpureFunction4', moduleName: CORE };
2821
+ Identifiers.pureFunction5 = { name: 'ɵɵpureFunction5', moduleName: CORE };
2822
+ Identifiers.pureFunction6 = { name: 'ɵɵpureFunction6', moduleName: CORE };
2823
+ Identifiers.pureFunction7 = { name: 'ɵɵpureFunction7', moduleName: CORE };
2824
+ Identifiers.pureFunction8 = { name: 'ɵɵpureFunction8', moduleName: CORE };
2825
+ Identifiers.pureFunctionV = { name: 'ɵɵpureFunctionV', moduleName: CORE };
2826
+ Identifiers.pipeBind1 = { name: 'ɵɵpipeBind1', moduleName: CORE };
2827
+ Identifiers.pipeBind2 = { name: 'ɵɵpipeBind2', moduleName: CORE };
2828
+ Identifiers.pipeBind3 = { name: 'ɵɵpipeBind3', moduleName: CORE };
2829
+ Identifiers.pipeBind4 = { name: 'ɵɵpipeBind4', moduleName: CORE };
2830
+ Identifiers.pipeBindV = { name: 'ɵɵpipeBindV', moduleName: CORE };
2831
+ Identifiers.hostProperty = { name: 'ɵɵhostProperty', moduleName: CORE };
2832
+ Identifiers.property = { name: 'ɵɵproperty', moduleName: CORE };
2833
+ Identifiers.propertyInterpolate = { name: 'ɵɵpropertyInterpolate', moduleName: CORE };
2834
+ Identifiers.propertyInterpolate1 = { name: 'ɵɵpropertyInterpolate1', moduleName: CORE };
2835
+ Identifiers.propertyInterpolate2 = { name: 'ɵɵpropertyInterpolate2', moduleName: CORE };
2836
+ Identifiers.propertyInterpolate3 = { name: 'ɵɵpropertyInterpolate3', moduleName: CORE };
2837
+ Identifiers.propertyInterpolate4 = { name: 'ɵɵpropertyInterpolate4', moduleName: CORE };
2838
+ Identifiers.propertyInterpolate5 = { name: 'ɵɵpropertyInterpolate5', moduleName: CORE };
2839
+ Identifiers.propertyInterpolate6 = { name: 'ɵɵpropertyInterpolate6', moduleName: CORE };
2840
+ Identifiers.propertyInterpolate7 = { name: 'ɵɵpropertyInterpolate7', moduleName: CORE };
2841
+ Identifiers.propertyInterpolate8 = { name: 'ɵɵpropertyInterpolate8', moduleName: CORE };
2842
+ Identifiers.propertyInterpolateV = { name: 'ɵɵpropertyInterpolateV', moduleName: CORE };
2843
+ Identifiers.i18n = { name: 'ɵɵi18n', moduleName: CORE };
2844
+ Identifiers.i18nAttributes = { name: 'ɵɵi18nAttributes', moduleName: CORE };
2845
+ Identifiers.i18nExp = { name: 'ɵɵi18nExp', moduleName: CORE };
2846
+ Identifiers.i18nStart = { name: 'ɵɵi18nStart', moduleName: CORE };
2847
+ Identifiers.i18nEnd = { name: 'ɵɵi18nEnd', moduleName: CORE };
2848
+ Identifiers.i18nApply = { name: 'ɵɵi18nApply', moduleName: CORE };
2849
+ Identifiers.i18nPostprocess = { name: 'ɵɵi18nPostprocess', moduleName: CORE };
2850
+ Identifiers.pipe = { name: 'ɵɵpipe', moduleName: CORE };
2851
+ Identifiers.projection = { name: 'ɵɵprojection', moduleName: CORE };
2852
+ Identifiers.projectionDef = { name: 'ɵɵprojectionDef', moduleName: CORE };
2853
+ Identifiers.reference = { name: 'ɵɵreference', moduleName: CORE };
2854
+ Identifiers.inject = { name: 'ɵɵinject', moduleName: CORE };
2855
+ Identifiers.injectAttribute = { name: 'ɵɵinjectAttribute', moduleName: CORE };
2856
+ Identifiers.directiveInject = { name: 'ɵɵdirectiveInject', moduleName: CORE };
2857
+ Identifiers.invalidFactory = { name: 'ɵɵinvalidFactory', moduleName: CORE };
2858
+ Identifiers.invalidFactoryDep = { name: 'ɵɵinvalidFactoryDep', moduleName: CORE };
2859
+ Identifiers.templateRefExtractor = { name: 'ɵɵtemplateRefExtractor', moduleName: CORE };
2860
+ Identifiers.forwardRef = { name: 'forwardRef', moduleName: CORE };
2861
+ Identifiers.resolveForwardRef = { name: 'resolveForwardRef', moduleName: CORE };
2862
+ Identifiers.ɵɵdefineInjectable = { name: 'ɵɵdefineInjectable', moduleName: CORE };
2863
+ Identifiers.declareInjectable = { name: 'ɵɵngDeclareInjectable', moduleName: CORE };
2864
+ Identifiers.InjectableDeclaration = { name: 'ɵɵInjectableDeclaration', moduleName: CORE };
2865
+ Identifiers.resolveWindow = { name: 'ɵɵresolveWindow', moduleName: CORE };
2866
+ Identifiers.resolveDocument = { name: 'ɵɵresolveDocument', moduleName: CORE };
2867
+ Identifiers.resolveBody = { name: 'ɵɵresolveBody', moduleName: CORE };
2868
+ Identifiers.defineComponent = { name: 'ɵɵdefineComponent', moduleName: CORE };
2869
+ Identifiers.declareComponent = { name: 'ɵɵngDeclareComponent', moduleName: CORE };
2870
+ Identifiers.setComponentScope = { name: 'ɵɵsetComponentScope', moduleName: CORE };
2871
+ Identifiers.ChangeDetectionStrategy = {
2871
2872
  name: 'ChangeDetectionStrategy',
2872
- moduleName: CORE$1,
2873
+ moduleName: CORE,
2873
2874
  };
2874
- Identifiers$1.ViewEncapsulation = {
2875
+ Identifiers.ViewEncapsulation = {
2875
2876
  name: 'ViewEncapsulation',
2876
- moduleName: CORE$1,
2877
+ moduleName: CORE,
2877
2878
  };
2878
- Identifiers$1.ComponentDeclaration = {
2879
+ Identifiers.ComponentDeclaration = {
2879
2880
  name: 'ɵɵComponentDeclaration',
2880
- moduleName: CORE$1,
2881
+ moduleName: CORE,
2881
2882
  };
2882
- Identifiers$1.FactoryDeclaration = {
2883
+ Identifiers.FactoryDeclaration = {
2883
2884
  name: 'ɵɵFactoryDeclaration',
2884
- moduleName: CORE$1,
2885
+ moduleName: CORE,
2885
2886
  };
2886
- Identifiers$1.declareFactory = { name: 'ɵɵngDeclareFactory', moduleName: CORE$1 };
2887
- Identifiers$1.FactoryTarget = { name: 'ɵɵFactoryTarget', moduleName: CORE$1 };
2888
- Identifiers$1.defineDirective = { name: 'ɵɵdefineDirective', moduleName: CORE$1 };
2889
- Identifiers$1.declareDirective = { name: 'ɵɵngDeclareDirective', moduleName: CORE$1 };
2890
- Identifiers$1.DirectiveDeclaration = {
2887
+ Identifiers.declareFactory = { name: 'ɵɵngDeclareFactory', moduleName: CORE };
2888
+ Identifiers.FactoryTarget = { name: 'ɵɵFactoryTarget', moduleName: CORE };
2889
+ Identifiers.defineDirective = { name: 'ɵɵdefineDirective', moduleName: CORE };
2890
+ Identifiers.declareDirective = { name: 'ɵɵngDeclareDirective', moduleName: CORE };
2891
+ Identifiers.DirectiveDeclaration = {
2891
2892
  name: 'ɵɵDirectiveDeclaration',
2892
- moduleName: CORE$1,
2893
+ moduleName: CORE,
2893
2894
  };
2894
- Identifiers$1.InjectorDef = { name: 'ɵɵInjectorDef', moduleName: CORE$1 };
2895
- Identifiers$1.InjectorDeclaration = { name: 'ɵɵInjectorDeclaration', moduleName: CORE$1 };
2896
- Identifiers$1.defineInjector = { name: 'ɵɵdefineInjector', moduleName: CORE$1 };
2897
- Identifiers$1.declareInjector = { name: 'ɵɵngDeclareInjector', moduleName: CORE$1 };
2898
- Identifiers$1.NgModuleDeclaration = {
2895
+ Identifiers.InjectorDef = { name: 'ɵɵInjectorDef', moduleName: CORE };
2896
+ Identifiers.InjectorDeclaration = { name: 'ɵɵInjectorDeclaration', moduleName: CORE };
2897
+ Identifiers.defineInjector = { name: 'ɵɵdefineInjector', moduleName: CORE };
2898
+ Identifiers.declareInjector = { name: 'ɵɵngDeclareInjector', moduleName: CORE };
2899
+ Identifiers.NgModuleDeclaration = {
2899
2900
  name: 'ɵɵNgModuleDeclaration',
2900
- moduleName: CORE$1,
2901
+ moduleName: CORE,
2901
2902
  };
2902
- Identifiers$1.ModuleWithProviders = {
2903
+ Identifiers.ModuleWithProviders = {
2903
2904
  name: 'ModuleWithProviders',
2904
- moduleName: CORE$1,
2905
+ moduleName: CORE,
2905
2906
  };
2906
- Identifiers$1.defineNgModule = { name: 'ɵɵdefineNgModule', moduleName: CORE$1 };
2907
- Identifiers$1.declareNgModule = { name: 'ɵɵngDeclareNgModule', moduleName: CORE$1 };
2908
- Identifiers$1.setNgModuleScope = { name: 'ɵɵsetNgModuleScope', moduleName: CORE$1 };
2909
- Identifiers$1.PipeDeclaration = { name: 'ɵɵPipeDeclaration', moduleName: CORE$1 };
2910
- Identifiers$1.definePipe = { name: 'ɵɵdefinePipe', moduleName: CORE$1 };
2911
- Identifiers$1.declarePipe = { name: 'ɵɵngDeclarePipe', moduleName: CORE$1 };
2912
- Identifiers$1.declareClassMetadata = { name: 'ɵɵngDeclareClassMetadata', moduleName: CORE$1 };
2913
- Identifiers$1.setClassMetadata = { name: 'ɵsetClassMetadata', moduleName: CORE$1 };
2914
- Identifiers$1.queryRefresh = { name: 'ɵɵqueryRefresh', moduleName: CORE$1 };
2915
- Identifiers$1.viewQuery = { name: 'ɵɵviewQuery', moduleName: CORE$1 };
2916
- Identifiers$1.loadQuery = { name: 'ɵɵloadQuery', moduleName: CORE$1 };
2917
- Identifiers$1.contentQuery = { name: 'ɵɵcontentQuery', moduleName: CORE$1 };
2918
- Identifiers$1.NgOnChangesFeature = { name: 'ɵɵNgOnChangesFeature', moduleName: CORE$1 };
2919
- Identifiers$1.InheritDefinitionFeature = { name: 'ɵɵInheritDefinitionFeature', moduleName: CORE$1 };
2920
- Identifiers$1.CopyDefinitionFeature = { name: 'ɵɵCopyDefinitionFeature', moduleName: CORE$1 };
2921
- Identifiers$1.ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE$1 };
2922
- Identifiers$1.listener = { name: 'ɵɵlistener', moduleName: CORE$1 };
2923
- Identifiers$1.getInheritedFactory = {
2907
+ Identifiers.defineNgModule = { name: 'ɵɵdefineNgModule', moduleName: CORE };
2908
+ Identifiers.declareNgModule = { name: 'ɵɵngDeclareNgModule', moduleName: CORE };
2909
+ Identifiers.setNgModuleScope = { name: 'ɵɵsetNgModuleScope', moduleName: CORE };
2910
+ Identifiers.registerNgModuleType = { name: 'ɵɵregisterNgModuleType', moduleName: CORE };
2911
+ Identifiers.PipeDeclaration = { name: 'ɵɵPipeDeclaration', moduleName: CORE };
2912
+ Identifiers.definePipe = { name: 'ɵɵdefinePipe', moduleName: CORE };
2913
+ Identifiers.declarePipe = { name: 'ɵɵngDeclarePipe', moduleName: CORE };
2914
+ Identifiers.declareClassMetadata = { name: 'ɵɵngDeclareClassMetadata', moduleName: CORE };
2915
+ Identifiers.setClassMetadata = { name: 'ɵsetClassMetadata', moduleName: CORE };
2916
+ Identifiers.queryRefresh = { name: 'ɵɵqueryRefresh', moduleName: CORE };
2917
+ Identifiers.viewQuery = { name: 'ɵɵviewQuery', moduleName: CORE };
2918
+ Identifiers.loadQuery = { name: 'ɵɵloadQuery', moduleName: CORE };
2919
+ Identifiers.contentQuery = { name: 'ɵɵcontentQuery', moduleName: CORE };
2920
+ Identifiers.NgOnChangesFeature = { name: 'ɵɵNgOnChangesFeature', moduleName: CORE };
2921
+ Identifiers.InheritDefinitionFeature = { name: 'ɵɵInheritDefinitionFeature', moduleName: CORE };
2922
+ Identifiers.CopyDefinitionFeature = { name: 'ɵɵCopyDefinitionFeature', moduleName: CORE };
2923
+ Identifiers.ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE };
2924
+ Identifiers.listener = { name: 'ɵɵlistener', moduleName: CORE };
2925
+ Identifiers.getInheritedFactory = {
2924
2926
  name: 'ɵɵgetInheritedFactory',
2925
- moduleName: CORE$1,
2927
+ moduleName: CORE,
2926
2928
  };
2927
2929
  // sanitization-related functions
2928
- Identifiers$1.sanitizeHtml = { name: 'ɵɵsanitizeHtml', moduleName: CORE$1 };
2929
- Identifiers$1.sanitizeStyle = { name: 'ɵɵsanitizeStyle', moduleName: CORE$1 };
2930
- Identifiers$1.sanitizeResourceUrl = { name: 'ɵɵsanitizeResourceUrl', moduleName: CORE$1 };
2931
- Identifiers$1.sanitizeScript = { name: 'ɵɵsanitizeScript', moduleName: CORE$1 };
2932
- Identifiers$1.sanitizeUrl = { name: 'ɵɵsanitizeUrl', moduleName: CORE$1 };
2933
- Identifiers$1.sanitizeUrlOrResourceUrl = { name: 'ɵɵsanitizeUrlOrResourceUrl', moduleName: CORE$1 };
2934
- Identifiers$1.trustConstantHtml = { name: 'ɵɵtrustConstantHtml', moduleName: CORE$1 };
2935
- Identifiers$1.trustConstantResourceUrl = { name: 'ɵɵtrustConstantResourceUrl', moduleName: CORE$1 };
2930
+ Identifiers.sanitizeHtml = { name: 'ɵɵsanitizeHtml', moduleName: CORE };
2931
+ Identifiers.sanitizeStyle = { name: 'ɵɵsanitizeStyle', moduleName: CORE };
2932
+ Identifiers.sanitizeResourceUrl = { name: 'ɵɵsanitizeResourceUrl', moduleName: CORE };
2933
+ Identifiers.sanitizeScript = { name: 'ɵɵsanitizeScript', moduleName: CORE };
2934
+ Identifiers.sanitizeUrl = { name: 'ɵɵsanitizeUrl', moduleName: CORE };
2935
+ Identifiers.sanitizeUrlOrResourceUrl = { name: 'ɵɵsanitizeUrlOrResourceUrl', moduleName: CORE };
2936
+ Identifiers.trustConstantHtml = { name: 'ɵɵtrustConstantHtml', moduleName: CORE };
2937
+ Identifiers.trustConstantResourceUrl = { name: 'ɵɵtrustConstantResourceUrl', moduleName: CORE };
2936
2938
 
2937
2939
  /**
2938
2940
  * @license
@@ -3674,7 +3676,7 @@ function convertFromMaybeForwardRefExpression({ expression, forwardRef }) {
3674
3676
  * ```
3675
3677
  */
3676
3678
  function generateForwardRef(expr) {
3677
- return importExpr(Identifiers$1.forwardRef).callFn([fn([], [new ReturnStatement(expr)])]);
3679
+ return importExpr(Identifiers.forwardRef).callFn([fn([], [new ReturnStatement(expr)])]);
3678
3680
  }
3679
3681
 
3680
3682
  var R3FactoryDelegateType;
@@ -3722,7 +3724,7 @@ function compileFactoryFunction(meta) {
3722
3724
  const r = variable('r');
3723
3725
  body.push(r.set(NULL_EXPR).toDeclStmt());
3724
3726
  const ctorStmt = ctorExpr !== null ? r.set(ctorExpr).toStmt() :
3725
- importExpr(Identifiers$1.invalidFactory).callFn([]).toStmt();
3727
+ importExpr(Identifiers.invalidFactory).callFn([]).toStmt();
3726
3728
  body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));
3727
3729
  return r;
3728
3730
  }
@@ -3745,11 +3747,11 @@ function compileFactoryFunction(meta) {
3745
3747
  }
3746
3748
  if (retExpr === null) {
3747
3749
  // The expression cannot be formed so render an `ɵɵinvalidFactory()` call.
3748
- body.push(importExpr(Identifiers$1.invalidFactory).callFn([]).toStmt());
3750
+ body.push(importExpr(Identifiers.invalidFactory).callFn([]).toStmt());
3749
3751
  }
3750
3752
  else if (baseFactoryVar !== null) {
3751
3753
  // This factory uses a base factory, so call `ɵɵgetInheritedFactory()` to compute it.
3752
- const getInheritedFactoryCall = importExpr(Identifiers$1.getInheritedFactory).callFn([meta.internalType]);
3754
+ const getInheritedFactoryCall = importExpr(Identifiers.getInheritedFactory).callFn([meta.internalType]);
3753
3755
  // Memoize the base factoryFn: `baseFactory || (baseFactory = ɵɵgetInheritedFactory(...))`
3754
3756
  const baseFactory = new BinaryOperatorExpr(BinaryOperator.Or, baseFactoryVar, baseFactoryVar.set(getInheritedFactoryCall));
3755
3757
  body.push(new ReturnStatement(baseFactory.callFn([typeForCtor])));
@@ -3774,7 +3776,7 @@ function compileFactoryFunction(meta) {
3774
3776
  }
3775
3777
  function createFactoryType(meta) {
3776
3778
  const ctorDepsType = meta.deps !== null && meta.deps !== 'invalid' ? createCtorDepsType(meta.deps) : NONE_TYPE;
3777
- return expressionType(importExpr(Identifiers$1.FactoryDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount), ctorDepsType]));
3779
+ return expressionType(importExpr(Identifiers.FactoryDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount), ctorDepsType]));
3778
3780
  }
3779
3781
  function injectDependencies(deps, target) {
3780
3782
  return deps.map((dep, index) => compileInjectDependency(dep, target, index));
@@ -3782,7 +3784,7 @@ function injectDependencies(deps, target) {
3782
3784
  function compileInjectDependency(dep, target, index) {
3783
3785
  // Interpret the dependency according to its resolved type.
3784
3786
  if (dep.token === null) {
3785
- return importExpr(Identifiers$1.invalidFactoryDep).callFn([literal(index)]);
3787
+ return importExpr(Identifiers.invalidFactoryDep).callFn([literal(index)]);
3786
3788
  }
3787
3789
  else if (dep.attributeNameType === null) {
3788
3790
  // Build up the injection flags according to the metadata.
@@ -3810,7 +3812,7 @@ function compileInjectDependency(dep, target, index) {
3810
3812
  //
3811
3813
  // The `dep.attributeTypeName` is only actually used (in `createCtorDepType()`) to generate
3812
3814
  // typings.
3813
- return importExpr(Identifiers$1.injectAttribute).callFn([dep.token]);
3815
+ return importExpr(Identifiers.injectAttribute).callFn([dep.token]);
3814
3816
  }
3815
3817
  }
3816
3818
  function createCtorDepsType(deps) {
@@ -3862,11 +3864,11 @@ function getInjectFn(target) {
3862
3864
  case FactoryTarget$1.Component:
3863
3865
  case FactoryTarget$1.Directive:
3864
3866
  case FactoryTarget$1.Pipe:
3865
- return Identifiers$1.directiveInject;
3867
+ return Identifiers.directiveInject;
3866
3868
  case FactoryTarget$1.NgModule:
3867
3869
  case FactoryTarget$1.Injectable:
3868
3870
  default:
3869
- return Identifiers$1.inject;
3871
+ return Identifiers.inject;
3870
3872
  }
3871
3873
  }
3872
3874
 
@@ -4872,6 +4874,65 @@ const IMPLICIT_REFERENCE = '$implicit';
4872
4874
  const NON_BINDABLE_ATTR = 'ngNonBindable';
4873
4875
  /** Name for the variable keeping track of the context returned by `ɵɵrestoreView`. */
4874
4876
  const RESTORED_VIEW_CONTEXT_NAME = 'restoredCtx';
4877
+ /** Instructions that support chaining. */
4878
+ const CHAINABLE_INSTRUCTIONS = new Set([
4879
+ Identifiers.element,
4880
+ Identifiers.elementStart,
4881
+ Identifiers.elementEnd,
4882
+ Identifiers.elementContainer,
4883
+ Identifiers.elementContainerStart,
4884
+ Identifiers.elementContainerEnd,
4885
+ Identifiers.i18nExp,
4886
+ Identifiers.listener,
4887
+ Identifiers.classProp,
4888
+ Identifiers.syntheticHostListener,
4889
+ Identifiers.hostProperty,
4890
+ Identifiers.syntheticHostProperty,
4891
+ Identifiers.property,
4892
+ Identifiers.propertyInterpolate1,
4893
+ Identifiers.propertyInterpolate2,
4894
+ Identifiers.propertyInterpolate3,
4895
+ Identifiers.propertyInterpolate4,
4896
+ Identifiers.propertyInterpolate5,
4897
+ Identifiers.propertyInterpolate6,
4898
+ Identifiers.propertyInterpolate7,
4899
+ Identifiers.propertyInterpolate8,
4900
+ Identifiers.propertyInterpolateV,
4901
+ Identifiers.attribute,
4902
+ Identifiers.attributeInterpolate1,
4903
+ Identifiers.attributeInterpolate2,
4904
+ Identifiers.attributeInterpolate3,
4905
+ Identifiers.attributeInterpolate4,
4906
+ Identifiers.attributeInterpolate5,
4907
+ Identifiers.attributeInterpolate6,
4908
+ Identifiers.attributeInterpolate7,
4909
+ Identifiers.attributeInterpolate8,
4910
+ Identifiers.attributeInterpolateV,
4911
+ Identifiers.styleProp,
4912
+ Identifiers.stylePropInterpolate1,
4913
+ Identifiers.stylePropInterpolate2,
4914
+ Identifiers.stylePropInterpolate3,
4915
+ Identifiers.stylePropInterpolate4,
4916
+ Identifiers.stylePropInterpolate5,
4917
+ Identifiers.stylePropInterpolate6,
4918
+ Identifiers.stylePropInterpolate7,
4919
+ Identifiers.stylePropInterpolate8,
4920
+ Identifiers.stylePropInterpolateV,
4921
+ Identifiers.textInterpolate,
4922
+ Identifiers.textInterpolate1,
4923
+ Identifiers.textInterpolate2,
4924
+ Identifiers.textInterpolate3,
4925
+ Identifiers.textInterpolate4,
4926
+ Identifiers.textInterpolate5,
4927
+ Identifiers.textInterpolate6,
4928
+ Identifiers.textInterpolate7,
4929
+ Identifiers.textInterpolate8,
4930
+ Identifiers.textInterpolateV,
4931
+ ]);
4932
+ /** Generates a call to a single instruction. */
4933
+ function invokeInstruction(span, reference, params) {
4934
+ return importExpr(reference, null, span).callFn(params, span);
4935
+ }
4875
4936
  /**
4876
4937
  * Creates an allocator for a temporary variable.
4877
4938
  *
@@ -4962,7 +5023,7 @@ function getQueryPredicate(query, constantPool) {
4962
5023
  case 2 /* Unwrapped */:
4963
5024
  return query.predicate.expression;
4964
5025
  case 1 /* Wrapped */:
4965
- return importExpr(Identifiers$1.resolveForwardRef).callFn([query.predicate.expression]);
5026
+ return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);
4966
5027
  }
4967
5028
  }
4968
5029
  }
@@ -5013,20 +5074,6 @@ function getAttrsForDirectiveMatching(elOrTpl) {
5013
5074
  }
5014
5075
  return attributesMap;
5015
5076
  }
5016
- /** Returns a call expression to a chained instruction, e.g. `property(params[0])(params[1])`. */
5017
- function chainedInstruction(reference, calls, span) {
5018
- let expression = importExpr(reference, null, span);
5019
- if (calls.length > 0) {
5020
- for (let i = 0; i < calls.length; i++) {
5021
- expression = expression.callFn(calls[i], span);
5022
- }
5023
- }
5024
- else {
5025
- // Add a blank invocation, in case the `calls` array is empty.
5026
- expression = expression.callFn([], span);
5027
- }
5028
- return expression;
5029
- }
5030
5077
  /**
5031
5078
  * Gets the number of arguments expected to be passed to a generated instruction in the case of
5032
5079
  * interpolation instructions.
@@ -5044,6 +5091,40 @@ function getInterpolationArgsLength(interpolation) {
5044
5091
  return expressions.length + strings.length;
5045
5092
  }
5046
5093
  }
5094
+ /**
5095
+ * Generates the final instruction call statements based on the passed in configuration.
5096
+ * Will try to chain instructions as much as possible, if chaining is supported.
5097
+ */
5098
+ function getInstructionStatements(instructions) {
5099
+ const statements = [];
5100
+ let pendingExpression = null;
5101
+ let pendingExpressionType = null;
5102
+ for (const current of instructions) {
5103
+ const resolvedParams = (typeof current.paramsOrFn === 'function' ? current.paramsOrFn() : current.paramsOrFn) ??
5104
+ [];
5105
+ const params = Array.isArray(resolvedParams) ? resolvedParams : [resolvedParams];
5106
+ // If the current instruction is the same as the previous one
5107
+ // and it can be chained, add another call to the chain.
5108
+ if (pendingExpressionType === current.reference &&
5109
+ CHAINABLE_INSTRUCTIONS.has(pendingExpressionType)) {
5110
+ // We'll always have a pending expression when there's a pending expression type.
5111
+ pendingExpression = pendingExpression.callFn(params, pendingExpression.sourceSpan);
5112
+ }
5113
+ else {
5114
+ if (pendingExpression !== null) {
5115
+ statements.push(pendingExpression.toStmt());
5116
+ }
5117
+ pendingExpression = invokeInstruction(current.span, current.reference, params);
5118
+ pendingExpressionType = current.reference;
5119
+ }
5120
+ }
5121
+ // Since the current instruction adds the previous one to the statements,
5122
+ // we may be left with the final one at the end that is still pending.
5123
+ if (pendingExpression !== null) {
5124
+ statements.push(pendingExpression.toStmt());
5125
+ }
5126
+ return statements;
5127
+ }
5047
5128
 
5048
5129
  /**
5049
5130
  * @license
@@ -5122,7 +5203,7 @@ function compileInjectable(meta, resolveForwardRefs) {
5122
5203
  // useExisting is an `inject` call on the existing token.
5123
5204
  result = compileFactoryFunction({
5124
5205
  ...factoryMeta,
5125
- expression: importExpr(Identifiers$1.inject).callFn([meta.useExisting.expression]),
5206
+ expression: importExpr(Identifiers.inject).callFn([meta.useExisting.expression]),
5126
5207
  });
5127
5208
  }
5128
5209
  else {
@@ -5139,7 +5220,7 @@ function compileInjectable(meta, resolveForwardRefs) {
5139
5220
  if (meta.providedIn.expression.value !== null) {
5140
5221
  injectableProps.set('providedIn', convertFromMaybeForwardRefExpression(meta.providedIn));
5141
5222
  }
5142
- const expression = importExpr(Identifiers$1.ɵɵdefineInjectable)
5223
+ const expression = importExpr(Identifiers.ɵɵdefineInjectable)
5143
5224
  .callFn([injectableProps.toLiteralMap()], undefined, true);
5144
5225
  return {
5145
5226
  expression,
@@ -5148,7 +5229,7 @@ function compileInjectable(meta, resolveForwardRefs) {
5148
5229
  };
5149
5230
  }
5150
5231
  function createInjectableType(meta) {
5151
- return new ExpressionType(importExpr(Identifiers$1.InjectableDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount)]));
5232
+ return new ExpressionType(importExpr(Identifiers.InjectableDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount)]));
5152
5233
  }
5153
5234
  function delegateToFactory(type, internalType, unwrapForwardRefs) {
5154
5235
  if (type.node === internalType.node) {
@@ -5171,7 +5252,7 @@ function delegateToFactory(type, internalType, unwrapForwardRefs) {
5171
5252
  // ```
5172
5253
  // factory: function(t) { return core.resolveForwardRef(type).ɵfac(t); }
5173
5254
  // ```
5174
- const unwrappedType = importExpr(Identifiers$1.resolveForwardRef).callFn([internalType]);
5255
+ const unwrappedType = importExpr(Identifiers.resolveForwardRef).callFn([internalType]);
5175
5256
  return createFactoryFunction(unwrappedType);
5176
5257
  }
5177
5258
  function createFactoryFunction(type) {
@@ -5349,7 +5430,7 @@ class ParseLocation {
5349
5430
  const ch = source.charCodeAt(offset);
5350
5431
  if (ch == $LF) {
5351
5432
  line--;
5352
- const priorLine = source.substr(0, offset - 1).lastIndexOf(String.fromCharCode($LF));
5433
+ const priorLine = source.substring(0, offset - 1).lastIndexOf(String.fromCharCode($LF));
5353
5434
  col = priorLine > 0 ? offset - priorLine : offset;
5354
5435
  }
5355
5436
  else {
@@ -5859,12 +5940,12 @@ function compileInjector(meta) {
5859
5940
  if (meta.imports.length > 0) {
5860
5941
  definitionMap.set('imports', literalArr(meta.imports));
5861
5942
  }
5862
- const expression = importExpr(Identifiers$1.defineInjector).callFn([definitionMap.toLiteralMap()], undefined, true);
5943
+ const expression = importExpr(Identifiers.defineInjector).callFn([definitionMap.toLiteralMap()], undefined, true);
5863
5944
  const type = createInjectorType(meta);
5864
5945
  return { expression, type, statements: [] };
5865
5946
  }
5866
5947
  function createInjectorType(meta) {
5867
- return new ExpressionType(importExpr(Identifiers$1.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
5948
+ return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
5868
5949
  }
5869
5950
 
5870
5951
  /**
@@ -5903,20 +5984,49 @@ class R3JitReflector {
5903
5984
  * Use of this source code is governed by an MIT-style license that can be
5904
5985
  * found in the LICENSE file at https://angular.io/license
5905
5986
  */
5987
+ /**
5988
+ * How the selector scope of an NgModule (its declarations, imports, and exports) should be emitted
5989
+ * as a part of the NgModule definition.
5990
+ */
5991
+ var R3SelectorScopeMode;
5992
+ (function (R3SelectorScopeMode) {
5993
+ /**
5994
+ * Emit the declarations inline into the module definition.
5995
+ *
5996
+ * This option is useful in certain contexts where it's known that JIT support is required. The
5997
+ * tradeoff here is that this emit style prevents directives and pipes from being tree-shaken if
5998
+ * they are unused, but the NgModule is used.
5999
+ */
6000
+ R3SelectorScopeMode[R3SelectorScopeMode["Inline"] = 0] = "Inline";
6001
+ /**
6002
+ * Emit the declarations using a side effectful function call, `ɵɵsetNgModuleScope`, that is
6003
+ * guarded with the `ngJitMode` flag.
6004
+ *
6005
+ * This form of emit supports JIT and can be optimized away if the `ngJitMode` flag is set to
6006
+ * false, which allows unused directives and pipes to be tree-shaken.
6007
+ */
6008
+ R3SelectorScopeMode[R3SelectorScopeMode["SideEffect"] = 1] = "SideEffect";
6009
+ /**
6010
+ * Don't generate selector scopes at all.
6011
+ *
6012
+ * This is useful for contexts where JIT support is known to be unnecessary.
6013
+ */
6014
+ R3SelectorScopeMode[R3SelectorScopeMode["Omit"] = 2] = "Omit";
6015
+ })(R3SelectorScopeMode || (R3SelectorScopeMode = {}));
5906
6016
  /**
5907
6017
  * Construct an `R3NgModuleDef` for the given `R3NgModuleMetadata`.
5908
6018
  */
5909
6019
  function compileNgModule(meta) {
5910
- const { internalType, bootstrap, declarations, imports, exports, schemas, containsForwardDecls, emitInline, id } = meta;
6020
+ const { adjacentType, internalType, bootstrap, declarations, imports, exports, schemas, containsForwardDecls, selectorScopeMode, id } = meta;
5911
6021
  const statements = [];
5912
6022
  const definitionMap = new DefinitionMap();
5913
6023
  definitionMap.set('type', internalType);
5914
6024
  if (bootstrap.length > 0) {
5915
6025
  definitionMap.set('bootstrap', refsToArray(bootstrap, containsForwardDecls));
5916
6026
  }
5917
- // If requested to emit scope information inline, pass the `declarations`, `imports` and `exports`
5918
- // to the `ɵɵdefineNgModule()` call. The JIT compilation uses this.
5919
- if (emitInline) {
6027
+ if (selectorScopeMode === R3SelectorScopeMode.Inline) {
6028
+ // If requested to emit scope information inline, pass the `declarations`, `imports` and
6029
+ // `exports` to the `ɵɵdefineNgModule()` call directly.
5920
6030
  if (declarations.length > 0) {
5921
6031
  definitionMap.set('declarations', refsToArray(declarations, containsForwardDecls));
5922
6032
  }
@@ -5927,21 +6037,29 @@ function compileNgModule(meta) {
5927
6037
  definitionMap.set('exports', refsToArray(exports, containsForwardDecls));
5928
6038
  }
5929
6039
  }
5930
- // If not emitting inline, the scope information is not passed into `ɵɵdefineNgModule` as it would
5931
- // prevent tree-shaking of the declarations, imports and exports references.
5932
- else {
6040
+ else if (selectorScopeMode === R3SelectorScopeMode.SideEffect) {
6041
+ // In this mode, scope information is not passed into `ɵɵdefineNgModule` as it
6042
+ // would prevent tree-shaking of the declarations, imports and exports references. Instead, it's
6043
+ // patched onto the NgModule definition with a `ɵɵsetNgModuleScope` call that's guarded by the
6044
+ // `ngJitMode` flag.
5933
6045
  const setNgModuleScopeCall = generateSetNgModuleScopeCall(meta);
5934
6046
  if (setNgModuleScopeCall !== null) {
5935
6047
  statements.push(setNgModuleScopeCall);
5936
6048
  }
5937
6049
  }
6050
+ else {
6051
+ // Selector scope emit was not requested, so skip it.
6052
+ }
5938
6053
  if (schemas !== null && schemas.length > 0) {
5939
6054
  definitionMap.set('schemas', literalArr(schemas.map(ref => ref.value)));
5940
6055
  }
5941
6056
  if (id !== null) {
5942
6057
  definitionMap.set('id', id);
6058
+ // Generate a side-effectful call to register this NgModule by its id, as per the semantics of
6059
+ // NgModule ids.
6060
+ statements.push(importExpr(Identifiers.registerNgModuleType).callFn([adjacentType, id]).toStmt());
5943
6061
  }
5944
- const expression = importExpr(Identifiers$1.defineNgModule).callFn([definitionMap.toLiteralMap()], undefined, true);
6062
+ const expression = importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()], undefined, true);
5945
6063
  const type = createNgModuleType(meta);
5946
6064
  return { expression, type, statements };
5947
6065
  }
@@ -5970,10 +6088,10 @@ function compileNgModuleDeclarationExpression(meta) {
5970
6088
  if (meta.id !== undefined) {
5971
6089
  definitionMap.set('id', new WrappedNodeExpr(meta.id));
5972
6090
  }
5973
- return importExpr(Identifiers$1.defineNgModule).callFn([definitionMap.toLiteralMap()]);
6091
+ return importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()]);
5974
6092
  }
5975
6093
  function createNgModuleType({ type: moduleType, declarations, imports, exports }) {
5976
- return new ExpressionType(importExpr(Identifiers$1.NgModuleDeclaration, [
6094
+ return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [
5977
6095
  new ExpressionType(moduleType.type), tupleTypeOf(declarations), tupleTypeOf(imports),
5978
6096
  tupleTypeOf(exports)
5979
6097
  ]));
@@ -6001,7 +6119,7 @@ function generateSetNgModuleScopeCall(meta) {
6001
6119
  }
6002
6120
  // setNgModuleScope(...)
6003
6121
  const fnCall = new InvokeFunctionExpr(
6004
- /* fn */ importExpr(Identifiers$1.setNgModuleScope),
6122
+ /* fn */ importExpr(Identifiers.setNgModuleScope),
6005
6123
  /* args */ [moduleType, scopeMap.toLiteralMap()]);
6006
6124
  // (ngJitMode guard) && setNgModuleScope(...)
6007
6125
  const guardedCall = jitOnlyGuardedExpression(fnCall);
@@ -6035,12 +6153,15 @@ function compilePipeFromMetadata(metadata) {
6035
6153
  definitionMapValues.push({ key: 'type', value: metadata.type.value, quoted: false });
6036
6154
  // e.g. `pure: true`
6037
6155
  definitionMapValues.push({ key: 'pure', value: literal(metadata.pure), quoted: false });
6038
- const expression = importExpr(Identifiers$1.definePipe).callFn([literalMap(definitionMapValues)], undefined, true);
6156
+ if (metadata.isStandalone) {
6157
+ definitionMapValues.push({ key: 'standalone', value: literal(true), quoted: false });
6158
+ }
6159
+ const expression = importExpr(Identifiers.definePipe).callFn([literalMap(definitionMapValues)], undefined, true);
6039
6160
  const type = createPipeType(metadata);
6040
6161
  return { expression, type, statements: [] };
6041
6162
  }
6042
6163
  function createPipeType(metadata) {
6043
- return new ExpressionType(importExpr(Identifiers$1.PipeDeclaration, [
6164
+ return new ExpressionType(importExpr(Identifiers.PipeDeclaration, [
6044
6165
  typeWithParameters(metadata.type.type, metadata.typeArgumentCount),
6045
6166
  new ExpressionType(new LiteralExpr(metadata.pipeName)),
6046
6167
  ]));
@@ -6089,33 +6210,6 @@ class ASTWithName extends AST {
6089
6210
  this.nameSpan = nameSpan;
6090
6211
  }
6091
6212
  }
6092
- /**
6093
- * Represents a quoted expression of the form:
6094
- *
6095
- * quote = prefix `:` uninterpretedExpression
6096
- * prefix = identifier
6097
- * uninterpretedExpression = arbitrary string
6098
- *
6099
- * A quoted expression is meant to be pre-processed by an AST transformer that
6100
- * converts it into another AST that no longer contains quoted expressions.
6101
- * It is meant to allow third-party developers to extend Angular template
6102
- * expression language. The `uninterpretedExpression` part of the quote is
6103
- * therefore not interpreted by the Angular's own expression parser.
6104
- */
6105
- class Quote extends AST {
6106
- constructor(span, sourceSpan, prefix, uninterpretedExpression, location) {
6107
- super(span, sourceSpan);
6108
- this.prefix = prefix;
6109
- this.uninterpretedExpression = uninterpretedExpression;
6110
- this.location = location;
6111
- }
6112
- visit(visitor, context = null) {
6113
- return visitor.visitQuote(this, context);
6114
- }
6115
- toString() {
6116
- return 'Quote';
6117
- }
6118
- }
6119
6213
  class EmptyExpr extends AST {
6120
6214
  visit(visitor, context = null) {
6121
6215
  // do nothing
@@ -6495,7 +6589,6 @@ class RecursiveAstVisitor {
6495
6589
  this.visit(ast.receiver, context);
6496
6590
  this.visitAll(ast.args, context);
6497
6591
  }
6498
- visitQuote(ast, context) { }
6499
6592
  // This is not part of the AstVisitor interface, just a helper method
6500
6593
  visitAll(asts, context) {
6501
6594
  for (const ast of asts) {
@@ -6578,9 +6671,6 @@ class AstTransformer {
6578
6671
  visitChain(ast, context) {
6579
6672
  return new Chain(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));
6580
6673
  }
6581
- visitQuote(ast, context) {
6582
- return new Quote(ast.span, ast.sourceSpan, ast.prefix, ast.uninterpretedExpression, ast.location);
6583
- }
6584
6674
  visitSafeKeyedRead(ast, context) {
6585
6675
  return new SafeKeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));
6586
6676
  }
@@ -6743,9 +6833,6 @@ class AstMemoryEfficientTransformer {
6743
6833
  }
6744
6834
  return ast;
6745
6835
  }
6746
- visitQuote(ast, context) {
6747
- return ast;
6748
- }
6749
6836
  visitSafeKeyedRead(ast, context) {
6750
6837
  const obj = ast.receiver.visit(this);
6751
6838
  const key = ast.key.visit(this);
@@ -6812,98 +6899,6 @@ class BoundElementProperty {
6812
6899
  }
6813
6900
  }
6814
6901
 
6815
- /**
6816
- * @license
6817
- * Copyright Google LLC All Rights Reserved.
6818
- *
6819
- * Use of this source code is governed by an MIT-style license that can be
6820
- * found in the LICENSE file at https://angular.io/license
6821
- */
6822
- const CORE = '@angular/core';
6823
- class Identifiers {
6824
- }
6825
- Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS = {
6826
- name: 'ANALYZE_FOR_ENTRY_COMPONENTS',
6827
- moduleName: CORE,
6828
- };
6829
- Identifiers.ElementRef = { name: 'ElementRef', moduleName: CORE };
6830
- Identifiers.NgModuleRef = { name: 'NgModuleRef', moduleName: CORE };
6831
- Identifiers.ViewContainerRef = { name: 'ViewContainerRef', moduleName: CORE };
6832
- Identifiers.ChangeDetectorRef = {
6833
- name: 'ChangeDetectorRef',
6834
- moduleName: CORE,
6835
- };
6836
- Identifiers.QueryList = { name: 'QueryList', moduleName: CORE };
6837
- Identifiers.TemplateRef = { name: 'TemplateRef', moduleName: CORE };
6838
- Identifiers.Renderer2 = { name: 'Renderer2', moduleName: CORE };
6839
- Identifiers.CodegenComponentFactoryResolver = {
6840
- name: 'ɵCodegenComponentFactoryResolver',
6841
- moduleName: CORE,
6842
- };
6843
- Identifiers.ComponentFactoryResolver = {
6844
- name: 'ComponentFactoryResolver',
6845
- moduleName: CORE,
6846
- };
6847
- Identifiers.ComponentFactory = { name: 'ComponentFactory', moduleName: CORE };
6848
- Identifiers.ComponentRef = { name: 'ComponentRef', moduleName: CORE };
6849
- Identifiers.NgModuleFactory = { name: 'NgModuleFactory', moduleName: CORE };
6850
- Identifiers.createModuleFactory = {
6851
- name: 'ɵcmf',
6852
- moduleName: CORE,
6853
- };
6854
- Identifiers.moduleDef = {
6855
- name: 'ɵmod',
6856
- moduleName: CORE,
6857
- };
6858
- Identifiers.moduleProviderDef = {
6859
- name: 'ɵmpd',
6860
- moduleName: CORE,
6861
- };
6862
- Identifiers.RegisterModuleFactoryFn = {
6863
- name: 'ɵregisterModuleFactory',
6864
- moduleName: CORE,
6865
- };
6866
- Identifiers.inject = { name: 'ɵɵinject', moduleName: CORE };
6867
- Identifiers.directiveInject = { name: 'ɵɵdirectiveInject', moduleName: CORE };
6868
- Identifiers.INJECTOR = { name: 'INJECTOR', moduleName: CORE };
6869
- Identifiers.Injector = { name: 'Injector', moduleName: CORE };
6870
- Identifiers.ViewEncapsulation = {
6871
- name: 'ViewEncapsulation',
6872
- moduleName: CORE,
6873
- };
6874
- Identifiers.ChangeDetectionStrategy = {
6875
- name: 'ChangeDetectionStrategy',
6876
- moduleName: CORE,
6877
- };
6878
- Identifiers.SecurityContext = {
6879
- name: 'SecurityContext',
6880
- moduleName: CORE,
6881
- };
6882
- Identifiers.LOCALE_ID = { name: 'LOCALE_ID', moduleName: CORE };
6883
- Identifiers.TRANSLATIONS_FORMAT = {
6884
- name: 'TRANSLATIONS_FORMAT',
6885
- moduleName: CORE,
6886
- };
6887
- Identifiers.inlineInterpolate = {
6888
- name: 'ɵinlineInterpolate',
6889
- moduleName: CORE,
6890
- };
6891
- Identifiers.interpolate = { name: 'ɵinterpolate', moduleName: CORE };
6892
- Identifiers.EMPTY_ARRAY = { name: 'ɵEMPTY_ARRAY', moduleName: CORE };
6893
- Identifiers.EMPTY_MAP = { name: 'ɵEMPTY_MAP', moduleName: CORE };
6894
- Identifiers.Renderer = { name: 'Renderer', moduleName: CORE };
6895
- // type only
6896
- Identifiers.RendererType2 = {
6897
- name: 'RendererType2',
6898
- moduleName: CORE,
6899
- };
6900
- // type only
6901
- Identifiers.ViewDefinition = {
6902
- name: 'ɵViewDefinition',
6903
- moduleName: CORE,
6904
- };
6905
- Identifiers.createComponentFactory = { name: 'ɵccf', moduleName: CORE };
6906
-
6907
6902
  /**
6908
6903
  * @license
6909
6904
  * Copyright Google LLC All Rights Reserved.
@@ -6918,7 +6913,7 @@ EventHandlerVars.event = variable('$event');
6918
6913
  * Converts the given expression AST into an executable output AST, assuming the expression is
6919
6914
  * used in an action binding (e.g. an event handler).
6920
6915
  */
6921
- function convertActionBinding(localResolver, implicitReceiver, action, bindingId, interpolationFunction, baseSourceSpan, implicitReceiverAccesses, globals) {
6916
+ function convertActionBinding(localResolver, implicitReceiver, action, bindingId, baseSourceSpan, implicitReceiverAccesses, globals) {
6922
6917
  if (!localResolver) {
6923
6918
  localResolver = new DefaultLocalResolver(globals);
6924
6919
  }
@@ -6942,7 +6937,7 @@ function convertActionBinding(localResolver, implicitReceiver, action, bindingId
6942
6937
  throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${name}`);
6943
6938
  }
6944
6939
  }, action);
6945
- const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, interpolationFunction, baseSourceSpan, implicitReceiverAccesses);
6940
+ const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */ false, baseSourceSpan, implicitReceiverAccesses);
6946
6941
  const actionStmts = [];
6947
6942
  flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);
6948
6943
  prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);
@@ -6973,11 +6968,11 @@ class ConvertPropertyBindingResult {
6973
6968
  * is used in property binding. The expression has to be preprocessed via
6974
6969
  * `convertPropertyBindingBuiltins`.
6975
6970
  */
6976
- function convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId, interpolationFunction) {
6971
+ function convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId) {
6977
6972
  if (!localResolver) {
6978
6973
  localResolver = new DefaultLocalResolver();
6979
6974
  }
6980
- const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, interpolationFunction);
6975
+ const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */ false);
6981
6976
  const outputExpr = expressionWithoutBuiltins.visit(visitor, _Mode.Expression);
6982
6977
  const stmts = getStatementsFromVisitor(visitor, bindingId);
6983
6978
  if (visitor.usesImplicitReceiver) {
@@ -7002,28 +6997,13 @@ function convertPropertyBinding(localResolver, implicitReceiver, expressionWitho
7002
6997
  * `o.importExpr(R3.propertyInterpolate).callFn(result)`
7003
6998
  */
7004
6999
  function convertUpdateArguments(localResolver, contextVariableExpression, expressionWithArgumentsToExtract, bindingId) {
7005
- const visitor = new _AstToIrVisitor(localResolver, contextVariableExpression, bindingId, undefined);
7006
- const outputExpr = expressionWithArgumentsToExtract.visit(visitor, _Mode.Expression);
7000
+ const visitor = new _AstToIrVisitor(localResolver, contextVariableExpression, bindingId, /* supportsInterpolation */ true);
7001
+ const outputExpr = visitor.visitInterpolation(expressionWithArgumentsToExtract, _Mode.Expression);
7007
7002
  if (visitor.usesImplicitReceiver) {
7008
7003
  localResolver.notifyImplicitReceiverUse();
7009
7004
  }
7010
7005
  const stmts = getStatementsFromVisitor(visitor, bindingId);
7011
- // Removing the first argument, because it was a length for ViewEngine, not Ivy.
7012
- let args = outputExpr.args.slice(1);
7013
- if (expressionWithArgumentsToExtract instanceof Interpolation) {
7014
- // If we're dealing with an interpolation of 1 value with an empty prefix and suffix, reduce the
7015
- // args returned to just the value, because we're going to pass it to a special instruction.
7016
- const strings = expressionWithArgumentsToExtract.strings;
7017
- if (args.length === 3 && strings[0] === '' && strings[1] === '') {
7018
- // Single argument interpolate instructions.
7019
- args = [args[1]];
7020
- }
7021
- else if (args.length >= 19) {
7022
- // 19 or more arguments must be passed to the `interpolateV`-style instructions, which accept
7023
- // an array of arguments
7024
- args = [literalArr(args)];
7025
- }
7026
- }
7006
+ const args = outputExpr.args;
7027
7007
  return { stmts, args };
7028
7008
  }
7029
7009
  function getStatementsFromVisitor(visitor, bindingId) {
@@ -7090,11 +7070,11 @@ class _BuiltinAstConverter extends AstTransformer {
7090
7070
  }
7091
7071
  }
7092
7072
  class _AstToIrVisitor {
7093
- constructor(_localResolver, _implicitReceiver, bindingId, interpolationFunction, baseSourceSpan, implicitReceiverAccesses) {
7073
+ constructor(_localResolver, _implicitReceiver, bindingId, supportsInterpolation, baseSourceSpan, implicitReceiverAccesses) {
7094
7074
  this._localResolver = _localResolver;
7095
7075
  this._implicitReceiver = _implicitReceiver;
7096
7076
  this.bindingId = bindingId;
7097
- this.interpolationFunction = interpolationFunction;
7077
+ this.supportsInterpolation = supportsInterpolation;
7098
7078
  this.baseSourceSpan = baseSourceSpan;
7099
7079
  this.implicitReceiverAccesses = implicitReceiverAccesses;
7100
7080
  this._nodeMap = new Map();
@@ -7192,21 +7172,29 @@ class _AstToIrVisitor {
7192
7172
  return this.visitImplicitReceiver(ast, mode);
7193
7173
  }
7194
7174
  visitInterpolation(ast, mode) {
7175
+ if (!this.supportsInterpolation) {
7176
+ throw new Error('Unexpected interpolation');
7177
+ }
7195
7178
  ensureExpressionMode(mode, ast);
7196
- const args = [literal(ast.expressions.length)];
7179
+ let args = [];
7197
7180
  for (let i = 0; i < ast.strings.length - 1; i++) {
7198
7181
  args.push(literal(ast.strings[i]));
7199
7182
  args.push(this._visit(ast.expressions[i], _Mode.Expression));
7200
7183
  }
7201
7184
  args.push(literal(ast.strings[ast.strings.length - 1]));
7202
- if (this.interpolationFunction) {
7203
- return this.interpolationFunction(args);
7185
+ // If we're dealing with an interpolation of 1 value with an empty prefix and suffix, reduce the
7186
+ // args returned to just the value, because we're going to pass it to a special instruction.
7187
+ const strings = ast.strings;
7188
+ if (strings.length === 2 && strings[0] === '' && strings[1] === '') {
7189
+ // Single argument interpolate instructions.
7190
+ args = [args[1]];
7191
+ }
7192
+ else if (ast.expressions.length >= 9) {
7193
+ // 9 or more arguments must be passed to the `interpolateV`-style instructions, which accept
7194
+ // an array of arguments
7195
+ args = [literalArr(args)];
7204
7196
  }
7205
- return ast.expressions.length <= 9 ?
7206
- importExpr(Identifiers.inlineInterpolate).callFn(args) :
7207
- importExpr(Identifiers.interpolate).callFn([
7208
- args[0], literalArr(args.slice(1), undefined, this.convertSourceSpan(ast.span))
7209
- ]);
7197
+ return new InterpolationExpression(args);
7210
7198
  }
7211
7199
  visitKeyedRead(ast, mode) {
7212
7200
  const leftMostSafe = this.leftMostSafeNode(ast);
@@ -7317,10 +7305,6 @@ class _AstToIrVisitor {
7317
7305
  visitAll(asts, mode) {
7318
7306
  return asts.map(ast => this._visit(ast, mode));
7319
7307
  }
7320
- visitQuote(ast, mode) {
7321
- throw new Error(`Quotes are not supported for evaluation!
7322
- Statement: ${ast.uninterpretedExpression} located at ${ast.location}`);
7323
- }
7324
7308
  visitCall(ast, mode) {
7325
7309
  const leftMostSafe = this.leftMostSafeNode(ast);
7326
7310
  if (leftMostSafe) {
@@ -7506,9 +7490,6 @@ class _AstToIrVisitor {
7506
7490
  visitPropertyWrite(ast) {
7507
7491
  return null;
7508
7492
  },
7509
- visitQuote(ast) {
7510
- return null;
7511
- },
7512
7493
  visitSafePropertyRead(ast) {
7513
7494
  return visit(this, ast.receiver) || ast;
7514
7495
  },
@@ -7585,9 +7566,6 @@ class _AstToIrVisitor {
7585
7566
  visitPropertyWrite(ast) {
7586
7567
  return false;
7587
7568
  },
7588
- visitQuote(ast) {
7589
- return false;
7590
- },
7591
7569
  visitSafePropertyRead(ast) {
7592
7570
  return false;
7593
7571
  },
@@ -7644,6 +7622,18 @@ function flattenStatements(arg, output) {
7644
7622
  output.push(arg);
7645
7623
  }
7646
7624
  }
7625
+ function unsupported() {
7626
+ throw new Error('Unsupported operation');
7627
+ }
7628
+ class InterpolationExpression extends Expression {
7629
+ constructor(args) {
7630
+ super(null, null);
7631
+ this.args = args;
7632
+ this.isConstant = unsupported;
7633
+ this.isEquivalent = unsupported;
7634
+ this.visitExpression = unsupported;
7635
+ }
7636
+ }
7647
7637
  class DefaultLocalResolver {
7648
7638
  constructor(globals) {
7649
7639
  this.globals = globals;
@@ -8017,7 +8007,7 @@ class ShadowCss {
8017
8007
  this._scopeSelector(rule.selector, scopeSelector, hostSelector, this.strictStyling);
8018
8008
  }
8019
8009
  else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') ||
8020
- rule.selector.startsWith('@document')) {
8010
+ rule.selector.startsWith('@document') || rule.selector.startsWith('@layer')) {
8021
8011
  content = this._scopeSelectors(rule.content, scopeSelector, hostSelector);
8022
8012
  }
8023
8013
  else if (rule.selector.startsWith('@font-face') || rule.selector.startsWith('@page')) {
@@ -8480,7 +8470,7 @@ function parse(value) {
8480
8470
  }
8481
8471
  }
8482
8472
  if (currentProp && valueStart) {
8483
- const styleVal = value.substr(valueStart).trim();
8473
+ const styleVal = value.slice(valueStart).trim();
8484
8474
  styles.push(currentProp, valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal);
8485
8475
  }
8486
8476
  return styles;
@@ -8658,7 +8648,7 @@ class StylingBuilder {
8658
8648
  const isClass = !isStyle && (name === 'class' || prefix === 'class.' || prefix === 'class!');
8659
8649
  if (isStyle || isClass) {
8660
8650
  const isMapBased = name.charAt(5) !== '.'; // style.prop or class.prop makes this a no
8661
- const property = name.substr(isMapBased ? 5 : 6); // the dot explains why there's a +1
8651
+ const property = name.slice(isMapBased ? 5 : 6); // the dot explains why there's a +1
8662
8652
  if (isStyle) {
8663
8653
  binding = this.registerStyleInput(property, isMapBased, expression, sourceSpan);
8664
8654
  }
@@ -8811,7 +8801,7 @@ class StylingBuilder {
8811
8801
  getStyleMapInterpolationExpression(mapValue);
8812
8802
  }
8813
8803
  else {
8814
- reference = isClassBased ? Identifiers$1.classMap : Identifiers$1.styleMap;
8804
+ reference = isClassBased ? Identifiers.classMap : Identifiers.styleMap;
8815
8805
  }
8816
8806
  return {
8817
8807
  reference,
@@ -8885,13 +8875,13 @@ class StylingBuilder {
8885
8875
  }
8886
8876
  _buildClassInputs(valueConverter) {
8887
8877
  if (this._singleClassInputs) {
8888
- return this._buildSingleInputs(Identifiers$1.classProp, this._singleClassInputs, valueConverter, null, true);
8878
+ return this._buildSingleInputs(Identifiers.classProp, this._singleClassInputs, valueConverter, null, true);
8889
8879
  }
8890
8880
  return [];
8891
8881
  }
8892
8882
  _buildStyleInputs(valueConverter) {
8893
8883
  if (this._singleStyleInputs) {
8894
- return this._buildSingleInputs(Identifiers$1.styleProp, this._singleStyleInputs, valueConverter, getStylePropInterpolationExpression, false);
8884
+ return this._buildSingleInputs(Identifiers.styleProp, this._singleStyleInputs, valueConverter, getStylePropInterpolationExpression, false);
8895
8885
  }
8896
8886
  return [];
8897
8887
  }
@@ -8932,7 +8922,7 @@ function parseProperty(name) {
8932
8922
  let property = name;
8933
8923
  const unitIndex = name.lastIndexOf('.');
8934
8924
  if (unitIndex > 0) {
8935
- suffix = name.substr(unitIndex + 1);
8925
+ suffix = name.slice(unitIndex + 1);
8936
8926
  property = name.substring(0, unitIndex);
8937
8927
  }
8938
8928
  return { property, suffix, hasOverrideFlag };
@@ -8944,25 +8934,25 @@ function parseProperty(name) {
8944
8934
  function getClassMapInterpolationExpression(interpolation) {
8945
8935
  switch (getInterpolationArgsLength(interpolation)) {
8946
8936
  case 1:
8947
- return Identifiers$1.classMap;
8937
+ return Identifiers.classMap;
8948
8938
  case 3:
8949
- return Identifiers$1.classMapInterpolate1;
8939
+ return Identifiers.classMapInterpolate1;
8950
8940
  case 5:
8951
- return Identifiers$1.classMapInterpolate2;
8941
+ return Identifiers.classMapInterpolate2;
8952
8942
  case 7:
8953
- return Identifiers$1.classMapInterpolate3;
8943
+ return Identifiers.classMapInterpolate3;
8954
8944
  case 9:
8955
- return Identifiers$1.classMapInterpolate4;
8945
+ return Identifiers.classMapInterpolate4;
8956
8946
  case 11:
8957
- return Identifiers$1.classMapInterpolate5;
8947
+ return Identifiers.classMapInterpolate5;
8958
8948
  case 13:
8959
- return Identifiers$1.classMapInterpolate6;
8949
+ return Identifiers.classMapInterpolate6;
8960
8950
  case 15:
8961
- return Identifiers$1.classMapInterpolate7;
8951
+ return Identifiers.classMapInterpolate7;
8962
8952
  case 17:
8963
- return Identifiers$1.classMapInterpolate8;
8953
+ return Identifiers.classMapInterpolate8;
8964
8954
  default:
8965
- return Identifiers$1.classMapInterpolateV;
8955
+ return Identifiers.classMapInterpolateV;
8966
8956
  }
8967
8957
  }
8968
8958
  /**
@@ -8972,25 +8962,25 @@ function getClassMapInterpolationExpression(interpolation) {
8972
8962
  function getStyleMapInterpolationExpression(interpolation) {
8973
8963
  switch (getInterpolationArgsLength(interpolation)) {
8974
8964
  case 1:
8975
- return Identifiers$1.styleMap;
8965
+ return Identifiers.styleMap;
8976
8966
  case 3:
8977
- return Identifiers$1.styleMapInterpolate1;
8967
+ return Identifiers.styleMapInterpolate1;
8978
8968
  case 5:
8979
- return Identifiers$1.styleMapInterpolate2;
8969
+ return Identifiers.styleMapInterpolate2;
8980
8970
  case 7:
8981
- return Identifiers$1.styleMapInterpolate3;
8971
+ return Identifiers.styleMapInterpolate3;
8982
8972
  case 9:
8983
- return Identifiers$1.styleMapInterpolate4;
8973
+ return Identifiers.styleMapInterpolate4;
8984
8974
  case 11:
8985
- return Identifiers$1.styleMapInterpolate5;
8975
+ return Identifiers.styleMapInterpolate5;
8986
8976
  case 13:
8987
- return Identifiers$1.styleMapInterpolate6;
8977
+ return Identifiers.styleMapInterpolate6;
8988
8978
  case 15:
8989
- return Identifiers$1.styleMapInterpolate7;
8979
+ return Identifiers.styleMapInterpolate7;
8990
8980
  case 17:
8991
- return Identifiers$1.styleMapInterpolate8;
8981
+ return Identifiers.styleMapInterpolate8;
8992
8982
  default:
8993
- return Identifiers$1.styleMapInterpolateV;
8983
+ return Identifiers.styleMapInterpolateV;
8994
8984
  }
8995
8985
  }
8996
8986
  /**
@@ -9000,25 +8990,25 @@ function getStyleMapInterpolationExpression(interpolation) {
9000
8990
  function getStylePropInterpolationExpression(interpolation) {
9001
8991
  switch (getInterpolationArgsLength(interpolation)) {
9002
8992
  case 1:
9003
- return Identifiers$1.styleProp;
8993
+ return Identifiers.styleProp;
9004
8994
  case 3:
9005
- return Identifiers$1.stylePropInterpolate1;
8995
+ return Identifiers.stylePropInterpolate1;
9006
8996
  case 5:
9007
- return Identifiers$1.stylePropInterpolate2;
8997
+ return Identifiers.stylePropInterpolate2;
9008
8998
  case 7:
9009
- return Identifiers$1.stylePropInterpolate3;
8999
+ return Identifiers.stylePropInterpolate3;
9010
9000
  case 9:
9011
- return Identifiers$1.stylePropInterpolate4;
9001
+ return Identifiers.stylePropInterpolate4;
9012
9002
  case 11:
9013
- return Identifiers$1.stylePropInterpolate5;
9003
+ return Identifiers.stylePropInterpolate5;
9014
9004
  case 13:
9015
- return Identifiers$1.stylePropInterpolate6;
9005
+ return Identifiers.stylePropInterpolate6;
9016
9006
  case 15:
9017
- return Identifiers$1.stylePropInterpolate7;
9007
+ return Identifiers.stylePropInterpolate7;
9018
9008
  case 17:
9019
- return Identifiers$1.stylePropInterpolate8;
9009
+ return Identifiers.stylePropInterpolate8;
9020
9010
  default:
9021
- return Identifiers$1.stylePropInterpolateV;
9011
+ return Identifiers.stylePropInterpolateV;
9022
9012
  }
9023
9013
  }
9024
9014
  /**
@@ -9479,11 +9469,15 @@ class Parser$1 {
9479
9469
  this._lexer = _lexer;
9480
9470
  this.errors = [];
9481
9471
  }
9482
- parseAction(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
9472
+ parseAction(input, isAssignmentEvent, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
9483
9473
  this._checkNoInterpolation(input, location, interpolationConfig);
9484
9474
  const sourceToLex = this._stripComments(input);
9485
9475
  const tokens = this._lexer.tokenize(sourceToLex);
9486
- const ast = new _ParseAST(input, location, absoluteOffset, tokens, true, this.errors, 0).parseChain();
9476
+ let flags = 1 /* Action */;
9477
+ if (isAssignmentEvent) {
9478
+ flags |= 2 /* AssignmentEvent */;
9479
+ }
9480
+ const ast = new _ParseAST(input, location, absoluteOffset, tokens, flags, this.errors, 0).parseChain();
9487
9481
  return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
9488
9482
  }
9489
9483
  parseBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
@@ -9507,31 +9501,12 @@ class Parser$1 {
9507
9501
  this.errors.push(new ParserError(message, input, errLocation, ctxLocation));
9508
9502
  }
9509
9503
  _parseBindingAst(input, location, absoluteOffset, interpolationConfig) {
9510
- // Quotes expressions use 3rd-party expression language. We don't want to use
9511
- // our lexer or parser for that, so we check for that ahead of time.
9512
- const quote = this._parseQuote(input, location, absoluteOffset);
9513
- if (quote != null) {
9514
- return quote;
9515
- }
9516
9504
  this._checkNoInterpolation(input, location, interpolationConfig);
9517
9505
  const sourceToLex = this._stripComments(input);
9518
9506
  const tokens = this._lexer.tokenize(sourceToLex);
9519
- return new _ParseAST(input, location, absoluteOffset, tokens, false, this.errors, 0)
9507
+ return new _ParseAST(input, location, absoluteOffset, tokens, 0 /* None */, this.errors, 0)
9520
9508
  .parseChain();
9521
9509
  }
9522
- _parseQuote(input, location, absoluteOffset) {
9523
- if (input == null)
9524
- return null;
9525
- const prefixSeparatorIndex = input.indexOf(':');
9526
- if (prefixSeparatorIndex == -1)
9527
- return null;
9528
- const prefix = input.substring(0, prefixSeparatorIndex).trim();
9529
- if (!isIdentifier(prefix))
9530
- return null;
9531
- const uninterpretedExpression = input.substring(prefixSeparatorIndex + 1);
9532
- const span = new ParseSpan(0, input.length);
9533
- return new Quote(span, span.toAbsolute(absoluteOffset), prefix, uninterpretedExpression, location);
9534
- }
9535
9510
  /**
9536
9511
  * Parse microsyntax template expression and return a list of bindings or
9537
9512
  * parsing errors in case the given expression is invalid.
@@ -9560,14 +9535,14 @@ class Parser$1 {
9560
9535
  */
9561
9536
  parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {
9562
9537
  const tokens = this._lexer.tokenize(templateValue);
9563
- const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, false /* parseAction */, this.errors, 0 /* relative offset */);
9538
+ const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, 0 /* None */, this.errors, 0 /* relative offset */);
9564
9539
  return parser.parseTemplateBindings({
9565
9540
  source: templateKey,
9566
9541
  span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length),
9567
9542
  });
9568
9543
  }
9569
- parseInterpolation(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
9570
- const { strings, expressions, offsets } = this.splitInterpolation(input, location, interpolationConfig);
9544
+ parseInterpolation(input, location, absoluteOffset, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
9545
+ const { strings, expressions, offsets } = this.splitInterpolation(input, location, interpolatedTokens, interpolationConfig);
9571
9546
  if (expressions.length === 0)
9572
9547
  return null;
9573
9548
  const expressionNodes = [];
@@ -9575,7 +9550,7 @@ class Parser$1 {
9575
9550
  const expressionText = expressions[i].text;
9576
9551
  const sourceToLex = this._stripComments(expressionText);
9577
9552
  const tokens = this._lexer.tokenize(sourceToLex);
9578
- const ast = new _ParseAST(input, location, absoluteOffset, tokens, false, this.errors, offsets[i])
9553
+ const ast = new _ParseAST(input, location, absoluteOffset, tokens, 0 /* None */, this.errors, offsets[i])
9579
9554
  .parseChain();
9580
9555
  expressionNodes.push(ast);
9581
9556
  }
@@ -9589,8 +9564,7 @@ class Parser$1 {
9589
9564
  parseInterpolationExpression(expression, location, absoluteOffset) {
9590
9565
  const sourceToLex = this._stripComments(expression);
9591
9566
  const tokens = this._lexer.tokenize(sourceToLex);
9592
- const ast = new _ParseAST(expression, location, absoluteOffset, tokens,
9593
- /* parseAction */ false, this.errors, 0)
9567
+ const ast = new _ParseAST(expression, location, absoluteOffset, tokens, 0 /* None */, this.errors, 0)
9594
9568
  .parseChain();
9595
9569
  const strings = ['', '']; // The prefix and suffix strings are both empty
9596
9570
  return this.createInterpolationAst(strings, [ast], expression, location, absoluteOffset);
@@ -9607,10 +9581,11 @@ class Parser$1 {
9607
9581
  * `SplitInterpolation` with splits that look like
9608
9582
  * <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>
9609
9583
  */
9610
- splitInterpolation(input, location, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
9584
+ splitInterpolation(input, location, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
9611
9585
  const strings = [];
9612
9586
  const expressions = [];
9613
9587
  const offsets = [];
9588
+ const inputToTemplateIndexMap = interpolatedTokens ? getIndexMapForOriginalTemplate(interpolatedTokens) : null;
9614
9589
  let i = 0;
9615
9590
  let atInterpolation = false;
9616
9591
  let extendLastString = false;
@@ -9645,7 +9620,9 @@ class Parser$1 {
9645
9620
  this._reportError('Blank expressions are not allowed in interpolated strings', input, `at column ${i} in`, location);
9646
9621
  }
9647
9622
  expressions.push({ text, start: fullStart, end: fullEnd });
9648
- offsets.push(exprStart);
9623
+ const startInOriginalTemplate = inputToTemplateIndexMap?.get(fullStart) ?? fullStart;
9624
+ const offset = startInOriginalTemplate + interpStart.length;
9625
+ offsets.push(offset);
9649
9626
  i = fullEnd;
9650
9627
  atInterpolation = false;
9651
9628
  }
@@ -9761,12 +9738,12 @@ var ParseContextFlags;
9761
9738
  ParseContextFlags[ParseContextFlags["Writable"] = 1] = "Writable";
9762
9739
  })(ParseContextFlags || (ParseContextFlags = {}));
9763
9740
  class _ParseAST {
9764
- constructor(input, location, absoluteOffset, tokens, parseAction, errors, offset) {
9741
+ constructor(input, location, absoluteOffset, tokens, parseFlags, errors, offset) {
9765
9742
  this.input = input;
9766
9743
  this.location = location;
9767
9744
  this.absoluteOffset = absoluteOffset;
9768
9745
  this.tokens = tokens;
9769
- this.parseAction = parseAction;
9746
+ this.parseFlags = parseFlags;
9770
9747
  this.errors = errors;
9771
9748
  this.offset = offset;
9772
9749
  this.rparensExpected = 0;
@@ -9943,7 +9920,7 @@ class _ParseAST {
9943
9920
  const expr = this.parsePipe();
9944
9921
  exprs.push(expr);
9945
9922
  if (this.consumeOptionalCharacter($SEMICOLON)) {
9946
- if (!this.parseAction) {
9923
+ if (!(this.parseFlags & 1 /* Action */)) {
9947
9924
  this.error('Binding expression cannot contain chained expression');
9948
9925
  }
9949
9926
  while (this.consumeOptionalCharacter($SEMICOLON)) {
@@ -9967,7 +9944,7 @@ class _ParseAST {
9967
9944
  const start = this.inputIndex;
9968
9945
  let result = this.parseExpression();
9969
9946
  if (this.consumeOptionalOperator('|')) {
9970
- if (this.parseAction) {
9947
+ if (this.parseFlags & 1 /* Action */) {
9971
9948
  this.error('Cannot have a pipe in an action expression');
9972
9949
  }
9973
9950
  do {
@@ -10309,7 +10286,7 @@ class _ParseAST {
10309
10286
  const nameSpan = this.sourceSpan(nameStart);
10310
10287
  let receiver;
10311
10288
  if (isSafe) {
10312
- if (this.consumeOptionalOperator('=')) {
10289
+ if (this.consumeOptionalAssignment()) {
10313
10290
  this.error('The \'?.\' operator cannot be used in the assignment');
10314
10291
  receiver = new EmptyExpr(this.span(start), this.sourceSpan(start));
10315
10292
  }
@@ -10318,8 +10295,8 @@ class _ParseAST {
10318
10295
  }
10319
10296
  }
10320
10297
  else {
10321
- if (this.consumeOptionalOperator('=')) {
10322
- if (!this.parseAction) {
10298
+ if (this.consumeOptionalAssignment()) {
10299
+ if (!(this.parseFlags & 1 /* Action */)) {
10323
10300
  this.error('Bindings cannot contain assignments');
10324
10301
  return new EmptyExpr(this.span(start), this.sourceSpan(start));
10325
10302
  }
@@ -10345,6 +10322,22 @@ class _ParseAST {
10345
10322
  return isSafe ? new SafeCall(span, sourceSpan, receiver, args, argumentSpan) :
10346
10323
  new Call(span, sourceSpan, receiver, args, argumentSpan);
10347
10324
  }
10325
+ consumeOptionalAssignment() {
10326
+ // When parsing assignment events (originating from two-way-binding aka banana-in-a-box syntax),
10327
+ // it is valid for the primary expression to be terminated by the non-null operator. This
10328
+ // primary expression is substituted as LHS of the assignment operator to achieve
10329
+ // two-way-binding, such that the LHS could be the non-null operator. The grammar doesn't
10330
+ // naturally allow for this syntax, so assignment events are parsed specially.
10331
+ if ((this.parseFlags & 2 /* AssignmentEvent */) && this.next.isOperator('!') &&
10332
+ this.peek(1).isOperator('=')) {
10333
+ // First skip over the ! operator.
10334
+ this.advance();
10335
+ // Then skip over the = operator, to fully consume the optional assignment operator.
10336
+ this.advance();
10337
+ return true;
10338
+ }
10339
+ return this.consumeOptionalOperator('=');
10340
+ }
10348
10341
  parseCallArguments() {
10349
10342
  if (this.next.isCharacter($RPAREN))
10350
10343
  return [];
@@ -10637,6 +10630,41 @@ class SimpleExpressionChecker extends RecursiveAstVisitor {
10637
10630
  this.errors.push('pipes');
10638
10631
  }
10639
10632
  }
10633
+ /**
10634
+ * Computes the real offset in the original template for indexes in an interpolation.
10635
+ *
10636
+ * Because templates can have encoded HTML entities and the input passed to the parser at this stage
10637
+ * of the compiler is the _decoded_ value, we need to compute the real offset using the original
10638
+ * encoded values in the interpolated tokens. Note that this is only a special case handling for
10639
+ * `MlParserTokenType.ENCODED_ENTITY` token types. All other interpolated tokens are expected to
10640
+ * have parts which exactly match the input string for parsing the interpolation.
10641
+ *
10642
+ * @param interpolatedTokens The tokens for the interpolated value.
10643
+ *
10644
+ * @returns A map of index locations in the decoded template to indexes in the original template
10645
+ */
10646
+ function getIndexMapForOriginalTemplate(interpolatedTokens) {
10647
+ let offsetMap = new Map();
10648
+ let consumedInOriginalTemplate = 0;
10649
+ let consumedInInput = 0;
10650
+ let tokenIndex = 0;
10651
+ while (tokenIndex < interpolatedTokens.length) {
10652
+ const currentToken = interpolatedTokens[tokenIndex];
10653
+ if (currentToken.type === 9 /* ENCODED_ENTITY */) {
10654
+ const [decoded, encoded] = currentToken.parts;
10655
+ consumedInOriginalTemplate += encoded.length;
10656
+ consumedInInput += decoded.length;
10657
+ }
10658
+ else {
10659
+ const lengthOfParts = currentToken.parts.reduce((sum, current) => sum + current.length, 0);
10660
+ consumedInInput += lengthOfParts;
10661
+ consumedInOriginalTemplate += lengthOfParts;
10662
+ }
10663
+ offsetMap.set(consumedInInput, consumedInOriginalTemplate);
10664
+ tokenIndex++;
10665
+ }
10666
+ return offsetMap;
10667
+ }
10640
10668
 
10641
10669
  /**
10642
10670
  * @license
@@ -13878,7 +13906,7 @@ class EscapedCharacterCursor extends PlainCharacterCursor {
13878
13906
  }
13879
13907
  }
13880
13908
  decodeHexDigits(start, length) {
13881
- const hex = this.input.substr(start.internalState.offset, length);
13909
+ const hex = this.input.slice(start.internalState.offset, start.internalState.offset + length);
13882
13910
  const charCode = parseInt(hex, 16);
13883
13911
  if (!isNaN(charCode)) {
13884
13912
  return charCode;
@@ -15034,7 +15062,7 @@ class BindingParser {
15034
15062
  // Regardless, neither of these values are used in Ivy but are only here to satisfy the
15035
15063
  // function signature. This should likely be refactored in the future so that `sourceSpan`
15036
15064
  // isn't being used inaccurately.
15037
- this.parseEvent(propName, expression, sourceSpan, sourceSpan, [], targetEvents, sourceSpan);
15065
+ this.parseEvent(propName, expression, /* isAssignmentEvent */ false, sourceSpan, sourceSpan, [], targetEvents, sourceSpan);
15038
15066
  }
15039
15067
  else {
15040
15068
  this._reportError(`Value of the host listener "${propName}" needs to be a string representing an expression but got "${expression}" (${typeof expression})`, sourceSpan);
@@ -15042,11 +15070,11 @@ class BindingParser {
15042
15070
  }
15043
15071
  return targetEvents;
15044
15072
  }
15045
- parseInterpolation(value, sourceSpan) {
15073
+ parseInterpolation(value, sourceSpan, interpolatedTokens) {
15046
15074
  const sourceInfo = sourceSpan.start.toString();
15047
15075
  const absoluteOffset = sourceSpan.fullStart.offset;
15048
15076
  try {
15049
- const ast = this._exprParser.parseInterpolation(value, sourceInfo, absoluteOffset, this._interpolationConfig);
15077
+ const ast = this._exprParser.parseInterpolation(value, sourceInfo, absoluteOffset, interpolatedTokens, this._interpolationConfig);
15050
15078
  if (ast)
15051
15079
  this._reportExpressionParserErrors(ast.errors, sourceSpan);
15052
15080
  return ast;
@@ -15183,8 +15211,8 @@ class BindingParser {
15183
15211
  this._parsePropertyAst(name, this._parseBinding(expression, isHost, valueSpan || sourceSpan, absoluteOffset), sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
15184
15212
  }
15185
15213
  }
15186
- parsePropertyInterpolation(name, value, sourceSpan, valueSpan, targetMatchableAttrs, targetProps, keySpan) {
15187
- const expr = this.parseInterpolation(value, valueSpan || sourceSpan);
15214
+ parsePropertyInterpolation(name, value, sourceSpan, valueSpan, targetMatchableAttrs, targetProps, keySpan, interpolatedTokens) {
15215
+ const expr = this.parseInterpolation(value, valueSpan || sourceSpan, interpolatedTokens);
15188
15216
  if (expr) {
15189
15217
  this._parsePropertyAst(name, expr, sourceSpan, keySpan, valueSpan, targetMatchableAttrs, targetProps);
15190
15218
  return true;
@@ -15271,30 +15299,30 @@ class BindingParser {
15271
15299
  return new BoundElementProperty(boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit, boundProp.sourceSpan, boundProp.keySpan, boundProp.valueSpan);
15272
15300
  }
15273
15301
  // TODO: keySpan should be required but was made optional to avoid changing VE parser.
15274
- parseEvent(name, expression, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {
15302
+ parseEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {
15275
15303
  if (name.length === 0) {
15276
15304
  this._reportError(`Event name is missing in binding`, sourceSpan);
15277
15305
  }
15278
15306
  if (isAnimationLabel(name)) {
15279
- name = name.substr(1);
15307
+ name = name.slice(1);
15280
15308
  if (keySpan !== undefined) {
15281
15309
  keySpan = moveParseSourceSpan(keySpan, new AbsoluteSourceSpan(keySpan.start.offset + 1, keySpan.end.offset));
15282
15310
  }
15283
- this._parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan);
15311
+ this._parseAnimationEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetEvents, keySpan);
15284
15312
  }
15285
15313
  else {
15286
- this._parseRegularEvent(name, expression, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan);
15314
+ this._parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan);
15287
15315
  }
15288
15316
  }
15289
15317
  calcPossibleSecurityContexts(selector, propName, isAttribute) {
15290
15318
  const prop = this._schemaRegistry.getMappedPropName(propName);
15291
15319
  return calcPossibleSecurityContexts(this._schemaRegistry, selector, prop, isAttribute);
15292
15320
  }
15293
- _parseAnimationEvent(name, expression, sourceSpan, handlerSpan, targetEvents, keySpan) {
15321
+ _parseAnimationEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetEvents, keySpan) {
15294
15322
  const matches = splitAtPeriod(name, [name, '']);
15295
15323
  const eventName = matches[0];
15296
15324
  const phase = matches[1].toLowerCase();
15297
- const ast = this._parseAction(expression, handlerSpan);
15325
+ const ast = this._parseAction(expression, isAssignmentEvent, handlerSpan);
15298
15326
  targetEvents.push(new ParsedEvent(eventName, phase, 1 /* Animation */, ast, sourceSpan, handlerSpan, keySpan));
15299
15327
  if (eventName.length === 0) {
15300
15328
  this._reportError(`Animation event name is missing in binding`, sourceSpan);
@@ -15308,20 +15336,20 @@ class BindingParser {
15308
15336
  this._reportError(`The animation trigger output event (@${eventName}) is missing its phase value name (start or done are currently supported)`, sourceSpan);
15309
15337
  }
15310
15338
  }
15311
- _parseRegularEvent(name, expression, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {
15339
+ _parseRegularEvent(name, expression, isAssignmentEvent, sourceSpan, handlerSpan, targetMatchableAttrs, targetEvents, keySpan) {
15312
15340
  // long format: 'target: eventName'
15313
15341
  const [target, eventName] = splitAtColon(name, [null, name]);
15314
- const ast = this._parseAction(expression, handlerSpan);
15342
+ const ast = this._parseAction(expression, isAssignmentEvent, handlerSpan);
15315
15343
  targetMatchableAttrs.push([name, ast.source]);
15316
15344
  targetEvents.push(new ParsedEvent(eventName, target, 0 /* Regular */, ast, sourceSpan, handlerSpan, keySpan));
15317
15345
  // Don't detect directives for event names for now,
15318
15346
  // so don't add the event name to the matchableAttrs
15319
15347
  }
15320
- _parseAction(value, sourceSpan) {
15348
+ _parseAction(value, isAssignmentEvent, sourceSpan) {
15321
15349
  const sourceInfo = (sourceSpan && sourceSpan.start || '(unknown').toString();
15322
15350
  const absoluteOffset = (sourceSpan && sourceSpan.start) ? sourceSpan.start.offset : 0;
15323
15351
  try {
15324
- const ast = this._exprParser.parseAction(value, sourceInfo, absoluteOffset, this._interpolationConfig);
15352
+ const ast = this._exprParser.parseAction(value, isAssignmentEvent, sourceInfo, absoluteOffset, this._interpolationConfig);
15325
15353
  if (ast) {
15326
15354
  this._reportExpressionParserErrors(ast.errors, sourceSpan);
15327
15355
  }
@@ -15681,7 +15709,7 @@ class HtmlAstToIvyAst {
15681
15709
  return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, attribute.keySpan, attribute.valueSpan, attribute.i18n);
15682
15710
  }
15683
15711
  visitText(text) {
15684
- return this._visitTextWithInterpolation(text.value, text.sourceSpan, text.i18n);
15712
+ return this._visitTextWithInterpolation(text.value, text.sourceSpan, text.tokens, text.i18n);
15685
15713
  }
15686
15714
  visitExpansion(expansion) {
15687
15715
  if (!expansion.i18n) {
@@ -15711,7 +15739,7 @@ class HtmlAstToIvyAst {
15711
15739
  vars[formattedKey] = new BoundText(ast, value.sourceSpan);
15712
15740
  }
15713
15741
  else {
15714
- placeholders[key] = this._visitTextWithInterpolation(value.text, value.sourceSpan);
15742
+ placeholders[key] = this._visitTextWithInterpolation(value.text, value.sourceSpan, null);
15715
15743
  }
15716
15744
  });
15717
15745
  return new Icu$1(vars, placeholders, expansion.sourceSpan, message);
@@ -15783,7 +15811,7 @@ class HtmlAstToIvyAst {
15783
15811
  const events = [];
15784
15812
  const identifier = bindParts[IDENT_KW_IDX];
15785
15813
  const keySpan = createKeySpan(srcSpan, bindParts[KW_ON_IDX], identifier);
15786
- this.bindingParser.parseEvent(identifier, value, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, events, keySpan);
15814
+ this.bindingParser.parseEvent(identifier, value, /* isAssignmentEvent */ false, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, events, keySpan);
15787
15815
  addEvents(events, boundEvents);
15788
15816
  }
15789
15817
  else if (bindParts[KW_BINDON_IDX]) {
@@ -15827,19 +15855,19 @@ class HtmlAstToIvyAst {
15827
15855
  }
15828
15856
  else {
15829
15857
  const events = [];
15830
- this.bindingParser.parseEvent(identifier, value, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, events, keySpan);
15858
+ this.bindingParser.parseEvent(identifier, value, /* isAssignmentEvent */ false, srcSpan, attribute.valueSpan || srcSpan, matchableAttributes, events, keySpan);
15831
15859
  addEvents(events, boundEvents);
15832
15860
  }
15833
15861
  return true;
15834
15862
  }
15835
15863
  // No explicit binding found.
15836
15864
  const keySpan = createKeySpan(srcSpan, '' /* prefix */, name);
15837
- const hasBinding = this.bindingParser.parsePropertyInterpolation(name, value, srcSpan, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan);
15865
+ const hasBinding = this.bindingParser.parsePropertyInterpolation(name, value, srcSpan, attribute.valueSpan, matchableAttributes, parsedProperties, keySpan, attribute.valueTokens ?? null);
15838
15866
  return hasBinding;
15839
15867
  }
15840
- _visitTextWithInterpolation(value, sourceSpan, i18n) {
15868
+ _visitTextWithInterpolation(value, sourceSpan, interpolatedTokens, i18n) {
15841
15869
  const valueNoNgsp = replaceNgsp(value);
15842
- const expr = this.bindingParser.parseInterpolation(valueNoNgsp, sourceSpan);
15870
+ const expr = this.bindingParser.parseInterpolation(valueNoNgsp, sourceSpan, interpolatedTokens);
15843
15871
  return expr ? new BoundText(expr, sourceSpan, i18n) : new Text$3(valueNoNgsp, sourceSpan);
15844
15872
  }
15845
15873
  parseVariable(identifier, value, sourceSpan, keySpan, valueSpan, variables) {
@@ -15865,7 +15893,7 @@ class HtmlAstToIvyAst {
15865
15893
  }
15866
15894
  parseAssignmentEvent(name, expression, sourceSpan, valueSpan, targetMatchableAttrs, boundEvents, keySpan) {
15867
15895
  const events = [];
15868
- this.bindingParser.parseEvent(`${name}Change`, `${expression}=$event`, sourceSpan, valueSpan || sourceSpan, targetMatchableAttrs, events, keySpan);
15896
+ this.bindingParser.parseEvent(`${name}Change`, `${expression} =$event`, /* isAssignmentEvent */ true, sourceSpan, valueSpan || sourceSpan, targetMatchableAttrs, events, keySpan);
15869
15897
  addEvents(events, boundEvents);
15870
15898
  }
15871
15899
  reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {
@@ -16653,7 +16681,8 @@ class I18nMetaVisitor {
16653
16681
  */
16654
16682
  _parseMetadata(meta) {
16655
16683
  return typeof meta === 'string' ? parseI18nMeta(meta) :
16656
- meta instanceof Message ? meta : {};
16684
+ meta instanceof Message ? meta :
16685
+ {};
16657
16686
  }
16658
16687
  /**
16659
16688
  * Generate (or restore) message id if not specified already.
@@ -16678,9 +16707,9 @@ class I18nMetaVisitor {
16678
16707
  // `packages/compiler/src/render3/view/template.ts`).
16679
16708
  // In that case we want to reuse the legacy message generated in the 1st pass (see
16680
16709
  // `setI18nRefs()`).
16681
- const previousMessage = meta instanceof Message ?
16682
- meta :
16683
- meta instanceof IcuPlaceholder ? meta.previousMessage : undefined;
16710
+ const previousMessage = meta instanceof Message ? meta :
16711
+ meta instanceof IcuPlaceholder ? meta.previousMessage :
16712
+ undefined;
16684
16713
  message.legacyIds = previousMessage ? previousMessage.legacyIds : [];
16685
16714
  }
16686
16715
  }
@@ -16725,10 +16754,14 @@ function i18nMetaToJSDoc(meta) {
16725
16754
  if (meta.description) {
16726
16755
  tags.push({ tagName: "desc" /* Desc */, text: meta.description });
16727
16756
  }
16757
+ else {
16758
+ // Suppress the JSCompiler warning that a `@desc` was not given for this message.
16759
+ tags.push({ tagName: "suppress" /* Suppress */, text: '{msgDescriptions}' });
16760
+ }
16728
16761
  if (meta.meaning) {
16729
16762
  tags.push({ tagName: "meaning" /* Meaning */, text: meta.meaning });
16730
16763
  }
16731
- return tags.length == 0 ? null : jsDocComment(tags);
16764
+ return jsDocComment(tags);
16732
16765
  }
16733
16766
 
16734
16767
  /** Closure uses `goog.getMsg(message)` to lookup translations */
@@ -16746,10 +16779,7 @@ function createGoogleGetMsgStatements(variable$1, message, closureVar, params) {
16746
16779
  // const MSG_... = goog.getMsg(..);
16747
16780
  // I18N_X = MSG_...;
16748
16781
  const googGetMsgStmt = closureVar.set(variable(GOOG_GET_MSG).callFn(args)).toConstDecl();
16749
- const metaComment = i18nMetaToJSDoc(message);
16750
- if (metaComment !== null) {
16751
- googGetMsgStmt.addLeadingComment(metaComment);
16752
- }
16782
+ googGetMsgStmt.addLeadingComment(i18nMetaToJSDoc(message));
16753
16783
  const i18nAssignmentStmt = new ExpressionStatement(variable$1.set(closureVar));
16754
16784
  return [googGetMsgStmt, i18nAssignmentStmt];
16755
16785
  }
@@ -16910,7 +16940,7 @@ const NG_PROJECT_AS_ATTR_NAME = 'ngProjectAs';
16910
16940
  // Global symbols available only inside event bindings.
16911
16941
  const EVENT_BINDING_SCOPE_GLOBALS = new Set(['$event']);
16912
16942
  // List of supported global targets for event listeners
16913
- const GLOBAL_TARGET_RESOLVERS = new Map([['window', Identifiers$1.resolveWindow], ['document', Identifiers$1.resolveDocument], ['body', Identifiers$1.resolveBody]]);
16943
+ const GLOBAL_TARGET_RESOLVERS = new Map([['window', Identifiers.resolveWindow], ['document', Identifiers.resolveDocument], ['body', Identifiers.resolveBody]]);
16914
16944
  const LEADING_TRIVIA_CHARS = [' ', '\n', '\r', '\t'];
16915
16945
  // if (rf & flags) { .. }
16916
16946
  function renderFlagCheckIfStmt(flags, statements) {
@@ -16927,15 +16957,29 @@ function prepareEventListenerParameters(eventAst, handlerName = null, scope = nu
16927
16957
  const implicitReceiverExpr = (scope === null || scope.bindingLevel === 0) ?
16928
16958
  variable(CONTEXT_NAME) :
16929
16959
  scope.getOrCreateSharedContextVar(0);
16930
- const bindingStatements = convertActionBinding(scope, implicitReceiverExpr, handler, 'b', () => error('Unexpected interpolation'), eventAst.handlerSpan, implicitReceiverAccesses, EVENT_BINDING_SCOPE_GLOBALS);
16960
+ const bindingStatements = convertActionBinding(scope, implicitReceiverExpr, handler, 'b', eventAst.handlerSpan, implicitReceiverAccesses, EVENT_BINDING_SCOPE_GLOBALS);
16931
16961
  const statements = [];
16932
- if (scope) {
16962
+ const variableDeclarations = scope?.variableDeclarations();
16963
+ const restoreViewStatement = scope?.restoreViewStatement();
16964
+ if (variableDeclarations) {
16933
16965
  // `variableDeclarations` needs to run first, because
16934
16966
  // `restoreViewStatement` depends on the result.
16935
- statements.push(...scope.variableDeclarations());
16936
- statements.unshift(...scope.restoreViewStatement());
16967
+ statements.push(...variableDeclarations);
16937
16968
  }
16938
16969
  statements.push(...bindingStatements);
16970
+ if (restoreViewStatement) {
16971
+ statements.unshift(restoreViewStatement);
16972
+ // If there's a `restoreView` call, we need to reset the view at the end of the listener
16973
+ // in order to avoid a leak. If there's a `return` statement already, we wrap it in the
16974
+ // call, e.g. `return resetView(ctx.foo())`. Otherwise we add the call as the last statement.
16975
+ const lastStatement = statements[statements.length - 1];
16976
+ if (lastStatement instanceof ReturnStatement) {
16977
+ statements[statements.length - 1] = new ReturnStatement(invokeInstruction(lastStatement.value.sourceSpan, Identifiers.resetView, [lastStatement.value]));
16978
+ }
16979
+ else {
16980
+ statements.push(new ExpressionStatement(invokeInstruction(null, Identifiers.resetView, [])));
16981
+ }
16982
+ }
16939
16983
  const eventName = type === 1 /* Animation */ ? prepareSyntheticListenerName(name, phase) : name;
16940
16984
  const fnName = handlerName && sanitizeIdentifier(handlerName);
16941
16985
  const fnArgs = [];
@@ -17022,12 +17066,12 @@ class TemplateDefinitionBuilder {
17022
17066
  this.fileBasedI18nSuffix = relativeContextFilePath.replace(/[^A-Za-z0-9]/g, '_') + '_';
17023
17067
  this._valueConverter = new ValueConverter(constantPool, () => this.allocateDataSlot(), (numSlots) => this.allocatePureFunctionSlots(numSlots), (name, localName, slot, value) => {
17024
17068
  this._bindingScope.set(this.level, localName, value);
17025
- this.creationInstruction(null, Identifiers$1.pipe, [literal(slot), literal(name)]);
17069
+ this.creationInstruction(null, Identifiers.pipe, [literal(slot), literal(name)]);
17026
17070
  });
17027
17071
  }
17028
17072
  buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n) {
17029
17073
  this._ngContentSelectorsOffset = ngContentSelectorsOffset;
17030
- if (this._namespace !== Identifiers$1.namespaceHTML) {
17074
+ if (this._namespace !== Identifiers.namespaceHTML) {
17031
17075
  this.creationInstruction(null, this._namespace);
17032
17076
  }
17033
17077
  // Create variable bindings
@@ -17073,15 +17117,15 @@ class TemplateDefinitionBuilder {
17073
17117
  // Since we accumulate ngContent selectors while processing template elements,
17074
17118
  // we *prepend* `projectionDef` to creation instructions block, to put it before
17075
17119
  // any `projection` instructions
17076
- this.creationInstruction(null, Identifiers$1.projectionDef, parameters, /* prepend */ true);
17120
+ this.creationInstruction(null, Identifiers.projectionDef, parameters, /* prepend */ true);
17077
17121
  }
17078
17122
  if (initI18nContext) {
17079
17123
  this.i18nEnd(null, selfClosingI18nInstruction);
17080
17124
  }
17081
17125
  // Generate all the creation mode instructions (e.g. resolve bindings in listeners)
17082
- const creationStatements = this._creationCodeFns.map((fn) => fn());
17126
+ const creationStatements = getInstructionStatements(this._creationCodeFns);
17083
17127
  // Generate all the update mode instructions (e.g. resolve property or text bindings)
17084
- const updateStatements = this._updateCodeFns.map((fn) => fn());
17128
+ const updateStatements = getInstructionStatements(this._updateCodeFns);
17085
17129
  // Variable declaration must occur after binding resolution so we can generate context
17086
17130
  // instructions that build on each other.
17087
17131
  // e.g. const b = nextContext().$implicit(); const b = nextContext();
@@ -17234,7 +17278,7 @@ class TemplateDefinitionBuilder {
17234
17278
  if (Object.keys(icuMapping).length) {
17235
17279
  args.push(mapLiteral(icuMapping, true));
17236
17280
  }
17237
- return instruction(null, Identifiers$1.i18nPostprocess, args);
17281
+ return invokeInstruction(null, Identifiers.i18nPostprocess, args);
17238
17282
  };
17239
17283
  }
17240
17284
  this.i18nTranslate(meta, params, context.ref, transformFn);
@@ -17253,7 +17297,7 @@ class TemplateDefinitionBuilder {
17253
17297
  // into i18nStart call for top level i18n context
17254
17298
  params.push(literal(id));
17255
17299
  }
17256
- this.creationInstruction(span, selfClosing ? Identifiers$1.i18n : Identifiers$1.i18nStart, params);
17300
+ this.creationInstruction(span, selfClosing ? Identifiers.i18n : Identifiers.i18nStart, params);
17257
17301
  }
17258
17302
  i18nEnd(span = null, selfClosing) {
17259
17303
  if (!this.i18n) {
@@ -17269,25 +17313,22 @@ class TemplateDefinitionBuilder {
17269
17313
  // setup accumulated bindings
17270
17314
  const { index, bindings } = this.i18n;
17271
17315
  if (bindings.size) {
17272
- const chainBindings = [];
17273
- bindings.forEach(binding => {
17274
- chainBindings.push({ sourceSpan: span, value: () => this.convertPropertyBinding(binding) });
17275
- });
17276
- // for i18n block, advance to the most recent element index (by taking the current number of
17277
- // elements and subtracting one) before invoking `i18nExp` instructions, to make sure the
17278
- // necessary lifecycle hooks of components/directives are properly flushed.
17279
- this.updateInstructionChainWithAdvance(this.getConstCount() - 1, Identifiers$1.i18nExp, chainBindings);
17280
- this.updateInstruction(span, Identifiers$1.i18nApply, [literal(index)]);
17316
+ for (const binding of bindings) {
17317
+ // for i18n block, advance to the most recent element index (by taking the current number of
17318
+ // elements and subtracting one) before invoking `i18nExp` instructions, to make sure the
17319
+ // necessary lifecycle hooks of components/directives are properly flushed.
17320
+ this.updateInstructionWithAdvance(this.getConstCount() - 1, span, Identifiers.i18nExp, () => this.convertPropertyBinding(binding));
17321
+ }
17322
+ this.updateInstruction(span, Identifiers.i18nApply, [literal(index)]);
17281
17323
  }
17282
17324
  if (!selfClosing) {
17283
- this.creationInstruction(span, Identifiers$1.i18nEnd);
17325
+ this.creationInstruction(span, Identifiers.i18nEnd);
17284
17326
  }
17285
17327
  this.i18n = null; // reset local i18n context
17286
17328
  }
17287
17329
  i18nAttributesInstruction(nodeIndex, attrs, sourceSpan) {
17288
17330
  let hasBindings = false;
17289
17331
  const i18nAttrArgs = [];
17290
- const bindings = [];
17291
17332
  attrs.forEach(attr => {
17292
17333
  const message = attr.i18n;
17293
17334
  const converted = attr.value.visit(this._valueConverter);
@@ -17298,33 +17339,27 @@ class TemplateDefinitionBuilder {
17298
17339
  i18nAttrArgs.push(literal(attr.name), this.i18nTranslate(message, params));
17299
17340
  converted.expressions.forEach(expression => {
17300
17341
  hasBindings = true;
17301
- bindings.push({
17302
- sourceSpan,
17303
- value: () => this.convertPropertyBinding(expression),
17304
- });
17342
+ this.updateInstructionWithAdvance(nodeIndex, sourceSpan, Identifiers.i18nExp, () => this.convertPropertyBinding(expression));
17305
17343
  });
17306
17344
  }
17307
17345
  });
17308
- if (bindings.length > 0) {
17309
- this.updateInstructionChainWithAdvance(nodeIndex, Identifiers$1.i18nExp, bindings);
17310
- }
17311
17346
  if (i18nAttrArgs.length > 0) {
17312
17347
  const index = literal(this.allocateDataSlot());
17313
17348
  const constIndex = this.addToConsts(literalArr(i18nAttrArgs));
17314
- this.creationInstruction(sourceSpan, Identifiers$1.i18nAttributes, [index, constIndex]);
17349
+ this.creationInstruction(sourceSpan, Identifiers.i18nAttributes, [index, constIndex]);
17315
17350
  if (hasBindings) {
17316
- this.updateInstruction(sourceSpan, Identifiers$1.i18nApply, [index]);
17351
+ this.updateInstruction(sourceSpan, Identifiers.i18nApply, [index]);
17317
17352
  }
17318
17353
  }
17319
17354
  }
17320
17355
  getNamespaceInstruction(namespaceKey) {
17321
17356
  switch (namespaceKey) {
17322
17357
  case 'math':
17323
- return Identifiers$1.namespaceMathML;
17358
+ return Identifiers.namespaceMathML;
17324
17359
  case 'svg':
17325
- return Identifiers$1.namespaceSVG;
17360
+ return Identifiers.namespaceSVG;
17326
17361
  default:
17327
- return Identifiers$1.namespaceHTML;
17362
+ return Identifiers.namespaceHTML;
17328
17363
  }
17329
17364
  }
17330
17365
  addNamespaceInstruction(nsInstruction, element) {
@@ -17351,7 +17386,7 @@ class TemplateDefinitionBuilder {
17351
17386
  else if (projectionSlotIdx !== 0) {
17352
17387
  parameters.push(literal(projectionSlotIdx));
17353
17388
  }
17354
- this.creationInstruction(ngContent.sourceSpan, Identifiers$1.projection, parameters);
17389
+ this.creationInstruction(ngContent.sourceSpan, Identifiers.projection, parameters);
17355
17390
  if (this.i18n) {
17356
17391
  this.i18n.appendProjection(ngContent.i18n, slot);
17357
17392
  }
@@ -17423,23 +17458,21 @@ class TemplateDefinitionBuilder {
17423
17458
  element.outputs.length === 0 && boundI18nAttrs.length === 0 && !hasChildren;
17424
17459
  const createSelfClosingI18nInstruction = !createSelfClosingInstruction && hasTextChildrenOnly(element.children);
17425
17460
  if (createSelfClosingInstruction) {
17426
- this.creationInstruction(element.sourceSpan, isNgContainer$1 ? Identifiers$1.elementContainer : Identifiers$1.element, trimTrailingNulls(parameters));
17461
+ this.creationInstruction(element.sourceSpan, isNgContainer$1 ? Identifiers.elementContainer : Identifiers.element, trimTrailingNulls(parameters));
17427
17462
  }
17428
17463
  else {
17429
- this.creationInstruction(element.startSourceSpan, isNgContainer$1 ? Identifiers$1.elementContainerStart : Identifiers$1.elementStart, trimTrailingNulls(parameters));
17464
+ this.creationInstruction(element.startSourceSpan, isNgContainer$1 ? Identifiers.elementContainerStart : Identifiers.elementStart, trimTrailingNulls(parameters));
17430
17465
  if (isNonBindableMode) {
17431
- this.creationInstruction(element.startSourceSpan, Identifiers$1.disableBindings);
17466
+ this.creationInstruction(element.startSourceSpan, Identifiers.disableBindings);
17432
17467
  }
17433
17468
  if (boundI18nAttrs.length > 0) {
17434
17469
  this.i18nAttributesInstruction(elementIndex, boundI18nAttrs, element.startSourceSpan ?? element.sourceSpan);
17435
17470
  }
17436
17471
  // Generate Listeners (outputs)
17437
17472
  if (element.outputs.length > 0) {
17438
- const listeners = element.outputs.map((outputAst) => ({
17439
- sourceSpan: outputAst.sourceSpan,
17440
- params: this.prepareListenerParameter(element.name, outputAst, elementIndex)
17441
- }));
17442
- this.creationInstructionChain(Identifiers$1.listener, listeners);
17473
+ for (const outputAst of element.outputs) {
17474
+ this.creationInstruction(outputAst.sourceSpan, Identifiers.listener, this.prepareListenerParameter(element.name, outputAst, elementIndex));
17475
+ }
17443
17476
  }
17444
17477
  // Note: it's important to keep i18n/i18nStart instructions after i18nAttributes and
17445
17478
  // listeners, to make sure i18nAttributes instruction targets current element at runtime.
@@ -17480,9 +17513,8 @@ class TemplateDefinitionBuilder {
17480
17513
  const hasValue = value instanceof LiteralPrimitive ? !!value.value : true;
17481
17514
  this.allocateBindingSlots(value);
17482
17515
  propertyBindings.push({
17483
- name: prepareSyntheticPropertyName(input.name),
17484
- sourceSpan: input.sourceSpan,
17485
- value: () => hasValue ? this.convertPropertyBinding(value) : emptyValueBindInstruction
17516
+ span: input.sourceSpan,
17517
+ paramsOrFn: getBindingFunctionParams(() => hasValue ? this.convertPropertyBinding(value) : emptyValueBindInstruction, prepareSyntheticPropertyName(input.name))
17486
17518
  });
17487
17519
  }
17488
17520
  else {
@@ -17519,10 +17551,8 @@ class TemplateDefinitionBuilder {
17519
17551
  // [prop]="value"
17520
17552
  // Collect all the properties so that we can chain into a single function at the end.
17521
17553
  propertyBindings.push({
17522
- name: attrName,
17523
- sourceSpan: input.sourceSpan,
17524
- value: () => this.convertPropertyBinding(value),
17525
- params
17554
+ span: input.sourceSpan,
17555
+ paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(value), attrName, params)
17526
17556
  });
17527
17557
  }
17528
17558
  }
@@ -17536,16 +17566,14 @@ class TemplateDefinitionBuilder {
17536
17566
  // [attr.name]="value" or attr.name="{{value}}"
17537
17567
  // Collect the attribute bindings so that they can be chained at the end.
17538
17568
  attributeBindings.push({
17539
- name: attrName,
17540
- sourceSpan: input.sourceSpan,
17541
- value: () => this.convertPropertyBinding(boundValue),
17542
- params
17569
+ span: input.sourceSpan,
17570
+ paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(boundValue), attrName, params)
17543
17571
  });
17544
17572
  }
17545
17573
  }
17546
17574
  else {
17547
17575
  // class prop
17548
- this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, Identifiers$1.classProp, () => {
17576
+ this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, Identifiers.classProp, () => {
17549
17577
  return [
17550
17578
  literal(elementIndex), literal(attrName), this.convertPropertyBinding(value),
17551
17579
  ...params
@@ -17555,11 +17583,11 @@ class TemplateDefinitionBuilder {
17555
17583
  }
17556
17584
  }
17557
17585
  });
17558
- if (propertyBindings.length > 0) {
17559
- this.updateInstructionChainWithAdvance(elementIndex, Identifiers$1.property, propertyBindings);
17586
+ for (const propertyBinding of propertyBindings) {
17587
+ this.updateInstructionWithAdvance(elementIndex, propertyBinding.span, Identifiers.property, propertyBinding.paramsOrFn);
17560
17588
  }
17561
- if (attributeBindings.length > 0) {
17562
- this.updateInstructionChainWithAdvance(elementIndex, Identifiers$1.attribute, attributeBindings);
17589
+ for (const attributeBinding of attributeBindings) {
17590
+ this.updateInstructionWithAdvance(elementIndex, attributeBinding.span, Identifiers.attribute, attributeBinding.paramsOrFn);
17563
17591
  }
17564
17592
  // Traverse element child nodes
17565
17593
  visitAll$1(this, element.children);
@@ -17573,9 +17601,9 @@ class TemplateDefinitionBuilder {
17573
17601
  this.i18nEnd(span, createSelfClosingI18nInstruction);
17574
17602
  }
17575
17603
  if (isNonBindableMode) {
17576
- this.creationInstruction(span, Identifiers$1.enableBindings);
17604
+ this.creationInstruction(span, Identifiers.enableBindings);
17577
17605
  }
17578
- this.creationInstruction(span, isNgContainer$1 ? Identifiers$1.elementContainerEnd : Identifiers$1.elementEnd);
17606
+ this.creationInstruction(span, isNgContainer$1 ? Identifiers.elementContainerEnd : Identifiers.elementEnd);
17579
17607
  }
17580
17608
  }
17581
17609
  visitTemplate(template) {
@@ -17601,7 +17629,7 @@ class TemplateDefinitionBuilder {
17601
17629
  if (template.references && template.references.length) {
17602
17630
  const refs = this.prepareRefsArray(template.references);
17603
17631
  parameters.push(this.addToConsts(refs));
17604
- parameters.push(importExpr(Identifiers$1.templateRefExtractor));
17632
+ parameters.push(importExpr(Identifiers.templateRefExtractor));
17605
17633
  }
17606
17634
  // Create the template function
17607
17635
  const templateVisitor = new TemplateDefinitionBuilder(this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n, templateIndex, templateName, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds, this._constants);
@@ -17617,7 +17645,7 @@ class TemplateDefinitionBuilder {
17617
17645
  }
17618
17646
  });
17619
17647
  // e.g. template(1, MyComp_Template_1)
17620
- this.creationInstruction(template.sourceSpan, Identifiers$1.templateCreate, () => {
17648
+ this.creationInstruction(template.sourceSpan, Identifiers.templateCreate, () => {
17621
17649
  parameters.splice(2, 0, literal(templateVisitor.getConstCount()), literal(templateVisitor.getVarCount()));
17622
17650
  return trimTrailingNulls(parameters);
17623
17651
  });
@@ -17638,12 +17666,8 @@ class TemplateDefinitionBuilder {
17638
17666
  this.templatePropertyBindings(templateIndex, inputs);
17639
17667
  }
17640
17668
  // Generate listeners for directive output
17641
- if (template.outputs.length > 0) {
17642
- const listeners = template.outputs.map((outputAst) => ({
17643
- sourceSpan: outputAst.sourceSpan,
17644
- params: this.prepareListenerParameter('ng_template', outputAst, templateIndex)
17645
- }));
17646
- this.creationInstructionChain(Identifiers$1.listener, listeners);
17669
+ for (const outputAst of template.outputs) {
17670
+ this.creationInstruction(outputAst.sourceSpan, Identifiers.listener, this.prepareListenerParameter('ng_template', outputAst, templateIndex));
17647
17671
  }
17648
17672
  }
17649
17673
  }
@@ -17658,7 +17682,7 @@ class TemplateDefinitionBuilder {
17658
17682
  return;
17659
17683
  }
17660
17684
  const nodeIndex = this.allocateDataSlot();
17661
- this.creationInstruction(text.sourceSpan, Identifiers$1.text, [literal(nodeIndex)]);
17685
+ this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(nodeIndex)]);
17662
17686
  const value = text.value.visit(this._valueConverter);
17663
17687
  this.allocateBindingSlots(value);
17664
17688
  if (value instanceof Interpolation) {
@@ -17673,7 +17697,7 @@ class TemplateDefinitionBuilder {
17673
17697
  // block, we exclude this text element from instructions set,
17674
17698
  // since it will be captured in i18n content and processed at runtime
17675
17699
  if (!this.i18n) {
17676
- this.creationInstruction(text.sourceSpan, Identifiers$1.text, [literal(this.allocateDataSlot()), literal(text.value)]);
17700
+ this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(this.allocateDataSlot()), literal(text.value)]);
17677
17701
  }
17678
17702
  }
17679
17703
  visitIcu(icu) {
@@ -17698,7 +17722,7 @@ class TemplateDefinitionBuilder {
17698
17722
  const transformFn = (raw) => {
17699
17723
  const params = { ...vars, ...placeholders };
17700
17724
  const formatted = i18nFormatPlaceholderNames(params, /* useCamelCase */ false);
17701
- return instruction(null, Identifiers$1.i18nPostprocess, [raw, mapLiteral(formatted, true)]);
17725
+ return invokeInstruction(null, Identifiers.i18nPostprocess, [raw, mapLiteral(formatted, true)]);
17702
17726
  };
17703
17727
  // in case the whole i18n message is a single ICU - we do not need to
17704
17728
  // create a separate top-level translation, we can use the root ref instead
@@ -17740,32 +17764,33 @@ class TemplateDefinitionBuilder {
17740
17764
  }
17741
17765
  templatePropertyBindings(templateIndex, attrs) {
17742
17766
  const propertyBindings = [];
17743
- attrs.forEach(input => {
17744
- if (input instanceof BoundAttribute) {
17745
- const value = input.value.visit(this._valueConverter);
17746
- if (value !== undefined) {
17747
- this.allocateBindingSlots(value);
17748
- if (value instanceof Interpolation) {
17749
- // Params typically contain attribute namespace and value sanitizer, which is applicable
17750
- // for regular HTML elements, but not applicable for <ng-template> (since props act as
17751
- // inputs to directives), so keep params array empty.
17752
- const params = [];
17753
- // prop="{{value}}" case
17754
- this.interpolatedUpdateInstruction(getPropertyInterpolationExpression(value), templateIndex, input.name, input, value, params);
17755
- }
17756
- else {
17757
- // [prop]="value" case
17758
- propertyBindings.push({
17759
- name: input.name,
17760
- sourceSpan: input.sourceSpan,
17761
- value: () => this.convertPropertyBinding(value)
17762
- });
17763
- }
17764
- }
17767
+ for (const input of attrs) {
17768
+ if (!(input instanceof BoundAttribute)) {
17769
+ continue;
17765
17770
  }
17766
- });
17767
- if (propertyBindings.length > 0) {
17768
- this.updateInstructionChainWithAdvance(templateIndex, Identifiers$1.property, propertyBindings);
17771
+ const value = input.value.visit(this._valueConverter);
17772
+ if (value === undefined) {
17773
+ continue;
17774
+ }
17775
+ this.allocateBindingSlots(value);
17776
+ if (value instanceof Interpolation) {
17777
+ // Params typically contain attribute namespace and value sanitizer, which is applicable
17778
+ // for regular HTML elements, but not applicable for <ng-template> (since props act as
17779
+ // inputs to directives), so keep params array empty.
17780
+ const params = [];
17781
+ // prop="{{value}}" case
17782
+ this.interpolatedUpdateInstruction(getPropertyInterpolationExpression(value), templateIndex, input.name, input, value, params);
17783
+ }
17784
+ else {
17785
+ // [prop]="value" case
17786
+ propertyBindings.push({
17787
+ span: input.sourceSpan,
17788
+ paramsOrFn: getBindingFunctionParams(() => this.convertPropertyBinding(value), input.name)
17789
+ });
17790
+ }
17791
+ }
17792
+ for (const propertyBinding of propertyBindings) {
17793
+ this.updateInstructionWithAdvance(templateIndex, propertyBinding.span, Identifiers.property, propertyBinding.paramsOrFn);
17769
17794
  }
17770
17795
  }
17771
17796
  // Bindings must only be resolved after all local refs have been visited, so all
@@ -17773,39 +17798,23 @@ class TemplateDefinitionBuilder {
17773
17798
  // Otherwise, we wouldn't be able to support local refs that are defined after their
17774
17799
  // bindings. e.g. {{ foo }} <div #foo></div>
17775
17800
  instructionFn(fns, span, reference, paramsOrFn, prepend = false) {
17776
- fns[prepend ? 'unshift' : 'push'](() => {
17777
- const params = Array.isArray(paramsOrFn) ? paramsOrFn : paramsOrFn();
17778
- return instruction(span, reference, params).toStmt();
17779
- });
17801
+ fns[prepend ? 'unshift' : 'push']({ span, reference, paramsOrFn });
17780
17802
  }
17781
17803
  processStylingUpdateInstruction(elementIndex, instruction) {
17782
17804
  let allocateBindingSlots = 0;
17783
17805
  if (instruction) {
17784
- const calls = [];
17785
- instruction.calls.forEach(call => {
17806
+ for (const call of instruction.calls) {
17786
17807
  allocateBindingSlots += call.allocateBindingSlots;
17787
- calls.push({
17788
- sourceSpan: call.sourceSpan,
17789
- value: () => {
17790
- return call.params(value => (call.supportsInterpolation && value instanceof Interpolation) ?
17791
- this.getUpdateInstructionArguments(value) :
17792
- this.convertPropertyBinding(value));
17793
- }
17794
- });
17795
- });
17796
- this.updateInstructionChainWithAdvance(elementIndex, instruction.reference, calls);
17808
+ this.updateInstructionWithAdvance(elementIndex, call.sourceSpan, instruction.reference, () => call.params(value => (call.supportsInterpolation && value instanceof Interpolation) ?
17809
+ this.getUpdateInstructionArguments(value) :
17810
+ this.convertPropertyBinding(value)));
17811
+ }
17797
17812
  }
17798
17813
  return allocateBindingSlots;
17799
17814
  }
17800
17815
  creationInstruction(span, reference, paramsOrFn, prepend) {
17801
17816
  this.instructionFn(this._creationCodeFns, span, reference, paramsOrFn || [], prepend);
17802
17817
  }
17803
- creationInstructionChain(reference, calls) {
17804
- const span = calls.length ? calls[0].sourceSpan : null;
17805
- this._creationCodeFns.push(() => {
17806
- return chainedInstruction(reference, calls.map(call => call.params()), span).toStmt();
17807
- });
17808
- }
17809
17818
  updateInstructionWithAdvance(nodeIndex, span, reference, paramsOrFn) {
17810
17819
  this.addAdvanceInstructionIfNecessary(nodeIndex, span);
17811
17820
  this.updateInstruction(span, reference, paramsOrFn);
@@ -17813,35 +17822,13 @@ class TemplateDefinitionBuilder {
17813
17822
  updateInstruction(span, reference, paramsOrFn) {
17814
17823
  this.instructionFn(this._updateCodeFns, span, reference, paramsOrFn || []);
17815
17824
  }
17816
- updateInstructionChain(reference, bindings) {
17817
- const span = bindings.length ? bindings[0].sourceSpan : null;
17818
- this._updateCodeFns.push(() => {
17819
- const calls = bindings.map(property => {
17820
- const value = property.value();
17821
- const fnParams = Array.isArray(value) ? value : [value];
17822
- if (property.params) {
17823
- fnParams.push(...property.params);
17824
- }
17825
- if (property.name) {
17826
- // We want the property name to always be the first function parameter.
17827
- fnParams.unshift(literal(property.name));
17828
- }
17829
- return fnParams;
17830
- });
17831
- return chainedInstruction(reference, calls, span).toStmt();
17832
- });
17833
- }
17834
- updateInstructionChainWithAdvance(nodeIndex, reference, bindings) {
17835
- this.addAdvanceInstructionIfNecessary(nodeIndex, bindings.length ? bindings[0].sourceSpan : null);
17836
- this.updateInstructionChain(reference, bindings);
17837
- }
17838
17825
  addAdvanceInstructionIfNecessary(nodeIndex, span) {
17839
17826
  if (nodeIndex !== this._currentIndex) {
17840
17827
  const delta = nodeIndex - this._currentIndex;
17841
17828
  if (delta < 1) {
17842
17829
  throw new Error('advance instruction can only go forwards');
17843
17830
  }
17844
- this.instructionFn(this._updateCodeFns, span, Identifiers$1.advance, [literal(delta)]);
17831
+ this.instructionFn(this._updateCodeFns, span, Identifiers.advance, [literal(delta)]);
17845
17832
  this._currentIndex = nodeIndex;
17846
17833
  }
17847
17834
  }
@@ -17866,7 +17853,7 @@ class TemplateDefinitionBuilder {
17866
17853
  this._bindingScope.getOrCreateSharedContextVar(0);
17867
17854
  }
17868
17855
  convertPropertyBinding(value) {
17869
- const convertedPropertyBinding = convertPropertyBinding(this, this.getImplicitReceiverExpr(), value, this.bindingContext(), () => error('Unexpected interpolation'));
17856
+ const convertedPropertyBinding = convertPropertyBinding(this, this.getImplicitReceiverExpr(), value, this.bindingContext());
17870
17857
  const valExpr = convertedPropertyBinding.currValExpr;
17871
17858
  this._tempVariables.push(...convertedPropertyBinding.stmts);
17872
17859
  return valExpr;
@@ -18023,7 +18010,7 @@ class TemplateDefinitionBuilder {
18023
18010
  // e.g. nextContext(2);
18024
18011
  const nextContextStmt = relativeLevel > 0 ? [generateNextContextExpr(relativeLevel).toStmt()] : [];
18025
18012
  // e.g. const $foo$ = reference(1);
18026
- const refExpr = lhs.set(importExpr(Identifiers$1.reference).callFn([literal(slot)]));
18013
+ const refExpr = lhs.set(importExpr(Identifiers.reference).callFn([literal(slot)]));
18027
18014
  return nextContextStmt.concat(refExpr.toConstDecl());
18028
18015
  }, true);
18029
18016
  return [reference.name, reference.value];
@@ -18101,31 +18088,28 @@ class ValueConverter extends AstMemoryEfficientTransformer {
18101
18088
  }
18102
18089
  }
18103
18090
  // Pipes always have at least one parameter, the value they operate on
18104
- const pipeBindingIdentifiers = [Identifiers$1.pipeBind1, Identifiers$1.pipeBind2, Identifiers$1.pipeBind3, Identifiers$1.pipeBind4];
18091
+ const pipeBindingIdentifiers = [Identifiers.pipeBind1, Identifiers.pipeBind2, Identifiers.pipeBind3, Identifiers.pipeBind4];
18105
18092
  function pipeBindingCallInfo(args) {
18106
18093
  const identifier = pipeBindingIdentifiers[args.length];
18107
18094
  return {
18108
- identifier: identifier || Identifiers$1.pipeBindV,
18095
+ identifier: identifier || Identifiers.pipeBindV,
18109
18096
  isVarLength: !identifier,
18110
18097
  };
18111
18098
  }
18112
18099
  const pureFunctionIdentifiers = [
18113
- Identifiers$1.pureFunction0, Identifiers$1.pureFunction1, Identifiers$1.pureFunction2, Identifiers$1.pureFunction3, Identifiers$1.pureFunction4,
18114
- Identifiers$1.pureFunction5, Identifiers$1.pureFunction6, Identifiers$1.pureFunction7, Identifiers$1.pureFunction8
18100
+ Identifiers.pureFunction0, Identifiers.pureFunction1, Identifiers.pureFunction2, Identifiers.pureFunction3, Identifiers.pureFunction4,
18101
+ Identifiers.pureFunction5, Identifiers.pureFunction6, Identifiers.pureFunction7, Identifiers.pureFunction8
18115
18102
  ];
18116
18103
  function pureFunctionCallInfo(args) {
18117
18104
  const identifier = pureFunctionIdentifiers[args.length];
18118
18105
  return {
18119
- identifier: identifier || Identifiers$1.pureFunctionV,
18106
+ identifier: identifier || Identifiers.pureFunctionV,
18120
18107
  isVarLength: !identifier,
18121
18108
  };
18122
18109
  }
18123
- function instruction(span, reference, params) {
18124
- return importExpr(reference, null, span).callFn(params, span);
18125
- }
18126
18110
  // e.g. x(2);
18127
18111
  function generateNextContextExpr(relativeLevelDiff) {
18128
- return importExpr(Identifiers$1.nextContext)
18112
+ return importExpr(Identifiers.nextContext)
18129
18113
  .callFn(relativeLevelDiff > 1 ? [literal(relativeLevelDiff)] : []);
18130
18114
  }
18131
18115
  function getLiteralFactory(constantPool, literal$1, allocateSlots) {
@@ -18325,21 +18309,22 @@ class BindingScope {
18325
18309
  }
18326
18310
  }
18327
18311
  restoreViewStatement() {
18328
- const statements = [];
18329
18312
  if (this.restoreViewVariable) {
18330
- const restoreCall = instruction(null, Identifiers$1.restoreView, [this.restoreViewVariable]);
18313
+ const restoreCall = invokeInstruction(null, Identifiers.restoreView, [this.restoreViewVariable]);
18331
18314
  // Either `const restoredCtx = restoreView($state$);` or `restoreView($state$);`
18332
18315
  // depending on whether it is being used.
18333
- statements.push(this.usesRestoredViewContext ?
18316
+ return this.usesRestoredViewContext ?
18334
18317
  variable(RESTORED_VIEW_CONTEXT_NAME).set(restoreCall).toConstDecl() :
18335
- restoreCall.toStmt());
18318
+ restoreCall.toStmt();
18336
18319
  }
18337
- return statements;
18320
+ return null;
18338
18321
  }
18339
18322
  viewSnapshotStatements() {
18340
18323
  // const $state$ = getCurrentView();
18341
18324
  return this.restoreViewVariable ?
18342
- [this.restoreViewVariable.set(instruction(null, Identifiers$1.getCurrentView, [])).toConstDecl()] :
18325
+ [
18326
+ this.restoreViewVariable.set(invokeInstruction(null, Identifiers.getCurrentView, [])).toConstDecl()
18327
+ ] :
18343
18328
  [];
18344
18329
  }
18345
18330
  isListenerScope() {
@@ -18407,25 +18392,25 @@ function getNgProjectAsLiteral(attribute) {
18407
18392
  function getPropertyInterpolationExpression(interpolation) {
18408
18393
  switch (getInterpolationArgsLength(interpolation)) {
18409
18394
  case 1:
18410
- return Identifiers$1.propertyInterpolate;
18395
+ return Identifiers.propertyInterpolate;
18411
18396
  case 3:
18412
- return Identifiers$1.propertyInterpolate1;
18397
+ return Identifiers.propertyInterpolate1;
18413
18398
  case 5:
18414
- return Identifiers$1.propertyInterpolate2;
18399
+ return Identifiers.propertyInterpolate2;
18415
18400
  case 7:
18416
- return Identifiers$1.propertyInterpolate3;
18401
+ return Identifiers.propertyInterpolate3;
18417
18402
  case 9:
18418
- return Identifiers$1.propertyInterpolate4;
18403
+ return Identifiers.propertyInterpolate4;
18419
18404
  case 11:
18420
- return Identifiers$1.propertyInterpolate5;
18405
+ return Identifiers.propertyInterpolate5;
18421
18406
  case 13:
18422
- return Identifiers$1.propertyInterpolate6;
18407
+ return Identifiers.propertyInterpolate6;
18423
18408
  case 15:
18424
- return Identifiers$1.propertyInterpolate7;
18409
+ return Identifiers.propertyInterpolate7;
18425
18410
  case 17:
18426
- return Identifiers$1.propertyInterpolate8;
18411
+ return Identifiers.propertyInterpolate8;
18427
18412
  default:
18428
- return Identifiers$1.propertyInterpolateV;
18413
+ return Identifiers.propertyInterpolateV;
18429
18414
  }
18430
18415
  }
18431
18416
  /**
@@ -18435,23 +18420,23 @@ function getPropertyInterpolationExpression(interpolation) {
18435
18420
  function getAttributeInterpolationExpression(interpolation) {
18436
18421
  switch (getInterpolationArgsLength(interpolation)) {
18437
18422
  case 3:
18438
- return Identifiers$1.attributeInterpolate1;
18423
+ return Identifiers.attributeInterpolate1;
18439
18424
  case 5:
18440
- return Identifiers$1.attributeInterpolate2;
18425
+ return Identifiers.attributeInterpolate2;
18441
18426
  case 7:
18442
- return Identifiers$1.attributeInterpolate3;
18427
+ return Identifiers.attributeInterpolate3;
18443
18428
  case 9:
18444
- return Identifiers$1.attributeInterpolate4;
18429
+ return Identifiers.attributeInterpolate4;
18445
18430
  case 11:
18446
- return Identifiers$1.attributeInterpolate5;
18431
+ return Identifiers.attributeInterpolate5;
18447
18432
  case 13:
18448
- return Identifiers$1.attributeInterpolate6;
18433
+ return Identifiers.attributeInterpolate6;
18449
18434
  case 15:
18450
- return Identifiers$1.attributeInterpolate7;
18435
+ return Identifiers.attributeInterpolate7;
18451
18436
  case 17:
18452
- return Identifiers$1.attributeInterpolate8;
18437
+ return Identifiers.attributeInterpolate8;
18453
18438
  default:
18454
- return Identifiers$1.attributeInterpolateV;
18439
+ return Identifiers.attributeInterpolateV;
18455
18440
  }
18456
18441
  }
18457
18442
  /**
@@ -18461,25 +18446,25 @@ function getAttributeInterpolationExpression(interpolation) {
18461
18446
  function getTextInterpolationExpression(interpolation) {
18462
18447
  switch (getInterpolationArgsLength(interpolation)) {
18463
18448
  case 1:
18464
- return Identifiers$1.textInterpolate;
18449
+ return Identifiers.textInterpolate;
18465
18450
  case 3:
18466
- return Identifiers$1.textInterpolate1;
18451
+ return Identifiers.textInterpolate1;
18467
18452
  case 5:
18468
- return Identifiers$1.textInterpolate2;
18453
+ return Identifiers.textInterpolate2;
18469
18454
  case 7:
18470
- return Identifiers$1.textInterpolate3;
18455
+ return Identifiers.textInterpolate3;
18471
18456
  case 9:
18472
- return Identifiers$1.textInterpolate4;
18457
+ return Identifiers.textInterpolate4;
18473
18458
  case 11:
18474
- return Identifiers$1.textInterpolate5;
18459
+ return Identifiers.textInterpolate5;
18475
18460
  case 13:
18476
- return Identifiers$1.textInterpolate6;
18461
+ return Identifiers.textInterpolate6;
18477
18462
  case 15:
18478
- return Identifiers$1.textInterpolate7;
18463
+ return Identifiers.textInterpolate7;
18479
18464
  case 17:
18480
- return Identifiers$1.textInterpolate8;
18465
+ return Identifiers.textInterpolate8;
18481
18466
  default:
18482
- return Identifiers$1.textInterpolateV;
18467
+ return Identifiers.textInterpolateV;
18483
18468
  }
18484
18469
  }
18485
18470
  /**
@@ -18570,18 +18555,18 @@ function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
18570
18555
  function resolveSanitizationFn(context, isAttribute) {
18571
18556
  switch (context) {
18572
18557
  case SecurityContext.HTML:
18573
- return importExpr(Identifiers$1.sanitizeHtml);
18558
+ return importExpr(Identifiers.sanitizeHtml);
18574
18559
  case SecurityContext.SCRIPT:
18575
- return importExpr(Identifiers$1.sanitizeScript);
18560
+ return importExpr(Identifiers.sanitizeScript);
18576
18561
  case SecurityContext.STYLE:
18577
18562
  // the compiler does not fill in an instruction for [style.prop?] binding
18578
18563
  // values because the style algorithm knows internally what props are subject
18579
18564
  // to sanitization (only [attr.style] values are explicitly sanitized)
18580
- return isAttribute ? importExpr(Identifiers$1.sanitizeStyle) : null;
18565
+ return isAttribute ? importExpr(Identifiers.sanitizeStyle) : null;
18581
18566
  case SecurityContext.URL:
18582
- return importExpr(Identifiers$1.sanitizeUrl);
18567
+ return importExpr(Identifiers.sanitizeUrl);
18583
18568
  case SecurityContext.RESOURCE_URL:
18584
- return importExpr(Identifiers$1.sanitizeResourceUrl);
18569
+ return importExpr(Identifiers.sanitizeResourceUrl);
18585
18570
  default:
18586
18571
  return null;
18587
18572
  }
@@ -18591,10 +18576,10 @@ function trustedConstAttribute(tagName, attr) {
18591
18576
  if (isTrustedTypesSink(tagName, attr.name)) {
18592
18577
  switch (elementRegistry.securityContext(tagName, attr.name, /* isAttribute */ true)) {
18593
18578
  case SecurityContext.HTML:
18594
- return taggedTemplate(importExpr(Identifiers$1.trustConstantHtml), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);
18579
+ return taggedTemplate(importExpr(Identifiers.trustConstantHtml), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);
18595
18580
  // NB: no SecurityContext.SCRIPT here, as the corresponding tags are stripped by the compiler.
18596
18581
  case SecurityContext.RESOURCE_URL:
18597
- return taggedTemplate(importExpr(Identifiers$1.trustConstantResourceUrl), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);
18582
+ return taggedTemplate(importExpr(Identifiers.trustConstantResourceUrl), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);
18598
18583
  default:
18599
18584
  return value;
18600
18585
  }
@@ -18612,6 +18597,20 @@ function isTextNode(node) {
18612
18597
  function hasTextChildrenOnly(children) {
18613
18598
  return children.every(isTextNode);
18614
18599
  }
18600
+ function getBindingFunctionParams(deferredParams, name, eagerParams) {
18601
+ return () => {
18602
+ const value = deferredParams();
18603
+ const fnParams = Array.isArray(value) ? value : [value];
18604
+ if (eagerParams) {
18605
+ fnParams.push(...eagerParams);
18606
+ }
18607
+ if (name) {
18608
+ // We want the property name to always be the first function parameter.
18609
+ fnParams.unshift(literal(name));
18610
+ }
18611
+ return fnParams;
18612
+ };
18613
+ }
18615
18614
  /** Name of the global variable that is used to determine if we use Closure translations or not */
18616
18615
  const NG_I18N_CLOSURE_MODE = 'ngI18nClosureMode';
18617
18616
  /**
@@ -18708,6 +18707,9 @@ function baseDirectiveFields(meta, constantPool, bindingParser) {
18708
18707
  if (meta.exportAs !== null) {
18709
18708
  definitionMap.set('exportAs', literalArr(meta.exportAs.map(e => literal(e))));
18710
18709
  }
18710
+ if (meta.isStandalone) {
18711
+ definitionMap.set('standalone', literal(true));
18712
+ }
18711
18713
  return definitionMap;
18712
18714
  }
18713
18715
  /**
@@ -18723,16 +18725,16 @@ function addFeatures(definitionMap, meta) {
18723
18725
  if (viewProviders) {
18724
18726
  args.push(viewProviders);
18725
18727
  }
18726
- features.push(importExpr(Identifiers$1.ProvidersFeature).callFn(args));
18728
+ features.push(importExpr(Identifiers.ProvidersFeature).callFn(args));
18727
18729
  }
18728
18730
  if (meta.usesInheritance) {
18729
- features.push(importExpr(Identifiers$1.InheritDefinitionFeature));
18731
+ features.push(importExpr(Identifiers.InheritDefinitionFeature));
18730
18732
  }
18731
18733
  if (meta.fullInheritance) {
18732
- features.push(importExpr(Identifiers$1.CopyDefinitionFeature));
18734
+ features.push(importExpr(Identifiers.CopyDefinitionFeature));
18733
18735
  }
18734
18736
  if (meta.lifecycle.usesOnChanges) {
18735
- features.push(importExpr(Identifiers$1.NgOnChangesFeature));
18737
+ features.push(importExpr(Identifiers.NgOnChangesFeature));
18736
18738
  }
18737
18739
  if (features.length) {
18738
18740
  definitionMap.set('features', literalArr(features));
@@ -18744,7 +18746,7 @@ function addFeatures(definitionMap, meta) {
18744
18746
  function compileDirectiveFromMetadata(meta, constantPool, bindingParser) {
18745
18747
  const definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);
18746
18748
  addFeatures(definitionMap, meta);
18747
- const expression = importExpr(Identifiers$1.defineDirective).callFn([definitionMap.toLiteralMap()], undefined, true);
18749
+ const expression = importExpr(Identifiers.defineDirective).callFn([definitionMap.toLiteralMap()], undefined, true);
18748
18750
  const type = createDirectiveType(meta);
18749
18751
  return { expression, type, statements: [] };
18750
18752
  }
@@ -18770,7 +18772,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
18770
18772
  const templateName = templateTypeName ? `${templateTypeName}_Template` : null;
18771
18773
  const changeDetection = meta.changeDetection;
18772
18774
  const template = meta.template;
18773
- const templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.createRootScope(), 0, templateTypeName, null, null, templateName, Identifiers$1.namespaceHTML, meta.relativeContextFilePath, meta.i18nUseExternalIds);
18775
+ const templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.createRootScope(), 0, templateTypeName, null, null, templateName, Identifiers.namespaceHTML, meta.relativeContextFilePath, meta.i18nUseExternalIds);
18774
18776
  const templateFunctionExpression = templateBuilder.buildTemplateFunction(template.nodes, []);
18775
18777
  // We need to provide this so that dynamically generated components know what
18776
18778
  // projected content blocks to pass through to the component when it is instantiated.
@@ -18836,7 +18838,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
18836
18838
  if (changeDetection != null && changeDetection !== ChangeDetectionStrategy.Default) {
18837
18839
  definitionMap.set('changeDetection', literal(changeDetection));
18838
18840
  }
18839
- const expression = importExpr(Identifiers$1.defineComponent).callFn([definitionMap.toLiteralMap()], undefined, true);
18841
+ const expression = importExpr(Identifiers.defineComponent).callFn([definitionMap.toLiteralMap()], undefined, true);
18840
18842
  const type = createComponentType(meta);
18841
18843
  return { expression, type, statements: [] };
18842
18844
  }
@@ -18847,7 +18849,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
18847
18849
  function createComponentType(meta) {
18848
18850
  const typeParams = createDirectiveTypeParams(meta);
18849
18851
  typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));
18850
- return expressionType(importExpr(Identifiers$1.ComponentDeclaration, typeParams));
18852
+ return expressionType(importExpr(Identifiers.ComponentDeclaration, typeParams));
18851
18853
  }
18852
18854
  /**
18853
18855
  * Compiles the array literal of declarations into an expression according to the provided emit
@@ -18863,7 +18865,7 @@ function compileDeclarationList(list, mode) {
18863
18865
  return fn([], [new ReturnStatement(list)]);
18864
18866
  case 2 /* ClosureResolved */:
18865
18867
  // directives: function () { return [MyDir].map(ng.resolveForwardRef); }
18866
- const resolvedList = list.prop('map').callFn([importExpr(Identifiers$1.resolveForwardRef)]);
18868
+ const resolvedList = list.prop('map').callFn([importExpr(Identifiers.resolveForwardRef)]);
18867
18869
  return fn([], [new ReturnStatement(resolvedList)]);
18868
18870
  }
18869
18871
  }
@@ -18898,13 +18900,13 @@ function createContentQueriesFunction(queries, constantPool, name) {
18898
18900
  const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);
18899
18901
  for (const query of queries) {
18900
18902
  // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);
18901
- createStatements.push(importExpr(Identifiers$1.contentQuery)
18903
+ createStatements.push(importExpr(Identifiers.contentQuery)
18902
18904
  .callFn([variable('dirIndex'), ...prepareQueryParams(query, constantPool)])
18903
18905
  .toStmt());
18904
18906
  // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));
18905
18907
  const temporary = tempAllocator();
18906
- const getQueryList = importExpr(Identifiers$1.loadQuery).callFn([]);
18907
- const refresh = importExpr(Identifiers$1.queryRefresh).callFn([temporary.set(getQueryList)]);
18908
+ const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
18909
+ const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
18908
18910
  const updateDirective = variable(CONTEXT_NAME)
18909
18911
  .prop(query.propertyName)
18910
18912
  .set(query.first ? temporary.prop('first') : temporary);
@@ -18956,7 +18958,7 @@ function createDirectiveTypeParams(meta) {
18956
18958
  */
18957
18959
  function createDirectiveType(meta) {
18958
18960
  const typeParams = createDirectiveTypeParams(meta);
18959
- return expressionType(importExpr(Identifiers$1.DirectiveDeclaration, typeParams));
18961
+ return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));
18960
18962
  }
18961
18963
  // Define and update any view queries
18962
18964
  function createViewQueriesFunction(viewQueries, constantPool, name) {
@@ -18965,12 +18967,12 @@ function createViewQueriesFunction(viewQueries, constantPool, name) {
18965
18967
  const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);
18966
18968
  viewQueries.forEach((query) => {
18967
18969
  // creation, e.g. r3.viewQuery(somePredicate, true);
18968
- const queryDefinition = importExpr(Identifiers$1.viewQuery).callFn(prepareQueryParams(query, constantPool));
18970
+ const queryDefinition = importExpr(Identifiers.viewQuery).callFn(prepareQueryParams(query, constantPool));
18969
18971
  createStatements.push(queryDefinition.toStmt());
18970
18972
  // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));
18971
18973
  const temporary = tempAllocator();
18972
- const getQueryList = importExpr(Identifiers$1.loadQuery).callFn([]);
18973
- const refresh = importExpr(Identifiers$1.queryRefresh).callFn([temporary.set(getQueryList)]);
18974
+ const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
18975
+ const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
18974
18976
  const updateDirective = variable(CONTEXT_NAME)
18975
18977
  .prop(query.propertyName)
18976
18978
  .set(query.first ? temporary.prop('first') : temporary);
@@ -18993,14 +18995,14 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
18993
18995
  if (classAttr !== undefined) {
18994
18996
  styleBuilder.registerClassAttr(classAttr);
18995
18997
  }
18996
- const createStatements = [];
18997
- const updateStatements = [];
18998
+ const createInstructions = [];
18999
+ const updateInstructions = [];
19000
+ const updateVariables = [];
18998
19001
  const hostBindingSourceSpan = typeSourceSpan;
18999
19002
  // Calculate host event bindings
19000
19003
  const eventBindings = bindingParser.createDirectiveHostEventAsts(hostBindingsMetadata.listeners, hostBindingSourceSpan);
19001
19004
  if (eventBindings && eventBindings.length) {
19002
- const listeners = createHostListeners(eventBindings, name);
19003
- createStatements.push(...listeners);
19005
+ createInstructions.push(...createHostListeners(eventBindings, name));
19004
19006
  }
19005
19007
  // Calculate the host property bindings
19006
19008
  const bindings = bindingParser.createBoundHostProperties(hostBindingsMetadata.properties, hostBindingSourceSpan);
@@ -19036,7 +19038,7 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
19036
19038
  const propertyBindings = [];
19037
19039
  const attributeBindings = [];
19038
19040
  const syntheticHostBindings = [];
19039
- allOtherBindings.forEach((binding) => {
19041
+ for (const binding of allOtherBindings) {
19040
19042
  // resolve literal arrays and literal objects
19041
19043
  const value = binding.expression.visit(getValueConverter());
19042
19044
  const bindingExpr = bindingFn(bindingContext, value);
@@ -19052,7 +19054,7 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
19052
19054
  // of different security contexts. In this case we use special sanitization function and
19053
19055
  // select the actual sanitizer at runtime based on a tag name that is provided while
19054
19056
  // invoking sanitization function.
19055
- sanitizerFn = importExpr(Identifiers$1.sanitizeUrlOrResourceUrl);
19057
+ sanitizerFn = importExpr(Identifiers.sanitizeUrlOrResourceUrl);
19056
19058
  }
19057
19059
  else {
19058
19060
  sanitizerFn = resolveSanitizationFn(securityContexts[0], isAttribute);
@@ -19062,28 +19064,28 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
19062
19064
  if (sanitizerFn) {
19063
19065
  instructionParams.push(sanitizerFn);
19064
19066
  }
19065
- updateStatements.push(...bindingExpr.stmts);
19066
- if (instruction === Identifiers$1.hostProperty) {
19067
+ updateVariables.push(...bindingExpr.stmts);
19068
+ if (instruction === Identifiers.hostProperty) {
19067
19069
  propertyBindings.push(instructionParams);
19068
19070
  }
19069
- else if (instruction === Identifiers$1.attribute) {
19071
+ else if (instruction === Identifiers.attribute) {
19070
19072
  attributeBindings.push(instructionParams);
19071
19073
  }
19072
- else if (instruction === Identifiers$1.syntheticHostProperty) {
19074
+ else if (instruction === Identifiers.syntheticHostProperty) {
19073
19075
  syntheticHostBindings.push(instructionParams);
19074
19076
  }
19075
19077
  else {
19076
- updateStatements.push(importExpr(instruction).callFn(instructionParams).toStmt());
19078
+ updateInstructions.push({ reference: instruction, paramsOrFn: instructionParams, span: null });
19077
19079
  }
19078
- });
19079
- if (propertyBindings.length > 0) {
19080
- updateStatements.push(chainedInstruction(Identifiers$1.hostProperty, propertyBindings).toStmt());
19081
19080
  }
19082
- if (attributeBindings.length > 0) {
19083
- updateStatements.push(chainedInstruction(Identifiers$1.attribute, attributeBindings).toStmt());
19081
+ for (const bindingParams of propertyBindings) {
19082
+ updateInstructions.push({ reference: Identifiers.hostProperty, paramsOrFn: bindingParams, span: null });
19084
19083
  }
19085
- if (syntheticHostBindings.length > 0) {
19086
- updateStatements.push(chainedInstruction(Identifiers$1.syntheticHostProperty, syntheticHostBindings).toStmt());
19084
+ for (const bindingParams of attributeBindings) {
19085
+ updateInstructions.push({ reference: Identifiers.attribute, paramsOrFn: bindingParams, span: null });
19086
+ }
19087
+ for (const bindingParams of syntheticHostBindings) {
19088
+ updateInstructions.push({ reference: Identifiers.syntheticHostProperty, paramsOrFn: bindingParams, span: null });
19087
19089
  }
19088
19090
  // since we're dealing with directives/components and both have hostBinding
19089
19091
  // functions, we need to generate a special hostAttrs instruction that deals
@@ -19099,37 +19101,37 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
19099
19101
  // the update block of a component/directive templateFn/hostBindingsFn so that the bindings
19100
19102
  // are evaluated and updated for the element.
19101
19103
  styleBuilder.buildUpdateLevelInstructions(getValueConverter()).forEach(instruction => {
19102
- if (instruction.calls.length > 0) {
19103
- const calls = [];
19104
- instruction.calls.forEach(call => {
19105
- // we subtract a value of `1` here because the binding slot was already allocated
19106
- // at the top of this method when all the input bindings were counted.
19107
- totalHostVarsCount +=
19108
- Math.max(call.allocateBindingSlots - MIN_STYLING_BINDING_SLOTS_REQUIRED, 0);
19109
- calls.push(convertStylingCall(call, bindingContext, bindingFn));
19104
+ for (const call of instruction.calls) {
19105
+ // we subtract a value of `1` here because the binding slot was already allocated
19106
+ // at the top of this method when all the input bindings were counted.
19107
+ totalHostVarsCount +=
19108
+ Math.max(call.allocateBindingSlots - MIN_STYLING_BINDING_SLOTS_REQUIRED, 0);
19109
+ updateInstructions.push({
19110
+ reference: instruction.reference,
19111
+ paramsOrFn: convertStylingCall(call, bindingContext, bindingFn),
19112
+ span: null
19110
19113
  });
19111
- updateStatements.push(chainedInstruction(instruction.reference, calls).toStmt());
19112
19114
  }
19113
19115
  });
19114
19116
  }
19115
19117
  if (totalHostVarsCount) {
19116
19118
  definitionMap.set('hostVars', literal(totalHostVarsCount));
19117
19119
  }
19118
- if (createStatements.length > 0 || updateStatements.length > 0) {
19120
+ if (createInstructions.length > 0 || updateInstructions.length > 0) {
19119
19121
  const hostBindingsFnName = name ? `${name}_HostBindings` : null;
19120
19122
  const statements = [];
19121
- if (createStatements.length > 0) {
19122
- statements.push(renderFlagCheckIfStmt(1 /* Create */, createStatements));
19123
+ if (createInstructions.length > 0) {
19124
+ statements.push(renderFlagCheckIfStmt(1 /* Create */, getInstructionStatements(createInstructions)));
19123
19125
  }
19124
- if (updateStatements.length > 0) {
19125
- statements.push(renderFlagCheckIfStmt(2 /* Update */, updateStatements));
19126
+ if (updateInstructions.length > 0) {
19127
+ statements.push(renderFlagCheckIfStmt(2 /* Update */, updateVariables.concat(getInstructionStatements(updateInstructions))));
19126
19128
  }
19127
19129
  return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], statements, INFERRED_TYPE, null, hostBindingsFnName);
19128
19130
  }
19129
19131
  return null;
19130
19132
  }
19131
19133
  function bindingFn(implicit, value) {
19132
- return convertPropertyBinding(null, implicit, value, 'b', () => error('Unexpected interpolation'));
19134
+ return convertPropertyBinding(null, implicit, value, 'b');
19133
19135
  }
19134
19136
  function convertStylingCall(call, bindingContext, bindingFn) {
19135
19137
  return call.params(value => bindingFn(bindingContext, value).currValExpr);
@@ -19141,7 +19143,7 @@ function getBindingNameAndInstruction(binding) {
19141
19143
  const attrMatches = bindingName.match(ATTR_REGEX);
19142
19144
  if (attrMatches) {
19143
19145
  bindingName = attrMatches[1];
19144
- instruction = Identifiers$1.attribute;
19146
+ instruction = Identifiers.attribute;
19145
19147
  }
19146
19148
  else {
19147
19149
  if (binding.isAnimation) {
@@ -19149,19 +19151,19 @@ function getBindingNameAndInstruction(binding) {
19149
19151
  // host bindings that have a synthetic property (e.g. @foo) should always be rendered
19150
19152
  // in the context of the component and not the parent. Therefore there is a special
19151
19153
  // compatibility instruction available for this purpose.
19152
- instruction = Identifiers$1.syntheticHostProperty;
19154
+ instruction = Identifiers.syntheticHostProperty;
19153
19155
  }
19154
19156
  else {
19155
- instruction = Identifiers$1.hostProperty;
19157
+ instruction = Identifiers.hostProperty;
19156
19158
  }
19157
19159
  }
19158
19160
  return { bindingName, instruction, isAttribute: !!attrMatches };
19159
19161
  }
19160
19162
  function createHostListeners(eventBindings, name) {
19161
- const listeners = [];
19162
- const syntheticListeners = [];
19163
+ const listenerParams = [];
19164
+ const syntheticListenerParams = [];
19163
19165
  const instructions = [];
19164
- eventBindings.forEach(binding => {
19166
+ for (const binding of eventBindings) {
19165
19167
  let bindingName = binding.name && sanitizeIdentifier(binding.name);
19166
19168
  const bindingFnName = binding.type === 1 /* Animation */ ?
19167
19169
  prepareSyntheticListenerFunctionName(bindingName, binding.targetOrPhase) :
@@ -19169,17 +19171,17 @@ function createHostListeners(eventBindings, name) {
19169
19171
  const handlerName = name && bindingName ? `${name}_${bindingFnName}_HostBindingHandler` : null;
19170
19172
  const params = prepareEventListenerParameters(BoundEvent.fromParsedEvent(binding), handlerName);
19171
19173
  if (binding.type == 1 /* Animation */) {
19172
- syntheticListeners.push(params);
19174
+ syntheticListenerParams.push(params);
19173
19175
  }
19174
19176
  else {
19175
- listeners.push(params);
19177
+ listenerParams.push(params);
19176
19178
  }
19177
- });
19178
- if (syntheticListeners.length > 0) {
19179
- instructions.push(chainedInstruction(Identifiers$1.syntheticHostListener, syntheticListeners).toStmt());
19180
19179
  }
19181
- if (listeners.length > 0) {
19182
- instructions.push(chainedInstruction(Identifiers$1.listener, listeners).toStmt());
19180
+ for (const params of syntheticListenerParams) {
19181
+ instructions.push({ reference: Identifiers.syntheticHostListener, paramsOrFn: params, span: null });
19182
+ }
19183
+ for (const params of listenerParams) {
19184
+ instructions.push({ reference: Identifiers.listener, paramsOrFn: params, span: null });
19183
19185
  }
19184
19186
  return instructions;
19185
19187
  }
@@ -19300,6 +19302,7 @@ class CompilerFacadeImpl {
19300
19302
  deps: null,
19301
19303
  pipeName: facade.pipeName,
19302
19304
  pure: facade.pure,
19305
+ isStandalone: facade.isStandalone,
19303
19306
  };
19304
19307
  const res = compilePipeFromMetadata(metadata);
19305
19308
  return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);
@@ -19366,7 +19369,7 @@ class CompilerFacadeImpl {
19366
19369
  declarations: facade.declarations.map(wrapReference),
19367
19370
  imports: facade.imports.map(wrapReference),
19368
19371
  exports: facade.exports.map(wrapReference),
19369
- emitInline: true,
19372
+ selectorScopeMode: R3SelectorScopeMode.Inline,
19370
19373
  containsForwardDecls: false,
19371
19374
  schemas: facade.schemas ? facade.schemas.map(wrapReference) : null,
19372
19375
  id: facade.id ? new WrappedNodeExpr(facade.id) : null,
@@ -19560,6 +19563,7 @@ function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
19560
19563
  deps: null,
19561
19564
  typeArgumentCount: 0,
19562
19565
  fullInheritance: false,
19566
+ isStandalone: declaration.isStandalone ?? false,
19563
19567
  };
19564
19568
  }
19565
19569
  function convertHostDeclarationToMetadata(host = {}) {
@@ -19741,6 +19745,7 @@ function convertDeclarePipeFacadeToMetadata(declaration) {
19741
19745
  pipeName: declaration.name,
19742
19746
  deps: null,
19743
19747
  pure: declaration.pure ?? true,
19748
+ isStandalone: declaration.isStandalone ?? false,
19744
19749
  };
19745
19750
  }
19746
19751
  function convertDeclareInjectorFacadeToMetadata(declaration) {
@@ -19767,7 +19772,7 @@ function publishFacade(global) {
19767
19772
  * Use of this source code is governed by an MIT-style license that can be
19768
19773
  * found in the LICENSE file at https://angular.io/license
19769
19774
  */
19770
- const VERSION = new Version('14.0.0-next.0');
19775
+ const VERSION = new Version('14.0.0-next.11');
19771
19776
 
19772
19777
  /**
19773
19778
  * @license
@@ -21780,7 +21785,7 @@ function extractTemplateEntities(rootScope) {
21780
21785
  function compileClassMetadata(metadata) {
21781
21786
  // Generate an ngDevMode guarded call to setClassMetadata with the class identifier and its
21782
21787
  // metadata.
21783
- const fnCall = importExpr(Identifiers$1.setClassMetadata).callFn([
21788
+ const fnCall = importExpr(Identifiers.setClassMetadata).callFn([
21784
21789
  metadata.type,
21785
21790
  metadata.decorators,
21786
21791
  metadata.ctorParameters ?? literal(null),
@@ -21808,13 +21813,13 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
21808
21813
  function compileDeclareClassMetadata(metadata) {
21809
21814
  const definitionMap = new DefinitionMap();
21810
21815
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
21811
- definitionMap.set('version', literal('14.0.0-next.0'));
21812
- definitionMap.set('ngImport', importExpr(Identifiers$1.core));
21816
+ definitionMap.set('version', literal('14.0.0-next.11'));
21817
+ definitionMap.set('ngImport', importExpr(Identifiers.core));
21813
21818
  definitionMap.set('type', metadata.type);
21814
21819
  definitionMap.set('decorators', metadata.decorators);
21815
21820
  definitionMap.set('ctorParameters', metadata.ctorParameters);
21816
21821
  definitionMap.set('propDecorators', metadata.propDecorators);
21817
- return importExpr(Identifiers$1.declareClassMetadata).callFn([definitionMap.toLiteralMap()]);
21822
+ return importExpr(Identifiers.declareClassMetadata).callFn([definitionMap.toLiteralMap()]);
21818
21823
  }
21819
21824
 
21820
21825
  /**
@@ -21914,7 +21919,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$5 = '12.0.0';
21914
21919
  */
21915
21920
  function compileDeclareDirectiveFromMetadata(meta) {
21916
21921
  const definitionMap = createDirectiveDefinitionMap(meta);
21917
- const expression = importExpr(Identifiers$1.declareDirective).callFn([definitionMap.toLiteralMap()]);
21922
+ const expression = importExpr(Identifiers.declareDirective).callFn([definitionMap.toLiteralMap()]);
21918
21923
  const type = createDirectiveType(meta);
21919
21924
  return { expression, type, statements: [] };
21920
21925
  }
@@ -21925,7 +21930,7 @@ function compileDeclareDirectiveFromMetadata(meta) {
21925
21930
  function createDirectiveDefinitionMap(meta) {
21926
21931
  const definitionMap = new DefinitionMap();
21927
21932
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
21928
- definitionMap.set('version', literal('14.0.0-next.0'));
21933
+ definitionMap.set('version', literal('14.0.0-next.11'));
21929
21934
  // e.g. `type: MyDirective`
21930
21935
  definitionMap.set('type', meta.internalType);
21931
21936
  // e.g. `selector: 'some-dir'`
@@ -21951,7 +21956,7 @@ function createDirectiveDefinitionMap(meta) {
21951
21956
  if (meta.lifecycle.usesOnChanges) {
21952
21957
  definitionMap.set('usesOnChanges', literal(true));
21953
21958
  }
21954
- definitionMap.set('ngImport', importExpr(Identifiers$1.core));
21959
+ definitionMap.set('ngImport', importExpr(Identifiers.core));
21955
21960
  return definitionMap;
21956
21961
  }
21957
21962
  /**
@@ -22018,7 +22023,7 @@ function compileHostMetadata(meta) {
22018
22023
  */
22019
22024
  function compileDeclareComponentFromMetadata(meta, template, additionalTemplateInfo) {
22020
22025
  const definitionMap = createComponentDefinitionMap(meta, template, additionalTemplateInfo);
22021
- const expression = importExpr(Identifiers$1.declareComponent).callFn([definitionMap.toLiteralMap()]);
22026
+ const expression = importExpr(Identifiers.declareComponent).callFn([definitionMap.toLiteralMap()]);
22022
22027
  const type = createComponentType(meta);
22023
22028
  return { expression, type, statements: [] };
22024
22029
  }
@@ -22038,11 +22043,11 @@ function createComponentDefinitionMap(meta, template, templateInfo) {
22038
22043
  definitionMap.set('viewProviders', meta.viewProviders);
22039
22044
  definitionMap.set('animations', meta.animations);
22040
22045
  if (meta.changeDetection !== undefined) {
22041
- definitionMap.set('changeDetection', importExpr(Identifiers$1.ChangeDetectionStrategy)
22046
+ definitionMap.set('changeDetection', importExpr(Identifiers.ChangeDetectionStrategy)
22042
22047
  .prop(ChangeDetectionStrategy[meta.changeDetection]));
22043
22048
  }
22044
22049
  if (meta.encapsulation !== ViewEncapsulation.Emulated) {
22045
- definitionMap.set('encapsulation', importExpr(Identifiers$1.ViewEncapsulation).prop(ViewEncapsulation[meta.encapsulation]));
22050
+ definitionMap.set('encapsulation', importExpr(Identifiers.ViewEncapsulation).prop(ViewEncapsulation[meta.encapsulation]));
22046
22051
  }
22047
22052
  if (meta.interpolation !== DEFAULT_INTERPOLATION_CONFIG) {
22048
22053
  definitionMap.set('interpolation', literalArr([literal(meta.interpolation.start), literal(meta.interpolation.end)]));
@@ -22146,13 +22151,13 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
22146
22151
  function compileDeclareFactoryFunction(meta) {
22147
22152
  const definitionMap = new DefinitionMap();
22148
22153
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
22149
- definitionMap.set('version', literal('14.0.0-next.0'));
22150
- definitionMap.set('ngImport', importExpr(Identifiers$1.core));
22154
+ definitionMap.set('version', literal('14.0.0-next.11'));
22155
+ definitionMap.set('ngImport', importExpr(Identifiers.core));
22151
22156
  definitionMap.set('type', meta.internalType);
22152
22157
  definitionMap.set('deps', compileDependencies(meta.deps));
22153
- definitionMap.set('target', importExpr(Identifiers$1.FactoryTarget).prop(FactoryTarget$1[meta.target]));
22158
+ definitionMap.set('target', importExpr(Identifiers.FactoryTarget).prop(FactoryTarget$1[meta.target]));
22154
22159
  return {
22155
- expression: importExpr(Identifiers$1.declareFactory).callFn([definitionMap.toLiteralMap()]),
22160
+ expression: importExpr(Identifiers.declareFactory).callFn([definitionMap.toLiteralMap()]),
22156
22161
  statements: [],
22157
22162
  type: createFactoryType(meta),
22158
22163
  };
@@ -22178,7 +22183,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$3 = '12.0.0';
22178
22183
  */
22179
22184
  function compileDeclareInjectableFromMetadata(meta) {
22180
22185
  const definitionMap = createInjectableDefinitionMap(meta);
22181
- const expression = importExpr(Identifiers$1.declareInjectable).callFn([definitionMap.toLiteralMap()]);
22186
+ const expression = importExpr(Identifiers.declareInjectable).callFn([definitionMap.toLiteralMap()]);
22182
22187
  const type = createInjectableType(meta);
22183
22188
  return { expression, type, statements: [] };
22184
22189
  }
@@ -22188,8 +22193,8 @@ function compileDeclareInjectableFromMetadata(meta) {
22188
22193
  function createInjectableDefinitionMap(meta) {
22189
22194
  const definitionMap = new DefinitionMap();
22190
22195
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
22191
- definitionMap.set('version', literal('14.0.0-next.0'));
22192
- definitionMap.set('ngImport', importExpr(Identifiers$1.core));
22196
+ definitionMap.set('version', literal('14.0.0-next.11'));
22197
+ definitionMap.set('ngImport', importExpr(Identifiers.core));
22193
22198
  definitionMap.set('type', meta.internalType);
22194
22199
  // Only generate providedIn property if it has a non-null value
22195
22200
  if (meta.providedIn !== undefined) {
@@ -22236,7 +22241,7 @@ function createInjectableDefinitionMap(meta) {
22236
22241
  const MINIMUM_PARTIAL_LINKER_VERSION$2 = '12.0.0';
22237
22242
  function compileDeclareInjectorFromMetadata(meta) {
22238
22243
  const definitionMap = createInjectorDefinitionMap(meta);
22239
- const expression = importExpr(Identifiers$1.declareInjector).callFn([definitionMap.toLiteralMap()]);
22244
+ const expression = importExpr(Identifiers.declareInjector).callFn([definitionMap.toLiteralMap()]);
22240
22245
  const type = createInjectorType(meta);
22241
22246
  return { expression, type, statements: [] };
22242
22247
  }
@@ -22246,8 +22251,8 @@ function compileDeclareInjectorFromMetadata(meta) {
22246
22251
  function createInjectorDefinitionMap(meta) {
22247
22252
  const definitionMap = new DefinitionMap();
22248
22253
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
22249
- definitionMap.set('version', literal('14.0.0-next.0'));
22250
- definitionMap.set('ngImport', importExpr(Identifiers$1.core));
22254
+ definitionMap.set('version', literal('14.0.0-next.11'));
22255
+ definitionMap.set('ngImport', importExpr(Identifiers.core));
22251
22256
  definitionMap.set('type', meta.internalType);
22252
22257
  definitionMap.set('providers', meta.providers);
22253
22258
  if (meta.imports.length > 0) {
@@ -22273,7 +22278,7 @@ function createInjectorDefinitionMap(meta) {
22273
22278
  const MINIMUM_PARTIAL_LINKER_VERSION$1 = '12.0.0';
22274
22279
  function compileDeclareNgModuleFromMetadata(meta) {
22275
22280
  const definitionMap = createNgModuleDefinitionMap(meta);
22276
- const expression = importExpr(Identifiers$1.declareNgModule).callFn([definitionMap.toLiteralMap()]);
22281
+ const expression = importExpr(Identifiers.declareNgModule).callFn([definitionMap.toLiteralMap()]);
22277
22282
  const type = createNgModuleType(meta);
22278
22283
  return { expression, type, statements: [] };
22279
22284
  }
@@ -22283,8 +22288,8 @@ function compileDeclareNgModuleFromMetadata(meta) {
22283
22288
  function createNgModuleDefinitionMap(meta) {
22284
22289
  const definitionMap = new DefinitionMap();
22285
22290
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
22286
- definitionMap.set('version', literal('14.0.0-next.0'));
22287
- definitionMap.set('ngImport', importExpr(Identifiers$1.core));
22291
+ definitionMap.set('version', literal('14.0.0-next.11'));
22292
+ definitionMap.set('ngImport', importExpr(Identifiers.core));
22288
22293
  definitionMap.set('type', meta.internalType);
22289
22294
  // We only generate the keys in the metadata if the arrays contain values.
22290
22295
  // We must wrap the arrays inside a function if any of the values are a forward reference to a
@@ -22331,7 +22336,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION = '12.0.0';
22331
22336
  */
22332
22337
  function compileDeclarePipeFromMetadata(meta) {
22333
22338
  const definitionMap = createPipeDefinitionMap(meta);
22334
- const expression = importExpr(Identifiers$1.declarePipe).callFn([definitionMap.toLiteralMap()]);
22339
+ const expression = importExpr(Identifiers.declarePipe).callFn([definitionMap.toLiteralMap()]);
22335
22340
  const type = createPipeType(meta);
22336
22341
  return { expression, type, statements: [] };
22337
22342
  }
@@ -22341,8 +22346,8 @@ function compileDeclarePipeFromMetadata(meta) {
22341
22346
  function createPipeDefinitionMap(meta) {
22342
22347
  const definitionMap = new DefinitionMap();
22343
22348
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
22344
- definitionMap.set('version', literal('14.0.0-next.0'));
22345
- definitionMap.set('ngImport', importExpr(Identifiers$1.core));
22349
+ definitionMap.set('version', literal('14.0.0-next.11'));
22350
+ definitionMap.set('ngImport', importExpr(Identifiers.core));
22346
22351
  // e.g. `type: MyPipe`
22347
22352
  definitionMap.set('type', meta.internalType);
22348
22353
  // e.g. `name: "myPipe"`
@@ -22391,5 +22396,5 @@ publishFacade(_global);
22391
22396
  * found in the LICENSE file at https://angular.io/license
22392
22397
  */
22393
22398
 
22394
- 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, Identifiers, 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, Quote, R3BoundTarget, Identifiers$1 as R3Identifiers, 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 };
22399
+ 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 };
22395
22400
  //# sourceMappingURL=compiler.mjs.map