@vxrn/vendor 1.1.345 → 1.1.347

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/package.json +2 -1
  2. package/react/cjs/react-compiler-runtime.development.js +1 -18
  3. package/react/cjs/react-jsx-dev-runtime.development.js +127 -144
  4. package/react/cjs/react-jsx-dev-runtime.react-server.development.js +128 -145
  5. package/react/cjs/react-jsx-runtime.development.js +127 -144
  6. package/react/cjs/react-jsx-runtime.react-server.development.js +128 -145
  7. package/react/cjs/react.development.js +204 -230
  8. package/react/cjs/react.production.js +9 -10
  9. package/react/cjs/react.react-server.development.js +172 -199
  10. package/react/cjs/react.react-server.production.js +6 -7
  11. package/react/package.json +2 -2
  12. package/react-dom/cjs/react-dom-client.development.js +6107 -5750
  13. package/react-dom/cjs/react-dom-client.production.js +2295 -1924
  14. package/react-dom/cjs/react-dom-profiling.development.js +6134 -5777
  15. package/react-dom/cjs/react-dom-profiling.profiling.js +2572 -2247
  16. package/react-dom/cjs/react-dom-server-legacy.browser.development.js +1244 -1040
  17. package/react-dom/cjs/react-dom-server-legacy.browser.production.js +891 -761
  18. package/react-dom/cjs/react-dom-server-legacy.node.development.js +1244 -1040
  19. package/react-dom/cjs/react-dom-server-legacy.node.production.js +887 -761
  20. package/react-dom/cjs/react-dom-server.browser.development.js +1380 -1060
  21. package/react-dom/cjs/react-dom-server.browser.production.js +999 -749
  22. package/react-dom/cjs/react-dom-server.bun.development.js +1241 -1032
  23. package/react-dom/cjs/react-dom-server.bun.production.js +886 -754
  24. package/react-dom/cjs/react-dom-server.edge.development.js +1393 -1069
  25. package/react-dom/cjs/react-dom-server.edge.production.js +1007 -758
  26. package/react-dom/cjs/react-dom-server.node.development.js +1624 -1254
  27. package/react-dom/cjs/react-dom-server.node.production.js +1242 -953
  28. package/react-dom/cjs/react-dom-test-utils.development.js +1 -20
  29. package/react-dom/cjs/react-dom.development.js +34 -50
  30. package/react-dom/cjs/react-dom.production.js +4 -3
  31. package/react-dom/cjs/react-dom.react-server.development.js +48 -66
  32. package/react-dom/cjs/react-dom.react-server.production.js +6 -8
  33. package/react-dom/package.json +3 -3
  34. package/react-dom/static.browser.js +1 -0
  35. package/react-dom/static.edge.js +1 -0
  36. package/react-dom/static.node.js +1 -0
@@ -14,6 +14,7 @@ var util = require("util"),
14
14
  async_hooks = require("async_hooks"),
15
15
  React = require("react"),
16
16
  ReactDOM = require("react-dom"),
17
+ stream = require("stream"),
17
18
  REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
18
19
  REACT_PORTAL_TYPE = Symbol.for("react.portal"),
19
20
  REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
@@ -33,7 +34,8 @@ var util = require("util"),
33
34
  REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
34
35
  REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"),
35
36
  MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
36
- isArrayImpl = Array.isArray;
37
+ isArrayImpl = Array.isArray,
38
+ scheduleMicrotask = queueMicrotask;
37
39
  function flushBuffered(destination) {
38
40
  "function" === typeof destination.flush && destination.flush();
39
41
  }
@@ -51,7 +53,7 @@ function writeChunk(destination, chunk) {
51
53
  ),
52
54
  (currentView = new Uint8Array(2048)),
53
55
  (writtenBytes = 0)),
54
- writeToDestination(destination, textEncoder.encode(chunk));
56
+ writeToDestination(destination, chunk);
55
57
  else {
56
58
  var target = currentView;
57
59
  0 < writtenBytes && (target = currentView.subarray(writtenBytes));
@@ -313,6 +315,214 @@ var importMapScriptStart = stringToPrecomputedChunk(
313
315
  '<script type="importmap">'
314
316
  ),
315
317
  importMapScriptEnd = stringToPrecomputedChunk("\x3c/script>");
318
+ function createRenderState(
319
+ resumableState,
320
+ nonce,
321
+ externalRuntimeConfig,
322
+ importMap,
323
+ onHeaders,
324
+ maxHeadersLength
325
+ ) {
326
+ var inlineScriptWithNonce =
327
+ void 0 === nonce
328
+ ? startInlineScript
329
+ : stringToPrecomputedChunk(
330
+ '<script nonce="' + escapeTextForBrowser(nonce) + '">'
331
+ ),
332
+ idPrefix = resumableState.idPrefix;
333
+ externalRuntimeConfig = [];
334
+ var bootstrapScriptContent = resumableState.bootstrapScriptContent,
335
+ bootstrapScripts = resumableState.bootstrapScripts,
336
+ bootstrapModules = resumableState.bootstrapModules;
337
+ void 0 !== bootstrapScriptContent &&
338
+ externalRuntimeConfig.push(
339
+ inlineScriptWithNonce,
340
+ ("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer),
341
+ endInlineScript
342
+ );
343
+ bootstrapScriptContent = [];
344
+ void 0 !== importMap &&
345
+ (bootstrapScriptContent.push(importMapScriptStart),
346
+ bootstrapScriptContent.push(
347
+ ("" + JSON.stringify(importMap)).replace(scriptRegex, scriptReplacer)
348
+ ),
349
+ bootstrapScriptContent.push(importMapScriptEnd));
350
+ importMap = onHeaders
351
+ ? {
352
+ preconnects: "",
353
+ fontPreloads: "",
354
+ highImagePreloads: "",
355
+ remainingCapacity:
356
+ 2 + ("number" === typeof maxHeadersLength ? maxHeadersLength : 2e3)
357
+ }
358
+ : null;
359
+ onHeaders = {
360
+ placeholderPrefix: stringToPrecomputedChunk(idPrefix + "P:"),
361
+ segmentPrefix: stringToPrecomputedChunk(idPrefix + "S:"),
362
+ boundaryPrefix: stringToPrecomputedChunk(idPrefix + "B:"),
363
+ startInlineScript: inlineScriptWithNonce,
364
+ htmlChunks: null,
365
+ headChunks: null,
366
+ externalRuntimeScript: null,
367
+ bootstrapChunks: externalRuntimeConfig,
368
+ importMapChunks: bootstrapScriptContent,
369
+ onHeaders: onHeaders,
370
+ headers: importMap,
371
+ resets: {
372
+ font: {},
373
+ dns: {},
374
+ connect: { default: {}, anonymous: {}, credentials: {} },
375
+ image: {},
376
+ style: {}
377
+ },
378
+ charsetChunks: [],
379
+ viewportChunks: [],
380
+ hoistableChunks: [],
381
+ preconnects: new Set(),
382
+ fontPreloads: new Set(),
383
+ highImagePreloads: new Set(),
384
+ styles: new Map(),
385
+ bootstrapScripts: new Set(),
386
+ scripts: new Set(),
387
+ bulkPreloads: new Set(),
388
+ preloads: {
389
+ images: new Map(),
390
+ stylesheets: new Map(),
391
+ scripts: new Map(),
392
+ moduleScripts: new Map()
393
+ },
394
+ nonce: nonce,
395
+ hoistableState: null,
396
+ stylesToHoist: !1
397
+ };
398
+ if (void 0 !== bootstrapScripts)
399
+ for (importMap = 0; importMap < bootstrapScripts.length; importMap++) {
400
+ var scriptConfig = bootstrapScripts[importMap];
401
+ idPrefix = inlineScriptWithNonce = void 0;
402
+ bootstrapScriptContent = {
403
+ rel: "preload",
404
+ as: "script",
405
+ fetchPriority: "low",
406
+ nonce: nonce
407
+ };
408
+ "string" === typeof scriptConfig
409
+ ? (bootstrapScriptContent.href = maxHeadersLength = scriptConfig)
410
+ : ((bootstrapScriptContent.href = maxHeadersLength = scriptConfig.src),
411
+ (bootstrapScriptContent.integrity = idPrefix =
412
+ "string" === typeof scriptConfig.integrity
413
+ ? scriptConfig.integrity
414
+ : void 0),
415
+ (bootstrapScriptContent.crossOrigin = inlineScriptWithNonce =
416
+ "string" === typeof scriptConfig || null == scriptConfig.crossOrigin
417
+ ? void 0
418
+ : "use-credentials" === scriptConfig.crossOrigin
419
+ ? "use-credentials"
420
+ : ""));
421
+ scriptConfig = resumableState;
422
+ var href = maxHeadersLength;
423
+ scriptConfig.scriptResources[href] = null;
424
+ scriptConfig.moduleScriptResources[href] = null;
425
+ scriptConfig = [];
426
+ pushLinkImpl(scriptConfig, bootstrapScriptContent);
427
+ onHeaders.bootstrapScripts.add(scriptConfig);
428
+ externalRuntimeConfig.push(
429
+ startScriptSrc,
430
+ escapeTextForBrowser(maxHeadersLength)
431
+ );
432
+ nonce &&
433
+ externalRuntimeConfig.push(scriptNonce, escapeTextForBrowser(nonce));
434
+ "string" === typeof idPrefix &&
435
+ externalRuntimeConfig.push(
436
+ scriptIntegirty,
437
+ escapeTextForBrowser(idPrefix)
438
+ );
439
+ "string" === typeof inlineScriptWithNonce &&
440
+ externalRuntimeConfig.push(
441
+ scriptCrossOrigin,
442
+ escapeTextForBrowser(inlineScriptWithNonce)
443
+ );
444
+ externalRuntimeConfig.push(endAsyncScript);
445
+ }
446
+ if (void 0 !== bootstrapModules)
447
+ for (
448
+ bootstrapScripts = 0;
449
+ bootstrapScripts < bootstrapModules.length;
450
+ bootstrapScripts++
451
+ )
452
+ (bootstrapScriptContent = bootstrapModules[bootstrapScripts]),
453
+ (inlineScriptWithNonce = maxHeadersLength = void 0),
454
+ (idPrefix = {
455
+ rel: "modulepreload",
456
+ fetchPriority: "low",
457
+ nonce: nonce
458
+ }),
459
+ "string" === typeof bootstrapScriptContent
460
+ ? (idPrefix.href = importMap = bootstrapScriptContent)
461
+ : ((idPrefix.href = importMap = bootstrapScriptContent.src),
462
+ (idPrefix.integrity = inlineScriptWithNonce =
463
+ "string" === typeof bootstrapScriptContent.integrity
464
+ ? bootstrapScriptContent.integrity
465
+ : void 0),
466
+ (idPrefix.crossOrigin = maxHeadersLength =
467
+ "string" === typeof bootstrapScriptContent ||
468
+ null == bootstrapScriptContent.crossOrigin
469
+ ? void 0
470
+ : "use-credentials" === bootstrapScriptContent.crossOrigin
471
+ ? "use-credentials"
472
+ : "")),
473
+ (bootstrapScriptContent = resumableState),
474
+ (scriptConfig = importMap),
475
+ (bootstrapScriptContent.scriptResources[scriptConfig] = null),
476
+ (bootstrapScriptContent.moduleScriptResources[scriptConfig] = null),
477
+ (bootstrapScriptContent = []),
478
+ pushLinkImpl(bootstrapScriptContent, idPrefix),
479
+ onHeaders.bootstrapScripts.add(bootstrapScriptContent),
480
+ externalRuntimeConfig.push(
481
+ startModuleSrc,
482
+ escapeTextForBrowser(importMap)
483
+ ),
484
+ nonce &&
485
+ externalRuntimeConfig.push(scriptNonce, escapeTextForBrowser(nonce)),
486
+ "string" === typeof inlineScriptWithNonce &&
487
+ externalRuntimeConfig.push(
488
+ scriptIntegirty,
489
+ escapeTextForBrowser(inlineScriptWithNonce)
490
+ ),
491
+ "string" === typeof maxHeadersLength &&
492
+ externalRuntimeConfig.push(
493
+ scriptCrossOrigin,
494
+ escapeTextForBrowser(maxHeadersLength)
495
+ ),
496
+ externalRuntimeConfig.push(endAsyncScript);
497
+ return onHeaders;
498
+ }
499
+ function createResumableState(
500
+ identifierPrefix,
501
+ externalRuntimeConfig,
502
+ bootstrapScriptContent,
503
+ bootstrapScripts,
504
+ bootstrapModules
505
+ ) {
506
+ return {
507
+ idPrefix: void 0 === identifierPrefix ? "" : identifierPrefix,
508
+ nextFormID: 0,
509
+ streamingFormat: 0,
510
+ bootstrapScriptContent: bootstrapScriptContent,
511
+ bootstrapScripts: bootstrapScripts,
512
+ bootstrapModules: bootstrapModules,
513
+ instructions: 0,
514
+ hasBody: !1,
515
+ hasHtml: !1,
516
+ unknownResources: {},
517
+ dnsResources: {},
518
+ connectResources: { default: {}, anonymous: {}, credentials: {} },
519
+ imageResources: {},
520
+ styleResources: {},
521
+ scriptResources: {},
522
+ moduleUnknownResources: {},
523
+ moduleScriptResources: {}
524
+ };
525
+ }
316
526
  function createFormatContext(insertionMode, selectedValue, tagScope) {
317
527
  return {
318
528
  insertionMode: insertionMode,
@@ -320,6 +530,17 @@ function createFormatContext(insertionMode, selectedValue, tagScope) {
320
530
  tagScope: tagScope
321
531
  };
322
532
  }
533
+ function createRootFormatContext(namespaceURI) {
534
+ return createFormatContext(
535
+ "http://www.w3.org/2000/svg" === namespaceURI
536
+ ? 3
537
+ : "http://www.w3.org/1998/Math/MathML" === namespaceURI
538
+ ? 4
539
+ : 0,
540
+ null,
541
+ 0
542
+ );
543
+ }
323
544
  function getChildFormatContext(parentContext, type, props) {
324
545
  switch (type) {
325
546
  case "noscript":
@@ -352,12 +573,12 @@ function getChildFormatContext(parentContext, type, props) {
352
573
  return 5 <= parentContext.insertionMode
353
574
  ? createFormatContext(2, null, parentContext.tagScope)
354
575
  : 0 === parentContext.insertionMode
355
- ? "html" === type
356
- ? createFormatContext(1, null, parentContext.tagScope)
357
- : createFormatContext(2, null, parentContext.tagScope)
358
- : 1 === parentContext.insertionMode
359
- ? createFormatContext(2, null, parentContext.tagScope)
360
- : parentContext;
576
+ ? "html" === type
577
+ ? createFormatContext(1, null, parentContext.tagScope)
578
+ : createFormatContext(2, null, parentContext.tagScope)
579
+ : 1 === parentContext.insertionMode
580
+ ? createFormatContext(2, null, parentContext.tagScope)
581
+ : parentContext;
361
582
  }
362
583
  var textSeparator = stringToPrecomputedChunk("\x3c!-- --\x3e");
363
584
  function pushTextInstance(target, text, renderState, textEmbedded) {
@@ -1346,22 +1567,64 @@ function pushStartInstance(
1346
1567
  }
1347
1568
  target$jscomp$0.push(endOfStartTag);
1348
1569
  return null;
1570
+ case "object":
1571
+ target$jscomp$0.push(startChunkForTag("object"));
1572
+ var children$jscomp$5 = null,
1573
+ innerHTML$jscomp$4 = null,
1574
+ propKey$jscomp$7;
1575
+ for (propKey$jscomp$7 in props)
1576
+ if (hasOwnProperty.call(props, propKey$jscomp$7)) {
1577
+ var propValue$jscomp$7 = props[propKey$jscomp$7];
1578
+ if (null != propValue$jscomp$7)
1579
+ switch (propKey$jscomp$7) {
1580
+ case "children":
1581
+ children$jscomp$5 = propValue$jscomp$7;
1582
+ break;
1583
+ case "dangerouslySetInnerHTML":
1584
+ innerHTML$jscomp$4 = propValue$jscomp$7;
1585
+ break;
1586
+ case "data":
1587
+ var sanitizedValue = sanitizeURL("" + propValue$jscomp$7);
1588
+ if ("" === sanitizedValue) break;
1589
+ target$jscomp$0.push(
1590
+ attributeSeparator,
1591
+ "data",
1592
+ attributeAssign,
1593
+ escapeTextForBrowser(sanitizedValue),
1594
+ attributeEnd
1595
+ );
1596
+ break;
1597
+ default:
1598
+ pushAttribute(
1599
+ target$jscomp$0,
1600
+ propKey$jscomp$7,
1601
+ propValue$jscomp$7
1602
+ );
1603
+ }
1604
+ }
1605
+ target$jscomp$0.push(endOfStartTag);
1606
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
1607
+ if ("string" === typeof children$jscomp$5) {
1608
+ target$jscomp$0.push(escapeTextForBrowser(children$jscomp$5));
1609
+ var JSCompiler_inline_result$jscomp$2 = null;
1610
+ } else JSCompiler_inline_result$jscomp$2 = children$jscomp$5;
1611
+ return JSCompiler_inline_result$jscomp$2;
1349
1612
  case "title":
1350
1613
  if (
1351
1614
  3 === formatContext.insertionMode ||
1352
1615
  formatContext.tagScope & 1 ||
1353
1616
  null != props.itemProp
1354
1617
  )
1355
- var JSCompiler_inline_result$jscomp$2 = pushTitleImpl(
1618
+ var JSCompiler_inline_result$jscomp$3 = pushTitleImpl(
1356
1619
  target$jscomp$0,
1357
1620
  props
1358
1621
  );
1359
1622
  else
1360
1623
  isFallback
1361
- ? (JSCompiler_inline_result$jscomp$2 = null)
1624
+ ? (JSCompiler_inline_result$jscomp$3 = null)
1362
1625
  : (pushTitleImpl(renderState.hoistableChunks, props),
1363
- (JSCompiler_inline_result$jscomp$2 = void 0));
1364
- return JSCompiler_inline_result$jscomp$2;
1626
+ (JSCompiler_inline_result$jscomp$3 = void 0));
1627
+ return JSCompiler_inline_result$jscomp$3;
1365
1628
  case "link":
1366
1629
  var rel = props.rel,
1367
1630
  href = props.href,
@@ -1375,7 +1638,7 @@ function pushStartInstance(
1375
1638
  "" === href
1376
1639
  ) {
1377
1640
  pushLinkImpl(target$jscomp$0, props);
1378
- var JSCompiler_inline_result$jscomp$3 = null;
1641
+ var JSCompiler_inline_result$jscomp$4 = null;
1379
1642
  } else if ("stylesheet" === props.rel)
1380
1643
  if (
1381
1644
  "string" !== typeof precedence ||
@@ -1383,7 +1646,7 @@ function pushStartInstance(
1383
1646
  props.onLoad ||
1384
1647
  props.onError
1385
1648
  )
1386
- JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
1649
+ JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
1387
1650
  target$jscomp$0,
1388
1651
  props
1389
1652
  );
@@ -1426,19 +1689,19 @@ function pushStartInstance(
1426
1689
  hoistableState.stylesheets.add(resource$9);
1427
1690
  }
1428
1691
  textEmbedded && target$jscomp$0.push(textSeparator);
1429
- JSCompiler_inline_result$jscomp$3 = null;
1692
+ JSCompiler_inline_result$jscomp$4 = null;
1430
1693
  }
1431
1694
  else
1432
1695
  props.onLoad || props.onError
1433
- ? (JSCompiler_inline_result$jscomp$3 = pushLinkImpl(
1696
+ ? (JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
1434
1697
  target$jscomp$0,
1435
1698
  props
1436
1699
  ))
1437
1700
  : (textEmbedded && target$jscomp$0.push(textSeparator),
1438
- (JSCompiler_inline_result$jscomp$3 = isFallback
1701
+ (JSCompiler_inline_result$jscomp$4 = isFallback
1439
1702
  ? null
1440
1703
  : pushLinkImpl(renderState.hoistableChunks, props)));
1441
- return JSCompiler_inline_result$jscomp$3;
1704
+ return JSCompiler_inline_result$jscomp$4;
1442
1705
  case "script":
1443
1706
  var asyncProp = props.async;
1444
1707
  if (
@@ -1453,7 +1716,7 @@ function pushStartInstance(
1453
1716
  formatContext.tagScope & 1 ||
1454
1717
  null != props.itemProp
1455
1718
  )
1456
- var JSCompiler_inline_result$jscomp$4 = pushScriptImpl(
1719
+ var JSCompiler_inline_result$jscomp$5 = pushScriptImpl(
1457
1720
  target$jscomp$0,
1458
1721
  props
1459
1722
  );
@@ -1483,9 +1746,9 @@ function pushStartInstance(
1483
1746
  pushScriptImpl(resource$jscomp$0, scriptProps);
1484
1747
  }
1485
1748
  textEmbedded && target$jscomp$0.push(textSeparator);
1486
- JSCompiler_inline_result$jscomp$4 = null;
1749
+ JSCompiler_inline_result$jscomp$5 = null;
1487
1750
  }
1488
- return JSCompiler_inline_result$jscomp$4;
1751
+ return JSCompiler_inline_result$jscomp$5;
1489
1752
  case "style":
1490
1753
  var precedence$jscomp$0 = props.precedence,
1491
1754
  href$jscomp$0 = props.href;
@@ -1498,42 +1761,42 @@ function pushStartInstance(
1498
1761
  "" === href$jscomp$0
1499
1762
  ) {
1500
1763
  target$jscomp$0.push(startChunkForTag("style"));
1501
- var children$jscomp$5 = null,
1502
- innerHTML$jscomp$4 = null,
1503
- propKey$jscomp$7;
1504
- for (propKey$jscomp$7 in props)
1505
- if (hasOwnProperty.call(props, propKey$jscomp$7)) {
1506
- var propValue$jscomp$7 = props[propKey$jscomp$7];
1507
- if (null != propValue$jscomp$7)
1508
- switch (propKey$jscomp$7) {
1764
+ var children$jscomp$6 = null,
1765
+ innerHTML$jscomp$5 = null,
1766
+ propKey$jscomp$8;
1767
+ for (propKey$jscomp$8 in props)
1768
+ if (hasOwnProperty.call(props, propKey$jscomp$8)) {
1769
+ var propValue$jscomp$8 = props[propKey$jscomp$8];
1770
+ if (null != propValue$jscomp$8)
1771
+ switch (propKey$jscomp$8) {
1509
1772
  case "children":
1510
- children$jscomp$5 = propValue$jscomp$7;
1773
+ children$jscomp$6 = propValue$jscomp$8;
1511
1774
  break;
1512
1775
  case "dangerouslySetInnerHTML":
1513
- innerHTML$jscomp$4 = propValue$jscomp$7;
1776
+ innerHTML$jscomp$5 = propValue$jscomp$8;
1514
1777
  break;
1515
1778
  default:
1516
1779
  pushAttribute(
1517
1780
  target$jscomp$0,
1518
- propKey$jscomp$7,
1519
- propValue$jscomp$7
1781
+ propKey$jscomp$8,
1782
+ propValue$jscomp$8
1520
1783
  );
1521
1784
  }
1522
1785
  }
1523
1786
  target$jscomp$0.push(endOfStartTag);
1524
- var child = Array.isArray(children$jscomp$5)
1525
- ? 2 > children$jscomp$5.length
1526
- ? children$jscomp$5[0]
1787
+ var child = Array.isArray(children$jscomp$6)
1788
+ ? 2 > children$jscomp$6.length
1789
+ ? children$jscomp$6[0]
1527
1790
  : null
1528
- : children$jscomp$5;
1791
+ : children$jscomp$6;
1529
1792
  "function" !== typeof child &&
1530
1793
  "symbol" !== typeof child &&
1531
1794
  null !== child &&
1532
1795
  void 0 !== child &&
1533
1796
  target$jscomp$0.push(("" + child).replace(styleRegex, styleReplacer));
1534
- pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
1797
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$5, children$jscomp$6);
1535
1798
  target$jscomp$0.push(endChunkForTag("style"));
1536
- var JSCompiler_inline_result$jscomp$5 = null;
1799
+ var JSCompiler_inline_result$jscomp$6 = null;
1537
1800
  } else {
1538
1801
  var styleQueue$jscomp$0 = renderState.styles.get(precedence$jscomp$0);
1539
1802
  if (
@@ -1555,26 +1818,26 @@ function pushStartInstance(
1555
1818
  }),
1556
1819
  renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
1557
1820
  var target = styleQueue$jscomp$0.rules,
1558
- children$jscomp$6 = null,
1559
- innerHTML$jscomp$5 = null,
1560
- propKey$jscomp$8;
1561
- for (propKey$jscomp$8 in props)
1562
- if (hasOwnProperty.call(props, propKey$jscomp$8)) {
1563
- var propValue$jscomp$8 = props[propKey$jscomp$8];
1564
- if (null != propValue$jscomp$8)
1565
- switch (propKey$jscomp$8) {
1821
+ children$jscomp$7 = null,
1822
+ innerHTML$jscomp$6 = null,
1823
+ propKey$jscomp$9;
1824
+ for (propKey$jscomp$9 in props)
1825
+ if (hasOwnProperty.call(props, propKey$jscomp$9)) {
1826
+ var propValue$jscomp$9 = props[propKey$jscomp$9];
1827
+ if (null != propValue$jscomp$9)
1828
+ switch (propKey$jscomp$9) {
1566
1829
  case "children":
1567
- children$jscomp$6 = propValue$jscomp$8;
1830
+ children$jscomp$7 = propValue$jscomp$9;
1568
1831
  break;
1569
1832
  case "dangerouslySetInnerHTML":
1570
- innerHTML$jscomp$5 = propValue$jscomp$8;
1833
+ innerHTML$jscomp$6 = propValue$jscomp$9;
1571
1834
  }
1572
1835
  }
1573
- var child$jscomp$0 = Array.isArray(children$jscomp$6)
1574
- ? 2 > children$jscomp$6.length
1575
- ? children$jscomp$6[0]
1836
+ var child$jscomp$0 = Array.isArray(children$jscomp$7)
1837
+ ? 2 > children$jscomp$7.length
1838
+ ? children$jscomp$7[0]
1576
1839
  : null
1577
- : children$jscomp$6;
1840
+ : children$jscomp$7;
1578
1841
  "function" !== typeof child$jscomp$0 &&
1579
1842
  "symbol" !== typeof child$jscomp$0 &&
1580
1843
  null !== child$jscomp$0 &&
@@ -1582,85 +1845,85 @@ function pushStartInstance(
1582
1845
  target.push(
1583
1846
  ("" + child$jscomp$0).replace(styleRegex, styleReplacer)
1584
1847
  );
1585
- pushInnerHTML(target, innerHTML$jscomp$5, children$jscomp$6);
1848
+ pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$7);
1586
1849
  }
1587
1850
  styleQueue$jscomp$0 &&
1588
1851
  hoistableState &&
1589
1852
  hoistableState.styles.add(styleQueue$jscomp$0);
1590
1853
  textEmbedded && target$jscomp$0.push(textSeparator);
1591
- JSCompiler_inline_result$jscomp$5 = void 0;
1854
+ JSCompiler_inline_result$jscomp$6 = void 0;
1592
1855
  }
1593
- return JSCompiler_inline_result$jscomp$5;
1856
+ return JSCompiler_inline_result$jscomp$6;
1594
1857
  case "meta":
1595
1858
  if (
1596
1859
  3 === formatContext.insertionMode ||
1597
1860
  formatContext.tagScope & 1 ||
1598
1861
  null != props.itemProp
1599
1862
  )
1600
- var JSCompiler_inline_result$jscomp$6 = pushSelfClosing(
1863
+ var JSCompiler_inline_result$jscomp$7 = pushSelfClosing(
1601
1864
  target$jscomp$0,
1602
1865
  props,
1603
1866
  "meta"
1604
1867
  );
1605
1868
  else
1606
1869
  textEmbedded && target$jscomp$0.push(textSeparator),
1607
- (JSCompiler_inline_result$jscomp$6 = isFallback
1870
+ (JSCompiler_inline_result$jscomp$7 = isFallback
1608
1871
  ? null
1609
1872
  : "string" === typeof props.charSet
1610
- ? pushSelfClosing(renderState.charsetChunks, props, "meta")
1611
- : "viewport" === props.name
1612
- ? pushSelfClosing(renderState.viewportChunks, props, "meta")
1613
- : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
1614
- return JSCompiler_inline_result$jscomp$6;
1873
+ ? pushSelfClosing(renderState.charsetChunks, props, "meta")
1874
+ : "viewport" === props.name
1875
+ ? pushSelfClosing(renderState.viewportChunks, props, "meta")
1876
+ : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
1877
+ return JSCompiler_inline_result$jscomp$7;
1615
1878
  case "listing":
1616
1879
  case "pre":
1617
1880
  target$jscomp$0.push(startChunkForTag(type));
1618
- var children$jscomp$7 = null,
1619
- innerHTML$jscomp$6 = null,
1620
- propKey$jscomp$9;
1621
- for (propKey$jscomp$9 in props)
1622
- if (hasOwnProperty.call(props, propKey$jscomp$9)) {
1623
- var propValue$jscomp$9 = props[propKey$jscomp$9];
1624
- if (null != propValue$jscomp$9)
1625
- switch (propKey$jscomp$9) {
1881
+ var children$jscomp$8 = null,
1882
+ innerHTML$jscomp$7 = null,
1883
+ propKey$jscomp$10;
1884
+ for (propKey$jscomp$10 in props)
1885
+ if (hasOwnProperty.call(props, propKey$jscomp$10)) {
1886
+ var propValue$jscomp$10 = props[propKey$jscomp$10];
1887
+ if (null != propValue$jscomp$10)
1888
+ switch (propKey$jscomp$10) {
1626
1889
  case "children":
1627
- children$jscomp$7 = propValue$jscomp$9;
1890
+ children$jscomp$8 = propValue$jscomp$10;
1628
1891
  break;
1629
1892
  case "dangerouslySetInnerHTML":
1630
- innerHTML$jscomp$6 = propValue$jscomp$9;
1893
+ innerHTML$jscomp$7 = propValue$jscomp$10;
1631
1894
  break;
1632
1895
  default:
1633
1896
  pushAttribute(
1634
1897
  target$jscomp$0,
1635
- propKey$jscomp$9,
1636
- propValue$jscomp$9
1898
+ propKey$jscomp$10,
1899
+ propValue$jscomp$10
1637
1900
  );
1638
1901
  }
1639
1902
  }
1640
1903
  target$jscomp$0.push(endOfStartTag);
1641
- if (null != innerHTML$jscomp$6) {
1642
- if (null != children$jscomp$7)
1904
+ if (null != innerHTML$jscomp$7) {
1905
+ if (null != children$jscomp$8)
1643
1906
  throw Error(
1644
1907
  "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
1645
1908
  );
1646
1909
  if (
1647
- "object" !== typeof innerHTML$jscomp$6 ||
1648
- !("__html" in innerHTML$jscomp$6)
1910
+ "object" !== typeof innerHTML$jscomp$7 ||
1911
+ !("__html" in innerHTML$jscomp$7)
1649
1912
  )
1650
1913
  throw Error(
1651
1914
  "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
1652
1915
  );
1653
- var html = innerHTML$jscomp$6.__html;
1916
+ var html = innerHTML$jscomp$7.__html;
1654
1917
  null !== html &&
1655
1918
  void 0 !== html &&
1656
1919
  ("string" === typeof html && 0 < html.length && "\n" === html[0]
1657
1920
  ? target$jscomp$0.push(leadingNewline, html)
1658
1921
  : target$jscomp$0.push("" + html));
1659
1922
  }
1660
- "string" === typeof children$jscomp$7 &&
1661
- "\n" === children$jscomp$7[0] &&
1923
+ "string" === typeof children$jscomp$8 &&
1924
+ "\n" === children$jscomp$8[0] &&
1662
1925
  target$jscomp$0.push(leadingNewline);
1663
- return children$jscomp$7;
1926
+ return children$jscomp$8;
1664
1927
  case "img":
1665
1928
  var src = props.src,
1666
1929
  srcSet = props.srcSet;
@@ -1702,7 +1965,7 @@ function pushStartInstance(
1702
1965
  ) {
1703
1966
  resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;
1704
1967
  var input = props.crossOrigin;
1705
- var JSCompiler_inline_result$jscomp$7 =
1968
+ var JSCompiler_inline_result$jscomp$8 =
1706
1969
  "string" === typeof input
1707
1970
  ? "use-credentials" === input
1708
1971
  ? input
@@ -1717,14 +1980,14 @@ function pushStartInstance(
1717
1980
  ((header = getPreloadAsHeader(src, "image", {
1718
1981
  imageSrcSet: props.srcSet,
1719
1982
  imageSizes: props.sizes,
1720
- crossOrigin: JSCompiler_inline_result$jscomp$7,
1983
+ crossOrigin: JSCompiler_inline_result$jscomp$8,
1721
1984
  integrity: props.integrity,
1722
1985
  nonce: props.nonce,
1723
1986
  type: props.type,
1724
1987
  fetchPriority: props.fetchPriority,
1725
1988
  referrerPolicy: props.refererPolicy
1726
1989
  })),
1727
- 2 <= (headers.remainingCapacity -= header.length))
1990
+ 0 <= (headers.remainingCapacity -= header.length + 2))
1728
1991
  ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),
1729
1992
  headers.highImagePreloads && (headers.highImagePreloads += ", "),
1730
1993
  (headers.highImagePreloads += header))
@@ -1735,7 +1998,7 @@ function pushStartInstance(
1735
1998
  href: srcSet ? void 0 : src,
1736
1999
  imageSrcSet: srcSet,
1737
2000
  imageSizes: sizes,
1738
- crossOrigin: JSCompiler_inline_result$jscomp$7,
2001
+ crossOrigin: JSCompiler_inline_result$jscomp$8,
1739
2002
  integrity: props.integrity,
1740
2003
  type: props.type,
1741
2004
  fetchPriority: props.fetchPriority,
@@ -1773,56 +2036,56 @@ function pushStartInstance(
1773
2036
  case "head":
1774
2037
  if (2 > formatContext.insertionMode && null === renderState.headChunks) {
1775
2038
  renderState.headChunks = [];
1776
- var JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
2039
+ var JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
1777
2040
  renderState.headChunks,
1778
2041
  props,
1779
2042
  "head"
1780
2043
  );
1781
2044
  } else
1782
- JSCompiler_inline_result$jscomp$8 = pushStartGenericElement(
2045
+ JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
1783
2046
  target$jscomp$0,
1784
2047
  props,
1785
2048
  "head"
1786
2049
  );
1787
- return JSCompiler_inline_result$jscomp$8;
2050
+ return JSCompiler_inline_result$jscomp$9;
1788
2051
  case "html":
1789
2052
  if (
1790
2053
  0 === formatContext.insertionMode &&
1791
2054
  null === renderState.htmlChunks
1792
2055
  ) {
1793
2056
  renderState.htmlChunks = [doctypeChunk];
1794
- var JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
2057
+ var JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
1795
2058
  renderState.htmlChunks,
1796
2059
  props,
1797
2060
  "html"
1798
2061
  );
1799
2062
  } else
1800
- JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
2063
+ JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
1801
2064
  target$jscomp$0,
1802
2065
  props,
1803
2066
  "html"
1804
2067
  );
1805
- return JSCompiler_inline_result$jscomp$9;
2068
+ return JSCompiler_inline_result$jscomp$10;
1806
2069
  default:
1807
2070
  if (-1 !== type.indexOf("-")) {
1808
2071
  target$jscomp$0.push(startChunkForTag(type));
1809
- var children$jscomp$8 = null,
1810
- innerHTML$jscomp$7 = null,
1811
- propKey$jscomp$10;
1812
- for (propKey$jscomp$10 in props)
1813
- if (hasOwnProperty.call(props, propKey$jscomp$10)) {
1814
- var propValue$jscomp$10 = props[propKey$jscomp$10];
1815
- if (null != propValue$jscomp$10) {
1816
- var attributeName = propKey$jscomp$10;
1817
- switch (propKey$jscomp$10) {
2072
+ var children$jscomp$9 = null,
2073
+ innerHTML$jscomp$8 = null,
2074
+ propKey$jscomp$11;
2075
+ for (propKey$jscomp$11 in props)
2076
+ if (hasOwnProperty.call(props, propKey$jscomp$11)) {
2077
+ var propValue$jscomp$11 = props[propKey$jscomp$11];
2078
+ if (null != propValue$jscomp$11) {
2079
+ var attributeName = propKey$jscomp$11;
2080
+ switch (propKey$jscomp$11) {
1818
2081
  case "children":
1819
- children$jscomp$8 = propValue$jscomp$10;
2082
+ children$jscomp$9 = propValue$jscomp$11;
1820
2083
  break;
1821
2084
  case "dangerouslySetInnerHTML":
1822
- innerHTML$jscomp$7 = propValue$jscomp$10;
2085
+ innerHTML$jscomp$8 = propValue$jscomp$11;
1823
2086
  break;
1824
2087
  case "style":
1825
- pushStyleAttribute(target$jscomp$0, propValue$jscomp$10);
2088
+ pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);
1826
2089
  break;
1827
2090
  case "suppressContentEditableWarning":
1828
2091
  case "suppressHydrationWarning":
@@ -1832,18 +2095,18 @@ function pushStartInstance(
1832
2095
  attributeName = "class";
1833
2096
  default:
1834
2097
  if (
1835
- isAttributeNameSafe(propKey$jscomp$10) &&
1836
- "function" !== typeof propValue$jscomp$10 &&
1837
- "symbol" !== typeof propValue$jscomp$10 &&
1838
- !1 !== propValue$jscomp$10
2098
+ isAttributeNameSafe(propKey$jscomp$11) &&
2099
+ "function" !== typeof propValue$jscomp$11 &&
2100
+ "symbol" !== typeof propValue$jscomp$11 &&
2101
+ !1 !== propValue$jscomp$11
1839
2102
  ) {
1840
- if (!0 === propValue$jscomp$10) propValue$jscomp$10 = "";
1841
- else if ("object" === typeof propValue$jscomp$10) continue;
2103
+ if (!0 === propValue$jscomp$11) propValue$jscomp$11 = "";
2104
+ else if ("object" === typeof propValue$jscomp$11) continue;
1842
2105
  target$jscomp$0.push(
1843
2106
  attributeSeparator,
1844
2107
  attributeName,
1845
2108
  attributeAssign,
1846
- escapeTextForBrowser(propValue$jscomp$10),
2109
+ escapeTextForBrowser(propValue$jscomp$11),
1847
2110
  attributeEnd
1848
2111
  );
1849
2112
  }
@@ -1851,8 +2114,8 @@ function pushStartInstance(
1851
2114
  }
1852
2115
  }
1853
2116
  target$jscomp$0.push(endOfStartTag);
1854
- pushInnerHTML(target$jscomp$0, innerHTML$jscomp$7, children$jscomp$8);
1855
- return children$jscomp$8;
2117
+ pushInnerHTML(target$jscomp$0, innerHTML$jscomp$8, children$jscomp$9);
2118
+ return children$jscomp$9;
1856
2119
  }
1857
2120
  }
1858
2121
  return pushStartGenericElement(target$jscomp$0, props, type);
@@ -2341,7 +2604,7 @@ function prefetchDNS(href) {
2341
2604
  escapeHrefForLinkHeaderURLContextReplacer
2342
2605
  ) +
2343
2606
  ">; rel=dns-prefetch"),
2344
- 2 <= (resumableState.remainingCapacity -= header.length));
2607
+ 0 <= (resumableState.remainingCapacity -= header.length + 2));
2345
2608
  JSCompiler_temp
2346
2609
  ? ((renderState.resets.dns[href] = null),
2347
2610
  resumableState.preconnects && (resumableState.preconnects += ", "),
@@ -2364,8 +2627,8 @@ function preconnect(href, crossOrigin) {
2364
2627
  "use-credentials" === crossOrigin
2365
2628
  ? "credentials"
2366
2629
  : "string" === typeof crossOrigin
2367
- ? "anonymous"
2368
- : "default";
2630
+ ? "anonymous"
2631
+ : "default";
2369
2632
  if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {
2370
2633
  resumableState.connectResources[bucket][href] = null;
2371
2634
  resumableState = renderState.headers;
@@ -2390,7 +2653,7 @@ function preconnect(href, crossOrigin) {
2390
2653
  }
2391
2654
  JSCompiler_temp =
2392
2655
  ((header = JSCompiler_temp),
2393
- 2 <= (resumableState.remainingCapacity -= header.length));
2656
+ 0 <= (resumableState.remainingCapacity -= header.length + 2));
2394
2657
  }
2395
2658
  JSCompiler_temp
2396
2659
  ? ((renderState.resets.connect[bucket][href] = null),
@@ -2432,7 +2695,7 @@ function preload(href, as, options) {
2432
2695
  0 < resumableState.remainingCapacity &&
2433
2696
  "high" === fetchPriority &&
2434
2697
  ((header = getPreloadAsHeader(href, as, options)),
2435
- 2 <= (resumableState.remainingCapacity -= header.length))
2698
+ 0 <= (resumableState.remainingCapacity -= header.length + 2))
2436
2699
  ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),
2437
2700
  resumableState.highImagePreloads &&
2438
2701
  (resumableState.highImagePreloads += ", "),
@@ -2498,7 +2761,7 @@ function preload(href, as, options) {
2498
2761
  0 < resumableState.remainingCapacity &&
2499
2762
  "font" === as &&
2500
2763
  ((key = getPreloadAsHeader(href, as, options)),
2501
- 2 <= (resumableState.remainingCapacity -= key.length))
2764
+ 0 <= (resumableState.remainingCapacity -= key.length + 2))
2502
2765
  )
2503
2766
  (renderState.resets.font[href] = PRELOAD_NO_CREDS),
2504
2767
  resumableState.fontPreloads &&
@@ -2721,7 +2984,8 @@ function hoistStyleQueueDependency(styleQueue) {
2721
2984
  function hoistStylesheetDependency(stylesheet) {
2722
2985
  this.stylesheets.add(stylesheet);
2723
2986
  }
2724
- var requestStorage = new async_hooks.AsyncLocalStorage(),
2987
+ var bind = Function.prototype.bind,
2988
+ requestStorage = new async_hooks.AsyncLocalStorage(),
2725
2989
  REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
2726
2990
  function getComponentNameFromType(type) {
2727
2991
  if (null == type) return null;
@@ -2833,12 +3097,12 @@ function switchContext(newSnapshot) {
2833
3097
  (null === prev
2834
3098
  ? pushAllNext(newSnapshot)
2835
3099
  : null === newSnapshot
2836
- ? popAllPrevious(prev)
2837
- : prev.depth === newSnapshot.depth
2838
- ? popToNearestCommonAncestor(prev, newSnapshot)
2839
- : prev.depth > newSnapshot.depth
2840
- ? popPreviousToCommonLevel(prev, newSnapshot)
2841
- : popNextToCommonLevel(prev, newSnapshot),
3100
+ ? popAllPrevious(prev)
3101
+ : prev.depth === newSnapshot.depth
3102
+ ? popToNearestCommonAncestor(prev, newSnapshot)
3103
+ : prev.depth > newSnapshot.depth
3104
+ ? popPreviousToCommonLevel(prev, newSnapshot)
3105
+ : popNextToCommonLevel(prev, newSnapshot),
2842
3106
  (currentActiveSnapshot = newSnapshot));
2843
3107
  }
2844
3108
  var classComponentUpdater = {
@@ -2985,9 +3249,9 @@ function createWorkInProgressHook() {
2985
3249
  (firstWorkInProgressHook = workInProgressHook = createHook()))
2986
3250
  : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))
2987
3251
  : null === workInProgressHook.next
2988
- ? ((isReRender = !1),
2989
- (workInProgressHook = workInProgressHook.next = createHook()))
2990
- : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
3252
+ ? ((isReRender = !1),
3253
+ (workInProgressHook = workInProgressHook.next = createHook()))
3254
+ : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
2991
3255
  return workInProgressHook;
2992
3256
  }
2993
3257
  function getThenableStateAfterSuspending() {
@@ -3034,8 +3298,8 @@ function useReducer(reducer, initialArg, init) {
3034
3298
  ? initialArg()
3035
3299
  : initialArg
3036
3300
  : void 0 !== init
3037
- ? init(initialArg)
3038
- : initialArg;
3301
+ ? init(initialArg)
3302
+ : initialArg;
3039
3303
  workInProgressHook.memoizedState = reducer;
3040
3304
  reducer = workInProgressHook.queue = { last: null, dispatch: null };
3041
3305
  reducer = reducer.dispatch = dispatchAction.bind(
@@ -3261,8 +3525,14 @@ var currentResumableState = null,
3261
3525
  getCacheForType: function () {
3262
3526
  throw Error("Not implemented.");
3263
3527
  }
3264
- },
3265
- prefix;
3528
+ };
3529
+ function prepareStackTrace(error, structuredStackTrace) {
3530
+ error = (error.name || "Error") + ": " + (error.message || "");
3531
+ for (var i = 0; i < structuredStackTrace.length; i++)
3532
+ error += "\n at " + structuredStackTrace[i].toString();
3533
+ return error;
3534
+ }
3535
+ var prefix, suffix;
3266
3536
  function describeBuiltInComponentFrame(name) {
3267
3537
  if (void 0 === prefix)
3268
3538
  try {
@@ -3270,71 +3540,79 @@ function describeBuiltInComponentFrame(name) {
3270
3540
  } catch (x) {
3271
3541
  var match = x.stack.trim().match(/\n( *(at )?)/);
3272
3542
  prefix = (match && match[1]) || "";
3543
+ suffix =
3544
+ -1 < x.stack.indexOf("\n at")
3545
+ ? " (<anonymous>)"
3546
+ : -1 < x.stack.indexOf("@")
3547
+ ? "@unknown:0:0"
3548
+ : "";
3273
3549
  }
3274
- return "\n" + prefix + name;
3550
+ return "\n" + prefix + name + suffix;
3275
3551
  }
3276
3552
  var reentry = !1;
3277
3553
  function describeNativeComponentFrame(fn, construct) {
3278
3554
  if (!fn || reentry) return "";
3279
3555
  reentry = !0;
3280
3556
  var previousPrepareStackTrace = Error.prepareStackTrace;
3281
- Error.prepareStackTrace = void 0;
3282
- var RunInRootFrame = {
3283
- DetermineComponentFrameRoot: function () {
3284
- try {
3285
- if (construct) {
3286
- var Fake = function () {
3287
- throw Error();
3288
- };
3289
- Object.defineProperty(Fake.prototype, "props", {
3290
- set: function () {
3557
+ Error.prepareStackTrace = prepareStackTrace;
3558
+ try {
3559
+ var RunInRootFrame = {
3560
+ DetermineComponentFrameRoot: function () {
3561
+ try {
3562
+ if (construct) {
3563
+ var Fake = function () {
3291
3564
  throw Error();
3565
+ };
3566
+ Object.defineProperty(Fake.prototype, "props", {
3567
+ set: function () {
3568
+ throw Error();
3569
+ }
3570
+ });
3571
+ if ("object" === typeof Reflect && Reflect.construct) {
3572
+ try {
3573
+ Reflect.construct(Fake, []);
3574
+ } catch (x) {
3575
+ var control = x;
3576
+ }
3577
+ Reflect.construct(fn, [], Fake);
3578
+ } else {
3579
+ try {
3580
+ Fake.call();
3581
+ } catch (x$24) {
3582
+ control = x$24;
3583
+ }
3584
+ fn.call(Fake.prototype);
3292
3585
  }
3293
- });
3294
- if ("object" === typeof Reflect && Reflect.construct) {
3295
- try {
3296
- Reflect.construct(Fake, []);
3297
- } catch (x) {
3298
- var control = x;
3299
- }
3300
- Reflect.construct(fn, [], Fake);
3301
3586
  } else {
3302
3587
  try {
3303
- Fake.call();
3304
- } catch (x$24) {
3305
- control = x$24;
3588
+ throw Error();
3589
+ } catch (x$25) {
3590
+ control = x$25;
3306
3591
  }
3307
- fn.call(Fake.prototype);
3308
- }
3309
- } else {
3310
- try {
3311
- throw Error();
3312
- } catch (x$25) {
3313
- control = x$25;
3592
+ (Fake = fn()) &&
3593
+ "function" === typeof Fake.catch &&
3594
+ Fake.catch(function () {});
3314
3595
  }
3315
- (Fake = fn()) &&
3316
- "function" === typeof Fake.catch &&
3317
- Fake.catch(function () {});
3596
+ } catch (sample) {
3597
+ if (sample && control && "string" === typeof sample.stack)
3598
+ return [sample.stack, control.stack];
3318
3599
  }
3319
- } catch (sample) {
3320
- if (sample && control && "string" === typeof sample.stack)
3321
- return [sample.stack, control.stack];
3600
+ return [null, null];
3322
3601
  }
3323
- return [null, null];
3324
- }
3325
- };
3326
- RunInRootFrame.DetermineComponentFrameRoot.displayName =
3327
- "DetermineComponentFrameRoot";
3328
- var namePropDescriptor = Object.getOwnPropertyDescriptor(
3329
- RunInRootFrame.DetermineComponentFrameRoot,
3330
- "name"
3331
- );
3332
- namePropDescriptor &&
3333
- namePropDescriptor.configurable &&
3334
- Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", {
3335
- value: "DetermineComponentFrameRoot"
3336
- });
3337
- try {
3602
+ };
3603
+ RunInRootFrame.DetermineComponentFrameRoot.displayName =
3604
+ "DetermineComponentFrameRoot";
3605
+ var namePropDescriptor = Object.getOwnPropertyDescriptor(
3606
+ RunInRootFrame.DetermineComponentFrameRoot,
3607
+ "name"
3608
+ );
3609
+ namePropDescriptor &&
3610
+ namePropDescriptor.configurable &&
3611
+ Object.defineProperty(
3612
+ RunInRootFrame.DetermineComponentFrameRoot,
3613
+ "name",
3614
+ { value: "DetermineComponentFrameRoot" }
3615
+ );
3338
3616
  var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
3339
3617
  sampleStack = _RunInRootFrame$Deter[0],
3340
3618
  controlStack = _RunInRootFrame$Deter[1];
@@ -3405,13 +3683,78 @@ function describeNativeComponentFrame(fn, construct) {
3405
3683
  ? describeBuiltInComponentFrame(previousPrepareStackTrace)
3406
3684
  : "";
3407
3685
  }
3686
+ function describeComponentStackByType(type) {
3687
+ if ("string" === typeof type) return describeBuiltInComponentFrame(type);
3688
+ if ("function" === typeof type)
3689
+ return type.prototype && type.prototype.isReactComponent
3690
+ ? ((type = describeNativeComponentFrame(type, !0)), type)
3691
+ : describeNativeComponentFrame(type, !1);
3692
+ if ("object" === typeof type && null !== type) {
3693
+ switch (type.$$typeof) {
3694
+ case REACT_FORWARD_REF_TYPE:
3695
+ return describeNativeComponentFrame(type.render, !1);
3696
+ case REACT_MEMO_TYPE:
3697
+ return describeNativeComponentFrame(type.type, !1);
3698
+ case REACT_LAZY_TYPE:
3699
+ var lazyComponent = type,
3700
+ payload = lazyComponent._payload;
3701
+ lazyComponent = lazyComponent._init;
3702
+ try {
3703
+ type = lazyComponent(payload);
3704
+ } catch (x) {
3705
+ return describeBuiltInComponentFrame("Lazy");
3706
+ }
3707
+ return describeComponentStackByType(type);
3708
+ }
3709
+ if ("string" === typeof type.name)
3710
+ return (
3711
+ (payload = type.env),
3712
+ describeBuiltInComponentFrame(
3713
+ type.name + (payload ? " [" + payload + "]" : "")
3714
+ )
3715
+ );
3716
+ }
3717
+ switch (type) {
3718
+ case REACT_SUSPENSE_LIST_TYPE:
3719
+ return describeBuiltInComponentFrame("SuspenseList");
3720
+ case REACT_SUSPENSE_TYPE:
3721
+ return describeBuiltInComponentFrame("Suspense");
3722
+ }
3723
+ return "";
3724
+ }
3408
3725
  function defaultErrorHandler(error) {
3409
- console.error(error);
3726
+ if (
3727
+ "object" === typeof error &&
3728
+ null !== error &&
3729
+ "string" === typeof error.environmentName
3730
+ ) {
3731
+ var JSCompiler_inline_result = error.environmentName;
3732
+ error = [error].slice(0);
3733
+ "string" === typeof error[0]
3734
+ ? error.splice(
3735
+ 0,
3736
+ 1,
3737
+ "\u001b[0m\u001b[7m%c%s\u001b[0m%c " + error[0],
3738
+ "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",
3739
+ " " + JSCompiler_inline_result + " ",
3740
+ ""
3741
+ )
3742
+ : error.splice(
3743
+ 0,
3744
+ 0,
3745
+ "\u001b[0m\u001b[7m%c%s\u001b[0m%c ",
3746
+ "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",
3747
+ " " + JSCompiler_inline_result + " ",
3748
+ ""
3749
+ );
3750
+ error.unshift(console);
3751
+ JSCompiler_inline_result = bind.apply(console.error, error);
3752
+ JSCompiler_inline_result();
3753
+ } else console.error(error);
3410
3754
  return null;
3411
3755
  }
3412
3756
  function noop() {}
3413
3757
  function RequestInstance(
3414
- children,
3415
3758
  resumableState,
3416
3759
  renderState,
3417
3760
  rootFormatContext,
@@ -3424,8 +3767,7 @@ function RequestInstance(
3424
3767
  onPostpone,
3425
3768
  formState
3426
3769
  ) {
3427
- var pingedTasks = [],
3428
- abortSet = new Set();
3770
+ var abortSet = new Set();
3429
3771
  this.destination = null;
3430
3772
  this.flushScheduled = !1;
3431
3773
  this.resumableState = resumableState;
@@ -3433,12 +3775,12 @@ function RequestInstance(
3433
3775
  this.rootFormatContext = rootFormatContext;
3434
3776
  this.progressiveChunkSize =
3435
3777
  void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize;
3436
- this.status = 0;
3778
+ this.status = 10;
3437
3779
  this.fatalError = null;
3438
3780
  this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
3439
3781
  this.completedRootSegment = null;
3440
3782
  this.abortableTasks = abortSet;
3441
- this.pingedTasks = pingedTasks;
3783
+ this.pingedTasks = [];
3442
3784
  this.clientRenderedBoundaries = [];
3443
3785
  this.completedBoundaries = [];
3444
3786
  this.partialBoundaries = [];
@@ -3450,47 +3792,114 @@ function RequestInstance(
3450
3792
  this.onShellError = void 0 === onShellError ? noop : onShellError;
3451
3793
  this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
3452
3794
  this.formState = void 0 === formState ? null : formState;
3453
- resumableState = createPendingSegment(
3454
- this,
3795
+ }
3796
+ function createRequest(
3797
+ children,
3798
+ resumableState,
3799
+ renderState,
3800
+ rootFormatContext,
3801
+ progressiveChunkSize,
3802
+ onError,
3803
+ onAllReady,
3804
+ onShellReady,
3805
+ onShellError,
3806
+ onFatalError,
3807
+ onPostpone,
3808
+ formState
3809
+ ) {
3810
+ resumableState = new RequestInstance(
3811
+ resumableState,
3812
+ renderState,
3813
+ rootFormatContext,
3814
+ progressiveChunkSize,
3815
+ onError,
3816
+ onAllReady,
3817
+ onShellReady,
3818
+ onShellError,
3819
+ onFatalError,
3820
+ onPostpone,
3821
+ formState
3822
+ );
3823
+ renderState = createPendingSegment(
3824
+ resumableState,
3455
3825
  0,
3456
3826
  null,
3457
3827
  rootFormatContext,
3458
3828
  !1,
3459
3829
  !1
3460
3830
  );
3461
- resumableState.parentFlushed = !0;
3831
+ renderState.parentFlushed = !0;
3462
3832
  children = createRenderTask(
3463
- this,
3833
+ resumableState,
3464
3834
  null,
3465
3835
  children,
3466
3836
  -1,
3467
3837
  null,
3468
- resumableState,
3838
+ renderState,
3469
3839
  null,
3470
- abortSet,
3840
+ resumableState.abortableTasks,
3471
3841
  null,
3472
3842
  rootFormatContext,
3473
- emptyContextObject,
3474
3843
  null,
3475
3844
  emptyTreeContext,
3476
3845
  null,
3477
3846
  !1
3478
3847
  );
3479
- pingedTasks.push(children);
3480
- }
3481
- var currentRequest = null;
3482
- function resolveRequest() {
3483
- if (currentRequest) return currentRequest;
3484
- var store = requestStorage.getStore();
3485
- return store ? store : null;
3486
- }
3487
- function pingTask(request, task) {
3488
- request.pingedTasks.push(task);
3489
- 1 === request.pingedTasks.length &&
3490
- ((request.flushScheduled = null !== request.destination),
3491
- setImmediate(function () {
3492
- return performWork(request);
3493
- }));
3848
+ pushComponentStack(children);
3849
+ resumableState.pingedTasks.push(children);
3850
+ return resumableState;
3851
+ }
3852
+ function createPrerenderRequest(
3853
+ children,
3854
+ resumableState,
3855
+ renderState,
3856
+ rootFormatContext,
3857
+ progressiveChunkSize,
3858
+ onError,
3859
+ onAllReady,
3860
+ onShellReady,
3861
+ onShellError,
3862
+ onFatalError,
3863
+ onPostpone
3864
+ ) {
3865
+ children = createRequest(
3866
+ children,
3867
+ resumableState,
3868
+ renderState,
3869
+ rootFormatContext,
3870
+ progressiveChunkSize,
3871
+ onError,
3872
+ onAllReady,
3873
+ onShellReady,
3874
+ onShellError,
3875
+ onFatalError,
3876
+ onPostpone,
3877
+ void 0
3878
+ );
3879
+ children.trackedPostpones = {
3880
+ workingMap: new Map(),
3881
+ rootNodes: [],
3882
+ rootSlots: null
3883
+ };
3884
+ return children;
3885
+ }
3886
+ var currentRequest = null;
3887
+ function resolveRequest() {
3888
+ if (currentRequest) return currentRequest;
3889
+ var store = requestStorage.getStore();
3890
+ return store ? store : null;
3891
+ }
3892
+ function pingTask(request, task) {
3893
+ request.pingedTasks.push(task);
3894
+ 1 === request.pingedTasks.length &&
3895
+ ((request.flushScheduled = null !== request.destination),
3896
+ null !== request.trackedPostpones || 10 === request.status
3897
+ ? scheduleMicrotask(function () {
3898
+ return performWork(request);
3899
+ })
3900
+ : setImmediate(function () {
3901
+ return performWork(request);
3902
+ }));
3494
3903
  }
3495
3904
  function createSuspenseBoundary(request, fallbackAbortableTasks) {
3496
3905
  return {
@@ -3519,7 +3928,6 @@ function createRenderTask(
3519
3928
  abortSet,
3520
3929
  keyPath,
3521
3930
  formatContext,
3522
- legacyContext,
3523
3931
  context,
3524
3932
  treeContext,
3525
3933
  componentStack,
@@ -3542,7 +3950,6 @@ function createRenderTask(
3542
3950
  abortSet: abortSet,
3543
3951
  keyPath: keyPath,
3544
3952
  formatContext: formatContext,
3545
- legacyContext: legacyContext,
3546
3953
  context: context,
3547
3954
  treeContext: treeContext,
3548
3955
  componentStack: componentStack,
@@ -3563,7 +3970,6 @@ function createReplayTask(
3563
3970
  abortSet,
3564
3971
  keyPath,
3565
3972
  formatContext,
3566
- legacyContext,
3567
3973
  context,
3568
3974
  treeContext,
3569
3975
  componentStack,
@@ -3587,7 +3993,6 @@ function createReplayTask(
3587
3993
  abortSet: abortSet,
3588
3994
  keyPath: keyPath,
3589
3995
  formatContext: formatContext,
3590
- legacyContext: legacyContext,
3591
3996
  context: context,
3592
3997
  treeContext: treeContext,
3593
3998
  componentStack: componentStack,
@@ -3618,47 +4023,54 @@ function createPendingSegment(
3618
4023
  textEmbedded: textEmbedded
3619
4024
  };
3620
4025
  }
3621
- function createBuiltInComponentStack(task, type) {
3622
- return { tag: 0, parent: task.componentStack, type: type };
4026
+ function pushComponentStack(task) {
4027
+ var node = task.node;
4028
+ if ("object" === typeof node && null !== node)
4029
+ switch (node.$$typeof) {
4030
+ case REACT_ELEMENT_TYPE:
4031
+ task.componentStack = { parent: task.componentStack, type: node.type };
4032
+ }
3623
4033
  }
3624
- function getThrownInfo(request, node) {
3625
- if (node && null !== request.trackedPostpones) {
3626
- try {
3627
- request = "";
3628
- do {
3629
- switch (node.tag) {
3630
- case 0:
3631
- request += describeBuiltInComponentFrame(node.type);
3632
- break;
3633
- case 1:
3634
- request += describeNativeComponentFrame(node.type, !1);
3635
- break;
3636
- case 2:
3637
- request += describeNativeComponentFrame(node.type, !0);
4034
+ function getThrownInfo(node$jscomp$0) {
4035
+ var errorInfo = {};
4036
+ node$jscomp$0 &&
4037
+ Object.defineProperty(errorInfo, "componentStack", {
4038
+ configurable: !0,
4039
+ enumerable: !0,
4040
+ get: function () {
4041
+ try {
4042
+ var info = "",
4043
+ node = node$jscomp$0;
4044
+ do
4045
+ (info += describeComponentStackByType(node.type)),
4046
+ (node = node.parent);
4047
+ while (node);
4048
+ var JSCompiler_inline_result = info;
4049
+ } catch (x) {
4050
+ JSCompiler_inline_result =
4051
+ "\nError generating stack: " + x.message + "\n" + x.stack;
3638
4052
  }
3639
- node = node.parent;
3640
- } while (node);
3641
- var JSCompiler_temp = request;
3642
- } catch (x) {
3643
- JSCompiler_temp =
3644
- "\nError generating stack: " + x.message + "\n" + x.stack;
3645
- }
3646
- JSCompiler_temp = { componentStack: JSCompiler_temp };
3647
- } else JSCompiler_temp = {};
3648
- return JSCompiler_temp;
4053
+ Object.defineProperty(errorInfo, "componentStack", {
4054
+ value: JSCompiler_inline_result
4055
+ });
4056
+ return JSCompiler_inline_result;
4057
+ }
4058
+ });
4059
+ return errorInfo;
3649
4060
  }
3650
4061
  function logRecoverableError(request, error, errorInfo) {
3651
- request = request.onError(error, errorInfo);
3652
- if (null == request || "string" === typeof request) return request;
4062
+ request = request.onError;
4063
+ error = request(error, errorInfo);
4064
+ if (null == error || "string" === typeof error) return error;
3653
4065
  }
3654
4066
  function fatalError(request, error) {
3655
- var onShellError = request.onShellError;
3656
- onShellError(error);
3657
- onShellError = request.onFatalError;
4067
+ var onShellError = request.onShellError,
4068
+ onFatalError = request.onFatalError;
3658
4069
  onShellError(error);
4070
+ onFatalError(error);
3659
4071
  null !== request.destination
3660
- ? ((request.status = 2), request.destination.destroy(error))
3661
- : ((request.status = 1), (request.fatalError = error));
4072
+ ? ((request.status = 14), request.destination.destroy(error))
4073
+ : ((request.status = 13), (request.fatalError = error));
3662
4074
  }
3663
4075
  function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
3664
4076
  var prevThenableState = task.thenableState;
@@ -3711,171 +4123,148 @@ function finishFunctionComponent(
3711
4123
  renderNode(request, task, children, -1),
3712
4124
  (task.treeContext = keyPath))
3713
4125
  : didEmitActionStateMarkers
3714
- ? renderNode(request, task, children, -1)
3715
- : renderNodeDestructive(request, task, children, -1);
4126
+ ? renderNode(request, task, children, -1)
4127
+ : renderNodeDestructive(request, task, children, -1);
3716
4128
  task.keyPath = actionStateCount;
3717
4129
  }
3718
4130
  function renderElement(request, task, keyPath, type, props, ref) {
3719
4131
  if ("function" === typeof type)
3720
4132
  if (type.prototype && type.prototype.isReactComponent) {
3721
- var JSCompiler_inline_result = props;
4133
+ var newProps = props;
3722
4134
  if ("ref" in props) {
3723
- JSCompiler_inline_result = {};
4135
+ newProps = {};
3724
4136
  for (var propName in props)
3725
- "ref" !== propName &&
3726
- (JSCompiler_inline_result[propName] = props[propName]);
4137
+ "ref" !== propName && (newProps[propName] = props[propName]);
3727
4138
  }
3728
4139
  var defaultProps = type.defaultProps;
3729
4140
  if (defaultProps) {
3730
- JSCompiler_inline_result === props &&
3731
- (JSCompiler_inline_result = assign(
3732
- {},
3733
- JSCompiler_inline_result,
3734
- props
3735
- ));
3736
- for (var propName$31 in defaultProps)
3737
- void 0 === JSCompiler_inline_result[propName$31] &&
3738
- (JSCompiler_inline_result[propName$31] = defaultProps[propName$31]);
4141
+ newProps === props && (newProps = assign({}, newProps, props));
4142
+ for (var propName$33 in defaultProps)
4143
+ void 0 === newProps[propName$33] &&
4144
+ (newProps[propName$33] = defaultProps[propName$33]);
3739
4145
  }
3740
- props = task.componentStack;
3741
- task.componentStack = { tag: 2, parent: task.componentStack, type: type };
3742
- defaultProps = emptyContextObject;
4146
+ props = newProps;
4147
+ newProps = emptyContextObject;
4148
+ defaultProps = type.contextType;
4149
+ "object" === typeof defaultProps &&
4150
+ null !== defaultProps &&
4151
+ (newProps = defaultProps._currentValue);
4152
+ newProps = new type(props, newProps);
4153
+ var initialState = void 0 !== newProps.state ? newProps.state : null;
4154
+ newProps.updater = classComponentUpdater;
4155
+ newProps.props = props;
4156
+ newProps.state = initialState;
4157
+ defaultProps = { queue: [], replace: !1 };
4158
+ newProps._reactInternals = defaultProps;
3743
4159
  ref = type.contextType;
3744
- "object" === typeof ref &&
3745
- null !== ref &&
3746
- (defaultProps = ref._currentValue);
3747
- defaultProps = new type(JSCompiler_inline_result, defaultProps);
3748
- propName$31 = void 0 !== defaultProps.state ? defaultProps.state : null;
3749
- defaultProps.updater = classComponentUpdater;
3750
- defaultProps.props = JSCompiler_inline_result;
3751
- defaultProps.state = propName$31;
3752
- ref = { queue: [], replace: !1 };
3753
- defaultProps._reactInternals = ref;
3754
- var contextType = type.contextType;
3755
- defaultProps.context =
3756
- "object" === typeof contextType && null !== contextType
3757
- ? contextType._currentValue
4160
+ newProps.context =
4161
+ "object" === typeof ref && null !== ref
4162
+ ? ref._currentValue
3758
4163
  : emptyContextObject;
3759
- contextType = type.getDerivedStateFromProps;
3760
- "function" === typeof contextType &&
3761
- ((contextType = contextType(JSCompiler_inline_result, propName$31)),
3762
- (propName$31 =
3763
- null === contextType || void 0 === contextType
3764
- ? propName$31
3765
- : assign({}, propName$31, contextType)),
3766
- (defaultProps.state = propName$31));
4164
+ ref = type.getDerivedStateFromProps;
4165
+ "function" === typeof ref &&
4166
+ ((ref = ref(props, initialState)),
4167
+ (initialState =
4168
+ null === ref || void 0 === ref
4169
+ ? initialState
4170
+ : assign({}, initialState, ref)),
4171
+ (newProps.state = initialState));
3767
4172
  if (
3768
4173
  "function" !== typeof type.getDerivedStateFromProps &&
3769
- "function" !== typeof defaultProps.getSnapshotBeforeUpdate &&
3770
- ("function" === typeof defaultProps.UNSAFE_componentWillMount ||
3771
- "function" === typeof defaultProps.componentWillMount)
4174
+ "function" !== typeof newProps.getSnapshotBeforeUpdate &&
4175
+ ("function" === typeof newProps.UNSAFE_componentWillMount ||
4176
+ "function" === typeof newProps.componentWillMount)
3772
4177
  )
3773
4178
  if (
3774
- ((type = defaultProps.state),
3775
- "function" === typeof defaultProps.componentWillMount &&
3776
- defaultProps.componentWillMount(),
3777
- "function" === typeof defaultProps.UNSAFE_componentWillMount &&
3778
- defaultProps.UNSAFE_componentWillMount(),
3779
- type !== defaultProps.state &&
4179
+ ((type = newProps.state),
4180
+ "function" === typeof newProps.componentWillMount &&
4181
+ newProps.componentWillMount(),
4182
+ "function" === typeof newProps.UNSAFE_componentWillMount &&
4183
+ newProps.UNSAFE_componentWillMount(),
4184
+ type !== newProps.state &&
3780
4185
  classComponentUpdater.enqueueReplaceState(
3781
- defaultProps,
3782
- defaultProps.state,
4186
+ newProps,
4187
+ newProps.state,
3783
4188
  null
3784
4189
  ),
3785
- null !== ref.queue && 0 < ref.queue.length)
4190
+ null !== defaultProps.queue && 0 < defaultProps.queue.length)
3786
4191
  )
3787
4192
  if (
3788
- ((type = ref.queue),
3789
- (contextType = ref.replace),
3790
- (ref.queue = null),
3791
- (ref.replace = !1),
3792
- contextType && 1 === type.length)
4193
+ ((type = defaultProps.queue),
4194
+ (ref = defaultProps.replace),
4195
+ (defaultProps.queue = null),
4196
+ (defaultProps.replace = !1),
4197
+ ref && 1 === type.length)
3793
4198
  )
3794
- defaultProps.state = type[0];
4199
+ newProps.state = type[0];
3795
4200
  else {
3796
- ref = contextType ? type[0] : defaultProps.state;
3797
- propName$31 = !0;
3798
- for (
3799
- contextType = contextType ? 1 : 0;
3800
- contextType < type.length;
3801
- contextType++
3802
- )
3803
- (propName = type[contextType]),
3804
- (propName =
3805
- "function" === typeof propName
3806
- ? propName.call(
3807
- defaultProps,
3808
- ref,
3809
- JSCompiler_inline_result,
3810
- void 0
3811
- )
3812
- : propName),
3813
- null != propName &&
3814
- (propName$31
3815
- ? ((propName$31 = !1), (ref = assign({}, ref, propName)))
3816
- : assign(ref, propName));
3817
- defaultProps.state = ref;
4201
+ defaultProps = ref ? type[0] : newProps.state;
4202
+ initialState = !0;
4203
+ for (ref = ref ? 1 : 0; ref < type.length; ref++)
4204
+ (propName$33 = type[ref]),
4205
+ (propName$33 =
4206
+ "function" === typeof propName$33
4207
+ ? propName$33.call(newProps, defaultProps, props, void 0)
4208
+ : propName$33),
4209
+ null != propName$33 &&
4210
+ (initialState
4211
+ ? ((initialState = !1),
4212
+ (defaultProps = assign({}, defaultProps, propName$33)))
4213
+ : assign(defaultProps, propName$33));
4214
+ newProps.state = defaultProps;
3818
4215
  }
3819
- else ref.queue = null;
3820
- type = defaultProps.render();
3821
- JSCompiler_inline_result = task.keyPath;
4216
+ else defaultProps.queue = null;
4217
+ type = newProps.render();
4218
+ if (12 === request.status) throw null;
4219
+ props = task.keyPath;
3822
4220
  task.keyPath = keyPath;
3823
4221
  renderNodeDestructive(request, task, type, -1);
3824
- task.keyPath = JSCompiler_inline_result;
3825
- task.componentStack = props;
3826
- } else
3827
- (JSCompiler_inline_result = task.componentStack),
3828
- (task.componentStack = {
3829
- tag: 1,
3830
- parent: task.componentStack,
3831
- type: type
3832
- }),
3833
- (type = renderWithHooks(request, task, keyPath, type, props, void 0)),
3834
- finishFunctionComponent(
3835
- request,
3836
- task,
3837
- keyPath,
3838
- type,
3839
- 0 !== localIdCounter,
3840
- actionStateCounter,
3841
- actionStateMatchingIndex
3842
- ),
3843
- (task.componentStack = JSCompiler_inline_result);
3844
- else if ("string" === typeof type) {
3845
- JSCompiler_inline_result = task.componentStack;
3846
- task.componentStack = createBuiltInComponentStack(task, type);
3847
- defaultProps = task.blockedSegment;
3848
- if (null === defaultProps)
3849
- (defaultProps = props.children),
3850
- (ref = task.formatContext),
3851
- (propName$31 = task.keyPath),
3852
- (task.formatContext = getChildFormatContext(ref, type, props)),
4222
+ task.keyPath = props;
4223
+ } else {
4224
+ type = renderWithHooks(request, task, keyPath, type, props, void 0);
4225
+ if (12 === request.status) throw null;
4226
+ finishFunctionComponent(
4227
+ request,
4228
+ task,
4229
+ keyPath,
4230
+ type,
4231
+ 0 !== localIdCounter,
4232
+ actionStateCounter,
4233
+ actionStateMatchingIndex
4234
+ );
4235
+ }
4236
+ else if ("string" === typeof type)
4237
+ if (((newProps = task.blockedSegment), null === newProps))
4238
+ (newProps = props.children),
4239
+ (defaultProps = task.formatContext),
4240
+ (initialState = task.keyPath),
4241
+ (task.formatContext = getChildFormatContext(defaultProps, type, props)),
3853
4242
  (task.keyPath = keyPath),
3854
- renderNode(request, task, defaultProps, -1),
3855
- (task.formatContext = ref),
3856
- (task.keyPath = propName$31);
4243
+ renderNode(request, task, newProps, -1),
4244
+ (task.formatContext = defaultProps),
4245
+ (task.keyPath = initialState);
3857
4246
  else {
3858
- propName$31 = pushStartInstance(
3859
- defaultProps.chunks,
4247
+ initialState = pushStartInstance(
4248
+ newProps.chunks,
3860
4249
  type,
3861
4250
  props,
3862
4251
  request.resumableState,
3863
4252
  request.renderState,
3864
4253
  task.hoistableState,
3865
4254
  task.formatContext,
3866
- defaultProps.lastPushedText,
4255
+ newProps.lastPushedText,
3867
4256
  task.isFallback
3868
4257
  );
3869
- defaultProps.lastPushedText = !1;
3870
- ref = task.formatContext;
3871
- contextType = task.keyPath;
3872
- task.formatContext = getChildFormatContext(ref, type, props);
4258
+ newProps.lastPushedText = !1;
4259
+ defaultProps = task.formatContext;
4260
+ ref = task.keyPath;
4261
+ task.formatContext = getChildFormatContext(defaultProps, type, props);
3873
4262
  task.keyPath = keyPath;
3874
- renderNode(request, task, propName$31, -1);
3875
- task.formatContext = ref;
3876
- task.keyPath = contextType;
4263
+ renderNode(request, task, initialState, -1);
4264
+ task.formatContext = defaultProps;
4265
+ task.keyPath = ref;
3877
4266
  a: {
3878
- keyPath = defaultProps.chunks;
4267
+ task = newProps.chunks;
3879
4268
  request = request.resumableState;
3880
4269
  switch (type) {
3881
4270
  case "title":
@@ -3898,23 +4287,22 @@ function renderElement(request, task, keyPath, type, props, ref) {
3898
4287
  case "wbr":
3899
4288
  break a;
3900
4289
  case "body":
3901
- if (1 >= ref.insertionMode) {
4290
+ if (1 >= defaultProps.insertionMode) {
3902
4291
  request.hasBody = !0;
3903
4292
  break a;
3904
4293
  }
3905
4294
  break;
3906
4295
  case "html":
3907
- if (0 === ref.insertionMode) {
4296
+ if (0 === defaultProps.insertionMode) {
3908
4297
  request.hasHtml = !0;
3909
4298
  break a;
3910
4299
  }
3911
4300
  }
3912
- keyPath.push(endChunkForTag(type));
4301
+ task.push(endChunkForTag(type));
3913
4302
  }
3914
- defaultProps.lastPushedText = !1;
4303
+ newProps.lastPushedText = !1;
3915
4304
  }
3916
- task.componentStack = JSCompiler_inline_result;
3917
- } else {
4305
+ else {
3918
4306
  switch (type) {
3919
4307
  case REACT_LEGACY_HIDDEN_TYPE:
3920
4308
  case REACT_DEBUG_TRACING_MODE_TYPE:
@@ -3934,13 +4322,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
3934
4322
  (task.keyPath = type));
3935
4323
  return;
3936
4324
  case REACT_SUSPENSE_LIST_TYPE:
3937
- type = task.componentStack;
3938
- task.componentStack = createBuiltInComponentStack(task, "SuspenseList");
3939
- JSCompiler_inline_result = task.keyPath;
4325
+ type = task.keyPath;
3940
4326
  task.keyPath = keyPath;
3941
4327
  renderNodeDestructive(request, task, props.children, -1);
3942
- task.keyPath = JSCompiler_inline_result;
3943
- task.componentStack = type;
4328
+ task.keyPath = type;
3944
4329
  return;
3945
4330
  case REACT_SCOPE_TYPE:
3946
4331
  throw Error("ReactDOMServer does not yet support scope components.");
@@ -3955,31 +4340,26 @@ function renderElement(request, task, keyPath, type, props, ref) {
3955
4340
  task.keyPath = type;
3956
4341
  }
3957
4342
  } else {
3958
- var previousComponentStack = task.componentStack;
3959
- type = task.componentStack = createBuiltInComponentStack(
3960
- task,
3961
- "Suspense"
3962
- );
3963
- var prevKeyPath = task.keyPath;
3964
- ref = task.blockedBoundary;
3965
- var parentHoistableState = task.hoistableState,
3966
- parentSegment = task.blockedSegment;
3967
- propName$31 = props.fallback;
3968
- var content = props.children;
3969
- props = new Set();
3970
- contextType = createSuspenseBoundary(request, props);
4343
+ type = task.keyPath;
4344
+ var parentBoundary = task.blockedBoundary,
4345
+ parentHoistableState = task.hoistableState;
4346
+ ref = task.blockedSegment;
4347
+ propName$33 = props.fallback;
4348
+ props = props.children;
4349
+ var fallbackAbortSet = new Set();
4350
+ propName = createSuspenseBoundary(request, fallbackAbortSet);
3971
4351
  null !== request.trackedPostpones &&
3972
- (contextType.trackedContentKeyPath = keyPath);
3973
- propName = createPendingSegment(
4352
+ (propName.trackedContentKeyPath = keyPath);
4353
+ var boundarySegment = createPendingSegment(
3974
4354
  request,
3975
- parentSegment.chunks.length,
3976
- contextType,
4355
+ ref.chunks.length,
4356
+ propName,
3977
4357
  task.formatContext,
3978
4358
  !1,
3979
4359
  !1
3980
4360
  );
3981
- parentSegment.children.push(propName);
3982
- parentSegment.lastPushedText = !1;
4361
+ ref.children.push(boundarySegment);
4362
+ ref.lastPushedText = !1;
3983
4363
  var contentRootSegment = createPendingSegment(
3984
4364
  request,
3985
4365
  0,
@@ -3989,107 +4369,122 @@ function renderElement(request, task, keyPath, type, props, ref) {
3989
4369
  !1
3990
4370
  );
3991
4371
  contentRootSegment.parentFlushed = !0;
3992
- task.blockedBoundary = contextType;
3993
- task.hoistableState = contextType.contentState;
3994
- task.blockedSegment = contentRootSegment;
3995
- task.keyPath = keyPath;
3996
- try {
3997
- if (
3998
- (renderNode(request, task, content, -1),
3999
- contentRootSegment.lastPushedText &&
4000
- contentRootSegment.textEmbedded &&
4001
- contentRootSegment.chunks.push(textSeparator),
4002
- (contentRootSegment.status = 1),
4003
- queueCompletedSegment(contextType, contentRootSegment),
4004
- 0 === contextType.pendingTasks && 0 === contextType.status)
4005
- ) {
4006
- contextType.status = 1;
4007
- task.componentStack = previousComponentStack;
4008
- break a;
4372
+ if (null !== request.trackedPostpones) {
4373
+ newProps = [keyPath[0], "Suspense Fallback", keyPath[2]];
4374
+ defaultProps = [newProps[1], newProps[2], [], null];
4375
+ request.trackedPostpones.workingMap.set(newProps, defaultProps);
4376
+ propName.trackedFallbackNode = defaultProps;
4377
+ task.blockedSegment = boundarySegment;
4378
+ task.keyPath = newProps;
4379
+ boundarySegment.status = 6;
4380
+ try {
4381
+ renderNode(request, task, propName$33, -1),
4382
+ boundarySegment.lastPushedText &&
4383
+ boundarySegment.textEmbedded &&
4384
+ boundarySegment.chunks.push(textSeparator),
4385
+ (boundarySegment.status = 1);
4386
+ } catch (thrownValue) {
4387
+ throw (
4388
+ ((boundarySegment.status = 12 === request.status ? 3 : 4),
4389
+ thrownValue)
4390
+ );
4391
+ } finally {
4392
+ (task.blockedSegment = ref), (task.keyPath = type);
4009
4393
  }
4010
- } catch (error) {
4011
- (contentRootSegment.status = 4),
4012
- (contextType.status = 4),
4013
- (JSCompiler_inline_result = getThrownInfo(
4014
- request,
4015
- task.componentStack
4016
- )),
4017
- (defaultProps = logRecoverableError(
4018
- request,
4019
- error,
4020
- JSCompiler_inline_result
4021
- )),
4022
- (contextType.errorDigest = defaultProps),
4023
- untrackBoundary(request, contextType);
4024
- } finally {
4025
- (task.blockedBoundary = ref),
4026
- (task.hoistableState = parentHoistableState),
4027
- (task.blockedSegment = parentSegment),
4028
- (task.keyPath = prevKeyPath),
4029
- (task.componentStack = previousComponentStack);
4394
+ task = createRenderTask(
4395
+ request,
4396
+ null,
4397
+ props,
4398
+ -1,
4399
+ propName,
4400
+ contentRootSegment,
4401
+ propName.contentState,
4402
+ task.abortSet,
4403
+ keyPath,
4404
+ task.formatContext,
4405
+ task.context,
4406
+ task.treeContext,
4407
+ task.componentStack,
4408
+ task.isFallback
4409
+ );
4410
+ pushComponentStack(task);
4411
+ request.pingedTasks.push(task);
4412
+ } else {
4413
+ task.blockedBoundary = propName;
4414
+ task.hoistableState = propName.contentState;
4415
+ task.blockedSegment = contentRootSegment;
4416
+ task.keyPath = keyPath;
4417
+ contentRootSegment.status = 6;
4418
+ try {
4419
+ if (
4420
+ (renderNode(request, task, props, -1),
4421
+ contentRootSegment.lastPushedText &&
4422
+ contentRootSegment.textEmbedded &&
4423
+ contentRootSegment.chunks.push(textSeparator),
4424
+ (contentRootSegment.status = 1),
4425
+ queueCompletedSegment(propName, contentRootSegment),
4426
+ 0 === propName.pendingTasks && 0 === propName.status)
4427
+ ) {
4428
+ propName.status = 1;
4429
+ break a;
4430
+ }
4431
+ } catch (thrownValue$28) {
4432
+ (propName.status = 4),
4433
+ 12 === request.status
4434
+ ? ((contentRootSegment.status = 3),
4435
+ (newProps = request.fatalError))
4436
+ : ((contentRootSegment.status = 4),
4437
+ (newProps = thrownValue$28)),
4438
+ (defaultProps = getThrownInfo(task.componentStack)),
4439
+ (initialState = logRecoverableError(
4440
+ request,
4441
+ newProps,
4442
+ defaultProps
4443
+ )),
4444
+ (propName.errorDigest = initialState),
4445
+ untrackBoundary(request, propName);
4446
+ } finally {
4447
+ (task.blockedBoundary = parentBoundary),
4448
+ (task.hoistableState = parentHoistableState),
4449
+ (task.blockedSegment = ref),
4450
+ (task.keyPath = type);
4451
+ }
4452
+ task = createRenderTask(
4453
+ request,
4454
+ null,
4455
+ propName$33,
4456
+ -1,
4457
+ parentBoundary,
4458
+ boundarySegment,
4459
+ propName.fallbackState,
4460
+ fallbackAbortSet,
4461
+ [keyPath[0], "Suspense Fallback", keyPath[2]],
4462
+ task.formatContext,
4463
+ task.context,
4464
+ task.treeContext,
4465
+ task.componentStack,
4466
+ !0
4467
+ );
4468
+ pushComponentStack(task);
4469
+ request.pingedTasks.push(task);
4030
4470
  }
4031
- JSCompiler_inline_result = [
4032
- keyPath[0],
4033
- "Suspense Fallback",
4034
- keyPath[2]
4035
- ];
4036
- defaultProps = request.trackedPostpones;
4037
- null !== defaultProps &&
4038
- ((previousComponentStack = [
4039
- JSCompiler_inline_result[1],
4040
- JSCompiler_inline_result[2],
4041
- [],
4042
- null
4043
- ]),
4044
- defaultProps.workingMap.set(
4045
- JSCompiler_inline_result,
4046
- previousComponentStack
4047
- ),
4048
- 5 === contextType.status
4049
- ? (defaultProps.workingMap.get(keyPath)[4] =
4050
- previousComponentStack)
4051
- : (contextType.trackedFallbackNode = previousComponentStack));
4052
- task = createRenderTask(
4053
- request,
4054
- null,
4055
- propName$31,
4056
- -1,
4057
- ref,
4058
- propName,
4059
- contextType.fallbackState,
4060
- props,
4061
- JSCompiler_inline_result,
4062
- task.formatContext,
4063
- task.legacyContext,
4064
- task.context,
4065
- task.treeContext,
4066
- type,
4067
- !0
4068
- );
4069
- request.pingedTasks.push(task);
4070
4471
  }
4071
4472
  return;
4072
4473
  }
4073
4474
  if ("object" === typeof type && null !== type)
4074
4475
  switch (type.$$typeof) {
4075
4476
  case REACT_FORWARD_REF_TYPE:
4076
- JSCompiler_inline_result = task.componentStack;
4077
- task.componentStack = {
4078
- tag: 1,
4079
- parent: task.componentStack,
4080
- type: type.render
4081
- };
4082
4477
  if ("ref" in props)
4083
- for (contextType in ((defaultProps = {}), props))
4084
- "ref" !== contextType &&
4085
- (defaultProps[contextType] = props[contextType]);
4086
- else defaultProps = props;
4478
+ for (boundarySegment in ((newProps = {}), props))
4479
+ "ref" !== boundarySegment &&
4480
+ (newProps[boundarySegment] = props[boundarySegment]);
4481
+ else newProps = props;
4087
4482
  type = renderWithHooks(
4088
4483
  request,
4089
4484
  task,
4090
4485
  keyPath,
4091
4486
  type.render,
4092
- defaultProps,
4487
+ newProps,
4093
4488
  ref
4094
4489
  );
4095
4490
  finishFunctionComponent(
@@ -4101,7 +4496,6 @@ function renderElement(request, task, keyPath, type, props, ref) {
4101
4496
  actionStateCounter,
4102
4497
  actionStateMatchingIndex
4103
4498
  );
4104
- task.componentStack = JSCompiler_inline_result;
4105
4499
  return;
4106
4500
  case REACT_MEMO_TYPE:
4107
4501
  renderElement(request, task, keyPath, type.type, props, ref);
@@ -4109,16 +4503,16 @@ function renderElement(request, task, keyPath, type, props, ref) {
4109
4503
  case REACT_PROVIDER_TYPE:
4110
4504
  case REACT_CONTEXT_TYPE:
4111
4505
  defaultProps = props.children;
4112
- JSCompiler_inline_result = task.keyPath;
4506
+ newProps = task.keyPath;
4113
4507
  props = props.value;
4114
- ref = type._currentValue;
4508
+ initialState = type._currentValue;
4115
4509
  type._currentValue = props;
4116
- propName$31 = currentActiveSnapshot;
4510
+ ref = currentActiveSnapshot;
4117
4511
  currentActiveSnapshot = type = {
4118
- parent: propName$31,
4119
- depth: null === propName$31 ? 0 : propName$31.depth + 1,
4512
+ parent: ref,
4513
+ depth: null === ref ? 0 : ref.depth + 1,
4120
4514
  context: type,
4121
- parentValue: ref,
4515
+ parentValue: initialState,
4122
4516
  value: props
4123
4517
  };
4124
4518
  task.context = type;
@@ -4132,7 +4526,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4132
4526
  request.context._currentValue = request.parentValue;
4133
4527
  request = currentActiveSnapshot = request.parent;
4134
4528
  task.context = request;
4135
- task.keyPath = JSCompiler_inline_result;
4529
+ task.keyPath = newProps;
4136
4530
  return;
4137
4531
  case REACT_CONSUMER_TYPE:
4138
4532
  props = props.children;
@@ -4143,12 +4537,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4143
4537
  task.keyPath = props;
4144
4538
  return;
4145
4539
  case REACT_LAZY_TYPE:
4146
- JSCompiler_inline_result = task.componentStack;
4147
- task.componentStack = createBuiltInComponentStack(task, "Lazy");
4148
- defaultProps = type._init;
4149
- type = defaultProps(type._payload);
4150
- renderElement(request, task, keyPath, type, props, void 0);
4151
- task.componentStack = JSCompiler_inline_result;
4540
+ newProps = type._init;
4541
+ type = newProps(type._payload);
4542
+ if (12 === request.status) throw null;
4543
+ renderElement(request, task, keyPath, type, props, ref);
4152
4544
  return;
4153
4545
  }
4154
4546
  throw Error(
@@ -4184,23 +4576,29 @@ function resumeNode(request, task, segmentId, node, childIndex) {
4184
4576
  (task.replay = prevReplay), (task.blockedSegment = null);
4185
4577
  }
4186
4578
  }
4187
- function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4188
- if (null !== task.replay && "number" === typeof task.replay.slots)
4189
- resumeNode(request, task, task.replay.slots, node$jscomp$0, childIndex);
4190
- else if (
4191
- ((task.node = node$jscomp$0),
4192
- (task.childIndex = childIndex),
4193
- null !== node$jscomp$0)
4194
- ) {
4195
- if ("object" === typeof node$jscomp$0) {
4196
- switch (node$jscomp$0.$$typeof) {
4579
+ function renderNodeDestructive(request, task, node, childIndex) {
4580
+ null !== task.replay && "number" === typeof task.replay.slots
4581
+ ? resumeNode(request, task, task.replay.slots, node, childIndex)
4582
+ : ((task.node = node),
4583
+ (task.childIndex = childIndex),
4584
+ (node = task.componentStack),
4585
+ pushComponentStack(task),
4586
+ retryNode(request, task),
4587
+ (task.componentStack = node));
4588
+ }
4589
+ function retryNode(request, task) {
4590
+ var node = task.node,
4591
+ childIndex = task.childIndex;
4592
+ if (null !== node) {
4593
+ if ("object" === typeof node) {
4594
+ switch (node.$$typeof) {
4197
4595
  case REACT_ELEMENT_TYPE:
4198
- var type = node$jscomp$0.type,
4199
- key = node$jscomp$0.key,
4200
- props = node$jscomp$0.props;
4201
- node$jscomp$0 = props.ref;
4202
- var ref = void 0 !== node$jscomp$0 ? node$jscomp$0 : null;
4203
- var name = getComponentNameFromType(type),
4596
+ var type = node.type,
4597
+ key = node.key,
4598
+ props = node.props;
4599
+ node = props.ref;
4600
+ var ref = void 0 !== node ? node : null,
4601
+ name = getComponentNameFromType(type),
4204
4602
  keyOrIndex =
4205
4603
  null == key ? (-1 === childIndex ? 0 : childIndex) : key;
4206
4604
  key = [task.keyPath, name, keyOrIndex];
@@ -4208,24 +4606,20 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4208
4606
  a: {
4209
4607
  var replay = task.replay;
4210
4608
  childIndex = replay.nodes;
4211
- for (
4212
- node$jscomp$0 = 0;
4213
- node$jscomp$0 < childIndex.length;
4214
- node$jscomp$0++
4215
- ) {
4216
- var node = childIndex[node$jscomp$0];
4217
- if (keyOrIndex === node[1]) {
4218
- if (4 === node.length) {
4219
- if (null !== name && name !== node[0])
4609
+ for (node = 0; node < childIndex.length; node++) {
4610
+ var node$jscomp$0 = childIndex[node];
4611
+ if (keyOrIndex === node$jscomp$0[1]) {
4612
+ if (4 === node$jscomp$0.length) {
4613
+ if (null !== name && name !== node$jscomp$0[0])
4220
4614
  throw Error(
4221
4615
  "Expected the resume to render <" +
4222
- node[0] +
4616
+ node$jscomp$0[0] +
4223
4617
  "> in this slot but instead it rendered <" +
4224
4618
  name +
4225
4619
  ">. The tree doesn't match so React will fallback to client rendering."
4226
4620
  );
4227
- var childNodes = node[2];
4228
- name = node[3];
4621
+ var childNodes = node$jscomp$0[2];
4622
+ name = node$jscomp$0[3];
4229
4623
  keyOrIndex = task.node;
4230
4624
  task.replay = {
4231
4625
  nodes: childNodes,
@@ -4254,14 +4648,13 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4254
4648
  x)
4255
4649
  );
4256
4650
  task.replay.pendingTasks--;
4257
- props = getThrownInfo(request, task.componentStack);
4258
- key = request;
4259
- request = task.blockedBoundary;
4651
+ props = getThrownInfo(task.componentStack);
4652
+ key = task.blockedBoundary;
4260
4653
  type = x;
4261
- props = logRecoverableError(key, type, props);
4654
+ props = logRecoverableError(request, type, props);
4262
4655
  abortRemainingReplayNodes(
4263
- key,
4264
4656
  request,
4657
+ key,
4265
4658
  childNodes,
4266
4659
  name,
4267
4660
  type,
@@ -4278,15 +4671,14 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4278
4671
  );
4279
4672
  b: {
4280
4673
  replay = void 0;
4281
- type = node[5];
4282
- ref = node[2];
4283
- name = node[3];
4284
- keyOrIndex = null === node[4] ? [] : node[4][2];
4285
- node = null === node[4] ? null : node[4][3];
4286
- var previousComponentStack = task.componentStack,
4287
- suspenseComponentStack = (task.componentStack =
4288
- createBuiltInComponentStack(task, "Suspense")),
4289
- prevKeyPath = task.keyPath,
4674
+ type = node$jscomp$0[5];
4675
+ ref = node$jscomp$0[2];
4676
+ name = node$jscomp$0[3];
4677
+ keyOrIndex =
4678
+ null === node$jscomp$0[4] ? [] : node$jscomp$0[4][2];
4679
+ node$jscomp$0 =
4680
+ null === node$jscomp$0[4] ? null : node$jscomp$0[4][3];
4681
+ var prevKeyPath = task.keyPath,
4290
4682
  previousReplaySet = task.replay,
4291
4683
  parentBoundary = task.blockedBoundary,
4292
4684
  parentHoistableState = task.hoistableState,
@@ -4301,6 +4693,7 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4301
4693
  resumedBoundary.rootSegmentID = type;
4302
4694
  task.blockedBoundary = resumedBoundary;
4303
4695
  task.hoistableState = resumedBoundary.contentState;
4696
+ task.keyPath = key;
4304
4697
  task.replay = {
4305
4698
  nodes: ref,
4306
4699
  slots: name,
@@ -4326,10 +4719,7 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4326
4719
  }
4327
4720
  } catch (error) {
4328
4721
  (resumedBoundary.status = 4),
4329
- (childNodes = getThrownInfo(
4330
- request,
4331
- task.componentStack
4332
- )),
4722
+ (childNodes = getThrownInfo(task.componentStack)),
4333
4723
  (replay = logRecoverableError(
4334
4724
  request,
4335
4725
  error,
@@ -4344,13 +4734,16 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4344
4734
  (task.blockedBoundary = parentBoundary),
4345
4735
  (task.hoistableState = parentHoistableState),
4346
4736
  (task.replay = previousReplaySet),
4347
- (task.keyPath = prevKeyPath),
4348
- (task.componentStack = previousComponentStack);
4737
+ (task.keyPath = prevKeyPath);
4349
4738
  }
4350
4739
  task = createReplayTask(
4351
4740
  request,
4352
4741
  null,
4353
- { nodes: keyOrIndex, slots: node, pendingTasks: 0 },
4742
+ {
4743
+ nodes: keyOrIndex,
4744
+ slots: node$jscomp$0,
4745
+ pendingTasks: 0
4746
+ },
4354
4747
  props,
4355
4748
  -1,
4356
4749
  parentBoundary,
@@ -4358,16 +4751,16 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4358
4751
  fallbackAbortSet,
4359
4752
  [key[0], "Suspense Fallback", key[2]],
4360
4753
  task.formatContext,
4361
- task.legacyContext,
4362
4754
  task.context,
4363
4755
  task.treeContext,
4364
- suspenseComponentStack,
4756
+ task.componentStack,
4365
4757
  !0
4366
4758
  );
4759
+ pushComponentStack(task);
4367
4760
  request.pingedTasks.push(task);
4368
4761
  }
4369
4762
  }
4370
- childIndex.splice(node$jscomp$0, 1);
4763
+ childIndex.splice(node, 1);
4371
4764
  break a;
4372
4765
  }
4373
4766
  }
@@ -4379,80 +4772,68 @@ function renderNodeDestructive(request, task, node$jscomp$0, childIndex) {
4379
4772
  "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
4380
4773
  );
4381
4774
  case REACT_LAZY_TYPE:
4382
- childNodes = task.componentStack;
4383
- task.componentStack = createBuiltInComponentStack(task, "Lazy");
4384
- props = node$jscomp$0._init;
4385
- node$jscomp$0 = props(node$jscomp$0._payload);
4386
- task.componentStack = childNodes;
4387
- renderNodeDestructive(request, task, node$jscomp$0, childIndex);
4775
+ childNodes = node._init;
4776
+ node = childNodes(node._payload);
4777
+ if (12 === request.status) throw null;
4778
+ renderNodeDestructive(request, task, node, childIndex);
4388
4779
  return;
4389
4780
  }
4390
- if (isArrayImpl(node$jscomp$0)) {
4391
- renderChildrenArray(request, task, node$jscomp$0, childIndex);
4781
+ if (isArrayImpl(node)) {
4782
+ renderChildrenArray(request, task, node, childIndex);
4392
4783
  return;
4393
4784
  }
4394
- null === node$jscomp$0 || "object" !== typeof node$jscomp$0
4785
+ null === node || "object" !== typeof node
4395
4786
  ? (childNodes = null)
4396
4787
  : ((childNodes =
4397
- (MAYBE_ITERATOR_SYMBOL && node$jscomp$0[MAYBE_ITERATOR_SYMBOL]) ||
4398
- node$jscomp$0["@@iterator"]),
4788
+ (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
4789
+ node["@@iterator"]),
4399
4790
  (childNodes = "function" === typeof childNodes ? childNodes : null));
4400
- if (childNodes && (childNodes = childNodes.call(node$jscomp$0))) {
4401
- node$jscomp$0 = childNodes.next();
4402
- if (!node$jscomp$0.done) {
4791
+ if (childNodes && (childNodes = childNodes.call(node))) {
4792
+ node = childNodes.next();
4793
+ if (!node.done) {
4403
4794
  props = [];
4404
- do
4405
- props.push(node$jscomp$0.value),
4406
- (node$jscomp$0 = childNodes.next());
4407
- while (!node$jscomp$0.done);
4795
+ do props.push(node.value), (node = childNodes.next());
4796
+ while (!node.done);
4408
4797
  renderChildrenArray(request, task, props, childIndex);
4409
4798
  }
4410
4799
  return;
4411
4800
  }
4412
- if ("function" === typeof node$jscomp$0.then)
4801
+ if ("function" === typeof node.then)
4413
4802
  return (
4414
4803
  (task.thenableState = null),
4415
- renderNodeDestructive(
4416
- request,
4417
- task,
4418
- unwrapThenable(node$jscomp$0),
4419
- childIndex
4420
- )
4804
+ renderNodeDestructive(request, task, unwrapThenable(node), childIndex)
4421
4805
  );
4422
- if (node$jscomp$0.$$typeof === REACT_CONTEXT_TYPE)
4806
+ if (node.$$typeof === REACT_CONTEXT_TYPE)
4423
4807
  return renderNodeDestructive(
4424
4808
  request,
4425
4809
  task,
4426
- node$jscomp$0._currentValue,
4810
+ node._currentValue,
4427
4811
  childIndex
4428
4812
  );
4429
- childIndex = Object.prototype.toString.call(node$jscomp$0);
4813
+ childIndex = Object.prototype.toString.call(node);
4430
4814
  throw Error(
4431
4815
  "Objects are not valid as a React child (found: " +
4432
4816
  ("[object Object]" === childIndex
4433
- ? "object with keys {" + Object.keys(node$jscomp$0).join(", ") + "}"
4817
+ ? "object with keys {" + Object.keys(node).join(", ") + "}"
4434
4818
  : childIndex) +
4435
4819
  "). If you meant to render a collection of children, use an array instead."
4436
4820
  );
4437
4821
  }
4438
- if ("string" === typeof node$jscomp$0)
4822
+ if ("string" === typeof node)
4439
4823
  (childIndex = task.blockedSegment),
4440
4824
  null !== childIndex &&
4441
4825
  (childIndex.lastPushedText = pushTextInstance(
4442
4826
  childIndex.chunks,
4443
- node$jscomp$0,
4827
+ node,
4444
4828
  request.renderState,
4445
4829
  childIndex.lastPushedText
4446
4830
  ));
4447
- else if (
4448
- "number" === typeof node$jscomp$0 ||
4449
- "bigint" === typeof node$jscomp$0
4450
- )
4831
+ else if ("number" === typeof node || "bigint" === typeof node)
4451
4832
  (childIndex = task.blockedSegment),
4452
4833
  null !== childIndex &&
4453
4834
  (childIndex.lastPushedText = pushTextInstance(
4454
4835
  childIndex.chunks,
4455
- "" + node$jscomp$0,
4836
+ "" + node,
4456
4837
  request.renderState,
4457
4838
  childIndex.lastPushedText
4458
4839
  ));
@@ -4490,7 +4871,7 @@ function renderChildrenArray(request, task, children, childIndex) {
4490
4871
  )
4491
4872
  throw x;
4492
4873
  task.replay.pendingTasks--;
4493
- children = getThrownInfo(request, task.componentStack);
4874
+ children = getThrownInfo(task.componentStack);
4494
4875
  var boundary = task.blockedBoundary,
4495
4876
  error = x;
4496
4877
  children = logRecoverableError(request, error, children);
@@ -4545,9 +4926,55 @@ function untrackBoundary(request, boundary) {
4545
4926
  void 0 !== boundary &&
4546
4927
  ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
4547
4928
  }
4929
+ function spawnNewSuspendedReplayTask(request, task, thenableState) {
4930
+ return createReplayTask(
4931
+ request,
4932
+ thenableState,
4933
+ task.replay,
4934
+ task.node,
4935
+ task.childIndex,
4936
+ task.blockedBoundary,
4937
+ task.hoistableState,
4938
+ task.abortSet,
4939
+ task.keyPath,
4940
+ task.formatContext,
4941
+ task.context,
4942
+ task.treeContext,
4943
+ task.componentStack,
4944
+ task.isFallback
4945
+ );
4946
+ }
4947
+ function spawnNewSuspendedRenderTask(request, task, thenableState) {
4948
+ var segment = task.blockedSegment,
4949
+ newSegment = createPendingSegment(
4950
+ request,
4951
+ segment.chunks.length,
4952
+ null,
4953
+ task.formatContext,
4954
+ segment.lastPushedText,
4955
+ !0
4956
+ );
4957
+ segment.children.push(newSegment);
4958
+ segment.lastPushedText = !1;
4959
+ return createRenderTask(
4960
+ request,
4961
+ thenableState,
4962
+ task.node,
4963
+ task.childIndex,
4964
+ task.blockedBoundary,
4965
+ newSegment,
4966
+ task.hoistableState,
4967
+ task.abortSet,
4968
+ task.keyPath,
4969
+ task.formatContext,
4970
+ task.context,
4971
+ task.treeContext,
4972
+ task.componentStack,
4973
+ task.isFallback
4974
+ );
4975
+ }
4548
4976
  function renderNode(request, task, node, childIndex) {
4549
4977
  var previousFormatContext = task.formatContext,
4550
- previousLegacyContext = task.legacyContext,
4551
4978
  previousContext = task.context,
4552
4979
  previousKeyPath = task.keyPath,
4553
4980
  previousTreeContext = task.treeContext,
@@ -4563,37 +4990,32 @@ function renderNode(request, task, node, childIndex) {
4563
4990
  thrownValue === SuspenseException
4564
4991
  ? getSuspendedThenable()
4565
4992
  : thrownValue),
4566
- "object" === typeof node &&
4567
- null !== node &&
4568
- "function" === typeof node.then)
4993
+ "object" === typeof node && null !== node)
4569
4994
  ) {
4570
- childIndex = getThenableStateAfterSuspending();
4571
- request = createReplayTask(
4572
- request,
4573
- childIndex,
4574
- task.replay,
4575
- task.node,
4576
- task.childIndex,
4577
- task.blockedBoundary,
4578
- task.hoistableState,
4579
- task.abortSet,
4580
- task.keyPath,
4581
- task.formatContext,
4582
- task.legacyContext,
4583
- task.context,
4584
- task.treeContext,
4585
- null !== task.componentStack ? task.componentStack.parent : null,
4586
- task.isFallback
4587
- ).ping;
4588
- node.then(request, request);
4589
- task.formatContext = previousFormatContext;
4590
- task.legacyContext = previousLegacyContext;
4591
- task.context = previousContext;
4592
- task.keyPath = previousKeyPath;
4593
- task.treeContext = previousTreeContext;
4594
- task.componentStack = previousComponentStack;
4595
- switchContext(previousContext);
4596
- return;
4995
+ if ("function" === typeof node.then) {
4996
+ childIndex = getThenableStateAfterSuspending();
4997
+ request = spawnNewSuspendedReplayTask(request, task, childIndex).ping;
4998
+ node.then(request, request);
4999
+ task.formatContext = previousFormatContext;
5000
+ task.context = previousContext;
5001
+ task.keyPath = previousKeyPath;
5002
+ task.treeContext = previousTreeContext;
5003
+ task.componentStack = previousComponentStack;
5004
+ switchContext(previousContext);
5005
+ return;
5006
+ }
5007
+ if ("Maximum call stack size exceeded" === node.message) {
5008
+ node = getThenableStateAfterSuspending();
5009
+ node = spawnNewSuspendedReplayTask(request, task, node);
5010
+ request.pingedTasks.push(node);
5011
+ task.formatContext = previousFormatContext;
5012
+ task.context = previousContext;
5013
+ task.keyPath = previousKeyPath;
5014
+ task.treeContext = previousTreeContext;
5015
+ task.componentStack = previousComponentStack;
5016
+ switchContext(previousContext);
5017
+ return;
5018
+ }
4597
5019
  }
4598
5020
  }
4599
5021
  else {
@@ -4601,62 +5023,45 @@ function renderNode(request, task, node, childIndex) {
4601
5023
  chunkLength = segment.chunks.length;
4602
5024
  try {
4603
5025
  return renderNodeDestructive(request, task, node, childIndex);
4604
- } catch (thrownValue$40) {
5026
+ } catch (thrownValue$48) {
4605
5027
  if (
4606
5028
  (resetHooksState(),
4607
5029
  (segment.children.length = childrenLength),
4608
5030
  (segment.chunks.length = chunkLength),
4609
5031
  (node =
4610
- thrownValue$40 === SuspenseException
5032
+ thrownValue$48 === SuspenseException
4611
5033
  ? getSuspendedThenable()
4612
- : thrownValue$40),
4613
- "object" === typeof node &&
4614
- null !== node &&
4615
- "function" === typeof node.then)
5034
+ : thrownValue$48),
5035
+ "object" === typeof node && null !== node)
4616
5036
  ) {
4617
- childIndex = getThenableStateAfterSuspending();
4618
- segment = task.blockedSegment;
4619
- childrenLength = createPendingSegment(
4620
- request,
4621
- segment.chunks.length,
4622
- null,
4623
- task.formatContext,
4624
- segment.lastPushedText,
4625
- !0
4626
- );
4627
- segment.children.push(childrenLength);
4628
- segment.lastPushedText = !1;
4629
- request = createRenderTask(
4630
- request,
4631
- childIndex,
4632
- task.node,
4633
- task.childIndex,
4634
- task.blockedBoundary,
4635
- childrenLength,
4636
- task.hoistableState,
4637
- task.abortSet,
4638
- task.keyPath,
4639
- task.formatContext,
4640
- task.legacyContext,
4641
- task.context,
4642
- task.treeContext,
4643
- null !== task.componentStack ? task.componentStack.parent : null,
4644
- task.isFallback
4645
- ).ping;
4646
- node.then(request, request);
4647
- task.formatContext = previousFormatContext;
4648
- task.legacyContext = previousLegacyContext;
4649
- task.context = previousContext;
4650
- task.keyPath = previousKeyPath;
4651
- task.treeContext = previousTreeContext;
4652
- task.componentStack = previousComponentStack;
4653
- switchContext(previousContext);
4654
- return;
5037
+ if ("function" === typeof node.then) {
5038
+ childIndex = getThenableStateAfterSuspending();
5039
+ request = spawnNewSuspendedRenderTask(request, task, childIndex).ping;
5040
+ node.then(request, request);
5041
+ task.formatContext = previousFormatContext;
5042
+ task.context = previousContext;
5043
+ task.keyPath = previousKeyPath;
5044
+ task.treeContext = previousTreeContext;
5045
+ task.componentStack = previousComponentStack;
5046
+ switchContext(previousContext);
5047
+ return;
5048
+ }
5049
+ if ("Maximum call stack size exceeded" === node.message) {
5050
+ node = getThenableStateAfterSuspending();
5051
+ node = spawnNewSuspendedRenderTask(request, task, node);
5052
+ request.pingedTasks.push(node);
5053
+ task.formatContext = previousFormatContext;
5054
+ task.context = previousContext;
5055
+ task.keyPath = previousKeyPath;
5056
+ task.treeContext = previousTreeContext;
5057
+ task.componentStack = previousComponentStack;
5058
+ switchContext(previousContext);
5059
+ return;
5060
+ }
4655
5061
  }
4656
5062
  }
4657
5063
  }
4658
5064
  task.formatContext = previousFormatContext;
4659
- task.legacyContext = previousLegacyContext;
4660
5065
  task.context = previousContext;
4661
5066
  task.keyPath = previousKeyPath;
4662
5067
  task.treeContext = previousTreeContext;
@@ -4717,26 +5122,30 @@ function abortRemainingReplayNodes(
4717
5122
  function abortTask(task, request, error) {
4718
5123
  var boundary = task.blockedBoundary,
4719
5124
  segment = task.blockedSegment;
4720
- null !== segment && (segment.status = 3);
5125
+ if (null !== segment) {
5126
+ if (6 === segment.status) return;
5127
+ segment.status = 3;
5128
+ }
5129
+ segment = getThrownInfo(task.componentStack);
4721
5130
  if (null === boundary) {
4722
- if (((boundary = {}), 1 !== request.status && 2 !== request.status)) {
4723
- task = task.replay;
4724
- if (null === task) {
4725
- logRecoverableError(request, error, boundary);
5131
+ if (13 !== request.status && 14 !== request.status) {
5132
+ boundary = task.replay;
5133
+ if (null === boundary) {
5134
+ logRecoverableError(request, error, segment);
4726
5135
  fatalError(request, error);
4727
5136
  return;
4728
5137
  }
4729
- task.pendingTasks--;
4730
- 0 === task.pendingTasks &&
4731
- 0 < task.nodes.length &&
4732
- ((boundary = logRecoverableError(request, error, boundary)),
5138
+ boundary.pendingTasks--;
5139
+ 0 === boundary.pendingTasks &&
5140
+ 0 < boundary.nodes.length &&
5141
+ ((task = logRecoverableError(request, error, segment)),
4733
5142
  abortRemainingReplayNodes(
4734
5143
  request,
4735
5144
  null,
4736
- task.nodes,
4737
- task.slots,
5145
+ boundary.nodes,
5146
+ boundary.slots,
4738
5147
  error,
4739
- boundary
5148
+ task
4740
5149
  ));
4741
5150
  request.pendingRootTasks--;
4742
5151
  0 === request.pendingRootTasks && completeShell(request);
@@ -4745,8 +5154,8 @@ function abortTask(task, request, error) {
4745
5154
  boundary.pendingTasks--,
4746
5155
  4 !== boundary.status &&
4747
5156
  ((boundary.status = 4),
4748
- (task = getThrownInfo(request, task.componentStack)),
4749
- (task = logRecoverableError(request, error, task)),
5157
+ (task = logRecoverableError(request, error, segment)),
5158
+ (boundary.status = 4),
4750
5159
  (boundary.errorDigest = task),
4751
5160
  untrackBoundary(request, boundary),
4752
5161
  boundary.parentFlushed &&
@@ -4800,7 +5209,7 @@ function safelyEmitEarlyPreloads(request, shellComplete) {
4800
5209
  referrerPolicy: props$jscomp$0.referrerPolicy,
4801
5210
  media: props$jscomp$0.media
4802
5211
  });
4803
- if (2 <= (headers.remainingCapacity -= header.length))
5212
+ if (0 <= (headers.remainingCapacity -= header.length + 2))
4804
5213
  (renderState.resets.style[key] = PRELOAD_NO_CREDS),
4805
5214
  linkHeader && (linkHeader += ", "),
4806
5215
  (linkHeader += header),
@@ -4885,7 +5294,7 @@ function finishedTask(request, boundary, segment) {
4885
5294
  0 === request.allPendingTasks && completeAll(request);
4886
5295
  }
4887
5296
  function performWork(request$jscomp$2) {
4888
- if (2 !== request$jscomp$2.status) {
5297
+ if (14 !== request$jscomp$2.status && 13 !== request$jscomp$2.status) {
4889
5298
  var prevContext = currentActiveSnapshot,
4890
5299
  prevDispatcher = ReactSharedInternals.H;
4891
5300
  ReactSharedInternals.H = HooksDispatcher;
@@ -4907,12 +5316,15 @@ function performWork(request$jscomp$2) {
4907
5316
  if (0 !== task.replay.pendingTasks) {
4908
5317
  switchContext(task.context);
4909
5318
  try {
4910
- renderNodeDestructive(
4911
- request$jscomp$0,
4912
- task,
4913
- task.node,
4914
- task.childIndex
4915
- );
5319
+ "number" === typeof task.replay.slots
5320
+ ? resumeNode(
5321
+ request$jscomp$0,
5322
+ task,
5323
+ task.replay.slots,
5324
+ task.node,
5325
+ task.childIndex
5326
+ )
5327
+ : retryNode(request$jscomp$0, task);
4916
5328
  if (
4917
5329
  1 === task.replay.pendingTasks &&
4918
5330
  0 < task.replay.nodes.length
@@ -4937,19 +5349,17 @@ function performWork(request$jscomp$2) {
4937
5349
  var ping = task.ping;
4938
5350
  x.then(ping, ping);
4939
5351
  task.thenableState = getThenableStateAfterSuspending();
4940
- null !== task.componentStack &&
4941
- (task.componentStack = task.componentStack.parent);
4942
5352
  } else {
4943
5353
  task.replay.pendingTasks--;
4944
5354
  task.abortSet.delete(task);
4945
- var errorInfo = getThrownInfo(
4946
- request$jscomp$0,
4947
- task.componentStack
4948
- );
5355
+ var errorInfo = getThrownInfo(task.componentStack);
4949
5356
  request = void 0;
4950
5357
  var request$jscomp$1 = request$jscomp$0,
4951
5358
  boundary = task.blockedBoundary,
4952
- error$jscomp$0 = x,
5359
+ error$jscomp$0 =
5360
+ 12 === request$jscomp$0.status
5361
+ ? request$jscomp$0.fatalError
5362
+ : x,
4953
5363
  replayNodes = task.replay.nodes,
4954
5364
  resumeSlots = task.replay.slots;
4955
5365
  request = logRecoverableError(
@@ -4980,11 +5390,12 @@ function performWork(request$jscomp$2) {
4980
5390
  (request$jscomp$1 = segment),
4981
5391
  0 === request$jscomp$1.status)
4982
5392
  ) {
5393
+ request$jscomp$1.status = 6;
4983
5394
  switchContext(task.context);
4984
5395
  var childrenLength = request$jscomp$1.children.length,
4985
5396
  chunkLength = request$jscomp$1.chunks.length;
4986
5397
  try {
4987
- renderNodeDestructive(request, task, task.node, task.childIndex),
5398
+ retryNode(request, task),
4988
5399
  request$jscomp$1.lastPushedText &&
4989
5400
  request$jscomp$1.textEmbedded &&
4990
5401
  request$jscomp$1.chunks.push(textSeparator),
@@ -4998,22 +5409,20 @@ function performWork(request$jscomp$2) {
4998
5409
  var x$jscomp$0 =
4999
5410
  thrownValue === SuspenseException
5000
5411
  ? getSuspendedThenable()
5001
- : thrownValue;
5412
+ : 12 === request.status
5413
+ ? request.fatalError
5414
+ : thrownValue;
5002
5415
  if (
5003
5416
  "object" === typeof x$jscomp$0 &&
5004
5417
  null !== x$jscomp$0 &&
5005
5418
  "function" === typeof x$jscomp$0.then
5006
5419
  ) {
5420
+ request$jscomp$1.status = 0;
5421
+ task.thenableState = getThenableStateAfterSuspending();
5007
5422
  var ping$jscomp$0 = task.ping;
5008
5423
  x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
5009
- task.thenableState = getThenableStateAfterSuspending();
5010
- null !== task.componentStack &&
5011
- (task.componentStack = task.componentStack.parent);
5012
5424
  } else {
5013
- var errorInfo$jscomp$0 = getThrownInfo(
5014
- request,
5015
- task.componentStack
5016
- );
5425
+ var errorInfo$jscomp$0 = getThrownInfo(task.componentStack);
5017
5426
  task.abortSet.delete(task);
5018
5427
  request$jscomp$1.status = 4;
5019
5428
  var boundary$jscomp$0 = task.blockedBoundary;
@@ -5193,13 +5602,13 @@ function flushCompletedBoundary(request, destination, boundary) {
5193
5602
  ? ((completedSegments.instructions |= 10),
5194
5603
  writeChunk(destination, completeBoundaryWithStylesScript1FullBoth))
5195
5604
  : 0 === (completedSegments.instructions & 8)
5196
- ? ((completedSegments.instructions |= 8),
5197
- writeChunk(destination, completeBoundaryWithStylesScript1FullPartial))
5198
- : writeChunk(destination, completeBoundaryWithStylesScript1Partial)
5605
+ ? ((completedSegments.instructions |= 8),
5606
+ writeChunk(destination, completeBoundaryWithStylesScript1FullPartial))
5607
+ : writeChunk(destination, completeBoundaryWithStylesScript1Partial)
5199
5608
  : 0 === (completedSegments.instructions & 2)
5200
- ? ((completedSegments.instructions |= 2),
5201
- writeChunk(destination, completeBoundaryScript1Full))
5202
- : writeChunk(destination, completeBoundaryScript1Partial);
5609
+ ? ((completedSegments.instructions |= 2),
5610
+ writeChunk(destination, completeBoundaryScript1Full))
5611
+ : writeChunk(destination, completeBoundaryScript1Partial);
5203
5612
  completedSegments = i.toString(16);
5204
5613
  writeChunk(destination, request.boundaryPrefix);
5205
5614
  writeChunk(destination, completedSegments);
@@ -5398,11 +5807,11 @@ function flushCompletedQueues(request, destination) {
5398
5807
  destinationHasCapacity$1 = !0;
5399
5808
  var partialBoundaries = request.partialBoundaries;
5400
5809
  for (i = 0; i < partialBoundaries.length; i++) {
5401
- var boundary$44 = partialBoundaries[i];
5810
+ var boundary$51 = partialBoundaries[i];
5402
5811
  a: {
5403
5812
  clientRenderedBoundaries = request;
5404
5813
  boundary = destination;
5405
- var completedSegments = boundary$44.completedSegments;
5814
+ var completedSegments = boundary$51.completedSegments;
5406
5815
  for (
5407
5816
  JSCompiler_inline_result = 0;
5408
5817
  JSCompiler_inline_result < completedSegments.length;
@@ -5412,7 +5821,7 @@ function flushCompletedQueues(request, destination) {
5412
5821
  !flushPartiallyCompletedSegment(
5413
5822
  clientRenderedBoundaries,
5414
5823
  boundary,
5415
- boundary$44,
5824
+ boundary$51,
5416
5825
  completedSegments[JSCompiler_inline_result]
5417
5826
  )
5418
5827
  ) {
@@ -5424,7 +5833,7 @@ function flushCompletedQueues(request, destination) {
5424
5833
  completedSegments.splice(0, JSCompiler_inline_result);
5425
5834
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
5426
5835
  boundary,
5427
- boundary$44.contentState,
5836
+ boundary$51.contentState,
5428
5837
  clientRenderedBoundaries.renderState
5429
5838
  );
5430
5839
  }
@@ -5457,6 +5866,7 @@ function flushCompletedQueues(request, destination) {
5457
5866
  i.hasHtml && writeChunk(destination, endChunkForTag("html")),
5458
5867
  completeWriting(destination),
5459
5868
  flushBuffered(destination),
5869
+ (request.status = 14),
5460
5870
  destination.end(),
5461
5871
  (request.destination = null))
5462
5872
  : (completeWriting(destination), flushBuffered(destination));
@@ -5464,17 +5874,18 @@ function flushCompletedQueues(request, destination) {
5464
5874
  }
5465
5875
  function startWork(request) {
5466
5876
  request.flushScheduled = null !== request.destination;
5467
- setImmediate(function () {
5877
+ scheduleMicrotask(function () {
5468
5878
  return requestStorage.run(request, performWork, request);
5469
5879
  });
5470
- null === request.trackedPostpones &&
5471
- setImmediate(function () {
5472
- return requestStorage.run(
5880
+ setImmediate(function () {
5881
+ 10 === request.status && (request.status = 11);
5882
+ null === request.trackedPostpones &&
5883
+ requestStorage.run(
5473
5884
  request,
5474
5885
  enqueueEarlyPreloadsAfterInitialWork,
5475
5886
  request
5476
5887
  );
5477
- });
5888
+ });
5478
5889
  }
5479
5890
  function enqueueEarlyPreloadsAfterInitialWork(request) {
5480
5891
  safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);
@@ -5492,9 +5903,9 @@ function enqueueFlush(request) {
5492
5903
  }));
5493
5904
  }
5494
5905
  function startFlowing(request, destination) {
5495
- if (1 === request.status)
5496
- (request.status = 2), destination.destroy(request.fatalError);
5497
- else if (2 !== request.status && null === request.destination) {
5906
+ if (13 === request.status)
5907
+ (request.status = 14), destination.destroy(request.fatalError);
5908
+ else if (14 !== request.status && null === request.destination) {
5498
5909
  request.destination = destination;
5499
5910
  try {
5500
5911
  flushCompletedQueues(request, destination);
@@ -5504,13 +5915,19 @@ function startFlowing(request, destination) {
5504
5915
  }
5505
5916
  }
5506
5917
  function abort(request, reason) {
5918
+ if (11 === request.status || 10 === request.status) request.status = 12;
5507
5919
  try {
5508
5920
  var abortableTasks = request.abortableTasks;
5509
5921
  if (0 < abortableTasks.size) {
5510
5922
  var error =
5511
5923
  void 0 === reason
5512
5924
  ? Error("The render was aborted by the server without a reason.")
5513
- : reason;
5925
+ : "object" === typeof reason &&
5926
+ null !== reason &&
5927
+ "function" === typeof reason.then
5928
+ ? Error("The render was aborted by the server with a promise.")
5929
+ : reason;
5930
+ request.fatalError = error;
5514
5931
  abortableTasks.forEach(function (task) {
5515
5932
  return abortTask(task, request, error);
5516
5933
  });
@@ -5518,20 +5935,20 @@ function abort(request, reason) {
5518
5935
  }
5519
5936
  null !== request.destination &&
5520
5937
  flushCompletedQueues(request, request.destination);
5521
- } catch (error$46) {
5522
- logRecoverableError(request, error$46, {}), fatalError(request, error$46);
5938
+ } catch (error$53) {
5939
+ logRecoverableError(request, error$53, {}), fatalError(request, error$53);
5523
5940
  }
5524
5941
  }
5525
- var isomorphicReactPackageVersion$jscomp$inline_751 = React.version;
5526
- if (
5527
- "19.0.0-rc-fb9a90fa48-20240614" !==
5528
- isomorphicReactPackageVersion$jscomp$inline_751
5529
- )
5530
- throw Error(
5531
- 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
5532
- (isomorphicReactPackageVersion$jscomp$inline_751 +
5533
- "\n - react-dom: 19.0.0-rc-fb9a90fa48-20240614\nLearn more: https://react.dev/warnings/version-mismatch")
5534
- );
5942
+ function ensureCorrectIsomorphicReactVersion() {
5943
+ var isomorphicReactPackageVersion = React.version;
5944
+ if ("19.0.0" !== isomorphicReactPackageVersion)
5945
+ throw Error(
5946
+ 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
5947
+ (isomorphicReactPackageVersion +
5948
+ "\n - react-dom: 19.0.0\nLearn more: https://react.dev/warnings/version-mismatch")
5949
+ );
5950
+ }
5951
+ ensureCorrectIsomorphicReactVersion();
5535
5952
  function createDrainHandler(destination, request) {
5536
5953
  return function () {
5537
5954
  return startFlowing(request, destination);
@@ -5544,218 +5961,25 @@ function createCancelHandler(request, reason) {
5544
5961
  };
5545
5962
  }
5546
5963
  function createRequestImpl(children, options) {
5547
- var JSCompiler_inline_result = options ? options.identifierPrefix : void 0;
5548
- JSCompiler_inline_result = {
5549
- idPrefix:
5550
- void 0 === JSCompiler_inline_result ? "" : JSCompiler_inline_result,
5551
- nextFormID: 0,
5552
- streamingFormat: 0,
5553
- bootstrapScriptContent: options ? options.bootstrapScriptContent : void 0,
5554
- bootstrapScripts: options ? options.bootstrapScripts : void 0,
5555
- bootstrapModules: options ? options.bootstrapModules : void 0,
5556
- instructions: 0,
5557
- hasBody: !1,
5558
- hasHtml: !1,
5559
- unknownResources: {},
5560
- dnsResources: {},
5561
- connectResources: { default: {}, anonymous: {}, credentials: {} },
5562
- imageResources: {},
5563
- styleResources: {},
5564
- scriptResources: {},
5565
- moduleUnknownResources: {},
5566
- moduleScriptResources: {}
5567
- };
5568
- var nonce = options ? options.nonce : void 0,
5569
- importMap = options ? options.importMap : void 0,
5570
- onHeaders = options ? options.onHeaders : void 0,
5571
- maxHeadersLength = options ? options.maxHeadersLength : void 0,
5572
- inlineScriptWithNonce =
5573
- void 0 === nonce
5574
- ? startInlineScript
5575
- : stringToPrecomputedChunk(
5576
- '<script nonce="' + escapeTextForBrowser(nonce) + '">'
5577
- ),
5578
- idPrefix = JSCompiler_inline_result.idPrefix,
5579
- bootstrapChunks = [],
5580
- bootstrapScriptContent = JSCompiler_inline_result.bootstrapScriptContent,
5581
- bootstrapScripts = JSCompiler_inline_result.bootstrapScripts,
5582
- bootstrapModules = JSCompiler_inline_result.bootstrapModules;
5583
- void 0 !== bootstrapScriptContent &&
5584
- bootstrapChunks.push(
5585
- inlineScriptWithNonce,
5586
- ("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer),
5587
- endInlineScript
5588
- );
5589
- bootstrapScriptContent = [];
5590
- void 0 !== importMap &&
5591
- (bootstrapScriptContent.push(importMapScriptStart),
5592
- bootstrapScriptContent.push(
5593
- ("" + JSON.stringify(importMap)).replace(scriptRegex, scriptReplacer)
5594
- ),
5595
- bootstrapScriptContent.push(importMapScriptEnd));
5596
- importMap = onHeaders
5597
- ? {
5598
- preconnects: "",
5599
- fontPreloads: "",
5600
- highImagePreloads: "",
5601
- remainingCapacity:
5602
- "number" === typeof maxHeadersLength ? maxHeadersLength : 2e3
5603
- }
5604
- : null;
5605
- onHeaders = {
5606
- placeholderPrefix: stringToPrecomputedChunk(idPrefix + "P:"),
5607
- segmentPrefix: stringToPrecomputedChunk(idPrefix + "S:"),
5608
- boundaryPrefix: stringToPrecomputedChunk(idPrefix + "B:"),
5609
- startInlineScript: inlineScriptWithNonce,
5610
- htmlChunks: null,
5611
- headChunks: null,
5612
- externalRuntimeScript: null,
5613
- bootstrapChunks: bootstrapChunks,
5614
- importMapChunks: bootstrapScriptContent,
5615
- onHeaders: onHeaders,
5616
- headers: importMap,
5617
- resets: {
5618
- font: {},
5619
- dns: {},
5620
- connect: { default: {}, anonymous: {}, credentials: {} },
5621
- image: {},
5622
- style: {}
5623
- },
5624
- charsetChunks: [],
5625
- viewportChunks: [],
5626
- hoistableChunks: [],
5627
- preconnects: new Set(),
5628
- fontPreloads: new Set(),
5629
- highImagePreloads: new Set(),
5630
- styles: new Map(),
5631
- bootstrapScripts: new Set(),
5632
- scripts: new Set(),
5633
- bulkPreloads: new Set(),
5634
- preloads: {
5635
- images: new Map(),
5636
- stylesheets: new Map(),
5637
- scripts: new Map(),
5638
- moduleScripts: new Map()
5639
- },
5640
- nonce: nonce,
5641
- hoistableState: null,
5642
- stylesToHoist: !1
5643
- };
5644
- if (void 0 !== bootstrapScripts)
5645
- for (
5646
- inlineScriptWithNonce = 0;
5647
- inlineScriptWithNonce < bootstrapScripts.length;
5648
- inlineScriptWithNonce++
5649
- ) {
5650
- var scriptConfig = bootstrapScripts[inlineScriptWithNonce];
5651
- maxHeadersLength = importMap = void 0;
5652
- bootstrapScriptContent = {
5653
- rel: "preload",
5654
- as: "script",
5655
- fetchPriority: "low",
5656
- nonce: nonce
5657
- };
5658
- "string" === typeof scriptConfig
5659
- ? (bootstrapScriptContent.href = idPrefix = scriptConfig)
5660
- : ((bootstrapScriptContent.href = idPrefix = scriptConfig.src),
5661
- (bootstrapScriptContent.integrity = maxHeadersLength =
5662
- "string" === typeof scriptConfig.integrity
5663
- ? scriptConfig.integrity
5664
- : void 0),
5665
- (bootstrapScriptContent.crossOrigin = importMap =
5666
- "string" === typeof scriptConfig || null == scriptConfig.crossOrigin
5667
- ? void 0
5668
- : "use-credentials" === scriptConfig.crossOrigin
5669
- ? "use-credentials"
5670
- : ""));
5671
- scriptConfig = JSCompiler_inline_result;
5672
- var href = idPrefix;
5673
- scriptConfig.scriptResources[href] = null;
5674
- scriptConfig.moduleScriptResources[href] = null;
5675
- scriptConfig = [];
5676
- pushLinkImpl(scriptConfig, bootstrapScriptContent);
5677
- onHeaders.bootstrapScripts.add(scriptConfig);
5678
- bootstrapChunks.push(startScriptSrc, escapeTextForBrowser(idPrefix));
5679
- nonce && bootstrapChunks.push(scriptNonce, escapeTextForBrowser(nonce));
5680
- "string" === typeof maxHeadersLength &&
5681
- bootstrapChunks.push(
5682
- scriptIntegirty,
5683
- escapeTextForBrowser(maxHeadersLength)
5684
- );
5685
- "string" === typeof importMap &&
5686
- bootstrapChunks.push(
5687
- scriptCrossOrigin,
5688
- escapeTextForBrowser(importMap)
5689
- );
5690
- bootstrapChunks.push(endAsyncScript);
5691
- }
5692
- if (void 0 !== bootstrapModules)
5693
- for (
5694
- bootstrapScripts = 0;
5695
- bootstrapScripts < bootstrapModules.length;
5696
- bootstrapScripts++
5697
- )
5698
- (bootstrapScriptContent = bootstrapModules[bootstrapScripts]),
5699
- (importMap = idPrefix = void 0),
5700
- (maxHeadersLength = {
5701
- rel: "modulepreload",
5702
- fetchPriority: "low",
5703
- nonce: nonce
5704
- }),
5705
- "string" === typeof bootstrapScriptContent
5706
- ? (maxHeadersLength.href = inlineScriptWithNonce =
5707
- bootstrapScriptContent)
5708
- : ((maxHeadersLength.href = inlineScriptWithNonce =
5709
- bootstrapScriptContent.src),
5710
- (maxHeadersLength.integrity = importMap =
5711
- "string" === typeof bootstrapScriptContent.integrity
5712
- ? bootstrapScriptContent.integrity
5713
- : void 0),
5714
- (maxHeadersLength.crossOrigin = idPrefix =
5715
- "string" === typeof bootstrapScriptContent ||
5716
- null == bootstrapScriptContent.crossOrigin
5717
- ? void 0
5718
- : "use-credentials" === bootstrapScriptContent.crossOrigin
5719
- ? "use-credentials"
5720
- : "")),
5721
- (bootstrapScriptContent = JSCompiler_inline_result),
5722
- (scriptConfig = inlineScriptWithNonce),
5723
- (bootstrapScriptContent.scriptResources[scriptConfig] = null),
5724
- (bootstrapScriptContent.moduleScriptResources[scriptConfig] = null),
5725
- (bootstrapScriptContent = []),
5726
- pushLinkImpl(bootstrapScriptContent, maxHeadersLength),
5727
- onHeaders.bootstrapScripts.add(bootstrapScriptContent),
5728
- bootstrapChunks.push(
5729
- startModuleSrc,
5730
- escapeTextForBrowser(inlineScriptWithNonce)
5731
- ),
5732
- nonce && bootstrapChunks.push(scriptNonce, escapeTextForBrowser(nonce)),
5733
- "string" === typeof importMap &&
5734
- bootstrapChunks.push(
5735
- scriptIntegirty,
5736
- escapeTextForBrowser(importMap)
5737
- ),
5738
- "string" === typeof idPrefix &&
5739
- bootstrapChunks.push(
5740
- scriptCrossOrigin,
5741
- escapeTextForBrowser(idPrefix)
5742
- ),
5743
- bootstrapChunks.push(endAsyncScript);
5744
- nonce = options ? options.namespaceURI : void 0;
5745
- nonce = createFormatContext(
5746
- "http://www.w3.org/2000/svg" === nonce
5747
- ? 3
5748
- : "http://www.w3.org/1998/Math/MathML" === nonce
5749
- ? 4
5750
- : 0,
5751
- null,
5752
- 0
5964
+ var resumableState = createResumableState(
5965
+ options ? options.identifierPrefix : void 0,
5966
+ options ? options.unstable_externalRuntimeSrc : void 0,
5967
+ options ? options.bootstrapScriptContent : void 0,
5968
+ options ? options.bootstrapScripts : void 0,
5969
+ options ? options.bootstrapModules : void 0
5753
5970
  );
5754
- return new RequestInstance(
5971
+ return createRequest(
5755
5972
  children,
5756
- JSCompiler_inline_result,
5757
- onHeaders,
5758
- nonce,
5973
+ resumableState,
5974
+ createRenderState(
5975
+ resumableState,
5976
+ options ? options.nonce : void 0,
5977
+ options ? options.unstable_externalRuntimeSrc : void 0,
5978
+ options ? options.importMap : void 0,
5979
+ options ? options.onHeaders : void 0,
5980
+ options ? options.maxHeadersLength : void 0
5981
+ ),
5982
+ createRootFormatContext(options ? options.namespaceURI : void 0),
5759
5983
  options ? options.progressiveChunkSize : void 0,
5760
5984
  options ? options.onError : void 0,
5761
5985
  options ? options.onAllReady : void 0,
@@ -5766,6 +5990,71 @@ function createRequestImpl(children, options) {
5766
5990
  options ? options.formState : void 0
5767
5991
  );
5768
5992
  }
5993
+ ensureCorrectIsomorphicReactVersion();
5994
+ function createFakeWritable(readable) {
5995
+ return {
5996
+ write: function (chunk) {
5997
+ return readable.push(chunk);
5998
+ },
5999
+ end: function () {
6000
+ readable.push(null);
6001
+ },
6002
+ destroy: function (error) {
6003
+ readable.destroy(error);
6004
+ }
6005
+ };
6006
+ }
6007
+ exports.prerenderToNodeStream = function (children, options) {
6008
+ return new Promise(function (resolve, reject) {
6009
+ var resumableState = createResumableState(
6010
+ options ? options.identifierPrefix : void 0,
6011
+ options ? options.unstable_externalRuntimeSrc : void 0,
6012
+ options ? options.bootstrapScriptContent : void 0,
6013
+ options ? options.bootstrapScripts : void 0,
6014
+ options ? options.bootstrapModules : void 0
6015
+ ),
6016
+ request = createPrerenderRequest(
6017
+ children,
6018
+ resumableState,
6019
+ createRenderState(
6020
+ resumableState,
6021
+ void 0,
6022
+ options ? options.unstable_externalRuntimeSrc : void 0,
6023
+ options ? options.importMap : void 0,
6024
+ options ? options.onHeaders : void 0,
6025
+ options ? options.maxHeadersLength : void 0
6026
+ ),
6027
+ createRootFormatContext(options ? options.namespaceURI : void 0),
6028
+ options ? options.progressiveChunkSize : void 0,
6029
+ options ? options.onError : void 0,
6030
+ function () {
6031
+ var readable = new stream.Readable({
6032
+ read: function () {
6033
+ startFlowing(request, writable);
6034
+ }
6035
+ }),
6036
+ writable = createFakeWritable(readable);
6037
+ resolve({ prelude: readable });
6038
+ },
6039
+ void 0,
6040
+ void 0,
6041
+ reject,
6042
+ options ? options.onPostpone : void 0
6043
+ );
6044
+ if (options && options.signal) {
6045
+ var signal = options.signal;
6046
+ if (signal.aborted) abort(request, signal.reason);
6047
+ else {
6048
+ var listener = function () {
6049
+ abort(request, signal.reason);
6050
+ signal.removeEventListener("abort", listener);
6051
+ };
6052
+ signal.addEventListener("abort", listener);
6053
+ }
6054
+ }
6055
+ startWork(request);
6056
+ });
6057
+ };
5769
6058
  exports.renderToPipeableStream = function (children, options) {
5770
6059
  var request = createRequestImpl(children, options),
5771
6060
  hasStartedFlowing = !1;
@@ -5782,8 +6071,8 @@ exports.renderToPipeableStream = function (children, options) {
5782
6071
  null === request.trackedPostpones
5783
6072
  ? 0 === request.pendingRootTasks
5784
6073
  : null === request.completedRootSegment
5785
- ? 0 === request.pendingRootTasks
5786
- : 5 !== request.completedRootSegment.status
6074
+ ? 0 === request.pendingRootTasks
6075
+ : 5 !== request.completedRootSegment.status
5787
6076
  );
5788
6077
  startFlowing(request, destination);
5789
6078
  destination.on("drain", createDrainHandler(destination, request));
@@ -5805,4 +6094,4 @@ exports.renderToPipeableStream = function (children, options) {
5805
6094
  }
5806
6095
  };
5807
6096
  };
5808
- exports.version = "19.0.0-rc-fb9a90fa48-20240614";
6097
+ exports.version = "19.0.0";