react-dom 19.0.0-rc.0 → 19.0.0-rc.1

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.
@@ -30,7 +30,8 @@ var React = require("react"),
30
30
  REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
31
31
  REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"),
32
32
  MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
33
- isArrayImpl = Array.isArray;
33
+ isArrayImpl = Array.isArray,
34
+ scheduleMicrotask = queueMicrotask;
34
35
  function flushBuffered(destination) {
35
36
  "function" === typeof destination.flush && destination.flush();
36
37
  }
@@ -268,7 +269,7 @@ function createRenderState(
268
269
  fontPreloads: "",
269
270
  highImagePreloads: "",
270
271
  remainingCapacity:
271
- "number" === typeof maxHeadersLength ? maxHeadersLength : 2e3
272
+ 2 + ("number" === typeof maxHeadersLength ? maxHeadersLength : 2e3)
272
273
  }
273
274
  : null,
274
275
  resets: {
@@ -319,8 +320,8 @@ function createRenderState(
319
320
  "string" === typeof scriptConfig || null == scriptConfig.crossOrigin
320
321
  ? void 0
321
322
  : "use-credentials" === scriptConfig.crossOrigin
322
- ? "use-credentials"
323
- : ""));
323
+ ? "use-credentials"
324
+ : ""));
324
325
  scriptConfig = resumableState;
325
326
  var href = maxHeadersLength;
326
327
  scriptConfig.scriptResources[href] = null;
@@ -371,8 +372,8 @@ function createRenderState(
371
372
  null == bootstrapScriptContent.crossOrigin
372
373
  ? void 0
373
374
  : "use-credentials" === bootstrapScriptContent.crossOrigin
374
- ? "use-credentials"
375
- : "")),
375
+ ? "use-credentials"
376
+ : "")),
376
377
  (bootstrapScriptContent = resumableState),
377
378
  (scriptConfig = onHeaders),
378
379
  (bootstrapScriptContent.scriptResources[scriptConfig] = null),
@@ -438,8 +439,8 @@ function createRootFormatContext(namespaceURI) {
438
439
  "http://www.w3.org/2000/svg" === namespaceURI
439
440
  ? 3
440
441
  : "http://www.w3.org/1998/Math/MathML" === namespaceURI
441
- ? 4
442
- : 0,
442
+ ? 4
443
+ : 0,
443
444
  null,
444
445
  0
445
446
  );
@@ -476,12 +477,12 @@ function getChildFormatContext(parentContext, type, props) {
476
477
  return 5 <= parentContext.insertionMode
477
478
  ? createFormatContext(2, null, parentContext.tagScope)
478
479
  : 0 === parentContext.insertionMode
479
- ? "html" === type
480
- ? createFormatContext(1, null, parentContext.tagScope)
481
- : createFormatContext(2, null, parentContext.tagScope)
482
- : 1 === parentContext.insertionMode
483
- ? createFormatContext(2, null, parentContext.tagScope)
484
- : parentContext;
480
+ ? "html" === type
481
+ ? createFormatContext(1, null, parentContext.tagScope)
482
+ : createFormatContext(2, null, parentContext.tagScope)
483
+ : 1 === parentContext.insertionMode
484
+ ? createFormatContext(2, null, parentContext.tagScope)
485
+ : parentContext;
485
486
  }
486
487
  function pushTextInstance(target, text, renderState, textEmbedded) {
487
488
  if ("" === text) return textEmbedded;
@@ -1388,22 +1389,64 @@ function pushStartInstance(
1388
1389
  }
1389
1390
  target$jscomp$0.push(">");
1390
1391
  return null;
1392
+ case "object":
1393
+ target$jscomp$0.push(startChunkForTag("object"));
1394
+ var children$jscomp$5 = null,
1395
+ innerHTML$jscomp$4 = null,
1396
+ propKey$jscomp$7;
1397
+ for (propKey$jscomp$7 in props)
1398
+ if (hasOwnProperty.call(props, propKey$jscomp$7)) {
1399
+ var propValue$jscomp$7 = props[propKey$jscomp$7];
1400
+ if (null != propValue$jscomp$7)
1401
+ switch (propKey$jscomp$7) {
1402
+ case "children":
1403
+ children$jscomp$5 = propValue$jscomp$7;
1404
+ break;
1405
+ case "dangerouslySetInnerHTML":
1406
+ innerHTML$jscomp$4 = propValue$jscomp$7;
1407
+ break;
1408
+ case "data":
1409
+ var sanitizedValue = sanitizeURL("" + propValue$jscomp$7);
1410
+ if ("" === sanitizedValue) break;
1411
+ target$jscomp$0.push(
1412
+ " ",
1413
+ "data",
1414
+ '="',
1415
+ escapeTextForBrowser(sanitizedValue),
1416
+ '"'
1417
+ );
1418
+ break;
1419
+ default:
1420
+ pushAttribute(
1421
+ target$jscomp$0,
1422
+ propKey$jscomp$7,
1423
+ propValue$jscomp$7
1424
+ );
1425
+ }
1426
+ }
1427
+ target$jscomp$0.push(">");
1428
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
1429
+ if ("string" === typeof children$jscomp$5) {
1430
+ target$jscomp$0.push(escapeTextForBrowser(children$jscomp$5));
1431
+ var JSCompiler_inline_result$jscomp$2 = null;
1432
+ } else JSCompiler_inline_result$jscomp$2 = children$jscomp$5;
1433
+ return JSCompiler_inline_result$jscomp$2;
1391
1434
  case "title":
1392
1435
  if (
1393
1436
  3 === formatContext.insertionMode ||
1394
1437
  formatContext.tagScope & 1 ||
1395
1438
  null != props.itemProp
1396
1439
  )
1397
- var JSCompiler_inline_result$jscomp$2 = pushTitleImpl(
1440
+ var JSCompiler_inline_result$jscomp$3 = pushTitleImpl(
1398
1441
  target$jscomp$0,
1399
1442
  props
1400
1443
  );
1401
1444
  else
1402
1445
  isFallback
1403
- ? (JSCompiler_inline_result$jscomp$2 = null)
1446
+ ? (JSCompiler_inline_result$jscomp$3 = null)
1404
1447
  : (pushTitleImpl(renderState.hoistableChunks, props),
1405
- (JSCompiler_inline_result$jscomp$2 = void 0));
1406
- return JSCompiler_inline_result$jscomp$2;
1448
+ (JSCompiler_inline_result$jscomp$3 = void 0));
1449
+ return JSCompiler_inline_result$jscomp$3;
1407
1450
  case "link":
1408
1451
  var rel = props.rel,
1409
1452
  href = props.href,
@@ -1417,7 +1460,7 @@ function pushStartInstance(
1417
1460
  "" === href
1418
1461
  ) {
1419
1462
  pushLinkImpl(target$jscomp$0, props);
1420
- var JSCompiler_inline_result$jscomp$3 = null;
1463
+ var JSCompiler_inline_result$jscomp$4 = null;
1421
1464
  } else if ("stylesheet" === props.rel)
1422
1465
  if (
1423
1466
  "string" !== typeof precedence ||
@@ -1425,7 +1468,7 @@ function pushStartInstance(
1425
1468
  props.onLoad ||
1426
1469
  props.onError
1427
1470
  )
1428
- JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
1471
+ JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
1429
1472
  target$jscomp$0,
1430
1473
  props
1431
1474
  );
@@ -1468,19 +1511,19 @@ function pushStartInstance(
1468
1511
  hoistableState.stylesheets.add(resource$9);
1469
1512
  }
1470
1513
  textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e");
1471
- JSCompiler_inline_result$jscomp$3 = null;
1514
+ JSCompiler_inline_result$jscomp$4 = null;
1472
1515
  }
1473
1516
  else
1474
1517
  props.onLoad || props.onError
1475
- ? (JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
1518
+ ? (JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
1476
1519
  target$jscomp$0,
1477
1520
  props
1478
1521
  ))
1479
1522
  : (textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
1480
- (JSCompiler_inline_result$jscomp$3 = isFallback
1523
+ (JSCompiler_inline_result$jscomp$4 = isFallback
1481
1524
  ? null
1482
1525
  : pushLinkImpl(renderState.hoistableChunks, props)));
1483
- return JSCompiler_inline_result$jscomp$3;
1526
+ return JSCompiler_inline_result$jscomp$4;
1484
1527
  case "script":
1485
1528
  var asyncProp = props.async;
1486
1529
  if (
@@ -1495,7 +1538,7 @@ function pushStartInstance(
1495
1538
  formatContext.tagScope & 1 ||
1496
1539
  null != props.itemProp
1497
1540
  )
1498
- var JSCompiler_inline_result$jscomp$4 = pushScriptImpl(
1541
+ var JSCompiler_inline_result$jscomp$5 = pushScriptImpl(
1499
1542
  target$jscomp$0,
1500
1543
  props
1501
1544
  );
@@ -1525,9 +1568,9 @@ function pushStartInstance(
1525
1568
  pushScriptImpl(resource$jscomp$0, scriptProps);
1526
1569
  }
1527
1570
  textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e");
1528
- JSCompiler_inline_result$jscomp$4 = null;
1571
+ JSCompiler_inline_result$jscomp$5 = null;
1529
1572
  }
1530
- return JSCompiler_inline_result$jscomp$4;
1573
+ return JSCompiler_inline_result$jscomp$5;
1531
1574
  case "style":
1532
1575
  var precedence$jscomp$0 = props.precedence,
1533
1576
  href$jscomp$0 = props.href;
@@ -1540,42 +1583,42 @@ function pushStartInstance(
1540
1583
  "" === href$jscomp$0
1541
1584
  ) {
1542
1585
  target$jscomp$0.push(startChunkForTag("style"));
1543
- var children$jscomp$5 = null,
1544
- innerHTML$jscomp$4 = null,
1545
- propKey$jscomp$7;
1546
- for (propKey$jscomp$7 in props)
1547
- if (hasOwnProperty.call(props, propKey$jscomp$7)) {
1548
- var propValue$jscomp$7 = props[propKey$jscomp$7];
1549
- if (null != propValue$jscomp$7)
1550
- switch (propKey$jscomp$7) {
1586
+ var children$jscomp$6 = null,
1587
+ innerHTML$jscomp$5 = null,
1588
+ propKey$jscomp$8;
1589
+ for (propKey$jscomp$8 in props)
1590
+ if (hasOwnProperty.call(props, propKey$jscomp$8)) {
1591
+ var propValue$jscomp$8 = props[propKey$jscomp$8];
1592
+ if (null != propValue$jscomp$8)
1593
+ switch (propKey$jscomp$8) {
1551
1594
  case "children":
1552
- children$jscomp$5 = propValue$jscomp$7;
1595
+ children$jscomp$6 = propValue$jscomp$8;
1553
1596
  break;
1554
1597
  case "dangerouslySetInnerHTML":
1555
- innerHTML$jscomp$4 = propValue$jscomp$7;
1598
+ innerHTML$jscomp$5 = propValue$jscomp$8;
1556
1599
  break;
1557
1600
  default:
1558
1601
  pushAttribute(
1559
1602
  target$jscomp$0,
1560
- propKey$jscomp$7,
1561
- propValue$jscomp$7
1603
+ propKey$jscomp$8,
1604
+ propValue$jscomp$8
1562
1605
  );
1563
1606
  }
1564
1607
  }
1565
1608
  target$jscomp$0.push(">");
1566
- var child = Array.isArray(children$jscomp$5)
1567
- ? 2 > children$jscomp$5.length
1568
- ? children$jscomp$5[0]
1609
+ var child = Array.isArray(children$jscomp$6)
1610
+ ? 2 > children$jscomp$6.length
1611
+ ? children$jscomp$6[0]
1569
1612
  : null
1570
- : children$jscomp$5;
1613
+ : children$jscomp$6;
1571
1614
  "function" !== typeof child &&
1572
1615
  "symbol" !== typeof child &&
1573
1616
  null !== child &&
1574
1617
  void 0 !== child &&
1575
1618
  target$jscomp$0.push(("" + child).replace(styleRegex, styleReplacer));
1576
- pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
1619
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$5, children$jscomp$6);
1577
1620
  target$jscomp$0.push(endChunkForTag("style"));
1578
- var JSCompiler_inline_result$jscomp$5 = null;
1621
+ var JSCompiler_inline_result$jscomp$6 = null;
1579
1622
  } else {
1580
1623
  var styleQueue$jscomp$0 = renderState.styles.get(precedence$jscomp$0);
1581
1624
  if (
@@ -1597,26 +1640,26 @@ function pushStartInstance(
1597
1640
  }),
1598
1641
  renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
1599
1642
  var target = styleQueue$jscomp$0.rules,
1600
- children$jscomp$6 = null,
1601
- innerHTML$jscomp$5 = null,
1602
- propKey$jscomp$8;
1603
- for (propKey$jscomp$8 in props)
1604
- if (hasOwnProperty.call(props, propKey$jscomp$8)) {
1605
- var propValue$jscomp$8 = props[propKey$jscomp$8];
1606
- if (null != propValue$jscomp$8)
1607
- switch (propKey$jscomp$8) {
1643
+ children$jscomp$7 = null,
1644
+ innerHTML$jscomp$6 = null,
1645
+ propKey$jscomp$9;
1646
+ for (propKey$jscomp$9 in props)
1647
+ if (hasOwnProperty.call(props, propKey$jscomp$9)) {
1648
+ var propValue$jscomp$9 = props[propKey$jscomp$9];
1649
+ if (null != propValue$jscomp$9)
1650
+ switch (propKey$jscomp$9) {
1608
1651
  case "children":
1609
- children$jscomp$6 = propValue$jscomp$8;
1652
+ children$jscomp$7 = propValue$jscomp$9;
1610
1653
  break;
1611
1654
  case "dangerouslySetInnerHTML":
1612
- innerHTML$jscomp$5 = propValue$jscomp$8;
1655
+ innerHTML$jscomp$6 = propValue$jscomp$9;
1613
1656
  }
1614
1657
  }
1615
- var child$jscomp$0 = Array.isArray(children$jscomp$6)
1616
- ? 2 > children$jscomp$6.length
1617
- ? children$jscomp$6[0]
1658
+ var child$jscomp$0 = Array.isArray(children$jscomp$7)
1659
+ ? 2 > children$jscomp$7.length
1660
+ ? children$jscomp$7[0]
1618
1661
  : null
1619
- : children$jscomp$6;
1662
+ : children$jscomp$7;
1620
1663
  "function" !== typeof child$jscomp$0 &&
1621
1664
  "symbol" !== typeof child$jscomp$0 &&
1622
1665
  null !== child$jscomp$0 &&
@@ -1624,85 +1667,85 @@ function pushStartInstance(
1624
1667
  target.push(
1625
1668
  ("" + child$jscomp$0).replace(styleRegex, styleReplacer)
1626
1669
  );
1627
- pushInnerHTML(target, innerHTML$jscomp$5, children$jscomp$6);
1670
+ pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$7);
1628
1671
  }
1629
1672
  styleQueue$jscomp$0 &&
1630
1673
  hoistableState &&
1631
1674
  hoistableState.styles.add(styleQueue$jscomp$0);
1632
1675
  textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e");
1633
- JSCompiler_inline_result$jscomp$5 = void 0;
1676
+ JSCompiler_inline_result$jscomp$6 = void 0;
1634
1677
  }
1635
- return JSCompiler_inline_result$jscomp$5;
1678
+ return JSCompiler_inline_result$jscomp$6;
1636
1679
  case "meta":
1637
1680
  if (
1638
1681
  3 === formatContext.insertionMode ||
1639
1682
  formatContext.tagScope & 1 ||
1640
1683
  null != props.itemProp
1641
1684
  )
1642
- var JSCompiler_inline_result$jscomp$6 = pushSelfClosing(
1685
+ var JSCompiler_inline_result$jscomp$7 = pushSelfClosing(
1643
1686
  target$jscomp$0,
1644
1687
  props,
1645
1688
  "meta"
1646
1689
  );
1647
1690
  else
1648
1691
  textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
1649
- (JSCompiler_inline_result$jscomp$6 = isFallback
1692
+ (JSCompiler_inline_result$jscomp$7 = isFallback
1650
1693
  ? null
1651
1694
  : "string" === typeof props.charSet
1652
- ? pushSelfClosing(renderState.charsetChunks, props, "meta")
1653
- : "viewport" === props.name
1654
- ? pushSelfClosing(renderState.viewportChunks, props, "meta")
1655
- : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
1656
- return JSCompiler_inline_result$jscomp$6;
1695
+ ? pushSelfClosing(renderState.charsetChunks, props, "meta")
1696
+ : "viewport" === props.name
1697
+ ? pushSelfClosing(renderState.viewportChunks, props, "meta")
1698
+ : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
1699
+ return JSCompiler_inline_result$jscomp$7;
1657
1700
  case "listing":
1658
1701
  case "pre":
1659
1702
  target$jscomp$0.push(startChunkForTag(type));
1660
- var children$jscomp$7 = null,
1661
- innerHTML$jscomp$6 = null,
1662
- propKey$jscomp$9;
1663
- for (propKey$jscomp$9 in props)
1664
- if (hasOwnProperty.call(props, propKey$jscomp$9)) {
1665
- var propValue$jscomp$9 = props[propKey$jscomp$9];
1666
- if (null != propValue$jscomp$9)
1667
- switch (propKey$jscomp$9) {
1703
+ var children$jscomp$8 = null,
1704
+ innerHTML$jscomp$7 = null,
1705
+ propKey$jscomp$10;
1706
+ for (propKey$jscomp$10 in props)
1707
+ if (hasOwnProperty.call(props, propKey$jscomp$10)) {
1708
+ var propValue$jscomp$10 = props[propKey$jscomp$10];
1709
+ if (null != propValue$jscomp$10)
1710
+ switch (propKey$jscomp$10) {
1668
1711
  case "children":
1669
- children$jscomp$7 = propValue$jscomp$9;
1712
+ children$jscomp$8 = propValue$jscomp$10;
1670
1713
  break;
1671
1714
  case "dangerouslySetInnerHTML":
1672
- innerHTML$jscomp$6 = propValue$jscomp$9;
1715
+ innerHTML$jscomp$7 = propValue$jscomp$10;
1673
1716
  break;
1674
1717
  default:
1675
1718
  pushAttribute(
1676
1719
  target$jscomp$0,
1677
- propKey$jscomp$9,
1678
- propValue$jscomp$9
1720
+ propKey$jscomp$10,
1721
+ propValue$jscomp$10
1679
1722
  );
1680
1723
  }
1681
1724
  }
1682
1725
  target$jscomp$0.push(">");
1683
- if (null != innerHTML$jscomp$6) {
1684
- if (null != children$jscomp$7)
1726
+ if (null != innerHTML$jscomp$7) {
1727
+ if (null != children$jscomp$8)
1685
1728
  throw Error(
1686
1729
  "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
1687
1730
  );
1688
1731
  if (
1689
- "object" !== typeof innerHTML$jscomp$6 ||
1690
- !("__html" in innerHTML$jscomp$6)
1732
+ "object" !== typeof innerHTML$jscomp$7 ||
1733
+ !("__html" in innerHTML$jscomp$7)
1691
1734
  )
1692
1735
  throw Error(
1693
1736
  "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
1694
1737
  );
1695
- var html = innerHTML$jscomp$6.__html;
1738
+ var html = innerHTML$jscomp$7.__html;
1696
1739
  null !== html &&
1697
1740
  void 0 !== html &&
1698
1741
  ("string" === typeof html && 0 < html.length && "\n" === html[0]
1699
1742
  ? target$jscomp$0.push("\n", html)
1700
1743
  : target$jscomp$0.push("" + html));
1701
1744
  }
1702
- "string" === typeof children$jscomp$7 &&
1703
- "\n" === children$jscomp$7[0] &&
1745
+ "string" === typeof children$jscomp$8 &&
1746
+ "\n" === children$jscomp$8[0] &&
1704
1747
  target$jscomp$0.push("\n");
1705
- return children$jscomp$7;
1748
+ return children$jscomp$8;
1706
1749
  case "img":
1707
1750
  var src = props.src,
1708
1751
  srcSet = props.srcSet;
@@ -1744,7 +1787,7 @@ function pushStartInstance(
1744
1787
  ) {
1745
1788
  resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;
1746
1789
  var input = props.crossOrigin;
1747
- var JSCompiler_inline_result$jscomp$7 =
1790
+ var JSCompiler_inline_result$jscomp$8 =
1748
1791
  "string" === typeof input
1749
1792
  ? "use-credentials" === input
1750
1793
  ? input
@@ -1759,14 +1802,14 @@ function pushStartInstance(
1759
1802
  ((header = getPreloadAsHeader(src, "image", {
1760
1803
  imageSrcSet: props.srcSet,
1761
1804
  imageSizes: props.sizes,
1762
- crossOrigin: JSCompiler_inline_result$jscomp$7,
1805
+ crossOrigin: JSCompiler_inline_result$jscomp$8,
1763
1806
  integrity: props.integrity,
1764
1807
  nonce: props.nonce,
1765
1808
  type: props.type,
1766
1809
  fetchPriority: props.fetchPriority,
1767
1810
  referrerPolicy: props.refererPolicy
1768
1811
  })),
1769
- 2 <= (headers.remainingCapacity -= header.length))
1812
+ 0 <= (headers.remainingCapacity -= header.length + 2))
1770
1813
  ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),
1771
1814
  headers.highImagePreloads && (headers.highImagePreloads += ", "),
1772
1815
  (headers.highImagePreloads += header))
@@ -1777,7 +1820,7 @@ function pushStartInstance(
1777
1820
  href: srcSet ? void 0 : src,
1778
1821
  imageSrcSet: srcSet,
1779
1822
  imageSizes: sizes,
1780
- crossOrigin: JSCompiler_inline_result$jscomp$7,
1823
+ crossOrigin: JSCompiler_inline_result$jscomp$8,
1781
1824
  integrity: props.integrity,
1782
1825
  type: props.type,
1783
1826
  fetchPriority: props.fetchPriority,
@@ -1815,56 +1858,56 @@ function pushStartInstance(
1815
1858
  case "head":
1816
1859
  if (2 > formatContext.insertionMode && null === renderState.headChunks) {
1817
1860
  renderState.headChunks = [];
1818
- var JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
1861
+ var JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
1819
1862
  renderState.headChunks,
1820
1863
  props,
1821
1864
  "head"
1822
1865
  );
1823
1866
  } else
1824
- JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
1867
+ JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
1825
1868
  target$jscomp$0,
1826
1869
  props,
1827
1870
  "head"
1828
1871
  );
1829
- return JSCompiler_inline_result$jscomp$8;
1872
+ return JSCompiler_inline_result$jscomp$9;
1830
1873
  case "html":
1831
1874
  if (
1832
1875
  0 === formatContext.insertionMode &&
1833
1876
  null === renderState.htmlChunks
1834
1877
  ) {
1835
1878
  renderState.htmlChunks = ["<!DOCTYPE html>"];
1836
- var JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
1879
+ var JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
1837
1880
  renderState.htmlChunks,
1838
1881
  props,
1839
1882
  "html"
1840
1883
  );
1841
1884
  } else
1842
- JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
1885
+ JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
1843
1886
  target$jscomp$0,
1844
1887
  props,
1845
1888
  "html"
1846
1889
  );
1847
- return JSCompiler_inline_result$jscomp$9;
1890
+ return JSCompiler_inline_result$jscomp$10;
1848
1891
  default:
1849
1892
  if (-1 !== type.indexOf("-")) {
1850
1893
  target$jscomp$0.push(startChunkForTag(type));
1851
- var children$jscomp$8 = null,
1852
- innerHTML$jscomp$7 = null,
1853
- propKey$jscomp$10;
1854
- for (propKey$jscomp$10 in props)
1855
- if (hasOwnProperty.call(props, propKey$jscomp$10)) {
1856
- var propValue$jscomp$10 = props[propKey$jscomp$10];
1857
- if (null != propValue$jscomp$10) {
1858
- var attributeName = propKey$jscomp$10;
1859
- switch (propKey$jscomp$10) {
1894
+ var children$jscomp$9 = null,
1895
+ innerHTML$jscomp$8 = null,
1896
+ propKey$jscomp$11;
1897
+ for (propKey$jscomp$11 in props)
1898
+ if (hasOwnProperty.call(props, propKey$jscomp$11)) {
1899
+ var propValue$jscomp$11 = props[propKey$jscomp$11];
1900
+ if (null != propValue$jscomp$11) {
1901
+ var attributeName = propKey$jscomp$11;
1902
+ switch (propKey$jscomp$11) {
1860
1903
  case "children":
1861
- children$jscomp$8 = propValue$jscomp$10;
1904
+ children$jscomp$9 = propValue$jscomp$11;
1862
1905
  break;
1863
1906
  case "dangerouslySetInnerHTML":
1864
- innerHTML$jscomp$7 = propValue$jscomp$10;
1907
+ innerHTML$jscomp$8 = propValue$jscomp$11;
1865
1908
  break;
1866
1909
  case "style":
1867
- pushStyleAttribute(target$jscomp$0, propValue$jscomp$10);
1910
+ pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);
1868
1911
  break;
1869
1912
  case "suppressContentEditableWarning":
1870
1913
  case "suppressHydrationWarning":
@@ -1874,18 +1917,18 @@ function pushStartInstance(
1874
1917
  attributeName = "class";
1875
1918
  default:
1876
1919
  if (
1877
- isAttributeNameSafe(propKey$jscomp$10) &&
1878
- "function" !== typeof propValue$jscomp$10 &&
1879
- "symbol" !== typeof propValue$jscomp$10 &&
1880
- !1 !== propValue$jscomp$10
1920
+ isAttributeNameSafe(propKey$jscomp$11) &&
1921
+ "function" !== typeof propValue$jscomp$11 &&
1922
+ "symbol" !== typeof propValue$jscomp$11 &&
1923
+ !1 !== propValue$jscomp$11
1881
1924
  ) {
1882
- if (!0 === propValue$jscomp$10) propValue$jscomp$10 = "";
1883
- else if ("object" === typeof propValue$jscomp$10) continue;
1925
+ if (!0 === propValue$jscomp$11) propValue$jscomp$11 = "";
1926
+ else if ("object" === typeof propValue$jscomp$11) continue;
1884
1927
  target$jscomp$0.push(
1885
1928
  " ",
1886
1929
  attributeName,
1887
1930
  '="',
1888
- escapeTextForBrowser(propValue$jscomp$10),
1931
+ escapeTextForBrowser(propValue$jscomp$11),
1889
1932
  '"'
1890
1933
  );
1891
1934
  }
@@ -1893,8 +1936,8 @@ function pushStartInstance(
1893
1936
  }
1894
1937
  }
1895
1938
  target$jscomp$0.push(">");
1896
- pushInnerHTML(target$jscomp$0, innerHTML$jscomp$7, children$jscomp$8);
1897
- return children$jscomp$8;
1939
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$8, children$jscomp$9);
1940
+ return children$jscomp$9;
1898
1941
  }
1899
1942
  }
1900
1943
  return pushStartGenericElement(target$jscomp$0, props, type);
@@ -2279,7 +2322,7 @@ function prefetchDNS(href) {
2279
2322
  escapeHrefForLinkHeaderURLContextReplacer
2280
2323
  ) +
2281
2324
  ">; rel=dns-prefetch"),
2282
- 2 <= (resumableState.remainingCapacity -= header.length));
2325
+ 0 <= (resumableState.remainingCapacity -= header.length + 2));
2283
2326
  JSCompiler_temp
2284
2327
  ? ((renderState.resets.dns[href] = null),
2285
2328
  resumableState.preconnects && (resumableState.preconnects += ", "),
@@ -2302,8 +2345,8 @@ function preconnect(href, crossOrigin) {
2302
2345
  "use-credentials" === crossOrigin
2303
2346
  ? "credentials"
2304
2347
  : "string" === typeof crossOrigin
2305
- ? "anonymous"
2306
- : "default";
2348
+ ? "anonymous"
2349
+ : "default";
2307
2350
  if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {
2308
2351
  resumableState.connectResources[bucket][href] = null;
2309
2352
  resumableState = renderState.headers;
@@ -2328,7 +2371,7 @@ function preconnect(href, crossOrigin) {
2328
2371
  }
2329
2372
  JSCompiler_temp =
2330
2373
  ((header = JSCompiler_temp),
2331
- 2 <= (resumableState.remainingCapacity -= header.length));
2374
+ 0 <= (resumableState.remainingCapacity -= header.length + 2));
2332
2375
  }
2333
2376
  JSCompiler_temp
2334
2377
  ? ((renderState.resets.connect[bucket][href] = null),
@@ -2370,7 +2413,7 @@ function preload(href, as, options) {
2370
2413
  0 < resumableState.remainingCapacity &&
2371
2414
  "high" === fetchPriority &&
2372
2415
  ((header = getPreloadAsHeader(href, as, options)),
2373
- 2 <= (resumableState.remainingCapacity -= header.length))
2416
+ 0 <= (resumableState.remainingCapacity -= header.length + 2))
2374
2417
  ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),
2375
2418
  resumableState.highImagePreloads &&
2376
2419
  (resumableState.highImagePreloads += ", "),
@@ -2436,7 +2479,7 @@ function preload(href, as, options) {
2436
2479
  0 < resumableState.remainingCapacity &&
2437
2480
  "font" === as &&
2438
2481
  ((key = getPreloadAsHeader(href, as, options)),
2439
- 2 <= (resumableState.remainingCapacity -= key.length))
2482
+ 0 <= (resumableState.remainingCapacity -= key.length + 2))
2440
2483
  )
2441
2484
  (renderState.resets.font[href] = PRELOAD_NO_CREDS),
2442
2485
  resumableState.fontPreloads &&
@@ -2659,7 +2702,8 @@ function hoistStyleQueueDependency(styleQueue) {
2659
2702
  function hoistStylesheetDependency(stylesheet) {
2660
2703
  this.stylesheets.add(stylesheet);
2661
2704
  }
2662
- var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
2705
+ var bind = Function.prototype.bind,
2706
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
2663
2707
  function getComponentNameFromType(type) {
2664
2708
  if (null == type) return null;
2665
2709
  if ("function" === typeof type)
@@ -2770,12 +2814,12 @@ function switchContext(newSnapshot) {
2770
2814
  (null === prev
2771
2815
  ? pushAllNext(newSnapshot)
2772
2816
  : null === newSnapshot
2773
- ? popAllPrevious(prev)
2774
- : prev.depth === newSnapshot.depth
2775
- ? popToNearestCommonAncestor(prev, newSnapshot)
2776
- : prev.depth > newSnapshot.depth
2777
- ? popPreviousToCommonLevel(prev, newSnapshot)
2778
- : popNextToCommonLevel(prev, newSnapshot),
2817
+ ? popAllPrevious(prev)
2818
+ : prev.depth === newSnapshot.depth
2819
+ ? popToNearestCommonAncestor(prev, newSnapshot)
2820
+ : prev.depth > newSnapshot.depth
2821
+ ? popPreviousToCommonLevel(prev, newSnapshot)
2822
+ : popNextToCommonLevel(prev, newSnapshot),
2779
2823
  (currentActiveSnapshot = newSnapshot));
2780
2824
  }
2781
2825
  var classComponentUpdater = {
@@ -2922,9 +2966,9 @@ function createWorkInProgressHook() {
2922
2966
  (firstWorkInProgressHook = workInProgressHook = createHook()))
2923
2967
  : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))
2924
2968
  : null === workInProgressHook.next
2925
- ? ((isReRender = !1),
2926
- (workInProgressHook = workInProgressHook.next = createHook()))
2927
- : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
2969
+ ? ((isReRender = !1),
2970
+ (workInProgressHook = workInProgressHook.next = createHook()))
2971
+ : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
2928
2972
  return workInProgressHook;
2929
2973
  }
2930
2974
  function getThenableStateAfterSuspending() {
@@ -2971,8 +3015,8 @@ function useReducer(reducer, initialArg, init) {
2971
3015
  ? initialArg()
2972
3016
  : initialArg
2973
3017
  : void 0 !== init
2974
- ? init(initialArg)
2975
- : initialArg;
3018
+ ? init(initialArg)
3019
+ : initialArg;
2976
3020
  workInProgressHook.memoizedState = reducer;
2977
3021
  reducer = workInProgressHook.queue = { last: null, dispatch: null };
2978
3022
  reducer = reducer.dispatch = dispatchAction.bind(
@@ -3200,7 +3244,8 @@ var currentResumableState = null,
3200
3244
  throw Error("Not implemented.");
3201
3245
  }
3202
3246
  },
3203
- prefix;
3247
+ prefix,
3248
+ suffix;
3204
3249
  function describeBuiltInComponentFrame(name) {
3205
3250
  if (void 0 === prefix)
3206
3251
  try {
@@ -3208,8 +3253,14 @@ function describeBuiltInComponentFrame(name) {
3208
3253
  } catch (x) {
3209
3254
  var match = x.stack.trim().match(/\n( *(at )?)/);
3210
3255
  prefix = (match && match[1]) || "";
3256
+ suffix =
3257
+ -1 < x.stack.indexOf("\n at")
3258
+ ? " (<anonymous>)"
3259
+ : -1 < x.stack.indexOf("@")
3260
+ ? "@unknown:0:0"
3261
+ : "";
3211
3262
  }
3212
- return "\n" + prefix + name;
3263
+ return "\n" + prefix + name + suffix;
3213
3264
  }
3214
3265
  var reentry = !1;
3215
3266
  function describeNativeComponentFrame(fn, construct) {
@@ -3217,62 +3268,64 @@ function describeNativeComponentFrame(fn, construct) {
3217
3268
  reentry = !0;
3218
3269
  var previousPrepareStackTrace = Error.prepareStackTrace;
3219
3270
  Error.prepareStackTrace = void 0;
3220
- var RunInRootFrame = {
3221
- DetermineComponentFrameRoot: function () {
3222
- try {
3223
- if (construct) {
3224
- var Fake = function () {
3225
- throw Error();
3226
- };
3227
- Object.defineProperty(Fake.prototype, "props", {
3228
- set: function () {
3271
+ try {
3272
+ var RunInRootFrame = {
3273
+ DetermineComponentFrameRoot: function () {
3274
+ try {
3275
+ if (construct) {
3276
+ var Fake = function () {
3229
3277
  throw Error();
3278
+ };
3279
+ Object.defineProperty(Fake.prototype, "props", {
3280
+ set: function () {
3281
+ throw Error();
3282
+ }
3283
+ });
3284
+ if ("object" === typeof Reflect && Reflect.construct) {
3285
+ try {
3286
+ Reflect.construct(Fake, []);
3287
+ } catch (x) {
3288
+ var control = x;
3289
+ }
3290
+ Reflect.construct(fn, [], Fake);
3291
+ } else {
3292
+ try {
3293
+ Fake.call();
3294
+ } catch (x$24) {
3295
+ control = x$24;
3296
+ }
3297
+ fn.call(Fake.prototype);
3230
3298
  }
3231
- });
3232
- if ("object" === typeof Reflect && Reflect.construct) {
3233
- try {
3234
- Reflect.construct(Fake, []);
3235
- } catch (x) {
3236
- var control = x;
3237
- }
3238
- Reflect.construct(fn, [], Fake);
3239
3299
  } else {
3240
3300
  try {
3241
- Fake.call();
3242
- } catch (x$24) {
3243
- control = x$24;
3301
+ throw Error();
3302
+ } catch (x$25) {
3303
+ control = x$25;
3244
3304
  }
3245
- fn.call(Fake.prototype);
3305
+ (Fake = fn()) &&
3306
+ "function" === typeof Fake.catch &&
3307
+ Fake.catch(function () {});
3246
3308
  }
3247
- } else {
3248
- try {
3249
- throw Error();
3250
- } catch (x$25) {
3251
- control = x$25;
3252
- }
3253
- (Fake = fn()) &&
3254
- "function" === typeof Fake.catch &&
3255
- Fake.catch(function () {});
3309
+ } catch (sample) {
3310
+ if (sample && control && "string" === typeof sample.stack)
3311
+ return [sample.stack, control.stack];
3256
3312
  }
3257
- } catch (sample) {
3258
- if (sample && control && "string" === typeof sample.stack)
3259
- return [sample.stack, control.stack];
3313
+ return [null, null];
3260
3314
  }
3261
- return [null, null];
3262
- }
3263
- };
3264
- RunInRootFrame.DetermineComponentFrameRoot.displayName =
3265
- "DetermineComponentFrameRoot";
3266
- var namePropDescriptor = Object.getOwnPropertyDescriptor(
3267
- RunInRootFrame.DetermineComponentFrameRoot,
3268
- "name"
3269
- );
3270
- namePropDescriptor &&
3271
- namePropDescriptor.configurable &&
3272
- Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", {
3273
- value: "DetermineComponentFrameRoot"
3274
- });
3275
- try {
3315
+ };
3316
+ RunInRootFrame.DetermineComponentFrameRoot.displayName =
3317
+ "DetermineComponentFrameRoot";
3318
+ var namePropDescriptor = Object.getOwnPropertyDescriptor(
3319
+ RunInRootFrame.DetermineComponentFrameRoot,
3320
+ "name"
3321
+ );
3322
+ namePropDescriptor &&
3323
+ namePropDescriptor.configurable &&
3324
+ Object.defineProperty(
3325
+ RunInRootFrame.DetermineComponentFrameRoot,
3326
+ "name",
3327
+ { value: "DetermineComponentFrameRoot" }
3328
+ );
3276
3329
  var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
3277
3330
  sampleStack = _RunInRootFrame$Deter[0],
3278
3331
  controlStack = _RunInRootFrame$Deter[1];
@@ -3343,11 +3396,116 @@ function describeNativeComponentFrame(fn, construct) {
3343
3396
  ? describeBuiltInComponentFrame(previousPrepareStackTrace)
3344
3397
  : "";
3345
3398
  }
3399
+ function describeComponentStackByType(type) {
3400
+ if ("string" === typeof type) return describeBuiltInComponentFrame(type);
3401
+ if ("function" === typeof type)
3402
+ return type.prototype && type.prototype.isReactComponent
3403
+ ? ((type = describeNativeComponentFrame(type, !0)), type)
3404
+ : describeNativeComponentFrame(type, !1);
3405
+ if ("object" === typeof type && null !== type) {
3406
+ switch (type.$$typeof) {
3407
+ case REACT_FORWARD_REF_TYPE:
3408
+ return describeNativeComponentFrame(type.render, !1);
3409
+ case REACT_MEMO_TYPE:
3410
+ return describeNativeComponentFrame(type.type, !1);
3411
+ case REACT_LAZY_TYPE:
3412
+ var lazyComponent = type,
3413
+ payload = lazyComponent._payload;
3414
+ lazyComponent = lazyComponent._init;
3415
+ try {
3416
+ type = lazyComponent(payload);
3417
+ } catch (x) {
3418
+ return describeBuiltInComponentFrame("Lazy");
3419
+ }
3420
+ return describeComponentStackByType(type);
3421
+ }
3422
+ if ("string" === typeof type.name)
3423
+ return (
3424
+ (payload = type.env),
3425
+ describeBuiltInComponentFrame(
3426
+ type.name + (payload ? " [" + payload + "]" : "")
3427
+ )
3428
+ );
3429
+ }
3430
+ switch (type) {
3431
+ case REACT_SUSPENSE_LIST_TYPE:
3432
+ return describeBuiltInComponentFrame("SuspenseList");
3433
+ case REACT_SUSPENSE_TYPE:
3434
+ return describeBuiltInComponentFrame("Suspense");
3435
+ }
3436
+ return "";
3437
+ }
3346
3438
  function defaultErrorHandler(error) {
3347
- console.error(error);
3439
+ if (
3440
+ "object" === typeof error &&
3441
+ null !== error &&
3442
+ "string" === typeof error.environmentName
3443
+ ) {
3444
+ var JSCompiler_inline_result = error.environmentName;
3445
+ error = [error].slice(0);
3446
+ "string" === typeof error[0]
3447
+ ? error.splice(
3448
+ 0,
3449
+ 1,
3450
+ "%c%s%c " + error[0],
3451
+ "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
3452
+ " " + JSCompiler_inline_result + " ",
3453
+ ""
3454
+ )
3455
+ : error.splice(
3456
+ 0,
3457
+ 0,
3458
+ "%c%s%c ",
3459
+ "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
3460
+ " " + JSCompiler_inline_result + " ",
3461
+ ""
3462
+ );
3463
+ error.unshift(console);
3464
+ JSCompiler_inline_result = bind.apply(console.error, error);
3465
+ JSCompiler_inline_result();
3466
+ } else console.error(error);
3348
3467
  return null;
3349
3468
  }
3350
3469
  function noop() {}
3470
+ function RequestInstance(
3471
+ resumableState,
3472
+ renderState,
3473
+ rootFormatContext,
3474
+ progressiveChunkSize,
3475
+ onError,
3476
+ onAllReady,
3477
+ onShellReady,
3478
+ onShellError,
3479
+ onFatalError,
3480
+ onPostpone,
3481
+ formState
3482
+ ) {
3483
+ var abortSet = new Set();
3484
+ this.destination = null;
3485
+ this.flushScheduled = !1;
3486
+ this.resumableState = resumableState;
3487
+ this.renderState = renderState;
3488
+ this.rootFormatContext = rootFormatContext;
3489
+ this.progressiveChunkSize =
3490
+ void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize;
3491
+ this.status = 10;
3492
+ this.fatalError = null;
3493
+ this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
3494
+ this.completedRootSegment = null;
3495
+ this.abortableTasks = abortSet;
3496
+ this.pingedTasks = [];
3497
+ this.clientRenderedBoundaries = [];
3498
+ this.completedBoundaries = [];
3499
+ this.partialBoundaries = [];
3500
+ this.trackedPostpones = null;
3501
+ this.onError = void 0 === onError ? defaultErrorHandler : onError;
3502
+ this.onPostpone = void 0 === onPostpone ? noop : onPostpone;
3503
+ this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
3504
+ this.onShellReady = void 0 === onShellReady ? noop : onShellReady;
3505
+ this.onShellError = void 0 === onShellError ? noop : onShellError;
3506
+ this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
3507
+ this.formState = void 0 === formState ? null : formState;
3508
+ }
3351
3509
  function createRequest(
3352
3510
  children,
3353
3511
  resumableState,
@@ -3362,36 +3520,19 @@ function createRequest(
3362
3520
  onPostpone,
3363
3521
  formState
3364
3522
  ) {
3365
- var pingedTasks = [],
3366
- abortSet = new Set();
3367
- resumableState = {
3368
- destination: null,
3369
- flushScheduled: !1,
3370
- resumableState: resumableState,
3371
- renderState: renderState,
3372
- rootFormatContext: rootFormatContext,
3373
- progressiveChunkSize:
3374
- void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize,
3375
- status: 0,
3376
- fatalError: null,
3377
- nextSegmentId: 0,
3378
- allPendingTasks: 0,
3379
- pendingRootTasks: 0,
3380
- completedRootSegment: null,
3381
- abortableTasks: abortSet,
3382
- pingedTasks: pingedTasks,
3383
- clientRenderedBoundaries: [],
3384
- completedBoundaries: [],
3385
- partialBoundaries: [],
3386
- trackedPostpones: null,
3387
- onError: void 0 === onError ? defaultErrorHandler : onError,
3388
- onPostpone: void 0 === onPostpone ? noop : onPostpone,
3389
- onAllReady: void 0 === onAllReady ? noop : onAllReady,
3390
- onShellReady: void 0 === onShellReady ? noop : onShellReady,
3391
- onShellError: void 0 === onShellError ? noop : onShellError,
3392
- onFatalError: void 0 === onFatalError ? noop : onFatalError,
3393
- formState: void 0 === formState ? null : formState
3394
- };
3523
+ resumableState = new RequestInstance(
3524
+ resumableState,
3525
+ renderState,
3526
+ rootFormatContext,
3527
+ progressiveChunkSize,
3528
+ onError,
3529
+ onAllReady,
3530
+ onShellReady,
3531
+ onShellError,
3532
+ onFatalError,
3533
+ onPostpone,
3534
+ formState
3535
+ );
3395
3536
  renderState = createPendingSegment(
3396
3537
  resumableState,
3397
3538
  0,
@@ -3409,16 +3550,16 @@ function createRequest(
3409
3550
  null,
3410
3551
  renderState,
3411
3552
  null,
3412
- abortSet,
3553
+ resumableState.abortableTasks,
3413
3554
  null,
3414
3555
  rootFormatContext,
3415
- emptyContextObject,
3416
3556
  null,
3417
3557
  emptyTreeContext,
3418
3558
  null,
3419
3559
  !1
3420
3560
  );
3421
- pingedTasks.push(children);
3561
+ pushComponentStack(children);
3562
+ resumableState.pingedTasks.push(children);
3422
3563
  return resumableState;
3423
3564
  }
3424
3565
  var currentRequest = null;
@@ -3426,7 +3567,13 @@ function pingTask(request, task) {
3426
3567
  request.pingedTasks.push(task);
3427
3568
  1 === request.pingedTasks.length &&
3428
3569
  ((request.flushScheduled = null !== request.destination),
3429
- performWork(request));
3570
+ null !== request.trackedPostpones || 10 === request.status
3571
+ ? scheduleMicrotask(function () {
3572
+ return performWork(request);
3573
+ })
3574
+ : setTimeout(function () {
3575
+ return performWork(request);
3576
+ }, 0));
3430
3577
  }
3431
3578
  function createSuspenseBoundary(request, fallbackAbortableTasks) {
3432
3579
  return {
@@ -3455,7 +3602,6 @@ function createRenderTask(
3455
3602
  abortSet,
3456
3603
  keyPath,
3457
3604
  formatContext,
3458
- legacyContext,
3459
3605
  context,
3460
3606
  treeContext,
3461
3607
  componentStack,
@@ -3478,7 +3624,6 @@ function createRenderTask(
3478
3624
  abortSet: abortSet,
3479
3625
  keyPath: keyPath,
3480
3626
  formatContext: formatContext,
3481
- legacyContext: legacyContext,
3482
3627
  context: context,
3483
3628
  treeContext: treeContext,
3484
3629
  componentStack: componentStack,
@@ -3499,7 +3644,6 @@ function createReplayTask(
3499
3644
  abortSet,
3500
3645
  keyPath,
3501
3646
  formatContext,
3502
- legacyContext,
3503
3647
  context,
3504
3648
  treeContext,
3505
3649
  componentStack,
@@ -3523,7 +3667,6 @@ function createReplayTask(
3523
3667
  abortSet: abortSet,
3524
3668
  keyPath: keyPath,
3525
3669
  formatContext: formatContext,
3526
- legacyContext: legacyContext,
3527
3670
  context: context,
3528
3671
  treeContext: treeContext,
3529
3672
  componentStack: componentStack,
@@ -3554,47 +3697,54 @@ function createPendingSegment(
3554
3697
  textEmbedded: textEmbedded
3555
3698
  };
3556
3699
  }
3557
- function createBuiltInComponentStack(task, type) {
3558
- return { tag: 0, parent: task.componentStack, type: type };
3700
+ function pushComponentStack(task) {
3701
+ var node = task.node;
3702
+ if ("object" === typeof node && null !== node)
3703
+ switch (node.$$typeof) {
3704
+ case REACT_ELEMENT_TYPE:
3705
+ task.componentStack = { parent: task.componentStack, type: node.type };
3706
+ }
3559
3707
  }
3560
- function getThrownInfo(request, node) {
3561
- if (node && null !== request.trackedPostpones) {
3562
- try {
3563
- request = "";
3564
- do {
3565
- switch (node.tag) {
3566
- case 0:
3567
- request += describeBuiltInComponentFrame(node.type);
3568
- break;
3569
- case 1:
3570
- request += describeNativeComponentFrame(node.type, !1);
3571
- break;
3572
- case 2:
3573
- request += describeNativeComponentFrame(node.type, !0);
3708
+ function getThrownInfo(node$jscomp$0) {
3709
+ var errorInfo = {};
3710
+ node$jscomp$0 &&
3711
+ Object.defineProperty(errorInfo, "componentStack", {
3712
+ configurable: !0,
3713
+ enumerable: !0,
3714
+ get: function () {
3715
+ try {
3716
+ var info = "",
3717
+ node = node$jscomp$0;
3718
+ do
3719
+ (info += describeComponentStackByType(node.type)),
3720
+ (node = node.parent);
3721
+ while (node);
3722
+ var JSCompiler_inline_result = info;
3723
+ } catch (x) {
3724
+ JSCompiler_inline_result =
3725
+ "\nError generating stack: " + x.message + "\n" + x.stack;
3574
3726
  }
3575
- node = node.parent;
3576
- } while (node);
3577
- var JSCompiler_temp = request;
3578
- } catch (x) {
3579
- JSCompiler_temp =
3580
- "\nError generating stack: " + x.message + "\n" + x.stack;
3581
- }
3582
- JSCompiler_temp = { componentStack: JSCompiler_temp };
3583
- } else JSCompiler_temp = {};
3584
- return JSCompiler_temp;
3727
+ Object.defineProperty(errorInfo, "componentStack", {
3728
+ value: JSCompiler_inline_result
3729
+ });
3730
+ return JSCompiler_inline_result;
3731
+ }
3732
+ });
3733
+ return errorInfo;
3585
3734
  }
3586
3735
  function logRecoverableError(request, error, errorInfo) {
3587
- request = request.onError(error, errorInfo);
3588
- if (null == request || "string" === typeof request) return request;
3736
+ request = request.onError;
3737
+ error = request(error, errorInfo);
3738
+ if (null == error || "string" === typeof error) return error;
3589
3739
  }
3590
3740
  function fatalError(request, error) {
3591
- var onShellError = request.onShellError;
3592
- onShellError(error);
3593
- onShellError = request.onFatalError;
3741
+ var onShellError = request.onShellError,
3742
+ onFatalError = request.onFatalError;
3594
3743
  onShellError(error);
3744
+ onFatalError(error);
3595
3745
  null !== request.destination
3596
- ? ((request.status = 2), closeWithError(request.destination, error))
3597
- : ((request.status = 1), (request.fatalError = error));
3746
+ ? ((request.status = 14), closeWithError(request.destination, error))
3747
+ : ((request.status = 13), (request.fatalError = error));
3598
3748
  }
3599
3749
  function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
3600
3750
  var prevThenableState = task.thenableState;
@@ -3647,171 +3797,148 @@ function finishFunctionComponent(
3647
3797
  renderNode(request, task, children, -1),
3648
3798
  (task.treeContext = keyPath))
3649
3799
  : didEmitActionStateMarkers
3650
- ? renderNode(request, task, children, -1)
3651
- : renderNodeDestructive(request, task, children, -1);
3800
+ ? renderNode(request, task, children, -1)
3801
+ : renderNodeDestructive(request, task, children, -1);
3652
3802
  task.keyPath = actionStateCount;
3653
3803
  }
3654
3804
  function renderElement(request, task, keyPath, type, props, ref) {
3655
3805
  if ("function" === typeof type)
3656
3806
  if (type.prototype && type.prototype.isReactComponent) {
3657
- var JSCompiler_inline_result = props;
3807
+ var newProps = props;
3658
3808
  if ("ref" in props) {
3659
- JSCompiler_inline_result = {};
3809
+ newProps = {};
3660
3810
  for (var propName in props)
3661
- "ref" !== propName &&
3662
- (JSCompiler_inline_result[propName] = props[propName]);
3811
+ "ref" !== propName && (newProps[propName] = props[propName]);
3663
3812
  }
3664
3813
  var defaultProps = type.defaultProps;
3665
3814
  if (defaultProps) {
3666
- JSCompiler_inline_result === props &&
3667
- (JSCompiler_inline_result = assign(
3668
- {},
3669
- JSCompiler_inline_result,
3670
- props
3671
- ));
3672
- for (var propName$31 in defaultProps)
3673
- void 0 === JSCompiler_inline_result[propName$31] &&
3674
- (JSCompiler_inline_result[propName$31] = defaultProps[propName$31]);
3815
+ newProps === props && (newProps = assign({}, newProps, props));
3816
+ for (var propName$33 in defaultProps)
3817
+ void 0 === newProps[propName$33] &&
3818
+ (newProps[propName$33] = defaultProps[propName$33]);
3675
3819
  }
3676
- props = task.componentStack;
3677
- task.componentStack = { tag: 2, parent: task.componentStack, type: type };
3678
- defaultProps = emptyContextObject;
3820
+ props = newProps;
3821
+ newProps = emptyContextObject;
3822
+ defaultProps = type.contextType;
3823
+ "object" === typeof defaultProps &&
3824
+ null !== defaultProps &&
3825
+ (newProps = defaultProps._currentValue);
3826
+ newProps = new type(props, newProps);
3827
+ var initialState = void 0 !== newProps.state ? newProps.state : null;
3828
+ newProps.updater = classComponentUpdater;
3829
+ newProps.props = props;
3830
+ newProps.state = initialState;
3831
+ defaultProps = { queue: [], replace: !1 };
3832
+ newProps._reactInternals = defaultProps;
3679
3833
  ref = type.contextType;
3680
- "object" === typeof ref &&
3681
- null !== ref &&
3682
- (defaultProps = ref._currentValue);
3683
- defaultProps = new type(JSCompiler_inline_result, defaultProps);
3684
- propName$31 = void 0 !== defaultProps.state ? defaultProps.state : null;
3685
- defaultProps.updater = classComponentUpdater;
3686
- defaultProps.props = JSCompiler_inline_result;
3687
- defaultProps.state = propName$31;
3688
- ref = { queue: [], replace: !1 };
3689
- defaultProps._reactInternals = ref;
3690
- var contextType = type.contextType;
3691
- defaultProps.context =
3692
- "object" === typeof contextType && null !== contextType
3693
- ? contextType._currentValue
3834
+ newProps.context =
3835
+ "object" === typeof ref && null !== ref
3836
+ ? ref._currentValue
3694
3837
  : emptyContextObject;
3695
- contextType = type.getDerivedStateFromProps;
3696
- "function" === typeof contextType &&
3697
- ((contextType = contextType(JSCompiler_inline_result, propName$31)),
3698
- (propName$31 =
3699
- null === contextType || void 0 === contextType
3700
- ? propName$31
3701
- : assign({}, propName$31, contextType)),
3702
- (defaultProps.state = propName$31));
3838
+ ref = type.getDerivedStateFromProps;
3839
+ "function" === typeof ref &&
3840
+ ((ref = ref(props, initialState)),
3841
+ (initialState =
3842
+ null === ref || void 0 === ref
3843
+ ? initialState
3844
+ : assign({}, initialState, ref)),
3845
+ (newProps.state = initialState));
3703
3846
  if (
3704
3847
  "function" !== typeof type.getDerivedStateFromProps &&
3705
- "function" !== typeof defaultProps.getSnapshotBeforeUpdate &&
3706
- ("function" === typeof defaultProps.UNSAFE_componentWillMount ||
3707
- "function" === typeof defaultProps.componentWillMount)
3848
+ "function" !== typeof newProps.getSnapshotBeforeUpdate &&
3849
+ ("function" === typeof newProps.UNSAFE_componentWillMount ||
3850
+ "function" === typeof newProps.componentWillMount)
3708
3851
  )
3709
3852
  if (
3710
- ((type = defaultProps.state),
3711
- "function" === typeof defaultProps.componentWillMount &&
3712
- defaultProps.componentWillMount(),
3713
- "function" === typeof defaultProps.UNSAFE_componentWillMount &&
3714
- defaultProps.UNSAFE_componentWillMount(),
3715
- type !== defaultProps.state &&
3853
+ ((type = newProps.state),
3854
+ "function" === typeof newProps.componentWillMount &&
3855
+ newProps.componentWillMount(),
3856
+ "function" === typeof newProps.UNSAFE_componentWillMount &&
3857
+ newProps.UNSAFE_componentWillMount(),
3858
+ type !== newProps.state &&
3716
3859
  classComponentUpdater.enqueueReplaceState(
3717
- defaultProps,
3718
- defaultProps.state,
3860
+ newProps,
3861
+ newProps.state,
3719
3862
  null
3720
3863
  ),
3721
- null !== ref.queue && 0 < ref.queue.length)
3864
+ null !== defaultProps.queue && 0 < defaultProps.queue.length)
3722
3865
  )
3723
3866
  if (
3724
- ((type = ref.queue),
3725
- (contextType = ref.replace),
3726
- (ref.queue = null),
3727
- (ref.replace = !1),
3728
- contextType && 1 === type.length)
3867
+ ((type = defaultProps.queue),
3868
+ (ref = defaultProps.replace),
3869
+ (defaultProps.queue = null),
3870
+ (defaultProps.replace = !1),
3871
+ ref && 1 === type.length)
3729
3872
  )
3730
- defaultProps.state = type[0];
3873
+ newProps.state = type[0];
3731
3874
  else {
3732
- ref = contextType ? type[0] : defaultProps.state;
3733
- propName$31 = !0;
3734
- for (
3735
- contextType = contextType ? 1 : 0;
3736
- contextType < type.length;
3737
- contextType++
3738
- )
3739
- (propName = type[contextType]),
3740
- (propName =
3741
- "function" === typeof propName
3742
- ? propName.call(
3743
- defaultProps,
3744
- ref,
3745
- JSCompiler_inline_result,
3746
- void 0
3747
- )
3748
- : propName),
3749
- null != propName &&
3750
- (propName$31
3751
- ? ((propName$31 = !1), (ref = assign({}, ref, propName)))
3752
- : assign(ref, propName));
3753
- defaultProps.state = ref;
3875
+ defaultProps = ref ? type[0] : newProps.state;
3876
+ initialState = !0;
3877
+ for (ref = ref ? 1 : 0; ref < type.length; ref++)
3878
+ (propName$33 = type[ref]),
3879
+ (propName$33 =
3880
+ "function" === typeof propName$33
3881
+ ? propName$33.call(newProps, defaultProps, props, void 0)
3882
+ : propName$33),
3883
+ null != propName$33 &&
3884
+ (initialState
3885
+ ? ((initialState = !1),
3886
+ (defaultProps = assign({}, defaultProps, propName$33)))
3887
+ : assign(defaultProps, propName$33));
3888
+ newProps.state = defaultProps;
3754
3889
  }
3755
- else ref.queue = null;
3756
- type = defaultProps.render();
3757
- JSCompiler_inline_result = task.keyPath;
3890
+ else defaultProps.queue = null;
3891
+ type = newProps.render();
3892
+ if (12 === request.status) throw null;
3893
+ props = task.keyPath;
3758
3894
  task.keyPath = keyPath;
3759
3895
  renderNodeDestructive(request, task, type, -1);
3760
- task.keyPath = JSCompiler_inline_result;
3761
- task.componentStack = props;
3762
- } else
3763
- (JSCompiler_inline_result = task.componentStack),
3764
- (task.componentStack = {
3765
- tag: 1,
3766
- parent: task.componentStack,
3767
- type: type
3768
- }),
3769
- (type = renderWithHooks(request, task, keyPath, type, props, void 0)),
3770
- finishFunctionComponent(
3771
- request,
3772
- task,
3773
- keyPath,
3774
- type,
3775
- 0 !== localIdCounter,
3776
- actionStateCounter,
3777
- actionStateMatchingIndex
3778
- ),
3779
- (task.componentStack = JSCompiler_inline_result);
3780
- else if ("string" === typeof type) {
3781
- JSCompiler_inline_result = task.componentStack;
3782
- task.componentStack = createBuiltInComponentStack(task, type);
3783
- defaultProps = task.blockedSegment;
3784
- if (null === defaultProps)
3785
- (defaultProps = props.children),
3786
- (ref = task.formatContext),
3787
- (propName$31 = task.keyPath),
3788
- (task.formatContext = getChildFormatContext(ref, type, props)),
3896
+ task.keyPath = props;
3897
+ } else {
3898
+ type = renderWithHooks(request, task, keyPath, type, props, void 0);
3899
+ if (12 === request.status) throw null;
3900
+ finishFunctionComponent(
3901
+ request,
3902
+ task,
3903
+ keyPath,
3904
+ type,
3905
+ 0 !== localIdCounter,
3906
+ actionStateCounter,
3907
+ actionStateMatchingIndex
3908
+ );
3909
+ }
3910
+ else if ("string" === typeof type)
3911
+ if (((newProps = task.blockedSegment), null === newProps))
3912
+ (newProps = props.children),
3913
+ (defaultProps = task.formatContext),
3914
+ (initialState = task.keyPath),
3915
+ (task.formatContext = getChildFormatContext(defaultProps, type, props)),
3789
3916
  (task.keyPath = keyPath),
3790
- renderNode(request, task, defaultProps, -1),
3791
- (task.formatContext = ref),
3792
- (task.keyPath = propName$31);
3917
+ renderNode(request, task, newProps, -1),
3918
+ (task.formatContext = defaultProps),
3919
+ (task.keyPath = initialState);
3793
3920
  else {
3794
- propName$31 = pushStartInstance(
3795
- defaultProps.chunks,
3921
+ initialState = pushStartInstance(
3922
+ newProps.chunks,
3796
3923
  type,
3797
3924
  props,
3798
3925
  request.resumableState,
3799
3926
  request.renderState,
3800
3927
  task.hoistableState,
3801
3928
  task.formatContext,
3802
- defaultProps.lastPushedText,
3929
+ newProps.lastPushedText,
3803
3930
  task.isFallback
3804
3931
  );
3805
- defaultProps.lastPushedText = !1;
3806
- ref = task.formatContext;
3807
- contextType = task.keyPath;
3808
- task.formatContext = getChildFormatContext(ref, type, props);
3932
+ newProps.lastPushedText = !1;
3933
+ defaultProps = task.formatContext;
3934
+ ref = task.keyPath;
3935
+ task.formatContext = getChildFormatContext(defaultProps, type, props);
3809
3936
  task.keyPath = keyPath;
3810
- renderNode(request, task, propName$31, -1);
3811
- task.formatContext = ref;
3812
- task.keyPath = contextType;
3937
+ renderNode(request, task, initialState, -1);
3938
+ task.formatContext = defaultProps;
3939
+ task.keyPath = ref;
3813
3940
  a: {
3814
- keyPath = defaultProps.chunks;
3941
+ task = newProps.chunks;
3815
3942
  request = request.resumableState;
3816
3943
  switch (type) {
3817
3944
  case "title":
@@ -3834,23 +3961,22 @@ function renderElement(request, task, keyPath, type, props, ref) {
3834
3961
  case "wbr":
3835
3962
  break a;
3836
3963
  case "body":
3837
- if (1 >= ref.insertionMode) {
3964
+ if (1 >= defaultProps.insertionMode) {
3838
3965
  request.hasBody = !0;
3839
3966
  break a;
3840
3967
  }
3841
3968
  break;
3842
3969
  case "html":
3843
- if (0 === ref.insertionMode) {
3970
+ if (0 === defaultProps.insertionMode) {
3844
3971
  request.hasHtml = !0;
3845
3972
  break a;
3846
3973
  }
3847
3974
  }
3848
- keyPath.push(endChunkForTag(type));
3975
+ task.push(endChunkForTag(type));
3849
3976
  }
3850
- defaultProps.lastPushedText = !1;
3977
+ newProps.lastPushedText = !1;
3851
3978
  }
3852
- task.componentStack = JSCompiler_inline_result;
3853
- } else {
3979
+ else {
3854
3980
  switch (type) {
3855
3981
  case REACT_LEGACY_HIDDEN_TYPE:
3856
3982
  case REACT_DEBUG_TRACING_MODE_TYPE:
@@ -3870,13 +3996,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
3870
3996
  (task.keyPath = type));
3871
3997
  return;
3872
3998
  case REACT_SUSPENSE_LIST_TYPE:
3873
- type = task.componentStack;
3874
- task.componentStack = createBuiltInComponentStack(task, "SuspenseList");
3875
- JSCompiler_inline_result = task.keyPath;
3999
+ type = task.keyPath;
3876
4000
  task.keyPath = keyPath;
3877
4001
  renderNodeDestructive(request, task, props.children, -1);
3878
- task.keyPath = JSCompiler_inline_result;
3879
- task.componentStack = type;
4002
+ task.keyPath = type;
3880
4003
  return;
3881
4004
  case REACT_SCOPE_TYPE:
3882
4005
  throw Error("ReactDOMServer does not yet support scope components.");
@@ -3891,31 +4014,26 @@ function renderElement(request, task, keyPath, type, props, ref) {
3891
4014
  task.keyPath = type;
3892
4015
  }
3893
4016
  } else {
3894
- var previousComponentStack = task.componentStack;
3895
- type = task.componentStack = createBuiltInComponentStack(
3896
- task,
3897
- "Suspense"
3898
- );
3899
- var prevKeyPath = task.keyPath;
3900
- ref = task.blockedBoundary;
3901
- var parentHoistableState = task.hoistableState,
3902
- parentSegment = task.blockedSegment;
3903
- propName$31 = props.fallback;
3904
- var content = props.children;
3905
- props = new Set();
3906
- contextType = createSuspenseBoundary(request, props);
4017
+ type = task.keyPath;
4018
+ var parentBoundary = task.blockedBoundary,
4019
+ parentHoistableState = task.hoistableState;
4020
+ ref = task.blockedSegment;
4021
+ propName$33 = props.fallback;
4022
+ props = props.children;
4023
+ var fallbackAbortSet = new Set();
4024
+ propName = createSuspenseBoundary(request, fallbackAbortSet);
3907
4025
  null !== request.trackedPostpones &&
3908
- (contextType.trackedContentKeyPath = keyPath);
3909
- propName = createPendingSegment(
4026
+ (propName.trackedContentKeyPath = keyPath);
4027
+ var boundarySegment = createPendingSegment(
3910
4028
  request,
3911
- parentSegment.chunks.length,
3912
- contextType,
4029
+ ref.chunks.length,
4030
+ propName,
3913
4031
  task.formatContext,
3914
4032
  !1,
3915
4033
  !1
3916
4034
  );
3917
- parentSegment.children.push(propName);
3918
- parentSegment.lastPushedText = !1;
4035
+ ref.children.push(boundarySegment);
4036
+ ref.lastPushedText = !1;
3919
4037
  var contentRootSegment = createPendingSegment(
3920
4038
  request,
3921
4039
  0,
@@ -3925,107 +4043,122 @@ function renderElement(request, task, keyPath, type, props, ref) {
3925
4043
  !1
3926
4044
  );
3927
4045
  contentRootSegment.parentFlushed = !0;
3928
- task.blockedBoundary = contextType;
3929
- task.hoistableState = contextType.contentState;
3930
- task.blockedSegment = contentRootSegment;
3931
- task.keyPath = keyPath;
3932
- try {
3933
- if (
3934
- (renderNode(request, task, content, -1),
3935
- contentRootSegment.lastPushedText &&
3936
- contentRootSegment.textEmbedded &&
3937
- contentRootSegment.chunks.push("\x3c!-- --\x3e"),
3938
- (contentRootSegment.status = 1),
3939
- queueCompletedSegment(contextType, contentRootSegment),
3940
- 0 === contextType.pendingTasks && 0 === contextType.status)
3941
- ) {
3942
- contextType.status = 1;
3943
- task.componentStack = previousComponentStack;
3944
- break a;
4046
+ if (null !== request.trackedPostpones) {
4047
+ newProps = [keyPath[0], "Suspense Fallback", keyPath[2]];
4048
+ defaultProps = [newProps[1], newProps[2], [], null];
4049
+ request.trackedPostpones.workingMap.set(newProps, defaultProps);
4050
+ propName.trackedFallbackNode = defaultProps;
4051
+ task.blockedSegment = boundarySegment;
4052
+ task.keyPath = newProps;
4053
+ boundarySegment.status = 6;
4054
+ try {
4055
+ renderNode(request, task, propName$33, -1),
4056
+ boundarySegment.lastPushedText &&
4057
+ boundarySegment.textEmbedded &&
4058
+ boundarySegment.chunks.push("\x3c!-- --\x3e"),
4059
+ (boundarySegment.status = 1);
4060
+ } catch (thrownValue) {
4061
+ throw (
4062
+ ((boundarySegment.status = 12 === request.status ? 3 : 4),
4063
+ thrownValue)
4064
+ );
4065
+ } finally {
4066
+ (task.blockedSegment = ref), (task.keyPath = type);
3945
4067
  }
3946
- } catch (error) {
3947
- (contentRootSegment.status = 4),
3948
- (contextType.status = 4),
3949
- (JSCompiler_inline_result = getThrownInfo(
3950
- request,
3951
- task.componentStack
3952
- )),
3953
- (defaultProps = logRecoverableError(
3954
- request,
3955
- error,
3956
- JSCompiler_inline_result
3957
- )),
3958
- (contextType.errorDigest = defaultProps),
3959
- untrackBoundary(request, contextType);
3960
- } finally {
3961
- (task.blockedBoundary = ref),
3962
- (task.hoistableState = parentHoistableState),
3963
- (task.blockedSegment = parentSegment),
3964
- (task.keyPath = prevKeyPath),
3965
- (task.componentStack = previousComponentStack);
4068
+ task = createRenderTask(
4069
+ request,
4070
+ null,
4071
+ props,
4072
+ -1,
4073
+ propName,
4074
+ contentRootSegment,
4075
+ propName.contentState,
4076
+ task.abortSet,
4077
+ keyPath,
4078
+ task.formatContext,
4079
+ task.context,
4080
+ task.treeContext,
4081
+ task.componentStack,
4082
+ task.isFallback
4083
+ );
4084
+ pushComponentStack(task);
4085
+ request.pingedTasks.push(task);
4086
+ } else {
4087
+ task.blockedBoundary = propName;
4088
+ task.hoistableState = propName.contentState;
4089
+ task.blockedSegment = contentRootSegment;
4090
+ task.keyPath = keyPath;
4091
+ contentRootSegment.status = 6;
4092
+ try {
4093
+ if (
4094
+ (renderNode(request, task, props, -1),
4095
+ contentRootSegment.lastPushedText &&
4096
+ contentRootSegment.textEmbedded &&
4097
+ contentRootSegment.chunks.push("\x3c!-- --\x3e"),
4098
+ (contentRootSegment.status = 1),
4099
+ queueCompletedSegment(propName, contentRootSegment),
4100
+ 0 === propName.pendingTasks && 0 === propName.status)
4101
+ ) {
4102
+ propName.status = 1;
4103
+ break a;
4104
+ }
4105
+ } catch (thrownValue$28) {
4106
+ (propName.status = 4),
4107
+ 12 === request.status
4108
+ ? ((contentRootSegment.status = 3),
4109
+ (newProps = request.fatalError))
4110
+ : ((contentRootSegment.status = 4),
4111
+ (newProps = thrownValue$28)),
4112
+ (defaultProps = getThrownInfo(task.componentStack)),
4113
+ (initialState = logRecoverableError(
4114
+ request,
4115
+ newProps,
4116
+ defaultProps
4117
+ )),
4118
+ (propName.errorDigest = initialState),
4119
+ untrackBoundary(request, propName);
4120
+ } finally {
4121
+ (task.blockedBoundary = parentBoundary),
4122
+ (task.hoistableState = parentHoistableState),
4123
+ (task.blockedSegment = ref),
4124
+ (task.keyPath = type);
4125
+ }
4126
+ task = createRenderTask(
4127
+ request,
4128
+ null,
4129
+ propName$33,
4130
+ -1,
4131
+ parentBoundary,
4132
+ boundarySegment,
4133
+ propName.fallbackState,
4134
+ fallbackAbortSet,
4135
+ [keyPath[0], "Suspense Fallback", keyPath[2]],
4136
+ task.formatContext,
4137
+ task.context,
4138
+ task.treeContext,
4139
+ task.componentStack,
4140
+ !0
4141
+ );
4142
+ pushComponentStack(task);
4143
+ request.pingedTasks.push(task);
3966
4144
  }
3967
- JSCompiler_inline_result = [
3968
- keyPath[0],
3969
- "Suspense Fallback",
3970
- keyPath[2]
3971
- ];
3972
- defaultProps = request.trackedPostpones;
3973
- null !== defaultProps &&
3974
- ((previousComponentStack = [
3975
- JSCompiler_inline_result[1],
3976
- JSCompiler_inline_result[2],
3977
- [],
3978
- null
3979
- ]),
3980
- defaultProps.workingMap.set(
3981
- JSCompiler_inline_result,
3982
- previousComponentStack
3983
- ),
3984
- 5 === contextType.status
3985
- ? (defaultProps.workingMap.get(keyPath)[4] =
3986
- previousComponentStack)
3987
- : (contextType.trackedFallbackNode = previousComponentStack));
3988
- task = createRenderTask(
3989
- request,
3990
- null,
3991
- propName$31,
3992
- -1,
3993
- ref,
3994
- propName,
3995
- contextType.fallbackState,
3996
- props,
3997
- JSCompiler_inline_result,
3998
- task.formatContext,
3999
- task.legacyContext,
4000
- task.context,
4001
- task.treeContext,
4002
- type,
4003
- !0
4004
- );
4005
- request.pingedTasks.push(task);
4006
4145
  }
4007
4146
  return;
4008
4147
  }
4009
4148
  if ("object" === typeof type && null !== type)
4010
4149
  switch (type.$$typeof) {
4011
4150
  case REACT_FORWARD_REF_TYPE:
4012
- JSCompiler_inline_result = task.componentStack;
4013
- task.componentStack = {
4014
- tag: 1,
4015
- parent: task.componentStack,
4016
- type: type.render
4017
- };
4018
4151
  if ("ref" in props)
4019
- for (contextType in ((defaultProps = {}), props))
4020
- "ref" !== contextType &&
4021
- (defaultProps[contextType] = props[contextType]);
4022
- else defaultProps = props;
4152
+ for (boundarySegment in ((newProps = {}), props))
4153
+ "ref" !== boundarySegment &&
4154
+ (newProps[boundarySegment] = props[boundarySegment]);
4155
+ else newProps = props;
4023
4156
  type = renderWithHooks(
4024
4157
  request,
4025
4158
  task,
4026
4159
  keyPath,
4027
4160
  type.render,
4028
- defaultProps,
4161
+ newProps,
4029
4162
  ref
4030
4163
  );
4031
4164
  finishFunctionComponent(
@@ -4037,7 +4170,6 @@ function renderElement(request, task, keyPath, type, props, ref) {
4037
4170
  actionStateCounter,
4038
4171
  actionStateMatchingIndex
4039
4172
  );
4040
- task.componentStack = JSCompiler_inline_result;
4041
4173
  return;
4042
4174
  case REACT_MEMO_TYPE:
4043
4175
  renderElement(request, task, keyPath, type.type, props, ref);
@@ -4045,16 +4177,16 @@ function renderElement(request, task, keyPath, type, props, ref) {
4045
4177
  case REACT_PROVIDER_TYPE:
4046
4178
  case REACT_CONTEXT_TYPE:
4047
4179
  defaultProps = props.children;
4048
- JSCompiler_inline_result = task.keyPath;
4180
+ newProps = task.keyPath;
4049
4181
  props = props.value;
4050
- ref = type._currentValue;
4182
+ initialState = type._currentValue;
4051
4183
  type._currentValue = props;
4052
- propName$31 = currentActiveSnapshot;
4184
+ ref = currentActiveSnapshot;
4053
4185
  currentActiveSnapshot = type = {
4054
- parent: propName$31,
4055
- depth: null === propName$31 ? 0 : propName$31.depth + 1,
4186
+ parent: ref,
4187
+ depth: null === ref ? 0 : ref.depth + 1,
4056
4188
  context: type,
4057
- parentValue: ref,
4189
+ parentValue: initialState,
4058
4190
  value: props
4059
4191
  };
4060
4192
  task.context = type;
@@ -4068,7 +4200,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4068
4200
  request.context._currentValue = request.parentValue;
4069
4201
  request = currentActiveSnapshot = request.parent;
4070
4202
  task.context = request;
4071
- task.keyPath = JSCompiler_inline_result;
4203
+ task.keyPath = newProps;
4072
4204
  return;
4073
4205
  case REACT_CONSUMER_TYPE:
4074
4206
  props = props.children;
@@ -4079,12 +4211,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4079
4211
  task.keyPath = props;
4080
4212
  return;
4081
4213
  case REACT_LAZY_TYPE:
4082
- JSCompiler_inline_result = task.componentStack;
4083
- task.componentStack = createBuiltInComponentStack(task, "Lazy");
4084
- defaultProps = type._init;
4085
- type = defaultProps(type._payload);
4086
- renderElement(request, task, keyPath, type, props, void 0);
4087
- task.componentStack = JSCompiler_inline_result;
4214
+ newProps = type._init;
4215
+ type = newProps(type._payload);
4216
+ if (12 === request.status) throw null;
4217
+ renderElement(request, task, keyPath, type, props, ref);
4088
4218
  return;
4089
4219
  }
4090
4220
  throw Error(
@@ -4120,23 +4250,29 @@ function resumeNode(request, task, segmentId, node, childIndex) {
4120
4250
  (task.replay = prevReplay), (task.blockedSegment = null);
4121
4251
  }
4122
4252
  }
4123
- function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4124
- if (null !== task.replay && "number" === typeof task.replay.slots)
4125
- resumeNode(request, task, task.replay.slots, node$jscomp$0, childIndex);
4126
- else if (
4127
- ((task.node = node$jscomp$0),
4128
- (task.childIndex = childIndex),
4129
- null !== node$jscomp$0)
4130
- ) {
4131
- if ("object" === typeof node$jscomp$0) {
4132
- switch (node$jscomp$0.$$typeof) {
4253
+ function renderNodeDestructive(request, task, node, childIndex) {
4254
+ null !== task.replay && "number" === typeof task.replay.slots
4255
+ ? resumeNode(request, task, task.replay.slots, node, childIndex)
4256
+ : ((task.node = node),
4257
+ (task.childIndex = childIndex),
4258
+ (node = task.componentStack),
4259
+ pushComponentStack(task),
4260
+ retryNode(request, task),
4261
+ (task.componentStack = node));
4262
+ }
4263
+ function retryNode(request, task) {
4264
+ var node = task.node,
4265
+ childIndex = task.childIndex;
4266
+ if (null !== node) {
4267
+ if ("object" === typeof node) {
4268
+ switch (node.$$typeof) {
4133
4269
  case REACT_ELEMENT_TYPE:
4134
- var type = node$jscomp$0.type,
4135
- key = node$jscomp$0.key,
4136
- props = node$jscomp$0.props;
4137
- node$jscomp$0 = props.ref;
4138
- var ref = void 0 !== node$jscomp$0 ? node$jscomp$0 : null;
4139
- var name = getComponentNameFromType(type),
4270
+ var type = node.type,
4271
+ key = node.key,
4272
+ props = node.props;
4273
+ node = props.ref;
4274
+ var ref = void 0 !== node ? node : null,
4275
+ name = getComponentNameFromType(type),
4140
4276
  keyOrIndex =
4141
4277
  null == key ? (-1 === childIndex ? 0 : childIndex) : key;
4142
4278
  key = [task.keyPath, name, keyOrIndex];
@@ -4144,24 +4280,20 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4144
4280
  a: {
4145
4281
  var replay = task.replay;
4146
4282
  childIndex = replay.nodes;
4147
- for (
4148
- node$jscomp$0 = 0;
4149
- node$jscomp$0 < childIndex.length;
4150
- node$jscomp$0++
4151
- ) {
4152
- var node = childIndex[node$jscomp$0];
4153
- if (keyOrIndex === node[1]) {
4154
- if (4 === node.length) {
4155
- if (null !== name && name !== node[0])
4283
+ for (node = 0; node < childIndex.length; node++) {
4284
+ var node$jscomp$0 = childIndex[node];
4285
+ if (keyOrIndex === node$jscomp$0[1]) {
4286
+ if (4 === node$jscomp$0.length) {
4287
+ if (null !== name && name !== node$jscomp$0[0])
4156
4288
  throw Error(
4157
4289
  "Expected the resume to render <" +
4158
- node[0] +
4290
+ node$jscomp$0[0] +
4159
4291
  "> in this slot but instead it rendered <" +
4160
4292
  name +
4161
4293
  ">. The tree doesn't match so React will fallback to client rendering."
4162
4294
  );
4163
- var childNodes = node[2];
4164
- name = node[3];
4295
+ var childNodes = node$jscomp$0[2];
4296
+ name = node$jscomp$0[3];
4165
4297
  keyOrIndex = task.node;
4166
4298
  task.replay = {
4167
4299
  nodes: childNodes,
@@ -4190,14 +4322,13 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4190
4322
  x)
4191
4323
  );
4192
4324
  task.replay.pendingTasks--;
4193
- props = getThrownInfo(request, task.componentStack);
4194
- key = request;
4195
- request = task.blockedBoundary;
4325
+ props = getThrownInfo(task.componentStack);
4326
+ key = task.blockedBoundary;
4196
4327
  type = x;
4197
- props = logRecoverableError(key, type, props);
4328
+ props = logRecoverableError(request, type, props);
4198
4329
  abortRemainingReplayNodes(
4199
- key,
4200
4330
  request,
4331
+ key,
4201
4332
  childNodes,
4202
4333
  name,
4203
4334
  type,
@@ -4214,15 +4345,14 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4214
4345
  );
4215
4346
  b: {
4216
4347
  replay = void 0;
4217
- type = node[5];
4218
- ref = node[2];
4219
- name = node[3];
4220
- keyOrIndex = null === node[4] ? [] : node[4][2];
4221
- node = null === node[4] ? null : node[4][3];
4222
- var previousComponentStack = task.componentStack,
4223
- suspenseComponentStack = (task.componentStack =
4224
- createBuiltInComponentStack(task, "Suspense")),
4225
- prevKeyPath = task.keyPath,
4348
+ type = node$jscomp$0[5];
4349
+ ref = node$jscomp$0[2];
4350
+ name = node$jscomp$0[3];
4351
+ keyOrIndex =
4352
+ null === node$jscomp$0[4] ? [] : node$jscomp$0[4][2];
4353
+ node$jscomp$0 =
4354
+ null === node$jscomp$0[4] ? null : node$jscomp$0[4][3];
4355
+ var prevKeyPath = task.keyPath,
4226
4356
  previousReplaySet = task.replay,
4227
4357
  parentBoundary = task.blockedBoundary,
4228
4358
  parentHoistableState = task.hoistableState,
@@ -4237,6 +4367,7 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4237
4367
  resumedBoundary.rootSegmentID = type;
4238
4368
  task.blockedBoundary = resumedBoundary;
4239
4369
  task.hoistableState = resumedBoundary.contentState;
4370
+ task.keyPath = key;
4240
4371
  task.replay = {
4241
4372
  nodes: ref,
4242
4373
  slots: name,
@@ -4262,10 +4393,7 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4262
4393
  }
4263
4394
  } catch (error) {
4264
4395
  (resumedBoundary.status = 4),
4265
- (childNodes = getThrownInfo(
4266
- request,
4267
- task.componentStack
4268
- )),
4396
+ (childNodes = getThrownInfo(task.componentStack)),
4269
4397
  (replay = logRecoverableError(
4270
4398
  request,
4271
4399
  error,
@@ -4280,13 +4408,16 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4280
4408
  (task.blockedBoundary = parentBoundary),
4281
4409
  (task.hoistableState = parentHoistableState),
4282
4410
  (task.replay = previousReplaySet),
4283
- (task.keyPath = prevKeyPath),
4284
- (task.componentStack = previousComponentStack);
4411
+ (task.keyPath = prevKeyPath);
4285
4412
  }
4286
4413
  task = createReplayTask(
4287
4414
  request,
4288
4415
  null,
4289
- { nodes: keyOrIndex, slots: node, pendingTasks: 0 },
4416
+ {
4417
+ nodes: keyOrIndex,
4418
+ slots: node$jscomp$0,
4419
+ pendingTasks: 0
4420
+ },
4290
4421
  props,
4291
4422
  -1,
4292
4423
  parentBoundary,
@@ -4294,16 +4425,16 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4294
4425
  fallbackAbortSet,
4295
4426
  [key[0], "Suspense Fallback", key[2]],
4296
4427
  task.formatContext,
4297
- task.legacyContext,
4298
4428
  task.context,
4299
4429
  task.treeContext,
4300
- suspenseComponentStack,
4430
+ task.componentStack,
4301
4431
  !0
4302
4432
  );
4433
+ pushComponentStack(task);
4303
4434
  request.pingedTasks.push(task);
4304
4435
  }
4305
4436
  }
4306
- childIndex.splice(node$jscomp$0, 1);
4437
+ childIndex.splice(node, 1);
4307
4438
  break a;
4308
4439
  }
4309
4440
  }
@@ -4315,80 +4446,68 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4315
4446
  "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
4316
4447
  );
4317
4448
  case REACT_LAZY_TYPE:
4318
- childNodes = task.componentStack;
4319
- task.componentStack = createBuiltInComponentStack(task, "Lazy");
4320
- props = node$jscomp$0._init;
4321
- node$jscomp$0 = props(node$jscomp$0._payload);
4322
- task.componentStack = childNodes;
4323
- renderNodeDestructive(request, task, node$jscomp$0, childIndex);
4449
+ childNodes = node._init;
4450
+ node = childNodes(node._payload);
4451
+ if (12 === request.status) throw null;
4452
+ renderNodeDestructive(request, task, node, childIndex);
4324
4453
  return;
4325
4454
  }
4326
- if (isArrayImpl(node$jscomp$0)) {
4327
- renderChildrenArray(request, task, node$jscomp$0, childIndex);
4455
+ if (isArrayImpl(node)) {
4456
+ renderChildrenArray(request, task, node, childIndex);
4328
4457
  return;
4329
4458
  }
4330
- null === node$jscomp$0 || "object" !== typeof node$jscomp$0
4459
+ null === node || "object" !== typeof node
4331
4460
  ? (childNodes = null)
4332
4461
  : ((childNodes =
4333
- (MAYBE_ITERATOR_SYMBOL && node$jscomp$0[MAYBE_ITERATOR_SYMBOL]) ||
4334
- node$jscomp$0["@@iterator"]),
4462
+ (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
4463
+ node["@@iterator"]),
4335
4464
  (childNodes = "function" === typeof childNodes ? childNodes : null));
4336
- if (childNodes && (childNodes = childNodes.call(node$jscomp$0))) {
4337
- node$jscomp$0 = childNodes.next();
4338
- if (!node$jscomp$0.done) {
4465
+ if (childNodes && (childNodes = childNodes.call(node))) {
4466
+ node = childNodes.next();
4467
+ if (!node.done) {
4339
4468
  props = [];
4340
- do
4341
- props.push(node$jscomp$0.value),
4342
- (node$jscomp$0 = childNodes.next());
4343
- while (!node$jscomp$0.done);
4469
+ do props.push(node.value), (node = childNodes.next());
4470
+ while (!node.done);
4344
4471
  renderChildrenArray(request, task, props, childIndex);
4345
4472
  }
4346
4473
  return;
4347
4474
  }
4348
- if ("function" === typeof node$jscomp$0.then)
4475
+ if ("function" === typeof node.then)
4349
4476
  return (
4350
4477
  (task.thenableState = null),
4351
- renderNodeDestructive(
4352
- request,
4353
- task,
4354
- unwrapThenable(node$jscomp$0),
4355
- childIndex
4356
- )
4478
+ renderNodeDestructive(request, task, unwrapThenable(node), childIndex)
4357
4479
  );
4358
- if (node$jscomp$0.$$typeof === REACT_CONTEXT_TYPE)
4480
+ if (node.$$typeof === REACT_CONTEXT_TYPE)
4359
4481
  return renderNodeDestructive(
4360
4482
  request,
4361
4483
  task,
4362
- node$jscomp$0._currentValue,
4484
+ node._currentValue,
4363
4485
  childIndex
4364
4486
  );
4365
- childIndex = Object.prototype.toString.call(node$jscomp$0);
4487
+ childIndex = Object.prototype.toString.call(node);
4366
4488
  throw Error(
4367
4489
  "Objects are not valid as a React child (found: " +
4368
4490
  ("[object Object]" === childIndex
4369
- ? "object with keys {" + Object.keys(node$jscomp$0).join(", ") + "}"
4491
+ ? "object with keys {" + Object.keys(node).join(", ") + "}"
4370
4492
  : childIndex) +
4371
4493
  "). If you meant to render a collection of children, use an array instead."
4372
4494
  );
4373
4495
  }
4374
- if ("string" === typeof node$jscomp$0)
4496
+ if ("string" === typeof node)
4375
4497
  (childIndex = task.blockedSegment),
4376
4498
  null !== childIndex &&
4377
4499
  (childIndex.lastPushedText = pushTextInstance(
4378
4500
  childIndex.chunks,
4379
- node$jscomp$0,
4501
+ node,
4380
4502
  request.renderState,
4381
4503
  childIndex.lastPushedText
4382
4504
  ));
4383
- else if (
4384
- "number" === typeof node$jscomp$0 ||
4385
- "bigint" === typeof node$jscomp$0
4386
- )
4505
+ else if ("number" === typeof node || "bigint" === typeof node)
4387
4506
  (childIndex = task.blockedSegment),
4388
4507
  null !== childIndex &&
4389
4508
  (childIndex.lastPushedText = pushTextInstance(
4390
4509
  childIndex.chunks,
4391
- "" + node$jscomp$0,
4510
+ "" + node,
4392
4511
  request.renderState,
4393
4512
  childIndex.lastPushedText
4394
4513
  ));
@@ -4426,7 +4545,7 @@ function renderChildrenArray(request, task, children, childIndex) {
4426
4545
  )
4427
4546
  throw x;
4428
4547
  task.replay.pendingTasks--;
4429
- children = getThrownInfo(request, task.componentStack);
4548
+ children = getThrownInfo(task.componentStack);
4430
4549
  var boundary = task.blockedBoundary,
4431
4550
  error = x;
4432
4551
  children = logRecoverableError(request, error, children);
@@ -4481,9 +4600,55 @@ function untrackBoundary(request, boundary) {
4481
4600
  void 0 !== boundary &&
4482
4601
  ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
4483
4602
  }
4603
+ function spawnNewSuspendedReplayTask(request, task, thenableState) {
4604
+ return createReplayTask(
4605
+ request,
4606
+ thenableState,
4607
+ task.replay,
4608
+ task.node,
4609
+ task.childIndex,
4610
+ task.blockedBoundary,
4611
+ task.hoistableState,
4612
+ task.abortSet,
4613
+ task.keyPath,
4614
+ task.formatContext,
4615
+ task.context,
4616
+ task.treeContext,
4617
+ task.componentStack,
4618
+ task.isFallback
4619
+ );
4620
+ }
4621
+ function spawnNewSuspendedRenderTask(request, task, thenableState) {
4622
+ var segment = task.blockedSegment,
4623
+ newSegment = createPendingSegment(
4624
+ request,
4625
+ segment.chunks.length,
4626
+ null,
4627
+ task.formatContext,
4628
+ segment.lastPushedText,
4629
+ !0
4630
+ );
4631
+ segment.children.push(newSegment);
4632
+ segment.lastPushedText = !1;
4633
+ return createRenderTask(
4634
+ request,
4635
+ thenableState,
4636
+ task.node,
4637
+ task.childIndex,
4638
+ task.blockedBoundary,
4639
+ newSegment,
4640
+ task.hoistableState,
4641
+ task.abortSet,
4642
+ task.keyPath,
4643
+ task.formatContext,
4644
+ task.context,
4645
+ task.treeContext,
4646
+ task.componentStack,
4647
+ task.isFallback
4648
+ );
4649
+ }
4484
4650
  function renderNode(request, task, node, childIndex) {
4485
4651
  var previousFormatContext = task.formatContext,
4486
- previousLegacyContext = task.legacyContext,
4487
4652
  previousContext = task.context,
4488
4653
  previousKeyPath = task.keyPath,
4489
4654
  previousTreeContext = task.treeContext,
@@ -4499,37 +4664,32 @@ function renderNode(request, task, node, childIndex) {
4499
4664
  thrownValue === SuspenseException
4500
4665
  ? getSuspendedThenable()
4501
4666
  : thrownValue),
4502
- "object" === typeof node &&
4503
- null !== node &&
4504
- "function" === typeof node.then)
4667
+ "object" === typeof node && null !== node)
4505
4668
  ) {
4506
- childIndex = getThenableStateAfterSuspending();
4507
- request = createReplayTask(
4508
- request,
4509
- childIndex,
4510
- task.replay,
4511
- task.node,
4512
- task.childIndex,
4513
- task.blockedBoundary,
4514
- task.hoistableState,
4515
- task.abortSet,
4516
- task.keyPath,
4517
- task.formatContext,
4518
- task.legacyContext,
4519
- task.context,
4520
- task.treeContext,
4521
- null !== task.componentStack ? task.componentStack.parent : null,
4522
- task.isFallback
4523
- ).ping;
4524
- node.then(request, request);
4525
- task.formatContext = previousFormatContext;
4526
- task.legacyContext = previousLegacyContext;
4527
- task.context = previousContext;
4528
- task.keyPath = previousKeyPath;
4529
- task.treeContext = previousTreeContext;
4530
- task.componentStack = previousComponentStack;
4531
- switchContext(previousContext);
4532
- return;
4669
+ if ("function" === typeof node.then) {
4670
+ childIndex = getThenableStateAfterSuspending();
4671
+ request = spawnNewSuspendedReplayTask(request, task, childIndex).ping;
4672
+ node.then(request, request);
4673
+ task.formatContext = previousFormatContext;
4674
+ task.context = previousContext;
4675
+ task.keyPath = previousKeyPath;
4676
+ task.treeContext = previousTreeContext;
4677
+ task.componentStack = previousComponentStack;
4678
+ switchContext(previousContext);
4679
+ return;
4680
+ }
4681
+ if ("Maximum call stack size exceeded" === node.message) {
4682
+ node = getThenableStateAfterSuspending();
4683
+ node = spawnNewSuspendedReplayTask(request, task, node);
4684
+ request.pingedTasks.push(node);
4685
+ task.formatContext = previousFormatContext;
4686
+ task.context = previousContext;
4687
+ task.keyPath = previousKeyPath;
4688
+ task.treeContext = previousTreeContext;
4689
+ task.componentStack = previousComponentStack;
4690
+ switchContext(previousContext);
4691
+ return;
4692
+ }
4533
4693
  }
4534
4694
  }
4535
4695
  else {
@@ -4537,62 +4697,45 @@ function renderNode(request, task, node, childIndex) {
4537
4697
  chunkLength = segment.chunks.length;
4538
4698
  try {
4539
4699
  return renderNodeDestructive(request, task, node, childIndex);
4540
- } catch (thrownValue$40) {
4700
+ } catch (thrownValue$48) {
4541
4701
  if (
4542
4702
  (resetHooksState(),
4543
4703
  (segment.children.length = childrenLength),
4544
4704
  (segment.chunks.length = chunkLength),
4545
4705
  (node =
4546
- thrownValue$40 === SuspenseException
4706
+ thrownValue$48 === SuspenseException
4547
4707
  ? getSuspendedThenable()
4548
- : thrownValue$40),
4549
- "object" === typeof node &&
4550
- null !== node &&
4551
- "function" === typeof node.then)
4708
+ : thrownValue$48),
4709
+ "object" === typeof node && null !== node)
4552
4710
  ) {
4553
- childIndex = getThenableStateAfterSuspending();
4554
- segment = task.blockedSegment;
4555
- childrenLength = createPendingSegment(
4556
- request,
4557
- segment.chunks.length,
4558
- null,
4559
- task.formatContext,
4560
- segment.lastPushedText,
4561
- !0
4562
- );
4563
- segment.children.push(childrenLength);
4564
- segment.lastPushedText = !1;
4565
- request = createRenderTask(
4566
- request,
4567
- childIndex,
4568
- task.node,
4569
- task.childIndex,
4570
- task.blockedBoundary,
4571
- childrenLength,
4572
- task.hoistableState,
4573
- task.abortSet,
4574
- task.keyPath,
4575
- task.formatContext,
4576
- task.legacyContext,
4577
- task.context,
4578
- task.treeContext,
4579
- null !== task.componentStack ? task.componentStack.parent : null,
4580
- task.isFallback
4581
- ).ping;
4582
- node.then(request, request);
4583
- task.formatContext = previousFormatContext;
4584
- task.legacyContext = previousLegacyContext;
4585
- task.context = previousContext;
4586
- task.keyPath = previousKeyPath;
4587
- task.treeContext = previousTreeContext;
4588
- task.componentStack = previousComponentStack;
4589
- switchContext(previousContext);
4590
- return;
4711
+ if ("function" === typeof node.then) {
4712
+ childIndex = getThenableStateAfterSuspending();
4713
+ request = spawnNewSuspendedRenderTask(request, task, childIndex).ping;
4714
+ node.then(request, request);
4715
+ task.formatContext = previousFormatContext;
4716
+ task.context = previousContext;
4717
+ task.keyPath = previousKeyPath;
4718
+ task.treeContext = previousTreeContext;
4719
+ task.componentStack = previousComponentStack;
4720
+ switchContext(previousContext);
4721
+ return;
4722
+ }
4723
+ if ("Maximum call stack size exceeded" === node.message) {
4724
+ node = getThenableStateAfterSuspending();
4725
+ node = spawnNewSuspendedRenderTask(request, task, node);
4726
+ request.pingedTasks.push(node);
4727
+ task.formatContext = previousFormatContext;
4728
+ task.context = previousContext;
4729
+ task.keyPath = previousKeyPath;
4730
+ task.treeContext = previousTreeContext;
4731
+ task.componentStack = previousComponentStack;
4732
+ switchContext(previousContext);
4733
+ return;
4734
+ }
4591
4735
  }
4592
4736
  }
4593
4737
  }
4594
4738
  task.formatContext = previousFormatContext;
4595
- task.legacyContext = previousLegacyContext;
4596
4739
  task.context = previousContext;
4597
4740
  task.keyPath = previousKeyPath;
4598
4741
  task.treeContext = previousTreeContext;
@@ -4653,26 +4796,30 @@ function abortRemainingReplayNodes(
4653
4796
  function abortTask(task, request, error) {
4654
4797
  var boundary = task.blockedBoundary,
4655
4798
  segment = task.blockedSegment;
4656
- null !== segment && (segment.status = 3);
4799
+ if (null !== segment) {
4800
+ if (6 === segment.status) return;
4801
+ segment.status = 3;
4802
+ }
4803
+ segment = getThrownInfo(task.componentStack);
4657
4804
  if (null === boundary) {
4658
- if (((boundary = {}), 1 !== request.status && 2 !== request.status)) {
4659
- task = task.replay;
4660
- if (null === task) {
4661
- logRecoverableError(request, error, boundary);
4805
+ if (13 !== request.status && 14 !== request.status) {
4806
+ boundary = task.replay;
4807
+ if (null === boundary) {
4808
+ logRecoverableError(request, error, segment);
4662
4809
  fatalError(request, error);
4663
4810
  return;
4664
4811
  }
4665
- task.pendingTasks--;
4666
- 0 === task.pendingTasks &&
4667
- 0 < task.nodes.length &&
4668
- ((boundary = logRecoverableError(request, error, boundary)),
4812
+ boundary.pendingTasks--;
4813
+ 0 === boundary.pendingTasks &&
4814
+ 0 < boundary.nodes.length &&
4815
+ ((task = logRecoverableError(request, error, segment)),
4669
4816
  abortRemainingReplayNodes(
4670
4817
  request,
4671
4818
  null,
4672
- task.nodes,
4673
- task.slots,
4819
+ boundary.nodes,
4820
+ boundary.slots,
4674
4821
  error,
4675
- boundary
4822
+ task
4676
4823
  ));
4677
4824
  request.pendingRootTasks--;
4678
4825
  0 === request.pendingRootTasks && completeShell(request);
@@ -4681,8 +4828,8 @@ function abortTask(task, request, error) {
4681
4828
  boundary.pendingTasks--,
4682
4829
  4 !== boundary.status &&
4683
4830
  ((boundary.status = 4),
4684
- (task = getThrownInfo(request, task.componentStack)),
4685
- (task = logRecoverableError(request, error, task)),
4831
+ (task = logRecoverableError(request, error, segment)),
4832
+ (boundary.status = 4),
4686
4833
  (boundary.errorDigest = task),
4687
4834
  untrackBoundary(request, boundary),
4688
4835
  boundary.parentFlushed &&
@@ -4736,7 +4883,7 @@ function safelyEmitEarlyPreloads(request, shellComplete) {
4736
4883
  referrerPolicy: props$jscomp$0.referrerPolicy,
4737
4884
  media: props$jscomp$0.media
4738
4885
  });
4739
- if (2 <= (headers.remainingCapacity -= header.length))
4886
+ if (0 <= (headers.remainingCapacity -= header.length + 2))
4740
4887
  (renderState.resets.style[key] = PRELOAD_NO_CREDS),
4741
4888
  linkHeader && (linkHeader += ", "),
4742
4889
  (linkHeader += header),
@@ -4821,7 +4968,7 @@ function finishedTask(request, boundary, segment) {
4821
4968
  0 === request.allPendingTasks && completeAll(request);
4822
4969
  }
4823
4970
  function performWork(request$jscomp$2) {
4824
- if (2 !== request$jscomp$2.status) {
4971
+ if (14 !== request$jscomp$2.status && 13 !== request$jscomp$2.status) {
4825
4972
  var prevContext = currentActiveSnapshot,
4826
4973
  prevDispatcher = ReactSharedInternals.H;
4827
4974
  ReactSharedInternals.H = HooksDispatcher;
@@ -4843,12 +4990,15 @@ function performWork(request$jscomp$2) {
4843
4990
  if (0 !== task.replay.pendingTasks) {
4844
4991
  switchContext(task.context);
4845
4992
  try {
4846
- renderNodeDestructive(
4847
- request$jscomp$0,
4848
- task,
4849
- task.node,
4850
- task.childIndex
4851
- );
4993
+ "number" === typeof task.replay.slots
4994
+ ? resumeNode(
4995
+ request$jscomp$0,
4996
+ task,
4997
+ task.replay.slots,
4998
+ task.node,
4999
+ task.childIndex
5000
+ )
5001
+ : retryNode(request$jscomp$0, task);
4852
5002
  if (
4853
5003
  1 === task.replay.pendingTasks &&
4854
5004
  0 < task.replay.nodes.length
@@ -4873,19 +5023,17 @@ function performWork(request$jscomp$2) {
4873
5023
  var ping = task.ping;
4874
5024
  x.then(ping, ping);
4875
5025
  task.thenableState = getThenableStateAfterSuspending();
4876
- null !== task.componentStack &&
4877
- (task.componentStack = task.componentStack.parent);
4878
5026
  } else {
4879
5027
  task.replay.pendingTasks--;
4880
5028
  task.abortSet.delete(task);
4881
- var errorInfo = getThrownInfo(
4882
- request$jscomp$0,
4883
- task.componentStack
4884
- );
5029
+ var errorInfo = getThrownInfo(task.componentStack);
4885
5030
  request = void 0;
4886
5031
  var request$jscomp$1 = request$jscomp$0,
4887
5032
  boundary = task.blockedBoundary,
4888
- error$jscomp$0 = x,
5033
+ error$jscomp$0 =
5034
+ 12 === request$jscomp$0.status
5035
+ ? request$jscomp$0.fatalError
5036
+ : x,
4889
5037
  replayNodes = task.replay.nodes,
4890
5038
  resumeSlots = task.replay.slots;
4891
5039
  request = logRecoverableError(
@@ -4916,11 +5064,12 @@ function performWork(request$jscomp$2) {
4916
5064
  (request$jscomp$1 = segment),
4917
5065
  0 === request$jscomp$1.status)
4918
5066
  ) {
5067
+ request$jscomp$1.status = 6;
4919
5068
  switchContext(task.context);
4920
5069
  var childrenLength = request$jscomp$1.children.length,
4921
5070
  chunkLength = request$jscomp$1.chunks.length;
4922
5071
  try {
4923
- renderNodeDestructive(request, task, task.node, task.childIndex),
5072
+ retryNode(request, task),
4924
5073
  request$jscomp$1.lastPushedText &&
4925
5074
  request$jscomp$1.textEmbedded &&
4926
5075
  request$jscomp$1.chunks.push("\x3c!-- --\x3e"),
@@ -4934,22 +5083,20 @@ function performWork(request$jscomp$2) {
4934
5083
  var x$jscomp$0 =
4935
5084
  thrownValue === SuspenseException
4936
5085
  ? getSuspendedThenable()
4937
- : thrownValue;
5086
+ : 12 === request.status
5087
+ ? request.fatalError
5088
+ : thrownValue;
4938
5089
  if (
4939
5090
  "object" === typeof x$jscomp$0 &&
4940
5091
  null !== x$jscomp$0 &&
4941
5092
  "function" === typeof x$jscomp$0.then
4942
5093
  ) {
5094
+ request$jscomp$1.status = 0;
5095
+ task.thenableState = getThenableStateAfterSuspending();
4943
5096
  var ping$jscomp$0 = task.ping;
4944
5097
  x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
4945
- task.thenableState = getThenableStateAfterSuspending();
4946
- null !== task.componentStack &&
4947
- (task.componentStack = task.componentStack.parent);
4948
5098
  } else {
4949
- var errorInfo$jscomp$0 = getThrownInfo(
4950
- request,
4951
- task.componentStack
4952
- );
5099
+ var errorInfo$jscomp$0 = getThrownInfo(task.componentStack);
4953
5100
  task.abortSet.delete(task);
4954
5101
  request$jscomp$1.status = 4;
4955
5102
  var boundary$jscomp$0 = task.blockedBoundary;
@@ -5125,22 +5272,22 @@ function flushCompletedBoundary(request, destination, boundary) {
5125
5272
  ? ((completedSegments.instructions |= 10),
5126
5273
  writeChunk(
5127
5274
  destination,
5128
- '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&n.set(b.getAttribute("href"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement("link");a.href=d;a.rel="stylesheet";for(a.dataset.precedence=\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute("media");!e||"l"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,""),u.bind(null,r,t,"Resource failed to load"))};$RR("'
5275
+ '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(t,u,y){function v(n){this._p=null;n()}for(var w=$RC,p=$RM,q=new Map,r=document,g,b,h=r.querySelectorAll("link[data-precedence],style[data-precedence]"),x=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?x.push(b):("LINK"===b.tagName&&p.set(b.getAttribute("href"),b),q.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var e=y[b++];if(!e){k=!1;b=0;continue}var c=!1,m=0;var d=e[m++];if(a=p.get(d)){var f=a._p;c=!0}else{a=r.createElement("link");a.href=\nd;a.rel="stylesheet";for(a.dataset.precedence=l=e[m++];f=e[m++];)a.setAttribute(f,e[m++]);f=a._p=new Promise(function(n,z){a.onload=v.bind(a,n);a.onerror=v.bind(a,z)});p.set(d,a)}d=a.getAttribute("media");!f||d&&!matchMedia(d).matches||h.push(f);if(c)continue}else{a=x[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=q.get(l)||g;c===g&&(g=a);q.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=r.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(w.bind(null,\nt,u,""),w.bind(null,t,u,"Resource failed to load"))};$RR("'
5129
5276
  ))
5130
5277
  : 0 === (completedSegments.instructions & 8)
5131
- ? ((completedSegments.instructions |= 8),
5278
+ ? ((completedSegments.instructions |= 8),
5279
+ writeChunk(
5280
+ destination,
5281
+ '$RM=new Map;\n$RR=function(t,u,y){function v(n){this._p=null;n()}for(var w=$RC,p=$RM,q=new Map,r=document,g,b,h=r.querySelectorAll("link[data-precedence],style[data-precedence]"),x=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?x.push(b):("LINK"===b.tagName&&p.set(b.getAttribute("href"),b),q.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var e=y[b++];if(!e){k=!1;b=0;continue}var c=!1,m=0;var d=e[m++];if(a=p.get(d)){var f=a._p;c=!0}else{a=r.createElement("link");a.href=\nd;a.rel="stylesheet";for(a.dataset.precedence=l=e[m++];f=e[m++];)a.setAttribute(f,e[m++]);f=a._p=new Promise(function(n,z){a.onload=v.bind(a,n);a.onerror=v.bind(a,z)});p.set(d,a)}d=a.getAttribute("media");!f||d&&!matchMedia(d).matches||h.push(f);if(c)continue}else{a=x[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=q.get(l)||g;c===g&&(g=a);q.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=r.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(w.bind(null,\nt,u,""),w.bind(null,t,u,"Resource failed to load"))};$RR("'
5282
+ ))
5283
+ : writeChunk(destination, '$RR("')
5284
+ : 0 === (completedSegments.instructions & 2)
5285
+ ? ((completedSegments.instructions |= 2),
5132
5286
  writeChunk(
5133
5287
  destination,
5134
- '$RM=new Map;\n$RR=function(r,t,w){for(var u=$RC,n=$RM,p=new Map,q=document,g,b,h=q.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=h[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&n.set(b.getAttribute("href"),b),p.set(b.dataset.precedence,g=b));b=0;h=[];var l,a;for(k=!0;;){if(k){var f=w[b++];if(!f){k=!1;b=0;continue}var c=!1,m=0;var d=f[m++];if(a=n.get(d)){var e=a._p;c=!0}else{a=q.createElement("link");a.href=d;a.rel="stylesheet";for(a.dataset.precedence=\nl=f[m++];e=f[m++];)a.setAttribute(e,f[m++]);e=a._p=new Promise(function(x,y){a.onload=x;a.onerror=y});n.set(d,a)}d=a.getAttribute("media");!e||"l"===e.s||d&&!matchMedia(d).matches||h.push(e);if(c)continue}else{a=v[b++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=p.get(l)||g;c===g&&(g=a);p.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=q.head,c.insertBefore(a,c.firstChild))}Promise.all(h).then(u.bind(null,r,t,""),u.bind(null,r,t,"Resource failed to load"))};$RR("'
5288
+ '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("'
5135
5289
  ))
5136
- : writeChunk(destination, '$RR("')
5137
- : 0 === (completedSegments.instructions & 2)
5138
- ? ((completedSegments.instructions |= 2),
5139
- writeChunk(
5140
- destination,
5141
- '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("'
5142
- ))
5143
- : writeChunk(destination, '$RC("');
5290
+ : writeChunk(destination, '$RC("');
5144
5291
  completedSegments = i.toString(16);
5145
5292
  writeChunk(destination, request.boundaryPrefix);
5146
5293
  writeChunk(destination, completedSegments);
@@ -5333,11 +5480,11 @@ function flushCompletedQueues(request, destination) {
5333
5480
  completedBoundaries.splice(0, i);
5334
5481
  var partialBoundaries = request.partialBoundaries;
5335
5482
  for (i = 0; i < partialBoundaries.length; i++) {
5336
- var boundary$44 = partialBoundaries[i];
5483
+ var boundary$51 = partialBoundaries[i];
5337
5484
  a: {
5338
5485
  clientRenderedBoundaries = request;
5339
5486
  boundary = destination;
5340
- var completedSegments = boundary$44.completedSegments;
5487
+ var completedSegments = boundary$51.completedSegments;
5341
5488
  for (
5342
5489
  JSCompiler_inline_result = 0;
5343
5490
  JSCompiler_inline_result < completedSegments.length;
@@ -5347,7 +5494,7 @@ function flushCompletedQueues(request, destination) {
5347
5494
  !flushPartiallyCompletedSegment(
5348
5495
  clientRenderedBoundaries,
5349
5496
  boundary,
5350
- boundary$44,
5497
+ boundary$51,
5351
5498
  completedSegments[JSCompiler_inline_result]
5352
5499
  )
5353
5500
  ) {
@@ -5359,7 +5506,7 @@ function flushCompletedQueues(request, destination) {
5359
5506
  completedSegments.splice(0, JSCompiler_inline_result);
5360
5507
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
5361
5508
  boundary,
5362
- boundary$44.contentState,
5509
+ boundary$51.contentState,
5363
5510
  clientRenderedBoundaries.renderState
5364
5511
  );
5365
5512
  }
@@ -5391,32 +5538,49 @@ function flushCompletedQueues(request, destination) {
5391
5538
  i.hasBody && writeChunk(destination, endChunkForTag("body")),
5392
5539
  i.hasHtml && writeChunk(destination, endChunkForTag("html")),
5393
5540
  flushBuffered(destination),
5541
+ (request.status = 14),
5394
5542
  destination.end(),
5395
5543
  (request.destination = null))
5396
5544
  : flushBuffered(destination);
5397
5545
  }
5398
5546
  }
5547
+ function startWork(request) {
5548
+ request.flushScheduled = null !== request.destination;
5549
+ scheduleMicrotask(function () {
5550
+ return performWork(request);
5551
+ });
5552
+ setTimeout(function () {
5553
+ 10 === request.status && (request.status = 11);
5554
+ null === request.trackedPostpones &&
5555
+ safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);
5556
+ }, 0);
5557
+ }
5399
5558
  function enqueueFlush(request) {
5400
- if (
5401
- !1 === request.flushScheduled &&
5559
+ !1 === request.flushScheduled &&
5402
5560
  0 === request.pingedTasks.length &&
5403
- null !== request.destination
5404
- ) {
5405
- request.flushScheduled = !0;
5406
- var destination = request.destination;
5407
- destination
5408
- ? flushCompletedQueues(request, destination)
5409
- : (request.flushScheduled = !1);
5410
- }
5561
+ null !== request.destination &&
5562
+ ((request.flushScheduled = !0),
5563
+ setTimeout(function () {
5564
+ var destination = request.destination;
5565
+ destination
5566
+ ? flushCompletedQueues(request, destination)
5567
+ : (request.flushScheduled = !1);
5568
+ }, 0));
5411
5569
  }
5412
5570
  function abort(request, reason) {
5571
+ if (11 === request.status || 10 === request.status) request.status = 12;
5413
5572
  try {
5414
5573
  var abortableTasks = request.abortableTasks;
5415
5574
  if (0 < abortableTasks.size) {
5416
5575
  var error =
5417
5576
  void 0 === reason
5418
5577
  ? Error("The render was aborted by the server without a reason.")
5419
- : reason;
5578
+ : "object" === typeof reason &&
5579
+ null !== reason &&
5580
+ "function" === typeof reason.then
5581
+ ? Error("The render was aborted by the server with a promise.")
5582
+ : reason;
5583
+ request.fatalError = error;
5420
5584
  abortableTasks.forEach(function (task) {
5421
5585
  return abortTask(task, request, error);
5422
5586
  });
@@ -5424,18 +5588,18 @@ function abort(request, reason) {
5424
5588
  }
5425
5589
  null !== request.destination &&
5426
5590
  flushCompletedQueues(request, request.destination);
5427
- } catch (error$46) {
5428
- logRecoverableError(request, error$46, {}), fatalError(request, error$46);
5591
+ } catch (error$53) {
5592
+ logRecoverableError(request, error$53, {}), fatalError(request, error$53);
5429
5593
  }
5430
5594
  }
5431
- var isomorphicReactPackageVersion$jscomp$inline_724 = React.version;
5595
+ var isomorphicReactPackageVersion$jscomp$inline_731 = React.version;
5432
5596
  if (
5433
5597
  "19.0.0" !==
5434
- isomorphicReactPackageVersion$jscomp$inline_724
5598
+ isomorphicReactPackageVersion$jscomp$inline_731
5435
5599
  )
5436
5600
  throw Error(
5437
5601
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
5438
- (isomorphicReactPackageVersion$jscomp$inline_724 +
5602
+ (isomorphicReactPackageVersion$jscomp$inline_731 +
5439
5603
  "\n - react-dom: 19.0.0\nLearn more: https://react.dev/warnings/version-mismatch")
5440
5604
  );
5441
5605
  exports.renderToReadableStream = function (children, options) {
@@ -5479,10 +5643,13 @@ exports.renderToReadableStream = function (children, options) {
5479
5643
  {
5480
5644
  type: "direct",
5481
5645
  pull: function (controller) {
5482
- if (1 === request.status)
5483
- (request.status = 2),
5646
+ if (13 === request.status)
5647
+ (request.status = 14),
5484
5648
  closeWithError(controller, request.fatalError);
5485
- else if (2 !== request.status && null === request.destination) {
5649
+ else if (
5650
+ 14 !== request.status &&
5651
+ null === request.destination
5652
+ ) {
5486
5653
  request.destination = controller;
5487
5654
  try {
5488
5655
  flushCompletedQueues(request, controller);
@@ -5521,10 +5688,7 @@ exports.renderToReadableStream = function (children, options) {
5521
5688
  signal.addEventListener("abort", listener);
5522
5689
  }
5523
5690
  }
5524
- request.flushScheduled = null !== request.destination;
5525
- performWork(request);
5526
- null === request.trackedPostpones &&
5527
- safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);
5691
+ startWork(request);
5528
5692
  });
5529
5693
  };
5530
5694
  exports.version = "19.0.0";