react-dom 19.2.0-canary-c4676e72-20250520 → 19.2.0-canary-23884812-20250520

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.
@@ -336,9 +336,6 @@ function createResumableState(
336
336
  moduleScriptResources: {}
337
337
  };
338
338
  }
339
- function createPreambleState() {
340
- return { htmlChunks: null, headChunks: null, bodyChunks: null };
341
- }
342
339
  function createFormatContext(
343
340
  insertionMode,
344
341
  selectedValue,
@@ -2702,6 +2699,10 @@ function hoistStyleQueueDependency(styleQueue) {
2702
2699
  function hoistStylesheetDependency(stylesheet) {
2703
2700
  this.stylesheets.add(stylesheet);
2704
2701
  }
2702
+ function hoistHoistables(parentState, childState) {
2703
+ childState.styles.forEach(hoistStyleQueueDependency, parentState);
2704
+ childState.stylesheets.forEach(hoistStylesheetDependency, parentState);
2705
+ }
2705
2706
  function createRenderState(resumableState, generateStaticMarkup) {
2706
2707
  var idPrefix = resumableState.idPrefix,
2707
2708
  bootstrapChunks = [],
@@ -2717,17 +2718,16 @@ function createRenderState(resumableState, generateStaticMarkup) {
2717
2718
  "\x3c/script>"
2718
2719
  ));
2719
2720
  bootstrapScriptContent = idPrefix + "P:";
2720
- var JSCompiler_object_inline_segmentPrefix_1633 = idPrefix + "S:";
2721
+ var JSCompiler_object_inline_segmentPrefix_1636 = idPrefix + "S:";
2721
2722
  idPrefix += "B:";
2722
- var JSCompiler_object_inline_preamble_1636 = createPreambleState(),
2723
- JSCompiler_object_inline_preconnects_1646 = new Set(),
2724
- JSCompiler_object_inline_fontPreloads_1647 = new Set(),
2725
- JSCompiler_object_inline_highImagePreloads_1648 = new Set(),
2726
- JSCompiler_object_inline_styles_1649 = new Map(),
2727
- JSCompiler_object_inline_bootstrapScripts_1650 = new Set(),
2728
- JSCompiler_object_inline_scripts_1651 = new Set(),
2729
- JSCompiler_object_inline_bulkPreloads_1652 = new Set(),
2730
- JSCompiler_object_inline_preloads_1653 = {
2723
+ var JSCompiler_object_inline_preconnects_1649 = new Set(),
2724
+ JSCompiler_object_inline_fontPreloads_1650 = new Set(),
2725
+ JSCompiler_object_inline_highImagePreloads_1651 = new Set(),
2726
+ JSCompiler_object_inline_styles_1652 = new Map(),
2727
+ JSCompiler_object_inline_bootstrapScripts_1653 = new Set(),
2728
+ JSCompiler_object_inline_scripts_1654 = new Set(),
2729
+ JSCompiler_object_inline_bulkPreloads_1655 = new Set(),
2730
+ JSCompiler_object_inline_preloads_1656 = {
2731
2731
  images: new Map(),
2732
2732
  stylesheets: new Map(),
2733
2733
  scripts: new Map(),
@@ -2764,7 +2764,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
2764
2764
  scriptConfig.moduleScriptResources[href] = null;
2765
2765
  scriptConfig = [];
2766
2766
  pushLinkImpl(scriptConfig, props);
2767
- JSCompiler_object_inline_bootstrapScripts_1650.add(scriptConfig);
2767
+ JSCompiler_object_inline_bootstrapScripts_1653.add(scriptConfig);
2768
2768
  bootstrapChunks.push('<script src="', escapeTextForBrowser(src), '"');
2769
2769
  "string" === typeof integrity &&
2770
2770
  bootstrapChunks.push(
@@ -2811,7 +2811,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
2811
2811
  (props.moduleScriptResources[scriptConfig] = null),
2812
2812
  (props = []),
2813
2813
  pushLinkImpl(props, integrity),
2814
- JSCompiler_object_inline_bootstrapScripts_1650.add(props),
2814
+ JSCompiler_object_inline_bootstrapScripts_1653.add(props),
2815
2815
  bootstrapChunks.push(
2816
2816
  '<script type="module" src="',
2817
2817
  escapeTextForBrowser(i),
@@ -2833,10 +2833,10 @@ function createRenderState(resumableState, generateStaticMarkup) {
2833
2833
  bootstrapChunks.push(' async="">\x3c/script>');
2834
2834
  return {
2835
2835
  placeholderPrefix: bootstrapScriptContent,
2836
- segmentPrefix: JSCompiler_object_inline_segmentPrefix_1633,
2836
+ segmentPrefix: JSCompiler_object_inline_segmentPrefix_1636,
2837
2837
  boundaryPrefix: idPrefix,
2838
2838
  startInlineScript: "<script",
2839
- preamble: JSCompiler_object_inline_preamble_1636,
2839
+ preamble: { htmlChunks: null, headChunks: null, bodyChunks: null },
2840
2840
  externalRuntimeScript: null,
2841
2841
  bootstrapChunks: bootstrapChunks,
2842
2842
  importMapChunks: [],
@@ -2852,14 +2852,14 @@ function createRenderState(resumableState, generateStaticMarkup) {
2852
2852
  charsetChunks: [],
2853
2853
  viewportChunks: [],
2854
2854
  hoistableChunks: [],
2855
- preconnects: JSCompiler_object_inline_preconnects_1646,
2856
- fontPreloads: JSCompiler_object_inline_fontPreloads_1647,
2857
- highImagePreloads: JSCompiler_object_inline_highImagePreloads_1648,
2858
- styles: JSCompiler_object_inline_styles_1649,
2859
- bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1650,
2860
- scripts: JSCompiler_object_inline_scripts_1651,
2861
- bulkPreloads: JSCompiler_object_inline_bulkPreloads_1652,
2862
- preloads: JSCompiler_object_inline_preloads_1653,
2855
+ preconnects: JSCompiler_object_inline_preconnects_1649,
2856
+ fontPreloads: JSCompiler_object_inline_fontPreloads_1650,
2857
+ highImagePreloads: JSCompiler_object_inline_highImagePreloads_1651,
2858
+ styles: JSCompiler_object_inline_styles_1652,
2859
+ bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1653,
2860
+ scripts: JSCompiler_object_inline_scripts_1654,
2861
+ bulkPreloads: JSCompiler_object_inline_bulkPreloads_1655,
2862
+ preloads: JSCompiler_object_inline_preloads_1656,
2863
2863
  stylesToHoist: !1,
2864
2864
  generateStaticMarkup: generateStaticMarkup
2865
2865
  };
@@ -3736,11 +3736,14 @@ function createSuspenseBoundary(
3736
3736
  };
3737
3737
  null !== row &&
3738
3738
  (row.pendingTasks++,
3739
- (row = row.boundaries),
3740
- null !== row &&
3739
+ (contentPreamble = row.boundaries),
3740
+ null !== contentPreamble &&
3741
3741
  (request.allPendingTasks++,
3742
3742
  fallbackAbortableTasks.pendingTasks++,
3743
- row.push(fallbackAbortableTasks)));
3743
+ contentPreamble.push(fallbackAbortableTasks)),
3744
+ (request = row.inheritedHoistables),
3745
+ null !== request &&
3746
+ hoistHoistables(fallbackAbortableTasks.contentState, request));
3744
3747
  return fallbackAbortableTasks;
3745
3748
  }
3746
3749
  function createRenderTask(
@@ -3905,20 +3908,56 @@ function fatalError(request, error) {
3905
3908
  : ((request.status = 13), (request.fatalError = error));
3906
3909
  }
3907
3910
  function finishSuspenseListRow(request, row) {
3908
- for (row = row.next; null !== row; ) {
3909
- var unblockedBoundaries = row.boundaries;
3911
+ unblockSuspenseListRow(request, row.next, row.hoistables);
3912
+ }
3913
+ function unblockSuspenseListRow(request, unblockedRow, inheritedHoistables) {
3914
+ for (; null !== unblockedRow; ) {
3915
+ null !== inheritedHoistables &&
3916
+ (hoistHoistables(unblockedRow.hoistables, inheritedHoistables),
3917
+ (unblockedRow.inheritedHoistables = inheritedHoistables));
3918
+ var unblockedBoundaries = unblockedRow.boundaries;
3910
3919
  if (null !== unblockedBoundaries) {
3911
- row.boundaries = null;
3912
- for (var i = 0; i < unblockedBoundaries.length; i++)
3913
- finishedTask(request, unblockedBoundaries[i], null, null);
3920
+ unblockedRow.boundaries = null;
3921
+ for (var i = 0; i < unblockedBoundaries.length; i++) {
3922
+ var unblockedBoundary = unblockedBoundaries[i];
3923
+ null !== inheritedHoistables &&
3924
+ hoistHoistables(unblockedBoundary.contentState, inheritedHoistables);
3925
+ finishedTask(request, unblockedBoundary, null, null);
3926
+ }
3927
+ }
3928
+ unblockedRow.pendingTasks--;
3929
+ if (0 < unblockedRow.pendingTasks) break;
3930
+ inheritedHoistables = unblockedRow.hoistables;
3931
+ unblockedRow = unblockedRow.next;
3932
+ }
3933
+ }
3934
+ function tryToResolveTogetherRow(request, togetherRow) {
3935
+ var boundaries = togetherRow.boundaries;
3936
+ if (null !== boundaries && togetherRow.pendingTasks === boundaries.length) {
3937
+ for (var allCompleteAndInlinable = !0, i = 0; i < boundaries.length; i++) {
3938
+ var rowBoundary = boundaries[i];
3939
+ if (
3940
+ 1 !== rowBoundary.pendingTasks ||
3941
+ rowBoundary.parentFlushed ||
3942
+ 500 < rowBoundary.byteSize
3943
+ ) {
3944
+ allCompleteAndInlinable = !1;
3945
+ break;
3946
+ }
3914
3947
  }
3915
- row.pendingTasks--;
3916
- if (0 < row.pendingTasks) break;
3917
- row = row.next;
3948
+ allCompleteAndInlinable &&
3949
+ unblockSuspenseListRow(request, togetherRow, togetherRow.hoistables);
3918
3950
  }
3919
3951
  }
3920
3952
  function createSuspenseListRow(previousRow) {
3921
- var newRow = { pendingTasks: 1, boundaries: null, next: null };
3953
+ var newRow = {
3954
+ pendingTasks: 1,
3955
+ boundaries: null,
3956
+ hoistables: createHoistableState(),
3957
+ inheritedHoistables: null,
3958
+ together: !1,
3959
+ next: null
3960
+ };
3922
3961
  null !== previousRow &&
3923
3962
  0 < previousRow.pendingTasks &&
3924
3963
  (newRow.pendingTasks++,
@@ -3927,21 +3966,22 @@ function createSuspenseListRow(previousRow) {
3927
3966
  return newRow;
3928
3967
  }
3929
3968
  function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
3930
- keyPath = task.keyPath;
3931
- var prevTreeContext = task.treeContext,
3932
- prevRow = task.row,
3933
- totalChildren = rows.length,
3934
- previousSuspenseListRow = null;
3969
+ var prevKeyPath = task.keyPath,
3970
+ prevTreeContext = task.treeContext,
3971
+ prevRow = task.row;
3972
+ task.keyPath = keyPath;
3973
+ keyPath = rows.length;
3974
+ var previousSuspenseListRow = null;
3935
3975
  if (null !== task.replay) {
3936
3976
  var resumeSlots = task.replay.slots;
3937
3977
  if (null !== resumeSlots && "object" === typeof resumeSlots)
3938
- for (var n = 0; n < totalChildren; n++) {
3939
- var i = "backwards" !== revealOrder ? n : totalChildren - 1 - n,
3978
+ for (var n = 0; n < keyPath; n++) {
3979
+ var i = "backwards" !== revealOrder ? n : keyPath - 1 - n,
3940
3980
  node = rows[i];
3941
3981
  task.row = previousSuspenseListRow = createSuspenseListRow(
3942
3982
  previousSuspenseListRow
3943
3983
  );
3944
- task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);
3984
+ task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
3945
3985
  var resumeSegmentID = resumeSlots[i];
3946
3986
  "number" === typeof resumeSegmentID
3947
3987
  ? (resumeNode(request, task, resumeSegmentID, node, i),
@@ -3951,30 +3991,26 @@ function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
3951
3991
  finishSuspenseListRow(request, previousSuspenseListRow);
3952
3992
  }
3953
3993
  else
3954
- for (resumeSlots = 0; resumeSlots < totalChildren; resumeSlots++)
3994
+ for (resumeSlots = 0; resumeSlots < keyPath; resumeSlots++)
3955
3995
  (n =
3956
3996
  "backwards" !== revealOrder
3957
3997
  ? resumeSlots
3958
- : totalChildren - 1 - resumeSlots),
3998
+ : keyPath - 1 - resumeSlots),
3959
3999
  (i = rows[n]),
3960
4000
  (task.row = previousSuspenseListRow =
3961
4001
  createSuspenseListRow(previousSuspenseListRow)),
3962
- (task.treeContext = pushTreeContext(
3963
- prevTreeContext,
3964
- totalChildren,
3965
- n
3966
- )),
4002
+ (task.treeContext = pushTreeContext(prevTreeContext, keyPath, n)),
3967
4003
  renderNode(request, task, i, n),
3968
4004
  0 === --previousSuspenseListRow.pendingTasks &&
3969
4005
  finishSuspenseListRow(request, previousSuspenseListRow);
3970
4006
  } else if ("backwards" !== revealOrder)
3971
- for (revealOrder = 0; revealOrder < totalChildren; revealOrder++)
4007
+ for (revealOrder = 0; revealOrder < keyPath; revealOrder++)
3972
4008
  (resumeSlots = rows[revealOrder]),
3973
4009
  (task.row = previousSuspenseListRow =
3974
4010
  createSuspenseListRow(previousSuspenseListRow)),
3975
4011
  (task.treeContext = pushTreeContext(
3976
4012
  prevTreeContext,
3977
- totalChildren,
4013
+ keyPath,
3978
4014
  revealOrder
3979
4015
  )),
3980
4016
  renderNode(request, task, resumeSlots, revealOrder),
@@ -3984,12 +4020,12 @@ function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
3984
4020
  revealOrder = task.blockedSegment;
3985
4021
  resumeSlots = revealOrder.children.length;
3986
4022
  n = revealOrder.chunks.length;
3987
- for (i = totalChildren - 1; 0 <= i; i--) {
4023
+ for (i = keyPath - 1; 0 <= i; i--) {
3988
4024
  node = rows[i];
3989
4025
  task.row = previousSuspenseListRow = createSuspenseListRow(
3990
4026
  previousSuspenseListRow
3991
4027
  );
3992
- task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);
4028
+ task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
3993
4029
  resumeSegmentID = createPendingSegment(
3994
4030
  request,
3995
4031
  n,
@@ -4027,7 +4063,7 @@ function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
4027
4063
  (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));
4028
4064
  task.treeContext = prevTreeContext;
4029
4065
  task.row = prevRow;
4030
- task.keyPath = keyPath;
4066
+ task.keyPath = prevKeyPath;
4031
4067
  }
4032
4068
  function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
4033
4069
  var prevThenableState = task.thenableState;
@@ -4096,9 +4132,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
4096
4132
  var defaultProps = type.defaultProps;
4097
4133
  if (defaultProps) {
4098
4134
  newProps === props && (newProps = assign({}, newProps, props));
4099
- for (var propName$42 in defaultProps)
4100
- void 0 === newProps[propName$42] &&
4101
- (newProps[propName$42] = defaultProps[propName$42]);
4135
+ for (var propName$43 in defaultProps)
4136
+ void 0 === newProps[propName$43] &&
4137
+ (newProps[propName$43] = defaultProps[propName$43]);
4102
4138
  }
4103
4139
  props = newProps;
4104
4140
  newProps = emptyContextObject;
@@ -4158,16 +4194,16 @@ function renderElement(request, task, keyPath, type, props, ref) {
4158
4194
  defaultProps = ref ? type[0] : newProps.state;
4159
4195
  initialState = !0;
4160
4196
  for (ref = ref ? 1 : 0; ref < type.length; ref++)
4161
- (propName$42 = type[ref]),
4162
- (propName$42 =
4163
- "function" === typeof propName$42
4164
- ? propName$42.call(newProps, defaultProps, props, void 0)
4165
- : propName$42),
4166
- null != propName$42 &&
4197
+ (propName$43 = type[ref]),
4198
+ (propName$43 =
4199
+ "function" === typeof propName$43
4200
+ ? propName$43.call(newProps, defaultProps, props, void 0)
4201
+ : propName$43),
4202
+ null != propName$43 &&
4167
4203
  (initialState
4168
4204
  ? ((initialState = !1),
4169
- (defaultProps = assign({}, defaultProps, propName$42)))
4170
- : assign(defaultProps, propName$42));
4205
+ (defaultProps = assign({}, defaultProps, propName$43)))
4206
+ : assign(defaultProps, propName$43));
4171
4207
  newProps.state = defaultProps;
4172
4208
  }
4173
4209
  else defaultProps.queue = null;
@@ -4343,10 +4379,25 @@ function renderElement(request, task, keyPath, type, props, ref) {
4343
4379
  break a;
4344
4380
  }
4345
4381
  }
4346
- props = task.keyPath;
4347
- task.keyPath = keyPath;
4348
- renderNodeDestructive(request, task, type, -1);
4349
- task.keyPath = props;
4382
+ "together" === props
4383
+ ? ((props = task.keyPath),
4384
+ (newProps = task.row),
4385
+ (defaultProps = task.row = createSuspenseListRow(null)),
4386
+ (defaultProps.boundaries = []),
4387
+ (defaultProps.together = !0),
4388
+ (task.keyPath = keyPath),
4389
+ renderNodeDestructive(request, task, type, -1),
4390
+ 0 === --defaultProps.pendingTasks &&
4391
+ finishSuspenseListRow(request, defaultProps),
4392
+ (task.keyPath = props),
4393
+ (task.row = newProps),
4394
+ null !== newProps &&
4395
+ 0 < defaultProps.pendingTasks &&
4396
+ (newProps.pendingTasks++, (defaultProps.next = newProps)))
4397
+ : ((props = task.keyPath),
4398
+ (task.keyPath = keyPath),
4399
+ renderNodeDestructive(request, task, type, -1),
4400
+ (task.keyPath = props));
4350
4401
  }
4351
4402
  return;
4352
4403
  case REACT_VIEW_TRANSITION_TYPE:
@@ -4376,28 +4427,19 @@ function renderElement(request, task, keyPath, type, props, ref) {
4376
4427
  ref = task.formatContext;
4377
4428
  var prevRow = task.row,
4378
4429
  parentBoundary = task.blockedBoundary;
4379
- propName$42 = task.blockedPreamble;
4430
+ propName$43 = task.blockedPreamble;
4380
4431
  var parentHoistableState = task.hoistableState;
4381
4432
  propName = task.blockedSegment;
4382
4433
  var fallback = props.fallback;
4383
4434
  props = props.children;
4384
4435
  var fallbackAbortSet = new Set();
4385
- var newBoundary =
4386
- 2 > task.formatContext.insertionMode
4387
- ? createSuspenseBoundary(
4388
- request,
4389
- task.row,
4390
- fallbackAbortSet,
4391
- createPreambleState(),
4392
- createPreambleState()
4393
- )
4394
- : createSuspenseBoundary(
4395
- request,
4396
- task.row,
4397
- fallbackAbortSet,
4398
- null,
4399
- null
4400
- );
4436
+ var newBoundary = createSuspenseBoundary(
4437
+ request,
4438
+ task.row,
4439
+ fallbackAbortSet,
4440
+ null,
4441
+ null
4442
+ );
4401
4443
  null !== request.trackedPostpones &&
4402
4444
  (newBoundary.trackedContentKeyPath = keyPath);
4403
4445
  var boundarySegment = createPendingSegment(
@@ -4448,7 +4490,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4448
4490
  );
4449
4491
  } finally {
4450
4492
  (task.blockedSegment = propName),
4451
- (task.blockedPreamble = propName$42),
4493
+ (task.blockedPreamble = propName$43),
4452
4494
  (task.keyPath = type),
4453
4495
  (task.formatContext = ref);
4454
4496
  }
@@ -4497,18 +4539,21 @@ function renderElement(request, task, keyPath, type, props, ref) {
4497
4539
  ),
4498
4540
  (contentRootSegment.status = 1),
4499
4541
  queueCompletedSegment(newBoundary, contentRootSegment),
4500
- 0 === newBoundary.pendingTasks &&
4501
- 0 === newBoundary.status &&
4502
- ((newBoundary.status = 1), !(500 < newBoundary.byteSize)))
4542
+ 0 === newBoundary.pendingTasks && 0 === newBoundary.status)
4503
4543
  ) {
4544
+ if (((newBoundary.status = 1), !(500 < newBoundary.byteSize))) {
4545
+ null !== prevRow &&
4546
+ 0 === --prevRow.pendingTasks &&
4547
+ finishSuspenseListRow(request, prevRow);
4548
+ 0 === request.pendingRootTasks &&
4549
+ task.blockedPreamble &&
4550
+ preparePreamble(request);
4551
+ break a;
4552
+ }
4553
+ } else
4504
4554
  null !== prevRow &&
4505
- 0 === --prevRow.pendingTasks &&
4506
- finishSuspenseListRow(request, prevRow);
4507
- 0 === request.pendingRootTasks &&
4508
- task.blockedPreamble &&
4509
- preparePreamble(request);
4510
- break a;
4511
- }
4555
+ prevRow.together &&
4556
+ tryToResolveTogetherRow(request, prevRow);
4512
4557
  } catch (thrownValue$30) {
4513
4558
  (newBoundary.status = 4),
4514
4559
  12 === request.status
@@ -4526,7 +4571,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4526
4571
  untrackBoundary(request, newBoundary);
4527
4572
  } finally {
4528
4573
  (task.blockedBoundary = parentBoundary),
4529
- (task.blockedPreamble = propName$42),
4574
+ (task.blockedPreamble = propName$43),
4530
4575
  (task.hoistableState = parentHoistableState),
4531
4576
  (task.blockedSegment = propName),
4532
4577
  (task.keyPath = type),
@@ -4767,22 +4812,13 @@ function retryNode(request, task) {
4767
4812
  content = props.children,
4768
4813
  fallback = props.fallback,
4769
4814
  fallbackAbortSet = new Set();
4770
- props =
4771
- 2 > task.formatContext.insertionMode
4772
- ? createSuspenseBoundary(
4773
- request,
4774
- task.row,
4775
- fallbackAbortSet,
4776
- createPreambleState(),
4777
- createPreambleState()
4778
- )
4779
- : createSuspenseBoundary(
4780
- request,
4781
- task.row,
4782
- fallbackAbortSet,
4783
- null,
4784
- null
4785
- );
4815
+ props = createSuspenseBoundary(
4816
+ request,
4817
+ task.row,
4818
+ fallbackAbortSet,
4819
+ null,
4820
+ null
4821
+ );
4786
4822
  props.parentFlushed = !0;
4787
4823
  props.rootSegmentID = type;
4788
4824
  task.blockedBoundary = props;
@@ -5113,15 +5149,15 @@ function renderNode(request, task, node, childIndex) {
5113
5149
  chunkLength = segment.chunks.length;
5114
5150
  try {
5115
5151
  return renderNodeDestructive(request, task, node, childIndex);
5116
- } catch (thrownValue$58) {
5152
+ } catch (thrownValue$59) {
5117
5153
  if (
5118
5154
  (resetHooksState(),
5119
5155
  (segment.children.length = childrenLength),
5120
5156
  (segment.chunks.length = chunkLength),
5121
5157
  (node =
5122
- thrownValue$58 === SuspenseException
5158
+ thrownValue$59 === SuspenseException
5123
5159
  ? getSuspendedThenable()
5124
- : thrownValue$58),
5160
+ : thrownValue$59),
5125
5161
  "object" === typeof node && null !== node)
5126
5162
  ) {
5127
5163
  if ("function" === typeof node.then) {
@@ -5220,10 +5256,6 @@ function abortTask(task, request, error) {
5220
5256
  if (6 === segment.status) return;
5221
5257
  segment.status = 3;
5222
5258
  }
5223
- segment = task.row;
5224
- null !== segment &&
5225
- 0 === --segment.pendingTasks &&
5226
- finishSuspenseListRow(request, segment);
5227
5259
  segment = getThrownInfo(task.componentStack);
5228
5260
  if (null === boundary) {
5229
5261
  if (13 !== request.status && 14 !== request.status) {
@@ -5236,32 +5268,40 @@ function abortTask(task, request, error) {
5236
5268
  boundary.pendingTasks--;
5237
5269
  0 === boundary.pendingTasks &&
5238
5270
  0 < boundary.nodes.length &&
5239
- ((task = logRecoverableError(request, error, segment)),
5271
+ ((segment = logRecoverableError(request, error, segment)),
5240
5272
  abortRemainingReplayNodes(
5241
5273
  request,
5242
5274
  null,
5243
5275
  boundary.nodes,
5244
5276
  boundary.slots,
5245
5277
  error,
5246
- task
5278
+ segment
5247
5279
  ));
5248
5280
  request.pendingRootTasks--;
5249
5281
  0 === request.pendingRootTasks && completeShell(request);
5250
5282
  }
5251
5283
  } else
5252
- boundary.pendingTasks--,
5253
- 4 !== boundary.status &&
5254
- ((boundary.status = 4),
5255
- (task = logRecoverableError(request, error, segment)),
5256
- (boundary.status = 4),
5257
- (boundary.errorDigest = task),
5258
- untrackBoundary(request, boundary),
5259
- boundary.parentFlushed &&
5260
- request.clientRenderedBoundaries.push(boundary)),
5284
+ 4 !== boundary.status &&
5285
+ ((boundary.status = 4),
5286
+ (segment = logRecoverableError(request, error, segment)),
5287
+ (boundary.status = 4),
5288
+ (boundary.errorDigest = segment),
5289
+ untrackBoundary(request, boundary),
5290
+ boundary.parentFlushed &&
5291
+ request.clientRenderedBoundaries.push(boundary)),
5292
+ boundary.pendingTasks--,
5293
+ (segment = boundary.row),
5294
+ null !== segment &&
5295
+ 0 === --segment.pendingTasks &&
5296
+ finishSuspenseListRow(request, segment),
5261
5297
  boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
5262
5298
  return abortTask(fallbackTask, request, error);
5263
5299
  }),
5264
5300
  boundary.fallbackAbortableTasks.clear();
5301
+ task = task.row;
5302
+ null !== task &&
5303
+ 0 === --task.pendingTasks &&
5304
+ finishSuspenseListRow(request, task);
5265
5305
  request.allPendingTasks--;
5266
5306
  0 === request.allPendingTasks && completeAll(request);
5267
5307
  }
@@ -5360,8 +5400,9 @@ function queueCompletedSegment(boundary, segment) {
5360
5400
  }
5361
5401
  function finishedTask(request, boundary, row, segment) {
5362
5402
  null !== row &&
5363
- 0 === --row.pendingTasks &&
5364
- finishSuspenseListRow(request, row);
5403
+ (0 === --row.pendingTasks
5404
+ ? finishSuspenseListRow(request, row)
5405
+ : row.together && tryToResolveTogetherRow(request, row));
5365
5406
  request.allPendingTasks--;
5366
5407
  if (null === boundary) {
5367
5408
  if (null !== segment && segment.parentFlushed) {
@@ -5383,13 +5424,15 @@ function finishedTask(request, boundary, row, segment) {
5383
5424
  boundary.parentFlushed &&
5384
5425
  request.completedBoundaries.push(boundary),
5385
5426
  1 === boundary.status &&
5386
- (500 < boundary.byteSize ||
5427
+ ((row = boundary.row),
5428
+ null !== row &&
5429
+ hoistHoistables(row.hoistables, boundary.contentState),
5430
+ 500 < boundary.byteSize ||
5387
5431
  (boundary.fallbackAbortableTasks.forEach(
5388
5432
  abortTaskSoft,
5389
5433
  request
5390
5434
  ),
5391
5435
  boundary.fallbackAbortableTasks.clear(),
5392
- (row = boundary.row),
5393
5436
  null !== row &&
5394
5437
  0 === --row.pendingTasks &&
5395
5438
  finishSuspenseListRow(request, row)),
@@ -5397,13 +5440,17 @@ function finishedTask(request, boundary, row, segment) {
5397
5440
  null === request.trackedPostpones &&
5398
5441
  null !== boundary.contentPreamble &&
5399
5442
  preparePreamble(request)))
5400
- : null !== segment &&
5401
- segment.parentFlushed &&
5402
- 1 === segment.status &&
5403
- (queueCompletedSegment(boundary, segment),
5404
- 1 === boundary.completedSegments.length &&
5405
- boundary.parentFlushed &&
5406
- request.partialBoundaries.push(boundary)));
5443
+ : (null !== segment &&
5444
+ segment.parentFlushed &&
5445
+ 1 === segment.status &&
5446
+ (queueCompletedSegment(boundary, segment),
5447
+ 1 === boundary.completedSegments.length &&
5448
+ boundary.parentFlushed &&
5449
+ request.partialBoundaries.push(boundary)),
5450
+ (boundary = boundary.row),
5451
+ null !== boundary &&
5452
+ boundary.together &&
5453
+ tryToResolveTogetherRow(request, boundary)));
5407
5454
  0 === request.allPendingTasks && completeAll(request);
5408
5455
  }
5409
5456
  function performWork(request$jscomp$2) {
@@ -5560,19 +5607,25 @@ function performWork(request$jscomp$2) {
5560
5607
  x$jscomp$0,
5561
5608
  errorInfo$jscomp$0
5562
5609
  );
5563
- null === boundary$jscomp$0
5564
- ? fatalError(request, x$jscomp$0)
5565
- : (boundary$jscomp$0.pendingTasks--,
5566
- 4 !== boundary$jscomp$0.status &&
5567
- ((boundary$jscomp$0.status = 4),
5568
- (boundary$jscomp$0.errorDigest = request$jscomp$0),
5569
- untrackBoundary(request, boundary$jscomp$0),
5570
- boundary$jscomp$0.parentFlushed &&
5571
- request.clientRenderedBoundaries.push(boundary$jscomp$0),
5572
- 0 === request.pendingRootTasks &&
5573
- null === request.trackedPostpones &&
5574
- null !== boundary$jscomp$0.contentPreamble &&
5575
- preparePreamble(request)));
5610
+ if (null === boundary$jscomp$0) fatalError(request, x$jscomp$0);
5611
+ else if (
5612
+ (boundary$jscomp$0.pendingTasks--,
5613
+ 4 !== boundary$jscomp$0.status)
5614
+ ) {
5615
+ boundary$jscomp$0.status = 4;
5616
+ boundary$jscomp$0.errorDigest = request$jscomp$0;
5617
+ untrackBoundary(request, boundary$jscomp$0);
5618
+ var boundaryRow = boundary$jscomp$0.row;
5619
+ null !== boundaryRow &&
5620
+ 0 === --boundaryRow.pendingTasks &&
5621
+ finishSuspenseListRow(request, boundaryRow);
5622
+ boundary$jscomp$0.parentFlushed &&
5623
+ request.clientRenderedBoundaries.push(boundary$jscomp$0);
5624
+ 0 === request.pendingRootTasks &&
5625
+ null === request.trackedPostpones &&
5626
+ null !== boundary$jscomp$0.contentPreamble &&
5627
+ preparePreamble(request);
5628
+ }
5576
5629
  0 === request.allPendingTasks && completeAll(request);
5577
5630
  }
5578
5631
  } finally {
@@ -5744,13 +5797,7 @@ function flushSegment(request, destination, segment, hoistableState) {
5744
5797
  request.renderState,
5745
5798
  boundary.rootSegmentID
5746
5799
  ),
5747
- hoistableState &&
5748
- ((boundary = boundary.fallbackState),
5749
- boundary.styles.forEach(hoistStyleQueueDependency, hoistableState),
5750
- boundary.stylesheets.forEach(
5751
- hoistStylesheetDependency,
5752
- hoistableState
5753
- )),
5800
+ hoistableState && hoistHoistables(hoistableState, boundary.fallbackState),
5754
5801
  flushSubtree(request, destination, segment, hoistableState),
5755
5802
  destination.push("\x3c!--/$--\x3e")
5756
5803
  );
@@ -5770,10 +5817,7 @@ function flushSegment(request, destination, segment, hoistableState) {
5770
5817
  destination.push("\x3c!--/$--\x3e")
5771
5818
  );
5772
5819
  flushedByteSize += boundary.byteSize;
5773
- hoistableState &&
5774
- ((segment = boundary.contentState),
5775
- segment.styles.forEach(hoistStyleQueueDependency, hoistableState),
5776
- segment.stylesheets.forEach(hoistStylesheetDependency, hoistableState));
5820
+ hoistableState && hoistHoistables(hoistableState, boundary.contentState);
5777
5821
  segment = boundary.row;
5778
5822
  null !== segment &&
5779
5823
  500 < boundary.byteSize &&
@@ -6096,12 +6140,12 @@ function flushCompletedQueues(request, destination) {
6096
6140
  completedBoundaries.splice(0, i);
6097
6141
  var partialBoundaries = request.partialBoundaries;
6098
6142
  for (i = 0; i < partialBoundaries.length; i++) {
6099
- var boundary$62 = partialBoundaries[i];
6143
+ var boundary$64 = partialBoundaries[i];
6100
6144
  a: {
6101
6145
  clientRenderedBoundaries = request;
6102
6146
  boundary = destination;
6103
- flushedByteSize = boundary$62.byteSize;
6104
- var completedSegments = boundary$62.completedSegments;
6147
+ flushedByteSize = boundary$64.byteSize;
6148
+ var completedSegments = boundary$64.completedSegments;
6105
6149
  for (
6106
6150
  JSCompiler_inline_result = 0;
6107
6151
  JSCompiler_inline_result < completedSegments.length;
@@ -6111,7 +6155,7 @@ function flushCompletedQueues(request, destination) {
6111
6155
  !flushPartiallyCompletedSegment(
6112
6156
  clientRenderedBoundaries,
6113
6157
  boundary,
6114
- boundary$62,
6158
+ boundary$64,
6115
6159
  completedSegments[JSCompiler_inline_result]
6116
6160
  )
6117
6161
  ) {
@@ -6121,9 +6165,20 @@ function flushCompletedQueues(request, destination) {
6121
6165
  break a;
6122
6166
  }
6123
6167
  completedSegments.splice(0, JSCompiler_inline_result);
6168
+ var row = boundary$64.row;
6169
+ null !== row &&
6170
+ row.together &&
6171
+ 1 === boundary$64.pendingTasks &&
6172
+ (1 === row.pendingTasks
6173
+ ? unblockSuspenseListRow(
6174
+ clientRenderedBoundaries,
6175
+ row,
6176
+ row.hoistables
6177
+ )
6178
+ : row.pendingTasks--);
6124
6179
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
6125
6180
  boundary,
6126
- boundary$62.contentState,
6181
+ boundary$64.contentState,
6127
6182
  clientRenderedBoundaries.renderState
6128
6183
  );
6129
6184
  }
@@ -6206,8 +6261,8 @@ function abort(request, reason) {
6206
6261
  }
6207
6262
  null !== request.destination &&
6208
6263
  flushCompletedQueues(request, request.destination);
6209
- } catch (error$64) {
6210
- logRecoverableError(request, error$64, {}), fatalError(request, error$64);
6264
+ } catch (error$66) {
6265
+ logRecoverableError(request, error$66, {}), fatalError(request, error$66);
6211
6266
  }
6212
6267
  }
6213
6268
  function onError() {}
@@ -6273,4 +6328,4 @@ exports.renderToString = function (children, options) {
6273
6328
  'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
6274
6329
  );
6275
6330
  };
6276
- exports.version = "19.2.0-canary-c4676e72-20250520";
6331
+ exports.version = "19.2.0-canary-23884812-20250520";