react-markup 0.0.0-experimental-d46b04a2-20250117 → 0.0.0-experimental-18eaf51b-20250118

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.
@@ -324,26 +324,26 @@ function createRenderState(
324
324
  ("" + JSON.stringify(importMap)).replace(scriptRegex, scriptReplacer)
325
325
  ),
326
326
  externalRuntimeConfig.push("\x3c/script>"));
327
- importMap = {
327
+ importMap = onHeaders
328
+ ? {
329
+ preconnects: "",
330
+ fontPreloads: "",
331
+ highImagePreloads: "",
332
+ remainingCapacity:
333
+ 2 + ("number" === typeof maxHeadersLength ? maxHeadersLength : 2e3)
334
+ }
335
+ : null;
336
+ onHeaders = {
328
337
  placeholderPrefix: idPrefix + "P:",
329
338
  segmentPrefix: idPrefix + "S:",
330
339
  boundaryPrefix: idPrefix + "B:",
331
340
  startInlineScript: inlineScriptWithNonce,
332
- htmlChunks: null,
333
- headChunks: null,
341
+ preamble: createPreambleState(),
334
342
  externalRuntimeScript: externalRuntimeScript,
335
343
  bootstrapChunks: bootstrapChunks,
336
344
  importMapChunks: externalRuntimeConfig,
337
345
  onHeaders: onHeaders,
338
- headers: onHeaders
339
- ? {
340
- preconnects: "",
341
- fontPreloads: "",
342
- highImagePreloads: "",
343
- remainingCapacity:
344
- 2 + ("number" === typeof maxHeadersLength ? maxHeadersLength : 2e3)
345
- }
346
- : null,
346
+ headers: importMap,
347
347
  resets: {
348
348
  font: {},
349
349
  dns: {},
@@ -372,25 +372,27 @@ function createRenderState(
372
372
  stylesToHoist: !1
373
373
  };
374
374
  if (void 0 !== bootstrapScripts)
375
- for (onHeaders = 0; onHeaders < bootstrapScripts.length; onHeaders++)
376
- (externalRuntimeConfig = bootstrapScripts[onHeaders]),
377
- (idPrefix = inlineScriptWithNonce = void 0),
378
- (externalRuntimeScript = {
375
+ for (
376
+ inlineScriptWithNonce = 0;
377
+ inlineScriptWithNonce < bootstrapScripts.length;
378
+ inlineScriptWithNonce++
379
+ )
380
+ (externalRuntimeConfig = bootstrapScripts[inlineScriptWithNonce]),
381
+ (importMap = externalRuntimeScript = void 0),
382
+ (maxHeadersLength = {
379
383
  rel: "preload",
380
384
  as: "script",
381
385
  fetchPriority: "low",
382
386
  nonce: nonce
383
387
  }),
384
388
  "string" === typeof externalRuntimeConfig
385
- ? (externalRuntimeScript.href = maxHeadersLength =
386
- externalRuntimeConfig)
387
- : ((externalRuntimeScript.href = maxHeadersLength =
388
- externalRuntimeConfig.src),
389
- (externalRuntimeScript.integrity = idPrefix =
389
+ ? (maxHeadersLength.href = idPrefix = externalRuntimeConfig)
390
+ : ((maxHeadersLength.href = idPrefix = externalRuntimeConfig.src),
391
+ (maxHeadersLength.integrity = importMap =
390
392
  "string" === typeof externalRuntimeConfig.integrity
391
393
  ? externalRuntimeConfig.integrity
392
394
  : void 0),
393
- (externalRuntimeScript.crossOrigin = inlineScriptWithNonce =
395
+ (maxHeadersLength.crossOrigin = externalRuntimeScript =
394
396
  "string" === typeof externalRuntimeConfig ||
395
397
  null == externalRuntimeConfig.crossOrigin
396
398
  ? void 0
@@ -398,24 +400,24 @@ function createRenderState(
398
400
  ? "use-credentials"
399
401
  : "")),
400
402
  (externalRuntimeConfig = resumableState),
401
- (bootstrapScriptContent = maxHeadersLength),
403
+ (bootstrapScriptContent = idPrefix),
402
404
  (externalRuntimeConfig.scriptResources[bootstrapScriptContent] = null),
403
405
  (externalRuntimeConfig.moduleScriptResources[bootstrapScriptContent] =
404
406
  null),
405
407
  (externalRuntimeConfig = []),
406
- pushLinkImpl(externalRuntimeConfig, externalRuntimeScript),
407
- importMap.bootstrapScripts.add(externalRuntimeConfig),
408
- bootstrapChunks.push(
409
- '<script src="',
410
- escapeTextForBrowser(maxHeadersLength)
411
- ),
408
+ pushLinkImpl(externalRuntimeConfig, maxHeadersLength),
409
+ onHeaders.bootstrapScripts.add(externalRuntimeConfig),
410
+ bootstrapChunks.push('<script src="', escapeTextForBrowser(idPrefix)),
412
411
  nonce && bootstrapChunks.push('" nonce="', escapeTextForBrowser(nonce)),
413
- "string" === typeof idPrefix &&
414
- bootstrapChunks.push('" integrity="', escapeTextForBrowser(idPrefix)),
415
- "string" === typeof inlineScriptWithNonce &&
412
+ "string" === typeof importMap &&
413
+ bootstrapChunks.push(
414
+ '" integrity="',
415
+ escapeTextForBrowser(importMap)
416
+ ),
417
+ "string" === typeof externalRuntimeScript &&
416
418
  bootstrapChunks.push(
417
419
  '" crossorigin="',
418
- escapeTextForBrowser(inlineScriptWithNonce)
420
+ escapeTextForBrowser(externalRuntimeScript)
419
421
  ),
420
422
  bootstrapChunks.push('" async="">\x3c/script>');
421
423
  if (void 0 !== bootstrapModules)
@@ -424,52 +426,51 @@ function createRenderState(
424
426
  bootstrapScripts < bootstrapModules.length;
425
427
  bootstrapScripts++
426
428
  )
427
- (externalRuntimeScript = bootstrapModules[bootstrapScripts]),
428
- (inlineScriptWithNonce = maxHeadersLength = void 0),
429
- (idPrefix = {
429
+ (maxHeadersLength = bootstrapModules[bootstrapScripts]),
430
+ (externalRuntimeScript = idPrefix = void 0),
431
+ (importMap = {
430
432
  rel: "modulepreload",
431
433
  fetchPriority: "low",
432
434
  nonce: nonce
433
435
  }),
434
- "string" === typeof externalRuntimeScript
435
- ? (idPrefix.href = onHeaders = externalRuntimeScript)
436
- : ((idPrefix.href = onHeaders = externalRuntimeScript.src),
437
- (idPrefix.integrity = inlineScriptWithNonce =
438
- "string" === typeof externalRuntimeScript.integrity
439
- ? externalRuntimeScript.integrity
436
+ "string" === typeof maxHeadersLength
437
+ ? (importMap.href = inlineScriptWithNonce = maxHeadersLength)
438
+ : ((importMap.href = inlineScriptWithNonce = maxHeadersLength.src),
439
+ (importMap.integrity = externalRuntimeScript =
440
+ "string" === typeof maxHeadersLength.integrity
441
+ ? maxHeadersLength.integrity
440
442
  : void 0),
441
- (idPrefix.crossOrigin = maxHeadersLength =
442
- "string" === typeof externalRuntimeScript ||
443
- null == externalRuntimeScript.crossOrigin
443
+ (importMap.crossOrigin = idPrefix =
444
+ "string" === typeof maxHeadersLength ||
445
+ null == maxHeadersLength.crossOrigin
444
446
  ? void 0
445
- : "use-credentials" === externalRuntimeScript.crossOrigin
447
+ : "use-credentials" === maxHeadersLength.crossOrigin
446
448
  ? "use-credentials"
447
449
  : "")),
448
- (externalRuntimeScript = resumableState),
449
- (externalRuntimeConfig = onHeaders),
450
- (externalRuntimeScript.scriptResources[externalRuntimeConfig] = null),
451
- (externalRuntimeScript.moduleScriptResources[externalRuntimeConfig] =
452
- null),
453
- (externalRuntimeScript = []),
454
- pushLinkImpl(externalRuntimeScript, idPrefix),
455
- importMap.bootstrapScripts.add(externalRuntimeScript),
450
+ (maxHeadersLength = resumableState),
451
+ (externalRuntimeConfig = inlineScriptWithNonce),
452
+ (maxHeadersLength.scriptResources[externalRuntimeConfig] = null),
453
+ (maxHeadersLength.moduleScriptResources[externalRuntimeConfig] = null),
454
+ (maxHeadersLength = []),
455
+ pushLinkImpl(maxHeadersLength, importMap),
456
+ onHeaders.bootstrapScripts.add(maxHeadersLength),
456
457
  bootstrapChunks.push(
457
458
  '<script type="module" src="',
458
- escapeTextForBrowser(onHeaders)
459
+ escapeTextForBrowser(inlineScriptWithNonce)
459
460
  ),
460
461
  nonce && bootstrapChunks.push('" nonce="', escapeTextForBrowser(nonce)),
461
- "string" === typeof inlineScriptWithNonce &&
462
+ "string" === typeof externalRuntimeScript &&
462
463
  bootstrapChunks.push(
463
464
  '" integrity="',
464
- escapeTextForBrowser(inlineScriptWithNonce)
465
+ escapeTextForBrowser(externalRuntimeScript)
465
466
  ),
466
- "string" === typeof maxHeadersLength &&
467
+ "string" === typeof idPrefix &&
467
468
  bootstrapChunks.push(
468
469
  '" crossorigin="',
469
- escapeTextForBrowser(maxHeadersLength)
470
+ escapeTextForBrowser(idPrefix)
470
471
  ),
471
472
  bootstrapChunks.push('" async="">\x3c/script>');
472
- return importMap;
473
+ return onHeaders;
473
474
  }
474
475
  function createResumableState(
475
476
  identifierPrefix,
@@ -500,6 +501,9 @@ function createResumableState(
500
501
  moduleScriptResources: {}
501
502
  };
502
503
  }
504
+ function createPreambleState() {
505
+ return { htmlChunks: null, headChunks: null, bodyChunks: null };
506
+ }
503
507
  function createFormatContext(insertionMode, selectedValue, tagScope) {
504
508
  return {
505
509
  insertionMode: insertionMode,
@@ -518,33 +522,34 @@ function getChildFormatContext(parentContext, type, props) {
518
522
  parentContext.tagScope
519
523
  );
520
524
  case "svg":
521
- return createFormatContext(3, null, parentContext.tagScope);
525
+ return createFormatContext(4, null, parentContext.tagScope);
522
526
  case "picture":
523
527
  return createFormatContext(2, null, parentContext.tagScope | 2);
524
528
  case "math":
525
- return createFormatContext(4, null, parentContext.tagScope);
529
+ return createFormatContext(5, null, parentContext.tagScope);
526
530
  case "foreignObject":
527
531
  return createFormatContext(2, null, parentContext.tagScope);
528
532
  case "table":
529
- return createFormatContext(5, null, parentContext.tagScope);
533
+ return createFormatContext(6, null, parentContext.tagScope);
530
534
  case "thead":
531
535
  case "tbody":
532
536
  case "tfoot":
533
- return createFormatContext(6, null, parentContext.tagScope);
537
+ return createFormatContext(7, null, parentContext.tagScope);
534
538
  case "colgroup":
535
- return createFormatContext(8, null, parentContext.tagScope);
539
+ return createFormatContext(9, null, parentContext.tagScope);
536
540
  case "tr":
537
- return createFormatContext(7, null, parentContext.tagScope);
541
+ return createFormatContext(8, null, parentContext.tagScope);
542
+ case "head":
543
+ if (2 > parentContext.insertionMode)
544
+ return createFormatContext(3, null, parentContext.tagScope);
545
+ break;
546
+ case "html":
547
+ if (0 === parentContext.insertionMode)
548
+ return createFormatContext(1, null, parentContext.tagScope);
538
549
  }
539
- return 5 <= parentContext.insertionMode
550
+ return 6 <= parentContext.insertionMode || 2 > parentContext.insertionMode
540
551
  ? createFormatContext(2, null, parentContext.tagScope)
541
- : 0 === parentContext.insertionMode
542
- ? "html" === type
543
- ? createFormatContext(1, null, parentContext.tagScope)
544
- : createFormatContext(2, null, parentContext.tagScope)
545
- : 1 === parentContext.insertionMode
546
- ? createFormatContext(2, null, parentContext.tagScope)
547
- : parentContext;
552
+ : parentContext;
548
553
  }
549
554
  var styleNameCache = new Map();
550
555
  function pushStyleAttribute(target, style) {
@@ -1011,6 +1016,7 @@ function pushStartInstance$1(
1011
1016
  props,
1012
1017
  resumableState,
1013
1018
  renderState,
1019
+ preambleState,
1014
1020
  hoistableState,
1015
1021
  formatContext,
1016
1022
  textEmbedded,
@@ -1490,7 +1496,7 @@ function pushStartInstance$1(
1490
1496
  return JSCompiler_inline_result$jscomp$2;
1491
1497
  case "title":
1492
1498
  if (
1493
- 3 === formatContext.insertionMode ||
1499
+ 4 === formatContext.insertionMode ||
1494
1500
  formatContext.tagScope & 1 ||
1495
1501
  null != props.itemProp
1496
1502
  )
@@ -1509,7 +1515,7 @@ function pushStartInstance$1(
1509
1515
  href = props.href,
1510
1516
  precedence = props.precedence;
1511
1517
  if (
1512
- 3 === formatContext.insertionMode ||
1518
+ 4 === formatContext.insertionMode ||
1513
1519
  formatContext.tagScope & 1 ||
1514
1520
  null != props.itemProp ||
1515
1521
  "string" !== typeof rel ||
@@ -1591,7 +1597,7 @@ function pushStartInstance$1(
1591
1597
  "symbol" === typeof asyncProp ||
1592
1598
  props.onLoad ||
1593
1599
  props.onError ||
1594
- 3 === formatContext.insertionMode ||
1600
+ 4 === formatContext.insertionMode ||
1595
1601
  formatContext.tagScope & 1 ||
1596
1602
  null != props.itemProp
1597
1603
  )
@@ -1632,7 +1638,7 @@ function pushStartInstance$1(
1632
1638
  var precedence$jscomp$0 = props.precedence,
1633
1639
  href$jscomp$0 = props.href;
1634
1640
  if (
1635
- 3 === formatContext.insertionMode ||
1641
+ 4 === formatContext.insertionMode ||
1636
1642
  formatContext.tagScope & 1 ||
1637
1643
  null != props.itemProp ||
1638
1644
  "string" !== typeof precedence$jscomp$0 ||
@@ -1735,7 +1741,7 @@ function pushStartInstance$1(
1735
1741
  return JSCompiler_inline_result$jscomp$6;
1736
1742
  case "meta":
1737
1743
  if (
1738
- 3 === formatContext.insertionMode ||
1744
+ 4 === formatContext.insertionMode ||
1739
1745
  formatContext.tagScope & 1 ||
1740
1746
  null != props.itemProp
1741
1747
  )
@@ -1913,10 +1919,13 @@ function pushStartInstance$1(
1913
1919
  case "missing-glyph":
1914
1920
  break;
1915
1921
  case "head":
1916
- if (2 > formatContext.insertionMode && null === renderState.headChunks) {
1917
- renderState.headChunks = [];
1922
+ if (2 > formatContext.insertionMode) {
1923
+ var preamble = preambleState || renderState.preamble;
1924
+ if (preamble.headChunks)
1925
+ throw Error("The `<head>` tag may only be rendered once.");
1926
+ preamble.headChunks = [];
1918
1927
  var JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
1919
- renderState.headChunks,
1928
+ preamble.headChunks,
1920
1929
  props,
1921
1930
  "head"
1922
1931
  );
@@ -1927,24 +1936,42 @@ function pushStartInstance$1(
1927
1936
  "head"
1928
1937
  );
1929
1938
  return JSCompiler_inline_result$jscomp$9;
1930
- case "html":
1931
- if (
1932
- 0 === formatContext.insertionMode &&
1933
- null === renderState.htmlChunks
1934
- ) {
1935
- renderState.htmlChunks = ["<!DOCTYPE html>"];
1939
+ case "body":
1940
+ if (2 > formatContext.insertionMode) {
1941
+ var preamble$jscomp$0 = preambleState || renderState.preamble;
1942
+ if (preamble$jscomp$0.bodyChunks)
1943
+ throw Error("The `<body>` tag may only be rendered once.");
1944
+ preamble$jscomp$0.bodyChunks = [];
1936
1945
  var JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
1937
- renderState.htmlChunks,
1946
+ preamble$jscomp$0.bodyChunks,
1938
1947
  props,
1939
- "html"
1948
+ "body"
1940
1949
  );
1941
1950
  } else
1942
1951
  JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
1943
1952
  target$jscomp$0,
1944
1953
  props,
1945
- "html"
1954
+ "body"
1946
1955
  );
1947
1956
  return JSCompiler_inline_result$jscomp$10;
1957
+ case "html":
1958
+ if (0 === formatContext.insertionMode) {
1959
+ var preamble$jscomp$1 = preambleState || renderState.preamble;
1960
+ if (preamble$jscomp$1.htmlChunks)
1961
+ throw Error("The `<html>` tag may only be rendered once.");
1962
+ preamble$jscomp$1.htmlChunks = ["<!DOCTYPE html>"];
1963
+ var JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(
1964
+ preamble$jscomp$1.htmlChunks,
1965
+ props,
1966
+ "html"
1967
+ );
1968
+ } else
1969
+ JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(
1970
+ target$jscomp$0,
1971
+ props,
1972
+ "html"
1973
+ );
1974
+ return JSCompiler_inline_result$jscomp$11;
1948
1975
  default:
1949
1976
  if (-1 !== type.indexOf("-")) {
1950
1977
  target$jscomp$0.push(startChunkForTag(type));
@@ -2005,6 +2032,15 @@ function endChunkForTag(tag) {
2005
2032
  void 0 === chunk && ((chunk = "</" + tag + ">"), endTagCache.set(tag, chunk));
2006
2033
  return chunk;
2007
2034
  }
2035
+ function hoistPreambleState(renderState, preambleState) {
2036
+ renderState = renderState.preamble;
2037
+ null === renderState.htmlChunks &&
2038
+ (renderState.htmlChunks = preambleState.htmlChunks);
2039
+ null === renderState.headChunks &&
2040
+ (renderState.headChunks = preambleState.headChunks);
2041
+ null === renderState.bodyChunks &&
2042
+ (renderState.bodyChunks = preambleState.bodyChunks);
2043
+ }
2008
2044
  function writeBootstrap(destination, renderState) {
2009
2045
  renderState = renderState.bootstrapChunks;
2010
2046
  for (var i = 0; i < renderState.length - 1; i++)
@@ -2028,6 +2064,7 @@ function writeStartSegment(destination, renderState, formatContext, id) {
2028
2064
  switch (formatContext.insertionMode) {
2029
2065
  case 0:
2030
2066
  case 1:
2067
+ case 3:
2031
2068
  case 2:
2032
2069
  return (
2033
2070
  destination.push('<div hidden id="'),
@@ -2036,7 +2073,7 @@ function writeStartSegment(destination, renderState, formatContext, id) {
2036
2073
  destination.push(renderState),
2037
2074
  destination.push('">')
2038
2075
  );
2039
- case 3:
2076
+ case 4:
2040
2077
  return (
2041
2078
  destination.push('<svg aria-hidden="true" style="display:none" id="'),
2042
2079
  destination.push(renderState.segmentPrefix),
@@ -2044,7 +2081,7 @@ function writeStartSegment(destination, renderState, formatContext, id) {
2044
2081
  destination.push(renderState),
2045
2082
  destination.push('">')
2046
2083
  );
2047
- case 4:
2084
+ case 5:
2048
2085
  return (
2049
2086
  destination.push('<math aria-hidden="true" style="display:none" id="'),
2050
2087
  destination.push(renderState.segmentPrefix),
@@ -2052,7 +2089,7 @@ function writeStartSegment(destination, renderState, formatContext, id) {
2052
2089
  destination.push(renderState),
2053
2090
  destination.push('">')
2054
2091
  );
2055
- case 5:
2092
+ case 6:
2056
2093
  return (
2057
2094
  destination.push('<table hidden id="'),
2058
2095
  destination.push(renderState.segmentPrefix),
@@ -2060,7 +2097,7 @@ function writeStartSegment(destination, renderState, formatContext, id) {
2060
2097
  destination.push(renderState),
2061
2098
  destination.push('">')
2062
2099
  );
2063
- case 6:
2100
+ case 7:
2064
2101
  return (
2065
2102
  destination.push('<table hidden><tbody id="'),
2066
2103
  destination.push(renderState.segmentPrefix),
@@ -2068,7 +2105,7 @@ function writeStartSegment(destination, renderState, formatContext, id) {
2068
2105
  destination.push(renderState),
2069
2106
  destination.push('">')
2070
2107
  );
2071
- case 7:
2108
+ case 8:
2072
2109
  return (
2073
2110
  destination.push('<table hidden><tr id="'),
2074
2111
  destination.push(renderState.segmentPrefix),
@@ -2076,7 +2113,7 @@ function writeStartSegment(destination, renderState, formatContext, id) {
2076
2113
  destination.push(renderState),
2077
2114
  destination.push('">')
2078
2115
  );
2079
- case 8:
2116
+ case 9:
2080
2117
  return (
2081
2118
  destination.push('<table hidden><colgroup id="'),
2082
2119
  destination.push(renderState.segmentPrefix),
@@ -2092,19 +2129,20 @@ function writeEndSegment(destination, formatContext) {
2092
2129
  switch (formatContext.insertionMode) {
2093
2130
  case 0:
2094
2131
  case 1:
2132
+ case 3:
2095
2133
  case 2:
2096
2134
  return destination.push("</div>");
2097
- case 3:
2098
- return destination.push("</svg>");
2099
2135
  case 4:
2100
- return destination.push("</math>");
2136
+ return destination.push("</svg>");
2101
2137
  case 5:
2102
- return destination.push("</table>");
2138
+ return destination.push("</math>");
2103
2139
  case 6:
2104
- return destination.push("</tbody></table>");
2140
+ return destination.push("</table>");
2105
2141
  case 7:
2106
- return destination.push("</tr></table>");
2142
+ return destination.push("</tbody></table>");
2107
2143
  case 8:
2144
+ return destination.push("</tr></table>");
2145
+ case 9:
2108
2146
  return destination.push("</colgroup></table>");
2109
2147
  default:
2110
2148
  throw Error("Unknown insertion mode. This is a bug in React.");
@@ -3250,7 +3288,7 @@ function RequestInstance(
3250
3288
  this.status = 10;
3251
3289
  this.fatalError = null;
3252
3290
  this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
3253
- this.completedRootSegment = null;
3291
+ this.completedPreambleSegments = this.completedRootSegment = null;
3254
3292
  this.abortableTasks = abortSet;
3255
3293
  this.pingedTasks = [];
3256
3294
  this.clientRenderedBoundaries = [];
@@ -3309,6 +3347,7 @@ function createRequest(
3309
3347
  null,
3310
3348
  renderState,
3311
3349
  null,
3350
+ null,
3312
3351
  resumableState.abortableTasks,
3313
3352
  null,
3314
3353
  rootFormatContext,
@@ -3327,7 +3366,12 @@ function pingTask(request, task) {
3327
3366
  ((request.flushScheduled = null !== request.destination),
3328
3367
  performWork(request));
3329
3368
  }
3330
- function createSuspenseBoundary(request, fallbackAbortableTasks) {
3369
+ function createSuspenseBoundary(
3370
+ request,
3371
+ fallbackAbortableTasks,
3372
+ contentPreamble,
3373
+ fallbackPreamble
3374
+ ) {
3331
3375
  return {
3332
3376
  status: 0,
3333
3377
  rootSegmentID: -1,
@@ -3339,6 +3383,8 @@ function createSuspenseBoundary(request, fallbackAbortableTasks) {
3339
3383
  errorDigest: null,
3340
3384
  contentState: createHoistableState(),
3341
3385
  fallbackState: createHoistableState(),
3386
+ contentPreamble: contentPreamble,
3387
+ fallbackPreamble: fallbackPreamble,
3342
3388
  trackedContentKeyPath: null,
3343
3389
  trackedFallbackNode: null
3344
3390
  };
@@ -3350,6 +3396,7 @@ function createRenderTask(
3350
3396
  childIndex,
3351
3397
  blockedBoundary,
3352
3398
  blockedSegment,
3399
+ blockedPreamble,
3353
3400
  hoistableState,
3354
3401
  abortSet,
3355
3402
  keyPath,
@@ -3372,6 +3419,7 @@ function createRenderTask(
3372
3419
  },
3373
3420
  blockedBoundary: blockedBoundary,
3374
3421
  blockedSegment: blockedSegment,
3422
+ blockedPreamble: blockedPreamble,
3375
3423
  hoistableState: hoistableState,
3376
3424
  abortSet: abortSet,
3377
3425
  keyPath: keyPath,
@@ -3415,6 +3463,7 @@ function createReplayTask(
3415
3463
  },
3416
3464
  blockedBoundary: blockedBoundary,
3417
3465
  blockedSegment: null,
3466
+ blockedPreamble: null,
3418
3467
  hoistableState: hoistableState,
3419
3468
  abortSet: abortSet,
3420
3469
  keyPath: keyPath,
@@ -3438,11 +3487,12 @@ function createPendingSegment(
3438
3487
  ) {
3439
3488
  return {
3440
3489
  status: 0,
3490
+ parentFlushed: !1,
3441
3491
  id: -1,
3442
3492
  index: index,
3443
- parentFlushed: !1,
3444
3493
  chunks: [],
3445
3494
  children: [],
3495
+ preambleChildren: [],
3446
3496
  parentFormatContext: parentFormatContext,
3447
3497
  boundary: boundary,
3448
3498
  lastPushedText: lastPushedText,
@@ -3681,9 +3731,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
3681
3731
  defaultProps = newProps.chunks;
3682
3732
  initialState = request.resumableState;
3683
3733
  ref = request.renderState;
3684
- propName$23 = task.hoistableState;
3685
- propName = task.formatContext;
3686
- var textEmbedded = newProps.lastPushedText,
3734
+ propName$23 = task.blockedPreamble;
3735
+ propName = task.hoistableState;
3736
+ var formatContext = task.formatContext,
3737
+ textEmbedded = newProps.lastPushedText,
3687
3738
  isFallback = task.isFallback;
3688
3739
  for (contextType in props)
3689
3740
  if (hasOwnProperty.call(props, contextType)) {
@@ -3699,7 +3750,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
3699
3750
  ") in renderToHTML because the HTML will never be hydrated so they can never get called."
3700
3751
  );
3701
3752
  }
3702
- initialState = pushStartInstance$1(
3753
+ contextType = pushStartInstance$1(
3703
3754
  defaultProps,
3704
3755
  type,
3705
3756
  props,
@@ -3707,17 +3758,48 @@ function renderElement(request, task, keyPath, type, props, ref) {
3707
3758
  ref,
3708
3759
  propName$23,
3709
3760
  propName,
3761
+ formatContext,
3710
3762
  textEmbedded,
3711
3763
  isFallback
3712
3764
  );
3713
3765
  newProps.lastPushedText = !1;
3714
3766
  defaultProps = task.formatContext;
3715
- contextType = task.keyPath;
3716
- task.formatContext = getChildFormatContext(defaultProps, type, props);
3767
+ initialState = task.keyPath;
3717
3768
  task.keyPath = keyPath;
3718
- renderNode(request, task, initialState, -1);
3769
+ 3 ===
3770
+ (task.formatContext = getChildFormatContext(defaultProps, type, props))
3771
+ .insertionMode
3772
+ ? ((keyPath = createPendingSegment(
3773
+ request,
3774
+ 0,
3775
+ null,
3776
+ task.formatContext,
3777
+ !1,
3778
+ !1
3779
+ )),
3780
+ newProps.preambleChildren.push(keyPath),
3781
+ (keyPath = createRenderTask(
3782
+ request,
3783
+ null,
3784
+ contextType,
3785
+ -1,
3786
+ task.blockedBoundary,
3787
+ keyPath,
3788
+ task.blockedPreamble,
3789
+ task.hoistableState,
3790
+ request.abortableTasks,
3791
+ task.keyPath,
3792
+ task.formatContext,
3793
+ task.context,
3794
+ task.treeContext,
3795
+ task.componentStack,
3796
+ task.isFallback
3797
+ )),
3798
+ pushComponentStack(keyPath),
3799
+ request.pingedTasks.push(keyPath))
3800
+ : renderNode(request, task, contextType, -1);
3719
3801
  task.formatContext = defaultProps;
3720
- task.keyPath = contextType;
3802
+ task.keyPath = initialState;
3721
3803
  a: {
3722
3804
  task = newProps.chunks;
3723
3805
  request = request.resumableState;
@@ -3752,6 +3834,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
3752
3834
  request.hasHtml = !0;
3753
3835
  break a;
3754
3836
  }
3837
+ break;
3838
+ case "head":
3839
+ if (1 >= defaultProps.insertionMode) break a;
3755
3840
  }
3756
3841
  task.push(endChunkForTag(type));
3757
3842
  }
@@ -3802,24 +3887,33 @@ function renderElement(request, task, keyPath, type, props, ref) {
3802
3887
  } else {
3803
3888
  type = task.keyPath;
3804
3889
  isFallback = task.blockedBoundary;
3890
+ contextType = task.blockedPreamble;
3805
3891
  propValue = task.hoistableState;
3806
- contextType = task.blockedSegment;
3807
- ref = props.fallback;
3892
+ ref = task.blockedSegment;
3893
+ propName$23 = props.fallback;
3808
3894
  props = props.children;
3809
3895
  var fallbackAbortSet = new Set();
3810
- propName$23 = createSuspenseBoundary(request, fallbackAbortSet);
3896
+ propName =
3897
+ 2 > task.formatContext.insertionMode
3898
+ ? createSuspenseBoundary(
3899
+ request,
3900
+ fallbackAbortSet,
3901
+ createPreambleState(),
3902
+ createPreambleState()
3903
+ )
3904
+ : createSuspenseBoundary(request, fallbackAbortSet, null, null);
3811
3905
  null !== request.trackedPostpones &&
3812
- (propName$23.trackedContentKeyPath = keyPath);
3813
- propName = createPendingSegment(
3906
+ (propName.trackedContentKeyPath = keyPath);
3907
+ formatContext = createPendingSegment(
3814
3908
  request,
3815
- contextType.chunks.length,
3816
- propName$23,
3909
+ ref.chunks.length,
3910
+ propName,
3817
3911
  task.formatContext,
3818
3912
  !1,
3819
3913
  !1
3820
3914
  );
3821
- contextType.children.push(propName);
3822
- contextType.lastPushedText = !1;
3915
+ ref.children.push(formatContext);
3916
+ ref.lastPushedText = !1;
3823
3917
  textEmbedded = createPendingSegment(
3824
3918
  request,
3825
3919
  0,
@@ -3833,27 +3927,33 @@ function renderElement(request, task, keyPath, type, props, ref) {
3833
3927
  newProps = [keyPath[0], "Suspense Fallback", keyPath[2]];
3834
3928
  defaultProps = [newProps[1], newProps[2], [], null];
3835
3929
  request.trackedPostpones.workingMap.set(newProps, defaultProps);
3836
- propName$23.trackedFallbackNode = defaultProps;
3837
- task.blockedSegment = propName;
3930
+ propName.trackedFallbackNode = defaultProps;
3931
+ task.blockedSegment = formatContext;
3932
+ task.blockedPreamble = propName.fallbackPreamble;
3838
3933
  task.keyPath = newProps;
3839
- propName.status = 6;
3934
+ formatContext.status = 6;
3840
3935
  try {
3841
- renderNode(request, task, ref, -1), (propName.status = 1);
3936
+ renderNode(request, task, propName$23, -1),
3937
+ (formatContext.status = 1);
3842
3938
  } catch (thrownValue) {
3843
3939
  throw (
3844
- ((propName.status = 12 === request.status ? 3 : 4), thrownValue)
3940
+ ((formatContext.status = 12 === request.status ? 3 : 4),
3941
+ thrownValue)
3845
3942
  );
3846
3943
  } finally {
3847
- (task.blockedSegment = contextType), (task.keyPath = type);
3944
+ (task.blockedSegment = ref),
3945
+ (task.blockedPreamble = contextType),
3946
+ (task.keyPath = type);
3848
3947
  }
3849
3948
  task = createRenderTask(
3850
3949
  request,
3851
3950
  null,
3852
3951
  props,
3853
3952
  -1,
3854
- propName$23,
3953
+ propName,
3855
3954
  textEmbedded,
3856
- propName$23.contentState,
3955
+ propName.contentPreamble,
3956
+ propName.contentState,
3857
3957
  task.abortSet,
3858
3958
  keyPath,
3859
3959
  task.formatContext,
@@ -3865,8 +3965,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
3865
3965
  pushComponentStack(task);
3866
3966
  request.pingedTasks.push(task);
3867
3967
  } else {
3868
- task.blockedBoundary = propName$23;
3869
- task.hoistableState = propName$23.contentState;
3968
+ task.blockedBoundary = propName;
3969
+ task.blockedPreamble = propName.contentPreamble;
3970
+ task.hoistableState = propName.contentState;
3870
3971
  task.blockedSegment = textEmbedded;
3871
3972
  task.keyPath = keyPath;
3872
3973
  textEmbedded.status = 6;
@@ -3874,14 +3975,17 @@ function renderElement(request, task, keyPath, type, props, ref) {
3874
3975
  if (
3875
3976
  (renderNode(request, task, props, -1),
3876
3977
  (textEmbedded.status = 1),
3877
- queueCompletedSegment(propName$23, textEmbedded),
3878
- 0 === propName$23.pendingTasks && 0 === propName$23.status)
3978
+ queueCompletedSegment(propName, textEmbedded),
3979
+ 0 === propName.pendingTasks && 0 === propName.status)
3879
3980
  ) {
3880
- propName$23.status = 1;
3981
+ propName.status = 1;
3982
+ 0 === request.pendingRootTasks &&
3983
+ task.blockedPreamble &&
3984
+ preparePreamble(request);
3881
3985
  break a;
3882
3986
  }
3883
3987
  } catch (thrownValue$18) {
3884
- (propName$23.status = 4),
3988
+ (propName.status = 4),
3885
3989
  12 === request.status
3886
3990
  ? ((textEmbedded.status = 3), (newProps = request.fatalError))
3887
3991
  : ((textEmbedded.status = 4), (newProps = thrownValue$18)),
@@ -3896,22 +4000,24 @@ function renderElement(request, task, keyPath, type, props, ref) {
3896
4000
  newProps,
3897
4001
  defaultProps
3898
4002
  )),
3899
- (propName$23.errorDigest = initialState),
3900
- untrackBoundary(request, propName$23);
4003
+ (propName.errorDigest = initialState),
4004
+ untrackBoundary(request, propName);
3901
4005
  } finally {
3902
4006
  (task.blockedBoundary = isFallback),
4007
+ (task.blockedPreamble = contextType),
3903
4008
  (task.hoistableState = propValue),
3904
- (task.blockedSegment = contextType),
4009
+ (task.blockedSegment = ref),
3905
4010
  (task.keyPath = type);
3906
4011
  }
3907
4012
  task = createRenderTask(
3908
4013
  request,
3909
4014
  null,
3910
- ref,
4015
+ propName$23,
3911
4016
  -1,
3912
4017
  isFallback,
3913
- propName,
3914
- propName$23.fallbackState,
4018
+ formatContext,
4019
+ propName.fallbackPreamble,
4020
+ propName.fallbackState,
3915
4021
  fallbackAbortSet,
3916
4022
  [keyPath[0], "Suspense Fallback", keyPath[2]],
3917
4023
  task.formatContext,
@@ -3930,9 +4036,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
3930
4036
  switch (type.$$typeof) {
3931
4037
  case REACT_FORWARD_REF_TYPE:
3932
4038
  if ("ref" in props)
3933
- for (textEmbedded in ((newProps = {}), props))
3934
- "ref" !== textEmbedded &&
3935
- (newProps[textEmbedded] = props[textEmbedded]);
4039
+ for (formatContext in ((newProps = {}), props))
4040
+ "ref" !== formatContext &&
4041
+ (newProps[formatContext] = props[formatContext]);
3936
4042
  else newProps = props;
3937
4043
  type = renderWithHooks(
3938
4044
  request,
@@ -4134,17 +4240,27 @@ function retryNode(request, task) {
4134
4240
  previousReplaySet = task.replay,
4135
4241
  parentBoundary = task.blockedBoundary,
4136
4242
  parentHoistableState = task.hoistableState,
4137
- content = props.children;
4138
- props = props.fallback;
4139
- var fallbackAbortSet = new Set(),
4140
- resumedBoundary = createSuspenseBoundary(
4141
- request,
4142
- fallbackAbortSet
4143
- );
4144
- resumedBoundary.parentFlushed = !0;
4145
- resumedBoundary.rootSegmentID = ref;
4146
- task.blockedBoundary = resumedBoundary;
4147
- task.hoistableState = resumedBoundary.contentState;
4243
+ content = props.children,
4244
+ fallback = props.fallback,
4245
+ fallbackAbortSet = new Set();
4246
+ props =
4247
+ 2 > task.formatContext.insertionMode
4248
+ ? createSuspenseBoundary(
4249
+ request,
4250
+ fallbackAbortSet,
4251
+ createPreambleState(),
4252
+ createPreambleState()
4253
+ )
4254
+ : createSuspenseBoundary(
4255
+ request,
4256
+ fallbackAbortSet,
4257
+ null,
4258
+ null
4259
+ );
4260
+ props.parentFlushed = !0;
4261
+ props.rootSegmentID = ref;
4262
+ task.blockedBoundary = props;
4263
+ task.hoistableState = props.contentState;
4148
4264
  task.keyPath = key;
4149
4265
  task.replay = {
4150
4266
  nodes: replay,
@@ -4161,16 +4277,13 @@ function retryNode(request, task) {
4161
4277
  "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
4162
4278
  );
4163
4279
  task.replay.pendingTasks--;
4164
- if (
4165
- 0 === resumedBoundary.pendingTasks &&
4166
- 0 === resumedBoundary.status
4167
- ) {
4168
- resumedBoundary.status = 1;
4169
- request.completedBoundaries.push(resumedBoundary);
4280
+ if (0 === props.pendingTasks && 0 === props.status) {
4281
+ props.status = 1;
4282
+ request.completedBoundaries.push(props);
4170
4283
  break b;
4171
4284
  }
4172
4285
  } catch (error) {
4173
- (resumedBoundary.status = 4),
4286
+ (props.status = 4),
4174
4287
  (childNodes = getThrownInfo(task.componentStack)),
4175
4288
  "object" === typeof error &&
4176
4289
  null !== error &&
@@ -4182,11 +4295,9 @@ function retryNode(request, task) {
4182
4295
  error,
4183
4296
  childNodes
4184
4297
  )),
4185
- (resumedBoundary.errorDigest = type),
4298
+ (props.errorDigest = type),
4186
4299
  task.replay.pendingTasks--,
4187
- request.clientRenderedBoundaries.push(
4188
- resumedBoundary
4189
- );
4300
+ request.clientRenderedBoundaries.push(props);
4190
4301
  } finally {
4191
4302
  (task.blockedBoundary = parentBoundary),
4192
4303
  (task.hoistableState = parentHoistableState),
@@ -4201,10 +4312,10 @@ function retryNode(request, task) {
4201
4312
  slots: node$jscomp$0,
4202
4313
  pendingTasks: 0
4203
4314
  },
4204
- props,
4315
+ fallback,
4205
4316
  -1,
4206
4317
  parentBoundary,
4207
- resumedBoundary.fallbackState,
4318
+ props.fallbackState,
4208
4319
  fallbackAbortSet,
4209
4320
  [key[0], "Suspense Fallback", key[2]],
4210
4321
  task.formatContext,
@@ -4534,6 +4645,7 @@ function spawnNewSuspendedRenderTask(request, task, thenableState) {
4534
4645
  task.childIndex,
4535
4646
  task.blockedBoundary,
4536
4647
  newSegment,
4648
+ task.blockedPreamble,
4537
4649
  task.hoistableState,
4538
4650
  task.abortSet,
4539
4651
  task.keyPath,
@@ -4719,7 +4831,12 @@ function abortRemainingReplayNodes(
4719
4831
  node = node[5];
4720
4832
  var request = request$jscomp$0,
4721
4833
  errorDigest = errorDigest$jscomp$0,
4722
- resumedBoundary = createSuspenseBoundary(request, new Set());
4834
+ resumedBoundary = createSuspenseBoundary(
4835
+ request,
4836
+ new Set(),
4837
+ null,
4838
+ null
4839
+ );
4723
4840
  resumedBoundary.parentFlushed = !0;
4724
4841
  resumedBoundary.rootSegmentID = node;
4725
4842
  resumedBoundary.status = 4;
@@ -4909,6 +5026,7 @@ function safelyEmitEarlyPreloads(request, shellComplete) {
4909
5026
  }
4910
5027
  function completeShell(request) {
4911
5028
  null === request.trackedPostpones && safelyEmitEarlyPreloads(request, !0);
5029
+ null === request.trackedPostpones && preparePreamble(request);
4912
5030
  request.onShellError = noop;
4913
5031
  request = request.onShellReady;
4914
5032
  request();
@@ -4921,6 +5039,7 @@ function completeAll(request) {
4921
5039
  : null === request.completedRootSegment ||
4922
5040
  5 !== request.completedRootSegment.status
4923
5041
  );
5042
+ preparePreamble(request);
4924
5043
  request = request.onAllReady;
4925
5044
  request();
4926
5045
  }
@@ -4961,7 +5080,11 @@ function finishedTask(request, boundary, segment) {
4961
5080
  request.completedBoundaries.push(boundary),
4962
5081
  1 === boundary.status &&
4963
5082
  (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
4964
- boundary.fallbackAbortableTasks.clear()))
5083
+ boundary.fallbackAbortableTasks.clear(),
5084
+ 0 === request.pendingRootTasks &&
5085
+ null === request.trackedPostpones &&
5086
+ null !== boundary.contentPreamble &&
5087
+ preparePreamble(request)))
4965
5088
  : null !== segment &&
4966
5089
  segment.parentFlushed &&
4967
5090
  1 === segment.status &&
@@ -5150,7 +5273,11 @@ function performWork(request$jscomp$1) {
5150
5273
  (boundary.errorDigest = request$jscomp$0),
5151
5274
  untrackBoundary(request, boundary),
5152
5275
  boundary.parentFlushed &&
5153
- request.clientRenderedBoundaries.push(boundary)));
5276
+ request.clientRenderedBoundaries.push(boundary),
5277
+ 0 === request.pendingRootTasks &&
5278
+ null === request.trackedPostpones &&
5279
+ null !== boundary.contentPreamble &&
5280
+ preparePreamble(request)));
5154
5281
  request.allPendingTasks--;
5155
5282
  0 === request.allPendingTasks && completeAll(request);
5156
5283
  }
@@ -5173,6 +5300,85 @@ function performWork(request$jscomp$1) {
5173
5300
  }
5174
5301
  }
5175
5302
  }
5303
+ function preparePreambleFromSubtree(
5304
+ request,
5305
+ segment,
5306
+ collectedPreambleSegments
5307
+ ) {
5308
+ segment.preambleChildren.length &&
5309
+ collectedPreambleSegments.push(segment.preambleChildren);
5310
+ for (var pendingPreambles = !1, i = 0; i < segment.children.length; i++)
5311
+ pendingPreambles =
5312
+ preparePreambleFromSegment(
5313
+ request,
5314
+ segment.children[i],
5315
+ collectedPreambleSegments
5316
+ ) || pendingPreambles;
5317
+ return pendingPreambles;
5318
+ }
5319
+ function preparePreambleFromSegment(
5320
+ request,
5321
+ segment,
5322
+ collectedPreambleSegments
5323
+ ) {
5324
+ var boundary = segment.boundary;
5325
+ if (null === boundary)
5326
+ return preparePreambleFromSubtree(
5327
+ request,
5328
+ segment,
5329
+ collectedPreambleSegments
5330
+ );
5331
+ var preamble = boundary.contentPreamble,
5332
+ fallbackPreamble = boundary.fallbackPreamble;
5333
+ if (null === preamble || null === fallbackPreamble) return !1;
5334
+ switch (boundary.status) {
5335
+ case 1:
5336
+ hoistPreambleState(request.renderState, preamble);
5337
+ segment = boundary.completedSegments[0];
5338
+ if (!segment)
5339
+ throw Error(
5340
+ "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
5341
+ );
5342
+ return preparePreambleFromSubtree(
5343
+ request,
5344
+ segment,
5345
+ collectedPreambleSegments
5346
+ );
5347
+ case 5:
5348
+ if (null !== request.trackedPostpones) return !0;
5349
+ case 4:
5350
+ if (1 === segment.status)
5351
+ return (
5352
+ hoistPreambleState(request.renderState, fallbackPreamble),
5353
+ preparePreambleFromSubtree(
5354
+ request,
5355
+ segment,
5356
+ collectedPreambleSegments
5357
+ )
5358
+ );
5359
+ default:
5360
+ return !0;
5361
+ }
5362
+ }
5363
+ function preparePreamble(request) {
5364
+ if (
5365
+ request.completedRootSegment &&
5366
+ null === request.completedPreambleSegments
5367
+ ) {
5368
+ var collectedPreambleSegments = [],
5369
+ hasPendingPreambles = preparePreambleFromSegment(
5370
+ request,
5371
+ request.completedRootSegment,
5372
+ collectedPreambleSegments
5373
+ ),
5374
+ preamble = request.renderState.preamble;
5375
+ if (
5376
+ !1 === hasPendingPreambles ||
5377
+ (preamble.headChunks && preamble.bodyChunks)
5378
+ )
5379
+ request.completedPreambleSegments = collectedPreambleSegments;
5380
+ }
5381
+ }
5176
5382
  function flushSubtree(request, destination, segment, hoistableState) {
5177
5383
  segment.parentFlushed = !0;
5178
5384
  switch (segment.status) {
@@ -5387,6 +5593,8 @@ function flushCompletedQueues(request, destination) {
5387
5593
  completedRootSegment = request.completedRootSegment;
5388
5594
  if (null !== completedRootSegment) {
5389
5595
  if (5 === completedRootSegment.status) return;
5596
+ var completedPreambleSegments = request.completedPreambleSegments;
5597
+ if (null === completedPreambleSegments) return;
5390
5598
  var renderState = request.renderState;
5391
5599
  if (
5392
5600
  (0 !== request.allPendingTasks ||
@@ -5401,8 +5609,9 @@ function flushCompletedQueues(request, destination) {
5401
5609
  ((resumableState.scriptResources[src] = null),
5402
5610
  renderState.scripts.add(chunks));
5403
5611
  }
5404
- var htmlChunks = renderState.htmlChunks,
5405
- headChunks = renderState.headChunks,
5612
+ var preamble = renderState.preamble,
5613
+ htmlChunks = preamble.htmlChunks,
5614
+ headChunks = preamble.headChunks,
5406
5615
  i$jscomp$0;
5407
5616
  if (htmlChunks) {
5408
5617
  for (i$jscomp$0 = 0; i$jscomp$0 < htmlChunks.length; i$jscomp$0++)
@@ -5445,11 +5654,38 @@ function flushCompletedQueues(request, destination) {
5445
5654
  var hoistableChunks = renderState.hoistableChunks;
5446
5655
  for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
5447
5656
  destination.push(hoistableChunks[i$jscomp$0]);
5448
- hoistableChunks.length = 0;
5449
- if (htmlChunks && null === headChunks) {
5657
+ for (
5658
+ renderState = hoistableChunks.length = 0;
5659
+ renderState < completedPreambleSegments.length;
5660
+ renderState++
5661
+ ) {
5662
+ var segments = completedPreambleSegments[renderState];
5663
+ for (
5664
+ _renderState$external = 0;
5665
+ _renderState$external < segments.length;
5666
+ _renderState$external++
5667
+ )
5668
+ flushSegment(
5669
+ request,
5670
+ destination,
5671
+ segments[_renderState$external],
5672
+ null
5673
+ );
5674
+ }
5675
+ var preamble$jscomp$0 = request.renderState.preamble,
5676
+ headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
5677
+ if (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) {
5450
5678
  var chunk$jscomp$0 = endChunkForTag("head");
5451
5679
  destination.push(chunk$jscomp$0);
5452
5680
  }
5681
+ var bodyChunks = preamble$jscomp$0.bodyChunks;
5682
+ if (bodyChunks)
5683
+ for (
5684
+ completedPreambleSegments = 0;
5685
+ completedPreambleSegments < bodyChunks.length;
5686
+ completedPreambleSegments++
5687
+ )
5688
+ destination.push(bodyChunks[completedPreambleSegments]);
5453
5689
  flushSegment(request, destination, completedRootSegment, null);
5454
5690
  request.completedRootSegment = null;
5455
5691
  writeBootstrap(destination, request.renderState);
@@ -5717,4 +5953,4 @@ exports.experimental_renderToHTML = function (children, options) {
5717
5953
  });
5718
5954
  });
5719
5955
  };
5720
- exports.version = "19.1.0-experimental-d46b04a2-20250117";
5956
+ exports.version = "19.1.0-experimental-18eaf51b-20250118";