@angular/compiler-cli 17.1.0 → 17.2.0-next.0

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 (50) hide show
  1. package/bundles/{chunk-MLI2QFE3.js → chunk-455YOO3E.js} +7 -7
  2. package/bundles/{chunk-MLI2QFE3.js.map → chunk-455YOO3E.js.map} +1 -1
  3. package/bundles/{chunk-P34DHQ65.js → chunk-6RVHVK7X.js} +32 -31
  4. package/bundles/chunk-6RVHVK7X.js.map +6 -0
  5. package/bundles/{chunk-TGR3NXO6.js → chunk-Q5Y7HH3O.js} +5 -5
  6. package/bundles/{chunk-I3M5LXMW.js → chunk-QPMYDNZG.js} +7 -7
  7. package/bundles/{chunk-JOIB3454.js → chunk-R4KQI5XI.js} +5 -5
  8. package/bundles/{chunk-CF2CT7RQ.js → chunk-SBDNBITT.js} +3 -3
  9. package/bundles/{chunk-5KZ4IU2X.js → chunk-SIMT2UHI.js} +5 -5
  10. package/bundles/{chunk-3WRR7A6G.js → chunk-U6M6KQUQ.js} +40 -39
  11. package/bundles/chunk-U6M6KQUQ.js.map +6 -0
  12. package/bundles/{chunk-YFIBJR5K.js → chunk-VYUC5NTT.js} +116 -110
  13. package/bundles/chunk-VYUC5NTT.js.map +6 -0
  14. package/bundles/{chunk-WMUBJYYX.js → chunk-WCD6LVCP.js} +7 -7
  15. package/bundles/{chunk-GM44CTB7.js → chunk-YJ2WTOVI.js} +403 -224
  16. package/bundles/chunk-YJ2WTOVI.js.map +6 -0
  17. package/bundles/index.js +12 -12
  18. package/bundles/linker/babel/index.js +12 -12
  19. package/bundles/linker/index.js +4 -4
  20. package/bundles/ngcc/index.js +1 -1
  21. package/bundles/private/bazel.js +1 -1
  22. package/bundles/private/localize.js +3 -3
  23. package/bundles/private/migrations.js +5 -5
  24. package/bundles/private/tooling.js +5 -5
  25. package/bundles/src/bin/ng_xi18n.js +10 -10
  26. package/bundles/src/bin/ngc.js +8 -8
  27. package/bundles_metadata.json +1 -1
  28. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
  29. package/package.json +3 -3
  30. package/src/bin/ng_xi18n.d.ts +0 -1
  31. package/src/bin/ngc.d.ts +0 -1
  32. package/src/ngtsc/annotations/common/src/util.d.ts +5 -2
  33. package/src/ngtsc/annotations/directive/src/initializer_functions.d.ts +44 -0
  34. package/src/ngtsc/annotations/directive/src/input_function.d.ts +1 -1
  35. package/src/ngtsc/annotations/directive/src/query_functions.d.ts +26 -0
  36. package/src/ngtsc/annotations/directive/src/shared.d.ts +1 -1
  37. package/src/ngtsc/diagnostics/src/error_code.d.ts +24 -7
  38. package/src/ngtsc/metadata/index.d.ts +1 -1
  39. package/src/ngtsc/metadata/src/api.d.ts +23 -3
  40. package/src/ngtsc/metadata/src/util.d.ts +2 -1
  41. package/bundles/chunk-3WRR7A6G.js.map +0 -6
  42. package/bundles/chunk-GM44CTB7.js.map +0 -6
  43. package/bundles/chunk-P34DHQ65.js.map +0 -6
  44. package/bundles/chunk-YFIBJR5K.js.map +0 -6
  45. /package/bundles/{chunk-TGR3NXO6.js.map → chunk-Q5Y7HH3O.js.map} +0 -0
  46. /package/bundles/{chunk-I3M5LXMW.js.map → chunk-QPMYDNZG.js.map} +0 -0
  47. /package/bundles/{chunk-JOIB3454.js.map → chunk-R4KQI5XI.js.map} +0 -0
  48. /package/bundles/{chunk-CF2CT7RQ.js.map → chunk-SBDNBITT.js.map} +0 -0
  49. /package/bundles/{chunk-5KZ4IU2X.js.map → chunk-SIMT2UHI.js.map} +0 -0
  50. /package/bundles/{chunk-WMUBJYYX.js.map → chunk-WCD6LVCP.js.map} +0 -0
@@ -29,20 +29,21 @@ import {
29
29
  translateStatement,
30
30
  translateType,
31
31
  typeNodeToValueExpr
32
- } from "./chunk-3WRR7A6G.js";
32
+ } from "./chunk-U6M6KQUQ.js";
33
33
  import {
34
34
  PerfEvent,
35
35
  PerfPhase
36
- } from "./chunk-JOIB3454.js";
36
+ } from "./chunk-R4KQI5XI.js";
37
37
  import {
38
38
  absoluteFrom,
39
39
  absoluteFromSourceFile,
40
40
  relative
41
- } from "./chunk-I3M5LXMW.js";
41
+ } from "./chunk-QPMYDNZG.js";
42
42
 
43
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
43
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
44
44
  import { ExternalExpr, ParseLocation, ParseSourceFile, ParseSourceSpan, ReadPropExpr, WrappedNodeExpr } from "@angular/compiler";
45
45
  import ts from "typescript";
46
+ var CORE_MODULE = "@angular/core";
46
47
  function valueReferenceToExpression(valueRef) {
47
48
  if (valueRef.kind === 2) {
48
49
  return null;
@@ -73,10 +74,10 @@ function toR3Reference(origin, ref, context, refEmitter) {
73
74
  };
74
75
  }
75
76
  function isAngularCore(decorator) {
76
- return decorator.import !== null && decorator.import.from === "@angular/core";
77
+ return decorator.import !== null && decorator.import.from === CORE_MODULE;
77
78
  }
78
79
  function isAngularCoreReference(reference, symbolName) {
79
- return reference.ownedByModuleGuess === "@angular/core" && reference.debugName === symbolName;
80
+ return reference.ownedByModuleGuess === CORE_MODULE && reference.debugName === symbolName;
80
81
  }
81
82
  function findAngularDecorator(decorators, name, isCore) {
82
83
  return decorators.find((decorator) => isAngularDecorator(decorator, name, isCore));
@@ -89,6 +90,16 @@ function isAngularDecorator(decorator, name, isCore) {
89
90
  }
90
91
  return false;
91
92
  }
93
+ function getAngularDecorators(decorators, names, isCore) {
94
+ return decorators.filter((decorator) => {
95
+ var _a;
96
+ const name = isCore ? decorator.name : (_a = decorator.import) == null ? void 0 : _a.name;
97
+ if (name === void 0 || !names.includes(name)) {
98
+ return false;
99
+ }
100
+ return isCore || isAngularCore(decorator);
101
+ });
102
+ }
92
103
  function unwrapExpression(node) {
93
104
  while (ts.isAsExpression(node) || ts.isParenthesizedExpression(node)) {
94
105
  node = node.expression;
@@ -285,7 +296,7 @@ function isAbstractClassDeclaration(clazz) {
285
296
  return ts.canHaveModifiers(clazz) && clazz.modifiers !== void 0 ? clazz.modifiers.some((mod) => mod.kind === ts.SyntaxKind.AbstractKeyword) : false;
286
297
  }
287
298
 
288
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
299
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
289
300
  var DynamicValue = class {
290
301
  constructor(node, reason, code) {
291
302
  this.node = node;
@@ -375,10 +386,10 @@ var DynamicValue = class {
375
386
  }
376
387
  };
377
388
 
378
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
389
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
379
390
  import ts2 from "typescript";
380
391
 
381
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
392
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
382
393
  var ResolvedModule = class {
383
394
  constructor(exports, evaluate) {
384
395
  this.exports = exports;
@@ -408,7 +419,7 @@ var EnumValue = class {
408
419
  var KnownFn = class {
409
420
  };
410
421
 
411
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
422
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
412
423
  var ArraySliceBuiltinFn = class extends KnownFn {
413
424
  constructor(lhs) {
414
425
  super();
@@ -460,14 +471,14 @@ var StringConcatBuiltinFn = class extends KnownFn {
460
471
  }
461
472
  };
462
473
 
463
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic.mjs
474
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic.mjs
464
475
  var SyntheticValue = class {
465
476
  constructor(value) {
466
477
  this.value = value;
467
478
  }
468
479
  };
469
480
 
470
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
481
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
471
482
  function literalBinaryOp(op) {
472
483
  return { op, literal: true };
473
484
  }
@@ -1045,7 +1056,7 @@ function owningModule(context, override = null) {
1045
1056
  }
1046
1057
  }
1047
1058
 
1048
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
1059
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
1049
1060
  var PartialEvaluator = class {
1050
1061
  constructor(host, checker, dependencyTracker) {
1051
1062
  this.host = host;
@@ -1065,7 +1076,7 @@ var PartialEvaluator = class {
1065
1076
  }
1066
1077
  };
1067
1078
 
1068
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
1079
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
1069
1080
  import ts3 from "typescript";
1070
1081
  function describeResolvedType(value, maxDepth = 1) {
1071
1082
  var _a, _b;
@@ -1195,7 +1206,7 @@ function getContainerNode(node) {
1195
1206
  return node.getSourceFile();
1196
1207
  }
1197
1208
 
1198
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
1209
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
1199
1210
  import { LiteralExpr, WrappedNodeExpr as WrappedNodeExpr2 } from "@angular/compiler";
1200
1211
  import ts4 from "typescript";
1201
1212
  function getConstructorDependencies(clazz, reflector, isCore) {
@@ -1339,10 +1350,10 @@ function createUnsuitableInjectionTokenError(clazz, error) {
1339
1350
  return new FatalDiagnosticError(ErrorCode.PARAM_MISSING_TOKEN, param.nameNode, chain, hints);
1340
1351
  }
1341
1352
 
1342
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
1353
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
1343
1354
  import ts7 from "typescript";
1344
1355
 
1345
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
1356
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
1346
1357
  var MetaKind;
1347
1358
  (function(MetaKind2) {
1348
1359
  MetaKind2[MetaKind2["Directive"] = 0] = "Directive";
@@ -1355,10 +1366,10 @@ var MatchSource;
1355
1366
  MatchSource2[MatchSource2["HostDirective"] = 1] = "HostDirective";
1356
1367
  })(MatchSource || (MatchSource = {}));
1357
1368
 
1358
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
1369
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
1359
1370
  import ts6 from "typescript";
1360
1371
 
1361
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
1372
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
1362
1373
  var ClassPropertyMapping = class {
1363
1374
  constructor(forwardMap) {
1364
1375
  this.forwardMap = forwardMap;
@@ -1438,7 +1449,7 @@ function reverseMapFromForwardMap(forwardMap) {
1438
1449
  return reverseMap;
1439
1450
  }
1440
1451
 
1441
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/util.mjs
1452
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/util.mjs
1442
1453
  import ts5 from "typescript";
1443
1454
  function extractReferencesFromType(checker, def, bestGuessOwningModule) {
1444
1455
  if (!ts5.isTupleTypeNode(def)) {
@@ -1627,8 +1638,11 @@ function hasInjectableFields(clazz, host) {
1627
1638
  const members = host.getMembersOfClass(clazz);
1628
1639
  return members.some(({ isStatic, name }) => isStatic && (name === "\u0275prov" || name === "\u0275fac"));
1629
1640
  }
1641
+ function isHostDirectiveMetaForGlobalMode(hostDirectiveMeta) {
1642
+ return hostDirectiveMeta.directive instanceof Reference;
1643
+ }
1630
1644
 
1631
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
1645
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
1632
1646
  var DtsMetadataReader = class {
1633
1647
  constructor(checker, reflector) {
1634
1648
  this.checker = checker;
@@ -1811,7 +1825,7 @@ function readHostDirectivesType(checker, type, bestGuessOwningModule) {
1811
1825
  return result.length > 0 ? result : null;
1812
1826
  }
1813
1827
 
1814
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
1828
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
1815
1829
  function flattenInheritedDirectiveMetadata(reader, dir) {
1816
1830
  const topMeta = reader.getDirectiveMetadata(dir);
1817
1831
  if (topMeta === null) {
@@ -1875,7 +1889,7 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
1875
1889
  };
1876
1890
  }
1877
1891
 
1878
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
1892
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
1879
1893
  var LocalMetadataRegistry = class {
1880
1894
  constructor() {
1881
1895
  this.directives = /* @__PURE__ */ new Map();
@@ -1932,7 +1946,7 @@ var CompoundMetadataRegistry = class {
1932
1946
  }
1933
1947
  };
1934
1948
 
1935
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
1949
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
1936
1950
  var ResourceRegistry = class {
1937
1951
  constructor() {
1938
1952
  this.externalTemplateToComponentsMap = /* @__PURE__ */ new Map();
@@ -1997,7 +2011,7 @@ var ResourceRegistry = class {
1997
2011
  }
1998
2012
  };
1999
2013
 
2000
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/providers.mjs
2014
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/providers.mjs
2001
2015
  var ExportedProviderStatusResolver = class {
2002
2016
  constructor(metaReader) {
2003
2017
  this.metaReader = metaReader;
@@ -2041,7 +2055,7 @@ var ExportedProviderStatusResolver = class {
2041
2055
  }
2042
2056
  };
2043
2057
 
2044
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/host_directives_resolver.mjs
2058
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/host_directives_resolver.mjs
2045
2059
  var EMPTY_ARRAY = [];
2046
2060
  var HostDirectivesResolver = class {
2047
2061
  constructor(metaReader) {
@@ -2058,6 +2072,9 @@ var HostDirectivesResolver = class {
2058
2072
  }
2059
2073
  walkHostDirectives(directives, results) {
2060
2074
  for (const current of directives) {
2075
+ if (!isHostDirectiveMetaForGlobalMode(current)) {
2076
+ throw new Error("Impossible state: resolving code path in local compilation mode");
2077
+ }
2061
2078
  const hostMeta = flattenInheritedDirectiveMetadata(this.metaReader, current.directive);
2062
2079
  if (hostMeta === null) {
2063
2080
  continue;
@@ -2104,7 +2121,7 @@ function resolveOutput(bindingName) {
2104
2121
  return bindingName;
2105
2122
  }
2106
2123
 
2107
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
2124
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
2108
2125
  function makeDuplicateDeclarationError(node, data, kind) {
2109
2126
  const context = [];
2110
2127
  for (const decl of data) {
@@ -2181,6 +2198,9 @@ function getDirectiveDiagnostics(node, injectableRegistry, evaluator, reflector,
2181
2198
  function validateHostDirectives(origin, hostDirectives, metaReader) {
2182
2199
  const diagnostics = [];
2183
2200
  for (const current of hostDirectives) {
2201
+ if (!isHostDirectiveMetaForGlobalMode(current)) {
2202
+ throw new Error("Impossible state: diagnostics code path for local compilation");
2203
+ }
2184
2204
  const hostMeta = flattenInheritedDirectiveMetadata(metaReader, current.directive);
2185
2205
  if (hostMeta === null) {
2186
2206
  diagnostics.push(makeDiagnostic(ErrorCode.HOST_DIRECTIVE_INVALID, current.directive.getOriginForDiagnostics(origin), `${current.directive.debugName} must be a standalone directive to be used as a host directive`));
@@ -2199,6 +2219,9 @@ function validateHostDirectives(origin, hostDirectives, metaReader) {
2199
2219
  return diagnostics;
2200
2220
  }
2201
2221
  function validateHostDirectiveMappings(bindingType, hostDirectiveMeta, meta, origin, diagnostics, requiredBindings) {
2222
+ if (!isHostDirectiveMetaForGlobalMode(hostDirectiveMeta)) {
2223
+ throw new Error("Impossible state: diagnostics code path for local compilation");
2224
+ }
2202
2225
  const className = meta.name;
2203
2226
  const hostDirectiveMappings = bindingType === "input" ? hostDirectiveMeta.inputs : hostDirectiveMeta.outputs;
2204
2227
  const existingBindings = bindingType === "input" ? meta.inputs : meta.outputs;
@@ -2300,7 +2323,7 @@ function getInheritedUndecoratedCtorDiagnostic(node, baseClass, kind) {
2300
2323
  return makeDiagnostic(ErrorCode.DIRECTIVE_INHERITS_UNDECORATED_CTOR, node.name, `The ${kind.toLowerCase()} ${node.name.text} inherits its constructor from ${baseClassName}, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of ${baseClassName}'s constructor. Either add a @${baseNeedsDecorator} decorator to ${baseClassName}, or add an explicit constructor to ${node.name.text}.`);
2301
2324
  }
2302
2325
 
2303
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
2326
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
2304
2327
  import { ViewEncapsulation } from "@angular/compiler";
2305
2328
  import ts8 from "typescript";
2306
2329
  function resolveEnumValue(evaluator, metadata, field, enumSymbolName) {
@@ -2351,7 +2374,7 @@ function resolveLiteral(decorator, literalCache) {
2351
2374
  return meta;
2352
2375
  }
2353
2376
 
2354
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.mjs
2377
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.mjs
2355
2378
  import { compileDeclareFactoryFunction, compileFactoryFunction } from "@angular/compiler";
2356
2379
  function compileNgFactoryDefField(metadata) {
2357
2380
  const res = compileFactoryFunction(metadata);
@@ -2374,7 +2397,7 @@ function compileDeclareFactory(metadata) {
2374
2397
  };
2375
2398
  }
2376
2399
 
2377
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/injectable_registry.mjs
2400
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/injectable_registry.mjs
2378
2401
  var InjectableClassRegistry = class {
2379
2402
  constructor(host, isCore) {
2380
2403
  this.host = host;
@@ -2400,7 +2423,7 @@ var InjectableClassRegistry = class {
2400
2423
  }
2401
2424
  };
2402
2425
 
2403
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
2426
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
2404
2427
  import { ArrowFunctionExpr, LiteralArrayExpr, LiteralExpr as LiteralExpr2, literalMap, WrappedNodeExpr as WrappedNodeExpr3 } from "@angular/compiler";
2405
2428
  import ts9 from "typescript";
2406
2429
  function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
@@ -2485,7 +2508,7 @@ function removeIdentifierReferences(node, names) {
2485
2508
  return result.transformed[0];
2486
2509
  }
2487
2510
 
2488
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/debug_info.mjs
2511
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/debug_info.mjs
2489
2512
  import { literal as literal2, WrappedNodeExpr as WrappedNodeExpr4 } from "@angular/compiler";
2490
2513
  import * as path from "path";
2491
2514
  function extractClassDebugInfo(clazz, reflection, rootDirs, forbidOrphanRendering) {
@@ -2512,13 +2535,13 @@ function computeRelativePathIfPossible(filePath, rootDirs) {
2512
2535
  return null;
2513
2536
  }
2514
2537
 
2515
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
2538
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
2516
2539
  var NoopReferencesRegistry = class {
2517
2540
  add(source, ...references) {
2518
2541
  }
2519
2542
  };
2520
2543
 
2521
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.mjs
2544
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.mjs
2522
2545
  import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from "@angular/compiler";
2523
2546
  function extractSchemas(rawExpr, evaluator, context) {
2524
2547
  const schemas = [];
@@ -2548,7 +2571,7 @@ function extractSchemas(rawExpr, evaluator, context) {
2548
2571
  return schemas;
2549
2572
  }
2550
2573
 
2551
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/input_transforms.mjs
2574
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/input_transforms.mjs
2552
2575
  import { outputAst } from "@angular/compiler";
2553
2576
  function compileInputTransformFields(inputs) {
2554
2577
  const extraFields = [];
@@ -2566,11 +2589,11 @@ function compileInputTransformFields(inputs) {
2566
2589
  return extraFields;
2567
2590
  }
2568
2591
 
2569
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
2592
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
2570
2593
  import { compileClassDebugInfo, compileComponentClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareComponentFromMetadata, CssSelector as CssSelector2, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, R3TargetBinder, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher2, ViewEncapsulation as ViewEncapsulation2, WrappedNodeExpr as WrappedNodeExpr8 } from "@angular/compiler";
2571
- import ts25 from "typescript";
2594
+ import ts27 from "typescript";
2572
2595
 
2573
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
2596
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
2574
2597
  import ts10 from "typescript";
2575
2598
  var SemanticSymbol = class {
2576
2599
  constructor(decl) {
@@ -2586,7 +2609,7 @@ function getSymbolIdentifier(decl) {
2586
2609
  return decl.name.text;
2587
2610
  }
2588
2611
 
2589
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph.mjs
2612
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph.mjs
2590
2613
  import { ExternalExpr as ExternalExpr2 } from "@angular/compiler";
2591
2614
  var OpaqueSymbol = class extends SemanticSymbol {
2592
2615
  isPublicApiAffected() {
@@ -2729,10 +2752,10 @@ function getImportPath(expr) {
2729
2752
  }
2730
2753
  }
2731
2754
 
2732
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
2755
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
2733
2756
  import ts11 from "typescript";
2734
2757
 
2735
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
2758
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
2736
2759
  function isSymbolEqual(a, b) {
2737
2760
  if (a.decl === b.decl) {
2738
2761
  return true;
@@ -2782,7 +2805,7 @@ function isSetEqual(a, b, equalityTester = referenceEquality) {
2782
2805
  return true;
2783
2806
  }
2784
2807
 
2785
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
2808
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
2786
2809
  function extractSemanticTypeParameters(node) {
2787
2810
  if (!ts11.isClassDeclaration(node) || node.typeParameters === void 0) {
2788
2811
  return null;
@@ -2802,14 +2825,14 @@ function isTypeParameterEqual(a, b) {
2802
2825
  return a.hasGenericTypeBound === b.hasGenericTypeBound;
2803
2826
  }
2804
2827
 
2805
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/api.mjs
2828
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/api.mjs
2806
2829
  var ComponentScopeKind;
2807
2830
  (function(ComponentScopeKind2) {
2808
2831
  ComponentScopeKind2[ComponentScopeKind2["NgModule"] = 0] = "NgModule";
2809
2832
  ComponentScopeKind2[ComponentScopeKind2["Standalone"] = 1] = "Standalone";
2810
2833
  })(ComponentScopeKind || (ComponentScopeKind = {}));
2811
2834
 
2812
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/component_scope.mjs
2835
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/component_scope.mjs
2813
2836
  var CompoundComponentScopeReader = class {
2814
2837
  constructor(readers) {
2815
2838
  this.readers = readers;
@@ -2834,7 +2857,7 @@ var CompoundComponentScopeReader = class {
2834
2857
  }
2835
2858
  };
2836
2859
 
2837
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
2860
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
2838
2861
  var MetadataDtsModuleScopeResolver = class {
2839
2862
  constructor(dtsMetaReader, aliasingHost) {
2840
2863
  this.dtsMetaReader = dtsMetaReader;
@@ -2910,11 +2933,11 @@ var MetadataDtsModuleScopeResolver = class {
2910
2933
  }
2911
2934
  };
2912
2935
 
2913
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
2936
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
2914
2937
  import { ExternalExpr as ExternalExpr3 } from "@angular/compiler";
2915
2938
  import ts12 from "typescript";
2916
2939
 
2917
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/util.mjs
2940
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/util.mjs
2918
2941
  function getDiagnosticNode(ref, rawExpr) {
2919
2942
  return rawExpr !== null ? ref.getOriginForDiagnostics(rawExpr) : ref.node.name;
2920
2943
  }
@@ -2940,7 +2963,7 @@ function makeUnknownComponentDeferredImportDiagnostic(ref, rawExpr) {
2940
2963
  return makeDiagnostic(ErrorCode.COMPONENT_UNKNOWN_DEFERRED_IMPORT, getDiagnosticNode(ref, rawExpr), `Component deferred imports must be standalone components, directives or pipes.`);
2941
2964
  }
2942
2965
 
2943
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
2966
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
2944
2967
  var LocalModuleScopeRegistry = class {
2945
2968
  constructor(localReader, fullReader, dependencyScopeReader, refEmitter, aliasingHost) {
2946
2969
  this.localReader = localReader;
@@ -3279,7 +3302,7 @@ function reexportCollision(module, refA, refB) {
3279
3302
  ]);
3280
3303
  }
3281
3304
 
3282
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
3305
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
3283
3306
  import { CssSelector, SelectorMatcher } from "@angular/compiler";
3284
3307
  import ts13 from "typescript";
3285
3308
  var TypeCheckScopeRegistry = class {
@@ -3357,7 +3380,7 @@ var TypeCheckScopeRegistry = class {
3357
3380
  }
3358
3381
  };
3359
3382
 
3360
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/api.mjs
3383
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/api.mjs
3361
3384
  var CompilationMode;
3362
3385
  (function(CompilationMode2) {
3363
3386
  CompilationMode2[CompilationMode2["FULL"] = 0] = "FULL";
@@ -3371,7 +3394,7 @@ var HandlerPrecedence;
3371
3394
  HandlerPrecedence2[HandlerPrecedence2["WEAK"] = 2] = "WEAK";
3372
3395
  })(HandlerPrecedence || (HandlerPrecedence = {}));
3373
3396
 
3374
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/alias.mjs
3397
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/alias.mjs
3375
3398
  import ts14 from "typescript";
3376
3399
  function aliasTransformFactory(exportStatements) {
3377
3400
  return () => {
@@ -3394,10 +3417,10 @@ function aliasTransformFactory(exportStatements) {
3394
3417
  };
3395
3418
  }
3396
3419
 
3397
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
3420
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
3398
3421
  import ts15 from "typescript";
3399
3422
 
3400
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
3423
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
3401
3424
  var TraitState;
3402
3425
  (function(TraitState2) {
3403
3426
  TraitState2[TraitState2["Pending"] = 0] = "Pending";
@@ -3454,7 +3477,7 @@ var TraitImpl = class {
3454
3477
  }
3455
3478
  };
3456
3479
 
3457
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
3480
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
3458
3481
  var TraitCompiler = class {
3459
3482
  constructor(handlers, reflector, perf, incrementalBuild, compileNonExportedClasses, compilationMode, dtsTransforms, semanticDepGraphUpdater, sourceFileTypeIdentifier) {
3460
3483
  this.handlers = handlers;
@@ -3896,10 +3919,10 @@ function containsErrors(diagnostics) {
3896
3919
  return diagnostics !== null && diagnostics.some((diag) => diag.category === ts15.DiagnosticCategory.Error);
3897
3920
  }
3898
3921
 
3899
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
3922
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
3900
3923
  import ts17 from "typescript";
3901
3924
 
3902
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
3925
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
3903
3926
  import ts16 from "typescript";
3904
3927
  function addImports(factory = ts16.factory, importManager, sf, extraStatements = []) {
3905
3928
  const addedImports = importManager.getAllImports(sf.fileName).map((i) => {
@@ -3935,7 +3958,7 @@ function isImportStatement(stmt) {
3935
3958
  return ts16.isImportDeclaration(stmt) || ts16.isImportEqualsDeclaration(stmt) || ts16.isNamespaceImport(stmt);
3936
3959
  }
3937
3960
 
3938
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
3961
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
3939
3962
  var DtsTransformRegistry = class {
3940
3963
  constructor() {
3941
3964
  this.ivyDeclarationTransforms = /* @__PURE__ */ new Map();
@@ -4082,11 +4105,11 @@ function markForEmitAsSingleLine(node) {
4082
4105
  ts17.forEachChild(node, markForEmitAsSingleLine);
4083
4106
  }
4084
4107
 
4085
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
4108
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
4086
4109
  import { ConstantPool } from "@angular/compiler";
4087
4110
  import ts19 from "typescript";
4088
4111
 
4089
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
4112
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
4090
4113
  import ts18 from "typescript";
4091
4114
  function visit(node, visitor, context) {
4092
4115
  return visitor._visit(node, context);
@@ -4147,7 +4170,7 @@ var Visitor = class {
4147
4170
  }
4148
4171
  };
4149
4172
 
4150
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
4173
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
4151
4174
  var NO_DECORATORS = /* @__PURE__ */ new Set();
4152
4175
  var CLOSURE_FILE_OVERVIEW_REGEXP = /\s+@fileoverview\s+/i;
4153
4176
  function ivyTransformFactory(compilation, reflector, importRewriter, defaultImportTracker, perf, isCore, isClosureCompilerEnabled) {
@@ -4371,16 +4394,19 @@ function nodeArrayFromDecoratorsArray(decorators) {
4371
4394
  return array;
4372
4395
  }
4373
4396
 
4374
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
4397
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
4375
4398
  import { compileClassMetadata, compileDeclareClassMetadata, compileDeclareDirectiveFromMetadata, compileDirectiveFromMetadata, FactoryTarget, makeBindingParser, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
4376
4399
 
4377
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4378
- import { createMayBeForwardRefExpression, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr4, getSafePropertyAccessString, parseHostBindings, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
4400
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4401
+ import { createMayBeForwardRefExpression as createMayBeForwardRefExpression2, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr4, getSafePropertyAccessString, parseHostBindings, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
4402
+ import ts23 from "typescript";
4403
+
4404
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_function.mjs
4379
4405
  import ts21 from "typescript";
4380
4406
 
4381
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_function.mjs
4407
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_functions.mjs
4382
4408
  import ts20 from "typescript";
4383
- function tryParseInputInitializerAndOptions(member, reflector, coreModule) {
4409
+ function tryParseInitializerApiMember(fnNames, member, reflector, isCore) {
4384
4410
  if (member.value === null || !ts20.isCallExpression(member.value)) {
4385
4411
  return null;
4386
4412
  }
@@ -4389,25 +4415,28 @@ function tryParseInputInitializerAndOptions(member, reflector, coreModule) {
4389
4415
  if (target === null) {
4390
4416
  return null;
4391
4417
  }
4392
- if (target.text === "input") {
4393
- if (!isReferenceToInputFunction(target, coreModule, reflector)) {
4418
+ let apiName = fnNames.find((n) => n === target.text);
4419
+ if (apiName !== void 0) {
4420
+ if (!isReferenceToInitializerApiFunction(apiName, target, isCore, reflector)) {
4394
4421
  return null;
4395
4422
  }
4396
- const optionsNode2 = call.arguments[1];
4397
- return { inputCall: call, optionsNode: optionsNode2, isRequired: false };
4423
+ return { apiName, call, isRequired: false };
4398
4424
  }
4399
4425
  if (target.text !== "required" || !ts20.isPropertyAccessExpression(call.expression)) {
4400
4426
  return null;
4401
4427
  }
4402
- const inputCall = call.expression;
4403
- target = extractPropertyTarget(inputCall.expression);
4404
- if (target === null || !isReferenceToInputFunction(target, coreModule, reflector)) {
4428
+ const apiPropertyAccess = call.expression;
4429
+ target = extractPropertyTarget(apiPropertyAccess.expression);
4430
+ if (target === null) {
4431
+ return null;
4432
+ }
4433
+ apiName = fnNames.find((n) => n === target.text);
4434
+ if (apiName === void 0 || !isReferenceToInitializerApiFunction(apiName, target, isCore, reflector)) {
4405
4435
  return null;
4406
4436
  }
4407
- const optionsNode = call.arguments[0];
4408
4437
  return {
4409
- inputCall: call,
4410
- optionsNode,
4438
+ apiName,
4439
+ call,
4411
4440
  isRequired: true
4412
4441
  };
4413
4442
  }
@@ -4419,38 +4448,40 @@ function extractPropertyTarget(node) {
4419
4448
  }
4420
4449
  return null;
4421
4450
  }
4422
- function isReferenceToInputFunction(target, coreModule, reflector) {
4451
+ function isReferenceToInitializerApiFunction(functionName, target, isCore, reflector) {
4423
4452
  let targetImport = reflector.getImportOfIdentifier(target);
4424
4453
  if (targetImport === null) {
4425
- if (coreModule !== void 0) {
4454
+ if (!isCore) {
4426
4455
  return false;
4427
4456
  }
4428
- targetImport = { name: target.text };
4457
+ targetImport = { name: target.text, from: CORE_MODULE };
4429
4458
  }
4430
- return targetImport.name === "input";
4459
+ return targetImport.name === functionName && targetImport.from === CORE_MODULE;
4431
4460
  }
4461
+
4462
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_function.mjs
4432
4463
  function parseAndValidateOptions(optionsNode) {
4433
- if (!ts20.isObjectLiteralExpression(optionsNode)) {
4464
+ if (!ts21.isObjectLiteralExpression(optionsNode)) {
4434
4465
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, optionsNode, "Argument needs to be an object literal that is statically analyzable.");
4435
4466
  }
4436
4467
  const options = reflectObjectLiteral(optionsNode);
4437
4468
  let alias = void 0;
4438
4469
  if (options.has("alias")) {
4439
4470
  const aliasExpr = options.get("alias");
4440
- if (!ts20.isStringLiteralLike(aliasExpr)) {
4471
+ if (!ts21.isStringLiteralLike(aliasExpr)) {
4441
4472
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, aliasExpr, "Alias needs to be a string that is statically analyzable.");
4442
4473
  }
4443
4474
  alias = aliasExpr.text;
4444
4475
  }
4445
4476
  return { alias };
4446
4477
  }
4447
- function tryParseSignalInputMapping(member, reflector, coreModule) {
4478
+ function tryParseSignalInputMapping(member, reflector, isCore) {
4448
4479
  var _a;
4449
- const signalInput = tryParseInputInitializerAndOptions(member, reflector, coreModule);
4480
+ const signalInput = tryParseInitializerApiMember(["input"], member, reflector, isCore);
4450
4481
  if (signalInput === null) {
4451
4482
  return null;
4452
4483
  }
4453
- const optionsNode = signalInput.optionsNode;
4484
+ const optionsNode = signalInput.isRequired ? signalInput.call.arguments[0] : signalInput.call.arguments[1];
4454
4485
  const options = optionsNode !== void 0 ? parseAndValidateOptions(optionsNode) : null;
4455
4486
  const classPropertyName = member.name;
4456
4487
  return {
@@ -4462,14 +4493,69 @@ function tryParseSignalInputMapping(member, reflector, coreModule) {
4462
4493
  };
4463
4494
  }
4464
4495
 
4465
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4496
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/query_functions.mjs
4497
+ import { createMayBeForwardRefExpression, outputAst as o } from "@angular/compiler";
4498
+ import ts22 from "typescript";
4499
+ var queryFunctionNames = ["viewChild", "viewChildren", "contentChild", "contentChildren"];
4500
+ var defaultDescendantsValue = (type) => type !== "contentChildren";
4501
+ function tryParseSignalQueryFromInitializer(member, reflector, isCore) {
4502
+ const query = tryParseInitializerApiMember(queryFunctionNames, member, reflector, isCore);
4503
+ if (query === null) {
4504
+ return null;
4505
+ }
4506
+ const isSingleQuery = query.apiName === "viewChild" || query.apiName === "contentChild";
4507
+ const predicateNode = query.call.arguments[0];
4508
+ if (predicateNode === void 0) {
4509
+ throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, query.call, "No locator specified.");
4510
+ }
4511
+ const optionsNode = query.call.arguments[1];
4512
+ if (optionsNode !== void 0 && !ts22.isObjectLiteralExpression(optionsNode)) {
4513
+ throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, optionsNode, "Argument needs to be an object literal.");
4514
+ }
4515
+ const options = optionsNode && reflectObjectLiteral(optionsNode);
4516
+ const read = (options == null ? void 0 : options.has("read")) ? parseReadOption(options.get("read")) : null;
4517
+ const descendants = (options == null ? void 0 : options.has("descendants")) ? parseDescendantsOption(options.get("descendants")) : defaultDescendantsValue(query.apiName);
4518
+ return {
4519
+ name: query.apiName,
4520
+ call: query.call,
4521
+ metadata: {
4522
+ isSignal: true,
4523
+ propertyName: member.name,
4524
+ static: false,
4525
+ emitDistinctChangesOnly: true,
4526
+ predicate: parseLocator(predicateNode, reflector),
4527
+ first: isSingleQuery,
4528
+ read,
4529
+ descendants
4530
+ }
4531
+ };
4532
+ }
4533
+ function parseLocator(expression, reflector) {
4534
+ const unwrappedExpression = tryUnwrapForwardRef(expression, reflector);
4535
+ if (unwrappedExpression !== null) {
4536
+ expression = unwrappedExpression;
4537
+ }
4538
+ if (ts22.isStringLiteralLike(expression)) {
4539
+ return [expression.text];
4540
+ }
4541
+ return createMayBeForwardRefExpression(new o.WrappedNodeExpr(expression), unwrappedExpression !== null ? 2 : 0);
4542
+ }
4543
+ function parseReadOption(value) {
4544
+ return new o.WrappedNodeExpr(value);
4545
+ }
4546
+ function parseDescendantsOption(value) {
4547
+ if (value.kind === ts22.SyntaxKind.TrueKeyword) {
4548
+ return true;
4549
+ } else if (value.kind === ts22.SyntaxKind.FalseKeyword) {
4550
+ return false;
4551
+ }
4552
+ throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, value, `Expected "descendants" option to be a boolean literal.`);
4553
+ }
4554
+
4555
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4466
4556
  var EMPTY_OBJECT = {};
4467
- var QUERY_TYPES = /* @__PURE__ */ new Set([
4468
- "ContentChild",
4469
- "ContentChildren",
4470
- "ViewChild",
4471
- "ViewChildren"
4472
- ]);
4557
+ var queryDecoratorNames = ["ViewChild", "ViewChildren", "ContentChild", "ContentChildren"];
4558
+ var QUERY_TYPES = new Set(queryDecoratorNames);
4473
4559
  function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmitter, referencesRegistry, isCore, annotateForClosureCompiler, compilationMode, defaultSelector = null) {
4474
4560
  let directive;
4475
4561
  if (decorator.args === null || decorator.args.length === 0) {
@@ -4478,7 +4564,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
4478
4564
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, `Incorrect number of arguments to @${decorator.name} decorator`);
4479
4565
  } else {
4480
4566
  const meta = unwrapExpression(decorator.args[0]);
4481
- if (!ts21.isObjectLiteralExpression(meta)) {
4567
+ if (!ts23.isObjectLiteralExpression(meta)) {
4482
4568
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, `@${decorator.name} argument must be an object literal`);
4483
4569
  }
4484
4570
  directive = reflectObjectLiteral(meta);
@@ -4490,21 +4576,23 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
4490
4576
  const decoratedElements = members.filter((member) => !member.isStatic && member.decorators !== null);
4491
4577
  const coreModule = isCore ? void 0 : "@angular/core";
4492
4578
  const inputsFromMeta = parseInputsArray(clazz, directive, evaluator, reflector, refEmitter, compilationMode);
4493
- const inputsFromFields = parseInputFields(clazz, members, evaluator, reflector, refEmitter, coreModule, compilationMode, inputsFromMeta, decorator);
4579
+ const inputsFromFields = parseInputFields(clazz, members, evaluator, reflector, refEmitter, isCore, compilationMode, inputsFromMeta, decorator);
4494
4580
  const inputs = ClassPropertyMapping.fromMappedObject({ ...inputsFromMeta, ...inputsFromFields });
4495
4581
  const outputsFromMeta = parseOutputsArray(directive, evaluator);
4496
4582
  const outputsFromFields = parseOutputFields(filterToMembersWithDecorator(decoratedElements, "Output", coreModule), evaluator);
4497
4583
  const outputs = ClassPropertyMapping.fromMappedObject({ ...outputsFromMeta, ...outputsFromFields });
4498
- const contentChildFromFields = queriesFromFields(filterToMembersWithDecorator(decoratedElements, "ContentChild", coreModule), reflector, evaluator);
4499
- const contentChildrenFromFields = queriesFromFields(filterToMembersWithDecorator(decoratedElements, "ContentChildren", coreModule), reflector, evaluator);
4500
- const queries = [...contentChildFromFields, ...contentChildrenFromFields];
4501
- const viewChildFromFields = queriesFromFields(filterToMembersWithDecorator(decoratedElements, "ViewChild", coreModule), reflector, evaluator);
4502
- const viewChildrenFromFields = queriesFromFields(filterToMembersWithDecorator(decoratedElements, "ViewChildren", coreModule), reflector, evaluator);
4503
- const viewQueries = [...viewChildFromFields, ...viewChildrenFromFields];
4584
+ const { viewQueries, contentQueries } = parseQueriesOfClassFields(members, reflector, evaluator, isCore);
4504
4585
  if (directive.has("queries")) {
4586
+ const signalQueryFields = new Set([...viewQueries, ...contentQueries].filter((q) => q.isSignal).map((q) => q.propertyName));
4505
4587
  const queriesFromDecorator = extractQueriesFromDecorator(directive.get("queries"), reflector, evaluator, isCore);
4506
- queries.push(...queriesFromDecorator.content);
4507
- viewQueries.push(...queriesFromDecorator.view);
4588
+ const checkAndUnwrapQuery = (q) => {
4589
+ if (signalQueryFields.has(q.metadata.propertyName)) {
4590
+ throw new FatalDiagnosticError(ErrorCode.INITIALIZER_API_DECORATOR_METADATA_COLLISION, q.expr, `Query is declared multiple times. "@${decorator.name}" declares a query for the same property.`);
4591
+ }
4592
+ return q.metadata;
4593
+ };
4594
+ contentQueries.push(...queriesFromDecorator.content.map((q) => checkAndUnwrapQuery(q)));
4595
+ viewQueries.push(...queriesFromDecorator.view.map((q) => checkAndUnwrapQuery(q)));
4508
4596
  }
4509
4597
  let selector = defaultSelector;
4510
4598
  if (directive.has("selector")) {
@@ -4555,9 +4643,14 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
4555
4643
  const sourceFile = clazz.getSourceFile();
4556
4644
  const type = wrapTypeReference(reflector, clazz);
4557
4645
  const rawHostDirectives = directive.get("hostDirectives") || null;
4558
- const hostDirectives = rawHostDirectives === null ? null : extractHostDirectives(rawHostDirectives, evaluator);
4559
- if (hostDirectives !== null) {
4560
- referencesRegistry.add(clazz, ...hostDirectives.map((hostDir) => hostDir.directive));
4646
+ const hostDirectives = rawHostDirectives === null ? null : extractHostDirectives(rawHostDirectives, evaluator, compilationMode);
4647
+ if (compilationMode !== CompilationMode.LOCAL && hostDirectives !== null) {
4648
+ referencesRegistry.add(clazz, ...hostDirectives.map((hostDir) => {
4649
+ if (!isHostDirectiveMetaForGlobalMode(hostDir)) {
4650
+ throw new Error("Impossible state");
4651
+ }
4652
+ return hostDir.directive;
4653
+ }));
4561
4654
  }
4562
4655
  const metadata = {
4563
4656
  name: clazz.name.text,
@@ -4568,7 +4661,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
4568
4661
  },
4569
4662
  inputs: inputs.toJointMappedObject(toR3InputMetadata),
4570
4663
  outputs: outputs.toDirectMappedObject(),
4571
- queries,
4664
+ queries: contentQueries,
4572
4665
  viewQueries,
4573
4666
  selector,
4574
4667
  fullInheritance: false,
@@ -4592,7 +4685,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
4592
4685
  rawHostDirectives
4593
4686
  };
4594
4687
  }
4595
- function extractQueryMetadata(exprNode, name, args, propertyName, reflector, evaluator) {
4688
+ function extractDecoratorQueryMetadata(exprNode, name, args, propertyName, reflector, evaluator) {
4596
4689
  if (args.length === 0) {
4597
4690
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, exprNode, `@${name} must have arguments`);
4598
4691
  }
@@ -4603,7 +4696,7 @@ function extractQueryMetadata(exprNode, name, args, propertyName, reflector, eva
4603
4696
  let isStatic = false;
4604
4697
  let predicate = null;
4605
4698
  if (arg instanceof Reference || arg instanceof DynamicValue) {
4606
- predicate = createMayBeForwardRefExpression(new WrappedNodeExpr5(node), forwardReferenceTarget !== null ? 2 : 0);
4699
+ predicate = createMayBeForwardRefExpression2(new WrappedNodeExpr5(node), forwardReferenceTarget !== null ? 2 : 0);
4607
4700
  } else if (typeof arg === "string") {
4608
4701
  predicate = [arg];
4609
4702
  } else if (isStringArrayOrDie(arg, `@${name} predicate`, node)) {
@@ -4616,7 +4709,7 @@ function extractQueryMetadata(exprNode, name, args, propertyName, reflector, eva
4616
4709
  let emitDistinctChangesOnly = emitDistinctChangesOnlyDefaultValue;
4617
4710
  if (args.length === 2) {
4618
4711
  const optionsExpr = unwrapExpression(args[1]);
4619
- if (!ts21.isObjectLiteralExpression(optionsExpr)) {
4712
+ if (!ts23.isObjectLiteralExpression(optionsExpr)) {
4620
4713
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, optionsExpr, `@${name} options must be an object literal`);
4621
4714
  }
4622
4715
  const options = reflectObjectLiteral(optionsExpr);
@@ -4650,6 +4743,7 @@ function extractQueryMetadata(exprNode, name, args, propertyName, reflector, eva
4650
4743
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, node, `@${name} has too many arguments`);
4651
4744
  }
4652
4745
  return {
4746
+ isSignal: false,
4653
4747
  propertyName,
4654
4748
  predicate,
4655
4749
  first,
@@ -4710,28 +4804,29 @@ function extractHostBindings(members, evaluator, coreModule, metadata) {
4710
4804
  return bindings;
4711
4805
  }
4712
4806
  function extractQueriesFromDecorator(queryData, reflector, evaluator, isCore) {
4713
- const content = [], view = [];
4714
- if (!ts21.isObjectLiteralExpression(queryData)) {
4807
+ const content = [];
4808
+ const view = [];
4809
+ if (!ts23.isObjectLiteralExpression(queryData)) {
4715
4810
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator queries metadata must be an object literal");
4716
4811
  }
4717
4812
  reflectObjectLiteral(queryData).forEach((queryExpr, propertyName) => {
4718
4813
  queryExpr = unwrapExpression(queryExpr);
4719
- if (!ts21.isNewExpression(queryExpr)) {
4814
+ if (!ts23.isNewExpression(queryExpr)) {
4720
4815
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
4721
4816
  }
4722
- const queryType = ts21.isPropertyAccessExpression(queryExpr.expression) ? queryExpr.expression.name : queryExpr.expression;
4723
- if (!ts21.isIdentifier(queryType)) {
4817
+ const queryType = ts23.isPropertyAccessExpression(queryExpr.expression) ? queryExpr.expression.name : queryExpr.expression;
4818
+ if (!ts23.isIdentifier(queryType)) {
4724
4819
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
4725
4820
  }
4726
4821
  const type = reflector.getImportOfIdentifier(queryType);
4727
4822
  if (type === null || !isCore && type.from !== "@angular/core" || !QUERY_TYPES.has(type.name)) {
4728
4823
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
4729
4824
  }
4730
- const query = extractQueryMetadata(queryExpr, type.name, queryExpr.arguments || [], propertyName, reflector, evaluator);
4825
+ const query = extractDecoratorQueryMetadata(queryExpr, type.name, queryExpr.arguments || [], propertyName, reflector, evaluator);
4731
4826
  if (type.name.startsWith("Content")) {
4732
- content.push(query);
4827
+ content.push({ expr: queryExpr, metadata: query });
4733
4828
  } else {
4734
- view.push(query);
4829
+ view.push({ expr: queryExpr, metadata: query });
4735
4830
  }
4736
4831
  });
4737
4832
  return { content, view };
@@ -4749,7 +4844,7 @@ function parseDirectiveStyles(directive, evaluator, compilationMode) {
4749
4844
  const relatedInformation = traceDynamicValue(expression, entry);
4750
4845
  const chain = {
4751
4846
  messageText: `Unknown identifier used as styles string: ${entry.node.getText()} (did you import this string from another file? This is not allowed in local compilation mode. Please either inline it or move it to a separate file and include it using 'styleUrl')`,
4752
- category: ts21.DiagnosticCategory.Error,
4847
+ category: ts23.DiagnosticCategory.Error,
4753
4848
  code: 0
4754
4849
  };
4755
4850
  throw new FatalDiagnosticError(ErrorCode.LOCAL_COMPILATION_IMPORTED_STYLES_STRING, expression, chain, relatedInformation);
@@ -4783,20 +4878,33 @@ function isStringArrayOrDie(value, name, node) {
4783
4878
  }
4784
4879
  return true;
4785
4880
  }
4786
- function queriesFromFields(fields, reflector, evaluator) {
4787
- return fields.map(({ member, decorators }) => {
4788
- const decorator = decorators[0];
4789
- const node = member.node || decorator.node;
4790
- if (member.decorators.some((v) => v.name === "Input")) {
4791
- throw new FatalDiagnosticError(ErrorCode.DECORATOR_COLLISION, node, "Cannot combine @Input decorators with query decorators");
4792
- }
4793
- if (decorators.length !== 1) {
4794
- throw new FatalDiagnosticError(ErrorCode.DECORATOR_COLLISION, node, "Cannot have multiple query decorators on the same class member");
4795
- } else if (!isPropertyTypeMember(member)) {
4796
- throw new FatalDiagnosticError(ErrorCode.DECORATOR_UNEXPECTED, node, "Query decorator must go on a property-type member");
4797
- }
4798
- return extractQueryMetadata(node, decorator.name, decorator.args || [], member.name, reflector, evaluator);
4799
- });
4881
+ function tryGetQueryFromFieldDecorator(member, reflector, evaluator, isCore) {
4882
+ var _a, _b, _c;
4883
+ const decorators = member.decorators;
4884
+ if (decorators === null) {
4885
+ return null;
4886
+ }
4887
+ const queryDecorators = getAngularDecorators(decorators, queryDecoratorNames, isCore);
4888
+ if (queryDecorators.length === 0) {
4889
+ return null;
4890
+ }
4891
+ if (queryDecorators.length !== 1) {
4892
+ throw new FatalDiagnosticError(ErrorCode.DECORATOR_COLLISION, (_a = member.node) != null ? _a : queryDecorators[0].node, "Cannot combine multiple query decorators.");
4893
+ }
4894
+ const decorator = queryDecorators[0];
4895
+ const node = member.node || decorator.node;
4896
+ if (decorators.some((v) => v.name === "Input")) {
4897
+ throw new FatalDiagnosticError(ErrorCode.DECORATOR_COLLISION, node, "Cannot combine @Input decorators with query decorators");
4898
+ }
4899
+ if (!isPropertyTypeMember(member)) {
4900
+ throw new FatalDiagnosticError(ErrorCode.DECORATOR_UNEXPECTED, node, "Query decorator must go on a property-type member");
4901
+ }
4902
+ const name = (_c = (_b = decorator.import) == null ? void 0 : _b.name) != null ? _c : decorator.name;
4903
+ return {
4904
+ name,
4905
+ decorator,
4906
+ metadata: extractDecoratorQueryMetadata(node, name, decorator.args || [], member.name, reflector, evaluator)
4907
+ };
4800
4908
  }
4801
4909
  function isPropertyTypeMember(member) {
4802
4910
  return member.kind === ClassMemberKind.Getter || member.kind === ClassMemberKind.Setter || member.kind === ClassMemberKind.Property;
@@ -4876,27 +4984,23 @@ function parseInputsArray(clazz, decoratorMetadata, evaluator, reflector, refEmi
4876
4984
  }
4877
4985
  return inputs;
4878
4986
  }
4879
- function tryGetDecoratorOnMember(member, decoratorName, coreModule) {
4987
+ function tryGetDecoratorOnMember(member, decoratorName, isCore) {
4880
4988
  if (member.decorators === null) {
4881
4989
  return null;
4882
4990
  }
4883
4991
  for (const decorator of member.decorators) {
4884
- if (decorator.import === null || decorator.import.name !== decoratorName) {
4885
- continue;
4992
+ if (isAngularDecorator(decorator, decoratorName, isCore)) {
4993
+ return decorator;
4886
4994
  }
4887
- if (coreModule !== void 0 && decorator.import.from !== coreModule) {
4888
- continue;
4889
- }
4890
- return decorator;
4891
4995
  }
4892
4996
  return null;
4893
4997
  }
4894
- function tryParseInputFieldMapping(clazz, member, evaluator, reflector, coreModule, refEmitter, compilationMode) {
4998
+ function tryParseInputFieldMapping(clazz, member, evaluator, reflector, isCore, refEmitter, compilationMode) {
4895
4999
  const classPropertyName = member.name;
4896
- const decorator = tryGetDecoratorOnMember(member, "Input", coreModule);
4897
- const signalInputMapping = tryParseSignalInputMapping(member, reflector, coreModule);
5000
+ const decorator = tryGetDecoratorOnMember(member, "Input", isCore);
5001
+ const signalInputMapping = tryParseSignalInputMapping(member, reflector, isCore);
4898
5002
  if (decorator !== null && signalInputMapping !== null) {
4899
- throw new FatalDiagnosticError(ErrorCode.SIGNAL_INPUT_AND_DISALLOWED_DECORATOR, decorator.node, `Using @Input with a signal input is not allowed.`);
5003
+ throw new FatalDiagnosticError(ErrorCode.INITIALIZER_API_WITH_DISALLOWED_DECORATOR, decorator.node, `Using @Input with a signal input is not allowed.`);
4900
5004
  }
4901
5005
  if (decorator !== null) {
4902
5006
  if (decorator.args !== null && decorator.args.length > 1) {
@@ -4936,20 +5040,20 @@ function tryParseInputFieldMapping(clazz, member, evaluator, reflector, coreModu
4936
5040
  }
4937
5041
  return null;
4938
5042
  }
4939
- function parseInputFields(clazz, members, evaluator, reflector, refEmitter, coreModule, compilationMode, inputsFromClassDecorator, classDecorator) {
5043
+ function parseInputFields(clazz, members, evaluator, reflector, refEmitter, isCore, compilationMode, inputsFromClassDecorator, classDecorator) {
4940
5044
  var _a, _b;
4941
5045
  const inputs = {};
4942
5046
  for (const member of members) {
4943
5047
  const classPropertyName = member.name;
4944
- const inputMapping = tryParseInputFieldMapping(clazz, member, evaluator, reflector, coreModule, refEmitter, compilationMode);
5048
+ const inputMapping = tryParseInputFieldMapping(clazz, member, evaluator, reflector, isCore, refEmitter, compilationMode);
4945
5049
  if (inputMapping === null) {
4946
5050
  continue;
4947
5051
  }
4948
5052
  if (member.isStatic) {
4949
- throw new FatalDiagnosticError(ErrorCode.INPUT_DECLARED_ON_STATIC_MEMBER, (_a = member.node) != null ? _a : clazz, `Input "${member.name}" is incorrectly declared as static member of "${clazz.name.text}".`);
5053
+ throw new FatalDiagnosticError(ErrorCode.INCORRECTLY_DECLARED_ON_STATIC_MEMBER, (_a = member.node) != null ? _a : clazz, `Input "${member.name}" is incorrectly declared as static member of "${clazz.name.text}".`);
4950
5054
  }
4951
5055
  if (inputMapping.isSignal && inputsFromClassDecorator.hasOwnProperty(classPropertyName)) {
4952
- throw new FatalDiagnosticError(ErrorCode.SIGNAL_INPUT_AND_INPUTS_ARRAY_COLLISION, (_b = member.node) != null ? _b : clazz, `Input "${member.name}" is also declared as non-signal in @${classDecorator.name}.`);
5056
+ throw new FatalDiagnosticError(ErrorCode.INITIALIZER_API_DECORATOR_METADATA_COLLISION, (_b = member.node) != null ? _b : clazz, `Input "${member.name}" is also declared as non-signal in @${classDecorator.name}.`);
4953
5057
  }
4954
5058
  inputs[classPropertyName] = inputMapping;
4955
5059
  }
@@ -4964,7 +5068,7 @@ function parseDecoratorInputTransformFunction(clazz, classPropertyName, value, r
4964
5068
  }
4965
5069
  return {
4966
5070
  node: node2,
4967
- type: new Reference(ts21.factory.createKeywordTypeNode(ts21.SyntaxKind.UnknownKeyword))
5071
+ type: new Reference(ts23.factory.createKeywordTypeNode(ts23.SyntaxKind.UnknownKeyword))
4968
5072
  };
4969
5073
  }
4970
5074
  const definition = reflector.getDefinitionOfFunction(value.node);
@@ -4992,7 +5096,7 @@ function parseDecoratorInputTransformFunction(clazz, classPropertyName, value, r
4992
5096
  if (!firstParam) {
4993
5097
  return {
4994
5098
  node,
4995
- type: new Reference(ts21.factory.createKeywordTypeNode(ts21.SyntaxKind.UnknownKeyword))
5099
+ type: new Reference(ts23.factory.createKeywordTypeNode(ts23.SyntaxKind.UnknownKeyword))
4996
5100
  };
4997
5101
  }
4998
5102
  if (!firstParam.type) {
@@ -5007,7 +5111,7 @@ function parseDecoratorInputTransformFunction(clazz, classPropertyName, value, r
5007
5111
  }
5008
5112
  function assertEmittableInputType(type, contextFile, reflector, refEmitter) {
5009
5113
  (function walk(node) {
5010
- if (ts21.isTypeReferenceNode(node) && ts21.isIdentifier(node.typeName)) {
5114
+ if (ts23.isTypeReferenceNode(node) && ts23.isIdentifier(node.typeName)) {
5011
5115
  const declaration = reflector.getDeclarationOfIdentifier(node.typeName);
5012
5116
  if (declaration !== null) {
5013
5117
  if (declaration.node.getSourceFile() !== contextFile) {
@@ -5021,6 +5125,57 @@ function assertEmittableInputType(type, contextFile, reflector, refEmitter) {
5021
5125
  node.forEachChild(walk);
5022
5126
  })(type);
5023
5127
  }
5128
+ function parseQueriesOfClassFields(members, reflector, evaluator, isCore) {
5129
+ var _a;
5130
+ const viewQueries = [];
5131
+ const contentQueries = [];
5132
+ const decoratorViewChild = [];
5133
+ const decoratorViewChildren = [];
5134
+ const decoratorContentChild = [];
5135
+ const decoratorContentChildren = [];
5136
+ for (const member of members) {
5137
+ const decoratorQuery = tryGetQueryFromFieldDecorator(member, reflector, evaluator, isCore);
5138
+ const signalQuery = tryParseSignalQueryFromInitializer(member, reflector, isCore);
5139
+ if (decoratorQuery !== null && signalQuery !== null) {
5140
+ throw new FatalDiagnosticError(ErrorCode.INITIALIZER_API_WITH_DISALLOWED_DECORATOR, decoratorQuery.decorator.node, `Using @${decoratorQuery.name} with a signal-based query is not allowed.`);
5141
+ }
5142
+ const queryNode = (_a = decoratorQuery == null ? void 0 : decoratorQuery.decorator.node) != null ? _a : signalQuery == null ? void 0 : signalQuery.call;
5143
+ if (queryNode !== void 0 && member.isStatic) {
5144
+ throw new FatalDiagnosticError(ErrorCode.INCORRECTLY_DECLARED_ON_STATIC_MEMBER, queryNode, `Query is incorrectly declared on a static class member.`);
5145
+ }
5146
+ if (decoratorQuery !== null) {
5147
+ switch (decoratorQuery.name) {
5148
+ case "ViewChild":
5149
+ decoratorViewChild.push(decoratorQuery.metadata);
5150
+ break;
5151
+ case "ViewChildren":
5152
+ decoratorViewChildren.push(decoratorQuery.metadata);
5153
+ break;
5154
+ case "ContentChild":
5155
+ decoratorContentChild.push(decoratorQuery.metadata);
5156
+ break;
5157
+ case "ContentChildren":
5158
+ decoratorContentChildren.push(decoratorQuery.metadata);
5159
+ break;
5160
+ }
5161
+ } else if (signalQuery !== null) {
5162
+ switch (signalQuery.name) {
5163
+ case "viewChild":
5164
+ case "viewChildren":
5165
+ viewQueries.push(signalQuery.metadata);
5166
+ break;
5167
+ case "contentChild":
5168
+ case "contentChildren":
5169
+ contentQueries.push(signalQuery.metadata);
5170
+ break;
5171
+ }
5172
+ }
5173
+ }
5174
+ return {
5175
+ viewQueries: [...viewQueries, ...decoratorViewChild, ...decoratorViewChildren],
5176
+ contentQueries: [...contentQueries, ...decoratorContentChild, ...decoratorContentChildren]
5177
+ };
5178
+ }
5024
5179
  function parseOutputsArray(directive, evaluator) {
5025
5180
  const metaValues = parseFieldStringArrayValue(directive, "outputs", evaluator);
5026
5181
  return metaValues ? parseMappingStringArray(metaValues) : EMPTY_OBJECT;
@@ -5067,31 +5222,45 @@ function evaluateHostExpressionBindings(hostExpr, evaluator) {
5067
5222
  }
5068
5223
  return bindings;
5069
5224
  }
5070
- function extractHostDirectives(rawHostDirectives, evaluator) {
5225
+ function extractHostDirectives(rawHostDirectives, evaluator, compilationMode) {
5071
5226
  const resolved = evaluator.evaluate(rawHostDirectives, forwardRefResolver);
5072
5227
  if (!Array.isArray(resolved)) {
5073
5228
  throw createValueHasWrongTypeError(rawHostDirectives, resolved, "hostDirectives must be an array");
5074
5229
  }
5075
5230
  return resolved.map((value) => {
5076
5231
  const hostReference = value instanceof Map ? value.get("directive") : value;
5077
- if (!(hostReference instanceof Reference)) {
5078
- throw createValueHasWrongTypeError(rawHostDirectives, hostReference, "Host directive must be a reference");
5232
+ if (compilationMode !== CompilationMode.LOCAL) {
5233
+ if (!(hostReference instanceof Reference)) {
5234
+ throw createValueHasWrongTypeError(rawHostDirectives, hostReference, "Host directive must be a reference");
5235
+ }
5236
+ if (!isNamedClassDeclaration(hostReference.node)) {
5237
+ throw createValueHasWrongTypeError(rawHostDirectives, hostReference, "Host directive reference must be a class");
5238
+ }
5079
5239
  }
5080
- if (!isNamedClassDeclaration(hostReference.node)) {
5081
- throw createValueHasWrongTypeError(rawHostDirectives, hostReference, "Host directive reference must be a class");
5240
+ let directive;
5241
+ let nameForErrors = (fieldName) => "@Directive.hostDirectives";
5242
+ if (compilationMode === CompilationMode.LOCAL && hostReference instanceof DynamicValue) {
5243
+ if (!ts23.isIdentifier(hostReference.node) && !ts23.isPropertyAccessExpression(hostReference.node)) {
5244
+ throw new FatalDiagnosticError(ErrorCode.LOCAL_COMPILATION_HOST_DIRECTIVE_INVALID, hostReference.node, `In local compilation mode, host directive cannot be an expression`);
5245
+ }
5246
+ directive = new WrappedNodeExpr5(hostReference.node);
5247
+ } else if (hostReference instanceof Reference) {
5248
+ directive = hostReference;
5249
+ nameForErrors = (fieldName) => `@Directive.hostDirectives.${directive.node.name.text}.${fieldName}`;
5250
+ } else {
5251
+ throw new Error("Impossible state");
5082
5252
  }
5083
5253
  const meta = {
5084
- directive: hostReference,
5085
- isForwardReference: hostReference.synthetic,
5086
- inputs: parseHostDirectivesMapping("inputs", value, hostReference.node, rawHostDirectives),
5087
- outputs: parseHostDirectivesMapping("outputs", value, hostReference.node, rawHostDirectives)
5254
+ directive,
5255
+ isForwardReference: hostReference instanceof Reference && hostReference.synthetic,
5256
+ inputs: parseHostDirectivesMapping("inputs", value, nameForErrors("input"), rawHostDirectives),
5257
+ outputs: parseHostDirectivesMapping("outputs", value, nameForErrors("output"), rawHostDirectives)
5088
5258
  };
5089
5259
  return meta;
5090
5260
  });
5091
5261
  }
5092
- function parseHostDirectivesMapping(field, resolvedValue, classReference, sourceExpression) {
5262
+ function parseHostDirectivesMapping(field, resolvedValue, nameForErrors, sourceExpression) {
5093
5263
  if (resolvedValue instanceof Map && resolvedValue.has(field)) {
5094
- const nameForErrors = `@Directive.hostDirectives.${classReference.name.text}.${field}`;
5095
5264
  const rawInputs = resolvedValue.get(field);
5096
5265
  if (isStringArrayOrDie(rawInputs, nameForErrors, sourceExpression)) {
5097
5266
  return parseMappingStringArray(rawInputs);
@@ -5100,8 +5269,17 @@ function parseHostDirectivesMapping(field, resolvedValue, classReference, source
5100
5269
  return null;
5101
5270
  }
5102
5271
  function toHostDirectiveMetadata(hostDirective, context, refEmitter) {
5272
+ let directive;
5273
+ if (hostDirective.directive instanceof Reference) {
5274
+ directive = toR3Reference(hostDirective.directive.node, hostDirective.directive, context, refEmitter);
5275
+ } else {
5276
+ directive = {
5277
+ value: hostDirective.directive,
5278
+ type: hostDirective.directive
5279
+ };
5280
+ }
5103
5281
  return {
5104
- directive: toR3Reference(hostDirective.directive.node, hostDirective.directive, context, refEmitter),
5282
+ directive,
5105
5283
  isForwardReference: hostDirective.isForwardReference,
5106
5284
  inputs: hostDirective.inputs || null,
5107
5285
  outputs: hostDirective.outputs || null
@@ -5117,7 +5295,7 @@ function toR3InputMetadata(mapping) {
5117
5295
  };
5118
5296
  }
5119
5297
 
5120
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.mjs
5298
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.mjs
5121
5299
  var DirectiveSymbol = class extends SemanticSymbol {
5122
5300
  constructor(decl, selector, inputs, outputs, exportAs, typeCheckMeta, typeParameters) {
5123
5301
  super(decl);
@@ -5197,7 +5375,7 @@ function isBaseClassEqual(current, previous) {
5197
5375
  return isSymbolEqual(current, previous);
5198
5376
  }
5199
5377
 
5200
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
5378
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
5201
5379
  var FIELD_DECORATORS = [
5202
5380
  "Input",
5203
5381
  "Output",
@@ -5379,18 +5557,18 @@ var DirectiveDecoratorHandler = class {
5379
5557
  }
5380
5558
  };
5381
5559
 
5382
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5560
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5383
5561
  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";
5384
- import ts23 from "typescript";
5562
+ import ts25 from "typescript";
5385
5563
 
5386
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
5387
- import ts22 from "typescript";
5564
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
5565
+ import ts24 from "typescript";
5388
5566
  function createModuleWithProvidersResolver(reflector, isCore) {
5389
5567
  function _reflectModuleFromTypeParam(type, node) {
5390
- if (!ts22.isTypeReferenceNode(type)) {
5568
+ if (!ts24.isTypeReferenceNode(type)) {
5391
5569
  return null;
5392
5570
  }
5393
- const typeName = type && (ts22.isIdentifier(type.typeName) && type.typeName || ts22.isQualifiedName(type.typeName) && type.typeName.right) || null;
5571
+ const typeName = type && (ts24.isIdentifier(type.typeName) && type.typeName || ts24.isQualifiedName(type.typeName) && type.typeName.right) || null;
5394
5572
  if (typeName === null) {
5395
5573
  return null;
5396
5574
  }
@@ -5402,7 +5580,7 @@ function createModuleWithProvidersResolver(reflector, isCore) {
5402
5580
  return null;
5403
5581
  }
5404
5582
  if (type.typeArguments === void 0 || type.typeArguments.length !== 1) {
5405
- const parent = ts22.isMethodDeclaration(node) && ts22.isClassDeclaration(node.parent) ? node.parent : null;
5583
+ const parent = ts24.isMethodDeclaration(node) && ts24.isClassDeclaration(node.parent) ? node.parent : null;
5406
5584
  const symbolName = (parent && parent.name ? parent.name.getText() + "." : "") + (node.name ? node.name.getText() : "anonymous");
5407
5585
  throw new FatalDiagnosticError(ErrorCode.NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC, type, `${symbolName} returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.`);
5408
5586
  }
@@ -5410,13 +5588,13 @@ function createModuleWithProvidersResolver(reflector, isCore) {
5410
5588
  return typeNodeToValueExpr(arg);
5411
5589
  }
5412
5590
  function _reflectModuleFromLiteralType(type) {
5413
- if (!ts22.isIntersectionTypeNode(type)) {
5591
+ if (!ts24.isIntersectionTypeNode(type)) {
5414
5592
  return null;
5415
5593
  }
5416
5594
  for (const t of type.types) {
5417
- if (ts22.isTypeLiteralNode(t)) {
5595
+ if (ts24.isTypeLiteralNode(t)) {
5418
5596
  for (const m of t.members) {
5419
- const ngModuleType = ts22.isPropertySignature(m) && ts22.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
5597
+ const ngModuleType = ts24.isPropertySignature(m) && ts24.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
5420
5598
  const ngModuleExpression = ngModuleType && typeNodeToValueExpr(ngModuleType);
5421
5599
  if (ngModuleExpression) {
5422
5600
  return ngModuleExpression;
@@ -5450,7 +5628,7 @@ function isResolvedModuleWithProviders(sv) {
5450
5628
  return typeof sv.value === "object" && sv.value != null && sv.value.hasOwnProperty("ngModule") && sv.value.hasOwnProperty("mwpCall");
5451
5629
  }
5452
5630
 
5453
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5631
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5454
5632
  var NgModuleSymbol = class extends SemanticSymbol {
5455
5633
  constructor(decl, hasProviders) {
5456
5634
  super(decl);
@@ -5560,8 +5738,8 @@ var NgModuleDecoratorHandler = class {
5560
5738
  if (decorator.args === null || decorator.args.length > 1) {
5561
5739
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, `Incorrect number of arguments to @NgModule decorator`);
5562
5740
  }
5563
- const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) : ts23.factory.createObjectLiteralExpression([]);
5564
- if (!ts23.isObjectLiteralExpression(meta)) {
5741
+ const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) : ts25.factory.createObjectLiteralExpression([]);
5742
+ if (!ts25.isObjectLiteralExpression(meta)) {
5565
5743
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@NgModule argument must be an object literal");
5566
5744
  }
5567
5745
  const ngModule = reflectObjectLiteral(meta);
@@ -5621,7 +5799,7 @@ var NgModuleDecoratorHandler = class {
5621
5799
  id = new WrappedNodeExpr7(idExpr);
5622
5800
  } else {
5623
5801
  const diag = makeDiagnostic(ErrorCode.WARN_NGMODULE_ID_UNNECESSARY, idExpr, `Using 'module.id' for NgModule.id is a common anti-pattern that is ignored by the Angular compiler.`);
5624
- diag.category = ts23.DiagnosticCategory.Warning;
5802
+ diag.category = ts25.DiagnosticCategory.Warning;
5625
5803
  diagnostics.push(diag);
5626
5804
  }
5627
5805
  }
@@ -5673,16 +5851,16 @@ var NgModuleDecoratorHandler = class {
5673
5851
  }
5674
5852
  const rawProviders = ngModule.has("providers") ? ngModule.get("providers") : null;
5675
5853
  let wrappedProviders = null;
5676
- if (rawProviders !== null && (!ts23.isArrayLiteralExpression(rawProviders) || rawProviders.elements.length > 0)) {
5854
+ if (rawProviders !== null && (!ts25.isArrayLiteralExpression(rawProviders) || rawProviders.elements.length > 0)) {
5677
5855
  wrappedProviders = new WrappedNodeExpr7(this.annotateForClosureCompiler ? wrapFunctionExpressionsInParens(rawProviders) : rawProviders);
5678
5856
  }
5679
5857
  const topLevelImports = [];
5680
5858
  if (this.compilationMode !== CompilationMode.LOCAL && ngModule.has("imports")) {
5681
5859
  const rawImports2 = unwrapExpression(ngModule.get("imports"));
5682
5860
  let topLevelExpressions = [];
5683
- if (ts23.isArrayLiteralExpression(rawImports2)) {
5861
+ if (ts25.isArrayLiteralExpression(rawImports2)) {
5684
5862
  for (const element of rawImports2.elements) {
5685
- if (ts23.isSpreadElement(element)) {
5863
+ if (ts25.isSpreadElement(element)) {
5686
5864
  topLevelExpressions.push(element.expression);
5687
5865
  continue;
5688
5866
  }
@@ -5714,7 +5892,7 @@ var NgModuleDecoratorHandler = class {
5714
5892
  if (exp === null) {
5715
5893
  continue;
5716
5894
  }
5717
- if (ts23.isArrayLiteralExpression(exp)) {
5895
+ if (ts25.isArrayLiteralExpression(exp)) {
5718
5896
  if (exp.elements) {
5719
5897
  injectorMetadata.imports.push(...exp.elements.map((n) => new WrappedNodeExpr7(n)));
5720
5898
  }
@@ -6013,7 +6191,7 @@ function isNgModule(node, compilation) {
6013
6191
  return !compilation.dependencies.some((dep) => dep.ref.node === node);
6014
6192
  }
6015
6193
  function isModuleIdExpression(expr) {
6016
- return ts23.isPropertyAccessExpression(expr) && ts23.isIdentifier(expr.expression) && expr.expression.text === "module" && expr.name.text === "id";
6194
+ return ts25.isPropertyAccessExpression(expr) && ts25.isIdentifier(expr.expression) && expr.expression.text === "module" && expr.name.text === "id";
6017
6195
  }
6018
6196
  function makeStandaloneBootstrapDiagnostic(ngModuleClass, bootstrappedClassRef, rawBootstrapExpr) {
6019
6197
  const componentClassName = bootstrappedClassRef.node.name.text;
@@ -6025,7 +6203,7 @@ function isSyntheticReference(ref) {
6025
6203
  return ref.synthetic;
6026
6204
  }
6027
6205
 
6028
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
6206
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
6029
6207
  function makeCyclicImportInfo(ref, type, cycle) {
6030
6208
  const name = ref.debugName || "(unknown)";
6031
6209
  const path2 = cycle.getPath().map((sf) => sf.fileName).join(" -> ");
@@ -6048,9 +6226,9 @@ function checkCustomElementSelectorForErrors(selector) {
6048
6226
  return null;
6049
6227
  }
6050
6228
 
6051
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
6229
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
6052
6230
  import { DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, ParseSourceFile as ParseSourceFile2, parseTemplate } from "@angular/compiler";
6053
- import ts24 from "typescript";
6231
+ import ts26 from "typescript";
6054
6232
  function getTemplateDeclarationNodeForError(declaration) {
6055
6233
  return declaration.isInline ? declaration.expression : declaration.templateUrlExpression;
6056
6234
  }
@@ -6062,7 +6240,7 @@ function extractTemplate(node, template, evaluator, depTracker, resourceLoader,
6062
6240
  let sourceMapping;
6063
6241
  let escapedString = false;
6064
6242
  let sourceMapUrl;
6065
- if (ts24.isStringLiteral(template.expression) || ts24.isNoSubstitutionTemplateLiteral(template.expression)) {
6243
+ if (ts26.isStringLiteral(template.expression) || ts26.isNoSubstitutionTemplateLiteral(template.expression)) {
6066
6244
  sourceParseRange = getTemplateRange(template.expression);
6067
6245
  sourceStr = template.expression.getSourceFile().text;
6068
6246
  templateContent = template.expression.text;
@@ -6078,7 +6256,7 @@ function extractTemplate(node, template, evaluator, depTracker, resourceLoader,
6078
6256
  const relatedInformation = traceDynamicValue(template.expression, resolvedTemplate);
6079
6257
  const chain = {
6080
6258
  messageText: `Unknown identifier used as template string: ${template.expression.getText()} (did you import this string from another file? This is not allowed in local compilation mode. Please either inline it or move it to a separate file and include it using 'templateUrl')`,
6081
- category: ts24.DiagnosticCategory.Error,
6259
+ category: ts26.DiagnosticCategory.Error,
6082
6260
  code: 0
6083
6261
  };
6084
6262
  throw new FatalDiagnosticError(ErrorCode.LOCAL_COMPILATION_IMPORTED_TEMPLATE_STRING, template.expression, chain, relatedInformation);
@@ -6247,7 +6425,7 @@ function preloadAndParseTemplate(evaluator, resourceLoader, depTracker, preanaly
6247
6425
  }
6248
6426
  function getTemplateRange(templateExpr) {
6249
6427
  const startPos = templateExpr.getStart() + 1;
6250
- const { line, character } = ts24.getLineAndCharacterOfPosition(templateExpr.getSourceFile(), startPos);
6428
+ const { line, character } = ts26.getLineAndCharacterOfPosition(templateExpr.getSourceFile(), startPos);
6251
6429
  return {
6252
6430
  startPos,
6253
6431
  startLine: line,
@@ -6280,7 +6458,7 @@ function transformDecoratorResources(dec, component, styles, template) {
6280
6458
  const metadata = new Map(component);
6281
6459
  if (metadata.has("templateUrl")) {
6282
6460
  metadata.delete("templateUrl");
6283
- metadata.set("template", ts24.factory.createStringLiteral(template.content));
6461
+ metadata.set("template", ts26.factory.createStringLiteral(template.content));
6284
6462
  }
6285
6463
  if (metadata.has("styleUrls") || metadata.has("styleUrl") || metadata.has("styles")) {
6286
6464
  metadata.delete("styles");
@@ -6289,20 +6467,20 @@ function transformDecoratorResources(dec, component, styles, template) {
6289
6467
  if (styles.length > 0) {
6290
6468
  const styleNodes = styles.reduce((result, style) => {
6291
6469
  if (style.trim().length > 0) {
6292
- result.push(ts24.factory.createStringLiteral(style));
6470
+ result.push(ts26.factory.createStringLiteral(style));
6293
6471
  }
6294
6472
  return result;
6295
6473
  }, []);
6296
6474
  if (styleNodes.length > 0) {
6297
- metadata.set("styles", ts24.factory.createArrayLiteralExpression(styleNodes));
6475
+ metadata.set("styles", ts26.factory.createArrayLiteralExpression(styleNodes));
6298
6476
  }
6299
6477
  }
6300
6478
  }
6301
6479
  const newMetadataFields = [];
6302
6480
  for (const [name, value] of metadata.entries()) {
6303
- newMetadataFields.push(ts24.factory.createPropertyAssignment(name, value));
6481
+ newMetadataFields.push(ts26.factory.createPropertyAssignment(name, value));
6304
6482
  }
6305
- return { ...dec, args: [ts24.factory.createObjectLiteralExpression(newMetadataFields)] };
6483
+ return { ...dec, args: [ts26.factory.createObjectLiteralExpression(newMetadataFields)] };
6306
6484
  }
6307
6485
  function extractComponentStyleUrls(evaluator, component) {
6308
6486
  const styleUrlsExpr = component.get("styleUrls");
@@ -6328,9 +6506,9 @@ function extractComponentStyleUrls(evaluator, component) {
6328
6506
  }
6329
6507
  function extractStyleUrlsFromExpression(evaluator, styleUrlsExpr) {
6330
6508
  const styleUrls = [];
6331
- if (ts24.isArrayLiteralExpression(styleUrlsExpr)) {
6509
+ if (ts26.isArrayLiteralExpression(styleUrlsExpr)) {
6332
6510
  for (const styleUrlExpr of styleUrlsExpr.elements) {
6333
- if (ts24.isSpreadElement(styleUrlExpr)) {
6511
+ if (ts26.isSpreadElement(styleUrlExpr)) {
6334
6512
  styleUrls.push(...extractStyleUrlsFromExpression(evaluator, styleUrlExpr.expression));
6335
6513
  } else {
6336
6514
  const styleUrl = evaluator.evaluate(styleUrlExpr);
@@ -6362,18 +6540,18 @@ function extractStyleUrlsFromExpression(evaluator, styleUrlsExpr) {
6362
6540
  function extractStyleResources(resourceLoader, component, containingFile) {
6363
6541
  const styles = /* @__PURE__ */ new Set();
6364
6542
  function stringLiteralElements(array) {
6365
- return array.elements.filter((e) => ts24.isStringLiteralLike(e));
6543
+ return array.elements.filter((e) => ts26.isStringLiteralLike(e));
6366
6544
  }
6367
6545
  const styleUrlExpr = component.get("styleUrl");
6368
6546
  const styleUrlsExpr = component.get("styleUrls");
6369
- if (styleUrlsExpr !== void 0 && ts24.isArrayLiteralExpression(styleUrlsExpr)) {
6547
+ if (styleUrlsExpr !== void 0 && ts26.isArrayLiteralExpression(styleUrlsExpr)) {
6370
6548
  for (const expression of stringLiteralElements(styleUrlsExpr)) {
6371
6549
  const resource = stringLiteralUrlToResource(resourceLoader, expression, containingFile);
6372
6550
  if (resource !== null) {
6373
6551
  styles.add(resource);
6374
6552
  }
6375
6553
  }
6376
- } else if (styleUrlExpr !== void 0 && ts24.isStringLiteralLike(styleUrlExpr)) {
6554
+ } else if (styleUrlExpr !== void 0 && ts26.isStringLiteralLike(styleUrlExpr)) {
6377
6555
  const resource = stringLiteralUrlToResource(resourceLoader, styleUrlExpr, containingFile);
6378
6556
  if (resource !== null) {
6379
6557
  styles.add(resource);
@@ -6381,11 +6559,11 @@ function extractStyleResources(resourceLoader, component, containingFile) {
6381
6559
  }
6382
6560
  const stylesExpr = component.get("styles");
6383
6561
  if (stylesExpr !== void 0) {
6384
- if (ts24.isArrayLiteralExpression(stylesExpr)) {
6562
+ if (ts26.isArrayLiteralExpression(stylesExpr)) {
6385
6563
  for (const expression of stringLiteralElements(stylesExpr)) {
6386
6564
  styles.add({ path: null, expression });
6387
6565
  }
6388
- } else if (ts24.isStringLiteralLike(stylesExpr)) {
6566
+ } else if (ts26.isStringLiteralLike(stylesExpr)) {
6389
6567
  styles.add({ path: null, expression: stylesExpr });
6390
6568
  }
6391
6569
  }
@@ -6407,7 +6585,7 @@ function _extractTemplateStyleUrls(template) {
6407
6585
  return template.styleUrls.map((url) => ({ url, source: 1, nodeForError }));
6408
6586
  }
6409
6587
 
6410
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.mjs
6588
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.mjs
6411
6589
  var ComponentSymbol = class extends DirectiveSymbol {
6412
6590
  constructor() {
6413
6591
  super(...arguments);
@@ -6442,7 +6620,7 @@ var ComponentSymbol = class extends DirectiveSymbol {
6442
6620
  }
6443
6621
  };
6444
6622
 
6445
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/util.mjs
6623
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/util.mjs
6446
6624
  function collectAnimationNames(value, animationTriggerNames) {
6447
6625
  if (value instanceof Map) {
6448
6626
  const name = value.get("name");
@@ -6519,7 +6697,7 @@ function isLikelyModuleWithProviders(value) {
6519
6697
  return false;
6520
6698
  }
6521
6699
 
6522
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
6700
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
6523
6701
  var EMPTY_ARRAY2 = [];
6524
6702
  var isUsedDirective = (decl) => decl.kind === R3TemplateDependencyKind.Directive;
6525
6703
  var isUsedPipe = (decl) => decl.kind === R3TemplateDependencyKind.Pipe;
@@ -6937,7 +7115,7 @@ var ComponentDecoratorHandler = class {
6937
7115
  }
6938
7116
  typeCheck(ctx, node, meta) {
6939
7117
  var _a;
6940
- if (this.typeCheckScopeRegistry === null || !ts25.isClassDeclaration(node)) {
7118
+ if (this.typeCheckScopeRegistry === null || !ts27.isClassDeclaration(node)) {
6941
7119
  return;
6942
7120
  }
6943
7121
  if (meta.isPoisoned && !this.usePoisonedData) {
@@ -6960,7 +7138,7 @@ var ComponentDecoratorHandler = class {
6960
7138
  const nonRemovableImports = this.deferredSymbolTracker.getNonRemovableDeferredImports(context, node);
6961
7139
  if (nonRemovableImports.length > 0) {
6962
7140
  for (const importDecl of nonRemovableImports) {
6963
- const diagnostic = makeDiagnostic(ErrorCode.DEFERRED_DEPENDENCY_IMPORTED_EAGERLY, importDecl, `This import contains symbols used in the \`@Component.deferredImports\` array of the \`${node.name.getText()}\` component, but also some other symbols that are not in any \`@Component.deferredImports\` array. This renders all these defer imports useless as this import remains and its module is eagerly loaded. To fix this, make sure that this import contains *only* symbols that are used within \`@Component.deferredImports\` arrays.`);
7141
+ const diagnostic = makeDiagnostic(ErrorCode.DEFERRED_DEPENDENCY_IMPORTED_EAGERLY, importDecl, `This import contains symbols that are used both inside and outside of the \`@Component.deferredImports\` fields in the file. This renders all these defer imports useless as this import remains and its module is eagerly loaded. To fix this, make sure that all symbols from the import are *only* used within \`@Component.deferredImports\` arrays and there are no other references to those symbols present in this file.`);
6964
7142
  diagnostics.push(diagnostic);
6965
7143
  }
6966
7144
  return { diagnostics };
@@ -7294,12 +7472,12 @@ var ComponentDecoratorHandler = class {
7294
7472
  }
7295
7473
  collectExplicitlyDeferredSymbols(rawDeferredImports) {
7296
7474
  const deferredTypes = /* @__PURE__ */ new Map();
7297
- if (!ts25.isArrayLiteralExpression(rawDeferredImports)) {
7475
+ if (!ts27.isArrayLiteralExpression(rawDeferredImports)) {
7298
7476
  return deferredTypes;
7299
7477
  }
7300
7478
  for (const element of rawDeferredImports.elements) {
7301
7479
  const node = tryUnwrapForwardRef(element, this.reflector) || element;
7302
- if (!ts25.isIdentifier(node)) {
7480
+ if (!ts27.isIdentifier(node)) {
7303
7481
  continue;
7304
7482
  }
7305
7483
  const imp = this.reflector.getImportOfIdentifier(node);
@@ -7363,12 +7541,12 @@ var ComponentDecoratorHandler = class {
7363
7541
  }
7364
7542
  }
7365
7543
  registerDeferrableCandidates(componentClassDecl, importsExpr, isDeferredImport, allDeferredDecls, eagerlyUsedDecls, resolutionData) {
7366
- if (!ts25.isArrayLiteralExpression(importsExpr)) {
7544
+ if (!ts27.isArrayLiteralExpression(importsExpr)) {
7367
7545
  return;
7368
7546
  }
7369
7547
  for (const element of importsExpr.elements) {
7370
7548
  const node = tryUnwrapForwardRef(element, this.reflector) || element;
7371
- if (!ts25.isIdentifier(node)) {
7549
+ if (!ts27.isIdentifier(node)) {
7372
7550
  continue;
7373
7551
  }
7374
7552
  const imp = this.reflector.getImportOfIdentifier(node);
@@ -7480,9 +7658,9 @@ function validateStandaloneImports(importRefs, importExpr, metaReader, scopeRead
7480
7658
  return diagnostics;
7481
7659
  }
7482
7660
 
7483
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
7484
- import { compileClassMetadata as compileClassMetadata3, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression2, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr9 } from "@angular/compiler";
7485
- import ts26 from "typescript";
7661
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
7662
+ import { compileClassMetadata as compileClassMetadata3, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression3, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr9 } from "@angular/compiler";
7663
+ import ts28 from "typescript";
7486
7664
  var InjectableDecoratorHandler = class {
7487
7665
  constructor(reflector, evaluator, isCore, strictCtorDeps, injectableRegistry, perf, includeClassMetadata, compilationMode, errorOnDuplicateProv = true) {
7488
7666
  this.reflector = reflector;
@@ -7598,19 +7776,19 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
7598
7776
  name,
7599
7777
  type,
7600
7778
  typeArgumentCount,
7601
- providedIn: createMayBeForwardRefExpression2(new LiteralExpr3(null), 0)
7779
+ providedIn: createMayBeForwardRefExpression3(new LiteralExpr3(null), 0)
7602
7780
  };
7603
7781
  } else if (decorator.args.length === 1) {
7604
7782
  const metaNode = decorator.args[0];
7605
- if (!ts26.isObjectLiteralExpression(metaNode)) {
7783
+ if (!ts28.isObjectLiteralExpression(metaNode)) {
7606
7784
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, metaNode, `@Injectable argument must be an object literal`);
7607
7785
  }
7608
7786
  const meta = reflectObjectLiteral(metaNode);
7609
- const providedIn = meta.has("providedIn") ? getProviderExpression(meta.get("providedIn"), reflector) : createMayBeForwardRefExpression2(new LiteralExpr3(null), 0);
7787
+ const providedIn = meta.has("providedIn") ? getProviderExpression(meta.get("providedIn"), reflector) : createMayBeForwardRefExpression3(new LiteralExpr3(null), 0);
7610
7788
  let deps = void 0;
7611
7789
  if ((meta.has("useClass") || meta.has("useFactory")) && meta.has("deps")) {
7612
7790
  const depsExpr = meta.get("deps");
7613
- if (!ts26.isArrayLiteralExpression(depsExpr)) {
7791
+ if (!ts28.isArrayLiteralExpression(depsExpr)) {
7614
7792
  throw new FatalDiagnosticError(ErrorCode.VALUE_NOT_LITERAL, depsExpr, `@Injectable deps metadata must be an inline array`);
7615
7793
  }
7616
7794
  deps = depsExpr.elements.map((dep) => getDep(dep, reflector));
@@ -7634,7 +7812,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
7634
7812
  }
7635
7813
  function getProviderExpression(expression, reflector) {
7636
7814
  const forwardRefValue = tryUnwrapForwardRef(expression, reflector);
7637
- return createMayBeForwardRefExpression2(new WrappedNodeExpr9(forwardRefValue != null ? forwardRefValue : expression), forwardRefValue !== null ? 2 : 0);
7815
+ return createMayBeForwardRefExpression3(new WrappedNodeExpr9(forwardRefValue != null ? forwardRefValue : expression), forwardRefValue !== null ? 2 : 0);
7638
7816
  }
7639
7817
  function extractInjectableCtorDeps(clazz, meta, decorator, reflector, isCore, strictCtorDeps) {
7640
7818
  if (decorator.args === null) {
@@ -7695,12 +7873,12 @@ function getDep(dep, reflector) {
7695
7873
  }
7696
7874
  return true;
7697
7875
  }
7698
- if (ts26.isArrayLiteralExpression(dep)) {
7876
+ if (ts28.isArrayLiteralExpression(dep)) {
7699
7877
  dep.elements.forEach((el) => {
7700
7878
  let isDecorator = false;
7701
- if (ts26.isIdentifier(el)) {
7879
+ if (ts28.isIdentifier(el)) {
7702
7880
  isDecorator = maybeUpdateDecorator(el, reflector);
7703
- } else if (ts26.isNewExpression(el) && ts26.isIdentifier(el.expression)) {
7881
+ } else if (ts28.isNewExpression(el) && ts28.isIdentifier(el.expression)) {
7704
7882
  const token = el.arguments && el.arguments.length > 0 && el.arguments[0] || void 0;
7705
7883
  isDecorator = maybeUpdateDecorator(el.expression, reflector, token);
7706
7884
  }
@@ -7712,9 +7890,9 @@ function getDep(dep, reflector) {
7712
7890
  return meta;
7713
7891
  }
7714
7892
 
7715
- // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
7893
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
7716
7894
  import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata5, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5 } from "@angular/compiler";
7717
- import ts27 from "typescript";
7895
+ import ts29 from "typescript";
7718
7896
  var PipeSymbol = class extends SemanticSymbol {
7719
7897
  constructor(decl, name) {
7720
7898
  super(decl);
@@ -7771,7 +7949,7 @@ var PipeDecoratorHandler = class {
7771
7949
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, "@Pipe must have exactly one argument");
7772
7950
  }
7773
7951
  const meta = unwrapExpression(decorator.args[0]);
7774
- if (!ts27.isObjectLiteralExpression(meta)) {
7952
+ if (!ts29.isObjectLiteralExpression(meta)) {
7775
7953
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@Pipe must have a literal argument");
7776
7954
  }
7777
7955
  const pipe = reflectObjectLiteral(meta);
@@ -7876,6 +8054,7 @@ export {
7876
8054
  forwardRefResolver,
7877
8055
  MetaKind,
7878
8056
  CompoundMetadataReader,
8057
+ isHostDirectiveMetaForGlobalMode,
7879
8058
  DtsMetadataReader,
7880
8059
  LocalMetadataRegistry,
7881
8060
  CompoundMetadataRegistry,
@@ -7921,4 +8100,4 @@ export {
7921
8100
  * Use of this source code is governed by an MIT-style license that can be
7922
8101
  * found in the LICENSE file at https://angular.io/license
7923
8102
  */
7924
- //# sourceMappingURL=chunk-GM44CTB7.js.map
8103
+ //# sourceMappingURL=chunk-YJ2WTOVI.js.map