@angular/core 17.0.7 → 17.0.9

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 (63) hide show
  1. package/esm2022/src/application/application_ref.mjs +24 -12
  2. package/esm2022/src/application/create_application.mjs +2 -2
  3. package/esm2022/src/change_detection/flags.mjs +16 -0
  4. package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +164 -0
  5. package/esm2022/src/change_detection/scheduling/zoneless_scheduling.mjs +13 -0
  6. package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +56 -0
  7. package/esm2022/src/core.mjs +2 -2
  8. package/esm2022/src/core_private_export.mjs +5 -2
  9. package/esm2022/src/core_render3_private_export.mjs +1 -2
  10. package/esm2022/src/defer/dom_triggers.mjs +1 -5
  11. package/esm2022/src/di/inject_switch.mjs +2 -3
  12. package/esm2022/src/di/r3_injector.mjs +8 -6
  13. package/esm2022/src/errors.mjs +1 -1
  14. package/esm2022/src/event_emitter.mjs +1 -2
  15. package/esm2022/src/hydration/utils.mjs +2 -2
  16. package/esm2022/src/hydration/views.mjs +2 -2
  17. package/esm2022/src/linker/view_container_ref.mjs +2 -2
  18. package/esm2022/src/pending_tasks.mjs +57 -0
  19. package/esm2022/src/platform/platform_ref.mjs +2 -2
  20. package/esm2022/src/render3/after_render_hooks.mjs +16 -34
  21. package/esm2022/src/render3/collect_native_nodes.mjs +2 -3
  22. package/esm2022/src/render3/component_ref.mjs +13 -9
  23. package/esm2022/src/render3/debug/injector_profiler.mjs +1 -1
  24. package/esm2022/src/render3/errors_di.mjs +4 -3
  25. package/esm2022/src/render3/instructions/advance.mjs +2 -2
  26. package/esm2022/src/render3/instructions/change_detection.mjs +1 -6
  27. package/esm2022/src/render3/instructions/mark_view_dirty.mjs +4 -3
  28. package/esm2022/src/render3/instructions/shared.mjs +4 -3
  29. package/esm2022/src/render3/interfaces/container.mjs +1 -6
  30. package/esm2022/src/render3/interfaces/view.mjs +1 -1
  31. package/esm2022/src/render3/node_manipulation.mjs +8 -8
  32. package/esm2022/src/render3/reactivity/effect.mjs +8 -6
  33. package/esm2022/src/render3/styling/style_binding_list.mjs +4 -4
  34. package/esm2022/src/render3/util/discovery_utils.mjs +3 -3
  35. package/esm2022/src/render3/util/global_utils.mjs +28 -28
  36. package/esm2022/src/render3/util/injector_discovery_utils.mjs +1 -1
  37. package/esm2022/src/render3/util/injector_utils.mjs +6 -5
  38. package/esm2022/src/render3/util/view_traversal_utils.mjs +3 -12
  39. package/esm2022/src/render3/util/view_utils.mjs +36 -19
  40. package/esm2022/src/render3/view_ref.mjs +2 -1
  41. package/esm2022/src/version.mjs +6 -5
  42. package/esm2022/src/zone/ng_zone.mjs +1 -61
  43. package/esm2022/testing/src/component_fixture.mjs +62 -58
  44. package/esm2022/testing/src/logger.mjs +3 -3
  45. package/fesm2022/core.mjs +374 -309
  46. package/fesm2022/core.mjs.map +1 -1
  47. package/fesm2022/primitives/signals.mjs +1 -1
  48. package/fesm2022/rxjs-interop.mjs +1 -1
  49. package/fesm2022/testing.mjs +62 -58
  50. package/fesm2022/testing.mjs.map +1 -1
  51. package/index.d.ts +405 -46
  52. package/package.json +1 -1
  53. package/primitives/signals/index.d.ts +1 -1
  54. package/rxjs-interop/index.d.ts +1 -1
  55. package/schematics/migrations/block-template-entities/bundle.js +332 -330
  56. package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
  57. package/schematics/ng-generate/control-flow-migration/bundle.js +498 -397
  58. package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
  59. package/schematics/ng-generate/standalone-migration/bundle.js +349 -323
  60. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  61. package/testing/index.d.ts +6 -2
  62. package/esm2022/src/change_detection/scheduling.mjs +0 -103
  63. package/esm2022/src/initial_render_pending_tasks.mjs +0 -49
@@ -2369,7 +2369,7 @@ var ConstantPool = class {
2369
2369
  }))));
2370
2370
  }
2371
2371
  }
2372
- getSharedFunctionReference(fn2, prefix) {
2372
+ getSharedFunctionReference(fn2, prefix, useUniqueName = true) {
2373
2373
  var _a2;
2374
2374
  const isArrow = fn2 instanceof ArrowFunctionExpr;
2375
2375
  for (const current of this.statements) {
@@ -2380,7 +2380,7 @@ var ConstantPool = class {
2380
2380
  return variable(current.name);
2381
2381
  }
2382
2382
  }
2383
- const name = this.uniqueName(prefix);
2383
+ const name = useUniqueName ? this.uniqueName(prefix) : prefix;
2384
2384
  this.statements.push(fn2.toDeclStmt(name, StmtModifier.Final));
2385
2385
  return variable(name);
2386
2386
  }
@@ -4004,13 +4004,17 @@ var TagContentType;
4004
4004
  TagContentType2[TagContentType2["ESCAPABLE_RAW_TEXT"] = 1] = "ESCAPABLE_RAW_TEXT";
4005
4005
  TagContentType2[TagContentType2["PARSABLE_DATA"] = 2] = "PARSABLE_DATA";
4006
4006
  })(TagContentType || (TagContentType = {}));
4007
- function splitNsName(elementName) {
4007
+ function splitNsName(elementName, fatal = true) {
4008
4008
  if (elementName[0] != ":") {
4009
4009
  return [null, elementName];
4010
4010
  }
4011
4011
  const colonIndex = elementName.indexOf(":", 1);
4012
4012
  if (colonIndex === -1) {
4013
- throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`);
4013
+ if (fatal) {
4014
+ throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`);
4015
+ } else {
4016
+ return [null, elementName];
4017
+ }
4014
4018
  }
4015
4019
  return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
4016
4020
  }
@@ -7972,8 +7976,9 @@ var OpKind;
7972
7976
  OpKind2[OpKind2["I18nApply"] = 40] = "I18nApply";
7973
7977
  OpKind2[OpKind2["IcuStart"] = 41] = "IcuStart";
7974
7978
  OpKind2[OpKind2["IcuEnd"] = 42] = "IcuEnd";
7975
- OpKind2[OpKind2["I18nContext"] = 43] = "I18nContext";
7976
- OpKind2[OpKind2["I18nAttributes"] = 44] = "I18nAttributes";
7979
+ OpKind2[OpKind2["IcuPlaceholder"] = 43] = "IcuPlaceholder";
7980
+ OpKind2[OpKind2["I18nContext"] = 44] = "I18nContext";
7981
+ OpKind2[OpKind2["I18nAttributes"] = 45] = "I18nAttributes";
7977
7982
  })(OpKind || (OpKind = {}));
7978
7983
  var ExpressionKind;
7979
7984
  (function(ExpressionKind2) {
@@ -8071,13 +8076,6 @@ var DeferTriggerKind;
8071
8076
  DeferTriggerKind2[DeferTriggerKind2["Interaction"] = 4] = "Interaction";
8072
8077
  DeferTriggerKind2[DeferTriggerKind2["Viewport"] = 5] = "Viewport";
8073
8078
  })(DeferTriggerKind || (DeferTriggerKind = {}));
8074
- var DerivedRepeaterVarIdentity;
8075
- (function(DerivedRepeaterVarIdentity2) {
8076
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["First"] = 0] = "First";
8077
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Last"] = 1] = "Last";
8078
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Even"] = 2] = "Even";
8079
- DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
8080
- })(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
8081
8079
  var I18nContextKind;
8082
8080
  (function(I18nContextKind2) {
8083
8081
  I18nContextKind2[I18nContextKind2["RootI18n"] = 0] = "RootI18n";
@@ -8232,10 +8230,11 @@ function createClassMapOp(xref, expression, sourceSpan) {
8232
8230
  sourceSpan
8233
8231
  }, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
8234
8232
  }
8235
- function createAttributeOp(target, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
8233
+ function createAttributeOp(target, namespace, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) {
8236
8234
  return __spreadValues(__spreadValues(__spreadValues({
8237
8235
  kind: OpKind.Attribute,
8238
8236
  target,
8237
+ namespace,
8239
8238
  name,
8240
8239
  expression,
8241
8240
  securityContext,
@@ -8277,15 +8276,15 @@ function createRepeaterOp(repeaterCreate2, targetSlot, collection, sourceSpan) {
8277
8276
  }, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
8278
8277
  }
8279
8278
  function createDeferWhenOp(target, expr, prefetch, sourceSpan) {
8280
- return __spreadValues(__spreadValues({
8279
+ return __spreadValues(__spreadValues(__spreadValues({
8281
8280
  kind: OpKind.DeferWhen,
8282
8281
  target,
8283
8282
  expr,
8284
8283
  prefetch,
8285
8284
  sourceSpan
8286
- }, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
8285
+ }, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS);
8287
8286
  }
8288
- function createI18nExpressionOp(context, target, i18nOwner, handle, expression, i18nPlaceholder, resolutionTime, usage, name, sourceSpan) {
8287
+ function createI18nExpressionOp(context, target, i18nOwner, handle, expression, icuPlaceholder, i18nPlaceholder, resolutionTime, usage, name, sourceSpan) {
8289
8288
  return __spreadValues(__spreadValues(__spreadValues({
8290
8289
  kind: OpKind.I18nExpression,
8291
8290
  context,
@@ -8293,6 +8292,7 @@ function createI18nExpressionOp(context, target, i18nOwner, handle, expression,
8293
8292
  i18nOwner,
8294
8293
  handle,
8295
8294
  expression,
8295
+ icuPlaceholder,
8296
8296
  i18nPlaceholder,
8297
8297
  resolutionTime,
8298
8298
  usage,
@@ -8889,27 +8889,6 @@ var ConditionalCaseExpr = class extends ExpressionBase {
8889
8889
  }
8890
8890
  }
8891
8891
  };
8892
- var DerivedRepeaterVarExpr = class extends ExpressionBase {
8893
- constructor(xref, identity) {
8894
- super();
8895
- this.xref = xref;
8896
- this.identity = identity;
8897
- this.kind = ExpressionKind.DerivedRepeaterVar;
8898
- }
8899
- transformInternalExpressions(transform2, flags) {
8900
- }
8901
- visitExpression(visitor, context) {
8902
- }
8903
- isEquivalent(e) {
8904
- return e instanceof DerivedRepeaterVarExpr && e.identity === this.identity && e.xref === this.xref;
8905
- }
8906
- isConstant() {
8907
- return false;
8908
- }
8909
- clone() {
8910
- return new DerivedRepeaterVarExpr(this.xref, this.identity);
8911
- }
8912
- };
8913
8892
  var ConstCollectedExpr = class extends ExpressionBase {
8914
8893
  constructor(expr) {
8915
8894
  super();
@@ -9025,6 +9004,9 @@ function transformExpressionsInOp(op, transform2, flags) {
9025
9004
  if (op.placeholderConfig !== null) {
9026
9005
  op.placeholderConfig = transformExpressionsInExpression(op.placeholderConfig, transform2, flags);
9027
9006
  }
9007
+ if (op.resolverFn !== null) {
9008
+ op.resolverFn = transformExpressionsInExpression(op.resolverFn, transform2, flags);
9009
+ }
9028
9010
  break;
9029
9011
  case OpKind.I18nMessage:
9030
9012
  for (const [placeholder, expr] of op.params) {
@@ -9061,6 +9043,7 @@ function transformExpressionsInOp(op, transform2, flags) {
9061
9043
  case OpKind.Template:
9062
9044
  case OpKind.Text:
9063
9045
  case OpKind.I18nAttributes:
9046
+ case OpKind.IcuPlaceholder:
9064
9047
  break;
9065
9048
  default:
9066
9049
  throw new Error(`AssertionError: transformExpressionsInOp doesn't handle ${OpKind[op.kind]}`);
@@ -9360,7 +9343,7 @@ var elementContainerOpKinds = /* @__PURE__ */ new Set([
9360
9343
  function isElementOrContainerOp(op) {
9361
9344
  return elementContainerOpKinds.has(op.kind);
9362
9345
  }
9363
- function createElementStartOp(tag, xref, namespace, i18nPlaceholder, sourceSpan) {
9346
+ function createElementStartOp(tag, xref, namespace, i18nPlaceholder, startSourceSpan, wholeSourceSpan) {
9364
9347
  return __spreadValues(__spreadValues({
9365
9348
  kind: OpKind.ElementStart,
9366
9349
  xref,
@@ -9371,10 +9354,11 @@ function createElementStartOp(tag, xref, namespace, i18nPlaceholder, sourceSpan)
9371
9354
  nonBindable: false,
9372
9355
  namespace,
9373
9356
  i18nPlaceholder,
9374
- sourceSpan
9357
+ startSourceSpan,
9358
+ wholeSourceSpan
9375
9359
  }, TRAIT_CONSUMES_SLOT), NEW_OP);
9376
9360
  }
9377
- function createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace, i18nPlaceholder, sourceSpan) {
9361
+ function createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace, i18nPlaceholder, startSourceSpan, wholeSourceSpan) {
9378
9362
  return __spreadValues(__spreadValues({
9379
9363
  kind: OpKind.Template,
9380
9364
  xref,
@@ -9389,11 +9373,12 @@ function createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace
9389
9373
  nonBindable: false,
9390
9374
  namespace,
9391
9375
  i18nPlaceholder,
9392
- sourceSpan
9376
+ startSourceSpan,
9377
+ wholeSourceSpan
9393
9378
  }, TRAIT_CONSUMES_SLOT), NEW_OP);
9394
9379
  }
9395
- function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, i18nPlaceholder, emptyI18nPlaceholder, sourceSpan) {
9396
- return __spreadProps(__spreadValues(__spreadValues({
9380
+ function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, i18nPlaceholder, emptyI18nPlaceholder, startSourceSpan, wholeSourceSpan) {
9381
+ return __spreadProps(__spreadValues(__spreadValues(__spreadValues({
9397
9382
  kind: OpKind.RepeaterCreate,
9398
9383
  attributes: null,
9399
9384
  xref: primaryView,
@@ -9412,8 +9397,9 @@ function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, i1
9412
9397
  usesComponentInstance: false,
9413
9398
  i18nPlaceholder,
9414
9399
  emptyI18nPlaceholder,
9415
- sourceSpan
9416
- }, TRAIT_CONSUMES_SLOT), NEW_OP), {
9400
+ startSourceSpan,
9401
+ wholeSourceSpan
9402
+ }, TRAIT_CONSUMES_SLOT), NEW_OP), TRAIT_CONSUMES_VARS), {
9417
9403
  numSlotsUsed: emptyView === null ? 2 : 3
9418
9404
  });
9419
9405
  }
@@ -9436,12 +9422,13 @@ function createEnableBindingsOp(xref) {
9436
9422
  xref
9437
9423
  }, NEW_OP);
9438
9424
  }
9439
- function createTextOp(xref, initialValue, sourceSpan) {
9425
+ function createTextOp(xref, initialValue, icuPlaceholder, sourceSpan) {
9440
9426
  return __spreadValues(__spreadValues({
9441
9427
  kind: OpKind.Text,
9442
9428
  xref,
9443
9429
  handle: new SlotHandle(),
9444
9430
  initialValue,
9431
+ icuPlaceholder,
9445
9432
  sourceSpan
9446
9433
  }, TRAIT_CONSUMES_SLOT), NEW_OP);
9447
9434
  }
@@ -9497,11 +9484,12 @@ function createProjectionOp(xref, selector, i18nPlaceholder, attributes, sourceS
9497
9484
  sourceSpan
9498
9485
  }, NEW_OP), TRAIT_CONSUMES_SLOT);
9499
9486
  }
9500
- function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext, i18nMessage, securityContext) {
9487
+ function createExtractedAttributeOp(target, bindingKind, namespace, name, expression, i18nContext, i18nMessage, securityContext) {
9501
9488
  return __spreadValues({
9502
9489
  kind: OpKind.ExtractedAttribute,
9503
9490
  target,
9504
9491
  bindingKind,
9492
+ namespace,
9505
9493
  name,
9506
9494
  expression,
9507
9495
  i18nContext,
@@ -9592,6 +9580,15 @@ function createIcuEndOp(xref) {
9592
9580
  xref
9593
9581
  }, NEW_OP);
9594
9582
  }
9583
+ function createIcuPlaceholderOp(xref, name, strings) {
9584
+ return __spreadValues({
9585
+ kind: OpKind.IcuPlaceholder,
9586
+ xref,
9587
+ name,
9588
+ strings,
9589
+ expressionPlaceholders: []
9590
+ }, NEW_OP);
9591
+ }
9595
9592
  function createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan) {
9596
9593
  if (i18nBlock === null && contextKind !== I18nContextKind.Attr) {
9597
9594
  throw new Error("AssertionError: i18nBlock must be provided for non-attribute contexts.");
@@ -9882,6 +9879,7 @@ function extractAttributes(job) {
9882
9879
  createExtractedAttributeOp(
9883
9880
  op.target,
9884
9881
  bindingKind,
9882
+ null,
9885
9883
  op.name,
9886
9884
  null,
9887
9885
  null,
@@ -9898,6 +9896,7 @@ function extractAttributes(job) {
9898
9896
  OpList.insertBefore(createExtractedAttributeOp(
9899
9897
  op.target,
9900
9898
  BindingKind.Property,
9899
+ null,
9901
9900
  op.name,
9902
9901
  null,
9903
9902
  null,
@@ -9911,6 +9910,7 @@ function extractAttributes(job) {
9911
9910
  const extractedAttributeOp = createExtractedAttributeOp(
9912
9911
  op.target,
9913
9912
  BindingKind.Property,
9913
+ null,
9914
9914
  op.name,
9915
9915
  null,
9916
9916
  null,
@@ -9939,18 +9939,12 @@ function extractAttributeOp(unit, op, elements) {
9939
9939
  if (op.expression instanceof Interpolation2) {
9940
9940
  return;
9941
9941
  }
9942
- let extractable = op.expression.isConstant();
9942
+ let extractable = op.isTextAttribute || op.expression.isConstant();
9943
9943
  if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) {
9944
- extractable = isStringLiteral(op.expression);
9945
- if (op.name === "style" || op.name === "class") {
9946
- extractable && (extractable = op.isTextAttribute);
9947
- }
9948
- if (unit.job.kind === CompilationJobKind.Host) {
9949
- extractable && (extractable = op.isTextAttribute);
9950
- }
9944
+ extractable && (extractable = op.isTextAttribute);
9951
9945
  }
9952
9946
  if (extractable) {
9953
- const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
9947
+ const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.namespace, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext);
9954
9948
  if (unit.job.kind === CompilationJobKind.Host) {
9955
9949
  unit.create.push(extractedAttributeOp);
9956
9950
  } else {
@@ -9991,7 +9985,8 @@ function specializeBindings(job) {
9991
9985
  const target = lookupElement2(elements, op.target);
9992
9986
  target.nonBindable = true;
9993
9987
  } else {
9994
- OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
9988
+ const [namespace, name] = splitNsName(op.name);
9989
+ OpList.replace(op, createAttributeOp(op.target, namespace, name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan));
9995
9990
  }
9996
9991
  break;
9997
9992
  case BindingKind.Property:
@@ -10182,9 +10177,9 @@ function collectElementConsts(job) {
10182
10177
  for (const unit of job.units) {
10183
10178
  for (const op of unit.create) {
10184
10179
  if (op.kind === OpKind.ExtractedAttribute) {
10185
- const attributes = allElementAttributes.get(op.target) || new ElementAttributes();
10180
+ const attributes = allElementAttributes.get(op.target) || new ElementAttributes(job.compatibility);
10186
10181
  allElementAttributes.set(op.target, attributes);
10187
- attributes.add(op.bindingKind, op.name, op.expression, op.trustedValueFn);
10182
+ attributes.add(op.bindingKind, op.name, op.expression, op.namespace, op.trustedValueFn);
10188
10183
  OpList.remove(op);
10189
10184
  }
10190
10185
  }
@@ -10217,11 +10212,6 @@ function collectElementConsts(job) {
10217
10212
  }
10218
10213
  var FLYWEIGHT_ARRAY = Object.freeze([]);
10219
10214
  var ElementAttributes = class {
10220
- constructor() {
10221
- this.known = /* @__PURE__ */ new Set();
10222
- this.byKind = /* @__PURE__ */ new Map();
10223
- this.projectAs = null;
10224
- }
10225
10215
  get attributes() {
10226
10216
  var _a2;
10227
10217
  return (_a2 = this.byKind.get(BindingKind.Attribute)) != null ? _a2 : FLYWEIGHT_ARRAY;
@@ -10246,12 +10236,28 @@ var ElementAttributes = class {
10246
10236
  var _a2;
10247
10237
  return (_a2 = this.byKind.get(BindingKind.I18n)) != null ? _a2 : FLYWEIGHT_ARRAY;
10248
10238
  }
10249
- add(kind, name, value, trustedValueFn) {
10239
+ constructor(compatibility) {
10240
+ this.compatibility = compatibility;
10241
+ this.known = /* @__PURE__ */ new Map();
10242
+ this.byKind = /* @__PURE__ */ new Map();
10243
+ this.projectAs = null;
10244
+ }
10245
+ isKnown(kind, name, value) {
10250
10246
  var _a2;
10251
- if (this.known.has(name)) {
10247
+ const nameToValue = (_a2 = this.known.get(kind)) != null ? _a2 : /* @__PURE__ */ new Set();
10248
+ this.known.set(kind, nameToValue);
10249
+ if (nameToValue.has(name)) {
10250
+ return true;
10251
+ }
10252
+ nameToValue.add(name);
10253
+ return false;
10254
+ }
10255
+ add(kind, name, value, namespace, trustedValueFn) {
10256
+ var _a2;
10257
+ const allowDuplicates = this.compatibility === CompatibilityMode.TemplateDefinitionBuilder && (kind === BindingKind.Attribute || kind === BindingKind.ClassName || kind === BindingKind.StyleProperty);
10258
+ if (!allowDuplicates && this.isKnown(kind, name, value)) {
10252
10259
  return;
10253
10260
  }
10254
- this.known.add(name);
10255
10261
  if (name === "ngProjectAs") {
10256
10262
  if (value === null || !(value instanceof LiteralExpr) || value.value == null || typeof ((_a2 = value.value) == null ? void 0 : _a2.toString()) !== "string") {
10257
10263
  throw Error("ngProjectAs must have a string literal value");
@@ -10259,7 +10265,7 @@ var ElementAttributes = class {
10259
10265
  this.projectAs = value.value.toString();
10260
10266
  }
10261
10267
  const array = this.arrayFor(kind);
10262
- array.push(...getAttributeNameLiterals(name));
10268
+ array.push(...getAttributeNameLiterals(namespace, name));
10263
10269
  if (kind === BindingKind.Attribute || kind === BindingKind.StyleProperty) {
10264
10270
  if (value === null) {
10265
10271
  throw Error("Attribute, i18n attribute, & style element attributes must have a value");
@@ -10281,15 +10287,10 @@ var ElementAttributes = class {
10281
10287
  return this.byKind.get(kind);
10282
10288
  }
10283
10289
  };
10284
- function getAttributeNameLiterals(name) {
10285
- const [attributeNamespace, attributeName] = splitNsName(name);
10286
- const nameLiteral = literal(attributeName);
10287
- if (attributeNamespace) {
10288
- return [
10289
- literal(0),
10290
- literal(attributeNamespace),
10291
- nameLiteral
10292
- ];
10290
+ function getAttributeNameLiterals(namespace, name) {
10291
+ const nameLiteral = literal(name);
10292
+ if (namespace) {
10293
+ return [literal(0), literal(namespace), nameLiteral];
10293
10294
  }
10294
10295
  return [nameLiteral];
10295
10296
  }
@@ -10349,7 +10350,7 @@ function convertI18nBindings(job) {
10349
10350
  if (op.expression.i18nPlaceholders.length !== op.expression.expressions.length) {
10350
10351
  throw new Error(`AssertionError: An i18n attribute binding instruction requires the same number of expressions and placeholders, but found ${op.expression.i18nPlaceholders.length} placeholders and ${op.expression.expressions.length} expressions`);
10351
10352
  }
10352
- ops.push(createI18nExpressionOp(op.i18nContext, i18nAttributesForElem.target, i18nAttributesForElem.xref, i18nAttributesForElem.handle, expr, op.expression.i18nPlaceholders[i], I18nParamResolutionTime.Creation, I18nExpressionFor.I18nAttribute, op.name, op.sourceSpan));
10353
+ ops.push(createI18nExpressionOp(op.i18nContext, i18nAttributesForElem.target, i18nAttributesForElem.xref, i18nAttributesForElem.handle, expr, null, op.expression.i18nPlaceholders[i], I18nParamResolutionTime.Creation, I18nExpressionFor.I18nAttribute, op.name, op.sourceSpan));
10353
10354
  }
10354
10355
  OpList.replaceWithMany(op, ops);
10355
10356
  break;
@@ -10380,7 +10381,11 @@ function createDeferDepsFns(job) {
10380
10381
  if (op.handle.slot === null) {
10381
10382
  throw new Error("AssertionError: slot must be assigned bfore extracting defer deps functions");
10382
10383
  }
10383
- op.resolverFn = job.pool.getSharedFunctionReference(depsFnExpr, `${job.componentName}_Defer_${op.handle.slot}_DepsFn`);
10384
+ op.resolverFn = job.pool.getSharedFunctionReference(
10385
+ depsFnExpr,
10386
+ `${job.componentName}_Defer_${op.handle.slot}_DepsFn`,
10387
+ false
10388
+ );
10384
10389
  }
10385
10390
  }
10386
10391
  }
@@ -10388,62 +10393,99 @@ function createDeferDepsFns(job) {
10388
10393
 
10389
10394
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
10390
10395
  function createI18nContexts(job) {
10391
- const rootContexts = /* @__PURE__ */ new Map();
10392
- let currentI18nOp = null;
10393
- let xref;
10394
- const messageToContext = /* @__PURE__ */ new Map();
10396
+ const attrContextByMessage = /* @__PURE__ */ new Map();
10397
+ for (const unit of job.units) {
10398
+ for (const op of unit.ops()) {
10399
+ switch (op.kind) {
10400
+ case OpKind.Binding:
10401
+ case OpKind.Property:
10402
+ case OpKind.Attribute:
10403
+ case OpKind.ExtractedAttribute:
10404
+ if (op.i18nMessage === null) {
10405
+ continue;
10406
+ }
10407
+ if (!attrContextByMessage.has(op.i18nMessage)) {
10408
+ const i18nContext = createI18nContextOp(I18nContextKind.Attr, job.allocateXrefId(), null, op.i18nMessage, null);
10409
+ unit.create.push(i18nContext);
10410
+ attrContextByMessage.set(op.i18nMessage, i18nContext.xref);
10411
+ }
10412
+ op.i18nContext = attrContextByMessage.get(op.i18nMessage);
10413
+ break;
10414
+ }
10415
+ }
10416
+ }
10417
+ const blockContextByI18nBlock = /* @__PURE__ */ new Map();
10395
10418
  for (const unit of job.units) {
10396
10419
  for (const op of unit.create) {
10397
10420
  switch (op.kind) {
10398
10421
  case OpKind.I18nStart:
10399
- currentI18nOp = op;
10400
10422
  if (op.xref === op.root) {
10401
- xref = job.allocateXrefId();
10402
- unit.create.push(createI18nContextOp(I18nContextKind.RootI18n, xref, op.xref, op.message, null));
10403
- op.context = xref;
10404
- rootContexts.set(op.xref, xref);
10423
+ const contextOp = createI18nContextOp(I18nContextKind.RootI18n, job.allocateXrefId(), op.xref, op.message, null);
10424
+ unit.create.push(contextOp);
10425
+ op.context = contextOp.xref;
10426
+ blockContextByI18nBlock.set(op.xref, contextOp);
10405
10427
  }
10406
10428
  break;
10429
+ }
10430
+ }
10431
+ }
10432
+ for (const unit of job.units) {
10433
+ for (const op of unit.create) {
10434
+ if (op.kind === OpKind.I18nStart && op.xref !== op.root) {
10435
+ const rootContext = blockContextByI18nBlock.get(op.root);
10436
+ if (rootContext === void 0) {
10437
+ throw Error("AssertionError: Root i18n block i18n context should have been created.");
10438
+ }
10439
+ op.context = rootContext.xref;
10440
+ blockContextByI18nBlock.set(op.xref, rootContext);
10441
+ }
10442
+ }
10443
+ }
10444
+ let currentI18nOp = null;
10445
+ for (const unit of job.units) {
10446
+ for (const op of unit.create) {
10447
+ switch (op.kind) {
10448
+ case OpKind.I18nStart:
10449
+ currentI18nOp = op;
10450
+ break;
10407
10451
  case OpKind.I18nEnd:
10408
10452
  currentI18nOp = null;
10409
10453
  break;
10410
10454
  case OpKind.IcuStart:
10411
10455
  if (currentI18nOp === null) {
10412
- throw Error("Unexpected ICU outside of an i18n block.");
10456
+ throw Error("AssertionError: Unexpected ICU outside of an i18n block.");
10413
10457
  }
10414
10458
  if (op.message.id !== currentI18nOp.message.id) {
10415
- xref = job.allocateXrefId();
10416
- unit.create.push(createI18nContextOp(I18nContextKind.Icu, xref, currentI18nOp.xref, op.message, null));
10417
- op.context = xref;
10459
+ const contextOp = createI18nContextOp(I18nContextKind.Icu, job.allocateXrefId(), currentI18nOp.xref, op.message, null);
10460
+ unit.create.push(contextOp);
10461
+ op.context = contextOp.xref;
10418
10462
  } else {
10419
10463
  op.context = currentI18nOp.context;
10464
+ blockContextByI18nBlock.get(currentI18nOp.xref).contextKind = I18nContextKind.Icu;
10420
10465
  }
10421
10466
  break;
10422
10467
  }
10423
10468
  }
10424
- for (const op of unit.ops()) {
10425
- switch (op.kind) {
10426
- case OpKind.Binding:
10427
- case OpKind.Property:
10428
- case OpKind.Attribute:
10429
- case OpKind.ExtractedAttribute:
10430
- if (!op.i18nMessage) {
10431
- continue;
10432
- }
10433
- if (!messageToContext.has(op.i18nMessage)) {
10434
- const i18nContext = job.allocateXrefId();
10435
- unit.create.push(createI18nContextOp(I18nContextKind.Attr, i18nContext, null, op.i18nMessage, null));
10436
- messageToContext.set(op.i18nMessage, i18nContext);
10437
- }
10438
- op.i18nContext = messageToContext.get(op.i18nMessage);
10439
- break;
10440
- }
10441
- }
10442
10469
  }
10470
+ }
10471
+
10472
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/deduplicate_text_bindings.mjs
10473
+ function deduplicateTextBindings(job) {
10474
+ const seen = /* @__PURE__ */ new Map();
10443
10475
  for (const unit of job.units) {
10444
- for (const op of unit.create) {
10445
- if (op.kind === OpKind.I18nStart && op.xref !== op.root) {
10446
- op.context = rootContexts.get(op.root);
10476
+ for (const op of unit.update.reversed()) {
10477
+ if (op.kind === OpKind.Binding && op.isTextAttribute) {
10478
+ const seenForElement = seen.get(op.target) || /* @__PURE__ */ new Set();
10479
+ if (seenForElement.has(op.name)) {
10480
+ if (job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) {
10481
+ if (op.name === "style" || op.name === "class") {
10482
+ OpList.remove(op);
10483
+ }
10484
+ } else {
10485
+ }
10486
+ }
10487
+ seenForElement.add(op.name);
10488
+ seen.set(op.target, seenForElement);
10447
10489
  }
10448
10490
  }
10449
10491
  }
@@ -10733,12 +10775,16 @@ var LIST_START_MARKER = "[";
10733
10775
  var LIST_END_MARKER = "]";
10734
10776
  var LIST_DELIMITER = "|";
10735
10777
  function extractI18nMessages(job) {
10736
- const i18nContexts = /* @__PURE__ */ new Map();
10778
+ const i18nMessagesByContext = /* @__PURE__ */ new Map();
10737
10779
  const i18nBlocks = /* @__PURE__ */ new Map();
10780
+ const i18nContexts = /* @__PURE__ */ new Map();
10738
10781
  for (const unit of job.units) {
10739
10782
  for (const op of unit.create) {
10740
10783
  switch (op.kind) {
10741
10784
  case OpKind.I18nContext:
10785
+ const i18nMessageOp = createI18nMessage(job, op);
10786
+ unit.create.push(i18nMessageOp);
10787
+ i18nMessagesByContext.set(op.xref, i18nMessageOp);
10742
10788
  i18nContexts.set(op.xref, op);
10743
10789
  break;
10744
10790
  case OpKind.I18nStart:
@@ -10747,49 +10793,40 @@ function extractI18nMessages(job) {
10747
10793
  }
10748
10794
  }
10749
10795
  }
10750
- for (const unit of job.units) {
10751
- for (const op of unit.create) {
10752
- if (op.kind !== OpKind.I18nContext || op.contextKind !== I18nContextKind.Attr) {
10753
- continue;
10754
- }
10755
- const i18nMessageOp = createI18nMessage(job, op);
10756
- unit.create.push(i18nMessageOp);
10757
- }
10758
- }
10759
- const i18nBlockMessages = /* @__PURE__ */ new Map();
10760
- for (const unit of job.units) {
10761
- for (const op of unit.create) {
10762
- if (op.kind === OpKind.I18nStart && op.xref === op.root) {
10763
- if (!op.context) {
10764
- throw Error("I18n start op should have its context set.");
10765
- }
10766
- const i18nMessageOp = createI18nMessage(job, i18nContexts.get(op.context));
10767
- i18nBlockMessages.set(op.xref, i18nMessageOp);
10768
- unit.create.push(i18nMessageOp);
10769
- }
10770
- }
10771
- }
10796
+ let currentIcu = null;
10772
10797
  for (const unit of job.units) {
10773
10798
  for (const op of unit.create) {
10774
10799
  switch (op.kind) {
10775
10800
  case OpKind.IcuStart:
10776
- if (!op.context) {
10777
- throw Error("ICU op should have its context set.");
10801
+ currentIcu = op;
10802
+ OpList.remove(op);
10803
+ const icuContext = i18nContexts.get(op.context);
10804
+ if (icuContext.contextKind !== I18nContextKind.Icu) {
10805
+ continue;
10778
10806
  }
10779
- const i18nContext = i18nContexts.get(op.context);
10780
- if (i18nContext.contextKind === I18nContextKind.Icu) {
10781
- if (i18nContext.i18nBlock === null) {
10782
- throw Error("ICU context should have its i18n block set.");
10783
- }
10784
- const subMessage = createI18nMessage(job, i18nContext, op.messagePlaceholder);
10785
- unit.create.push(subMessage);
10786
- const rootI18nId = i18nBlocks.get(i18nContext.i18nBlock).root;
10787
- const parentMessage = i18nBlockMessages.get(rootI18nId);
10788
- parentMessage == null ? void 0 : parentMessage.subMessages.push(subMessage.xref);
10807
+ const i18nBlock = i18nBlocks.get(icuContext.i18nBlock);
10808
+ if (i18nBlock.context === icuContext.xref) {
10809
+ continue;
10789
10810
  }
10790
- OpList.remove(op);
10811
+ const rootI18nBlock = i18nBlocks.get(i18nBlock.root);
10812
+ const rootMessage = i18nMessagesByContext.get(rootI18nBlock.context);
10813
+ if (rootMessage === void 0) {
10814
+ throw Error("AssertionError: ICU sub-message should belong to a root message.");
10815
+ }
10816
+ const subMessage = i18nMessagesByContext.get(icuContext.xref);
10817
+ subMessage.messagePlaceholder = op.messagePlaceholder;
10818
+ rootMessage.subMessages.push(subMessage.xref);
10791
10819
  break;
10792
10820
  case OpKind.IcuEnd:
10821
+ currentIcu = null;
10822
+ OpList.remove(op);
10823
+ break;
10824
+ case OpKind.IcuPlaceholder:
10825
+ if (currentIcu === null || currentIcu.context == null) {
10826
+ throw Error("AssertionError: Unexpected ICU placeholder outside of i18n context");
10827
+ }
10828
+ const msg = i18nMessagesByContext.get(currentIcu.context);
10829
+ msg.postprocessingParams.set(op.name, literal(formatIcuPlaceholder(op)));
10793
10830
  OpList.remove(op);
10794
10831
  break;
10795
10832
  }
@@ -10799,14 +10836,16 @@ function extractI18nMessages(job) {
10799
10836
  function createI18nMessage(job, context, messagePlaceholder) {
10800
10837
  let formattedParams = formatParams(context.params);
10801
10838
  const formattedPostprocessingParams = formatParams(context.postprocessingParams);
10802
- let needsPostprocessing = formattedPostprocessingParams.size > 0;
10803
- for (const values of context.params.values()) {
10804
- if (values.length > 1) {
10805
- needsPostprocessing = true;
10806
- }
10807
- }
10839
+ let needsPostprocessing = [...context.params.values()].some((v) => v.length > 1);
10808
10840
  return createI18nMessageOp(job.allocateXrefId(), context.xref, context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formattedParams, formattedPostprocessingParams, needsPostprocessing);
10809
10841
  }
10842
+ function formatIcuPlaceholder(op) {
10843
+ if (op.strings.length !== op.expressionPlaceholders.length + 1) {
10844
+ throw Error(`AsserionError: Invalid ICU placeholder with ${op.strings.length} strings and ${op.expressionPlaceholders.length} expressions`);
10845
+ }
10846
+ const values = op.expressionPlaceholders.map(formatValue);
10847
+ return op.strings.flatMap((str, i) => [str, values[i] || ""]).join("");
10848
+ }
10810
10849
  function formatParams(params) {
10811
10850
  const formattedParams = /* @__PURE__ */ new Map();
10812
10851
  for (const [placeholder, placeholderValues] of params) {
@@ -11033,7 +11072,7 @@ var CLASS_BANG = "class!";
11033
11072
  var BANG_IMPORTANT = "!important";
11034
11073
  function parseHostStyleProperties(job) {
11035
11074
  for (const op of job.root.update) {
11036
- if (op.kind !== OpKind.Binding) {
11075
+ if (!(op.kind === OpKind.Binding && op.bindingKind === BindingKind.Property)) {
11037
11076
  continue;
11038
11077
  }
11039
11078
  if (op.name.endsWith(BANG_IMPORTANT)) {
@@ -11042,7 +11081,7 @@ function parseHostStyleProperties(job) {
11042
11081
  if (op.name.startsWith(STYLE_DOT)) {
11043
11082
  op.bindingKind = BindingKind.StyleProperty;
11044
11083
  op.name = op.name.substring(STYLE_DOT.length);
11045
- if (isCssCustomProperty(op.name)) {
11084
+ if (!isCssCustomProperty(op.name)) {
11046
11085
  op.name = hyphenate(op.name);
11047
11086
  }
11048
11087
  const { property: property2, suffix } = parseProperty(op.name);
@@ -17134,7 +17173,7 @@ function collectMessage(job, fileBasedI18nSuffix, messages, messageOp) {
17134
17173
  const mainVar = variable(job.pool.uniqueName(TRANSLATION_VAR_PREFIX2));
17135
17174
  const closureVar = i18nGenerateClosureVar(job.pool, messageOp.message.id, fileBasedI18nSuffix, job.i18nUseExternalIds);
17136
17175
  let transformFn = void 0;
17137
- if (messageOp.needsPostprocessing) {
17176
+ if (messageOp.needsPostprocessing || messageOp.postprocessingParams.size > 0) {
17138
17177
  const postprocessingParams = Object.fromEntries([...messageOp.postprocessingParams.entries()].sort());
17139
17178
  const formattedPostprocessingParams = formatI18nPlaceholderNamesInMap(postprocessingParams, false);
17140
17179
  const extraTransformFnParams = [];
@@ -17153,7 +17192,6 @@ function addSubMessageParams(messageOp, subMessagePlaceholders) {
17153
17192
  } else {
17154
17193
  messageOp.params.set(placeholder, literal(`${ESCAPE2}${I18N_ICU_MAPPING_PREFIX2}${placeholder}${ESCAPE2}`));
17155
17194
  messageOp.postprocessingParams.set(placeholder, literalArr(subMessages));
17156
- messageOp.needsPostprocessing = true;
17157
17195
  }
17158
17196
  }
17159
17197
  }
@@ -17187,12 +17225,13 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
17187
17225
 
17188
17226
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
17189
17227
  function convertI18nText(job) {
17190
- var _a2;
17228
+ var _a2, _b2, _c2;
17191
17229
  for (const unit of job.units) {
17192
17230
  let currentI18n = null;
17193
17231
  let currentIcu = null;
17194
17232
  const textNodeI18nBlocks = /* @__PURE__ */ new Map();
17195
17233
  const textNodeIcus = /* @__PURE__ */ new Map();
17234
+ const icuPlaceholderByText = /* @__PURE__ */ new Map();
17196
17235
  for (const op of unit.create) {
17197
17236
  switch (op.kind) {
17198
17237
  case OpKind.I18nStart:
@@ -17217,7 +17256,13 @@ function convertI18nText(job) {
17217
17256
  if (currentI18n !== null) {
17218
17257
  textNodeI18nBlocks.set(op.xref, currentI18n);
17219
17258
  textNodeIcus.set(op.xref, currentIcu);
17220
- OpList.remove(op);
17259
+ if (op.icuPlaceholder !== null) {
17260
+ const icuPlaceholderOp = createIcuPlaceholderOp(job.allocateXrefId(), op.icuPlaceholder, [op.initialValue]);
17261
+ OpList.replace(op, icuPlaceholderOp);
17262
+ icuPlaceholderByText.set(op.xref, icuPlaceholderOp);
17263
+ } else {
17264
+ OpList.remove(op);
17265
+ }
17221
17266
  }
17222
17267
  break;
17223
17268
  }
@@ -17230,14 +17275,18 @@ function convertI18nText(job) {
17230
17275
  }
17231
17276
  const i18nOp = textNodeI18nBlocks.get(op.target);
17232
17277
  const icuOp = textNodeIcus.get(op.target);
17278
+ const icuPlaceholder = icuPlaceholderByText.get(op.target);
17233
17279
  const contextId = icuOp ? icuOp.context : i18nOp.context;
17234
17280
  const resolutionTime = icuOp ? I18nParamResolutionTime.Postproccessing : I18nParamResolutionTime.Creation;
17235
17281
  const ops = [];
17236
17282
  for (let i = 0; i < op.interpolation.expressions.length; i++) {
17237
17283
  const expr = op.interpolation.expressions[i];
17238
- ops.push(createI18nExpressionOp(contextId, i18nOp.xref, i18nOp.xref, i18nOp.handle, expr, op.interpolation.i18nPlaceholders[i], resolutionTime, I18nExpressionFor.I18nText, "", (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
17284
+ ops.push(createI18nExpressionOp(contextId, i18nOp.xref, i18nOp.xref, i18nOp.handle, expr, (_a2 = icuPlaceholder == null ? void 0 : icuPlaceholder.xref) != null ? _a2 : null, (_b2 = op.interpolation.i18nPlaceholders[i]) != null ? _b2 : null, resolutionTime, I18nExpressionFor.I18nText, "", (_c2 = expr.sourceSpan) != null ? _c2 : op.sourceSpan));
17239
17285
  }
17240
17286
  OpList.replaceWithMany(op, ops);
17287
+ if (icuPlaceholder !== void 0) {
17288
+ icuPlaceholder.strings = op.interpolation.strings;
17289
+ }
17241
17290
  break;
17242
17291
  }
17243
17292
  }
@@ -17651,19 +17700,31 @@ function keepLast(ops) {
17651
17700
 
17652
17701
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
17653
17702
  function parseExtractedStyles(job) {
17703
+ const elements = /* @__PURE__ */ new Map();
17704
+ for (const unit of job.units) {
17705
+ for (const op of unit.create) {
17706
+ if (isElementOrContainerOp(op)) {
17707
+ elements.set(op.xref, op);
17708
+ }
17709
+ }
17710
+ }
17654
17711
  for (const unit of job.units) {
17655
17712
  for (const op of unit.create) {
17656
17713
  if (op.kind === OpKind.ExtractedAttribute && op.bindingKind === BindingKind.Attribute && isStringLiteral(op.expression)) {
17714
+ const target = elements.get(op.target);
17715
+ if (target !== void 0 && target.kind === OpKind.Template && target.templateKind === TemplateKind.Structural) {
17716
+ continue;
17717
+ }
17657
17718
  if (op.name === "style") {
17658
17719
  const parsedStyles = parse(op.expression.value);
17659
17720
  for (let i = 0; i < parsedStyles.length - 1; i += 2) {
17660
- OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
17721
+ OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, null, parsedStyles[i], literal(parsedStyles[i + 1]), null, null, SecurityContext.STYLE), op);
17661
17722
  }
17662
17723
  OpList.remove(op);
17663
17724
  } else if (op.name === "class") {
17664
17725
  const parsedClasses = op.expression.value.trim().split(/\s+/g);
17665
17726
  for (const parsedClass of parsedClasses) {
17666
- OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null, null, SecurityContext.NONE), op);
17727
+ OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, null, parsedClass, null, null, null, SecurityContext.NONE), op);
17667
17728
  }
17668
17729
  OpList.remove(op);
17669
17730
  }
@@ -17993,9 +18054,7 @@ function namespaceMath() {
17993
18054
  return call(Identifiers.namespaceMathML, [], null);
17994
18055
  }
17995
18056
  function advance(delta, sourceSpan) {
17996
- return call(Identifiers.advance, [
17997
- literal(delta)
17998
- ], sourceSpan);
18057
+ return call(Identifiers.advance, delta > 1 ? [literal(delta)] : [], sourceSpan);
17999
18058
  }
18000
18059
  function reference(slot) {
18001
18060
  return importExpr(Identifiers.reference).callFn([
@@ -18133,10 +18192,13 @@ function property(name, expression, sanitizer, sourceSpan) {
18133
18192
  }
18134
18193
  return call(Identifiers.property, args, sourceSpan);
18135
18194
  }
18136
- function attribute(name, expression, sanitizer) {
18195
+ function attribute(name, expression, sanitizer, namespace) {
18137
18196
  const args = [literal(name), expression];
18138
- if (sanitizer !== null) {
18139
- args.push(sanitizer);
18197
+ if (sanitizer !== null || namespace !== null) {
18198
+ args.push(sanitizer != null ? sanitizer : literal(null));
18199
+ }
18200
+ if (namespace !== null) {
18201
+ args.push(literal(namespace));
18140
18202
  }
18141
18203
  return call(Identifiers.attribute, args, null);
18142
18204
  }
@@ -18447,19 +18509,19 @@ function reifyCreateOperations(unit, ops) {
18447
18509
  OpList.replace(op, text(op.handle.slot, op.initialValue, op.sourceSpan));
18448
18510
  break;
18449
18511
  case OpKind.ElementStart:
18450
- OpList.replace(op, elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.sourceSpan));
18512
+ OpList.replace(op, elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.startSourceSpan));
18451
18513
  break;
18452
18514
  case OpKind.Element:
18453
- OpList.replace(op, element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.sourceSpan));
18515
+ OpList.replace(op, element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.wholeSourceSpan));
18454
18516
  break;
18455
18517
  case OpKind.ElementEnd:
18456
18518
  OpList.replace(op, elementEnd(op.sourceSpan));
18457
18519
  break;
18458
18520
  case OpKind.ContainerStart:
18459
- OpList.replace(op, elementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.sourceSpan));
18521
+ OpList.replace(op, elementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.startSourceSpan));
18460
18522
  break;
18461
18523
  case OpKind.Container:
18462
- OpList.replace(op, elementContainer(op.handle.slot, op.attributes, op.localRefs, op.sourceSpan));
18524
+ OpList.replace(op, elementContainer(op.handle.slot, op.attributes, op.localRefs, op.wholeSourceSpan));
18463
18525
  break;
18464
18526
  case OpKind.ContainerEnd:
18465
18527
  OpList.replace(op, elementContainerEnd());
@@ -18487,7 +18549,7 @@ function reifyCreateOperations(unit, ops) {
18487
18549
  throw new Error(`AssertionError: local refs array should have been extracted into a constant`);
18488
18550
  }
18489
18551
  const childView = unit.job.views.get(op.xref);
18490
- OpList.replace(op, template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.sourceSpan));
18552
+ OpList.replace(op, template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.localRefs, op.startSourceSpan));
18491
18553
  break;
18492
18554
  case OpKind.DisableBindings:
18493
18555
  OpList.replace(op, disableBindings2());
@@ -18502,7 +18564,7 @@ function reifyCreateOperations(unit, ops) {
18502
18564
  const listenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);
18503
18565
  const eventTargetResolver = op.eventTarget ? GLOBAL_TARGET_RESOLVERS.get(op.eventTarget) : null;
18504
18566
  if (eventTargetResolver === void 0) {
18505
- throw new Error(`AssertionError: unknown event target ${op.eventTarget}`);
18567
+ throw new Error(`Unexpected global target '${op.eventTarget}' defined for '${op.name}' event. Supported list of global targets: window,document,body.`);
18506
18568
  }
18507
18569
  OpList.replace(op, listener(op.name, listenerFn, eventTargetResolver, op.hostListener && op.isAnimationListener, op.sourceSpan));
18508
18570
  break;
@@ -18589,7 +18651,7 @@ function reifyCreateOperations(unit, ops) {
18589
18651
  emptyDecls = emptyView.decls;
18590
18652
  emptyVars = emptyView.vars;
18591
18653
  }
18592
- OpList.replace(op, repeaterCreate(op.handle.slot, repeaterView.fnName, op.decls, op.vars, op.tag, op.attributes, op.trackByFn, op.usesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, op.sourceSpan));
18654
+ OpList.replace(op, repeaterCreate(op.handle.slot, repeaterView.fnName, op.decls, op.vars, op.tag, op.attributes, op.trackByFn, op.usesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, op.wholeSourceSpan));
18593
18655
  break;
18594
18656
  case OpKind.Statement:
18595
18657
  break;
@@ -18649,7 +18711,7 @@ function reifyUpdateOperations(_unit, ops) {
18649
18711
  if (op.expression instanceof Interpolation2) {
18650
18712
  OpList.replace(op, attributeInterpolate(op.name, op.expression.strings, op.expression.expressions, op.sanitizer, op.sourceSpan));
18651
18713
  } else {
18652
- OpList.replace(op, attribute(op.name, op.expression, op.sanitizer));
18714
+ OpList.replace(op, attribute(op.name, op.expression, op.sanitizer, op.namespace));
18653
18715
  }
18654
18716
  break;
18655
18717
  case OpKind.HostProperty:
@@ -18818,38 +18880,6 @@ function removeUnusedI18nAttributesOps(job) {
18818
18880
  }
18819
18881
  }
18820
18882
 
18821
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
18822
- function generateRepeaterDerivedVars(job) {
18823
- const repeaters = /* @__PURE__ */ new Map();
18824
- for (const unit of job.units) {
18825
- for (const op of unit.ops()) {
18826
- if (op.kind === OpKind.RepeaterCreate) {
18827
- repeaters.set(op.xref, op);
18828
- }
18829
- }
18830
- }
18831
- for (const unit of job.units) {
18832
- for (const op of unit.ops()) {
18833
- transformExpressionsInOp(op, (expr) => {
18834
- if (!(expr instanceof DerivedRepeaterVarExpr)) {
18835
- return expr;
18836
- }
18837
- const repeaterOp = repeaters.get(expr.xref);
18838
- switch (expr.identity) {
18839
- case DerivedRepeaterVarIdentity.First:
18840
- return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), literal(0));
18841
- case DerivedRepeaterVarIdentity.Last:
18842
- return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), new BinaryOperatorExpr(BinaryOperator.Minus, new LexicalReadExpr(repeaterOp.varNames.$count), literal(1)));
18843
- case DerivedRepeaterVarIdentity.Even:
18844
- return new BinaryOperatorExpr(BinaryOperator.Identical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
18845
- case DerivedRepeaterVarIdentity.Odd:
18846
- return new BinaryOperatorExpr(BinaryOperator.NotIdentical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
18847
- }
18848
- }, VisitorContextFlag.None);
18849
- }
18850
- }
18851
- }
18852
-
18853
18883
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
18854
18884
  function resolveContexts(job) {
18855
18885
  for (const unit of job.units) {
@@ -19096,6 +19126,7 @@ function resolveI18nExpressionPlaceholders(job) {
19096
19126
  var _a2;
19097
19127
  const subTemplateIndicies = /* @__PURE__ */ new Map();
19098
19128
  const i18nContexts = /* @__PURE__ */ new Map();
19129
+ const icuPlaceholders = /* @__PURE__ */ new Map();
19099
19130
  for (const unit of job.units) {
19100
19131
  for (const op of unit.create) {
19101
19132
  switch (op.kind) {
@@ -19105,6 +19136,9 @@ function resolveI18nExpressionPlaceholders(job) {
19105
19136
  case OpKind.I18nContext:
19106
19137
  i18nContexts.set(op.xref, op);
19107
19138
  break;
19139
+ case OpKind.IcuPlaceholder:
19140
+ icuPlaceholders.set(op.xref, op);
19141
+ break;
19108
19142
  }
19109
19143
  }
19110
19144
  }
@@ -19113,66 +19147,32 @@ function resolveI18nExpressionPlaceholders(job) {
19113
19147
  for (const unit of job.units) {
19114
19148
  for (const op of unit.update) {
19115
19149
  if (op.kind === OpKind.I18nExpression) {
19116
- const i18nContext = i18nContexts.get(op.context);
19117
19150
  const index = expressionIndices.get(referenceIndex(op)) || 0;
19118
19151
  const subTemplateIndex = (_a2 = subTemplateIndicies.get(op.i18nOwner)) != null ? _a2 : null;
19119
- const params = op.resolutionTime === I18nParamResolutionTime.Creation ? i18nContext.params : i18nContext.postprocessingParams;
19120
- const values = params.get(op.i18nPlaceholder) || [];
19121
- values.push({
19152
+ const value = {
19122
19153
  value: index,
19123
19154
  subTemplateIndex,
19124
19155
  flags: I18nParamValueFlags.ExpressionIndex
19125
- });
19126
- params.set(op.i18nPlaceholder, values);
19156
+ };
19157
+ updatePlaceholder(op, value, i18nContexts, icuPlaceholders);
19127
19158
  expressionIndices.set(referenceIndex(op), index + 1);
19128
19159
  }
19129
19160
  }
19130
19161
  }
19131
19162
  }
19132
-
19133
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_icu_placeholders.mjs
19134
- function resolveI18nIcuPlaceholders(job) {
19135
- for (const unit of job.units) {
19136
- for (const op of unit.create) {
19137
- if (op.kind === OpKind.I18nContext && op.contextKind === I18nContextKind.Icu) {
19138
- for (const node of op.message.nodes) {
19139
- node.visit(new ResolveIcuPlaceholdersVisitor(op.postprocessingParams));
19140
- }
19141
- }
19142
- }
19143
- }
19144
- }
19145
- var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
19146
- constructor(params) {
19147
- super();
19148
- this.params = params;
19163
+ function updatePlaceholder(op, value, i18nContexts, icuPlaceholders) {
19164
+ if (op.i18nPlaceholder !== null) {
19165
+ const i18nContext = i18nContexts.get(op.context);
19166
+ const params = op.resolutionTime === I18nParamResolutionTime.Creation ? i18nContext.params : i18nContext.postprocessingParams;
19167
+ const values = params.get(op.i18nPlaceholder) || [];
19168
+ values.push(value);
19169
+ params.set(op.i18nPlaceholder, values);
19149
19170
  }
19150
- visitContainerPlaceholder(placeholder) {
19151
- var _a2, _b2;
19152
- if (placeholder.startName && placeholder.startSourceSpan && !this.params.has(placeholder.startName)) {
19153
- this.params.set(placeholder.startName, [{
19154
- value: (_a2 = placeholder.startSourceSpan) == null ? void 0 : _a2.toString(),
19155
- subTemplateIndex: null,
19156
- flags: I18nParamValueFlags.None
19157
- }]);
19158
- }
19159
- if (placeholder.closeName && placeholder.endSourceSpan && !this.params.has(placeholder.closeName)) {
19160
- this.params.set(placeholder.closeName, [{
19161
- value: (_b2 = placeholder.endSourceSpan) == null ? void 0 : _b2.toString(),
19162
- subTemplateIndex: null,
19163
- flags: I18nParamValueFlags.None
19164
- }]);
19165
- }
19171
+ if (op.icuPlaceholder !== null) {
19172
+ const icuPlaceholderOp = icuPlaceholders.get(op.icuPlaceholder);
19173
+ icuPlaceholderOp == null ? void 0 : icuPlaceholderOp.expressionPlaceholders.push(value);
19166
19174
  }
19167
- visitTagPlaceholder(placeholder) {
19168
- super.visitTagPlaceholder(placeholder);
19169
- this.visitContainerPlaceholder(placeholder);
19170
- }
19171
- visitBlockPlaceholder(placeholder) {
19172
- super.visitBlockPlaceholder(placeholder);
19173
- this.visitContainerPlaceholder(placeholder);
19174
- }
19175
- };
19175
+ }
19176
19176
 
19177
19177
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
19178
19178
  function resolveNames(job) {
@@ -19642,7 +19642,10 @@ function varsUsedByOp(op) {
19642
19642
  return op.interpolation.expressions.length;
19643
19643
  case OpKind.I18nExpression:
19644
19644
  case OpKind.Conditional:
19645
+ case OpKind.DeferWhen:
19645
19646
  return 1;
19647
+ case OpKind.RepeaterCreate:
19648
+ return op.emptyView ? 1 : 0;
19646
19649
  default:
19647
19650
  throw new Error(`Unhandled op: ${OpKind[op.kind]}`);
19648
19651
  }
@@ -19956,6 +19959,7 @@ var phases = [
19956
19959
  { kind: CompilationJobKind.Tmpl, fn: emitNamespaceChanges },
19957
19960
  { kind: CompilationJobKind.Tmpl, fn: propagateI18nBlocks },
19958
19961
  { kind: CompilationJobKind.Tmpl, fn: wrapI18nIcus },
19962
+ { kind: CompilationJobKind.Both, fn: deduplicateTextBindings },
19959
19963
  { kind: CompilationJobKind.Both, fn: specializeStyleBindings },
19960
19964
  { kind: CompilationJobKind.Both, fn: specializeBindings },
19961
19965
  { kind: CompilationJobKind.Both, fn: extractAttributes },
@@ -19979,7 +19983,6 @@ var phases = [
19979
19983
  { kind: CompilationJobKind.Tmpl, fn: saveAndRestoreView },
19980
19984
  { kind: CompilationJobKind.Both, fn: deleteAnyCasts },
19981
19985
  { kind: CompilationJobKind.Both, fn: resolveDollarEvent },
19982
- { kind: CompilationJobKind.Tmpl, fn: generateRepeaterDerivedVars },
19983
19986
  { kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },
19984
19987
  { kind: CompilationJobKind.Both, fn: resolveNames },
19985
19988
  { kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },
@@ -19994,7 +19997,6 @@ var phases = [
19994
19997
  { kind: CompilationJobKind.Tmpl, fn: createDeferDepsFns },
19995
19998
  { kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
19996
19999
  { kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
19997
- { kind: CompilationJobKind.Tmpl, fn: resolveI18nIcuPlaceholders },
19998
20000
  { kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
19999
20001
  { kind: CompilationJobKind.Tmpl, fn: generateTrackFns },
20000
20002
  { kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
@@ -20137,7 +20139,7 @@ function ingestHostBinding(input, bindingParser, constantPool) {
20137
20139
  bindingKind = BindingKind.Animation;
20138
20140
  }
20139
20141
  const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, property2.name, bindingKind === BindingKind.Attribute).filter((context) => context !== SecurityContext.NONE);
20140
- ingestHostProperty(job, property2, bindingKind, false, securityContexts);
20142
+ ingestHostProperty(job, property2, bindingKind, securityContexts);
20141
20143
  }
20142
20144
  for (const [name, expr] of (_b2 = Object.entries(input.attributes)) != null ? _b2 : []) {
20143
20145
  const securityContexts = bindingParser.calcPossibleSecurityContexts(input.componentSelector, name, true).filter((context) => context !== SecurityContext.NONE);
@@ -20148,7 +20150,7 @@ function ingestHostBinding(input, bindingParser, constantPool) {
20148
20150
  }
20149
20151
  return job;
20150
20152
  }
20151
- function ingestHostProperty(job, property2, bindingKind, isTextAttribute, securityContexts) {
20153
+ function ingestHostProperty(job, property2, bindingKind, securityContexts) {
20152
20154
  let expression;
20153
20155
  const ast = property2.expression.ast;
20154
20156
  if (ast instanceof Interpolation) {
@@ -20156,7 +20158,7 @@ function ingestHostProperty(job, property2, bindingKind, isTextAttribute, securi
20156
20158
  } else {
20157
20159
  expression = convertAst(ast, job, property2.sourceSpan);
20158
20160
  }
20159
- job.root.update.push(createBindingOp(job.root.xref, bindingKind, property2.name, expression, null, securityContexts, isTextAttribute, false, null, null, property2.sourceSpan));
20161
+ job.root.update.push(createBindingOp(job.root.xref, bindingKind, property2.name, expression, null, securityContexts, false, false, null, null, property2.sourceSpan));
20160
20162
  }
20161
20163
  function ingestHostAttribute(job, name, value, securityContexts) {
20162
20164
  const attrBinding = createBindingOp(
@@ -20170,14 +20172,13 @@ function ingestHostAttribute(job, name, value, securityContexts) {
20170
20172
  false,
20171
20173
  null,
20172
20174
  null,
20173
- null
20175
+ value.sourceSpan
20174
20176
  );
20175
20177
  job.root.update.push(attrBinding);
20176
20178
  }
20177
20179
  function ingestHostEvent(job, event) {
20178
20180
  const [phase, target] = event.type === 0 ? [null, event.targetOrPhase] : [event.targetOrPhase, null];
20179
- const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, [], phase, target, true, event.sourceSpan);
20180
- eventBinding.handlerOps.push(createStatementOp(new ReturnStatement(convertAst(event.handler.ast, job, event.sourceSpan), event.handlerSpan)));
20181
+ const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, makeListenerHandlerOps(job.root, event.handler, event.handlerSpan), phase, target, true, event.sourceSpan);
20181
20182
  job.root.create.push(eventBinding);
20182
20183
  }
20183
20184
  function ingestNodes(unit, template2) {
@@ -20189,9 +20190,9 @@ function ingestNodes(unit, template2) {
20189
20190
  } else if (node instanceof Content) {
20190
20191
  ingestContent(unit, node);
20191
20192
  } else if (node instanceof Text) {
20192
- ingestText(unit, node);
20193
+ ingestText(unit, node, null);
20193
20194
  } else if (node instanceof BoundText) {
20194
- ingestBoundText(unit, node);
20195
+ ingestBoundText(unit, node, null);
20195
20196
  } else if (node instanceof IfBlock) {
20196
20197
  ingestIfBlock(unit, node);
20197
20198
  } else if (node instanceof SwitchBlock) {
@@ -20214,7 +20215,7 @@ function ingestElement(unit, element2) {
20214
20215
  }
20215
20216
  const id = unit.job.allocateXrefId();
20216
20217
  const [namespaceKey, elementName] = splitNsName(element2.name);
20217
- const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element2.i18n instanceof TagPlaceholder ? element2.i18n : void 0, element2.startSourceSpan);
20218
+ const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element2.i18n instanceof TagPlaceholder ? element2.i18n : void 0, element2.startSourceSpan, element2.sourceSpan);
20218
20219
  unit.create.push(startOp);
20219
20220
  ingestElementBindings(unit, startOp, element2);
20220
20221
  ingestReferences(startOp, element2);
@@ -20244,7 +20245,7 @@ function ingestTemplate(unit, tmpl) {
20244
20245
  const namespace = namespaceForKey(namespacePrefix);
20245
20246
  const functionNameSuffix = tagNameWithoutNamespace === null ? "" : prefixWithNamespace(tagNameWithoutNamespace, namespace);
20246
20247
  const templateKind = isPlainTemplate(tmpl) ? TemplateKind.NgTemplate : TemplateKind.Structural;
20247
- const templateOp = createTemplateOp(childView.xref, templateKind, tagNameWithoutNamespace, functionNameSuffix, namespace, i18nPlaceholder, tmpl.startSourceSpan);
20248
+ const templateOp = createTemplateOp(childView.xref, templateKind, tagNameWithoutNamespace, functionNameSuffix, namespace, i18nPlaceholder, tmpl.startSourceSpan, tmpl.sourceSpan);
20248
20249
  unit.create.push(templateOp);
20249
20250
  ingestTemplateBindings(unit, templateOp, tmpl, templateKind);
20250
20251
  ingestReferences(templateOp, tmpl);
@@ -20270,10 +20271,10 @@ function ingestContent(unit, content) {
20270
20271
  }
20271
20272
  unit.create.push(op);
20272
20273
  }
20273
- function ingestText(unit, text2) {
20274
- unit.create.push(createTextOp(unit.job.allocateXrefId(), text2.value, text2.sourceSpan));
20274
+ function ingestText(unit, text2, icuPlaceholder) {
20275
+ unit.create.push(createTextOp(unit.job.allocateXrefId(), text2.value, icuPlaceholder, text2.sourceSpan));
20275
20276
  }
20276
- function ingestBoundText(unit, text2, i18nPlaceholders) {
20277
+ function ingestBoundText(unit, text2, icuPlaceholder) {
20277
20278
  var _a2;
20278
20279
  let value = text2.value;
20279
20280
  if (value instanceof ASTWithSource) {
@@ -20285,14 +20286,12 @@ function ingestBoundText(unit, text2, i18nPlaceholders) {
20285
20286
  if (text2.i18n !== void 0 && !(text2.i18n instanceof Container)) {
20286
20287
  throw Error(`Unhandled i18n metadata type for text interpolation: ${(_a2 = text2.i18n) == null ? void 0 : _a2.constructor.name}`);
20287
20288
  }
20288
- if (i18nPlaceholders === void 0) {
20289
- i18nPlaceholders = text2.i18n instanceof Container ? text2.i18n.children.filter((node) => node instanceof Placeholder).map((placeholder) => placeholder.name) : [];
20290
- }
20289
+ const i18nPlaceholders = text2.i18n instanceof Container ? text2.i18n.children.filter((node) => node instanceof Placeholder).map((placeholder) => placeholder.name) : [];
20291
20290
  if (i18nPlaceholders.length > 0 && i18nPlaceholders.length !== value.expressions.length) {
20292
20291
  throw Error(`Unexpected number of i18n placeholders (${value.expressions.length}) for BoundText with ${value.expressions.length} expressions`);
20293
20292
  }
20294
20293
  const textXref = unit.job.allocateXrefId();
20295
- unit.create.push(createTextOp(textXref, "", text2.sourceSpan));
20294
+ unit.create.push(createTextOp(textXref, "", icuPlaceholder, text2.sourceSpan));
20296
20295
  const baseSourceSpan = unit.job.compatibility ? null : text2.sourceSpan;
20297
20296
  unit.update.push(createInterpolateTextOp(textXref, new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, unit.job, baseSourceSpan)), i18nPlaceholders), text2.sourceSpan));
20298
20297
  }
@@ -20318,7 +20317,7 @@ function ingestIfBlock(unit, ifBlock) {
20318
20317
  }
20319
20318
  ifCaseI18nMeta = ifCase.i18n;
20320
20319
  }
20321
- const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, tagName, "Conditional", Namespace.HTML, ifCaseI18nMeta, ifCase.sourceSpan);
20320
+ const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, tagName, "Conditional", Namespace.HTML, ifCaseI18nMeta, ifCase.startSourceSpan, ifCase.sourceSpan);
20322
20321
  unit.create.push(templateOp);
20323
20322
  if (firstXref === null) {
20324
20323
  firstXref = cView.xref;
@@ -20334,6 +20333,9 @@ function ingestIfBlock(unit, ifBlock) {
20334
20333
  }
20335
20334
  function ingestSwitchBlock(unit, switchBlock) {
20336
20335
  var _a2;
20336
+ if (switchBlock.cases.length === 0) {
20337
+ return;
20338
+ }
20337
20339
  let firstXref = null;
20338
20340
  let firstSlotHandle = null;
20339
20341
  let conditions = [];
@@ -20346,7 +20348,7 @@ function ingestSwitchBlock(unit, switchBlock) {
20346
20348
  }
20347
20349
  switchCaseI18nMeta = switchCase.i18n;
20348
20350
  }
20349
- const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, null, "Case", Namespace.HTML, switchCaseI18nMeta, switchCase.sourceSpan);
20351
+ const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, null, "Case", Namespace.HTML, switchCaseI18nMeta, switchCase.startSourceSpan, switchCase.sourceSpan);
20350
20352
  unit.create.push(templateOp);
20351
20353
  if (firstXref === null) {
20352
20354
  firstXref = cView.xref;
@@ -20369,7 +20371,7 @@ function ingestDeferView(unit, suffix, i18nMeta, children, sourceSpan) {
20369
20371
  }
20370
20372
  const secondaryView = unit.job.allocateView(unit.xref);
20371
20373
  ingestNodes(secondaryView, children);
20372
- const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML, i18nMeta, sourceSpan);
20374
+ const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML, i18nMeta, sourceSpan, sourceSpan);
20373
20375
  unit.create.push(templateOp);
20374
20376
  return templateOp;
20375
20377
  }
@@ -20443,6 +20445,9 @@ function ingestDeferBlock(unit, deferBlock) {
20443
20445
  deferOnOps.push(deferOnOp);
20444
20446
  }
20445
20447
  if (triggers.when !== void 0) {
20448
+ if (triggers.when.value instanceof Interpolation) {
20449
+ throw new Error(`Unexpected interpolation in defer block when trigger`);
20450
+ }
20446
20451
  const deferOnOp = createDeferWhenOp(deferXref, convertAst(triggers.when.value, unit.job, triggers.when.sourceSpan), prefetch, triggers.when.sourceSpan);
20447
20452
  deferWhenOps.push(deferOnOp);
20448
20453
  }
@@ -20462,9 +20467,9 @@ function ingestIcu(unit, icu) {
20462
20467
  unit.create.push(createIcuStartOp(xref, icu.i18n, icuFromI18nMessage(icu.i18n).name, null));
20463
20468
  for (const [placeholder, text2] of Object.entries(__spreadValues(__spreadValues({}, icu.vars), icu.placeholders))) {
20464
20469
  if (text2 instanceof BoundText) {
20465
- ingestBoundText(unit, text2, [placeholder]);
20470
+ ingestBoundText(unit, text2, placeholder);
20466
20471
  } else {
20467
- ingestText(unit, text2);
20472
+ ingestText(unit, text2, placeholder);
20468
20473
  }
20469
20474
  }
20470
20475
  unit.create.push(createIcuEndOp(xref));
@@ -20475,21 +20480,37 @@ function ingestIcu(unit, icu) {
20475
20480
  function ingestForBlock(unit, forBlock) {
20476
20481
  var _a2, _b2, _c2;
20477
20482
  const repeaterView = unit.job.allocateView(unit.xref);
20478
- const createRepeaterAlias = (ident, repeaterVar) => {
20479
- repeaterView.aliases.add({
20480
- kind: SemanticVariableKind.Alias,
20481
- name: null,
20482
- identifier: ident,
20483
- expression: new DerivedRepeaterVarExpr(repeaterView.xref, repeaterVar)
20484
- });
20485
- };
20486
20483
  repeaterView.contextVariables.set(forBlock.item.name, forBlock.item.value);
20487
20484
  repeaterView.contextVariables.set(forBlock.contextVariables.$index.name, forBlock.contextVariables.$index.value);
20488
20485
  repeaterView.contextVariables.set(forBlock.contextVariables.$count.name, forBlock.contextVariables.$count.value);
20489
- createRepeaterAlias(forBlock.contextVariables.$first.name, DerivedRepeaterVarIdentity.First);
20490
- createRepeaterAlias(forBlock.contextVariables.$last.name, DerivedRepeaterVarIdentity.Last);
20491
- createRepeaterAlias(forBlock.contextVariables.$even.name, DerivedRepeaterVarIdentity.Even);
20492
- createRepeaterAlias(forBlock.contextVariables.$odd.name, DerivedRepeaterVarIdentity.Odd);
20486
+ const indexName = `\u0275${forBlock.contextVariables.$index.name}_${repeaterView.xref}`;
20487
+ const countName = `\u0275${forBlock.contextVariables.$count.name}_${repeaterView.xref}`;
20488
+ repeaterView.contextVariables.set(indexName, forBlock.contextVariables.$index.value);
20489
+ repeaterView.contextVariables.set(countName, forBlock.contextVariables.$count.value);
20490
+ repeaterView.aliases.add({
20491
+ kind: SemanticVariableKind.Alias,
20492
+ name: null,
20493
+ identifier: forBlock.contextVariables.$first.name,
20494
+ expression: new LexicalReadExpr(indexName).identical(literal(0))
20495
+ });
20496
+ repeaterView.aliases.add({
20497
+ kind: SemanticVariableKind.Alias,
20498
+ name: null,
20499
+ identifier: forBlock.contextVariables.$last.name,
20500
+ expression: new LexicalReadExpr(indexName).identical(new LexicalReadExpr(countName).minus(literal(1)))
20501
+ });
20502
+ repeaterView.aliases.add({
20503
+ kind: SemanticVariableKind.Alias,
20504
+ name: null,
20505
+ identifier: forBlock.contextVariables.$even.name,
20506
+ expression: new LexicalReadExpr(indexName).modulo(literal(2)).identical(literal(0))
20507
+ });
20508
+ repeaterView.aliases.add({
20509
+ kind: SemanticVariableKind.Alias,
20510
+ name: null,
20511
+ identifier: forBlock.contextVariables.$odd.name,
20512
+ expression: new LexicalReadExpr(indexName).modulo(literal(2)).notIdentical(literal(0))
20513
+ });
20493
20514
  const sourceSpan = convertSourceSpan(forBlock.trackBy.span, forBlock.sourceSpan);
20494
20515
  const track = convertAst(forBlock.trackBy, unit.job, sourceSpan);
20495
20516
  ingestNodes(repeaterView, forBlock.children);
@@ -20516,7 +20537,7 @@ function ingestForBlock(unit, forBlock) {
20516
20537
  const i18nPlaceholder = forBlock.i18n;
20517
20538
  const emptyI18nPlaceholder = (_b2 = forBlock.empty) == null ? void 0 : _b2.i18n;
20518
20539
  const tagName = ingestControlFlowInsertionPoint(unit, repeaterView.xref, forBlock);
20519
- const repeaterCreate2 = createRepeaterCreateOp(repeaterView.xref, (_c2 = emptyView == null ? void 0 : emptyView.xref) != null ? _c2 : null, tagName, track, varNames, i18nPlaceholder, emptyI18nPlaceholder, forBlock.sourceSpan);
20540
+ const repeaterCreate2 = createRepeaterCreateOp(repeaterView.xref, (_c2 = emptyView == null ? void 0 : emptyView.xref) != null ? _c2 : null, tagName, track, varNames, i18nPlaceholder, emptyI18nPlaceholder, forBlock.startSourceSpan, forBlock.sourceSpan);
20520
20541
  unit.create.push(repeaterCreate2);
20521
20542
  const expression = convertAst(forBlock.expression, unit.job, convertSourceSpan(forBlock.expression.span, forBlock.sourceSpan));
20522
20543
  const repeater2 = createRepeaterOp(repeaterCreate2.xref, repeaterCreate2.handle, expression, forBlock.sourceSpan);
@@ -20604,13 +20625,13 @@ function convertAst(ast, job, baseSourceSpan) {
20604
20625
  throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan == null ? void 0 : baseSourceSpan.start.file.url}"`);
20605
20626
  }
20606
20627
  }
20607
- function convertAstWithInterpolation(job, value, i18nMeta) {
20628
+ function convertAstWithInterpolation(job, value, i18nMeta, sourceSpan) {
20608
20629
  var _a2, _b2;
20609
20630
  let expression;
20610
20631
  if (value instanceof Interpolation) {
20611
- expression = new Interpolation2(value.strings, value.expressions.map((e) => convertAst(e, job, null)), Object.keys((_b2 = (_a2 = asMessage(i18nMeta)) == null ? void 0 : _a2.placeholders) != null ? _b2 : {}));
20632
+ expression = new Interpolation2(value.strings, value.expressions.map((e) => convertAst(e, job, sourceSpan != null ? sourceSpan : null)), Object.keys((_b2 = (_a2 = asMessage(i18nMeta)) == null ? void 0 : _a2.placeholders) != null ? _b2 : {}));
20612
20633
  } else if (value instanceof AST) {
20613
- expression = convertAst(value, job, null);
20634
+ expression = convertAst(value, job, sourceSpan != null ? sourceSpan : null);
20614
20635
  } else {
20615
20636
  expression = literal(value);
20616
20637
  }
@@ -20686,7 +20707,7 @@ function ingestTemplateBindings(unit, op, template2, templateKind) {
20686
20707
  }
20687
20708
  if (templateKind === TemplateKind.Structural && output.type !== 1) {
20688
20709
  const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, output.name, false);
20689
- unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null, null, securityContext));
20710
+ unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, null, output.name, null, null, null, securityContext));
20690
20711
  }
20691
20712
  }
20692
20713
  if (bindings.some((b) => b == null ? void 0 : b.i18nMessage) !== null) {
@@ -20697,7 +20718,7 @@ function createTemplateBinding(view, xref, type, name, value, unit, securityCont
20697
20718
  const isTextBinding = typeof value === "string";
20698
20719
  if (templateKind === TemplateKind.Structural) {
20699
20720
  if (!isStructuralTemplateAttribute && (type === 0 || type === 2 || type === 3)) {
20700
- return createExtractedAttributeOp(xref, BindingKind.Property, name, null, null, i18nMessage, securityContext);
20721
+ return createExtractedAttributeOp(xref, BindingKind.Property, null, name, null, null, i18nMessage, securityContext);
20701
20722
  }
20702
20723
  if (!isTextBinding && (type === 1 || type === 4)) {
20703
20724
  return null;
@@ -23556,6 +23577,9 @@ var TemplateDefinitionBuilder = class {
23556
23577
  this.updateInstructionWithAdvance(containerIndex, block.branches[0].sourceSpan, Identifiers.conditional, paramsCallback);
23557
23578
  }
23558
23579
  visitSwitchBlock(block) {
23580
+ if (block.cases.length === 0) {
23581
+ return;
23582
+ }
23559
23583
  const caseData = block.cases.map((currentCase) => {
23560
23584
  const index = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan, void 0, void 0, void 0, currentCase.i18n);
23561
23585
  const expression = currentCase.expression === null ? null : currentCase.expression.visit(this._valueConverter);
@@ -23878,7 +23902,7 @@ var TemplateDefinitionBuilder = class {
23878
23902
  if (delta < 1) {
23879
23903
  throw new Error("advance instruction can only go forwards");
23880
23904
  }
23881
- this.instructionFn(this._updateCodeFns, span, Identifiers.advance, [literal(delta)]);
23905
+ this.instructionFn(this._updateCodeFns, span, Identifiers.advance, delta > 1 ? [literal(delta)] : []);
23882
23906
  this._currentIndex = nodeIndex;
23883
23907
  }
23884
23908
  }
@@ -24288,12 +24312,15 @@ var BindingScope = class {
24288
24312
  }
24289
24313
  };
24290
24314
  var TrackByBindingScope = class extends BindingScope {
24291
- constructor(parentScope, globalAliases) {
24315
+ constructor(parentScope, globalOverrides) {
24292
24316
  super(parentScope.bindingLevel + 1, parentScope);
24293
- this.globalAliases = globalAliases;
24317
+ this.globalOverrides = globalOverrides;
24294
24318
  this.componentAccessCount = 0;
24295
24319
  }
24296
24320
  get(name) {
24321
+ if (this.globalOverrides.hasOwnProperty(name)) {
24322
+ return variable(this.globalOverrides[name]);
24323
+ }
24297
24324
  let current = this.parent;
24298
24325
  while (current) {
24299
24326
  if (current.hasLocal(name)) {
@@ -24301,9 +24328,6 @@ var TrackByBindingScope = class extends BindingScope {
24301
24328
  }
24302
24329
  current = current.parent;
24303
24330
  }
24304
- if (this.globalAliases[name]) {
24305
- return variable(this.globalAliases[name]);
24306
- }
24307
24331
  this.componentAccessCount++;
24308
24332
  return variable("this").prop(name);
24309
24333
  }
@@ -26305,7 +26329,7 @@ function publishFacade(global) {
26305
26329
  }
26306
26330
 
26307
26331
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
26308
- var VERSION2 = new Version("17.0.7");
26332
+ var VERSION2 = new Version("17.0.9");
26309
26333
 
26310
26334
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
26311
26335
  var _I18N_ATTR = "i18n";
@@ -27371,7 +27395,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION = "12.0.0";
27371
27395
  function compileDeclareClassMetadata(metadata) {
27372
27396
  const definitionMap = new DefinitionMap();
27373
27397
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
27374
- definitionMap.set("version", literal("17.0.7"));
27398
+ definitionMap.set("version", literal("17.0.9"));
27375
27399
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27376
27400
  definitionMap.set("type", metadata.type);
27377
27401
  definitionMap.set("decorators", metadata.decorators);
@@ -27442,7 +27466,7 @@ function createDirectiveDefinitionMap(meta) {
27442
27466
  const hasTransformFunctions = Object.values(meta.inputs).some((input) => input.transformFunction !== null);
27443
27467
  const minVersion = hasTransformFunctions ? MINIMUM_PARTIAL_LINKER_VERSION2 : "14.0.0";
27444
27468
  definitionMap.set("minVersion", literal(minVersion));
27445
- definitionMap.set("version", literal("17.0.7"));
27469
+ definitionMap.set("version", literal("17.0.9"));
27446
27470
  definitionMap.set("type", meta.type.value);
27447
27471
  if (meta.isStandalone) {
27448
27472
  definitionMap.set("isStandalone", literal(meta.isStandalone));
@@ -27674,7 +27698,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION3 = "12.0.0";
27674
27698
  function compileDeclareFactoryFunction(meta) {
27675
27699
  const definitionMap = new DefinitionMap();
27676
27700
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION3));
27677
- definitionMap.set("version", literal("17.0.7"));
27701
+ definitionMap.set("version", literal("17.0.9"));
27678
27702
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27679
27703
  definitionMap.set("type", meta.type.value);
27680
27704
  definitionMap.set("deps", compileDependencies(meta.deps));
@@ -27697,7 +27721,7 @@ function compileDeclareInjectableFromMetadata(meta) {
27697
27721
  function createInjectableDefinitionMap(meta) {
27698
27722
  const definitionMap = new DefinitionMap();
27699
27723
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION4));
27700
- definitionMap.set("version", literal("17.0.7"));
27724
+ definitionMap.set("version", literal("17.0.9"));
27701
27725
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27702
27726
  definitionMap.set("type", meta.type.value);
27703
27727
  if (meta.providedIn !== void 0) {
@@ -27735,7 +27759,7 @@ function compileDeclareInjectorFromMetadata(meta) {
27735
27759
  function createInjectorDefinitionMap(meta) {
27736
27760
  const definitionMap = new DefinitionMap();
27737
27761
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION5));
27738
- definitionMap.set("version", literal("17.0.7"));
27762
+ definitionMap.set("version", literal("17.0.9"));
27739
27763
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27740
27764
  definitionMap.set("type", meta.type.value);
27741
27765
  definitionMap.set("providers", meta.providers);
@@ -27759,7 +27783,7 @@ function createNgModuleDefinitionMap(meta) {
27759
27783
  throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
27760
27784
  }
27761
27785
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION6));
27762
- definitionMap.set("version", literal("17.0.7"));
27786
+ definitionMap.set("version", literal("17.0.9"));
27763
27787
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27764
27788
  definitionMap.set("type", meta.type.value);
27765
27789
  if (meta.bootstrap.length > 0) {
@@ -27794,7 +27818,7 @@ function compileDeclarePipeFromMetadata(meta) {
27794
27818
  function createPipeDefinitionMap(meta) {
27795
27819
  const definitionMap = new DefinitionMap();
27796
27820
  definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION7));
27797
- definitionMap.set("version", literal("17.0.7"));
27821
+ definitionMap.set("version", literal("17.0.9"));
27798
27822
  definitionMap.set("ngImport", importExpr(Identifiers.core));
27799
27823
  definitionMap.set("type", meta.type.value);
27800
27824
  if (meta.isStandalone) {
@@ -27811,7 +27835,7 @@ function createPipeDefinitionMap(meta) {
27811
27835
  publishFacade(_global);
27812
27836
 
27813
27837
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/version.mjs
27814
- var VERSION3 = new Version("17.0.7");
27838
+ var VERSION3 = new Version("17.0.9");
27815
27839
 
27816
27840
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
27817
27841
  var EmitFlags;
@@ -32210,7 +32234,7 @@ var DtsMetadataReader = class {
32210
32234
  const inputs = ClassPropertyMapping.fromMappedObject(readInputsType(def.type.typeArguments[3]));
32211
32235
  const outputs = ClassPropertyMapping.fromMappedObject(readMapType(def.type.typeArguments[4], readStringType));
32212
32236
  const hostDirectives = def.type.typeArguments.length > 8 ? readHostDirectivesType(this.checker, def.type.typeArguments[8], ref.bestGuessOwningModule) : null;
32213
- const isSignal = def.type.typeArguments.length > 9 && ((_b2 = readBooleanType(def.type.typeArguments[9])) != null ? _b2 : false);
32237
+ const isSignal2 = def.type.typeArguments.length > 9 && ((_b2 = readBooleanType(def.type.typeArguments[9])) != null ? _b2 : false);
32214
32238
  return __spreadProps(__spreadValues({
32215
32239
  kind: MetaKind.Directive,
32216
32240
  matchSource: MatchSource.Selector,
@@ -32230,7 +32254,7 @@ var DtsMetadataReader = class {
32230
32254
  animationTriggerNames: null,
32231
32255
  ngContentSelectors,
32232
32256
  isStandalone,
32233
- isSignal,
32257
+ isSignal: isSignal2,
32234
32258
  imports: null,
32235
32259
  schemas: null,
32236
32260
  decorator: null,
@@ -34850,14 +34874,14 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
34850
34874
  }
34851
34875
  isStandalone = resolved;
34852
34876
  }
34853
- let isSignal = false;
34877
+ let isSignal2 = false;
34854
34878
  if (directive.has("signals")) {
34855
34879
  const expr = directive.get("signals");
34856
34880
  const resolved = evaluator.evaluate(expr);
34857
34881
  if (typeof resolved !== "boolean") {
34858
34882
  throw createValueHasWrongTypeError(expr, resolved, `signals flag must be a boolean`);
34859
34883
  }
34860
- isSignal = resolved;
34884
+ isSignal2 = resolved;
34861
34885
  }
34862
34886
  const usesInheritance = reflector.hasBaseClass(clazz);
34863
34887
  const sourceFile = clazz.getSourceFile();
@@ -34887,7 +34911,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
34887
34911
  exportAs,
34888
34912
  providers,
34889
34913
  isStandalone,
34890
- isSignal,
34914
+ isSignal: isSignal2,
34891
34915
  hostDirectives: (hostDirectives == null ? void 0 : hostDirectives.map((hostDir) => toHostDirectiveMetadata(hostDir, sourceFile, refEmitter))) || null
34892
34916
  };
34893
34917
  return {
@@ -44830,10 +44854,12 @@ var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
44830
44854
  return [];
44831
44855
  }
44832
44856
  };
44857
+ function isSignal(symbol) {
44858
+ return ((symbol == null ? void 0 : symbol.escapedName) === "WritableSignal" || (symbol == null ? void 0 : symbol.escapedName) === "Signal") && symbol.parent.escapedName.includes("@angular/core");
44859
+ }
44833
44860
  function buildDiagnosticForSignal(ctx, node, component) {
44834
- var _a2, _b2;
44835
44861
  const symbol = ctx.templateTypeChecker.getSymbolOfNode(node, component);
44836
- if ((symbol == null ? void 0 : symbol.kind) === SymbolKind.Expression && (((_a2 = symbol.tsType.symbol) == null ? void 0 : _a2.escapedName) === "WritableSignal" || ((_b2 = symbol.tsType.symbol) == null ? void 0 : _b2.escapedName) === "Signal") && symbol.tsType.symbol.parent.escapedName.includes("@angular/core")) {
44862
+ if ((symbol == null ? void 0 : symbol.kind) === SymbolKind.Expression && (isSignal(symbol.tsType.symbol) || isSignal(symbol.tsType.aliasSymbol))) {
44837
44863
  const templateMapping = ctx.templateTypeChecker.getTemplateMappingAtTcbLocation(symbol.tcbLocation);
44838
44864
  const errorString = `${node.name} is a function and should be invoked: ${node.name}()`;
44839
44865
  const diagnostic = ctx.makeTemplateDiagnostic(templateMapping.span, errorString);