@angular/core 14.0.0-next.3 → 14.0.0-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/core.d.ts +59 -15
  2. package/esm2020/src/application_init.mjs +4 -3
  3. package/esm2020/src/application_module.mjs +5 -95
  4. package/esm2020/src/application_ref.mjs +4 -3
  5. package/esm2020/src/application_tokens.mjs +5 -2
  6. package/esm2020/src/core_render3_private_export.mjs +2 -1
  7. package/esm2020/src/debug/debug_node.mjs +11 -10
  8. package/esm2020/src/i18n/tokens.mjs +39 -3
  9. package/esm2020/src/linker/compiler.mjs +4 -3
  10. package/esm2020/src/linker/template_ref.mjs +3 -3
  11. package/esm2020/src/linker/view_container_ref.mjs +12 -3
  12. package/esm2020/src/render3/component.mjs +3 -3
  13. package/esm2020/src/render3/component_ref.mjs +22 -26
  14. package/esm2020/src/render3/context_discovery.mjs +34 -30
  15. package/esm2020/src/render3/di.mjs +177 -97
  16. package/esm2020/src/render3/hooks.mjs +3 -3
  17. package/esm2020/src/render3/instructions/lview_debug.mjs +6 -3
  18. package/esm2020/src/render3/instructions/shared.mjs +16 -7
  19. package/esm2020/src/render3/interfaces/context.mjs +35 -2
  20. package/esm2020/src/render3/interfaces/injector.mjs +1 -1
  21. package/esm2020/src/render3/interfaces/lview_tracking.mjs +33 -0
  22. package/esm2020/src/render3/interfaces/renderer_dom.mjs +1 -1
  23. package/esm2020/src/render3/interfaces/view.mjs +4 -2
  24. package/esm2020/src/render3/node_manipulation.mjs +12 -3
  25. package/esm2020/src/render3/util/discovery_utils.mjs +33 -22
  26. package/esm2020/src/version.mjs +1 -1
  27. package/esm2020/testing/src/fake_async.mjs +3 -2
  28. package/esm2020/testing/src/logger.mjs +3 -3
  29. package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
  30. package/fesm2015/core.mjs +442 -297
  31. package/fesm2015/core.mjs.map +1 -1
  32. package/fesm2015/testing.mjs +3 -2
  33. package/fesm2015/testing.mjs.map +1 -1
  34. package/fesm2020/core.mjs +442 -290
  35. package/fesm2020/core.mjs.map +1 -1
  36. package/fesm2020/testing.mjs +3 -2
  37. package/fesm2020/testing.mjs.map +1 -1
  38. package/package.json +2 -2
  39. package/schematics/migrations/entry-components/util.js +2 -2
  40. package/schematics/migrations/typed-forms/index.d.ts +1 -5
  41. package/schematics/migrations/typed-forms/index.js +12 -34
  42. package/schematics/migrations/typed-forms/util.d.ts +6 -9
  43. package/schematics/migrations/typed-forms/util.js +63 -40
  44. package/schematics/utils/import_manager.js +13 -12
  45. package/schematics/utils/typescript/imports.js +6 -5
  46. package/schematics/utils/typescript/parse_tsconfig.js +6 -2
  47. package/schematics/utils/typescript/symbol.js +4 -3
  48. package/testing/testing.d.ts +3 -2
package/fesm2015/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.0-next.3
2
+ * @license Angular v14.0.0-next.6
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1210,6 +1210,8 @@ const DECLARATION_COMPONENT_VIEW = 16;
1210
1210
  const DECLARATION_LCONTAINER = 17;
1211
1211
  const PREORDER_HOOK_FLAGS = 18;
1212
1212
  const QUERIES = 19;
1213
+ const ID = 20;
1214
+ const EMBEDDED_VIEW_INJECTOR = 21;
1213
1215
  /**
1214
1216
  * Size of LView's header. Necessary to adjust for it when setting slots.
1215
1217
  *
@@ -1217,7 +1219,7 @@ const QUERIES = 19;
1217
1219
  * instruction index into `LView` index. All other indexes should be in the `LView` index space and
1218
1220
  * there should be no need to refer to `HEADER_OFFSET` anywhere else.
1219
1221
  */
1220
- const HEADER_OFFSET = 20;
1222
+ const HEADER_OFFSET = 22;
1221
1223
  /**
1222
1224
  * Converts `TViewType` into human readable text.
1223
1225
  * Make sure this matches with `TViewType`
@@ -2467,7 +2469,7 @@ function incrementInitPhaseFlags(lView, initPhase) {
2467
2469
  assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');
2468
2470
  let flags = lView[FLAGS];
2469
2471
  if ((flags & 3 /* InitPhaseStateMask */) === initPhase) {
2470
- flags &= 2047 /* IndexWithinInitPhaseReset */;
2472
+ flags &= 4095 /* IndexWithinInitPhaseReset */;
2471
2473
  flags += 1 /* InitPhaseStateIncrementer */;
2472
2474
  lView[FLAGS] = flags;
2473
2475
  }
@@ -2531,12 +2533,12 @@ function callHook(currentView, initPhase, arr, i) {
2531
2533
  const directiveIndex = isInitHook ? -arr[i] : arr[i];
2532
2534
  const directive = currentView[directiveIndex];
2533
2535
  if (isInitHook) {
2534
- const indexWithintInitPhase = currentView[FLAGS] >> 11 /* IndexWithinInitPhaseShift */;
2536
+ const indexWithintInitPhase = currentView[FLAGS] >> 12 /* IndexWithinInitPhaseShift */;
2535
2537
  // The init phase state must be always checked here as it may have been recursively updated.
2536
2538
  if (indexWithintInitPhase <
2537
2539
  (currentView[PREORDER_HOOK_FLAGS] >> 16 /* NumberOfInitHooksCalledShift */) &&
2538
2540
  (currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {
2539
- currentView[FLAGS] += 2048 /* IndexWithinInitPhaseIncrementer */;
2541
+ currentView[FLAGS] += 4096 /* IndexWithinInitPhaseIncrementer */;
2540
2542
  profiler(4 /* LifecycleHookStart */, directive, hook);
2541
2543
  try {
2542
2544
  hook.call(directive);
@@ -3097,6 +3099,8 @@ const BLOOM_MASK = BLOOM_SIZE - 1;
3097
3099
  const BLOOM_BUCKET_BITS = 5;
3098
3100
  /** Counter used to generate unique IDs for directives. */
3099
3101
  let nextNgElementId = 0;
3102
+ /** Value used when something wasn't found by an injector. */
3103
+ const NOT_FOUND = {};
3100
3104
  /**
3101
3105
  * Registers this directive as present in its node's injector by flipping the directive's
3102
3106
  * corresponding bit in the injector's bloom filter.
@@ -3208,23 +3212,7 @@ function getParentInjectorLocation(tNode, lView) {
3208
3212
  // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent
3209
3213
  // `NodeInjector`.
3210
3214
  while (lViewCursor !== null) {
3211
- // First determine the `parentTNode` location. The parent pointer differs based on `TView.type`.
3212
- const tView = lViewCursor[TVIEW];
3213
- const tViewType = tView.type;
3214
- if (tViewType === 2 /* Embedded */) {
3215
- ngDevMode &&
3216
- assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');
3217
- parentTNode = tView.declTNode;
3218
- }
3219
- else if (tViewType === 1 /* Component */) {
3220
- // Components don't have `TView.declTNode` because each instance of component could be
3221
- // inserted in different location, hence `TView.declTNode` is meaningless.
3222
- parentTNode = lViewCursor[T_HOST];
3223
- }
3224
- else {
3225
- ngDevMode && assertEqual(tView.type, 0 /* Root */, 'Root type expected');
3226
- parentTNode = null;
3227
- }
3215
+ parentTNode = getTNodeFromLView(lViewCursor);
3228
3216
  if (parentTNode === null) {
3229
3217
  // If we have no parent, than we are done.
3230
3218
  return NO_PARENT_INJECTOR;
@@ -3385,93 +3373,116 @@ function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {
3385
3373
  */
3386
3374
  function getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) {
3387
3375
  if (tNode !== null) {
3388
- const bloomHash = bloomHashBitOrFactory(token);
3389
- // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef
3390
- // so just call the factory function to create it.
3391
- if (typeof bloomHash === 'function') {
3392
- if (!enterDI(lView, tNode, flags)) {
3393
- // Failed to enter DI, try module injector instead. If a token is injected with the @Host
3394
- // flag, the module injector is not searched for that token in Ivy.
3395
- return (flags & InjectFlags.Host) ?
3396
- notFoundValueOrThrow(notFoundValue, token, flags) :
3397
- lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
3376
+ // If the view or any of its ancestors have an embedded
3377
+ // view injector, we have to look it up there first.
3378
+ if (lView[FLAGS] & 2048 /* HasEmbeddedViewInjector */) {
3379
+ const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);
3380
+ if (embeddedInjectorValue !== NOT_FOUND) {
3381
+ return embeddedInjectorValue;
3398
3382
  }
3399
- try {
3400
- const value = bloomHash(flags);
3401
- if (value == null && !(flags & InjectFlags.Optional)) {
3402
- throwProviderNotFoundError(token);
3403
- }
3404
- else {
3405
- return value;
3406
- }
3383
+ }
3384
+ // Otherwise try the node injector.
3385
+ const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);
3386
+ if (value !== NOT_FOUND) {
3387
+ return value;
3388
+ }
3389
+ }
3390
+ // Finally, fall back to the module injector.
3391
+ return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
3392
+ }
3393
+ /**
3394
+ * Returns the value associated to the given token from the node injector.
3395
+ *
3396
+ * @param tNode The Node where the search for the injector should start
3397
+ * @param lView The `LView` that contains the `tNode`
3398
+ * @param token The token to look for
3399
+ * @param flags Injection flags
3400
+ * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`
3401
+ * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided
3402
+ */
3403
+ function lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {
3404
+ const bloomHash = bloomHashBitOrFactory(token);
3405
+ // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef
3406
+ // so just call the factory function to create it.
3407
+ if (typeof bloomHash === 'function') {
3408
+ if (!enterDI(lView, tNode, flags)) {
3409
+ // Failed to enter DI, try module injector instead. If a token is injected with the @Host
3410
+ // flag, the module injector is not searched for that token in Ivy.
3411
+ return (flags & InjectFlags.Host) ?
3412
+ notFoundValueOrThrow(notFoundValue, token, flags) :
3413
+ lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
3414
+ }
3415
+ try {
3416
+ const value = bloomHash(flags);
3417
+ if (value == null && !(flags & InjectFlags.Optional)) {
3418
+ throwProviderNotFoundError(token);
3407
3419
  }
3408
- finally {
3409
- leaveDI();
3410
- }
3411
- }
3412
- else if (typeof bloomHash === 'number') {
3413
- // A reference to the previous injector TView that was found while climbing the element
3414
- // injector tree. This is used to know if viewProviders can be accessed on the current
3415
- // injector.
3416
- let previousTView = null;
3417
- let injectorIndex = getInjectorIndex(tNode, lView);
3418
- let parentLocation = NO_PARENT_INJECTOR;
3419
- let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;
3420
- // If we should skip this injector, or if there is no injector on this node, start by
3421
- // searching the parent injector.
3422
- if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
3423
- parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :
3424
- lView[injectorIndex + 8 /* PARENT */];
3425
- if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {
3426
- injectorIndex = -1;
3427
- }
3428
- else {
3429
- previousTView = lView[TVIEW];
3430
- injectorIndex = getParentInjectorIndex(parentLocation);
3431
- lView = getParentInjectorView(parentLocation, lView);
3432
- }
3420
+ else {
3421
+ return value;
3433
3422
  }
3434
- // Traverse up the injector tree until we find a potential match or until we know there
3435
- // *isn't* a match.
3436
- while (injectorIndex !== -1) {
3437
- ngDevMode && assertNodeInjector(lView, injectorIndex);
3438
- // Check the current injector. If it matches, see if it contains token.
3439
- const tView = lView[TVIEW];
3440
- ngDevMode &&
3441
- assertTNodeForLView(tView.data[injectorIndex + 8 /* TNODE */], lView);
3442
- if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {
3443
- // At this point, we have an injector which *may* contain the token, so we step through
3444
- // the providers and directives associated with the injector's corresponding node to get
3445
- // the instance.
3446
- const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);
3447
- if (instance !== NOT_FOUND) {
3448
- return instance;
3449
- }
3450
- }
3451
- parentLocation = lView[injectorIndex + 8 /* PARENT */];
3452
- if (parentLocation !== NO_PARENT_INJECTOR &&
3453
- shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* TNODE */] === hostTElementNode) &&
3454
- bloomHasToken(bloomHash, injectorIndex, lView)) {
3455
- // The def wasn't found anywhere on this node, so it was a false positive.
3456
- // Traverse up the tree and continue searching.
3457
- previousTView = tView;
3458
- injectorIndex = getParentInjectorIndex(parentLocation);
3459
- lView = getParentInjectorView(parentLocation, lView);
3460
- }
3461
- else {
3462
- // If we should not search parent OR If the ancestor bloom filter value does not have the
3463
- // bit corresponding to the directive we can give up on traversing up to find the specific
3464
- // injector.
3465
- injectorIndex = -1;
3423
+ }
3424
+ finally {
3425
+ leaveDI();
3426
+ }
3427
+ }
3428
+ else if (typeof bloomHash === 'number') {
3429
+ // A reference to the previous injector TView that was found while climbing the element
3430
+ // injector tree. This is used to know if viewProviders can be accessed on the current
3431
+ // injector.
3432
+ let previousTView = null;
3433
+ let injectorIndex = getInjectorIndex(tNode, lView);
3434
+ let parentLocation = NO_PARENT_INJECTOR;
3435
+ let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;
3436
+ // If we should skip this injector, or if there is no injector on this node, start by
3437
+ // searching the parent injector.
3438
+ if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
3439
+ parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :
3440
+ lView[injectorIndex + 8 /* PARENT */];
3441
+ if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {
3442
+ injectorIndex = -1;
3443
+ }
3444
+ else {
3445
+ previousTView = lView[TVIEW];
3446
+ injectorIndex = getParentInjectorIndex(parentLocation);
3447
+ lView = getParentInjectorView(parentLocation, lView);
3448
+ }
3449
+ }
3450
+ // Traverse up the injector tree until we find a potential match or until we know there
3451
+ // *isn't* a match.
3452
+ while (injectorIndex !== -1) {
3453
+ ngDevMode && assertNodeInjector(lView, injectorIndex);
3454
+ // Check the current injector. If it matches, see if it contains token.
3455
+ const tView = lView[TVIEW];
3456
+ ngDevMode &&
3457
+ assertTNodeForLView(tView.data[injectorIndex + 8 /* TNODE */], lView);
3458
+ if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {
3459
+ // At this point, we have an injector which *may* contain the token, so we step through
3460
+ // the providers and directives associated with the injector's corresponding node to get
3461
+ // the instance.
3462
+ const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);
3463
+ if (instance !== NOT_FOUND) {
3464
+ return instance;
3466
3465
  }
3467
3466
  }
3467
+ parentLocation = lView[injectorIndex + 8 /* PARENT */];
3468
+ if (parentLocation !== NO_PARENT_INJECTOR &&
3469
+ shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* TNODE */] === hostTElementNode) &&
3470
+ bloomHasToken(bloomHash, injectorIndex, lView)) {
3471
+ // The def wasn't found anywhere on this node, so it was a false positive.
3472
+ // Traverse up the tree and continue searching.
3473
+ previousTView = tView;
3474
+ injectorIndex = getParentInjectorIndex(parentLocation);
3475
+ lView = getParentInjectorView(parentLocation, lView);
3476
+ }
3477
+ else {
3478
+ // If we should not search parent OR If the ancestor bloom filter value does not have the
3479
+ // bit corresponding to the directive we can give up on traversing up to find the specific
3480
+ // injector.
3481
+ injectorIndex = -1;
3482
+ }
3468
3483
  }
3469
3484
  }
3470
- return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
3471
- }
3472
- const NOT_FOUND = {};
3473
- function createNodeInjector() {
3474
- return new NodeInjector(getCurrentTNode(), getLView());
3485
+ return notFoundValue;
3475
3486
  }
3476
3487
  function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {
3477
3488
  const currentTView = lView[TVIEW];
@@ -3645,6 +3656,10 @@ class NodeInjector {
3645
3656
  return getOrCreateInjectable(this._tNode, this._lView, token, flags, notFoundValue);
3646
3657
  }
3647
3658
  }
3659
+ /** Creates a `NodeInjector` for the current node. */
3660
+ function createNodeInjector() {
3661
+ return new NodeInjector(getCurrentTNode(), getLView());
3662
+ }
3648
3663
  /**
3649
3664
  * @codeGenApi
3650
3665
  */
@@ -3683,6 +3698,73 @@ function getFactoryOf(type) {
3683
3698
  }
3684
3699
  return getFactoryDef(type);
3685
3700
  }
3701
+ /**
3702
+ * Returns a value from the closest embedded or node injector.
3703
+ *
3704
+ * @param tNode The Node where the search for the injector should start
3705
+ * @param lView The `LView` that contains the `tNode`
3706
+ * @param token The token to look for
3707
+ * @param flags Injection flags
3708
+ * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`
3709
+ * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided
3710
+ */
3711
+ function lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {
3712
+ let currentTNode = tNode;
3713
+ let currentLView = lView;
3714
+ // When an LView with an embedded view injector is inserted, it'll likely be interlaced with
3715
+ // nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).
3716
+ // Since the bloom filters for the node injectors have already been constructed and we don't
3717
+ // have a way of extracting the records from an injector, the only way to maintain the correct
3718
+ // hierarchy when resolving the value is to walk it node-by-node while attempting to resolve
3719
+ // the token at each level.
3720
+ while (currentTNode !== null && currentLView !== null &&
3721
+ (currentLView[FLAGS] & 2048 /* HasEmbeddedViewInjector */) &&
3722
+ !(currentLView[FLAGS] & 512 /* IsRoot */)) {
3723
+ ngDevMode && assertTNodeForLView(currentTNode, currentLView);
3724
+ // Note that this lookup on the node injector is using the `Self` flag, because
3725
+ // we don't want the node injector to look at any parent injectors since we
3726
+ // may hit the embedded view injector first.
3727
+ const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | InjectFlags.Self, NOT_FOUND);
3728
+ if (nodeInjectorValue !== NOT_FOUND) {
3729
+ return nodeInjectorValue;
3730
+ }
3731
+ // Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191
3732
+ let parentTNode = currentTNode.parent;
3733
+ // `TNode.parent` includes the parent within the current view only. If it doesn't exist,
3734
+ // it means that we've hit the view boundary and we need to go up to the next view.
3735
+ if (!parentTNode) {
3736
+ // Before we go to the next LView, check if the token exists on the current embedded injector.
3737
+ const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];
3738
+ if (embeddedViewInjector) {
3739
+ const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);
3740
+ if (embeddedViewInjectorValue !== NOT_FOUND) {
3741
+ return embeddedViewInjectorValue;
3742
+ }
3743
+ }
3744
+ // Otherwise keep going up the tree.
3745
+ parentTNode = getTNodeFromLView(currentLView);
3746
+ currentLView = currentLView[DECLARATION_VIEW];
3747
+ }
3748
+ currentTNode = parentTNode;
3749
+ }
3750
+ return notFoundValue;
3751
+ }
3752
+ /** Gets the TNode associated with an LView inside of the declaration view. */
3753
+ function getTNodeFromLView(lView) {
3754
+ const tView = lView[TVIEW];
3755
+ const tViewType = tView.type;
3756
+ // The parent pointer differs based on `TView.type`.
3757
+ if (tViewType === 2 /* Embedded */) {
3758
+ ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');
3759
+ return tView.declTNode;
3760
+ }
3761
+ else if (tViewType === 1 /* Component */) {
3762
+ // Components don't have `TView.declTNode` because each instance of component could be
3763
+ // inserted in different location, hence `TView.declTNode` is meaningless.
3764
+ return lView[T_HOST];
3765
+ }
3766
+ return null;
3767
+ }
3686
3768
 
3687
3769
  /**
3688
3770
  * @license
@@ -6155,6 +6237,78 @@ function getSanitizer() {
6155
6237
  return lView && lView[SANITIZER];
6156
6238
  }
6157
6239
 
6240
+ /**
6241
+ * @license
6242
+ * Copyright Google LLC All Rights Reserved.
6243
+ *
6244
+ * Use of this source code is governed by an MIT-style license that can be
6245
+ * found in the LICENSE file at https://angular.io/license
6246
+ */
6247
+ // Keeps track of the currently-active LViews.
6248
+ const TRACKED_LVIEWS = new Map();
6249
+ // Used for generating unique IDs for LViews.
6250
+ let uniqueIdCounter = 0;
6251
+ /** Gets a unique ID that can be assigned to an LView. */
6252
+ function getUniqueLViewId() {
6253
+ return uniqueIdCounter++;
6254
+ }
6255
+ /** Starts tracking an LView. */
6256
+ function registerLView(lView) {
6257
+ ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');
6258
+ TRACKED_LVIEWS.set(lView[ID], lView);
6259
+ }
6260
+ /** Gets an LView by its unique ID. */
6261
+ function getLViewById(id) {
6262
+ ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');
6263
+ return TRACKED_LVIEWS.get(id) || null;
6264
+ }
6265
+ /** Stops tracking an LView. */
6266
+ function unregisterLView(lView) {
6267
+ ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');
6268
+ TRACKED_LVIEWS.delete(lView[ID]);
6269
+ }
6270
+
6271
+ /**
6272
+ * @license
6273
+ * Copyright Google LLC All Rights Reserved.
6274
+ *
6275
+ * Use of this source code is governed by an MIT-style license that can be
6276
+ * found in the LICENSE file at https://angular.io/license
6277
+ */
6278
+ /**
6279
+ * The internal view context which is specific to a given DOM element, directive or
6280
+ * component instance. Each value in here (besides the LView and element node details)
6281
+ * can be present, null or undefined. If undefined then it implies the value has not been
6282
+ * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
6283
+ *
6284
+ * Each value will get filled when the respective value is examined within the getContext
6285
+ * function. The component, element and each directive instance will share the same instance
6286
+ * of the context.
6287
+ */
6288
+ class LContext {
6289
+ constructor(
6290
+ /**
6291
+ * ID of the component's parent view data.
6292
+ */
6293
+ lViewId,
6294
+ /**
6295
+ * The index instance of the node.
6296
+ */
6297
+ nodeIndex,
6298
+ /**
6299
+ * The instance of the DOM node that is attached to the lNode.
6300
+ */
6301
+ native) {
6302
+ this.lViewId = lViewId;
6303
+ this.nodeIndex = nodeIndex;
6304
+ this.native = native;
6305
+ }
6306
+ /** Component's parent view data. */
6307
+ get lView() {
6308
+ return getLViewById(this.lViewId);
6309
+ }
6310
+ }
6311
+
6158
6312
  /**
6159
6313
  * @license
6160
6314
  * Copyright Google LLC All Rights Reserved.
@@ -6187,7 +6341,7 @@ function getLContext(target) {
6187
6341
  if (mpValue) {
6188
6342
  // only when it's an array is it considered an LView instance
6189
6343
  // ... otherwise it's an already constructed LContext instance
6190
- if (Array.isArray(mpValue)) {
6344
+ if (isLView(mpValue)) {
6191
6345
  const lView = mpValue;
6192
6346
  let nodeIndex;
6193
6347
  let component = undefined;
@@ -6246,13 +6400,7 @@ function getLContext(target) {
6246
6400
  while (parent = parent.parentNode) {
6247
6401
  const parentContext = readPatchedData(parent);
6248
6402
  if (parentContext) {
6249
- let lView;
6250
- if (Array.isArray(parentContext)) {
6251
- lView = parentContext;
6252
- }
6253
- else {
6254
- lView = parentContext.lView;
6255
- }
6403
+ const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;
6256
6404
  // the edge of the app was also reached here through another means
6257
6405
  // (maybe because the DOM was changed manually).
6258
6406
  if (!lView) {
@@ -6275,14 +6423,7 @@ function getLContext(target) {
6275
6423
  * Creates an empty instance of a `LContext` context
6276
6424
  */
6277
6425
  function createLContext(lView, nodeIndex, native) {
6278
- return {
6279
- lView,
6280
- nodeIndex,
6281
- native,
6282
- component: undefined,
6283
- directives: undefined,
6284
- localRefs: undefined,
6285
- };
6426
+ return new LContext(lView[ID], nodeIndex, native);
6286
6427
  }
6287
6428
  /**
6288
6429
  * Takes a component instance and returns the view for that component.
@@ -6291,21 +6432,24 @@ function createLContext(lView, nodeIndex, native) {
6291
6432
  * @returns The component's view
6292
6433
  */
6293
6434
  function getComponentViewByInstance(componentInstance) {
6294
- let lView = readPatchedData(componentInstance);
6295
- let view;
6296
- if (Array.isArray(lView)) {
6297
- const nodeIndex = findViaComponent(lView, componentInstance);
6298
- view = getComponentLViewByIndex(nodeIndex, lView);
6299
- const context = createLContext(lView, nodeIndex, view[HOST]);
6435
+ let patchedData = readPatchedData(componentInstance);
6436
+ let lView;
6437
+ if (isLView(patchedData)) {
6438
+ const contextLView = patchedData;
6439
+ const nodeIndex = findViaComponent(contextLView, componentInstance);
6440
+ lView = getComponentLViewByIndex(nodeIndex, contextLView);
6441
+ const context = createLContext(contextLView, nodeIndex, lView[HOST]);
6300
6442
  context.component = componentInstance;
6301
6443
  attachPatchData(componentInstance, context);
6302
6444
  attachPatchData(context.native, context);
6303
6445
  }
6304
6446
  else {
6305
- const context = lView;
6306
- view = getComponentLViewByIndex(context.nodeIndex, context.lView);
6447
+ const context = patchedData;
6448
+ const contextLView = context.lView;
6449
+ ngDevMode && assertLView(contextLView);
6450
+ lView = getComponentLViewByIndex(context.nodeIndex, contextLView);
6307
6451
  }
6308
- return view;
6452
+ return lView;
6309
6453
  }
6310
6454
  /**
6311
6455
  * This property will be monkey-patched on elements, components and directives.
@@ -6317,7 +6461,16 @@ const MONKEY_PATCH_KEY_NAME = '__ngContext__';
6317
6461
  */
6318
6462
  function attachPatchData(target, data) {
6319
6463
  ngDevMode && assertDefined(target, 'Target expected');
6320
- target[MONKEY_PATCH_KEY_NAME] = data;
6464
+ // Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this
6465
+ // for `LView`, because we have control over when an `LView` is created and destroyed, whereas
6466
+ // we can't know when to remove an `LContext`.
6467
+ if (isLView(data)) {
6468
+ target[MONKEY_PATCH_KEY_NAME] = data[ID];
6469
+ registerLView(data);
6470
+ }
6471
+ else {
6472
+ target[MONKEY_PATCH_KEY_NAME] = data;
6473
+ }
6321
6474
  }
6322
6475
  /**
6323
6476
  * Returns the monkey-patch value data present on the target (which could be
@@ -6325,12 +6478,13 @@ function attachPatchData(target, data) {
6325
6478
  */
6326
6479
  function readPatchedData(target) {
6327
6480
  ngDevMode && assertDefined(target, 'Target expected');
6328
- return target[MONKEY_PATCH_KEY_NAME] || null;
6481
+ const data = target[MONKEY_PATCH_KEY_NAME];
6482
+ return (typeof data === 'number') ? getLViewById(data) : data || null;
6329
6483
  }
6330
6484
  function readPatchedLView(target) {
6331
6485
  const value = readPatchedData(target);
6332
6486
  if (value) {
6333
- return Array.isArray(value) ? value : value.lView;
6487
+ return isLView(value) ? value : value.lView;
6334
6488
  }
6335
6489
  return null;
6336
6490
  }
@@ -7277,6 +7431,8 @@ function cleanUpView(tView, lView) {
7277
7431
  lQueries.detachView(tView);
7278
7432
  }
7279
7433
  }
7434
+ // Unregister the view once everything else has been cleaned up.
7435
+ unregisterLView(lView);
7280
7436
  }
7281
7437
  }
7282
7438
  /** Removes listeners and unsubscribes from output subscriptions */
@@ -7444,7 +7600,8 @@ function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {
7444
7600
  renderer.insertBefore(parent, child, beforeNode, isMove);
7445
7601
  }
7446
7602
  else {
7447
- parent.insertBefore(child, beforeNode, isMove);
7603
+ const targetParent = isTemplateNode(parent) ? parent.content : parent;
7604
+ targetParent.insertBefore(child, beforeNode, isMove);
7448
7605
  }
7449
7606
  }
7450
7607
  function nativeAppendChild(renderer, parent, child) {
@@ -7454,7 +7611,8 @@ function nativeAppendChild(renderer, parent, child) {
7454
7611
  renderer.appendChild(parent, child);
7455
7612
  }
7456
7613
  else {
7457
- parent.appendChild(child);
7614
+ const targetParent = isTemplateNode(parent) ? parent.content : parent;
7615
+ targetParent.appendChild(child);
7458
7616
  }
7459
7617
  }
7460
7618
  function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {
@@ -7474,6 +7632,10 @@ function nativeRemoveChild(renderer, parent, child, isHostElement) {
7474
7632
  parent.removeChild(child);
7475
7633
  }
7476
7634
  }
7635
+ /** Checks if an element is a `<template>` node. */
7636
+ function isTemplateNode(node) {
7637
+ return node.tagName === 'TEMPLATE' && node.content !== undefined;
7638
+ }
7477
7639
  /**
7478
7640
  * Returns a native parent of a given native node.
7479
7641
  */
@@ -8994,7 +9156,7 @@ class LViewDebug {
8994
9156
  attached: !!(flags & 128 /* Attached */),
8995
9157
  destroyed: !!(flags & 256 /* Destroyed */),
8996
9158
  isRoot: !!(flags & 512 /* IsRoot */),
8997
- indexWithinInitPhase: flags >> 11 /* IndexWithinInitPhaseShift */,
9159
+ indexWithinInitPhase: flags >> 12 /* IndexWithinInitPhaseShift */,
8998
9160
  };
8999
9161
  }
9000
9162
  get parent() {
@@ -9057,6 +9219,9 @@ class LViewDebug {
9057
9219
  get tHost() {
9058
9220
  return this._raw_lView[T_HOST];
9059
9221
  }
9222
+ get id() {
9223
+ return this._raw_lView[ID];
9224
+ }
9060
9225
  get decls() {
9061
9226
  return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);
9062
9227
  }
@@ -9286,10 +9451,14 @@ function renderChildComponents(hostLView, components) {
9286
9451
  renderComponent$1(hostLView, components[i]);
9287
9452
  }
9288
9453
  }
9289
- function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) {
9454
+ function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {
9290
9455
  const lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice();
9291
9456
  lView[HOST] = host;
9292
9457
  lView[FLAGS] = flags | 4 /* CreationMode */ | 128 /* Attached */ | 8 /* FirstLViewPass */;
9458
+ if (embeddedViewInjector !== null ||
9459
+ (parentLView && (parentLView[FLAGS] & 2048 /* HasEmbeddedViewInjector */))) {
9460
+ lView[FLAGS] |= 2048 /* HasEmbeddedViewInjector */;
9461
+ }
9293
9462
  resetPreOrderHookFlags(lView);
9294
9463
  ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);
9295
9464
  lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;
@@ -9301,6 +9470,8 @@ function createLView(parentLView, tView, context, flags, host, tHostNode, render
9301
9470
  lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null;
9302
9471
  lView[INJECTOR$1] = injector || parentLView && parentLView[INJECTOR$1] || null;
9303
9472
  lView[T_HOST] = tHostNode;
9473
+ lView[ID] = getUniqueLViewId();
9474
+ lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector;
9304
9475
  ngDevMode &&
9305
9476
  assertEqual(tView.type == 2 /* Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
9306
9477
  lView[DECLARATION_COMPONENT_VIEW] =
@@ -10309,7 +10480,6 @@ function instantiateAllDirectives(tView, lView, tNode, native) {
10309
10480
  function invokeDirectivesHostBindings(tView, lView, tNode) {
10310
10481
  const start = tNode.directiveStart;
10311
10482
  const end = tNode.directiveEnd;
10312
- const firstCreatePass = tView.firstCreatePass;
10313
10483
  const elementIndex = tNode.index;
10314
10484
  const currentDirectiveIndex = getCurrentDirectiveIndex();
10315
10485
  try {
@@ -10456,7 +10626,7 @@ function addComponentLogic(lView, hostTNode, def) {
10456
10626
  // Only component views should be added to the view tree directly. Embedded views are
10457
10627
  // accessed through their containers because they may be removed / re-added later.
10458
10628
  const rendererFactory = lView[RENDERER_FACTORY];
10459
- const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null));
10629
+ const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null, null));
10460
10630
  // Component view will always be created before any injected LContainers,
10461
10631
  // so this is a regular element, wrap it with the component view
10462
10632
  lView[hostTNode.index] = componentView;
@@ -10825,8 +10995,11 @@ function tickRootContext(rootContext) {
10825
10995
  for (let i = 0; i < rootContext.components.length; i++) {
10826
10996
  const rootComponent = rootContext.components[i];
10827
10997
  const lView = readPatchedLView(rootComponent);
10828
- const tView = lView[TVIEW];
10829
- renderComponentOrTemplate(tView, lView, tView.template, rootComponent);
10998
+ // We might not have an `LView` if the component was destroyed.
10999
+ if (lView !== null) {
11000
+ const tView = lView[TVIEW];
11001
+ renderComponentOrTemplate(tView, lView, tView.template, rootComponent);
11002
+ }
10830
11003
  }
10831
11004
  }
10832
11005
  function detectChangesInternal(tView, lView, context) {
@@ -11685,12 +11858,16 @@ Injector.__NG_ELEMENT_ID__ = -1 /* Injector */;
11685
11858
  * @globalApi ng
11686
11859
  */
11687
11860
  function getComponent$1(element) {
11688
- assertDomElement(element);
11861
+ ngDevMode && assertDomElement(element);
11689
11862
  const context = getLContext(element);
11690
11863
  if (context === null)
11691
11864
  return null;
11692
11865
  if (context.component === undefined) {
11693
- context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);
11866
+ const lView = context.lView;
11867
+ if (lView === null) {
11868
+ return null;
11869
+ }
11870
+ context.component = getComponentAtNodeIndex(context.nodeIndex, lView);
11694
11871
  }
11695
11872
  return context.component;
11696
11873
  }
@@ -11709,7 +11886,8 @@ function getComponent$1(element) {
11709
11886
  function getContext(element) {
11710
11887
  assertDomElement(element);
11711
11888
  const context = getLContext(element);
11712
- return context === null ? null : context.lView[CONTEXT];
11889
+ const lView = context ? context.lView : null;
11890
+ return lView === null ? null : lView[CONTEXT];
11713
11891
  }
11714
11892
  /**
11715
11893
  * Retrieves the component instance whose view contains the DOM element.
@@ -11728,11 +11906,10 @@ function getContext(element) {
11728
11906
  */
11729
11907
  function getOwningComponent(elementOrDir) {
11730
11908
  const context = getLContext(elementOrDir);
11731
- if (context === null)
11909
+ let lView = context ? context.lView : null;
11910
+ if (lView === null)
11732
11911
  return null;
11733
- let lView = context.lView;
11734
11912
  let parent;
11735
- ngDevMode && assertLView(lView);
11736
11913
  while (lView[TVIEW].type === 2 /* Embedded */ && (parent = getLViewParent(lView))) {
11737
11914
  lView = parent;
11738
11915
  }
@@ -11750,7 +11927,8 @@ function getOwningComponent(elementOrDir) {
11750
11927
  * @globalApi ng
11751
11928
  */
11752
11929
  function getRootComponents(elementOrDir) {
11753
- return [...getRootContext(elementOrDir).components];
11930
+ const lView = readPatchedLView(elementOrDir);
11931
+ return lView !== null ? [...getRootContext(lView).components] : [];
11754
11932
  }
11755
11933
  /**
11756
11934
  * Retrieves an `Injector` associated with an element, component or directive instance.
@@ -11764,10 +11942,11 @@ function getRootComponents(elementOrDir) {
11764
11942
  */
11765
11943
  function getInjector(elementOrDir) {
11766
11944
  const context = getLContext(elementOrDir);
11767
- if (context === null)
11945
+ const lView = context ? context.lView : null;
11946
+ if (lView === null)
11768
11947
  return Injector.NULL;
11769
- const tNode = context.lView[TVIEW].data[context.nodeIndex];
11770
- return new NodeInjector(tNode, context.lView);
11948
+ const tNode = lView[TVIEW].data[context.nodeIndex];
11949
+ return new NodeInjector(tNode, lView);
11771
11950
  }
11772
11951
  /**
11773
11952
  * Retrieve a set of injection tokens at a given DOM node.
@@ -11776,9 +11955,9 @@ function getInjector(elementOrDir) {
11776
11955
  */
11777
11956
  function getInjectionTokens(element) {
11778
11957
  const context = getLContext(element);
11779
- if (context === null)
11958
+ const lView = context ? context.lView : null;
11959
+ if (lView === null)
11780
11960
  return [];
11781
- const lView = context.lView;
11782
11961
  const tView = lView[TVIEW];
11783
11962
  const tNode = tView.data[context.nodeIndex];
11784
11963
  const providerTokens = [];
@@ -11828,10 +12007,10 @@ function getDirectives(node) {
11828
12007
  return [];
11829
12008
  }
11830
12009
  const context = getLContext(node);
11831
- if (context === null) {
12010
+ const lView = context ? context.lView : null;
12011
+ if (lView === null) {
11832
12012
  return [];
11833
12013
  }
11834
- const lView = context.lView;
11835
12014
  const tView = lView[TVIEW];
11836
12015
  const nodeIndex = context.nodeIndex;
11837
12016
  if (!(tView === null || tView === void 0 ? void 0 : tView.data[nodeIndex])) {
@@ -11891,7 +12070,11 @@ function getLocalRefs(target) {
11891
12070
  if (context === null)
11892
12071
  return {};
11893
12072
  if (context.localRefs === undefined) {
11894
- context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);
12073
+ const lView = context.lView;
12074
+ if (lView === null) {
12075
+ return {};
12076
+ }
12077
+ context.localRefs = discoverLocalRefs(lView, context.nodeIndex);
11895
12078
  }
11896
12079
  return context.localRefs || {};
11897
12080
  }
@@ -11955,11 +12138,11 @@ function getRenderedText(component) {
11955
12138
  * @globalApi ng
11956
12139
  */
11957
12140
  function getListeners(element) {
11958
- assertDomElement(element);
12141
+ ngDevMode && assertDomElement(element);
11959
12142
  const lContext = getLContext(element);
11960
- if (lContext === null)
12143
+ const lView = lContext === null ? null : lContext.lView;
12144
+ if (lView === null)
11961
12145
  return [];
11962
- const lView = lContext.lView;
11963
12146
  const tView = lView[TVIEW];
11964
12147
  const lCleanup = lView[CLEANUP];
11965
12148
  const tCleanup = tView.cleanup;
@@ -12010,10 +12193,10 @@ function getDebugNode$1(element) {
12010
12193
  throw new Error('Expecting instance of DOM Element');
12011
12194
  }
12012
12195
  const lContext = getLContext(element);
12013
- if (lContext === null) {
12196
+ const lView = lContext ? lContext.lView : null;
12197
+ if (lView === null) {
12014
12198
  return null;
12015
12199
  }
12016
- const lView = lContext.lView;
12017
12200
  const nodeIndex = lContext.nodeIndex;
12018
12201
  if (nodeIndex !== -1) {
12019
12202
  const valueInLView = lView[nodeIndex];
@@ -12038,6 +12221,7 @@ function getComponentLView(target) {
12038
12221
  const lContext = getLContext(target);
12039
12222
  const nodeIndx = lContext.nodeIndex;
12040
12223
  const lView = lContext.lView;
12224
+ ngDevMode && assertLView(lView);
12041
12225
  const componentLView = lView[nodeIndx];
12042
12226
  ngDevMode && assertLView(componentLView);
12043
12227
  return componentLView;
@@ -12185,7 +12369,7 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
12185
12369
  const rootContext = createRootContext(opts.scheduler, opts.playerHandler);
12186
12370
  const renderer = rendererFactory.createRenderer(hostRNode, componentDef);
12187
12371
  const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);
12188
- const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null);
12372
+ const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null, null);
12189
12373
  enterView(rootView);
12190
12374
  let component;
12191
12375
  try {
@@ -12240,7 +12424,7 @@ function createRootComponentView(rNode, def, rootView, rendererFactory, hostRend
12240
12424
  }
12241
12425
  }
12242
12426
  const viewRenderer = rendererFactory.createRenderer(rNode, def);
12243
- const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null);
12427
+ const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null, null);
12244
12428
  if (tView.firstCreatePass) {
12245
12429
  diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);
12246
12430
  markAsComponentHost(tView, tNode);
@@ -21088,7 +21272,7 @@ class Version {
21088
21272
  /**
21089
21273
  * @publicApi
21090
21274
  */
21091
- const VERSION = new Version('14.0.0-next.3');
21275
+ const VERSION = new Version('14.0.0-next.6');
21092
21276
 
21093
21277
  /**
21094
21278
  * @license
@@ -21494,29 +21678,27 @@ function getNamespace(elementName) {
21494
21678
  return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);
21495
21679
  }
21496
21680
  /**
21497
- * A change detection scheduler token for {@link RootContext}. This token is the default value used
21498
- * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.
21681
+ * Injector that looks up a value using a specific injector, before falling back to the module
21682
+ * injector. Used primarily when creating components or embedded views dynamically.
21499
21683
  */
21500
- const SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', {
21501
- providedIn: 'root',
21502
- factory: () => defaultScheduler,
21503
- });
21504
- function createChainedInjector(rootViewInjector, moduleInjector) {
21505
- return {
21506
- get: (token, notFoundValue, flags) => {
21507
- const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);
21508
- if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||
21509
- notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
21510
- // Return the value from the root element injector when
21511
- // - it provides it
21512
- // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
21513
- // - the module injector should not be checked
21514
- // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
21515
- return value;
21516
- }
21517
- return moduleInjector.get(token, notFoundValue, flags);
21684
+ class ChainedInjector {
21685
+ constructor(injector, parentInjector) {
21686
+ this.injector = injector;
21687
+ this.parentInjector = parentInjector;
21688
+ }
21689
+ get(token, notFoundValue, flags) {
21690
+ const value = this.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);
21691
+ if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||
21692
+ notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
21693
+ // Return the value from the root element injector when
21694
+ // - it provides it
21695
+ // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
21696
+ // - the module injector should not be checked
21697
+ // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
21698
+ return value;
21518
21699
  }
21519
- };
21700
+ return this.parentInjector.get(token, notFoundValue, flags);
21701
+ }
21520
21702
  }
21521
21703
  /**
21522
21704
  * Render3 implementation of {@link viewEngine_ComponentFactory}.
@@ -21544,7 +21726,7 @@ class ComponentFactory extends ComponentFactory$1 {
21544
21726
  }
21545
21727
  create(injector, projectableNodes, rootSelectorOrNode, ngModule) {
21546
21728
  ngModule = ngModule || this.ngModule;
21547
- const rootViewInjector = ngModule ? createChainedInjector(injector, ngModule.injector) : injector;
21729
+ const rootViewInjector = ngModule ? new ChainedInjector(injector, ngModule.injector) : injector;
21548
21730
  const rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);
21549
21731
  const sanitizer = rootViewInjector.get(Sanitizer, null);
21550
21732
  const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);
@@ -21559,7 +21741,7 @@ class ComponentFactory extends ComponentFactory$1 {
21559
21741
  const rootContext = createRootContext();
21560
21742
  // Create the root view. Uses empty TView and ContentTemplate.
21561
21743
  const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);
21562
- const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector);
21744
+ const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector, null);
21563
21745
  // rootView is the parent when bootstrapping
21564
21746
  // TODO(misko): it looks like we are entering view here but we don't really need to as
21565
21747
  // `renderView` does that. However as the code is written it is needed because
@@ -22680,9 +22862,9 @@ const R3TemplateRef = class TemplateRef extends ViewEngineTemplateRef {
22680
22862
  this._declarationTContainer = _declarationTContainer;
22681
22863
  this.elementRef = elementRef;
22682
22864
  }
22683
- createEmbeddedView(context) {
22865
+ createEmbeddedView(context, injector) {
22684
22866
  const embeddedTView = this._declarationTContainer.tViews;
22685
- const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null);
22867
+ const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null, injector || null);
22686
22868
  const declarationLContainer = this._declarationLView[this._declarationTContainer.index];
22687
22869
  ngDevMode && assertLContainer(declarationLContainer);
22688
22870
  embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;
@@ -22798,8 +22980,17 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
22798
22980
  get length() {
22799
22981
  return this._lContainer.length - CONTAINER_HEADER_OFFSET;
22800
22982
  }
22801
- createEmbeddedView(templateRef, context, index) {
22802
- const viewRef = templateRef.createEmbeddedView(context || {});
22983
+ createEmbeddedView(templateRef, context, indexOrOptions) {
22984
+ let index;
22985
+ let injector;
22986
+ if (typeof indexOrOptions === 'number') {
22987
+ index = indexOrOptions;
22988
+ }
22989
+ else if (indexOrOptions != null) {
22990
+ index = indexOrOptions.index;
22991
+ injector = indexOrOptions.injector;
22992
+ }
22993
+ const viewRef = templateRef.createEmbeddedView(context || {}, injector);
22803
22994
  this.insert(viewRef, index);
22804
22995
  return viewRef;
22805
22996
  }
@@ -24810,10 +25001,11 @@ class ApplicationInitStatus {
24810
25001
  }
24811
25002
  }
24812
25003
  ApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) { return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8)); };
24813
- ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac });
25004
+ ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac, providedIn: 'root' });
24814
25005
  (function () {
24815
25006
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{
24816
- type: Injectable
25007
+ type: Injectable,
25008
+ args: [{ providedIn: 'root' }]
24817
25009
  }], function () {
24818
25010
  return [{ type: undefined, decorators: [{
24819
25011
  type: Inject,
@@ -24842,7 +25034,10 @@ ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Appli
24842
25034
  *
24843
25035
  * @publicApi
24844
25036
  */
24845
- const APP_ID = new InjectionToken('AppId');
25037
+ const APP_ID = new InjectionToken('AppId', {
25038
+ providedIn: 'root',
25039
+ factory: _appIdRandomProviderFactory,
25040
+ });
24846
25041
  function _appIdRandomProviderFactory() {
24847
25042
  return `${_randomChar()}${_randomChar()}${_randomChar()}`;
24848
25043
  }
@@ -24928,6 +25123,33 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
24928
25123
  * Use of this source code is governed by an MIT-style license that can be
24929
25124
  * found in the LICENSE file at https://angular.io/license
24930
25125
  */
25126
+ /**
25127
+ * Work out the locale from the potential global properties.
25128
+ *
25129
+ * * Closure Compiler: use `goog.getLocale()`.
25130
+ * * Ivy enabled: use `$localize.locale`
25131
+ */
25132
+ function getGlobalLocale() {
25133
+ if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
25134
+ typeof goog !== 'undefined' && goog.getLocale() !== 'en') {
25135
+ // * The default `goog.getLocale()` value is `en`, while Angular used `en-US`.
25136
+ // * In order to preserve backwards compatibility, we use Angular default value over
25137
+ // Closure Compiler's one.
25138
+ return goog.getLocale();
25139
+ }
25140
+ else {
25141
+ // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
25142
+ // COMPILE-TIME INLINER.
25143
+ //
25144
+ // * During compile time inlining of translations the expression will be replaced
25145
+ // with a string literal that is the current locale. Other forms of this expression are not
25146
+ // guaranteed to be replaced.
25147
+ //
25148
+ // * During runtime translation evaluation, the developer is required to set `$localize.locale`
25149
+ // if required, or just to provide their own `LOCALE_ID` provider.
25150
+ return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
25151
+ }
25152
+ }
24931
25153
  /**
24932
25154
  * Provide this token to set the locale of your application.
24933
25155
  * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
@@ -24950,7 +25172,10 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
24950
25172
  *
24951
25173
  * @publicApi
24952
25174
  */
24953
- const LOCALE_ID = new InjectionToken('LocaleId');
25175
+ const LOCALE_ID = new InjectionToken('LocaleId', {
25176
+ providedIn: 'root',
25177
+ factory: () => inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale(),
25178
+ });
24954
25179
  /**
24955
25180
  * Provide this token to set the default currency code your application uses for
24956
25181
  * CurrencyPipe when there is no currency code passed into it. This is only used by
@@ -24989,7 +25214,10 @@ const LOCALE_ID = new InjectionToken('LocaleId');
24989
25214
  *
24990
25215
  * @publicApi
24991
25216
  */
24992
- const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode');
25217
+ const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode', {
25218
+ providedIn: 'root',
25219
+ factory: () => USD_CURRENCY_CODE,
25220
+ });
24993
25221
  /**
24994
25222
  * Use this token at bootstrap to provide the content of your translation file (`xtb`,
24995
25223
  * `xlf` or `xlf2`) when you want to translate your application in another language.
@@ -25156,10 +25384,11 @@ class Compiler {
25156
25384
  }
25157
25385
  }
25158
25386
  Compiler.ɵfac = function Compiler_Factory(t) { return new (t || Compiler)(); };
25159
- Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac });
25387
+ Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac, providedIn: 'root' });
25160
25388
  (function () {
25161
25389
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Compiler, [{
25162
- type: Injectable
25390
+ type: Injectable,
25391
+ args: [{ providedIn: 'root' }]
25163
25392
  }], null, null);
25164
25393
  })();
25165
25394
  /**
@@ -26527,10 +26756,11 @@ class ApplicationRef {
26527
26756
  }
26528
26757
  }
26529
26758
  ApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver$1), ɵɵinject(ApplicationInitStatus)); };
26530
- ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac });
26759
+ ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' });
26531
26760
  (function () {
26532
26761
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{
26533
- type: Injectable
26762
+ type: Injectable,
26763
+ args: [{ providedIn: 'root' }]
26534
26764
  }], function () { return [{ type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver$1 }, { type: ApplicationInitStatus }]; }, null);
26535
26765
  })();
26536
26766
  function remove(list, el) {
@@ -26937,8 +27167,8 @@ class DebugElement extends DebugNode {
26937
27167
  */
26938
27168
  get name() {
26939
27169
  const context = getLContext(this.nativeNode);
26940
- if (context !== null) {
26941
- const lView = context.lView;
27170
+ const lView = context ? context.lView : null;
27171
+ if (lView !== null) {
26942
27172
  const tData = lView[TVIEW].data;
26943
27173
  const tNode = tData[context.nodeIndex];
26944
27174
  return tNode.value;
@@ -26961,10 +27191,10 @@ class DebugElement extends DebugNode {
26961
27191
  */
26962
27192
  get properties() {
26963
27193
  const context = getLContext(this.nativeNode);
26964
- if (context === null) {
27194
+ const lView = context ? context.lView : null;
27195
+ if (lView === null) {
26965
27196
  return {};
26966
27197
  }
26967
- const lView = context.lView;
26968
27198
  const tData = lView[TVIEW].data;
26969
27199
  const tNode = tData[context.nodeIndex];
26970
27200
  const properties = {};
@@ -26985,10 +27215,10 @@ class DebugElement extends DebugNode {
26985
27215
  return attributes;
26986
27216
  }
26987
27217
  const context = getLContext(element);
26988
- if (context === null) {
27218
+ const lView = context ? context.lView : null;
27219
+ if (lView === null) {
26989
27220
  return {};
26990
27221
  }
26991
- const lView = context.lView;
26992
27222
  const tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;
26993
27223
  const lowercaseTNodeAttrs = [];
26994
27224
  // For debug nodes we take the element's attribute directly from the DOM since it allows us
@@ -27182,9 +27412,10 @@ function isPrimitiveValue(value) {
27182
27412
  }
27183
27413
  function _queryAll(parentElement, predicate, matches, elementsOnly) {
27184
27414
  const context = getLContext(parentElement.nativeNode);
27185
- if (context !== null) {
27186
- const parentTNode = context.lView[TVIEW].data[context.nodeIndex];
27187
- _queryNodeChildren(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);
27415
+ const lView = context ? context.lView : null;
27416
+ if (lView !== null) {
27417
+ const parentTNode = lView[TVIEW].data[context.nodeIndex];
27418
+ _queryNodeChildren(parentTNode, lView, predicate, matches, elementsOnly, parentElement.nativeNode);
27188
27419
  }
27189
27420
  else {
27190
27421
  // If the context is null, then `parentElement` was either created with Renderer2 or native DOM
@@ -28529,94 +28760,9 @@ const _CORE_PLATFORM_PROVIDERS = [
28529
28760
  const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);
28530
28761
 
28531
28762
  /**
28532
- * @license
28533
- * Copyright Google LLC All Rights Reserved.
28534
- *
28535
- * Use of this source code is governed by an MIT-style license that can be
28536
- * found in the LICENSE file at https://angular.io/license
28537
- */
28538
- function _localeFactory(locale) {
28539
- return locale || getGlobalLocale();
28540
- }
28541
- /**
28542
- * Work out the locale from the potential global properties.
28543
- *
28544
- * * Closure Compiler: use `goog.getLocale()`.
28545
- * * Ivy enabled: use `$localize.locale`
28546
- */
28547
- function getGlobalLocale() {
28548
- if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
28549
- typeof goog !== 'undefined' && goog.getLocale() !== 'en') {
28550
- // * The default `goog.getLocale()` value is `en`, while Angular used `en-US`.
28551
- // * In order to preserve backwards compatibility, we use Angular default value over
28552
- // Closure Compiler's one.
28553
- return goog.getLocale();
28554
- }
28555
- else {
28556
- // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
28557
- // COMPILE-TIME INLINER.
28558
- //
28559
- // * During compile time inlining of translations the expression will be replaced
28560
- // with a string literal that is the current locale. Other forms of this expression are not
28561
- // guaranteed to be replaced.
28562
- //
28563
- // * During runtime translation evaluation, the developer is required to set `$localize.locale`
28564
- // if required, or just to provide their own `LOCALE_ID` provider.
28565
- return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
28566
- }
28567
- }
28568
- /**
28569
- * A built-in [dependency injection token](guide/glossary#di-token)
28570
- * that is used to configure the root injector for bootstrapping.
28571
- */
28572
- const APPLICATION_MODULE_PROVIDERS = [
28573
- {
28574
- provide: ApplicationRef,
28575
- useClass: ApplicationRef,
28576
- deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver$1, ApplicationInitStatus]
28577
- },
28578
- { provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory },
28579
- {
28580
- provide: ApplicationInitStatus,
28581
- useClass: ApplicationInitStatus,
28582
- deps: [[new Optional(), APP_INITIALIZER]]
28583
- },
28584
- { provide: Compiler, useClass: Compiler, deps: [] },
28585
- APP_ID_RANDOM_PROVIDER,
28586
- {
28587
- provide: LOCALE_ID,
28588
- useFactory: _localeFactory,
28589
- deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]
28590
- },
28591
- { provide: DEFAULT_CURRENCY_CODE, useValue: USD_CURRENCY_CODE },
28592
- ];
28593
- /**
28594
- * Schedule work at next available slot.
28595
- *
28596
- * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped
28597
- * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.
28598
- * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.
28599
- *
28600
- * @param ngZone NgZone to use for scheduling.
28601
- */
28602
- function zoneSchedulerFactory(ngZone) {
28603
- let queue = [];
28604
- ngZone.onStable.subscribe(() => {
28605
- while (queue.length) {
28606
- queue.pop()();
28607
- }
28608
- });
28609
- return function (fn) {
28610
- queue.push(fn);
28611
- };
28612
- }
28613
- /**
28614
- * Configures the root injector for an app with
28615
- * providers of `@angular/core` dependencies that `ApplicationRef` needs
28616
- * to bootstrap components.
28617
- *
28618
28763
  * Re-exported by `BrowserModule`, which is included automatically in the root
28619
- * `AppModule` when you create a new app with the CLI `new` command.
28764
+ * `AppModule` when you create a new app with the CLI `new` command. Eagerly injects
28765
+ * `ApplicationRef` to instantiate it.
28620
28766
  *
28621
28767
  * @publicApi
28622
28768
  */
@@ -28626,11 +28772,10 @@ class ApplicationModule {
28626
28772
  }
28627
28773
  ApplicationModule.ɵfac = function ApplicationModule_Factory(t) { return new (t || ApplicationModule)(ɵɵinject(ApplicationRef)); };
28628
28774
  ApplicationModule.ɵmod = /*@__PURE__*/ ɵɵdefineNgModule({ type: ApplicationModule });
28629
- ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({ providers: APPLICATION_MODULE_PROVIDERS });
28775
+ ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({});
28630
28776
  (function () {
28631
28777
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
28632
- type: NgModule,
28633
- args: [{ providers: APPLICATION_MODULE_PROVIDERS }]
28778
+ type: NgModule
28634
28779
  }], function () { return [{ type: ApplicationRef }]; }, null);
28635
28780
  })();
28636
28781
 
@@ -28804,5 +28949,5 @@ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
28804
28949
  * Generated bundle index. Do not edit.
28805
28950
  */
28806
28951
 
28807
- export { ANALYZE_FOR_ENTRY_COMPONENTS, ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, asNativeElements, assertPlatform, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, ChangeDetectorStatus as ɵChangeDetectorStatus, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, ViewRef$1 as ɵViewRef, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, coerceToBoolean as ɵcoerceToBoolean, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, getDebugNode as ɵgetDebugNode, getDebugNodeR2 as ɵgetDebugNodeR2, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, isBoundToModule as ɵisBoundToModule, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, ɵivyEnabled, makeDecorator as ɵmakeDecorator, markDirty as ɵmarkDirty, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, registerNgModuleType as ɵregisterNgModuleType, renderComponent as ɵrenderComponent, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, whenRendered as ɵwhenRendered, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵviewQuery };
28952
+ export { ANALYZE_FOR_ENTRY_COMPONENTS, ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, asNativeElements, assertPlatform, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, ChangeDetectorStatus as ɵChangeDetectorStatus, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LContext as ɵLContext, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, ViewRef$1 as ɵViewRef, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, coerceToBoolean as ɵcoerceToBoolean, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, getDebugNode as ɵgetDebugNode, getDebugNodeR2 as ɵgetDebugNodeR2, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, isBoundToModule as ɵisBoundToModule, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, ɵivyEnabled, makeDecorator as ɵmakeDecorator, markDirty as ɵmarkDirty, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, registerNgModuleType as ɵregisterNgModuleType, renderComponent as ɵrenderComponent, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, whenRendered as ɵwhenRendered, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵviewQuery };
28808
28953
  //# sourceMappingURL=core.mjs.map