@angular/core 15.1.0-next.0 → 15.1.0-next.1

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.
package/fesm2020/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.1.0-next.0
2
+ * @license Angular v15.0.2
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1444,15 +1444,6 @@ const EMBEDDED_VIEW_INJECTOR = 21;
1444
1444
  * there should be no need to refer to `HEADER_OFFSET` anywhere else.
1445
1445
  */
1446
1446
  const HEADER_OFFSET = 22;
1447
- /**
1448
- * Converts `TViewType` into human readable text.
1449
- * Make sure this matches with `TViewType`
1450
- */
1451
- const TViewTypeAsString = [
1452
- 'Root',
1453
- 'Component',
1454
- 'Embedded', // 2
1455
- ];
1456
1447
  // Note: This hack is necessary so we don't erroneously get a circular dependency
1457
1448
  // failure based on types.
1458
1449
  const unusedValueExportToPlacateAjd$8 = 1;
@@ -1620,10 +1611,6 @@ function assertIndexInDeclRange(lView, index) {
1620
1611
  const tView = lView[1];
1621
1612
  assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);
1622
1613
  }
1623
- function assertIndexInVarsRange(lView, index) {
1624
- const tView = lView[1];
1625
- assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);
1626
- }
1627
1614
  function assertIndexInExpandoRange(lView, index) {
1628
1615
  const tView = lView[1];
1629
1616
  assertBetween(tView.expandoStartIndex, lView.length, index);
@@ -9055,7 +9042,6 @@ function unwrapElementRef(value) {
9055
9042
  * Use of this source code is governed by an MIT-style license that can be
9056
9043
  * found in the LICENSE file at https://angular.io/license
9057
9044
  */
9058
- const Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');
9059
9045
  /**
9060
9046
  * Creates and initializes a custom renderer that implements the `Renderer2` base class.
9061
9047
  *
@@ -9139,7 +9125,7 @@ class Version {
9139
9125
  /**
9140
9126
  * @publicApi
9141
9127
  */
9142
- const VERSION = new Version('15.1.0-next.0');
9128
+ const VERSION = new Version('15.1.0-next.1');
9143
9129
 
9144
9130
  /**
9145
9131
  * @license
@@ -10987,812 +10973,6 @@ function ɵɵinvalidFactory() {
10987
10973
  throw new Error(msg);
10988
10974
  }
10989
10975
 
10990
- /**
10991
- * @license
10992
- * Copyright Google LLC All Rights Reserved.
10993
- *
10994
- * Use of this source code is governed by an MIT-style license that can be
10995
- * found in the LICENSE file at https://angular.io/license
10996
- */
10997
- /**
10998
- * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!
10999
- */
11000
- /**
11001
- * Creates an `Array` construction with a given name. This is useful when
11002
- * looking for memory consumption to see what time of array it is.
11003
- *
11004
- *
11005
- * @param name Name to give to the constructor
11006
- * @returns A subclass of `Array` if possible. This can only be done in
11007
- * environments which support `class` construct.
11008
- */
11009
- function createNamedArrayType(name) {
11010
- // This should never be called in prod mode, so let's verify that is the case.
11011
- if (ngDevMode) {
11012
- try {
11013
- // If this function were compromised the following could lead to arbitrary
11014
- // script execution. We bless it with Trusted Types anyway since this
11015
- // function is stripped out of production binaries.
11016
- return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array);
11017
- }
11018
- catch (e) {
11019
- // If it does not work just give up and fall back to regular Array.
11020
- return Array;
11021
- }
11022
- }
11023
- else {
11024
- throw new Error('Looks like we are in \'prod mode\', but we are creating a named Array type, which is wrong! Check your code');
11025
- }
11026
- }
11027
-
11028
- /**
11029
- * @license
11030
- * Copyright Google LLC All Rights Reserved.
11031
- *
11032
- * Use of this source code is governed by an MIT-style license that can be
11033
- * found in the LICENSE file at https://angular.io/license
11034
- */
11035
- function toTStylingRange(prev, next) {
11036
- ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
11037
- ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
11038
- return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
11039
- }
11040
- function getTStylingRangePrev(tStylingRange) {
11041
- ngDevMode && assertNumber(tStylingRange, 'expected number');
11042
- return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
11043
- }
11044
- function getTStylingRangePrevDuplicate(tStylingRange) {
11045
- ngDevMode && assertNumber(tStylingRange, 'expected number');
11046
- return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
11047
- 2 /* StylingRange.PREV_DUPLICATE */;
11048
- }
11049
- function setTStylingRangePrev(tStylingRange, previous) {
11050
- ngDevMode && assertNumber(tStylingRange, 'expected number');
11051
- ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
11052
- return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
11053
- (previous << 17 /* StylingRange.PREV_SHIFT */));
11054
- }
11055
- function setTStylingRangePrevDuplicate(tStylingRange) {
11056
- ngDevMode && assertNumber(tStylingRange, 'expected number');
11057
- return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
11058
- }
11059
- function getTStylingRangeNext(tStylingRange) {
11060
- ngDevMode && assertNumber(tStylingRange, 'expected number');
11061
- return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
11062
- }
11063
- function setTStylingRangeNext(tStylingRange, next) {
11064
- ngDevMode && assertNumber(tStylingRange, 'expected number');
11065
- ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
11066
- return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
11067
- next << 2 /* StylingRange.NEXT_SHIFT */);
11068
- }
11069
- function getTStylingRangeNextDuplicate(tStylingRange) {
11070
- ngDevMode && assertNumber(tStylingRange, 'expected number');
11071
- return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
11072
- 1 /* StylingRange.NEXT_DUPLICATE */;
11073
- }
11074
- function setTStylingRangeNextDuplicate(tStylingRange) {
11075
- ngDevMode && assertNumber(tStylingRange, 'expected number');
11076
- return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
11077
- }
11078
- function getTStylingRangeTail(tStylingRange) {
11079
- ngDevMode && assertNumber(tStylingRange, 'expected number');
11080
- const next = getTStylingRangeNext(tStylingRange);
11081
- return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
11082
- }
11083
-
11084
- /**
11085
- * @license
11086
- * Copyright Google LLC All Rights Reserved.
11087
- *
11088
- * Use of this source code is governed by an MIT-style license that can be
11089
- * found in the LICENSE file at https://angular.io/license
11090
- */
11091
- /**
11092
- * Patch a `debug` property on top of the existing object.
11093
- *
11094
- * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
11095
- *
11096
- * @param obj Object to patch
11097
- * @param debug Value to patch
11098
- */
11099
- function attachDebugObject(obj, debug) {
11100
- if (ngDevMode) {
11101
- Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
11102
- }
11103
- else {
11104
- throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
11105
- }
11106
- }
11107
- /**
11108
- * Patch a `debug` property getter on top of the existing object.
11109
- *
11110
- * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
11111
- *
11112
- * @param obj Object to patch
11113
- * @param debugGetter Getter returning a value to patch
11114
- */
11115
- function attachDebugGetter(obj, debugGetter) {
11116
- if (ngDevMode) {
11117
- Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
11118
- }
11119
- else {
11120
- throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
11121
- }
11122
- }
11123
-
11124
- /**
11125
- * @license
11126
- * Copyright Google LLC All Rights Reserved.
11127
- *
11128
- * Use of this source code is governed by an MIT-style license that can be
11129
- * found in the LICENSE file at https://angular.io/license
11130
- */
11131
- /*
11132
- * This file contains conditionally attached classes which provide human readable (debug) level
11133
- * information for `LView`, `LContainer` and other internal data structures. These data structures
11134
- * are stored internally as array which makes it very difficult during debugging to reason about the
11135
- * current state of the system.
11136
- *
11137
- * Patching the array with extra property does change the array's hidden class' but it does not
11138
- * change the cost of access, therefore this patching should not have significant if any impact in
11139
- * `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)
11140
- *
11141
- * So instead of seeing:
11142
- * ```
11143
- * Array(30) [Object, 659, null, …]
11144
- * ```
11145
- *
11146
- * You get to see:
11147
- * ```
11148
- * LViewDebug {
11149
- * views: [...],
11150
- * flags: {attached: true, ...}
11151
- * nodes: [
11152
- * {html: '<div id="123">', ..., nodes: [
11153
- * {html: '<span>', ..., nodes: null}
11154
- * ]}
11155
- * ]
11156
- * }
11157
- * ```
11158
- */
11159
- let LVIEW_COMPONENT_CACHE;
11160
- let LVIEW_EMBEDDED_CACHE;
11161
- let LVIEW_ROOT;
11162
- let LVIEW_COMPONENT;
11163
- let LVIEW_EMBEDDED;
11164
- /**
11165
- * This function clones a blueprint and creates LView.
11166
- *
11167
- * Simple slice will keep the same type, and we need it to be LView
11168
- */
11169
- function cloneToLViewFromTViewBlueprint(tView) {
11170
- const debugTView = tView;
11171
- const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);
11172
- return lView.concat(tView.blueprint);
11173
- }
11174
- class LRootView extends Array {
11175
- }
11176
- class LComponentView extends Array {
11177
- }
11178
- class LEmbeddedView extends Array {
11179
- }
11180
- function getLViewToClone(type, name) {
11181
- switch (type) {
11182
- case 0 /* TViewType.Root */:
11183
- if (LVIEW_ROOT === undefined)
11184
- LVIEW_ROOT = new LRootView();
11185
- return LVIEW_ROOT;
11186
- case 1 /* TViewType.Component */:
11187
- if (!ngDevMode || !ngDevMode.namedConstructors) {
11188
- if (LVIEW_COMPONENT === undefined)
11189
- LVIEW_COMPONENT = new LComponentView();
11190
- return LVIEW_COMPONENT;
11191
- }
11192
- if (LVIEW_COMPONENT_CACHE === undefined)
11193
- LVIEW_COMPONENT_CACHE = new Map();
11194
- let componentArray = LVIEW_COMPONENT_CACHE.get(name);
11195
- if (componentArray === undefined) {
11196
- componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();
11197
- LVIEW_COMPONENT_CACHE.set(name, componentArray);
11198
- }
11199
- return componentArray;
11200
- case 2 /* TViewType.Embedded */:
11201
- if (!ngDevMode || !ngDevMode.namedConstructors) {
11202
- if (LVIEW_EMBEDDED === undefined)
11203
- LVIEW_EMBEDDED = new LEmbeddedView();
11204
- return LVIEW_EMBEDDED;
11205
- }
11206
- if (LVIEW_EMBEDDED_CACHE === undefined)
11207
- LVIEW_EMBEDDED_CACHE = new Map();
11208
- let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);
11209
- if (embeddedArray === undefined) {
11210
- embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();
11211
- LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);
11212
- }
11213
- return embeddedArray;
11214
- }
11215
- }
11216
- function nameSuffix(text) {
11217
- if (text == null)
11218
- return '';
11219
- const index = text.lastIndexOf('_Template');
11220
- return '_' + (index === -1 ? text : text.slice(0, index));
11221
- }
11222
- /**
11223
- * This class is a debug version of Object literal so that we can have constructor name show up
11224
- * in
11225
- * debug tools in ngDevMode.
11226
- */
11227
- const TViewConstructor = class TView {
11228
- constructor(type, blueprint, template, queries, viewQuery, declTNode, data, bindingStartIndex, expandoStartIndex, hostBindingOpCodes, firstCreatePass, firstUpdatePass, staticViewQueries, staticContentQueries, preOrderHooks, preOrderCheckHooks, contentHooks, contentCheckHooks, viewHooks, viewCheckHooks, destroyHooks, cleanup, contentQueries, components, directiveRegistry, pipeRegistry, firstChild, schemas, consts, incompleteFirstPass, _decls, _vars) {
11229
- this.type = type;
11230
- this.blueprint = blueprint;
11231
- this.template = template;
11232
- this.queries = queries;
11233
- this.viewQuery = viewQuery;
11234
- this.declTNode = declTNode;
11235
- this.data = data;
11236
- this.bindingStartIndex = bindingStartIndex;
11237
- this.expandoStartIndex = expandoStartIndex;
11238
- this.hostBindingOpCodes = hostBindingOpCodes;
11239
- this.firstCreatePass = firstCreatePass;
11240
- this.firstUpdatePass = firstUpdatePass;
11241
- this.staticViewQueries = staticViewQueries;
11242
- this.staticContentQueries = staticContentQueries;
11243
- this.preOrderHooks = preOrderHooks;
11244
- this.preOrderCheckHooks = preOrderCheckHooks;
11245
- this.contentHooks = contentHooks;
11246
- this.contentCheckHooks = contentCheckHooks;
11247
- this.viewHooks = viewHooks;
11248
- this.viewCheckHooks = viewCheckHooks;
11249
- this.destroyHooks = destroyHooks;
11250
- this.cleanup = cleanup;
11251
- this.contentQueries = contentQueries;
11252
- this.components = components;
11253
- this.directiveRegistry = directiveRegistry;
11254
- this.pipeRegistry = pipeRegistry;
11255
- this.firstChild = firstChild;
11256
- this.schemas = schemas;
11257
- this.consts = consts;
11258
- this.incompleteFirstPass = incompleteFirstPass;
11259
- this._decls = _decls;
11260
- this._vars = _vars;
11261
- }
11262
- get template_() {
11263
- const buf = [];
11264
- processTNodeChildren(this.firstChild, buf);
11265
- return buf.join('');
11266
- }
11267
- get type_() {
11268
- return TViewTypeAsString[this.type] || `TViewType.?${this.type}?`;
11269
- }
11270
- };
11271
- class TNode {
11272
- constructor(tView_, //
11273
- type, //
11274
- index, //
11275
- insertBeforeIndex, //
11276
- injectorIndex, //
11277
- componentOffset, //
11278
- directiveStart, //
11279
- directiveEnd, //
11280
- directiveStylingLast, //
11281
- propertyBindings, //
11282
- flags, //
11283
- providerIndexes, //
11284
- value, //
11285
- attrs, //
11286
- mergedAttrs, //
11287
- localNames, //
11288
- initialInputs, //
11289
- inputs, //
11290
- outputs, //
11291
- tViews, //
11292
- next, //
11293
- projectionNext, //
11294
- child, //
11295
- parent, //
11296
- projection, //
11297
- styles, //
11298
- stylesWithoutHost, //
11299
- residualStyles, //
11300
- classes, //
11301
- classesWithoutHost, //
11302
- residualClasses, //
11303
- classBindings, //
11304
- styleBindings) {
11305
- this.tView_ = tView_;
11306
- this.type = type;
11307
- this.index = index;
11308
- this.insertBeforeIndex = insertBeforeIndex;
11309
- this.injectorIndex = injectorIndex;
11310
- this.componentOffset = componentOffset;
11311
- this.directiveStart = directiveStart;
11312
- this.directiveEnd = directiveEnd;
11313
- this.directiveStylingLast = directiveStylingLast;
11314
- this.propertyBindings = propertyBindings;
11315
- this.flags = flags;
11316
- this.providerIndexes = providerIndexes;
11317
- this.value = value;
11318
- this.attrs = attrs;
11319
- this.mergedAttrs = mergedAttrs;
11320
- this.localNames = localNames;
11321
- this.initialInputs = initialInputs;
11322
- this.inputs = inputs;
11323
- this.outputs = outputs;
11324
- this.tViews = tViews;
11325
- this.next = next;
11326
- this.projectionNext = projectionNext;
11327
- this.child = child;
11328
- this.parent = parent;
11329
- this.projection = projection;
11330
- this.styles = styles;
11331
- this.stylesWithoutHost = stylesWithoutHost;
11332
- this.residualStyles = residualStyles;
11333
- this.classes = classes;
11334
- this.classesWithoutHost = classesWithoutHost;
11335
- this.residualClasses = residualClasses;
11336
- this.classBindings = classBindings;
11337
- this.styleBindings = styleBindings;
11338
- }
11339
- /**
11340
- * Return a human debug version of the set of `NodeInjector`s which will be consulted when
11341
- * resolving tokens from this `TNode`.
11342
- *
11343
- * When debugging applications, it is often difficult to determine which `NodeInjector`s will be
11344
- * consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be
11345
- * consulted in order when resolving a token starting at this `TNode`.
11346
- *
11347
- * The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is
11348
- * difficult to reason about.
11349
- *
11350
- * @param lView The `LView` instance for this `TNode`.
11351
- */
11352
- debugNodeInjectorPath(lView) {
11353
- const path = [];
11354
- let injectorIndex = getInjectorIndex(this, lView);
11355
- if (injectorIndex === -1) {
11356
- // Looks like the current `TNode` does not have `NodeInjector` associated with it => look for
11357
- // parent NodeInjector.
11358
- const parentLocation = getParentInjectorLocation(this, lView);
11359
- if (parentLocation !== NO_PARENT_INJECTOR) {
11360
- // We found a parent, so start searching from the parent location.
11361
- injectorIndex = getParentInjectorIndex(parentLocation);
11362
- lView = getParentInjectorView(parentLocation, lView);
11363
- }
11364
- else {
11365
- // No parents have been found, so there are no `NodeInjector`s to consult.
11366
- }
11367
- }
11368
- while (injectorIndex !== -1) {
11369
- ngDevMode && assertNodeInjector(lView, injectorIndex);
11370
- const tNode = lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];
11371
- path.push(buildDebugNode(tNode, lView));
11372
- const parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];
11373
- if (parentLocation === NO_PARENT_INJECTOR) {
11374
- injectorIndex = -1;
11375
- }
11376
- else {
11377
- injectorIndex = getParentInjectorIndex(parentLocation);
11378
- lView = getParentInjectorView(parentLocation, lView);
11379
- }
11380
- }
11381
- return path;
11382
- }
11383
- get type_() {
11384
- return toTNodeTypeAsString(this.type) || `TNodeType.?${this.type}?`;
11385
- }
11386
- get flags_() {
11387
- const flags = [];
11388
- if (this.flags & 8 /* TNodeFlags.hasClassInput */)
11389
- flags.push('TNodeFlags.hasClassInput');
11390
- if (this.flags & 4 /* TNodeFlags.hasContentQuery */)
11391
- flags.push('TNodeFlags.hasContentQuery');
11392
- if (this.flags & 16 /* TNodeFlags.hasStyleInput */)
11393
- flags.push('TNodeFlags.hasStyleInput');
11394
- if (this.flags & 64 /* TNodeFlags.hasHostBindings */)
11395
- flags.push('TNodeFlags.hasHostBindings');
11396
- if (this.flags & 1 /* TNodeFlags.isDirectiveHost */)
11397
- flags.push('TNodeFlags.isDirectiveHost');
11398
- if (this.flags & 32 /* TNodeFlags.isDetached */)
11399
- flags.push('TNodeFlags.isDetached');
11400
- if (this.flags & 2 /* TNodeFlags.isProjected */)
11401
- flags.push('TNodeFlags.isProjected');
11402
- return flags.join('|');
11403
- }
11404
- get template_() {
11405
- if (this.type & 1 /* TNodeType.Text */)
11406
- return this.value;
11407
- const buf = [];
11408
- const tagName = typeof this.value === 'string' && this.value || this.type_;
11409
- buf.push('<', tagName);
11410
- if (this.flags) {
11411
- buf.push(' ', this.flags_);
11412
- }
11413
- if (this.attrs) {
11414
- for (let i = 0; i < this.attrs.length;) {
11415
- const attrName = this.attrs[i++];
11416
- if (typeof attrName == 'number') {
11417
- break;
11418
- }
11419
- const attrValue = this.attrs[i++];
11420
- buf.push(' ', attrName, '="', attrValue, '"');
11421
- }
11422
- }
11423
- buf.push('>');
11424
- processTNodeChildren(this.child, buf);
11425
- buf.push('</', tagName, '>');
11426
- return buf.join('');
11427
- }
11428
- get styleBindings_() {
11429
- return toDebugStyleBinding(this, false);
11430
- }
11431
- get classBindings_() {
11432
- return toDebugStyleBinding(this, true);
11433
- }
11434
- get providerIndexStart_() {
11435
- return this.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;
11436
- }
11437
- get providerIndexEnd_() {
11438
- return this.providerIndexStart_ +
11439
- (this.providerIndexes >>> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */);
11440
- }
11441
- }
11442
- const TNodeDebug = TNode;
11443
- function toDebugStyleBinding(tNode, isClassBased) {
11444
- const tData = tNode.tView_.data;
11445
- const bindings = [];
11446
- const range = isClassBased ? tNode.classBindings : tNode.styleBindings;
11447
- const prev = getTStylingRangePrev(range);
11448
- const next = getTStylingRangeNext(range);
11449
- let isTemplate = next !== 0;
11450
- let cursor = isTemplate ? next : prev;
11451
- while (cursor !== 0) {
11452
- const itemKey = tData[cursor];
11453
- const itemRange = tData[cursor + 1];
11454
- bindings.unshift({
11455
- key: itemKey,
11456
- index: cursor,
11457
- isTemplate: isTemplate,
11458
- prevDuplicate: getTStylingRangePrevDuplicate(itemRange),
11459
- nextDuplicate: getTStylingRangeNextDuplicate(itemRange),
11460
- nextIndex: getTStylingRangeNext(itemRange),
11461
- prevIndex: getTStylingRangePrev(itemRange),
11462
- });
11463
- if (cursor === prev)
11464
- isTemplate = false;
11465
- cursor = getTStylingRangePrev(itemRange);
11466
- }
11467
- bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);
11468
- return bindings;
11469
- }
11470
- function processTNodeChildren(tNode, buf) {
11471
- while (tNode) {
11472
- buf.push(tNode.template_);
11473
- tNode = tNode.next;
11474
- }
11475
- }
11476
- class TViewData extends Array {
11477
- }
11478
- let TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because
11479
- // `LView` constructor could have side-effects.
11480
- /**
11481
- * This function clones a blueprint and creates TData.
11482
- *
11483
- * Simple slice will keep the same type, and we need it to be TData
11484
- */
11485
- function cloneToTViewData(list) {
11486
- if (TVIEWDATA_EMPTY === undefined)
11487
- TVIEWDATA_EMPTY = new TViewData();
11488
- return TVIEWDATA_EMPTY.concat(list);
11489
- }
11490
- class LViewBlueprint extends Array {
11491
- }
11492
- class MatchesArray extends Array {
11493
- }
11494
- class TViewComponents extends Array {
11495
- }
11496
- class TNodeLocalNames extends Array {
11497
- }
11498
- class TNodeInitialInputs extends Array {
11499
- }
11500
- class LCleanup extends Array {
11501
- }
11502
- class TCleanup extends Array {
11503
- }
11504
- function attachLViewDebug(lView) {
11505
- attachDebugObject(lView, new LViewDebug(lView));
11506
- }
11507
- function attachLContainerDebug(lContainer) {
11508
- attachDebugObject(lContainer, new LContainerDebug(lContainer));
11509
- }
11510
- function toDebug(obj) {
11511
- if (obj) {
11512
- const debug = obj.debug;
11513
- assertDefined(debug, 'Object does not have a debug representation.');
11514
- return debug;
11515
- }
11516
- else {
11517
- return obj;
11518
- }
11519
- }
11520
- /**
11521
- * Use this method to unwrap a native element in `LView` and convert it into HTML for easier
11522
- * reading.
11523
- *
11524
- * @param value possibly wrapped native DOM node.
11525
- * @param includeChildren If `true` then the serialized HTML form will include child elements
11526
- * (same
11527
- * as `outerHTML`). If `false` then the serialized HTML form will only contain the element
11528
- * itself
11529
- * (will not serialize child elements).
11530
- */
11531
- function toHtml(value, includeChildren = false) {
11532
- const node = unwrapRNode(value);
11533
- if (node) {
11534
- switch (node.nodeType) {
11535
- case Node.TEXT_NODE:
11536
- return node.textContent;
11537
- case Node.COMMENT_NODE:
11538
- return `<!--${node.textContent}-->`;
11539
- case Node.ELEMENT_NODE:
11540
- const outerHTML = node.outerHTML;
11541
- if (includeChildren) {
11542
- return outerHTML;
11543
- }
11544
- else {
11545
- const innerHTML = '>' + node.innerHTML + '<';
11546
- return (outerHTML.split(innerHTML)[0]) + '>';
11547
- }
11548
- }
11549
- }
11550
- return null;
11551
- }
11552
- class LViewDebug {
11553
- constructor(_raw_lView) {
11554
- this._raw_lView = _raw_lView;
11555
- }
11556
- /**
11557
- * Flags associated with the `LView` unpacked into a more readable state.
11558
- */
11559
- get flags() {
11560
- const flags = this._raw_lView[FLAGS];
11561
- return {
11562
- __raw__flags__: flags,
11563
- initPhaseState: flags & 3 /* LViewFlags.InitPhaseStateMask */,
11564
- creationMode: !!(flags & 4 /* LViewFlags.CreationMode */),
11565
- firstViewPass: !!(flags & 8 /* LViewFlags.FirstLViewPass */),
11566
- checkAlways: !!(flags & 16 /* LViewFlags.CheckAlways */),
11567
- dirty: !!(flags & 32 /* LViewFlags.Dirty */),
11568
- attached: !!(flags & 64 /* LViewFlags.Attached */),
11569
- destroyed: !!(flags & 128 /* LViewFlags.Destroyed */),
11570
- isRoot: !!(flags & 256 /* LViewFlags.IsRoot */),
11571
- indexWithinInitPhase: flags >> 11 /* LViewFlags.IndexWithinInitPhaseShift */,
11572
- };
11573
- }
11574
- get parent() {
11575
- return toDebug(this._raw_lView[PARENT]);
11576
- }
11577
- get hostHTML() {
11578
- return toHtml(this._raw_lView[HOST], true);
11579
- }
11580
- get html() {
11581
- return (this.nodes || []).map(mapToHTML).join('');
11582
- }
11583
- get context() {
11584
- return this._raw_lView[CONTEXT];
11585
- }
11586
- /**
11587
- * The tree of nodes associated with the current `LView`. The nodes have been normalized into
11588
- * a tree structure with relevant details pulled out for readability.
11589
- */
11590
- get nodes() {
11591
- const lView = this._raw_lView;
11592
- const tNode = lView[TVIEW].firstChild;
11593
- return toDebugNodes(tNode, lView);
11594
- }
11595
- get template() {
11596
- return this.tView.template_;
11597
- }
11598
- get tView() {
11599
- return this._raw_lView[TVIEW];
11600
- }
11601
- get cleanup() {
11602
- return this._raw_lView[CLEANUP];
11603
- }
11604
- get injector() {
11605
- return this._raw_lView[INJECTOR$1];
11606
- }
11607
- get rendererFactory() {
11608
- return this._raw_lView[RENDERER_FACTORY];
11609
- }
11610
- get renderer() {
11611
- return this._raw_lView[RENDERER];
11612
- }
11613
- get sanitizer() {
11614
- return this._raw_lView[SANITIZER];
11615
- }
11616
- get childHead() {
11617
- return toDebug(this._raw_lView[CHILD_HEAD]);
11618
- }
11619
- get next() {
11620
- return toDebug(this._raw_lView[NEXT]);
11621
- }
11622
- get childTail() {
11623
- return toDebug(this._raw_lView[CHILD_TAIL]);
11624
- }
11625
- get declarationView() {
11626
- return toDebug(this._raw_lView[DECLARATION_VIEW]);
11627
- }
11628
- get queries() {
11629
- return this._raw_lView[QUERIES];
11630
- }
11631
- get tHost() {
11632
- return this._raw_lView[T_HOST];
11633
- }
11634
- get id() {
11635
- return this._raw_lView[ID];
11636
- }
11637
- get decls() {
11638
- return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);
11639
- }
11640
- get vars() {
11641
- return toLViewRange(this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex);
11642
- }
11643
- get expando() {
11644
- return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);
11645
- }
11646
- /**
11647
- * Normalized view of child views (and containers) attached at this location.
11648
- */
11649
- get childViews() {
11650
- const childViews = [];
11651
- let child = this.childHead;
11652
- while (child) {
11653
- childViews.push(child);
11654
- child = child.next;
11655
- }
11656
- return childViews;
11657
- }
11658
- }
11659
- function mapToHTML(node) {
11660
- if (node.type === 'ElementContainer') {
11661
- return (node.children || []).map(mapToHTML).join('');
11662
- }
11663
- else if (node.type === 'IcuContainer') {
11664
- throw new Error('Not implemented');
11665
- }
11666
- else {
11667
- return toHtml(node.native, true) || '';
11668
- }
11669
- }
11670
- function toLViewRange(tView, lView, start, end) {
11671
- let content = [];
11672
- for (let index = start; index < end; index++) {
11673
- content.push({ index: index, t: tView.data[index], l: lView[index] });
11674
- }
11675
- return { start: start, end: end, length: end - start, content: content };
11676
- }
11677
- /**
11678
- * Turns a flat list of nodes into a tree by walking the associated `TNode` tree.
11679
- *
11680
- * @param tNode
11681
- * @param lView
11682
- */
11683
- function toDebugNodes(tNode, lView) {
11684
- if (tNode) {
11685
- const debugNodes = [];
11686
- let tNodeCursor = tNode;
11687
- while (tNodeCursor) {
11688
- debugNodes.push(buildDebugNode(tNodeCursor, lView));
11689
- tNodeCursor = tNodeCursor.next;
11690
- }
11691
- return debugNodes;
11692
- }
11693
- else {
11694
- return [];
11695
- }
11696
- }
11697
- function buildDebugNode(tNode, lView) {
11698
- const rawValue = lView[tNode.index];
11699
- const native = unwrapRNode(rawValue);
11700
- const factories = [];
11701
- const instances = [];
11702
- const tView = lView[TVIEW];
11703
- for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {
11704
- const def = tView.data[i];
11705
- factories.push(def.type);
11706
- instances.push(lView[i]);
11707
- }
11708
- return {
11709
- html: toHtml(native),
11710
- type: toTNodeTypeAsString(tNode.type),
11711
- tNode,
11712
- native: native,
11713
- children: toDebugNodes(tNode.child, lView),
11714
- factories,
11715
- instances,
11716
- injector: buildNodeInjectorDebug(tNode, tView, lView),
11717
- get injectorResolutionPath() {
11718
- return tNode.debugNodeInjectorPath(lView);
11719
- },
11720
- };
11721
- }
11722
- function buildNodeInjectorDebug(tNode, tView, lView) {
11723
- const viewProviders = [];
11724
- for (let i = tNode.providerIndexStart_; i < tNode.providerIndexEnd_; i++) {
11725
- viewProviders.push(tView.data[i]);
11726
- }
11727
- const providers = [];
11728
- for (let i = tNode.providerIndexEnd_; i < tNode.directiveEnd; i++) {
11729
- providers.push(tView.data[i]);
11730
- }
11731
- const nodeInjectorDebug = {
11732
- bloom: toBloom(lView, tNode.injectorIndex),
11733
- cumulativeBloom: toBloom(tView.data, tNode.injectorIndex),
11734
- providers,
11735
- viewProviders,
11736
- parentInjectorIndex: lView[tNode.providerIndexStart_ - 1],
11737
- };
11738
- return nodeInjectorDebug;
11739
- }
11740
- /**
11741
- * Convert a number at `idx` location in `array` into binary representation.
11742
- *
11743
- * @param array
11744
- * @param idx
11745
- */
11746
- function binary(array, idx) {
11747
- const value = array[idx];
11748
- // If not a number we print 8 `?` to retain alignment but let user know that it was called on
11749
- // wrong type.
11750
- if (typeof value !== 'number')
11751
- return '????????';
11752
- // We prefix 0s so that we have constant length number
11753
- const text = '00000000' + value.toString(2);
11754
- return text.substring(text.length - 8);
11755
- }
11756
- /**
11757
- * Convert a bloom filter at location `idx` in `array` into binary representation.
11758
- *
11759
- * @param array
11760
- * @param idx
11761
- */
11762
- function toBloom(array, idx) {
11763
- if (idx < 0) {
11764
- return 'NO_NODE_INJECTOR';
11765
- }
11766
- return `${binary(array, idx + 7)}_${binary(array, idx + 6)}_${binary(array, idx + 5)}_${binary(array, idx + 4)}_${binary(array, idx + 3)}_${binary(array, idx + 2)}_${binary(array, idx + 1)}_${binary(array, idx + 0)}`;
11767
- }
11768
- class LContainerDebug {
11769
- constructor(_raw_lContainer) {
11770
- this._raw_lContainer = _raw_lContainer;
11771
- }
11772
- get hasTransplantedViews() {
11773
- return this._raw_lContainer[HAS_TRANSPLANTED_VIEWS];
11774
- }
11775
- get views() {
11776
- return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET)
11777
- .map(toDebug);
11778
- }
11779
- get parent() {
11780
- return toDebug(this._raw_lContainer[PARENT]);
11781
- }
11782
- get movedViews() {
11783
- return this._raw_lContainer[MOVED_VIEWS];
11784
- }
11785
- get host() {
11786
- return this._raw_lContainer[HOST];
11787
- }
11788
- get native() {
11789
- return this._raw_lContainer[NATIVE];
11790
- }
11791
- get next() {
11792
- return toDebug(this._raw_lContainer[NEXT]);
11793
- }
11794
- }
11795
-
11796
10976
  /**
11797
10977
  * @license
11798
10978
  * Copyright Google LLC All Rights Reserved.
@@ -11866,7 +11046,7 @@ function renderChildComponents(hostLView, components) {
11866
11046
  }
11867
11047
  }
11868
11048
  function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {
11869
- const lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice();
11049
+ const lView = tView.blueprint.slice();
11870
11050
  lView[HOST] = host;
11871
11051
  lView[FLAGS] = flags | 4 /* LViewFlags.CreationMode */ | 64 /* LViewFlags.Attached */ | 8 /* LViewFlags.FirstLViewPass */;
11872
11052
  if (embeddedViewInjector !== null ||
@@ -11890,7 +11070,6 @@ function createLView(parentLView, tView, context, flags, host, tHostNode, render
11890
11070
  assertEqual(tView.type == 2 /* TViewType.Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
11891
11071
  lView[DECLARATION_COMPONENT_VIEW] =
11892
11072
  tView.type == 2 /* TViewType.Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;
11893
- ngDevMode && attachLViewDebug(lView);
11894
11073
  return lView;
11895
11074
  }
11896
11075
  function getOrCreateTNode(tView, index, type, name, attrs) {
@@ -12273,73 +11452,38 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
12273
11452
  const initialViewLength = bindingStartIndex + vars;
12274
11453
  const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
12275
11454
  const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;
12276
- const tView = blueprint[TVIEW] = ngDevMode ?
12277
- new TViewConstructor(type, // type: TViewType,
12278
- blueprint, // blueprint: LView,
12279
- templateFn, // template: ComponentTemplate<{}>|null,
12280
- null, // queries: TQueries|null
12281
- viewQuery, // viewQuery: ViewQueriesFunction<{}>|null,
12282
- declTNode, // declTNode: TNode|null,
12283
- cloneToTViewData(blueprint).fill(null, bindingStartIndex), // data: TData,
12284
- bindingStartIndex, // bindingStartIndex: number,
12285
- initialViewLength, // expandoStartIndex: number,
12286
- null, // hostBindingOpCodes: HostBindingOpCodes,
12287
- true, // firstCreatePass: boolean,
12288
- true, // firstUpdatePass: boolean,
12289
- false, // staticViewQueries: boolean,
12290
- false, // staticContentQueries: boolean,
12291
- null, // preOrderHooks: HookData|null,
12292
- null, // preOrderCheckHooks: HookData|null,
12293
- null, // contentHooks: HookData|null,
12294
- null, // contentCheckHooks: HookData|null,
12295
- null, // viewHooks: HookData|null,
12296
- null, // viewCheckHooks: HookData|null,
12297
- null, // destroyHooks: DestroyHookData|null,
12298
- null, // cleanup: any[]|null,
12299
- null, // contentQueries: number[]|null,
12300
- null, // components: number[]|null,
12301
- typeof directives === 'function' ? //
12302
- directives() : //
12303
- directives, // directiveRegistry: DirectiveDefList|null,
12304
- typeof pipes === 'function' ? pipes() : pipes, // pipeRegistry: PipeDefList|null,
12305
- null, // firstChild: TNode|null,
12306
- schemas, // schemas: SchemaMetadata[]|null,
12307
- consts, // consts: TConstants|null
12308
- false, // incompleteFirstPass: boolean
12309
- decls, // ngDevMode only: decls
12310
- vars) :
12311
- {
12312
- type: type,
12313
- blueprint: blueprint,
12314
- template: templateFn,
12315
- queries: null,
12316
- viewQuery: viewQuery,
12317
- declTNode: declTNode,
12318
- data: blueprint.slice().fill(null, bindingStartIndex),
12319
- bindingStartIndex: bindingStartIndex,
12320
- expandoStartIndex: initialViewLength,
12321
- hostBindingOpCodes: null,
12322
- firstCreatePass: true,
12323
- firstUpdatePass: true,
12324
- staticViewQueries: false,
12325
- staticContentQueries: false,
12326
- preOrderHooks: null,
12327
- preOrderCheckHooks: null,
12328
- contentHooks: null,
12329
- contentCheckHooks: null,
12330
- viewHooks: null,
12331
- viewCheckHooks: null,
12332
- destroyHooks: null,
12333
- cleanup: null,
12334
- contentQueries: null,
12335
- components: null,
12336
- directiveRegistry: typeof directives === 'function' ? directives() : directives,
12337
- pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
12338
- firstChild: null,
12339
- schemas: schemas,
12340
- consts: consts,
12341
- incompleteFirstPass: false
12342
- };
11455
+ const tView = blueprint[TVIEW] = {
11456
+ type: type,
11457
+ blueprint: blueprint,
11458
+ template: templateFn,
11459
+ queries: null,
11460
+ viewQuery: viewQuery,
11461
+ declTNode: declTNode,
11462
+ data: blueprint.slice().fill(null, bindingStartIndex),
11463
+ bindingStartIndex: bindingStartIndex,
11464
+ expandoStartIndex: initialViewLength,
11465
+ hostBindingOpCodes: null,
11466
+ firstCreatePass: true,
11467
+ firstUpdatePass: true,
11468
+ staticViewQueries: false,
11469
+ staticContentQueries: false,
11470
+ preOrderHooks: null,
11471
+ preOrderCheckHooks: null,
11472
+ contentHooks: null,
11473
+ contentCheckHooks: null,
11474
+ viewHooks: null,
11475
+ viewCheckHooks: null,
11476
+ destroyHooks: null,
11477
+ cleanup: null,
11478
+ contentQueries: null,
11479
+ components: null,
11480
+ directiveRegistry: typeof directives === 'function' ? directives() : directives,
11481
+ pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
11482
+ firstChild: null,
11483
+ schemas: schemas,
11484
+ consts: consts,
11485
+ incompleteFirstPass: false
11486
+ };
12343
11487
  if (ngDevMode) {
12344
11488
  // For performance reasons it is important that the tView retains the same shape during runtime.
12345
11489
  // (To make sure that all of the code is monomorphic.) For this reason we seal the object to
@@ -12349,7 +11493,7 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
12349
11493
  return tView;
12350
11494
  }
12351
11495
  function createViewBlueprint(bindingStartIndex, initialViewLength) {
12352
- const blueprint = ngDevMode ? new LViewBlueprint() : [];
11496
+ const blueprint = [];
12353
11497
  for (let i = 0; i < initialViewLength; i++) {
12354
11498
  blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);
12355
11499
  }
@@ -12402,74 +11546,40 @@ function createTNode(tView, tParent, type, index, value, attrs) {
12402
11546
  ngDevMode && ngDevMode.tNode++;
12403
11547
  ngDevMode && tParent && assertTNodeForTView(tParent, tView);
12404
11548
  let injectorIndex = tParent ? tParent.injectorIndex : -1;
12405
- const tNode = ngDevMode ?
12406
- new TNodeDebug(tView, // tView_: TView
12407
- type, // type: TNodeType
12408
- index, // index: number
12409
- null, // insertBeforeIndex: null|-1|number|number[]
12410
- injectorIndex, // injectorIndex: number
12411
- -1, // componentOffset: number
12412
- -1, // directiveStart: number
12413
- -1, // directiveEnd: number
12414
- -1, // directiveStylingLast: number
12415
- null, // propertyBindings: number[]|null
12416
- 0, // flags: TNodeFlags
12417
- 0, // providerIndexes: TNodeProviderIndexes
12418
- value, // value: string|null
12419
- attrs, // attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null
12420
- null, // mergedAttrs
12421
- null, // localNames: (string|number)[]|null
12422
- undefined, // initialInputs: (string[]|null)[]|null|undefined
12423
- null, // inputs: PropertyAliases|null
12424
- null, // outputs: PropertyAliases|null
12425
- null, // tViews: ITView|ITView[]|null
12426
- null, // next: ITNode|null
12427
- null, // projectionNext: ITNode|null
12428
- null, // child: ITNode|null
12429
- tParent, // parent: TElementNode|TContainerNode|null
12430
- null, // projection: number|(ITNode|RNode[])[]|null
12431
- null, // styles: string|null
12432
- null, // stylesWithoutHost: string|null
12433
- undefined, // residualStyles: string|null
12434
- null, // classes: string|null
12435
- null, // classesWithoutHost: string|null
12436
- undefined, // residualClasses: string|null
12437
- 0, // classBindings: TStylingRange;
12438
- 0) :
12439
- {
12440
- type,
12441
- index,
12442
- insertBeforeIndex: null,
12443
- injectorIndex,
12444
- directiveStart: -1,
12445
- directiveEnd: -1,
12446
- directiveStylingLast: -1,
12447
- componentOffset: -1,
12448
- propertyBindings: null,
12449
- flags: 0,
12450
- providerIndexes: 0,
12451
- value: value,
12452
- attrs: attrs,
12453
- mergedAttrs: null,
12454
- localNames: null,
12455
- initialInputs: undefined,
12456
- inputs: null,
12457
- outputs: null,
12458
- tViews: null,
12459
- next: null,
12460
- projectionNext: null,
12461
- child: null,
12462
- parent: tParent,
12463
- projection: null,
12464
- styles: null,
12465
- stylesWithoutHost: null,
12466
- residualStyles: undefined,
12467
- classes: null,
12468
- classesWithoutHost: null,
12469
- residualClasses: undefined,
12470
- classBindings: 0,
12471
- styleBindings: 0,
12472
- };
11549
+ const tNode = {
11550
+ type,
11551
+ index,
11552
+ insertBeforeIndex: null,
11553
+ injectorIndex,
11554
+ directiveStart: -1,
11555
+ directiveEnd: -1,
11556
+ directiveStylingLast: -1,
11557
+ componentOffset: -1,
11558
+ propertyBindings: null,
11559
+ flags: 0,
11560
+ providerIndexes: 0,
11561
+ value: value,
11562
+ attrs: attrs,
11563
+ mergedAttrs: null,
11564
+ localNames: null,
11565
+ initialInputs: undefined,
11566
+ inputs: null,
11567
+ outputs: null,
11568
+ tViews: null,
11569
+ next: null,
11570
+ projectionNext: null,
11571
+ child: null,
11572
+ parent: tParent,
11573
+ projection: null,
11574
+ styles: null,
11575
+ stylesWithoutHost: null,
11576
+ residualStyles: undefined,
11577
+ classes: null,
11578
+ classesWithoutHost: null,
11579
+ residualClasses: undefined,
11580
+ classBindings: 0,
11581
+ styleBindings: 0,
11582
+ };
12473
11583
  if (ngDevMode) {
12474
11584
  // For performance reasons it is important that the tNode retains the same shape during runtime.
12475
11585
  // (To make sure that all of the code is monomorphic.) For this reason we seal the object to
@@ -12526,7 +11636,7 @@ function initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefinitionMa
12526
11636
  const end = tNode.directiveEnd;
12527
11637
  const tViewData = tView.data;
12528
11638
  const tNodeAttrs = tNode.attrs;
12529
- const inputsFromAttrs = ngDevMode ? new TNodeInitialInputs() : [];
11639
+ const inputsFromAttrs = [];
12530
11640
  let inputsStore = null;
12531
11641
  let outputsStore = null;
12532
11642
  for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {
@@ -12864,7 +11974,7 @@ function findDirectiveDefMatches(tView, tNode) {
12864
11974
  for (let i = 0; i < registry.length; i++) {
12865
11975
  const def = registry[i];
12866
11976
  if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {
12867
- matches || (matches = ngDevMode ? new MatchesArray() : []);
11977
+ matches || (matches = []);
12868
11978
  if (isComponentDef(def)) {
12869
11979
  if (ngDevMode) {
12870
11980
  assertTNodeType(tNode, 2 /* TNodeType.Element */, `"${tNode.value}" tags cannot be used as component hosts. ` +
@@ -12922,13 +12032,12 @@ function markAsComponentHost(tView, hostTNode, componentOffset) {
12922
12032
  ngDevMode && assertFirstCreatePass(tView);
12923
12033
  ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');
12924
12034
  hostTNode.componentOffset = componentOffset;
12925
- (tView.components || (tView.components = ngDevMode ? new TViewComponents() : []))
12926
- .push(hostTNode.index);
12035
+ (tView.components || (tView.components = [])).push(hostTNode.index);
12927
12036
  }
12928
12037
  /** Caches local names and their matching directive indices for query and template lookups. */
12929
12038
  function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
12930
12039
  if (localRefs) {
12931
- const localNames = tNode.localNames = ngDevMode ? new TNodeLocalNames() : [];
12040
+ const localNames = tNode.localNames = [];
12932
12041
  // Local names must be stored in tNode in the same order that localRefs are defined
12933
12042
  // in the template to ensure the data is loaded in the same slots as their refs
12934
12043
  // in the template (for template queries).
@@ -13111,9 +12220,6 @@ function generateInitialInputs(inputs, directiveIndex, attrs) {
13111
12220
  //////////////////////////
13112
12221
  //// ViewContainer & View
13113
12222
  //////////////////////////
13114
- // Not sure why I need to do `any` here but TS complains later.
13115
- const LContainerArray = class LContainer extends Array {
13116
- };
13117
12223
  /**
13118
12224
  * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
13119
12225
  *
@@ -13126,20 +12232,20 @@ const LContainerArray = class LContainer extends Array {
13126
12232
  */
13127
12233
  function createLContainer(hostNative, currentView, native, tNode) {
13128
12234
  ngDevMode && assertLView(currentView);
13129
- // https://jsperf.com/array-literal-vs-new-array-really
13130
- const lContainer = new (ngDevMode ? LContainerArray : Array)(hostNative, // host native
13131
- true, // Boolean `true` in this position signifies that this is an `LContainer`
13132
- false, // has transplanted views
13133
- currentView, // parent
13134
- null, // next
13135
- 0, // transplanted views to refresh count
13136
- tNode, // t_host
13137
- native, // native,
13138
- null, // view refs
13139
- null);
12235
+ const lContainer = [
12236
+ hostNative,
12237
+ true,
12238
+ false,
12239
+ currentView,
12240
+ null,
12241
+ 0,
12242
+ tNode,
12243
+ native,
12244
+ null,
12245
+ null, // moved views
12246
+ ];
13140
12247
  ngDevMode &&
13141
12248
  assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');
13142
- ngDevMode && attachLContainerDebug(lContainer);
13143
12249
  return lContainer;
13144
12250
  }
13145
12251
  /**
@@ -13413,10 +12519,10 @@ function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex,
13413
12519
  }
13414
12520
  function getOrCreateLViewCleanup(view) {
13415
12521
  // top level variables should not be exported for performance reasons (PERF_NOTES.md)
13416
- return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup() : []);
12522
+ return view[CLEANUP] || (view[CLEANUP] = []);
13417
12523
  }
13418
12524
  function getOrCreateTViewCleanup(tView) {
13419
- return tView.cleanup || (tView.cleanup = ngDevMode ? new TCleanup() : []);
12525
+ return tView.cleanup || (tView.cleanup = []);
13420
12526
  }
13421
12527
  /**
13422
12528
  * There are cases where the sub component's renderer needs to be included
@@ -14028,17 +13134,6 @@ class ComponentFactory extends ComponentFactory$1 {
14028
13134
  return new ComponentRef(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);
14029
13135
  }
14030
13136
  }
14031
- const componentFactoryResolver = new ComponentFactoryResolver();
14032
- /**
14033
- * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the
14034
- * ComponentFactoryResolver
14035
- * already exists, retrieves the existing ComponentFactoryResolver.
14036
- *
14037
- * @returns The ComponentFactoryResolver instance to use
14038
- */
14039
- function injectComponentFactoryResolver() {
14040
- return componentFactoryResolver;
14041
- }
14042
13137
  /**
14043
13138
  * Represents an instance of a Component created via a {@link ComponentFactory}.
14044
13139
  *
@@ -16624,6 +15719,62 @@ function ɵɵpropertyInterpolateV(propName, values, sanitizer) {
16624
15719
  return ɵɵpropertyInterpolateV;
16625
15720
  }
16626
15721
 
15722
+ /**
15723
+ * @license
15724
+ * Copyright Google LLC All Rights Reserved.
15725
+ *
15726
+ * Use of this source code is governed by an MIT-style license that can be
15727
+ * found in the LICENSE file at https://angular.io/license
15728
+ */
15729
+ function toTStylingRange(prev, next) {
15730
+ ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
15731
+ ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
15732
+ return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
15733
+ }
15734
+ function getTStylingRangePrev(tStylingRange) {
15735
+ ngDevMode && assertNumber(tStylingRange, 'expected number');
15736
+ return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
15737
+ }
15738
+ function getTStylingRangePrevDuplicate(tStylingRange) {
15739
+ ngDevMode && assertNumber(tStylingRange, 'expected number');
15740
+ return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
15741
+ 2 /* StylingRange.PREV_DUPLICATE */;
15742
+ }
15743
+ function setTStylingRangePrev(tStylingRange, previous) {
15744
+ ngDevMode && assertNumber(tStylingRange, 'expected number');
15745
+ ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
15746
+ return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
15747
+ (previous << 17 /* StylingRange.PREV_SHIFT */));
15748
+ }
15749
+ function setTStylingRangePrevDuplicate(tStylingRange) {
15750
+ ngDevMode && assertNumber(tStylingRange, 'expected number');
15751
+ return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
15752
+ }
15753
+ function getTStylingRangeNext(tStylingRange) {
15754
+ ngDevMode && assertNumber(tStylingRange, 'expected number');
15755
+ return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
15756
+ }
15757
+ function setTStylingRangeNext(tStylingRange, next) {
15758
+ ngDevMode && assertNumber(tStylingRange, 'expected number');
15759
+ ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
15760
+ return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
15761
+ next << 2 /* StylingRange.NEXT_SHIFT */);
15762
+ }
15763
+ function getTStylingRangeNextDuplicate(tStylingRange) {
15764
+ ngDevMode && assertNumber(tStylingRange, 'expected number');
15765
+ return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
15766
+ 1 /* StylingRange.NEXT_DUPLICATE */;
15767
+ }
15768
+ function setTStylingRangeNextDuplicate(tStylingRange) {
15769
+ ngDevMode && assertNumber(tStylingRange, 'expected number');
15770
+ return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
15771
+ }
15772
+ function getTStylingRangeTail(tStylingRange) {
15773
+ ngDevMode && assertNumber(tStylingRange, 'expected number');
15774
+ const next = getTStylingRangeNext(tStylingRange);
15775
+ return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
15776
+ }
15777
+
16627
15778
  /**
16628
15779
  * @license
16629
15780
  * Copyright Google LLC All Rights Reserved.
@@ -20445,6 +19596,46 @@ function loadIcuContainerVisitor() {
20445
19596
  return icuContainerIteratorStart;
20446
19597
  }
20447
19598
 
19599
+ /**
19600
+ * @license
19601
+ * Copyright Google LLC All Rights Reserved.
19602
+ *
19603
+ * Use of this source code is governed by an MIT-style license that can be
19604
+ * found in the LICENSE file at https://angular.io/license
19605
+ */
19606
+ /**
19607
+ * Patch a `debug` property on top of the existing object.
19608
+ *
19609
+ * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
19610
+ *
19611
+ * @param obj Object to patch
19612
+ * @param debug Value to patch
19613
+ */
19614
+ function attachDebugObject(obj, debug) {
19615
+ if (ngDevMode) {
19616
+ Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
19617
+ }
19618
+ else {
19619
+ throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
19620
+ }
19621
+ }
19622
+ /**
19623
+ * Patch a `debug` property getter on top of the existing object.
19624
+ *
19625
+ * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
19626
+ *
19627
+ * @param obj Object to patch
19628
+ * @param debugGetter Getter returning a value to patch
19629
+ */
19630
+ function attachDebugGetter(obj, debugGetter) {
19631
+ if (ngDevMode) {
19632
+ Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
19633
+ }
19634
+ else {
19635
+ throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
19636
+ }
19637
+ }
19638
+
20448
19639
  /**
20449
19640
  * @license
20450
19641
  * Copyright Google LLC All Rights Reserved.
@@ -22414,32 +21605,6 @@ function sortListeners(a, b) {
22414
21605
  function isDirectiveDefHack(obj) {
22415
21606
  return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;
22416
21607
  }
22417
- /**
22418
- * Returns the attached `DebugNode` instance for an element in the DOM.
22419
- *
22420
- * @param element DOM element which is owned by an existing component's view.
22421
- */
22422
- function getDebugNode$1(element) {
22423
- if (ngDevMode && !(element instanceof Node)) {
22424
- throw new Error('Expecting instance of DOM Element');
22425
- }
22426
- const lContext = getLContext(element);
22427
- const lView = lContext ? lContext.lView : null;
22428
- if (lView === null) {
22429
- return null;
22430
- }
22431
- const nodeIndex = lContext.nodeIndex;
22432
- if (nodeIndex !== -1) {
22433
- const valueInLView = lView[nodeIndex];
22434
- // this means that value in the lView is a component with its own
22435
- // data. In this situation the TNode is not accessed at the same spot.
22436
- const tNode = isLView(valueInLView) ? valueInLView[T_HOST] : getTNode(lView[TVIEW], nodeIndex);
22437
- ngDevMode &&
22438
- assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index');
22439
- return buildDebugNode(tNode, lView);
22440
- }
22441
- return null;
22442
- }
22443
21608
  /**
22444
21609
  * Retrieve the component `LView` from component/element.
22445
21610
  *