@angular/compiler-cli 20.0.0-next.0 → 20.0.0-next.2

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 (67) hide show
  1. package/bundles/{chunk-STORTTKY.js → chunk-37JMVF7H.js} +8 -8
  2. package/bundles/{chunk-5UDS2TPQ.js → chunk-77D5CI2U.js} +7 -7
  3. package/bundles/{chunk-5B64KRP2.js → chunk-7HRFJETP.js} +49 -42
  4. package/bundles/{chunk-5B64KRP2.js.map → chunk-7HRFJETP.js.map} +1 -1
  5. package/bundles/{chunk-NSLVDBJJ.js → chunk-B73DMM7T.js} +5 -5
  6. package/bundles/{chunk-2MJ6YSB2.js → chunk-CD575TJ6.js} +406 -333
  7. package/bundles/chunk-CD575TJ6.js.map +6 -0
  8. package/bundles/{chunk-GBKXY6BH.js → chunk-FKXFEX7K.js} +3 -3
  9. package/bundles/{chunk-HXSKCJMP.js → chunk-FVYXSSAL.js} +3 -3
  10. package/bundles/{chunk-KDHDNSXW.js → chunk-PAYJFU4V.js} +12 -12
  11. package/bundles/{chunk-I6R3GL3L.js → chunk-Q2WE7ECN.js} +5 -5
  12. package/bundles/{chunk-UCG5K4BI.js → chunk-RFDMMGNB.js} +289 -257
  13. package/bundles/chunk-RFDMMGNB.js.map +6 -0
  14. package/bundles/{chunk-SXMUFI7N.js → chunk-SWJRL4N4.js} +33 -33
  15. package/bundles/index.js +15 -15
  16. package/bundles/linker/babel/index.js +12 -12
  17. package/bundles/linker/index.js +4 -4
  18. package/bundles/private/bazel.js +1 -1
  19. package/bundles/private/localize.js +3 -3
  20. package/bundles/private/migrations.js +6 -6
  21. package/bundles/private/tooling.js +6 -6
  22. package/bundles/src/bin/ng_xi18n.js +10 -10
  23. package/bundles/src/bin/ngc.js +8 -8
  24. package/bundles_metadata.json +1 -1
  25. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
  26. package/package.json +3 -4
  27. package/private/migrations.d.ts +1 -1
  28. package/src/ngtsc/annotations/common/src/evaluation.d.ts +1 -1
  29. package/src/ngtsc/annotations/common/src/util.d.ts +19 -2
  30. package/src/ngtsc/annotations/component/src/metadata.d.ts +2 -2
  31. package/src/ngtsc/annotations/component/src/resources.d.ts +3 -2
  32. package/src/ngtsc/annotations/index.d.ts +1 -1
  33. package/src/ngtsc/core/api/src/options.d.ts +8 -0
  34. package/src/ngtsc/core/src/compiler.d.ts +3 -3
  35. package/src/ngtsc/docs/src/function_extractor.d.ts +1 -1
  36. package/src/ngtsc/hmr/src/update_declaration.d.ts +3 -2
  37. package/src/ngtsc/metadata/index.d.ts +1 -1
  38. package/src/ngtsc/metadata/src/resource_registry.d.ts +9 -8
  39. package/src/ngtsc/translator/src/translator.d.ts +1 -0
  40. package/src/ngtsc/typecheck/api/api.d.ts +22 -24
  41. package/src/ngtsc/typecheck/api/checker.d.ts +3 -3
  42. package/src/ngtsc/typecheck/api/context.d.ts +26 -17
  43. package/src/ngtsc/typecheck/diagnostics/src/diagnostic.d.ts +2 -2
  44. package/src/ngtsc/typecheck/diagnostics/src/id.d.ts +2 -2
  45. package/src/ngtsc/typecheck/src/checker.d.ts +6 -6
  46. package/src/ngtsc/typecheck/src/completion.d.ts +2 -2
  47. package/src/ngtsc/typecheck/src/context.d.ts +24 -26
  48. package/src/ngtsc/typecheck/src/diagnostics.d.ts +5 -5
  49. package/src/ngtsc/typecheck/src/dom.d.ts +5 -5
  50. package/src/ngtsc/typecheck/src/oob.d.ts +41 -45
  51. package/src/ngtsc/typecheck/src/source.d.ts +11 -11
  52. package/src/ngtsc/typecheck/src/tcb_util.d.ts +15 -15
  53. package/src/ngtsc/typecheck/src/template_symbol_builder.d.ts +3 -3
  54. package/src/ngtsc/typecheck/src/type_check_block.d.ts +3 -3
  55. package/bundles/chunk-2MJ6YSB2.js.map +0 -6
  56. package/bundles/chunk-UCG5K4BI.js.map +0 -6
  57. package/bundles/ngcc/index.js +0 -52
  58. package/bundles/ngcc/index.js.map +0 -6
  59. package/ngcc/index.d.ts +0 -11
  60. /package/bundles/{chunk-STORTTKY.js.map → chunk-37JMVF7H.js.map} +0 -0
  61. /package/bundles/{chunk-5UDS2TPQ.js.map → chunk-77D5CI2U.js.map} +0 -0
  62. /package/bundles/{chunk-NSLVDBJJ.js.map → chunk-B73DMM7T.js.map} +0 -0
  63. /package/bundles/{chunk-GBKXY6BH.js.map → chunk-FKXFEX7K.js.map} +0 -0
  64. /package/bundles/{chunk-HXSKCJMP.js.map → chunk-FVYXSSAL.js.map} +0 -0
  65. /package/bundles/{chunk-KDHDNSXW.js.map → chunk-PAYJFU4V.js.map} +0 -0
  66. /package/bundles/{chunk-I6R3GL3L.js.map → chunk-Q2WE7ECN.js.map} +0 -0
  67. /package/bundles/{chunk-SXMUFI7N.js.map → chunk-SWJRL4N4.js.map} +0 -0
@@ -48,23 +48,23 @@ import {
48
48
  translateStatement,
49
49
  translateType,
50
50
  typeNodeToValueExpr
51
- } from "./chunk-5B64KRP2.js";
51
+ } from "./chunk-7HRFJETP.js";
52
52
  import {
53
53
  PerfCheckpoint,
54
54
  PerfEvent,
55
55
  PerfPhase
56
- } from "./chunk-I6R3GL3L.js";
56
+ } from "./chunk-Q2WE7ECN.js";
57
57
  import {
58
58
  absoluteFrom,
59
59
  absoluteFromSourceFile,
60
60
  getSourceFileOrError,
61
61
  relative
62
- } from "./chunk-STORTTKY.js";
62
+ } from "./chunk-37JMVF7H.js";
63
63
  import {
64
64
  __publicField
65
65
  } from "./chunk-KPQ72R34.js";
66
66
 
67
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
67
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
68
68
  import { ExternalExpr, ParseLocation, ParseSourceFile, ParseSourceSpan, ReadPropExpr, WrappedNodeExpr } from "@angular/compiler";
69
69
  import ts from "typescript";
70
70
  var CORE_MODULE = "@angular/core";
@@ -103,8 +103,9 @@ function toR3Reference(origin, ref, context, refEmitter) {
103
103
  function isAngularCore(decorator) {
104
104
  return decorator.import !== null && decorator.import.from === CORE_MODULE;
105
105
  }
106
- function isAngularCoreReference(reference, symbolName) {
107
- return reference.ownedByModuleGuess === CORE_MODULE && reference.debugName === symbolName;
106
+ function isAngularCoreReferenceWithPotentialAliasing(reference, symbolName, isCore) {
107
+ var _a;
108
+ return (reference.ownedByModuleGuess === CORE_MODULE || isCore) && ((_a = reference.debugName) == null ? void 0 : _a.replace(/\$\d+$/, "")) === symbolName;
108
109
  }
109
110
  function findAngularDecorator(decorators, name, isCore) {
110
111
  return decorators.find((decorator) => isAngularDecorator(decorator, name, isCore));
@@ -171,17 +172,19 @@ function tryUnwrapForwardRef(node, reflector) {
171
172
  }
172
173
  return expr;
173
174
  }
174
- var forwardRefResolver = (fn, callExpr, resolve, unresolvable) => {
175
- if (!isAngularCoreReference(fn, "forwardRef") || callExpr.arguments.length !== 1) {
176
- return unresolvable;
177
- }
178
- const expanded = expandForwardRef(callExpr.arguments[0]);
179
- if (expanded !== null) {
180
- return resolve(expanded);
181
- } else {
182
- return unresolvable;
183
- }
184
- };
175
+ function createForwardRefResolver(isCore) {
176
+ return (fn, callExpr, resolve, unresolvable) => {
177
+ if (!isAngularCoreReferenceWithPotentialAliasing(fn, "forwardRef", isCore) || callExpr.arguments.length !== 1) {
178
+ return unresolvable;
179
+ }
180
+ const expanded = expandForwardRef(callExpr.arguments[0]);
181
+ if (expanded !== null) {
182
+ return resolve(expanded);
183
+ } else {
184
+ return unresolvable;
185
+ }
186
+ };
187
+ }
185
188
  function combineResolvers(resolvers) {
186
189
  return (fn, callExpr, resolve, unresolvable) => {
187
190
  for (const resolver of resolvers) {
@@ -326,7 +329,7 @@ function isAbstractClassDeclaration(clazz) {
326
329
  return ts.canHaveModifiers(clazz) && clazz.modifiers !== void 0 ? clazz.modifiers.some((mod) => mod.kind === ts.SyntaxKind.AbstractKeyword) : false;
327
330
  }
328
331
 
329
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
332
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
330
333
  var DynamicValue = class {
331
334
  node;
332
335
  reason;
@@ -419,10 +422,10 @@ var DynamicValue = class {
419
422
  }
420
423
  };
421
424
 
422
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
425
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
423
426
  import ts2 from "typescript";
424
427
 
425
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
428
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
426
429
  var ResolvedModule = class {
427
430
  exports;
428
431
  evaluate;
@@ -457,7 +460,7 @@ var EnumValue = class {
457
460
  var KnownFn = class {
458
461
  };
459
462
 
460
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
463
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
461
464
  var ArraySliceBuiltinFn = class extends KnownFn {
462
465
  lhs;
463
466
  constructor(lhs) {
@@ -512,7 +515,7 @@ var StringConcatBuiltinFn = class extends KnownFn {
512
515
  }
513
516
  };
514
517
 
515
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic.mjs
518
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic.mjs
516
519
  var SyntheticValue = class {
517
520
  value;
518
521
  constructor(value) {
@@ -520,7 +523,7 @@ var SyntheticValue = class {
520
523
  }
521
524
  };
522
525
 
523
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
526
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
524
527
  function literalBinaryOp(op) {
525
528
  return { op, literal: true };
526
529
  }
@@ -1101,7 +1104,7 @@ function owningModule(context, override = null) {
1101
1104
  }
1102
1105
  }
1103
1106
 
1104
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
1107
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
1105
1108
  var PartialEvaluator = class {
1106
1109
  host;
1107
1110
  checker;
@@ -1124,7 +1127,7 @@ var PartialEvaluator = class {
1124
1127
  }
1125
1128
  };
1126
1129
 
1127
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
1130
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
1128
1131
  import ts3 from "typescript";
1129
1132
  function describeResolvedType(value, maxDepth = 1) {
1130
1133
  var _a, _b;
@@ -1259,14 +1262,14 @@ function getContainerNode(node) {
1259
1262
  return node.getSourceFile();
1260
1263
  }
1261
1264
 
1262
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
1265
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
1263
1266
  var OptimizeFor;
1264
1267
  (function(OptimizeFor2) {
1265
1268
  OptimizeFor2[OptimizeFor2["SingleFile"] = 0] = "SingleFile";
1266
1269
  OptimizeFor2[OptimizeFor2["WholeProgram"] = 1] = "WholeProgram";
1267
1270
  })(OptimizeFor || (OptimizeFor = {}));
1268
1271
 
1269
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/scope.mjs
1272
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/scope.mjs
1270
1273
  var PotentialImportKind;
1271
1274
  (function(PotentialImportKind2) {
1272
1275
  PotentialImportKind2[PotentialImportKind2["NgModule"] = 0] = "NgModule";
@@ -1278,7 +1281,7 @@ var PotentialImportMode;
1278
1281
  PotentialImportMode2[PotentialImportMode2["ForceDirect"] = 1] = "ForceDirect";
1279
1282
  })(PotentialImportMode || (PotentialImportMode = {}));
1280
1283
 
1281
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/completion.mjs
1284
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/completion.mjs
1282
1285
  var CompletionKind;
1283
1286
  (function(CompletionKind2) {
1284
1287
  CompletionKind2[CompletionKind2["Reference"] = 0] = "Reference";
@@ -1286,7 +1289,7 @@ var CompletionKind;
1286
1289
  CompletionKind2[CompletionKind2["LetDeclaration"] = 2] = "LetDeclaration";
1287
1290
  })(CompletionKind || (CompletionKind = {}));
1288
1291
 
1289
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/symbols.mjs
1292
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/symbols.mjs
1290
1293
  var SymbolKind;
1291
1294
  (function(SymbolKind2) {
1292
1295
  SymbolKind2[SymbolKind2["Input"] = 0] = "Input";
@@ -1303,7 +1306,7 @@ var SymbolKind;
1303
1306
  SymbolKind2[SymbolKind2["LetDeclaration"] = 11] = "LetDeclaration";
1304
1307
  })(SymbolKind || (SymbolKind = {}));
1305
1308
 
1306
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
1309
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
1307
1310
  import { LiteralExpr, WrappedNodeExpr as WrappedNodeExpr2 } from "@angular/compiler";
1308
1311
  import ts4 from "typescript";
1309
1312
  function getConstructorDependencies(clazz, reflector, isCore) {
@@ -1449,10 +1452,10 @@ function createUnsuitableInjectionTokenError(clazz, error) {
1449
1452
  return new FatalDiagnosticError(ErrorCode.PARAM_MISSING_TOKEN, param.nameNode, chain, hints);
1450
1453
  }
1451
1454
 
1452
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
1455
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
1453
1456
  import ts12 from "typescript";
1454
1457
 
1455
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
1458
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
1456
1459
  var MetaKind;
1457
1460
  (function(MetaKind2) {
1458
1461
  MetaKind2[MetaKind2["Directive"] = 0] = "Directive";
@@ -1465,10 +1468,10 @@ var MatchSource;
1465
1468
  MatchSource2[MatchSource2["HostDirective"] = 1] = "HostDirective";
1466
1469
  })(MatchSource || (MatchSource = {}));
1467
1470
 
1468
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
1471
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
1469
1472
  import ts6 from "typescript";
1470
1473
 
1471
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
1474
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
1472
1475
  var ClassPropertyMapping = class {
1473
1476
  forwardMap;
1474
1477
  reverseMap;
@@ -1550,7 +1553,7 @@ function reverseMapFromForwardMap(forwardMap) {
1550
1553
  return reverseMap;
1551
1554
  }
1552
1555
 
1553
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/util.mjs
1556
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/util.mjs
1554
1557
  import ts5 from "typescript";
1555
1558
  function extractReferencesFromType(checker, def, bestGuessOwningModule) {
1556
1559
  if (!ts5.isTupleTypeNode(def)) {
@@ -1766,7 +1769,7 @@ function isHostDirectiveMetaForGlobalMode(hostDirectiveMeta) {
1766
1769
  return hostDirectiveMeta.directive instanceof Reference;
1767
1770
  }
1768
1771
 
1769
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
1772
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
1770
1773
  var DtsMetadataReader = class {
1771
1774
  checker;
1772
1775
  reflector;
@@ -1965,7 +1968,7 @@ function readHostDirectivesType(checker, type, bestGuessOwningModule) {
1965
1968
  return result.length > 0 ? { result, isIncomplete } : null;
1966
1969
  }
1967
1970
 
1968
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
1971
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
1969
1972
  function flattenInheritedDirectiveMetadata(reader, dir) {
1970
1973
  const topMeta = reader.getDirectiveMetadata(dir);
1971
1974
  if (topMeta === null) {
@@ -2029,7 +2032,7 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
2029
2032
  };
2030
2033
  }
2031
2034
 
2032
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
2035
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
2033
2036
  var LocalMetadataRegistry = class {
2034
2037
  directives = /* @__PURE__ */ new Map();
2035
2038
  ngModules = /* @__PURE__ */ new Map();
@@ -2085,7 +2088,7 @@ var CompoundMetadataRegistry = class {
2085
2088
  }
2086
2089
  };
2087
2090
 
2088
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
2091
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
2089
2092
  var ResourceRegistry = class {
2090
2093
  externalTemplateToComponentsMap = /* @__PURE__ */ new Map();
2091
2094
  componentToTemplateMap = /* @__PURE__ */ new Map();
@@ -2097,12 +2100,14 @@ var ResourceRegistry = class {
2097
2100
  }
2098
2101
  return this.externalTemplateToComponentsMap.get(template);
2099
2102
  }
2100
- registerResources(resources, component) {
2103
+ registerResources(resources, directive) {
2101
2104
  if (resources.template !== null) {
2102
- this.registerTemplate(resources.template, component);
2105
+ this.registerTemplate(resources.template, directive);
2103
2106
  }
2104
- for (const style of resources.styles) {
2105
- this.registerStyle(style, component);
2107
+ if (resources.styles !== null) {
2108
+ for (const style of resources.styles) {
2109
+ this.registerStyle(style, directive);
2110
+ }
2106
2111
  }
2107
2112
  }
2108
2113
  registerTemplate(templateResource, component) {
@@ -2148,7 +2153,7 @@ var ResourceRegistry = class {
2148
2153
  }
2149
2154
  };
2150
2155
 
2151
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/providers.mjs
2156
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/providers.mjs
2152
2157
  var ExportedProviderStatusResolver = class {
2153
2158
  metaReader;
2154
2159
  calculating = /* @__PURE__ */ new Set();
@@ -2193,7 +2198,7 @@ var ExportedProviderStatusResolver = class {
2193
2198
  }
2194
2199
  };
2195
2200
 
2196
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/host_directives_resolver.mjs
2201
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/host_directives_resolver.mjs
2197
2202
  var EMPTY_ARRAY = [];
2198
2203
  var HostDirectivesResolver = class {
2199
2204
  metaReader;
@@ -2260,7 +2265,7 @@ function resolveOutput(bindingName) {
2260
2265
  return bindingName;
2261
2266
  }
2262
2267
 
2263
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/api.mjs
2268
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/api.mjs
2264
2269
  var CompilationMode;
2265
2270
  (function(CompilationMode2) {
2266
2271
  CompilationMode2[CompilationMode2["FULL"] = 0] = "FULL";
@@ -2274,7 +2279,7 @@ var HandlerPrecedence;
2274
2279
  HandlerPrecedence2[HandlerPrecedence2["WEAK"] = 2] = "WEAK";
2275
2280
  })(HandlerPrecedence || (HandlerPrecedence = {}));
2276
2281
 
2277
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/alias.mjs
2282
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/alias.mjs
2278
2283
  import ts7 from "typescript";
2279
2284
  function aliasTransformFactory(exportStatements) {
2280
2285
  return () => {
@@ -2299,10 +2304,10 @@ function aliasTransformFactory(exportStatements) {
2299
2304
  };
2300
2305
  }
2301
2306
 
2302
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
2307
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
2303
2308
  import ts8 from "typescript";
2304
2309
 
2305
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
2310
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
2306
2311
  var TraitState;
2307
2312
  (function(TraitState2) {
2308
2313
  TraitState2[TraitState2["Pending"] = 0] = "Pending";
@@ -2361,7 +2366,7 @@ var TraitImpl = class {
2361
2366
  }
2362
2367
  };
2363
2368
 
2364
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
2369
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
2365
2370
  var TraitCompiler = class {
2366
2371
  handlers;
2367
2372
  reflector;
@@ -2842,7 +2847,7 @@ function containsErrors(diagnostics) {
2842
2847
  return diagnostics !== null && diagnostics.some((diag) => diag.category === ts8.DiagnosticCategory.Error);
2843
2848
  }
2844
2849
 
2845
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
2850
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
2846
2851
  import ts9 from "typescript";
2847
2852
  var DtsTransformRegistry = class {
2848
2853
  ivyDeclarationTransforms = /* @__PURE__ */ new Map();
@@ -2992,11 +2997,11 @@ function markForEmitAsSingleLine(node) {
2992
2997
  ts9.forEachChild(node, markForEmitAsSingleLine);
2993
2998
  }
2994
2999
 
2995
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
3000
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
2996
3001
  import { ConstantPool } from "@angular/compiler";
2997
3002
  import ts11 from "typescript";
2998
3003
 
2999
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
3004
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
3000
3005
  import ts10 from "typescript";
3001
3006
  function visit(node, visitor, context) {
3002
3007
  return visitor._visit(node, context);
@@ -3055,7 +3060,7 @@ var Visitor = class {
3055
3060
  }
3056
3061
  };
3057
3062
 
3058
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
3063
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
3059
3064
  var NO_DECORATORS = /* @__PURE__ */ new Set();
3060
3065
  var CLOSURE_FILE_OVERVIEW_REGEXP = /\s+@fileoverview\s+/i;
3061
3066
  function ivyTransformFactory(compilation, reflector, importRewriter, defaultImportTracker, localCompilationExtraImportsTracker, perf, isCore, isClosureCompilerEnabled) {
@@ -3301,7 +3306,7 @@ function nodeArrayFromDecoratorsArray(decorators) {
3301
3306
  return array;
3302
3307
  }
3303
3308
 
3304
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
3309
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
3305
3310
  function makeDuplicateDeclarationError(node, data, kind) {
3306
3311
  const context = [];
3307
3312
  for (const decl of data) {
@@ -3510,15 +3515,15 @@ function assertLocalCompilationUnresolvedConst(compilationMode, value, nodeToHig
3510
3515
  }
3511
3516
  }
3512
3517
 
3513
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
3518
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
3514
3519
  import { ViewEncapsulation } from "@angular/compiler";
3515
3520
  import ts13 from "typescript";
3516
- function resolveEnumValue(evaluator, metadata, field, enumSymbolName) {
3521
+ function resolveEnumValue(evaluator, metadata, field, enumSymbolName, isCore) {
3517
3522
  let resolved = null;
3518
3523
  if (metadata.has(field)) {
3519
3524
  const expr = metadata.get(field);
3520
3525
  const value = evaluator.evaluate(expr);
3521
- if (value instanceof EnumValue && isAngularCoreReference(value.enumRef, enumSymbolName)) {
3526
+ if (value instanceof EnumValue && isAngularCoreReferenceWithPotentialAliasing(value.enumRef, enumSymbolName, isCore)) {
3522
3527
  resolved = value.resolved;
3523
3528
  } else {
3524
3529
  throw createValueHasWrongTypeError(expr, value, `${field} must be a member of ${enumSymbolName} enum from @angular/core`);
@@ -3561,7 +3566,7 @@ function resolveLiteral(decorator, literalCache) {
3561
3566
  return meta;
3562
3567
  }
3563
3568
 
3564
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.mjs
3569
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.mjs
3565
3570
  import { compileDeclareFactoryFunction, compileFactoryFunction } from "@angular/compiler";
3566
3571
  function compileNgFactoryDefField(metadata) {
3567
3572
  const res = compileFactoryFunction(metadata);
@@ -3584,7 +3589,7 @@ function compileDeclareFactory(metadata) {
3584
3589
  };
3585
3590
  }
3586
3591
 
3587
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/injectable_registry.mjs
3592
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/injectable_registry.mjs
3588
3593
  var InjectableClassRegistry = class {
3589
3594
  host;
3590
3595
  isCore;
@@ -3612,7 +3617,7 @@ var InjectableClassRegistry = class {
3612
3617
  }
3613
3618
  };
3614
3619
 
3615
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
3620
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
3616
3621
  import { ArrowFunctionExpr, LiteralArrayExpr, LiteralExpr as LiteralExpr2, literalMap, WrappedNodeExpr as WrappedNodeExpr3 } from "@angular/compiler";
3617
3622
  import ts14 from "typescript";
3618
3623
  function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
@@ -3699,7 +3704,7 @@ function removeIdentifierReferences(node, names) {
3699
3704
  return result.transformed[0];
3700
3705
  }
3701
3706
 
3702
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/debug_info.mjs
3707
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/debug_info.mjs
3703
3708
  import { literal as literal2, WrappedNodeExpr as WrappedNodeExpr4 } from "@angular/compiler";
3704
3709
  function extractClassDebugInfo(clazz, reflection, compilerHost, rootDirs, forbidOrphanRendering) {
3705
3710
  if (!reflection.isClass(clazz)) {
@@ -3716,13 +3721,13 @@ function extractClassDebugInfo(clazz, reflection, compilerHost, rootDirs, forbid
3716
3721
  };
3717
3722
  }
3718
3723
 
3719
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
3724
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
3720
3725
  var NoopReferencesRegistry = class {
3721
3726
  add(source, ...references) {
3722
3727
  }
3723
3728
  };
3724
3729
 
3725
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.mjs
3730
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.mjs
3726
3731
  import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from "@angular/compiler";
3727
3732
  function extractSchemas(rawExpr, evaluator, context) {
3728
3733
  const schemas = [];
@@ -3752,7 +3757,7 @@ function extractSchemas(rawExpr, evaluator, context) {
3752
3757
  return schemas;
3753
3758
  }
3754
3759
 
3755
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/input_transforms.mjs
3760
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/input_transforms.mjs
3756
3761
  import { outputAst } from "@angular/compiler";
3757
3762
  function compileInputTransformFields(inputs) {
3758
3763
  const extraFields = [];
@@ -3770,16 +3775,16 @@ function compileInputTransformFields(inputs) {
3770
3775
  return extraFields;
3771
3776
  }
3772
3777
 
3773
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/jit_declaration_registry.mjs
3778
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/jit_declaration_registry.mjs
3774
3779
  var JitDeclarationRegistry = class {
3775
3780
  jitDeclarations = /* @__PURE__ */ new Set();
3776
3781
  };
3777
3782
 
3778
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
3783
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
3779
3784
  import { compileClassDebugInfo, compileHmrInitializer, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareComponentFromMetadata, compileDeferResolverFunction, ConstantPool as ConstantPool2, CssSelector as CssSelector4, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry as DomElementSchemaRegistry3, ExternalExpr as ExternalExpr8, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, outputAst as o4, R3TargetBinder, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher3, ViewEncapsulation as ViewEncapsulation2 } from "@angular/compiler";
3780
- import ts47 from "typescript";
3785
+ import ts48 from "typescript";
3781
3786
 
3782
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
3787
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
3783
3788
  import ts15 from "typescript";
3784
3789
  var SemanticSymbol = class {
3785
3790
  decl;
@@ -3798,7 +3803,7 @@ function getSymbolIdentifier(decl) {
3798
3803
  return decl.name.text;
3799
3804
  }
3800
3805
 
3801
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph.mjs
3806
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph.mjs
3802
3807
  import { ExternalExpr as ExternalExpr2 } from "@angular/compiler";
3803
3808
  var OpaqueSymbol = class extends SemanticSymbol {
3804
3809
  isPublicApiAffected() {
@@ -3940,10 +3945,10 @@ function getImportPath(expr) {
3940
3945
  }
3941
3946
  }
3942
3947
 
3943
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
3948
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
3944
3949
  import ts16 from "typescript";
3945
3950
 
3946
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
3951
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
3947
3952
  function isSymbolEqual(a, b) {
3948
3953
  if (a.decl === b.decl) {
3949
3954
  return true;
@@ -3993,7 +3998,7 @@ function isSetEqual(a, b, equalityTester = referenceEquality) {
3993
3998
  return true;
3994
3999
  }
3995
4000
 
3996
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
4001
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
3997
4002
  function extractSemanticTypeParameters(node) {
3998
4003
  if (!ts16.isClassDeclaration(node) || node.typeParameters === void 0) {
3999
4004
  return null;
@@ -4015,14 +4020,14 @@ function isTypeParameterEqual(a, b) {
4015
4020
  return a.hasGenericTypeBound === b.hasGenericTypeBound;
4016
4021
  }
4017
4022
 
4018
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/api.mjs
4023
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/api.mjs
4019
4024
  var ComponentScopeKind;
4020
4025
  (function(ComponentScopeKind2) {
4021
4026
  ComponentScopeKind2[ComponentScopeKind2["NgModule"] = 0] = "NgModule";
4022
4027
  ComponentScopeKind2[ComponentScopeKind2["Standalone"] = 1] = "Standalone";
4023
4028
  })(ComponentScopeKind || (ComponentScopeKind = {}));
4024
4029
 
4025
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/component_scope.mjs
4030
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/component_scope.mjs
4026
4031
  var CompoundComponentScopeReader = class {
4027
4032
  readers;
4028
4033
  constructor(readers) {
@@ -4048,7 +4053,7 @@ var CompoundComponentScopeReader = class {
4048
4053
  }
4049
4054
  };
4050
4055
 
4051
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
4056
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
4052
4057
  var MetadataDtsModuleScopeResolver = class {
4053
4058
  dtsMetaReader;
4054
4059
  aliasingHost;
@@ -4126,11 +4131,11 @@ var MetadataDtsModuleScopeResolver = class {
4126
4131
  }
4127
4132
  };
4128
4133
 
4129
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
4134
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
4130
4135
  import { ExternalExpr as ExternalExpr3 } from "@angular/compiler";
4131
4136
  import ts17 from "typescript";
4132
4137
 
4133
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/util.mjs
4138
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/util.mjs
4134
4139
  function getDiagnosticNode(ref, rawExpr) {
4135
4140
  return rawExpr !== null ? ref.getOriginForDiagnostics(rawExpr) : ref.node.name;
4136
4141
  }
@@ -4156,7 +4161,7 @@ function makeUnknownComponentDeferredImportDiagnostic(ref, rawExpr) {
4156
4161
  return makeDiagnostic(ErrorCode.COMPONENT_UNKNOWN_DEFERRED_IMPORT, getDiagnosticNode(ref, rawExpr), `Component deferred imports must be standalone components, directives or pipes.`);
4157
4162
  }
4158
4163
 
4159
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
4164
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
4160
4165
  var IN_PROGRESS_RESOLUTION = {};
4161
4166
  var LocalModuleScopeRegistry = class {
4162
4167
  localReader;
@@ -4515,7 +4520,7 @@ function reexportCollision(module, refA, refB) {
4515
4520
  ]);
4516
4521
  }
4517
4522
 
4518
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
4523
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
4519
4524
  import { CssSelector, SelectorMatcher } from "@angular/compiler";
4520
4525
  import ts18 from "typescript";
4521
4526
  var TypeCheckScopeRegistry = class {
@@ -4599,14 +4604,14 @@ var TypeCheckScopeRegistry = class {
4599
4604
  }
4600
4605
  };
4601
4606
 
4602
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
4607
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
4603
4608
  import { compileClassMetadata, compileDeclareClassMetadata, compileDeclareDirectiveFromMetadata, compileDirectiveFromMetadata, FactoryTarget, makeBindingParser, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
4604
4609
 
4605
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4610
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4606
4611
  import { createMayBeForwardRefExpression as createMayBeForwardRefExpression2, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr4, getSafePropertyAccessString, parseHostBindings, ParserError, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
4607
4612
  import ts22 from "typescript";
4608
4613
 
4609
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_function_access.mjs
4614
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_function_access.mjs
4610
4615
  function validateAccessOfInitializerApiMember({ api, call }, member) {
4611
4616
  if (!api.allowedAccessLevels.includes(member.accessLevel)) {
4612
4617
  throw new FatalDiagnosticError(ErrorCode.INITIALIZER_API_DISALLOWED_MEMBER_VISIBILITY, call, makeDiagnosticChain(`Cannot use "${api.functionName}" on a class member that is declared as ${classMemberAccessLevelToString(member.accessLevel)}.`, [
@@ -4615,7 +4620,7 @@ function validateAccessOfInitializerApiMember({ api, call }, member) {
4615
4620
  }
4616
4621
  }
4617
4622
 
4618
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_functions.mjs
4623
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_functions.mjs
4619
4624
  import ts19 from "typescript";
4620
4625
  function tryParseInitializerApi(functions, expression, reflector, importTracker) {
4621
4626
  if (!ts19.isCallExpression(expression)) {
@@ -4684,7 +4689,7 @@ function parseTopLevelCallFromNamespace(call, functions, importTracker) {
4684
4689
  return { api: matchingApi, apiReference, isRequired };
4685
4690
  }
4686
4691
 
4687
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_output_parse_options.mjs
4692
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_output_parse_options.mjs
4688
4693
  import ts20 from "typescript";
4689
4694
  function parseAndValidateInputAndOutputOptions(optionsNode) {
4690
4695
  if (!ts20.isObjectLiteralExpression(optionsNode)) {
@@ -4702,7 +4707,7 @@ function parseAndValidateInputAndOutputOptions(optionsNode) {
4702
4707
  return { alias };
4703
4708
  }
4704
4709
 
4705
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_function.mjs
4710
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_function.mjs
4706
4711
  var INPUT_INITIALIZER_FN = {
4707
4712
  functionName: "input",
4708
4713
  owningModule: "@angular/core",
@@ -4734,7 +4739,7 @@ function tryParseSignalInputMapping(member, reflector, importTracker) {
4734
4739
  };
4735
4740
  }
4736
4741
 
4737
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/model_function.mjs
4742
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/model_function.mjs
4738
4743
  var MODEL_INITIALIZER_FN = {
4739
4744
  functionName: "model",
4740
4745
  owningModule: "@angular/core",
@@ -4775,7 +4780,7 @@ function tryParseSignalModelMapping(member, reflector, importTracker) {
4775
4780
  };
4776
4781
  }
4777
4782
 
4778
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/output_function.mjs
4783
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/output_function.mjs
4779
4784
  var allowedAccessLevels = [
4780
4785
  ClassMemberAccessLevel.PublicWritable,
4781
4786
  ClassMemberAccessLevel.PublicReadonly,
@@ -4819,7 +4824,7 @@ function tryParseInitializerBasedOutput(member, reflector, importTracker) {
4819
4824
  };
4820
4825
  }
4821
4826
 
4822
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/query_functions.mjs
4827
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/query_functions.mjs
4823
4828
  import { createMayBeForwardRefExpression, outputAst as o } from "@angular/compiler";
4824
4829
  import ts21 from "typescript";
4825
4830
  var queryFunctionNames = [
@@ -4904,7 +4909,7 @@ function parseDescendantsOption(value) {
4904
4909
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, value, `Expected "descendants" option to be a boolean literal.`);
4905
4910
  }
4906
4911
 
4907
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4912
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4908
4913
  var EMPTY_OBJECT = {};
4909
4914
  var queryDecoratorNames = [
4910
4915
  "ViewChild",
@@ -5005,7 +5010,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, ev
5005
5010
  const sourceFile = clazz.getSourceFile();
5006
5011
  const type = wrapTypeReference(reflector, clazz);
5007
5012
  const rawHostDirectives = directive.get("hostDirectives") || null;
5008
- const hostDirectives = rawHostDirectives === null ? null : extractHostDirectives(rawHostDirectives, evaluator, compilationMode);
5013
+ const hostDirectives = rawHostDirectives === null ? null : extractHostDirectives(rawHostDirectives, evaluator, compilationMode, createForwardRefResolver(isCore));
5009
5014
  if (compilationMode !== CompilationMode.LOCAL && hostDirectives !== null) {
5010
5015
  referencesRegistry.add(clazz, ...hostDirectives.map((hostDir) => {
5011
5016
  if (!isHostDirectiveMetaForGlobalMode(hostDir)) {
@@ -5642,7 +5647,7 @@ function getHostBindingErrorNode(error, hostExpr) {
5642
5647
  }
5643
5648
  return hostExpr;
5644
5649
  }
5645
- function extractHostDirectives(rawHostDirectives, evaluator, compilationMode) {
5650
+ function extractHostDirectives(rawHostDirectives, evaluator, compilationMode, forwardRefResolver) {
5646
5651
  const resolved = evaluator.evaluate(rawHostDirectives, forwardRefResolver);
5647
5652
  if (!Array.isArray(resolved)) {
5648
5653
  throw createValueHasWrongTypeError(rawHostDirectives, resolved, "hostDirectives must be an array");
@@ -5715,7 +5720,7 @@ function toR3InputMetadata(mapping) {
5715
5720
  };
5716
5721
  }
5717
5722
 
5718
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.mjs
5723
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.mjs
5719
5724
  var DirectiveSymbol = class extends SemanticSymbol {
5720
5725
  selector;
5721
5726
  inputs;
@@ -5801,7 +5806,7 @@ function isBaseClassEqual(current, previous) {
5801
5806
  return isSymbolEqual(current, previous);
5802
5807
  }
5803
5808
 
5804
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
5809
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
5805
5810
  var FIELD_DECORATORS = [
5806
5811
  "Input",
5807
5812
  "Output",
@@ -6021,11 +6026,11 @@ var DirectiveDecoratorHandler = class {
6021
6026
  }
6022
6027
  };
6023
6028
 
6024
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
6029
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
6025
6030
  import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget2, FunctionExpr, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, ReturnStatement, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
6026
6031
  import ts24 from "typescript";
6027
6032
 
6028
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
6033
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
6029
6034
  import ts23 from "typescript";
6030
6035
  function createModuleWithProvidersResolver(reflector, isCore) {
6031
6036
  function _reflectModuleFromTypeParam(type, node) {
@@ -6097,7 +6102,7 @@ function isResolvedModuleWithProviders(sv) {
6097
6102
  return typeof sv.value === "object" && sv.value != null && sv.value.hasOwnProperty("ngModule") && sv.value.hasOwnProperty("mwpCall");
6098
6103
  }
6099
6104
 
6100
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
6105
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
6101
6106
  var NgModuleSymbol = class extends SemanticSymbol {
6102
6107
  hasProviders;
6103
6108
  remotelyScopedComponents = [];
@@ -6238,6 +6243,7 @@ var NgModuleDecoratorHandler = class {
6238
6243
  this.jitDeclarationRegistry.jitDeclarations.add(node);
6239
6244
  return {};
6240
6245
  }
6246
+ const forwardRefResolver = createForwardRefResolver(this.isCore);
6241
6247
  const moduleResolvers = combineResolvers([
6242
6248
  createModuleWithProvidersResolver(this.reflector, this.isCore),
6243
6249
  forwardRefResolver
@@ -6737,7 +6743,7 @@ function isSyntheticReference(ref) {
6737
6743
  return ref.synthetic;
6738
6744
  }
6739
6745
 
6740
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
6746
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
6741
6747
  function makeCyclicImportInfo(ref, type, cycle) {
6742
6748
  const name = ref.debugName || "(unknown)";
6743
6749
  const path = cycle.getPath().map((sf) => sf.fileName).join(" -> ");
@@ -6760,7 +6766,7 @@ function checkCustomElementSelectorForErrors(selector) {
6760
6766
  return null;
6761
6767
  }
6762
6768
 
6763
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
6769
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
6764
6770
  import { DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, ParseSourceFile as ParseSourceFile2, parseTemplate } from "@angular/compiler";
6765
6771
  import ts25 from "typescript";
6766
6772
  function getTemplateDeclarationNodeForError(declaration) {
@@ -6832,6 +6838,42 @@ function extractTemplate(node, template, evaluator, depTracker, resourceLoader,
6832
6838
  };
6833
6839
  }
6834
6840
  }
6841
+ function createEmptyTemplate(componentClass, component, containingFile) {
6842
+ const templateUrl = component.get("templateUrl");
6843
+ const template = component.get("template");
6844
+ return {
6845
+ content: "",
6846
+ diagNodes: [],
6847
+ nodes: [],
6848
+ errors: null,
6849
+ styles: [],
6850
+ styleUrls: [],
6851
+ ngContentSelectors: [],
6852
+ file: new ParseSourceFile2("", ""),
6853
+ sourceMapping: templateUrl ? { type: "direct", node: template } : {
6854
+ type: "external",
6855
+ componentClass,
6856
+ node: templateUrl,
6857
+ template: "",
6858
+ templateUrl: "missing.ng.html"
6859
+ },
6860
+ declaration: templateUrl ? {
6861
+ isInline: false,
6862
+ interpolationConfig: InterpolationConfig.fromArray(null),
6863
+ preserveWhitespaces: false,
6864
+ templateUrlExpression: templateUrl,
6865
+ templateUrl: "missing.ng.html",
6866
+ resolvedTemplateUrl: "/missing.ng.html"
6867
+ } : {
6868
+ isInline: true,
6869
+ interpolationConfig: InterpolationConfig.fromArray(null),
6870
+ preserveWhitespaces: false,
6871
+ expression: template,
6872
+ templateUrl: containingFile,
6873
+ resolvedTemplateUrl: containingFile
6874
+ }
6875
+ };
6876
+ }
6835
6877
  function parseExtractedTemplate(template, sourceStr, sourceParseRange, escapedString, sourceMapUrl, options) {
6836
6878
  const i18nNormalizeLineEndingsInICUs = escapedString || options.i18nNormalizeLineEndingsInICUs;
6837
6879
  const commonParseOptions = {
@@ -7098,7 +7140,7 @@ function _extractTemplateStyleUrls(template) {
7098
7140
  }));
7099
7141
  }
7100
7142
 
7101
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.mjs
7143
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.mjs
7102
7144
  var ComponentSymbol = class extends DirectiveSymbol {
7103
7145
  usedDirectives = [];
7104
7146
  usedPipes = [];
@@ -7130,7 +7172,7 @@ var ComponentSymbol = class extends DirectiveSymbol {
7130
7172
  }
7131
7173
  };
7132
7174
 
7133
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/util.mjs
7175
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/util.mjs
7134
7176
  function collectAnimationNames(value, animationTriggerNames) {
7135
7177
  if (value instanceof Map) {
7136
7178
  const name = value.get("name");
@@ -7207,10 +7249,10 @@ function isLikelyModuleWithProviders(value) {
7207
7249
  return false;
7208
7250
  }
7209
7251
 
7210
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
7252
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
7211
7253
  import { CssSelector as CssSelector3, DomElementSchemaRegistry as DomElementSchemaRegistry2, ExternalExpr as ExternalExpr7, WrappedNodeExpr as WrappedNodeExpr9 } from "@angular/compiler";
7212
7254
 
7213
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/api.mjs
7255
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/api.mjs
7214
7256
  var NgOriginalFile = Symbol("NgOriginalFile");
7215
7257
  var UpdateMode;
7216
7258
  (function(UpdateMode2) {
@@ -7218,13 +7260,13 @@ var UpdateMode;
7218
7260
  UpdateMode2[UpdateMode2["Incremental"] = 1] = "Incremental";
7219
7261
  })(UpdateMode || (UpdateMode = {}));
7220
7262
 
7221
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
7263
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
7222
7264
  import ts27 from "typescript";
7223
7265
 
7224
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
7266
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
7225
7267
  import ts26 from "typescript";
7226
7268
 
7227
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/expando.mjs
7269
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/expando.mjs
7228
7270
  var NgExtension = Symbol("NgExtension");
7229
7271
  function isExtended(sf) {
7230
7272
  return sf[NgExtension] !== void 0;
@@ -7284,13 +7326,13 @@ function retagTsFile(sf) {
7284
7326
  }
7285
7327
  }
7286
7328
 
7287
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/util.mjs
7329
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/util.mjs
7288
7330
  var TS_EXTENSIONS = /\.tsx?$/i;
7289
7331
  function makeShimFileName(fileName, suffix) {
7290
7332
  return absoluteFrom(fileName.replace(TS_EXTENSIONS, suffix));
7291
7333
  }
7292
7334
 
7293
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
7335
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
7294
7336
  var ShimAdapter = class {
7295
7337
  delegate;
7296
7338
  shims = /* @__PURE__ */ new Map();
@@ -7387,7 +7429,7 @@ var ShimAdapter = class {
7387
7429
  }
7388
7430
  };
7389
7431
 
7390
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/reference_tagger.mjs
7432
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/reference_tagger.mjs
7391
7433
  var ShimReferenceTagger = class {
7392
7434
  suffixes;
7393
7435
  tagged = /* @__PURE__ */ new Set();
@@ -7422,7 +7464,7 @@ var ShimReferenceTagger = class {
7422
7464
  }
7423
7465
  };
7424
7466
 
7425
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
7467
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
7426
7468
  var DelegatingCompilerHost = class {
7427
7469
  delegate;
7428
7470
  createHash;
@@ -7573,9 +7615,9 @@ var TsCreateProgramDriver = class {
7573
7615
  }
7574
7616
  };
7575
7617
 
7576
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic.mjs
7618
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic.mjs
7577
7619
  import ts28 from "typescript";
7578
- function makeTemplateDiagnostic(templateId, mapping, span, category, code, messageText, relatedMessages) {
7620
+ function makeTemplateDiagnostic(id, mapping, span, category, code, messageText, relatedMessages) {
7579
7621
  var _a;
7580
7622
  if (mapping.type === "direct") {
7581
7623
  let relatedInformation = void 0;
@@ -7598,8 +7640,8 @@ function makeTemplateDiagnostic(templateId, mapping, span, category, code, messa
7598
7640
  category,
7599
7641
  messageText,
7600
7642
  file: mapping.node.getSourceFile(),
7601
- componentFile: mapping.node.getSourceFile(),
7602
- templateId,
7643
+ sourceFile: mapping.node.getSourceFile(),
7644
+ typeCheckId: id,
7603
7645
  start: span.start.offset,
7604
7646
  length: span.end.offset - span.start.offset,
7605
7647
  relatedInformation
@@ -7632,8 +7674,8 @@ function makeTemplateDiagnostic(templateId, mapping, span, category, code, messa
7632
7674
  code,
7633
7675
  messageText: addDiagnosticChain(messageText, [failureChain]),
7634
7676
  file: componentSf,
7635
- componentFile: componentSf,
7636
- templateId,
7677
+ sourceFile: componentSf,
7678
+ typeCheckId: id,
7637
7679
  start: mapping.node.getStart(),
7638
7680
  length: mapping.node.getEnd() - mapping.node.getStart(),
7639
7681
  relatedInformation
@@ -7653,8 +7695,8 @@ function makeTemplateDiagnostic(templateId, mapping, span, category, code, messa
7653
7695
  code,
7654
7696
  messageText,
7655
7697
  file: sf,
7656
- componentFile: componentSf,
7657
- templateId,
7698
+ sourceFile: componentSf,
7699
+ typeCheckId: id,
7658
7700
  start: span.start.offset,
7659
7701
  length: span.end.offset - span.start.offset,
7660
7702
  relatedInformation
@@ -7684,28 +7726,24 @@ function parseTemplateAsSourceFile(fileName, template) {
7684
7726
  );
7685
7727
  }
7686
7728
 
7687
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/id.mjs
7688
- var TEMPLATE_ID = Symbol("ngTemplateId");
7689
- var NEXT_TEMPLATE_ID = Symbol("ngNextTemplateId");
7690
- function getTemplateId(clazz) {
7691
- const node = clazz;
7692
- if (node[TEMPLATE_ID] === void 0) {
7693
- node[TEMPLATE_ID] = allocateTemplateId(node.getSourceFile());
7729
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/id.mjs
7730
+ var TYPE_CHECK_ID_MAP = Symbol("TypeCheckId");
7731
+ function getTypeCheckId(clazz) {
7732
+ const sf = clazz.getSourceFile();
7733
+ if (sf[TYPE_CHECK_ID_MAP] === void 0) {
7734
+ sf[TYPE_CHECK_ID_MAP] = /* @__PURE__ */ new Map();
7694
7735
  }
7695
- return node[TEMPLATE_ID];
7696
- }
7697
- function allocateTemplateId(sf) {
7698
- if (sf[NEXT_TEMPLATE_ID] === void 0) {
7699
- sf[NEXT_TEMPLATE_ID] = 1;
7736
+ if (sf[TYPE_CHECK_ID_MAP].get(clazz) === void 0) {
7737
+ sf[TYPE_CHECK_ID_MAP].set(clazz, `tcb${sf[TYPE_CHECK_ID_MAP].size + 1}`);
7700
7738
  }
7701
- return `tcb${sf[NEXT_TEMPLATE_ID]++}`;
7739
+ return sf[TYPE_CHECK_ID_MAP].get(clazz);
7702
7740
  }
7703
7741
 
7704
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
7742
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
7705
7743
  import { EmptyExpr, ImplicitReceiver, PropertyRead, PropertyWrite, SafePropertyRead, TmplAstLetDeclaration, TmplAstReference, TmplAstTextAttribute } from "@angular/compiler";
7706
7744
  import ts30 from "typescript";
7707
7745
 
7708
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/comments.mjs
7746
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/comments.mjs
7709
7747
  import { AbsoluteSourceSpan } from "@angular/compiler";
7710
7748
  import ts29 from "typescript";
7711
7749
  var parseSpanComment = /^(\d+),(\d+)$/;
@@ -7836,7 +7874,7 @@ function hasExpressionIdentifier(sourceFile, node, identifier) {
7836
7874
  }) || false;
7837
7875
  }
7838
7876
 
7839
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
7877
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
7840
7878
  var CompletionEngine = class {
7841
7879
  tcb;
7842
7880
  data;
@@ -9043,10 +9081,10 @@ var MagicString = class {
9043
9081
  }
9044
9082
  };
9045
9083
 
9046
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
9084
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
9047
9085
  import ts43 from "typescript";
9048
9086
 
9049
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/dom.mjs
9087
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/dom.mjs
9050
9088
  import { DomElementSchemaRegistry } from "@angular/compiler";
9051
9089
  import ts31 from "typescript";
9052
9090
  var REGISTRY = new DomElementSchemaRegistry();
@@ -9063,7 +9101,7 @@ var RegistryDomSchemaChecker = class {
9063
9101
  checkElement(id, element, schemas, hostIsStandalone) {
9064
9102
  const name = element.name.replace(REMOVE_XHTML_REGEX, "");
9065
9103
  if (!REGISTRY.hasElement(name, schemas)) {
9066
- const mapping = this.resolver.getSourceMapping(id);
9104
+ const mapping = this.resolver.getTemplateSourceMapping(id);
9067
9105
  const schemas2 = `'${hostIsStandalone ? "@Component" : "@NgModule"}.schemas'`;
9068
9106
  let errorMsg = `'${name}' is not a known element:
9069
9107
  `;
@@ -9080,7 +9118,7 @@ var RegistryDomSchemaChecker = class {
9080
9118
  }
9081
9119
  checkProperty(id, element, name, span, schemas, hostIsStandalone) {
9082
9120
  if (!REGISTRY.hasProperty(element.name, name, schemas)) {
9083
- const mapping = this.resolver.getSourceMapping(id);
9121
+ const mapping = this.resolver.getTemplateSourceMapping(id);
9084
9122
  const decorator = hostIsStandalone ? "@Component" : "@NgModule";
9085
9123
  const schemas2 = `'${decorator}.schemas'`;
9086
9124
  let errorMsg = `Can't bind to '${name}' since it isn't a known property of '${element.name}'.`;
@@ -9100,10 +9138,10 @@ var RegistryDomSchemaChecker = class {
9100
9138
  }
9101
9139
  };
9102
9140
 
9103
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
9141
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
9104
9142
  import ts36 from "typescript";
9105
9143
 
9106
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/reference_emit_environment.mjs
9144
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/reference_emit_environment.mjs
9107
9145
  import { ExpressionType, ExternalExpr as ExternalExpr6, TypeModifier } from "@angular/compiler";
9108
9146
  var ReferenceEmitEnvironment = class {
9109
9147
  importManager;
@@ -9138,7 +9176,7 @@ var ReferenceEmitEnvironment = class {
9138
9176
  }
9139
9177
  };
9140
9178
 
9141
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/ts_util.mjs
9179
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/ts_util.mjs
9142
9180
  import ts32 from "typescript";
9143
9181
  var SAFE_TO_CAST_WITHOUT_PARENS = /* @__PURE__ */ new Set([
9144
9182
  ts32.SyntaxKind.ParenthesizedExpression,
@@ -9221,15 +9259,15 @@ function tsNumericExpression(value) {
9221
9259
  return ts32.factory.createNumericLiteral(value);
9222
9260
  }
9223
9261
 
9224
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
9262
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
9225
9263
  import { ExpressionType as ExpressionType2, R3Identifiers as R3Identifiers3, WrappedNodeExpr as WrappedNodeExpr8 } from "@angular/compiler";
9226
9264
  import ts35 from "typescript";
9227
9265
 
9228
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
9266
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
9229
9267
  import { R3Identifiers as R3Identifiers2 } from "@angular/compiler";
9230
9268
  import ts34 from "typescript";
9231
9269
 
9232
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
9270
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
9233
9271
  import ts33 from "typescript";
9234
9272
  var TypeParameterEmitter = class {
9235
9273
  typeParameters;
@@ -9309,7 +9347,7 @@ var TypeParameterEmitter = class {
9309
9347
  }
9310
9348
  };
9311
9349
 
9312
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
9350
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
9313
9351
  var TCB_FILE_IMPORT_GRAPH_PREPARE_IDENTIFIERS = [
9314
9352
  R3Identifiers2.InputSignalBrandWriteType
9315
9353
  ];
@@ -9330,22 +9368,22 @@ function requiresInlineTypeCheckBlock(ref, env, usedPipes, reflector) {
9330
9368
  return TcbInliningRequirement.None;
9331
9369
  }
9332
9370
  }
9333
- function getTemplateMapping(shimSf, position, resolver, isDiagnosticRequest) {
9371
+ function getSourceMapping(shimSf, position, resolver, isDiagnosticRequest) {
9334
9372
  const node = getTokenAtPosition(shimSf, position);
9335
9373
  const sourceLocation = findSourceLocation(node, shimSf, isDiagnosticRequest);
9336
9374
  if (sourceLocation === null) {
9337
9375
  return null;
9338
9376
  }
9339
- const mapping = resolver.getSourceMapping(sourceLocation.id);
9340
- const span = resolver.toParseSourceSpan(sourceLocation.id, sourceLocation.span);
9377
+ const mapping = resolver.getTemplateSourceMapping(sourceLocation.id);
9378
+ const span = resolver.toTemplateParseSourceSpan(sourceLocation.id, sourceLocation.span);
9341
9379
  if (span === null) {
9342
9380
  return null;
9343
9381
  }
9344
- return { sourceLocation, templateSourceMapping: mapping, span };
9382
+ return { sourceLocation, sourceMapping: mapping, span };
9345
9383
  }
9346
9384
  function findTypeCheckBlock(file, id, isDiagnosticRequest) {
9347
9385
  for (const stmt of file.statements) {
9348
- if (ts34.isFunctionDeclaration(stmt) && getTemplateId2(stmt, file, isDiagnosticRequest) === id) {
9386
+ if (ts34.isFunctionDeclaration(stmt) && getTemplateId(stmt, file, isDiagnosticRequest) === id) {
9349
9387
  return stmt;
9350
9388
  }
9351
9389
  }
@@ -9358,7 +9396,7 @@ function findSourceLocation(node, sourceFile, isDiagnosticsRequest) {
9358
9396
  }
9359
9397
  const span = readSpanComment(node, sourceFile);
9360
9398
  if (span !== null) {
9361
- const id = getTemplateId2(node, sourceFile, isDiagnosticsRequest);
9399
+ const id = getTemplateId(node, sourceFile, isDiagnosticsRequest);
9362
9400
  if (id === null) {
9363
9401
  return null;
9364
9402
  }
@@ -9368,7 +9406,7 @@ function findSourceLocation(node, sourceFile, isDiagnosticsRequest) {
9368
9406
  }
9369
9407
  return null;
9370
9408
  }
9371
- function getTemplateId2(node, sourceFile, isDiagnosticRequest) {
9409
+ function getTemplateId(node, sourceFile, isDiagnosticRequest) {
9372
9410
  while (!ts34.isFunctionDeclaration(node)) {
9373
9411
  if (hasIgnoreForDiagnosticsMarker(node, sourceFile) && isDiagnosticRequest) {
9374
9412
  return null;
@@ -9401,7 +9439,7 @@ function checkIfGenericTypeBoundsCanBeEmitted(node, reflector, env) {
9401
9439
  return emitter.canEmit((ref) => env.canReferenceType(ref));
9402
9440
  }
9403
9441
 
9404
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
9442
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
9405
9443
  function generateTypeCtorDeclarationFn(env, meta, nodeTypeRef, typeParams) {
9406
9444
  const rawTypeArgs = typeParams !== void 0 ? generateGenericArgs(typeParams) : void 0;
9407
9445
  const rawType = ts35.factory.createTypeReferenceNode(nodeTypeRef, rawTypeArgs);
@@ -9524,7 +9562,7 @@ function typeParametersWithDefaultTypes(params) {
9524
9562
  });
9525
9563
  }
9526
9564
 
9527
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
9565
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
9528
9566
  var Environment = class extends ReferenceEmitEnvironment {
9529
9567
  config;
9530
9568
  nextIds = {
@@ -9597,7 +9635,7 @@ var Environment = class extends ReferenceEmitEnvironment {
9597
9635
  }
9598
9636
  };
9599
9637
 
9600
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/oob.mjs
9638
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/oob.mjs
9601
9639
  import { AbsoluteSourceSpan as AbsoluteSourceSpan2, TmplAstElement } from "@angular/compiler";
9602
9640
  import ts37 from "typescript";
9603
9641
  var OutOfBandDiagnosticRecorderImpl = class {
@@ -9610,53 +9648,53 @@ var OutOfBandDiagnosticRecorderImpl = class {
9610
9648
  get diagnostics() {
9611
9649
  return this._diagnostics;
9612
9650
  }
9613
- missingReferenceTarget(templateId, ref) {
9614
- const mapping = this.resolver.getSourceMapping(templateId);
9651
+ missingReferenceTarget(id, ref) {
9652
+ const mapping = this.resolver.getTemplateSourceMapping(id);
9615
9653
  const value = ref.value.trim();
9616
9654
  const errorMsg = `No directive found with exportAs '${value}'.`;
9617
- this._diagnostics.push(makeTemplateDiagnostic(templateId, mapping, ref.valueSpan || ref.sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.MISSING_REFERENCE_TARGET), errorMsg));
9655
+ this._diagnostics.push(makeTemplateDiagnostic(id, mapping, ref.valueSpan || ref.sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.MISSING_REFERENCE_TARGET), errorMsg));
9618
9656
  }
9619
- missingPipe(templateId, ast) {
9657
+ missingPipe(id, ast) {
9620
9658
  if (this.recordedPipes.has(ast)) {
9621
9659
  return;
9622
9660
  }
9623
- const mapping = this.resolver.getSourceMapping(templateId);
9661
+ const mapping = this.resolver.getTemplateSourceMapping(id);
9624
9662
  const errorMsg = `No pipe found with name '${ast.name}'.`;
9625
- const sourceSpan = this.resolver.toParseSourceSpan(templateId, ast.nameSpan);
9663
+ const sourceSpan = this.resolver.toTemplateParseSourceSpan(id, ast.nameSpan);
9626
9664
  if (sourceSpan === null) {
9627
9665
  throw new Error(`Assertion failure: no SourceLocation found for usage of pipe '${ast.name}'.`);
9628
9666
  }
9629
- this._diagnostics.push(makeTemplateDiagnostic(templateId, mapping, sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.MISSING_PIPE), errorMsg));
9667
+ this._diagnostics.push(makeTemplateDiagnostic(id, mapping, sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.MISSING_PIPE), errorMsg));
9630
9668
  this.recordedPipes.add(ast);
9631
9669
  }
9632
- deferredPipeUsedEagerly(templateId, ast) {
9670
+ deferredPipeUsedEagerly(id, ast) {
9633
9671
  if (this.recordedPipes.has(ast)) {
9634
9672
  return;
9635
9673
  }
9636
- const mapping = this.resolver.getSourceMapping(templateId);
9674
+ const mapping = this.resolver.getTemplateSourceMapping(id);
9637
9675
  const errorMsg = `Pipe '${ast.name}' was imported via \`@Component.deferredImports\`, but was used outside of a \`@defer\` block in a template. To fix this, either use the '${ast.name}' pipe inside of a \`@defer\` block or import this dependency using the \`@Component.imports\` field.`;
9638
- const sourceSpan = this.resolver.toParseSourceSpan(templateId, ast.nameSpan);
9676
+ const sourceSpan = this.resolver.toTemplateParseSourceSpan(id, ast.nameSpan);
9639
9677
  if (sourceSpan === null) {
9640
9678
  throw new Error(`Assertion failure: no SourceLocation found for usage of pipe '${ast.name}'.`);
9641
9679
  }
9642
- this._diagnostics.push(makeTemplateDiagnostic(templateId, mapping, sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.DEFERRED_PIPE_USED_EAGERLY), errorMsg));
9680
+ this._diagnostics.push(makeTemplateDiagnostic(id, mapping, sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.DEFERRED_PIPE_USED_EAGERLY), errorMsg));
9643
9681
  this.recordedPipes.add(ast);
9644
9682
  }
9645
- deferredComponentUsedEagerly(templateId, element) {
9646
- const mapping = this.resolver.getSourceMapping(templateId);
9683
+ deferredComponentUsedEagerly(id, element) {
9684
+ const mapping = this.resolver.getTemplateSourceMapping(id);
9647
9685
  const errorMsg = `Element '${element.name}' contains a component or a directive that was imported via \`@Component.deferredImports\`, but the element itself is located outside of a \`@defer\` block in a template. To fix this, either use the '${element.name}' element inside of a \`@defer\` block or import referenced component/directive dependency using the \`@Component.imports\` field.`;
9648
9686
  const { start, end } = element.startSourceSpan;
9649
9687
  const absoluteSourceSpan = new AbsoluteSourceSpan2(start.offset, end.offset);
9650
- const sourceSpan = this.resolver.toParseSourceSpan(templateId, absoluteSourceSpan);
9688
+ const sourceSpan = this.resolver.toTemplateParseSourceSpan(id, absoluteSourceSpan);
9651
9689
  if (sourceSpan === null) {
9652
9690
  throw new Error(`Assertion failure: no SourceLocation found for usage of pipe '${element.name}'.`);
9653
9691
  }
9654
- this._diagnostics.push(makeTemplateDiagnostic(templateId, mapping, sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.DEFERRED_DIRECTIVE_USED_EAGERLY), errorMsg));
9692
+ this._diagnostics.push(makeTemplateDiagnostic(id, mapping, sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.DEFERRED_DIRECTIVE_USED_EAGERLY), errorMsg));
9655
9693
  }
9656
- duplicateTemplateVar(templateId, variable, firstDecl) {
9657
- const mapping = this.resolver.getSourceMapping(templateId);
9694
+ duplicateTemplateVar(id, variable, firstDecl) {
9695
+ const mapping = this.resolver.getTemplateSourceMapping(id);
9658
9696
  const errorMsg = `Cannot redeclare variable '${variable.name}' as it was previously declared elsewhere for the same template.`;
9659
- this._diagnostics.push(makeTemplateDiagnostic(templateId, mapping, variable.sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.DUPLICATE_VARIABLE_DECLARATION), errorMsg, [
9697
+ this._diagnostics.push(makeTemplateDiagnostic(id, mapping, variable.sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.DUPLICATE_VARIABLE_DECLARATION), errorMsg, [
9660
9698
  {
9661
9699
  text: `The variable '${firstDecl.name}' was first declared here.`,
9662
9700
  start: firstDecl.sourceSpan.start.offset,
@@ -9665,20 +9703,20 @@ var OutOfBandDiagnosticRecorderImpl = class {
9665
9703
  }
9666
9704
  ]));
9667
9705
  }
9668
- requiresInlineTcb(templateId, node) {
9669
- this._diagnostics.push(makeInlineDiagnostic(templateId, ErrorCode.INLINE_TCB_REQUIRED, node.name, `This component requires inline template type-checking, which is not supported by the current environment.`));
9706
+ requiresInlineTcb(id, node) {
9707
+ this._diagnostics.push(makeInlineDiagnostic(id, ErrorCode.INLINE_TCB_REQUIRED, node.name, `This component requires inline template type-checking, which is not supported by the current environment.`));
9670
9708
  }
9671
- requiresInlineTypeConstructors(templateId, node, directives) {
9709
+ requiresInlineTypeConstructors(id, node, directives) {
9672
9710
  let message;
9673
9711
  if (directives.length > 1) {
9674
9712
  message = `This component uses directives which require inline type constructors, which are not supported by the current environment.`;
9675
9713
  } else {
9676
9714
  message = `This component uses a directive which requires an inline type constructor, which is not supported by the current environment.`;
9677
9715
  }
9678
- this._diagnostics.push(makeInlineDiagnostic(templateId, ErrorCode.INLINE_TYPE_CTOR_REQUIRED, node.name, message, directives.map((dir) => makeRelatedInformation(dir.name, `Requires an inline type constructor.`))));
9716
+ this._diagnostics.push(makeInlineDiagnostic(id, ErrorCode.INLINE_TYPE_CTOR_REQUIRED, node.name, message, directives.map((dir) => makeRelatedInformation(dir.name, `Requires an inline type constructor.`))));
9679
9717
  }
9680
- suboptimalTypeInference(templateId, variables) {
9681
- const mapping = this.resolver.getSourceMapping(templateId);
9718
+ suboptimalTypeInference(id, variables) {
9719
+ const mapping = this.resolver.getTemplateSourceMapping(id);
9682
9720
  let diagnosticVar = null;
9683
9721
  for (const variable of variables) {
9684
9722
  if (diagnosticVar === null || variable.value === "" || variable.value === "$implicit") {
@@ -9697,10 +9735,10 @@ var OutOfBandDiagnosticRecorderImpl = class {
9697
9735
  const message = `This structural directive supports advanced type inference, but the current compiler configuration prevents its usage. The variable ${varIdentification} will have type 'any' as a result.
9698
9736
 
9699
9737
  Consider enabling the 'strictTemplates' option in your tsconfig.json for better type inference within this template.`;
9700
- this._diagnostics.push(makeTemplateDiagnostic(templateId, mapping, diagnosticVar.keySpan, ts37.DiagnosticCategory.Suggestion, ngErrorCode(ErrorCode.SUGGEST_SUBOPTIMAL_TYPE_INFERENCE), message));
9738
+ this._diagnostics.push(makeTemplateDiagnostic(id, mapping, diagnosticVar.keySpan, ts37.DiagnosticCategory.Suggestion, ngErrorCode(ErrorCode.SUGGEST_SUBOPTIMAL_TYPE_INFERENCE), message));
9701
9739
  }
9702
- splitTwoWayBinding(templateId, input, output, inputConsumer, outputConsumer) {
9703
- const mapping = this.resolver.getSourceMapping(templateId);
9740
+ splitTwoWayBinding(id, input, output, inputConsumer, outputConsumer) {
9741
+ const mapping = this.resolver.getTemplateSourceMapping(id);
9704
9742
  const errorMsg = `The property and event halves of the two-way binding '${input.name}' are not bound to the same target.
9705
9743
  Find more at https://angular.dev/guide/templates/two-way-binding#how-two-way-binding-works`;
9706
9744
  const relatedMessages = [];
@@ -9731,22 +9769,22 @@ Consider enabling the 'strictTemplates' option in your tsconfig.json for better
9731
9769
  sourceFile: outputConsumer.name.getSourceFile()
9732
9770
  });
9733
9771
  }
9734
- this._diagnostics.push(makeTemplateDiagnostic(templateId, mapping, input.keySpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.SPLIT_TWO_WAY_BINDING), errorMsg, relatedMessages));
9772
+ this._diagnostics.push(makeTemplateDiagnostic(id, mapping, input.keySpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.SPLIT_TWO_WAY_BINDING), errorMsg, relatedMessages));
9735
9773
  }
9736
- missingRequiredInputs(templateId, element, directiveName, isComponent, inputAliases) {
9774
+ missingRequiredInputs(id, element, directiveName, isComponent, inputAliases) {
9737
9775
  const message = `Required input${inputAliases.length === 1 ? "" : "s"} ${inputAliases.map((n2) => `'${n2}'`).join(", ")} from ${isComponent ? "component" : "directive"} ${directiveName} must be specified.`;
9738
- this._diagnostics.push(makeTemplateDiagnostic(templateId, this.resolver.getSourceMapping(templateId), element.startSourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.MISSING_REQUIRED_INPUTS), message));
9776
+ this._diagnostics.push(makeTemplateDiagnostic(id, this.resolver.getTemplateSourceMapping(id), element.startSourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.MISSING_REQUIRED_INPUTS), message));
9739
9777
  }
9740
- illegalForLoopTrackAccess(templateId, block, access) {
9741
- const sourceSpan = this.resolver.toParseSourceSpan(templateId, access.sourceSpan);
9778
+ illegalForLoopTrackAccess(id, block, access) {
9779
+ const sourceSpan = this.resolver.toTemplateParseSourceSpan(id, access.sourceSpan);
9742
9780
  if (sourceSpan === null) {
9743
9781
  throw new Error(`Assertion failure: no SourceLocation found for property read.`);
9744
9782
  }
9745
9783
  const messageVars = [block.item, ...block.contextVariables.filter((v) => v.value === "$index")].map((v) => `'${v.name}'`).join(", ");
9746
9784
  const message = `Cannot access '${access.name}' inside of a track expression. Only ${messageVars} and properties on the containing component are available to this expression.`;
9747
- this._diagnostics.push(makeTemplateDiagnostic(templateId, this.resolver.getSourceMapping(templateId), sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.ILLEGAL_FOR_LOOP_TRACK_ACCESS), message));
9785
+ this._diagnostics.push(makeTemplateDiagnostic(id, this.resolver.getTemplateSourceMapping(id), sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.ILLEGAL_FOR_LOOP_TRACK_ACCESS), message));
9748
9786
  }
9749
- inaccessibleDeferredTriggerElement(templateId, trigger) {
9787
+ inaccessibleDeferredTriggerElement(id, trigger) {
9750
9788
  let message;
9751
9789
  if (trigger.reference === null) {
9752
9790
  message = `Trigger cannot find reference. Make sure that the @defer block has a @placeholder with at least one root element node.`;
@@ -9755,9 +9793,9 @@ Consider enabling the 'strictTemplates' option in your tsconfig.json for better
9755
9793
  Check that an element with #${trigger.reference} exists in the same template and it's accessible from the @defer block.
9756
9794
  Deferred blocks can only access triggers in same view, a parent embedded view or the root view of the @placeholder block.`;
9757
9795
  }
9758
- this._diagnostics.push(makeTemplateDiagnostic(templateId, this.resolver.getSourceMapping(templateId), trigger.sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.INACCESSIBLE_DEFERRED_TRIGGER_ELEMENT), message));
9796
+ this._diagnostics.push(makeTemplateDiagnostic(id, this.resolver.getTemplateSourceMapping(id), trigger.sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.INACCESSIBLE_DEFERRED_TRIGGER_ELEMENT), message));
9759
9797
  }
9760
- controlFlowPreventingContentProjection(templateId, category, projectionNode, componentName, slotSelector, controlFlowNode, preservesWhitespaces) {
9798
+ controlFlowPreventingContentProjection(id, category, projectionNode, componentName, slotSelector, controlFlowNode, preservesWhitespaces) {
9761
9799
  const blockName = controlFlowNode.nameSpan.toString().trim();
9762
9800
  const lines = [
9763
9801
  `Node matches the "${slotSelector}" slot of the "${componentName}" component, but will not be projected into the specific slot because the surrounding ${blockName} has more than one node at its root. To project the node in the right slot, you can:
@@ -9770,37 +9808,37 @@ Deferred blocks can only access triggers in same view, a parent embedded view or
9770
9808
  lines.push("Note: the host component has `preserveWhitespaces: true` which may cause whitespace to affect content projection.");
9771
9809
  }
9772
9810
  lines.push("", 'This check can be disabled using the `extendedDiagnostics.checks.controlFlowPreventingContentProjection = "suppress" compiler option.`');
9773
- this._diagnostics.push(makeTemplateDiagnostic(templateId, this.resolver.getSourceMapping(templateId), projectionNode.startSourceSpan, category, ngErrorCode(ErrorCode.CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION), lines.join("\n")));
9811
+ this._diagnostics.push(makeTemplateDiagnostic(id, this.resolver.getTemplateSourceMapping(id), projectionNode.startSourceSpan, category, ngErrorCode(ErrorCode.CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION), lines.join("\n")));
9774
9812
  }
9775
- illegalWriteToLetDeclaration(templateId, node, target) {
9776
- const sourceSpan = this.resolver.toParseSourceSpan(templateId, node.sourceSpan);
9813
+ illegalWriteToLetDeclaration(id, node, target) {
9814
+ const sourceSpan = this.resolver.toTemplateParseSourceSpan(id, node.sourceSpan);
9777
9815
  if (sourceSpan === null) {
9778
9816
  throw new Error(`Assertion failure: no SourceLocation found for property write.`);
9779
9817
  }
9780
- this._diagnostics.push(makeTemplateDiagnostic(templateId, this.resolver.getSourceMapping(templateId), sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.ILLEGAL_LET_WRITE), `Cannot assign to @let declaration '${target.name}'.`));
9818
+ this._diagnostics.push(makeTemplateDiagnostic(id, this.resolver.getTemplateSourceMapping(id), sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.ILLEGAL_LET_WRITE), `Cannot assign to @let declaration '${target.name}'.`));
9781
9819
  }
9782
- letUsedBeforeDefinition(templateId, node, target) {
9783
- const sourceSpan = this.resolver.toParseSourceSpan(templateId, node.sourceSpan);
9820
+ letUsedBeforeDefinition(id, node, target) {
9821
+ const sourceSpan = this.resolver.toTemplateParseSourceSpan(id, node.sourceSpan);
9784
9822
  if (sourceSpan === null) {
9785
9823
  throw new Error(`Assertion failure: no SourceLocation found for property read.`);
9786
9824
  }
9787
- this._diagnostics.push(makeTemplateDiagnostic(templateId, this.resolver.getSourceMapping(templateId), sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.LET_USED_BEFORE_DEFINITION), `Cannot read @let declaration '${target.name}' before it has been defined.`));
9825
+ this._diagnostics.push(makeTemplateDiagnostic(id, this.resolver.getTemplateSourceMapping(id), sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.LET_USED_BEFORE_DEFINITION), `Cannot read @let declaration '${target.name}' before it has been defined.`));
9788
9826
  }
9789
- conflictingDeclaration(templateId, decl) {
9790
- const mapping = this.resolver.getSourceMapping(templateId);
9827
+ conflictingDeclaration(id, decl) {
9828
+ const mapping = this.resolver.getTemplateSourceMapping(id);
9791
9829
  const errorMsg = `Cannot declare @let called '${decl.name}' as there is another symbol in the template with the same name.`;
9792
- this._diagnostics.push(makeTemplateDiagnostic(templateId, mapping, decl.sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.CONFLICTING_LET_DECLARATION), errorMsg));
9830
+ this._diagnostics.push(makeTemplateDiagnostic(id, mapping, decl.sourceSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.CONFLICTING_LET_DECLARATION), errorMsg));
9793
9831
  }
9794
9832
  };
9795
- function makeInlineDiagnostic(templateId, code, node, messageText, relatedInformation) {
9833
+ function makeInlineDiagnostic(id, code, node, messageText, relatedInformation) {
9796
9834
  return {
9797
9835
  ...makeDiagnostic(code, node, messageText, relatedInformation),
9798
- componentFile: node.getSourceFile(),
9799
- templateId
9836
+ sourceFile: node.getSourceFile(),
9837
+ typeCheckId: id
9800
9838
  };
9801
9839
  }
9802
9840
 
9803
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/shim.mjs
9841
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/shim.mjs
9804
9842
  import ts38 from "typescript";
9805
9843
  var TypeCheckShimGenerator = class {
9806
9844
  extensionPrefix = "ngtypecheck";
@@ -9816,11 +9854,11 @@ var TypeCheckShimGenerator = class {
9816
9854
  }
9817
9855
  };
9818
9856
 
9819
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
9857
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
9820
9858
  import { BindingPipe, BindingType, Call as Call2, createCssSelectorFromNode, CssSelector as CssSelector2, DYNAMIC_TYPE, ImplicitReceiver as ImplicitReceiver2, ParsedEventType, PropertyRead as PropertyRead3, PropertyWrite as PropertyWrite2, R3Identifiers as R3Identifiers4, SafeCall, SafePropertyRead as SafePropertyRead3, SelectorMatcher as SelectorMatcher2, ThisReceiver, TmplAstBoundAttribute, TmplAstBoundText, TmplAstContent, TmplAstDeferredBlock, TmplAstElement as TmplAstElement2, TmplAstForLoopBlock, TmplAstIcu, TmplAstIfBlock, TmplAstIfBlockBranch, TmplAstLetDeclaration as TmplAstLetDeclaration2, TmplAstReference as TmplAstReference2, TmplAstSwitchBlock, TmplAstTemplate, TmplAstText, TmplAstTextAttribute as TmplAstTextAttribute2, TmplAstVariable, TransplantedType } from "@angular/compiler";
9821
9859
  import ts41 from "typescript";
9822
9860
 
9823
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/diagnostics.mjs
9861
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/diagnostics.mjs
9824
9862
  import { AbsoluteSourceSpan as AbsoluteSourceSpan3 } from "@angular/compiler";
9825
9863
  import ts39 from "typescript";
9826
9864
  function wrapForDiagnostics(expr) {
@@ -9843,7 +9881,7 @@ function addParseSpanInfo(node, span) {
9843
9881
  false
9844
9882
  );
9845
9883
  }
9846
- function addTemplateId(tcb, id) {
9884
+ function addTypeCheckId(tcb, id) {
9847
9885
  ts39.addSyntheticLeadingComment(tcb, ts39.SyntaxKind.MultiLineCommentTrivia, id, true);
9848
9886
  }
9849
9887
  function shouldReportDiagnostic(diagnostic) {
@@ -9863,7 +9901,7 @@ function translateDiagnostic(diagnostic, resolver) {
9863
9901
  if (diagnostic.file === void 0 || diagnostic.start === void 0) {
9864
9902
  return null;
9865
9903
  }
9866
- const fullMapping = getTemplateMapping(
9904
+ const fullMapping = getSourceMapping(
9867
9905
  diagnostic.file,
9868
9906
  diagnostic.start,
9869
9907
  resolver,
@@ -9872,11 +9910,11 @@ function translateDiagnostic(diagnostic, resolver) {
9872
9910
  if (fullMapping === null) {
9873
9911
  return null;
9874
9912
  }
9875
- const { sourceLocation, templateSourceMapping, span } = fullMapping;
9913
+ const { sourceLocation, sourceMapping: templateSourceMapping, span } = fullMapping;
9876
9914
  return makeTemplateDiagnostic(sourceLocation.id, templateSourceMapping, span, diagnostic.category, diagnostic.code, diagnostic.messageText);
9877
9915
  }
9878
9916
 
9879
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/expression.mjs
9917
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/expression.mjs
9880
9918
  import { ASTWithSource, Call, EmptyExpr as EmptyExpr2, PropertyRead as PropertyRead2, SafeKeyedRead, SafePropertyRead as SafePropertyRead2 } from "@angular/compiler";
9881
9919
  import ts40 from "typescript";
9882
9920
  var ANY_EXPRESSION = ts40.factory.createAsExpression(ts40.factory.createNumericLiteral("0"), ts40.factory.createKeywordTypeNode(ts40.SyntaxKind.AnyKeyword));
@@ -10162,6 +10200,12 @@ var AstTranslator = class {
10162
10200
  visitTemplateLiteralElement(ast, context) {
10163
10201
  throw new Error("Method not implemented");
10164
10202
  }
10203
+ visitTaggedTemplateLiteral(ast) {
10204
+ return ts40.factory.createTaggedTemplateExpression(this.translate(ast.tag), void 0, this.visitTemplateLiteral(ast.template));
10205
+ }
10206
+ visitParenthesizedExpression(ast) {
10207
+ return ts40.factory.createParenthesizedExpression(this.translate(ast.expression));
10208
+ }
10165
10209
  convertToSafeCall(ast, expr, args) {
10166
10210
  if (this.config.strictSafeNavigationTypes) {
10167
10211
  const call = ts40.factory.createCallExpression(ts40.factory.createNonNullExpression(expr), void 0, args);
@@ -10253,11 +10297,17 @@ var _VeSafeLhsInferenceBugDetector = class {
10253
10297
  visitTemplateLiteralElement(ast, context) {
10254
10298
  return false;
10255
10299
  }
10300
+ visitTaggedTemplateLiteral(ast, context) {
10301
+ return false;
10302
+ }
10303
+ visitParenthesizedExpression(ast, context) {
10304
+ return ast.expression.visit(this);
10305
+ }
10256
10306
  };
10257
10307
  var VeSafeLhsInferenceBugDetector = _VeSafeLhsInferenceBugDetector;
10258
10308
  __publicField(VeSafeLhsInferenceBugDetector, "SINGLETON", new _VeSafeLhsInferenceBugDetector());
10259
10309
 
10260
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
10310
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
10261
10311
  var TcbGenericContextBehavior;
10262
10312
  (function(TcbGenericContextBehavior2) {
10263
10313
  TcbGenericContextBehavior2[TcbGenericContextBehavior2["UseEmitter"] = 0] = "UseEmitter";
@@ -10306,7 +10356,7 @@ function generateTypeCheckBlock(env, ref, name, meta, domSchemaChecker, oobRecor
10306
10356
  void 0,
10307
10357
  body
10308
10358
  );
10309
- addTemplateId(fnDecl, meta.id);
10359
+ addTypeCheckId(fnDecl, meta.id);
10310
10360
  return fnDecl;
10311
10361
  }
10312
10362
  var TcbOp = class {
@@ -11270,7 +11320,7 @@ var Context = class {
11270
11320
  return ts41.factory.createIdentifier(`_t${this.nextId++}`);
11271
11321
  }
11272
11322
  getPipeByName(name) {
11273
- if (!this.pipes.has(name)) {
11323
+ if (this.pipes === null || !this.pipes.has(name)) {
11274
11324
  return null;
11275
11325
  }
11276
11326
  return this.pipes.get(name);
@@ -11952,7 +12002,7 @@ var TcbForLoopTrackTranslator = class extends TcbExpressionTranslator {
11952
12002
  }
11953
12003
  };
11954
12004
 
11955
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_file.mjs
12005
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_file.mjs
11956
12006
  import ts42 from "typescript";
11957
12007
  var TypeCheckFile = class extends Environment {
11958
12008
  fileName;
@@ -12001,7 +12051,7 @@ var TypeCheckFile = class extends Environment {
12001
12051
  }
12002
12052
  };
12003
12053
 
12004
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
12054
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
12005
12055
  var InliningMode;
12006
12056
  (function(InliningMode2) {
12007
12057
  InliningMode2[InliningMode2["InlineOps"] = 0] = "InlineOps";
@@ -12030,18 +12080,19 @@ var TypeCheckContextImpl = class {
12030
12080
  }
12031
12081
  opMap = /* @__PURE__ */ new Map();
12032
12082
  typeCtorPending = /* @__PURE__ */ new Set();
12033
- addTemplate(ref, binder, template, pipes, schemas, sourceMapping, file, parseErrors, isStandalone, preserveWhitespaces) {
12034
- if (!this.host.shouldCheckComponent(ref.node)) {
12083
+ addDirective(ref, binder, schemas, templateContext, isStandalone) {
12084
+ var _a;
12085
+ if (!this.host.shouldCheckClass(ref.node)) {
12035
12086
  return;
12036
12087
  }
12037
12088
  const fileData = this.dataForFile(ref.node.getSourceFile());
12038
- const shimData = this.pendingShimForComponent(ref.node);
12039
- const templateId = fileData.sourceManager.getTemplateId(ref.node);
12040
- const templateDiagnostics = [];
12041
- if (parseErrors !== null) {
12042
- templateDiagnostics.push(...getTemplateDiagnostics(parseErrors, templateId, sourceMapping));
12089
+ const shimData = this.pendingShimForClass(ref.node);
12090
+ const id = fileData.sourceManager.getTypeCheckId(ref.node);
12091
+ const templateParsingDiagnostics = [];
12092
+ if (templateContext !== null && templateContext.parseErrors !== null) {
12093
+ templateParsingDiagnostics.push(...getTemplateDiagnostics(templateContext.parseErrors, id, templateContext.sourceMapping));
12043
12094
  }
12044
- const boundTarget = binder.bind({ template });
12095
+ const boundTarget = binder.bind({ template: templateContext == null ? void 0 : templateContext.nodes });
12045
12096
  if (this.inlining === InliningMode.InlineOps) {
12046
12097
  for (const dir of boundTarget.getUsedDirectives()) {
12047
12098
  const dirRef = dir.ref;
@@ -12060,31 +12111,35 @@ var TypeCheckContextImpl = class {
12060
12111
  });
12061
12112
  }
12062
12113
  }
12063
- shimData.templates.set(templateId, {
12064
- template,
12114
+ shimData.data.set(id, {
12115
+ template: (templateContext == null ? void 0 : templateContext.nodes) || null,
12065
12116
  boundTarget,
12066
- templateDiagnostics
12117
+ templateParsingDiagnostics
12067
12118
  });
12068
12119
  const usedPipes = [];
12069
- for (const name of boundTarget.getUsedPipes()) {
12070
- if (!pipes.has(name)) {
12071
- continue;
12120
+ if (templateContext !== null) {
12121
+ for (const name of boundTarget.getUsedPipes()) {
12122
+ if (templateContext.pipes.has(name)) {
12123
+ usedPipes.push(templateContext.pipes.get(name).ref);
12124
+ }
12072
12125
  }
12073
- usedPipes.push(pipes.get(name).ref);
12074
12126
  }
12075
12127
  const inliningRequirement = requiresInlineTypeCheckBlock(ref, shimData.file, usedPipes, this.reflector);
12076
12128
  if (this.inlining === InliningMode.Error && inliningRequirement === TcbInliningRequirement.MustInline) {
12077
- shimData.oobRecorder.requiresInlineTcb(templateId, ref.node);
12129
+ shimData.oobRecorder.requiresInlineTcb(id, ref.node);
12078
12130
  this.perf.eventCount(PerfEvent.SkipGenerateTcbNoInline);
12079
12131
  return;
12080
12132
  }
12133
+ if (templateContext !== null) {
12134
+ fileData.sourceManager.captureTemplateSource(id, templateContext.sourceMapping, templateContext.file);
12135
+ }
12081
12136
  const meta = {
12082
- id: fileData.sourceManager.captureSource(ref.node, sourceMapping, file),
12137
+ id,
12083
12138
  boundTarget,
12084
- pipes,
12139
+ pipes: (templateContext == null ? void 0 : templateContext.pipes) || null,
12085
12140
  schemas,
12086
12141
  isStandalone,
12087
- preserveWhitespaces
12142
+ preserveWhitespaces: (_a = templateContext == null ? void 0 : templateContext.preserveWhitespaces) != null ? _a : false
12088
12143
  };
12089
12144
  this.perf.eventCount(PerfEvent.GenerateTcb);
12090
12145
  if (inliningRequirement !== TcbInliningRequirement.None && this.inlining === InliningMode.InlineOps) {
@@ -12170,7 +12225,7 @@ var TypeCheckContextImpl = class {
12170
12225
  ],
12171
12226
  hasInlines: pendingFileData.hasInlines,
12172
12227
  path: pendingShimData.file.fileName,
12173
- templates: pendingShimData.templates
12228
+ data: pendingShimData.data
12174
12229
  });
12175
12230
  const sfText = pendingShimData.file.render(false);
12176
12231
  updates.set(pendingShimData.file.fileName, {
@@ -12190,7 +12245,7 @@ var TypeCheckContextImpl = class {
12190
12245
  ops.push(new InlineTcbOp(ref, tcbMeta, this.config, this.reflector, shimData.domSchemaChecker, shimData.oobRecorder));
12191
12246
  fileData.hasInlines = true;
12192
12247
  }
12193
- pendingShimForComponent(node) {
12248
+ pendingShimForClass(node) {
12194
12249
  const fileData = this.dataForFile(node.getSourceFile());
12195
12250
  const shimPath = TypeCheckShimGenerator.shimFor(absoluteFromSourceFile(node.getSourceFile()));
12196
12251
  if (!fileData.shimData.has(shimPath)) {
@@ -12198,7 +12253,7 @@ var TypeCheckContextImpl = class {
12198
12253
  domSchemaChecker: new RegistryDomSchemaChecker(fileData.sourceManager),
12199
12254
  oobRecorder: new OutOfBandDiagnosticRecorderImpl(fileData.sourceManager),
12200
12255
  file: new TypeCheckFile(shimPath, this.config, this.refEmitter, this.reflector, this.compilerHost),
12201
- templates: /* @__PURE__ */ new Map()
12256
+ data: /* @__PURE__ */ new Map()
12202
12257
  });
12203
12258
  }
12204
12259
  return fileData.shimData.get(shimPath);
@@ -12269,10 +12324,10 @@ var TypeCtorOp = class {
12269
12324
  }
12270
12325
  };
12271
12326
 
12272
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
12327
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
12273
12328
  import { ParseLocation as ParseLocation2, ParseSourceSpan as ParseSourceSpan2 } from "@angular/compiler";
12274
12329
 
12275
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/line_mappings.mjs
12330
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/line_mappings.mjs
12276
12331
  var LF_CHAR = 10;
12277
12332
  var CR_CHAR = 13;
12278
12333
  var LINE_SEP_CHAR = 8232;
@@ -12313,7 +12368,7 @@ function findClosestLineStartPosition(linesMap, position, low = 0, high = linesM
12313
12368
  return low - 1;
12314
12369
  }
12315
12370
 
12316
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
12371
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
12317
12372
  var TemplateSource = class {
12318
12373
  mapping;
12319
12374
  file;
@@ -12339,23 +12394,21 @@ var TemplateSource = class {
12339
12394
  return this.lineStarts;
12340
12395
  }
12341
12396
  };
12342
- var TemplateSourceManager = class {
12397
+ var DirectiveSourceManager = class {
12343
12398
  templateSources = /* @__PURE__ */ new Map();
12344
- getTemplateId(node) {
12345
- return getTemplateId(node);
12399
+ getTypeCheckId(node) {
12400
+ return getTypeCheckId(node);
12346
12401
  }
12347
- captureSource(node, mapping, file) {
12348
- const id = getTemplateId(node);
12402
+ captureTemplateSource(id, mapping, file) {
12349
12403
  this.templateSources.set(id, new TemplateSource(mapping, file));
12350
- return id;
12351
12404
  }
12352
- getSourceMapping(id) {
12405
+ getTemplateSourceMapping(id) {
12353
12406
  if (!this.templateSources.has(id)) {
12354
- throw new Error(`Unexpected unknown template ID: ${id}`);
12407
+ throw new Error(`Unexpected unknown type check ID: ${id}`);
12355
12408
  }
12356
12409
  return this.templateSources.get(id).mapping;
12357
12410
  }
12358
- toParseSourceSpan(id, span) {
12411
+ toTemplateParseSourceSpan(id, span) {
12359
12412
  if (!this.templateSources.has(id)) {
12360
12413
  return null;
12361
12414
  }
@@ -12364,22 +12417,22 @@ var TemplateSourceManager = class {
12364
12417
  }
12365
12418
  };
12366
12419
 
12367
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.mjs
12420
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.mjs
12368
12421
  import { AST, ASTWithName, ASTWithSource as ASTWithSource2, BindingPipe as BindingPipe2, PropertyRead as PropertyRead4, PropertyWrite as PropertyWrite3, R3Identifiers as R3Identifiers5, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent, TmplAstElement as TmplAstElement3, TmplAstLetDeclaration as TmplAstLetDeclaration3, TmplAstReference as TmplAstReference3, TmplAstTemplate as TmplAstTemplate2, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
12369
12422
  import ts44 from "typescript";
12370
12423
  var SymbolBuilder = class {
12371
12424
  tcbPath;
12372
12425
  tcbIsShim;
12373
12426
  typeCheckBlock;
12374
- templateData;
12427
+ typeCheckData;
12375
12428
  componentScopeReader;
12376
12429
  getTypeChecker;
12377
12430
  symbolCache = /* @__PURE__ */ new Map();
12378
- constructor(tcbPath, tcbIsShim, typeCheckBlock, templateData, componentScopeReader, getTypeChecker) {
12431
+ constructor(tcbPath, tcbIsShim, typeCheckBlock, typeCheckData, componentScopeReader, getTypeChecker) {
12379
12432
  this.tcbPath = tcbPath;
12380
12433
  this.tcbIsShim = tcbIsShim;
12381
12434
  this.typeCheckBlock = typeCheckBlock;
12382
- this.templateData = templateData;
12435
+ this.typeCheckData = typeCheckData;
12383
12436
  this.componentScopeReader = componentScopeReader;
12384
12437
  this.getTypeChecker = getTypeChecker;
12385
12438
  }
@@ -12509,12 +12562,12 @@ var SymbolBuilder = class {
12509
12562
  }
12510
12563
  getDirectiveMeta(host, directiveDeclaration) {
12511
12564
  var _a;
12512
- let directives = this.templateData.boundTarget.getDirectivesOfNode(host);
12565
+ let directives = this.typeCheckData.boundTarget.getDirectivesOfNode(host);
12513
12566
  const firstChild = host.children[0];
12514
12567
  if (firstChild instanceof TmplAstElement3) {
12515
12568
  const isMicrosyntaxTemplate = host instanceof TmplAstTemplate2 && sourceSpanEqual(firstChild.sourceSpan, host.sourceSpan);
12516
12569
  if (isMicrosyntaxTemplate) {
12517
- const firstChildDirectives = this.templateData.boundTarget.getDirectivesOfNode(firstChild);
12570
+ const firstChildDirectives = this.typeCheckData.boundTarget.getDirectivesOfNode(firstChild);
12518
12571
  if (firstChildDirectives !== null && directives !== null) {
12519
12572
  directives = directives.concat(firstChildDirectives);
12520
12573
  } else {
@@ -12535,7 +12588,7 @@ var SymbolBuilder = class {
12535
12588
  return scope.ngModule;
12536
12589
  }
12537
12590
  getSymbolOfBoundEvent(eventBinding) {
12538
- const consumer = this.templateData.boundTarget.getConsumerOfBinding(eventBinding);
12591
+ const consumer = this.typeCheckData.boundTarget.getConsumerOfBinding(eventBinding);
12539
12592
  if (consumer === null) {
12540
12593
  return null;
12541
12594
  }
@@ -12621,7 +12674,7 @@ var SymbolBuilder = class {
12621
12674
  return { kind: SymbolKind.Output, bindings };
12622
12675
  }
12623
12676
  getSymbolOfInputBinding(binding) {
12624
- const consumer = this.templateData.boundTarget.getConsumerOfBinding(binding);
12677
+ const consumer = this.typeCheckData.boundTarget.getConsumerOfBinding(binding);
12625
12678
  if (consumer === null) {
12626
12679
  return null;
12627
12680
  }
@@ -12741,7 +12794,7 @@ var SymbolBuilder = class {
12741
12794
  };
12742
12795
  }
12743
12796
  getSymbolOfReference(ref) {
12744
- const target = this.templateData.boundTarget.getReferenceTarget(ref);
12797
+ const target = this.typeCheckData.boundTarget.getReferenceTarget(ref);
12745
12798
  let node = findFirstMatchingNode(this.typeCheckBlock, {
12746
12799
  withSpan: ref.sourceSpan,
12747
12800
  filter: ts44.isVariableDeclaration
@@ -12846,7 +12899,7 @@ var SymbolBuilder = class {
12846
12899
  if (expression instanceof ASTWithSource2) {
12847
12900
  expression = expression.ast;
12848
12901
  }
12849
- const expressionTarget = this.templateData.boundTarget.getExpressionTarget(expression);
12902
+ const expressionTarget = this.typeCheckData.boundTarget.getExpressionTarget(expression);
12850
12903
  if (expressionTarget !== null) {
12851
12904
  return this.getSymbol(expressionTarget);
12852
12905
  }
@@ -12946,7 +12999,7 @@ function unwrapSignalInputWriteTAccessor(expr) {
12946
12999
  };
12947
13000
  }
12948
13001
 
12949
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
13002
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
12950
13003
  var REGISTRY2 = new DomElementSchemaRegistry2();
12951
13004
  var TemplateTypeCheckerImpl = class {
12952
13005
  originalProgram;
@@ -13016,9 +13069,8 @@ var TemplateTypeCheckerImpl = class {
13016
13069
  if (!fileRecord.shimData.has(shimPath)) {
13017
13070
  return { data: null, tcb: null, tcbPath: shimPath, tcbIsShim: true };
13018
13071
  }
13019
- const templateId = fileRecord.sourceManager.getTemplateId(component);
13072
+ const id = fileRecord.sourceManager.getTypeCheckId(component);
13020
13073
  const shimRecord = fileRecord.shimData.get(shimPath);
13021
- const id = fileRecord.sourceManager.getTemplateId(component);
13022
13074
  const program = this.programDriver.getProgram();
13023
13075
  const shimSf = getSourceFileOrNull(program, shimPath);
13024
13076
  if (shimSf === null || !fileRecord.shimData.has(shimPath)) {
@@ -13034,8 +13086,8 @@ var TemplateTypeCheckerImpl = class {
13034
13086
  }
13035
13087
  }
13036
13088
  let data = null;
13037
- if (shimRecord.templates.has(templateId)) {
13038
- data = shimRecord.templates.get(templateId);
13089
+ if (shimRecord.data.has(id)) {
13090
+ data = shimRecord.data.get(id);
13039
13091
  }
13040
13092
  return { data, tcb, tcbPath, tcbIsShim: tcbPath === shimPath };
13041
13093
  }
@@ -13065,7 +13117,7 @@ var TemplateTypeCheckerImpl = class {
13065
13117
  }
13066
13118
  return null;
13067
13119
  }
13068
- getTemplateMappingAtTcbLocation(tcbLocation) {
13120
+ getSourceMappingAtTcbLocation(tcbLocation) {
13069
13121
  const fileRecord = this.getFileRecordForTcbLocation(tcbLocation);
13070
13122
  if (fileRecord === null) {
13071
13123
  return null;
@@ -13074,7 +13126,7 @@ var TemplateTypeCheckerImpl = class {
13074
13126
  if (shimSf === void 0) {
13075
13127
  return null;
13076
13128
  }
13077
- return getTemplateMapping(
13129
+ return getSourceMapping(
13078
13130
  shimSf,
13079
13131
  tcbLocation.positionInFile,
13080
13132
  fileRecord.sourceManager,
@@ -13106,8 +13158,8 @@ var TemplateTypeCheckerImpl = class {
13106
13158
  const shimSf = getSourceFileOrError(typeCheckProgram, shimPath);
13107
13159
  diagnostics.push(...typeCheckProgram.getSemanticDiagnostics(shimSf).map((diag) => convertDiagnostic(diag, fileRecord.sourceManager)));
13108
13160
  diagnostics.push(...shimRecord.genesisDiagnostics);
13109
- for (const templateData of shimRecord.templates.values()) {
13110
- diagnostics.push(...templateData.templateDiagnostics);
13161
+ for (const templateData of shimRecord.data.values()) {
13162
+ diagnostics.push(...templateData.templateParsingDiagnostics);
13111
13163
  }
13112
13164
  }
13113
13165
  return diagnostics.filter((diag) => diag !== null);
@@ -13123,7 +13175,7 @@ var TemplateTypeCheckerImpl = class {
13123
13175
  if (!fileRecord.shimData.has(shimPath)) {
13124
13176
  return [];
13125
13177
  }
13126
- const templateId = fileRecord.sourceManager.getTemplateId(component);
13178
+ const id = fileRecord.sourceManager.getTypeCheckId(component);
13127
13179
  const shimRecord = fileRecord.shimData.get(shimPath);
13128
13180
  const typeCheckProgram = this.programDriver.getProgram();
13129
13181
  const diagnostics = [];
@@ -13134,10 +13186,10 @@ var TemplateTypeCheckerImpl = class {
13134
13186
  const shimSf = getSourceFileOrError(typeCheckProgram, shimPath);
13135
13187
  diagnostics.push(...typeCheckProgram.getSemanticDiagnostics(shimSf).map((diag) => convertDiagnostic(diag, fileRecord.sourceManager)));
13136
13188
  diagnostics.push(...shimRecord.genesisDiagnostics);
13137
- for (const templateData of shimRecord.templates.values()) {
13138
- diagnostics.push(...templateData.templateDiagnostics);
13189
+ for (const templateData of shimRecord.data.values()) {
13190
+ diagnostics.push(...templateData.templateParsingDiagnostics);
13139
13191
  }
13140
- return diagnostics.filter((diag) => diag !== null && diag.templateId === templateId);
13192
+ return diagnostics.filter((diag) => diag !== null && diag.typeCheckId === id);
13141
13193
  });
13142
13194
  }
13143
13195
  getTypeCheckBlock(component) {
@@ -13173,7 +13225,7 @@ var TemplateTypeCheckerImpl = class {
13173
13225
  const sfPath = absoluteFromSourceFile(sf);
13174
13226
  const shimPath = TypeCheckShimGenerator.shimFor(sfPath);
13175
13227
  const fileData = this.getFileData(sfPath);
13176
- const templateId = fileData.sourceManager.getTemplateId(clazz);
13228
+ const id = fileData.sourceManager.getTypeCheckId(clazz);
13177
13229
  fileData.shimData.delete(shimPath);
13178
13230
  fileData.isComplete = false;
13179
13231
  this.isComplete = false;
@@ -13185,10 +13237,10 @@ var TemplateTypeCheckerImpl = class {
13185
13237
  makeTemplateDiagnostic(clazz, sourceSpan, category, errorCode, message, relatedInformation) {
13186
13238
  const sfPath = absoluteFromSourceFile(clazz.getSourceFile());
13187
13239
  const fileRecord = this.state.get(sfPath);
13188
- const templateId = fileRecord.sourceManager.getTemplateId(clazz);
13189
- const mapping = fileRecord.sourceManager.getSourceMapping(templateId);
13240
+ const id = fileRecord.sourceManager.getTypeCheckId(clazz);
13241
+ const mapping = fileRecord.sourceManager.getTemplateSourceMapping(id);
13190
13242
  return {
13191
- ...makeTemplateDiagnostic(templateId, mapping, sourceSpan, category, ngErrorCode(errorCode), message, relatedInformation),
13243
+ ...makeTemplateDiagnostic(id, mapping, sourceSpan, category, ngErrorCode(errorCode), message, relatedInformation),
13192
13244
  __ngCode: errorCode
13193
13245
  };
13194
13246
  }
@@ -13306,7 +13358,7 @@ var TemplateTypeCheckerImpl = class {
13306
13358
  if (!this.state.has(path)) {
13307
13359
  this.state.set(path, {
13308
13360
  hasInlines: false,
13309
- sourceManager: new TemplateSourceManager(),
13361
+ sourceManager: new DirectiveSourceManager(),
13310
13362
  isComplete: false,
13311
13363
  shimData: /* @__PURE__ */ new Map()
13312
13364
  });
@@ -13594,7 +13646,7 @@ var WholeProgramTypeCheckingHost = class {
13594
13646
  getSourceManager(sfPath) {
13595
13647
  return this.impl.getFileData(sfPath).sourceManager;
13596
13648
  }
13597
- shouldCheckComponent(node) {
13649
+ shouldCheckClass(node) {
13598
13650
  const sfPath = absoluteFromSourceFile(node.getSourceFile());
13599
13651
  const shimPath = TypeCheckShimGenerator.shimFor(sfPath);
13600
13652
  const fileData = this.impl.getFileData(sfPath);
@@ -13630,7 +13682,7 @@ var SingleFileTypeCheckingHost = class {
13630
13682
  this.assertPath(sfPath);
13631
13683
  return this.fileData.sourceManager;
13632
13684
  }
13633
- shouldCheckComponent(node) {
13685
+ shouldCheckClass(node) {
13634
13686
  if (this.sfPath !== absoluteFromSourceFile(node.getSourceFile())) {
13635
13687
  return false;
13636
13688
  }
@@ -13671,17 +13723,17 @@ var SingleShimTypeCheckingHost = class extends SingleFileTypeCheckingHost {
13671
13723
  }
13672
13724
  };
13673
13725
 
13674
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
13726
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
13675
13727
  import { outputAst as o3 } from "@angular/compiler";
13676
13728
 
13677
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/extract_dependencies.mjs
13729
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/extract_dependencies.mjs
13678
13730
  import { outputAst as o2 } from "@angular/compiler";
13679
13731
  import ts45 from "typescript";
13680
13732
  function extractHmrDependencies(node, definition, factory, deferBlockMetadata, classMetadata, debugInfo, reflection, evaluator) {
13681
13733
  var _a, _b;
13682
13734
  const name = ts45.isClassDeclaration(node) && node.name ? node.name.text : null;
13683
13735
  const visitor = new PotentialTopLevelReadsVisitor();
13684
- const sourceFile = node.getSourceFile();
13736
+ const sourceFile = ts45.getOriginalNode(node).getSourceFile();
13685
13737
  definition.expression.visitExpression(visitor, null);
13686
13738
  definition.statements.forEach((statement) => statement.visitStatement(visitor, null));
13687
13739
  (_a = factory.initializer) == null ? void 0 : _a.visitExpression(visitor, null);
@@ -13886,12 +13938,13 @@ function isConstEnumReference(node, reflection) {
13886
13938
  return declaration !== null && ts45.isEnumDeclaration(declaration.node) && !!((_a = declaration.node.modifiers) == null ? void 0 : _a.some((m) => m.kind === ts45.SyntaxKind.ConstKeyword));
13887
13939
  }
13888
13940
 
13889
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
13941
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
13942
+ import ts46 from "typescript";
13890
13943
  function extractHmrMetatadata(clazz, reflection, evaluator, compilerHost, rootDirs, definition, factory, deferBlockMetadata, classMetadata, debugInfo) {
13891
13944
  if (!reflection.isClass(clazz)) {
13892
13945
  return null;
13893
13946
  }
13894
- const sourceFile = clazz.getSourceFile();
13947
+ const sourceFile = ts46.getOriginalNode(clazz).getSourceFile();
13895
13948
  const filePath = getProjectRelativePath(sourceFile.fileName, rootDirs, compilerHost) || compilerHost.getCanonicalFileName(sourceFile.fileName);
13896
13949
  const dependencies = extractHmrDependencies(clazz, definition, factory, deferBlockMetadata, classMetadata, debugInfo, reflection, evaluator);
13897
13950
  if (dependencies === null) {
@@ -13907,10 +13960,10 @@ function extractHmrMetatadata(clazz, reflection, evaluator, compilerHost, rootDi
13907
13960
  return meta;
13908
13961
  }
13909
13962
 
13910
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/update_declaration.mjs
13963
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/update_declaration.mjs
13911
13964
  import { compileHmrUpdateCallback } from "@angular/compiler";
13912
- import ts46 from "typescript";
13913
- function getHmrUpdateDeclaration(compilationResults, constantStatements, meta, sourceFile) {
13965
+ import ts47 from "typescript";
13966
+ function getHmrUpdateDeclaration(compilationResults, constantStatements, meta, declaration) {
13914
13967
  const namespaceSpecifiers = meta.namespaceDependencies.reduce((result, current) => {
13915
13968
  result.set(current.moduleName, current.assignedName);
13916
13969
  return result;
@@ -13921,10 +13974,11 @@ function getHmrUpdateDeclaration(compilationResults, constantStatements, meta, s
13921
13974
  rewriter: importRewriter
13922
13975
  });
13923
13976
  const callback = compileHmrUpdateCallback(compilationResults, constantStatements, meta);
13977
+ const sourceFile = ts47.getOriginalNode(declaration).getSourceFile();
13924
13978
  const node = translateStatement(sourceFile, callback, importManager);
13925
- return ts46.factory.updateFunctionDeclaration(node, [
13926
- ts46.factory.createToken(ts46.SyntaxKind.ExportKeyword),
13927
- ts46.factory.createToken(ts46.SyntaxKind.DefaultKeyword)
13979
+ return ts47.factory.updateFunctionDeclaration(node, [
13980
+ ts47.factory.createToken(ts47.SyntaxKind.ExportKeyword),
13981
+ ts47.factory.createToken(ts47.SyntaxKind.DefaultKeyword)
13928
13982
  ], node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body);
13929
13983
  }
13930
13984
  var HmrModuleImportRewriter = class {
@@ -13943,7 +13997,7 @@ var HmrModuleImportRewriter = class {
13943
13997
  }
13944
13998
  };
13945
13999
 
13946
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
14000
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
13947
14001
  var EMPTY_ARRAY2 = [];
13948
14002
  var isUsedDirective = (decl) => decl.kind === R3TemplateDependencyKind.Directive;
13949
14003
  var isUsedPipe = (decl) => decl.kind === R3TemplateDependencyKind.Pipe;
@@ -14149,10 +14203,10 @@ var ComponentDecoratorHandler = class {
14149
14203
  return {};
14150
14204
  }
14151
14205
  const { decorator: component, metadata, inputs, outputs, hostDirectives, rawHostDirectives } = directiveResult;
14152
- const encapsulation = (_a = this.compilationMode !== CompilationMode.LOCAL ? resolveEnumValue(this.evaluator, component, "encapsulation", "ViewEncapsulation") : resolveEncapsulationEnumValueLocally(component.get("encapsulation"))) != null ? _a : ViewEncapsulation2.Emulated;
14206
+ const encapsulation = (_a = this.compilationMode !== CompilationMode.LOCAL ? resolveEnumValue(this.evaluator, component, "encapsulation", "ViewEncapsulation", this.isCore) : resolveEncapsulationEnumValueLocally(component.get("encapsulation"))) != null ? _a : ViewEncapsulation2.Emulated;
14153
14207
  let changeDetection = null;
14154
14208
  if (this.compilationMode !== CompilationMode.LOCAL) {
14155
- changeDetection = resolveEnumValue(this.evaluator, component, "changeDetection", "ChangeDetectionStrategy");
14209
+ changeDetection = resolveEnumValue(this.evaluator, component, "changeDetection", "ChangeDetectionStrategy", this.isCore);
14156
14210
  } else if (component.has("changeDetection")) {
14157
14211
  changeDetection = new o4.WrappedNodeExpr(component.get("changeDetection"));
14158
14212
  }
@@ -14200,7 +14254,7 @@ var ComponentDecoratorHandler = class {
14200
14254
  } else if (this.compilationMode !== CompilationMode.LOCAL && (rawImports || rawDeferredImports)) {
14201
14255
  const importResolvers = combineResolvers([
14202
14256
  createModuleWithProvidersResolver(this.reflector, this.isCore),
14203
- forwardRefResolver
14257
+ createForwardRefResolver(this.isCore)
14204
14258
  ]);
14205
14259
  const importDiagnostics = [];
14206
14260
  if (rawImports) {
@@ -14244,31 +14298,42 @@ var ComponentDecoratorHandler = class {
14244
14298
  this.preanalyzeTemplateCache.delete(node);
14245
14299
  template = preanalyzed;
14246
14300
  } else {
14247
- const templateDecl = parseTemplateDeclaration(node, decorator, component, containingFile, this.evaluator, this.depTracker, this.resourceLoader, this.defaultPreserveWhitespaces);
14248
- template = extractTemplate(node, templateDecl, this.evaluator, this.depTracker, this.resourceLoader, {
14249
- enableI18nLegacyMessageIdFormat: this.enableI18nLegacyMessageIdFormat,
14250
- i18nNormalizeLineEndingsInICUs: this.i18nNormalizeLineEndingsInICUs,
14251
- usePoisonedData: this.usePoisonedData,
14252
- enableBlockSyntax: this.enableBlockSyntax,
14253
- enableLetSyntax: this.enableLetSyntax,
14254
- preserveSignificantWhitespace: this.i18nPreserveSignificantWhitespace
14255
- }, this.compilationMode);
14256
- if (this.compilationMode === CompilationMode.LOCAL && template.errors && template.errors.length > 0) {
14257
- if (diagnostics === void 0) {
14258
- diagnostics = [];
14301
+ try {
14302
+ const templateDecl = parseTemplateDeclaration(node, decorator, component, containingFile, this.evaluator, this.depTracker, this.resourceLoader, this.defaultPreserveWhitespaces);
14303
+ template = extractTemplate(node, templateDecl, this.evaluator, this.depTracker, this.resourceLoader, {
14304
+ enableI18nLegacyMessageIdFormat: this.enableI18nLegacyMessageIdFormat,
14305
+ i18nNormalizeLineEndingsInICUs: this.i18nNormalizeLineEndingsInICUs,
14306
+ usePoisonedData: this.usePoisonedData,
14307
+ enableBlockSyntax: this.enableBlockSyntax,
14308
+ enableLetSyntax: this.enableLetSyntax,
14309
+ preserveSignificantWhitespace: this.i18nPreserveSignificantWhitespace
14310
+ }, this.compilationMode);
14311
+ if (this.compilationMode === CompilationMode.LOCAL && template.errors && template.errors.length > 0) {
14312
+ if (diagnostics === void 0) {
14313
+ diagnostics = [];
14314
+ }
14315
+ diagnostics.push(...getTemplateDiagnostics(
14316
+ template.errors,
14317
+ "",
14318
+ template.sourceMapping
14319
+ ));
14320
+ }
14321
+ } catch (e) {
14322
+ if (e instanceof FatalDiagnosticError) {
14323
+ diagnostics != null ? diagnostics : diagnostics = [];
14324
+ diagnostics.push(e.toDiagnostic());
14325
+ isPoisoned = true;
14326
+ template = createEmptyTemplate(node, component, containingFile);
14327
+ } else {
14328
+ throw e;
14259
14329
  }
14260
- diagnostics.push(...getTemplateDiagnostics(
14261
- template.errors,
14262
- "",
14263
- template.sourceMapping
14264
- ));
14265
14330
  }
14266
14331
  }
14267
14332
  const templateResource = template.declaration.isInline ? { path: null, expression: component.get("template") } : {
14268
14333
  path: absoluteFrom(template.declaration.resolvedTemplateUrl),
14269
14334
  expression: template.sourceMapping.node
14270
14335
  };
14271
- const relativeTemplatePath = getProjectRelativePath((_d = templateResource.path) != null ? _d : ts47.getOriginalNode(node).getSourceFile().fileName, this.rootDirs, this.compilerHost);
14336
+ const relativeTemplatePath = getProjectRelativePath((_d = templateResource.path) != null ? _d : ts48.getOriginalNode(node).getSourceFile().fileName, this.rootDirs, this.compilerHost);
14272
14337
  let styles = [];
14273
14338
  const externalStyles = [];
14274
14339
  const styleResources = extractInlineStyleResources(component);
@@ -14283,7 +14348,7 @@ var ComponentDecoratorHandler = class {
14283
14348
  externalStyles.push(resourceUrl);
14284
14349
  continue;
14285
14350
  }
14286
- if (styleUrl.source === 2 && ts47.isStringLiteralLike(styleUrl.expression)) {
14351
+ if (styleUrl.source === 2 && ts48.isStringLiteralLike(styleUrl.expression)) {
14287
14352
  styleResources.add({
14288
14353
  path: absoluteFrom(resourceUrl),
14289
14354
  expression: styleUrl.expression
@@ -14486,7 +14551,7 @@ var ComponentDecoratorHandler = class {
14486
14551
  }
14487
14552
  typeCheck(ctx, node, meta) {
14488
14553
  var _a;
14489
- if (this.typeCheckScopeRegistry === null || !ts47.isClassDeclaration(node)) {
14554
+ if (this.typeCheckScopeRegistry === null || !ts48.isClassDeclaration(node)) {
14490
14555
  return;
14491
14556
  }
14492
14557
  if (meta.isPoisoned && !this.usePoisonedData) {
@@ -14497,7 +14562,15 @@ var ComponentDecoratorHandler = class {
14497
14562
  return;
14498
14563
  }
14499
14564
  const binder = new R3TargetBinder(scope.matcher);
14500
- ctx.addTemplate(new Reference(node), binder, meta.template.diagNodes, scope.pipes, scope.schemas, meta.template.sourceMapping, meta.template.file, meta.template.errors, meta.meta.isStandalone, (_a = meta.meta.template.preserveWhitespaces) != null ? _a : false);
14565
+ const templateContext = {
14566
+ nodes: meta.template.diagNodes,
14567
+ pipes: scope.pipes,
14568
+ sourceMapping: meta.template.sourceMapping,
14569
+ file: meta.template.file,
14570
+ parseErrors: meta.template.errors,
14571
+ preserveWhitespaces: (_a = meta.meta.template.preserveWhitespaces) != null ? _a : false
14572
+ };
14573
+ ctx.addDirective(new Reference(node), binder, scope.schemas, templateContext, meta.meta.isStandalone);
14501
14574
  }
14502
14575
  extendedTemplateCheck(component, extendedTemplateChecker) {
14503
14576
  return extendedTemplateChecker.getDiagnosticsForComponent(component);
@@ -14877,7 +14950,7 @@ var ComponentDecoratorHandler = class {
14877
14950
  const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
14878
14951
  const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.evaluator, this.compilerHost, this.rootDirs, def, fac, defer, classMetadata, debugInfo) : null;
14879
14952
  const res = compileResults(fac, def, classMetadata, "\u0275cmp", null, null, debugInfo, null);
14880
- return hmrMeta === null || res.length === 0 ? null : getHmrUpdateDeclaration(res, pool.statements, hmrMeta, node.getSourceFile());
14953
+ return hmrMeta === null || res.length === 0 ? null : getHmrUpdateDeclaration(res, pool.statements, hmrMeta, node);
14881
14954
  }
14882
14955
  locateDeferBlocksWithoutScope(template) {
14883
14956
  const deferBlocks = /* @__PURE__ */ new Map();
@@ -14912,12 +14985,12 @@ var ComponentDecoratorHandler = class {
14912
14985
  }
14913
14986
  collectExplicitlyDeferredSymbols(rawDeferredImports) {
14914
14987
  const deferredTypes = /* @__PURE__ */ new Map();
14915
- if (!ts47.isArrayLiteralExpression(rawDeferredImports)) {
14988
+ if (!ts48.isArrayLiteralExpression(rawDeferredImports)) {
14916
14989
  return deferredTypes;
14917
14990
  }
14918
14991
  for (const element of rawDeferredImports.elements) {
14919
14992
  const node = tryUnwrapForwardRef(element, this.reflector) || element;
14920
- if (!ts47.isIdentifier(node)) {
14993
+ if (!ts48.isIdentifier(node)) {
14921
14994
  continue;
14922
14995
  }
14923
14996
  const imp = this.reflector.getImportOfIdentifier(node);
@@ -14984,12 +15057,12 @@ var ComponentDecoratorHandler = class {
14984
15057
  }
14985
15058
  }
14986
15059
  registerDeferrableCandidates(componentClassDecl, importsExpr, isDeferredImport, allDeferredDecls, eagerlyUsedDecls, resolutionData) {
14987
- if (!ts47.isArrayLiteralExpression(importsExpr)) {
15060
+ if (!ts48.isArrayLiteralExpression(importsExpr)) {
14988
15061
  return;
14989
15062
  }
14990
15063
  for (const element of importsExpr.elements) {
14991
15064
  const node = tryUnwrapForwardRef(element, this.reflector) || element;
14992
- if (!ts47.isIdentifier(node)) {
15065
+ if (!ts48.isIdentifier(node)) {
14993
15066
  continue;
14994
15067
  }
14995
15068
  const imp = this.reflector.getImportOfIdentifier(node);
@@ -15121,9 +15194,9 @@ function isDefaultImport(node) {
15121
15194
  return node.importClause !== void 0 && node.importClause.namedBindings === void 0;
15122
15195
  }
15123
15196
 
15124
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
15197
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
15125
15198
  import { compileClassMetadata as compileClassMetadata3, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression3, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr10 } from "@angular/compiler";
15126
- import ts48 from "typescript";
15199
+ import ts49 from "typescript";
15127
15200
  var InjectableDecoratorHandler = class {
15128
15201
  reflector;
15129
15202
  evaluator;
@@ -15252,7 +15325,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
15252
15325
  };
15253
15326
  } else if (decorator.args.length === 1) {
15254
15327
  const metaNode = decorator.args[0];
15255
- if (!ts48.isObjectLiteralExpression(metaNode)) {
15328
+ if (!ts49.isObjectLiteralExpression(metaNode)) {
15256
15329
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, metaNode, `@Injectable argument must be an object literal`);
15257
15330
  }
15258
15331
  const meta = reflectObjectLiteral(metaNode);
@@ -15260,7 +15333,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
15260
15333
  let deps = void 0;
15261
15334
  if ((meta.has("useClass") || meta.has("useFactory")) && meta.has("deps")) {
15262
15335
  const depsExpr = meta.get("deps");
15263
- if (!ts48.isArrayLiteralExpression(depsExpr)) {
15336
+ if (!ts49.isArrayLiteralExpression(depsExpr)) {
15264
15337
  throw new FatalDiagnosticError(ErrorCode.VALUE_NOT_LITERAL, depsExpr, `@Injectable deps metadata must be an inline array`);
15265
15338
  }
15266
15339
  deps = depsExpr.elements.map((dep) => getDep(dep, reflector));
@@ -15345,12 +15418,12 @@ function getDep(dep, reflector) {
15345
15418
  }
15346
15419
  return true;
15347
15420
  }
15348
- if (ts48.isArrayLiteralExpression(dep)) {
15421
+ if (ts49.isArrayLiteralExpression(dep)) {
15349
15422
  dep.elements.forEach((el) => {
15350
15423
  let isDecorator = false;
15351
- if (ts48.isIdentifier(el)) {
15424
+ if (ts49.isIdentifier(el)) {
15352
15425
  isDecorator = maybeUpdateDecorator(el, reflector);
15353
- } else if (ts48.isNewExpression(el) && ts48.isIdentifier(el.expression)) {
15426
+ } else if (ts49.isNewExpression(el) && ts49.isIdentifier(el.expression)) {
15354
15427
  const token = el.arguments && el.arguments.length > 0 && el.arguments[0] || void 0;
15355
15428
  isDecorator = maybeUpdateDecorator(el.expression, reflector, token);
15356
15429
  }
@@ -15362,9 +15435,9 @@ function getDep(dep, reflector) {
15362
15435
  return meta;
15363
15436
  }
15364
15437
 
15365
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
15438
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
15366
15439
  import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5 } from "@angular/compiler";
15367
- import ts49 from "typescript";
15440
+ import ts50 from "typescript";
15368
15441
  var PipeSymbol = class extends SemanticSymbol {
15369
15442
  name;
15370
15443
  constructor(decl, name) {
@@ -15437,7 +15510,7 @@ var PipeDecoratorHandler = class {
15437
15510
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, "@Pipe must have exactly one argument");
15438
15511
  }
15439
15512
  const meta = unwrapExpression(decorator.args[0]);
15440
- if (!ts49.isObjectLiteralExpression(meta)) {
15513
+ if (!ts50.isObjectLiteralExpression(meta)) {
15441
15514
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@Pipe must have a literal argument");
15442
15515
  }
15443
15516
  const pipe = reflectObjectLiteral(meta);
@@ -15540,7 +15613,7 @@ var PipeDecoratorHandler = class {
15540
15613
  export {
15541
15614
  isAngularDecorator,
15542
15615
  getAngularDecorators,
15543
- forwardRefResolver,
15616
+ createForwardRefResolver,
15544
15617
  MetaKind,
15545
15618
  CompoundMetadataReader,
15546
15619
  DtsMetadataReader,
@@ -15610,4 +15683,4 @@ export {
15610
15683
  * Use of this source code is governed by an MIT-style license that can be
15611
15684
  * found in the LICENSE file at https://angular.dev/license
15612
15685
  */
15613
- //# sourceMappingURL=chunk-2MJ6YSB2.js.map
15686
+ //# sourceMappingURL=chunk-CD575TJ6.js.map