failproofai 1.0.5 → 1.0.6-beta.0

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 (186) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +5 -5
  3. package/.next/standalone/.next/prerender-manifest.json +5 -5
  4. package/.next/standalone/.next/required-server-files.json +1 -1
  5. package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +2 -2
  6. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  7. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  8. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
  11. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +6 -6
  12. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  13. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +2 -2
  15. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  16. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  19. package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
  20. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
  21. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +13 -13
  22. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  23. package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/audit/page/build-manifest.json +2 -2
  32. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
  33. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  35. package/.next/standalone/.next/server/app/index.html +1 -1
  36. package/.next/standalone/.next/server/app/index.rsc +14 -14
  37. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +13 -13
  38. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
  39. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  40. package/.next/standalone/.next/server/app/page/build-manifest.json +2 -2
  41. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  42. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/policies/page/build-manifest.json +2 -2
  45. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +14 -14
  46. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +2 -2
  49. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  50. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  52. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +2 -2
  53. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  54. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  55. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +1 -1
  56. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  58. package/.next/standalone/.next/server/app/projects/page/build-manifest.json +2 -2
  59. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  60. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  61. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  62. package/.next/standalone/.next/server/app/settings/page/build-manifest.json +2 -2
  63. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +4 -4
  64. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  65. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/chunks/[externals]__0sds_16._.js +3 -0
  67. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +1 -1
  68. package/.next/standalone/.next/server/chunks/_09dz7xv._.js +3 -3
  69. package/.next/standalone/.next/server/chunks/_0tovk6q._.js +1 -1
  70. package/.next/standalone/.next/server/chunks/_0trp3yc._.js +1 -1
  71. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_01r25oi._.js +2 -2
  72. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_09z9-p7._.js +2 -2
  73. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
  74. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__013jr2b._.js +2 -2
  75. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01wy8d-._.js +2 -2
  76. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02npjtd._.js +2 -2
  77. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0da85px._.js +2 -2
  78. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ftmoxc._.js +2 -2
  79. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oa1lav._.js +1 -1
  80. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p-5p8u._.js +2 -2
  81. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s740oi._.js +2 -2
  82. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__15k-dqb._.js → [root-of-the-server]__1i26dsw._.js} +2 -2
  83. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0sz_5na._.js → [root-of-the-server]__1ouobn4._.js} +1 -1
  84. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1p2otjt._.js +2 -2
  85. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1qapotl._.js +1 -1
  86. package/.next/standalone/.next/server/chunks/ssr/_0-yi74u._.js +1 -1
  87. package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
  88. package/.next/standalone/.next/server/chunks/ssr/{_1b78kcp._.js → _09hs6ms._.js} +1 -1
  89. package/.next/standalone/.next/server/chunks/ssr/{_0guaevg._.js → _0lbwa8m._.js} +2 -2
  90. package/.next/standalone/.next/server/chunks/ssr/_0wso5d3._.js +1 -1
  91. package/.next/standalone/.next/server/chunks/ssr/_1-3unkg._.js +1 -1
  92. package/.next/standalone/.next/server/chunks/ssr/_1ddpc5g._.js +1 -1
  93. package/.next/standalone/.next/server/chunks/ssr/_1es2j7i._.js +3 -3
  94. package/.next/standalone/.next/server/chunks/ssr/_1u8-lu2._.js +1 -1
  95. package/.next/standalone/.next/server/chunks/ssr/_1zopuov._.js +1 -1
  96. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo.js +3 -3
  97. package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +1 -1
  98. package/.next/standalone/.next/server/chunks/ssr/app_components_project-list_tsx_1ke6anr._.js +1 -1
  99. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
  100. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +2 -2
  101. package/.next/standalone/.next/server/chunks/ssr/app_settings_settings-client_tsx_20lq-mq._.js +1 -1
  102. package/.next/standalone/.next/server/chunks/ssr/node_modules_1hl81y4._.js +3 -0
  103. package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuzn._.js +2 -2
  104. package/.next/standalone/.next/server/middleware-build-manifest.js +5 -5
  105. package/.next/standalone/.next/server/pages/404.html +1 -1
  106. package/.next/standalone/.next/server/pages/500.html +1 -1
  107. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/server-reference-manifest.json +19 -19
  109. package/.next/standalone/.next/static/chunks/{3w46euc60dx39.js → 03n_qjih7-w6q.js} +1 -1
  110. package/.next/standalone/.next/static/chunks/{2zafgs90r_leq.js → 06jxjnw8bfczc.js} +1 -1
  111. package/.next/standalone/.next/static/chunks/{252xreaecy80h.js → 0vanab2g65op_.js} +1 -1
  112. package/.next/standalone/.next/static/chunks/17pjz_h45j10c.js +1 -0
  113. package/.next/standalone/.next/static/chunks/1ekh-hj_iom84.js +1 -0
  114. package/.next/standalone/.next/static/chunks/{021ydrq6rhpsi.js → 1so_3s0q4c4j1.js} +1 -1
  115. package/.next/standalone/.next/static/chunks/1xacnwjkbekn7.js +1 -0
  116. package/.next/standalone/.next/static/chunks/2hg_bp8z_vm2g.js +1 -0
  117. package/.next/standalone/.next/static/chunks/{3bleyy40s99f2.js → 2u0kol_boahtv.js} +1 -1
  118. package/.next/standalone/.next/static/chunks/{1vb33xa6j9y2q.js → 3_vesf83-0903.js} +1 -1
  119. package/.next/standalone/.next/static/chunks/3d3hzhcnns6ww.js +1 -0
  120. package/.next/standalone/.next/static/chunks/3iasus89n8mg1.js +6 -0
  121. package/.next/standalone/.next/static/chunks/{11s_v03ub6nss.js → 44_cj1_i_aa2z.js} +1 -1
  122. package/.next/standalone/.next/static/chunks/{turbopack-3p73obe0xmrxm.js → turbopack-38nzuvp95_2rv.js} +1 -1
  123. package/.next/standalone/fp-cloud-cli/uv.lock +3 -3
  124. package/.next/standalone/hermes-plugin/README.md +133 -0
  125. package/.next/standalone/hermes-plugin/__init__.py +248 -0
  126. package/.next/standalone/hermes-plugin/client.py +134 -0
  127. package/.next/standalone/hermes-plugin/ledger.py +187 -0
  128. package/.next/standalone/hermes-plugin/plugin.yaml +37 -0
  129. package/.next/standalone/node_modules/@next/env/package.json +1 -1
  130. package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
  131. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +1 -1
  132. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +1 -1
  133. package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  134. package/.next/standalone/node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js +2 -1
  135. package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
  136. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
  137. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  138. package/.next/standalone/node_modules/next/dist/server/image-optimizer.js +14 -0
  139. package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  140. package/.next/standalone/node_modules/next/dist/server/lib/disk-lru-cache.external.js +7 -1
  141. package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
  142. package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +6 -1
  143. package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  144. package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  145. package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
  146. package/.next/standalone/node_modules/next/package.json +10 -10
  147. package/.next/standalone/node_modules/react/cjs/react.development.js +92 -46
  148. package/.next/standalone/node_modules/react/cjs/react.production.js +112 -89
  149. package/.next/standalone/node_modules/react/package.json +1 -1
  150. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +1165 -790
  151. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +1171 -791
  152. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.browser.production.js +1294 -862
  153. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.edge.production.js +1305 -868
  154. package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.node.production.js +1315 -896
  155. package/.next/standalone/node_modules/react-dom/cjs/react-dom.production.js +24 -5
  156. package/.next/standalone/node_modules/react-dom/package.json +4 -4
  157. package/.next/standalone/package.json +13 -12
  158. package/.next/standalone/sdk/python/uv.lock +18 -18
  159. package/.next/standalone/server.js +1 -1
  160. package/README.md +29 -13
  161. package/bin/failproofai.mjs +3 -1
  162. package/dist/cli.mjs +420 -178
  163. package/dist/worker.mjs +17 -3
  164. package/hermes-plugin/README.md +133 -0
  165. package/hermes-plugin/__init__.py +248 -0
  166. package/hermes-plugin/client.py +134 -0
  167. package/hermes-plugin/ledger.py +187 -0
  168. package/hermes-plugin/plugin.yaml +37 -0
  169. package/package.json +13 -12
  170. package/scripts/translate-docs/validate-translation.ts +48 -0
  171. package/src/hooks/handler.ts +29 -1
  172. package/src/hooks/integrations.ts +264 -73
  173. package/src/hooks/manager.ts +17 -5
  174. package/src/hooks/types.ts +8 -8
  175. package/src/hooks/worker-server.ts +1 -0
  176. package/.next/standalone/.next/server/chunks/[externals]__157pf8j._.js +0 -3
  177. package/.next/standalone/.next/server/chunks/ssr/node_modules_13n822a._.js +0 -3
  178. package/.next/standalone/.next/static/chunks/0y8_1s45gbqmn.js +0 -6
  179. package/.next/standalone/.next/static/chunks/14b3ezufe5411.js +0 -1
  180. package/.next/standalone/.next/static/chunks/1oskk7pdo8aon.js +0 -1
  181. package/.next/standalone/.next/static/chunks/2xycd6mjg00fb.js +0 -1
  182. package/.next/standalone/.next/static/chunks/3l36d73kj18zw.js +0 -1
  183. package/.next/standalone/.next/static/chunks/40lpt2o2b283e.js +0 -1
  184. /package/.next/standalone/.next/static/{uFpAs_vIXSo6qBzmkXPWD → -7OT2NwGPxAu-skEL_Xee}/_buildManifest.js +0 -0
  185. /package/.next/standalone/.next/static/{uFpAs_vIXSo6qBzmkXPWD → -7OT2NwGPxAu-skEL_Xee}/_clientMiddlewareManifest.js +0 -0
  186. /package/.next/standalone/.next/static/{uFpAs_vIXSo6qBzmkXPWD → -7OT2NwGPxAu-skEL_Xee}/_ssgManifest.js +0 -0
@@ -52,6 +52,7 @@ var React = require("react"),
52
52
  REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
53
53
  REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"),
54
54
  REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
55
+ REACT_RECOVERABLE_TYPE = Symbol.for("react.recoverable"),
55
56
  MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
56
57
  function getIteratorFn(maybeIterable) {
57
58
  if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
@@ -60,7 +61,8 @@ function getIteratorFn(maybeIterable) {
60
61
  maybeIterable["@@iterator"];
61
62
  return "function" === typeof maybeIterable ? maybeIterable : null;
62
63
  }
63
- var isArrayImpl = Array.isArray;
64
+ var REACT_OPTIMISTIC_KEY = Symbol.for("react.optimistic_key"),
65
+ isArrayImpl = Array.isArray;
64
66
  function murmurhash3_32_gc(key, seed) {
65
67
  var remainder = key.length & 3;
66
68
  var bytes = key.length - remainder;
@@ -175,6 +177,7 @@ var unitlessNumbers = new Set(
175
177
  ["markerEnd", "marker-end"],
176
178
  ["markerMid", "marker-mid"],
177
179
  ["markerStart", "marker-start"],
180
+ ["maskType", "mask-type"],
178
181
  ["overlinePosition", "overline-position"],
179
182
  ["overlineThickness", "overline-thickness"],
180
183
  ["paintOrder", "paint-order"],
@@ -374,7 +377,8 @@ function getChildFormatContext(parentContext, type, props) {
374
377
  }
375
378
  return 6 <= parentContext.insertionMode || 2 > parentContext.insertionMode
376
379
  ? createFormatContext(2, null, subtreeScope, null)
377
- : parentContext.tagScope !== subtreeScope
380
+ : null !== parentContext.viewTransition ||
381
+ parentContext.tagScope !== subtreeScope
378
382
  ? createFormatContext(
379
383
  parentContext.insertionMode,
380
384
  parentContext.selectedValue,
@@ -391,6 +395,8 @@ function getSuspenseViewTransition(parentViewTransition) {
391
395
  enter: "none",
392
396
  exit: "none",
393
397
  share: parentViewTransition.update,
398
+ parentEnter: "none",
399
+ parentExit: "none",
394
400
  name: parentViewTransition.autoName,
395
401
  autoName: parentViewTransition.autoName,
396
402
  nameIdx: 0
@@ -418,6 +424,31 @@ function getSuspenseContentFormatContext(resumableState, parentContext) {
418
424
  resumableState
419
425
  );
420
426
  }
427
+ function makeId(resumableState, treeId, localId) {
428
+ resumableState = "_" + resumableState.idPrefix + "R_" + treeId;
429
+ 0 < localId && (resumableState += "H" + localId.toString(32));
430
+ return resumableState + "_";
431
+ }
432
+ function pushViewTransitionAttributes(target, formatContext) {
433
+ formatContext = formatContext.viewTransition;
434
+ null !== formatContext &&
435
+ ("auto" !== formatContext.name &&
436
+ (pushStringAttribute(
437
+ target,
438
+ "vt-name",
439
+ 0 === formatContext.nameIdx
440
+ ? formatContext.name
441
+ : formatContext.name + "_" + formatContext.nameIdx
442
+ ),
443
+ formatContext.nameIdx++),
444
+ pushStringAttribute(target, "vt-update", formatContext.update),
445
+ "none" !== formatContext.enter &&
446
+ pushStringAttribute(target, "vt-enter", formatContext.enter),
447
+ "none" !== formatContext.exit &&
448
+ pushStringAttribute(target, "vt-exit", formatContext.exit),
449
+ "none" !== formatContext.share &&
450
+ pushStringAttribute(target, "vt-share", formatContext.share));
451
+ }
421
452
  var styleNameCache = new Map();
422
453
  function pushStyleAttribute(target, style) {
423
454
  if ("object" !== typeof style)
@@ -610,6 +641,7 @@ function pushAttribute(target, name, value) {
610
641
  case "async":
611
642
  case "autoPlay":
612
643
  case "controls":
644
+ case "credentialless":
613
645
  case "default":
614
646
  case "defer":
615
647
  case "disabled":
@@ -736,13 +768,13 @@ function injectFormReplayingRuntime(resumableState, renderState) {
736
768
  pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
737
769
  bootstrapChunks.push(
738
770
  ">",
739
- 'addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error(\'React form unexpectedly submitted.\')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});',
771
+ 'addEventListener("submit",function(a){if(!a.defaultPrevented){var b=a.target,d=a.submitter,c=b.action,e=d;if(d){var f=d.getAttribute("formAction");null!=f&&(c=f,e=null)}"javascript:throw new Error(\'React form unexpectedly submitted.\')"===c&&(a.preventDefault(),a=new FormData(b,e),c=b.ownerDocument||b,(c.$$reactFormReplay=c.$$reactFormReplay||[]).push(b,d,a))}});',
740
772
  "\x3c/script>"
741
773
  ))
742
774
  : bootstrapChunks.unshift(
743
775
  renderState.startInlineScript,
744
776
  ">",
745
- 'addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error(\'React form unexpectedly submitted.\')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});',
777
+ 'addEventListener("submit",function(a){if(!a.defaultPrevented){var b=a.target,d=a.submitter,c=b.action,e=d;if(d){var f=d.getAttribute("formAction");null!=f&&(c=f,e=null)}"javascript:throw new Error(\'React form unexpectedly submitted.\')"===c&&(a.preventDefault(),a=new FormData(b,e),c=b.ownerDocument||b,(c.$$reactFormReplay=c.$$reactFormReplay||[]).push(b,d,a))}});',
746
778
  "\x3c/script>"
747
779
  );
748
780
  }
@@ -770,7 +802,7 @@ var styleRegex = /(<\/|<)(s)(tyle)/gi;
770
802
  function styleReplacer(match, prefix, s, suffix) {
771
803
  return "" + prefix + ("s" === s ? "\\73 " : "\\53 ") + suffix;
772
804
  }
773
- function pushSelfClosing(target, props, tag) {
805
+ function pushSelfClosing(target, props, tag, formatContext) {
774
806
  target.push(startChunkForTag(tag));
775
807
  for (var propKey in props)
776
808
  if (hasOwnProperty.call(props, propKey)) {
@@ -787,6 +819,7 @@ function pushSelfClosing(target, props, tag) {
787
819
  pushAttribute(target, propKey, propValue);
788
820
  }
789
821
  }
822
+ pushViewTransitionAttributes(target, formatContext);
790
823
  target.push("/>");
791
824
  return null;
792
825
  }
@@ -852,7 +885,7 @@ function pushScriptImpl(target, props) {
852
885
  target.push(endChunkForTag("script"));
853
886
  return null;
854
887
  }
855
- function pushStartSingletonElement(target, props, tag) {
888
+ function pushStartSingletonElement(target, props, tag, formatContext) {
856
889
  target.push(startChunkForTag(tag));
857
890
  var innerHTML = (tag = null),
858
891
  propKey;
@@ -871,11 +904,12 @@ function pushStartSingletonElement(target, props, tag) {
871
904
  pushAttribute(target, propKey, propValue);
872
905
  }
873
906
  }
907
+ pushViewTransitionAttributes(target, formatContext);
874
908
  target.push(">");
875
909
  pushInnerHTML(target, innerHTML, tag);
876
910
  return tag;
877
911
  }
878
- function pushStartGenericElement(target, props, tag) {
912
+ function pushStartGenericElement(target, props, tag, formatContext) {
879
913
  target.push(startChunkForTag(tag));
880
914
  var innerHTML = (tag = null),
881
915
  propKey;
@@ -894,6 +928,7 @@ function pushStartGenericElement(target, props, tag) {
894
928
  pushAttribute(target, propKey, propValue);
895
929
  }
896
930
  }
931
+ pushViewTransitionAttributes(target, formatContext);
897
932
  target.push(">");
898
933
  pushInnerHTML(target, innerHTML, tag);
899
934
  return "string" === typeof tag
@@ -953,6 +988,7 @@ function pushStartInstance(
953
988
  pushAttribute(target$jscomp$0, propKey, propValue);
954
989
  }
955
990
  }
991
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
956
992
  target$jscomp$0.push(">");
957
993
  pushInnerHTML(target$jscomp$0, innerHTML, children);
958
994
  if ("string" === typeof children) {
@@ -991,6 +1027,7 @@ function pushStartInstance(
991
1027
  );
992
1028
  }
993
1029
  }
1030
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
994
1031
  target$jscomp$0.push(">");
995
1032
  pushInnerHTML(target$jscomp$0, innerHTML$jscomp$0, children$jscomp$0);
996
1033
  return children$jscomp$0;
@@ -1080,6 +1117,7 @@ function pushStartInstance(
1080
1117
  null === value$jscomp$0 &&
1081
1118
  null !== defaultValue &&
1082
1119
  (value$jscomp$0 = defaultValue);
1120
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
1083
1121
  target$jscomp$0.push(">");
1084
1122
  if (null != children$jscomp$2) {
1085
1123
  if (null != value$jscomp$0)
@@ -1174,6 +1212,7 @@ function pushStartInstance(
1174
1212
  ? pushAttribute(target$jscomp$0, "value", value$jscomp$1)
1175
1213
  : null !== defaultValue$jscomp$0 &&
1176
1214
  pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0);
1215
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
1177
1216
  target$jscomp$0.push("/>");
1178
1217
  null != formData &&
1179
1218
  formData.forEach(pushAdditionalFormField, target$jscomp$0);
@@ -1232,6 +1271,7 @@ function pushStartInstance(
1232
1271
  formTarget$jscomp$0,
1233
1272
  name$jscomp$0
1234
1273
  );
1274
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
1235
1275
  target$jscomp$0.push(">");
1236
1276
  null != formData$jscomp$0 &&
1237
1277
  formData$jscomp$0.forEach(pushAdditionalFormField, target$jscomp$0);
@@ -1317,6 +1357,7 @@ function pushStartInstance(
1317
1357
  pushAttribute(target$jscomp$0, "method", formMethod$jscomp$1);
1318
1358
  null != formTarget$jscomp$1 &&
1319
1359
  pushAttribute(target$jscomp$0, "target", formTarget$jscomp$1);
1360
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
1320
1361
  target$jscomp$0.push(">");
1321
1362
  null !== formActionName &&
1322
1363
  (target$jscomp$0.push('<input type="hidden"'),
@@ -1350,6 +1391,7 @@ function pushStartInstance(
1350
1391
  );
1351
1392
  }
1352
1393
  }
1394
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
1353
1395
  target$jscomp$0.push(">");
1354
1396
  return null;
1355
1397
  case "object":
@@ -1387,6 +1429,7 @@ function pushStartInstance(
1387
1429
  );
1388
1430
  }
1389
1431
  }
1432
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
1390
1433
  target$jscomp$0.push(">");
1391
1434
  pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
1392
1435
  if ("string" === typeof children$jscomp$5) {
@@ -1658,17 +1701,33 @@ function pushStartInstance(
1658
1701
  var JSCompiler_inline_result$jscomp$7 = pushSelfClosing(
1659
1702
  target$jscomp$0,
1660
1703
  props,
1661
- "meta"
1704
+ "meta",
1705
+ formatContext
1662
1706
  );
1663
1707
  else
1664
1708
  textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
1665
1709
  (JSCompiler_inline_result$jscomp$7 = isFallback$jscomp$1
1666
1710
  ? null
1667
1711
  : "string" === typeof props.charSet
1668
- ? pushSelfClosing(renderState.charsetChunks, props, "meta")
1712
+ ? pushSelfClosing(
1713
+ renderState.charsetChunks,
1714
+ props,
1715
+ "meta",
1716
+ formatContext
1717
+ )
1669
1718
  : "viewport" === props.name
1670
- ? pushSelfClosing(renderState.viewportChunks, props, "meta")
1671
- : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
1719
+ ? pushSelfClosing(
1720
+ renderState.viewportChunks,
1721
+ props,
1722
+ "meta",
1723
+ formatContext
1724
+ )
1725
+ : pushSelfClosing(
1726
+ renderState.hoistableChunks,
1727
+ props,
1728
+ "meta",
1729
+ formatContext
1730
+ ));
1672
1731
  return JSCompiler_inline_result$jscomp$7;
1673
1732
  case "listing":
1674
1733
  case "pre":
@@ -1695,6 +1754,7 @@ function pushStartInstance(
1695
1754
  );
1696
1755
  }
1697
1756
  }
1757
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
1698
1758
  target$jscomp$0.push(">");
1699
1759
  if (null != innerHTML$jscomp$7) {
1700
1760
  if (null != children$jscomp$8)
@@ -1785,7 +1845,7 @@ function pushStartInstance(
1785
1845
  nonce: props.nonce,
1786
1846
  type: props.type,
1787
1847
  fetchPriority: props.fetchPriority,
1788
- referrerPolicy: props.refererPolicy
1848
+ referrerPolicy: props.referrerPolicy
1789
1849
  })),
1790
1850
  0 <= (headers.remainingCapacity -= header.length + 2))
1791
1851
  ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),
@@ -1811,7 +1871,7 @@ function pushStartInstance(
1811
1871
  promotablePreloads.set(key$jscomp$0, resource$jscomp$1)));
1812
1872
  }
1813
1873
  }
1814
- return pushSelfClosing(target$jscomp$0, props, "img");
1874
+ return pushSelfClosing(target$jscomp$0, props, "img", formatContext);
1815
1875
  case "base":
1816
1876
  case "area":
1817
1877
  case "br":
@@ -1823,7 +1883,7 @@ function pushStartInstance(
1823
1883
  case "source":
1824
1884
  case "track":
1825
1885
  case "wbr":
1826
- return pushSelfClosing(target$jscomp$0, props, type);
1886
+ return pushSelfClosing(target$jscomp$0, props, type, formatContext);
1827
1887
  case "annotation-xml":
1828
1888
  case "color-profile":
1829
1889
  case "font-face":
@@ -1843,13 +1903,15 @@ function pushStartInstance(
1843
1903
  var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(
1844
1904
  preamble.headChunks,
1845
1905
  props,
1846
- "head"
1906
+ "head",
1907
+ formatContext
1847
1908
  );
1848
1909
  } else
1849
1910
  JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
1850
1911
  target$jscomp$0,
1851
1912
  props,
1852
- "head"
1913
+ "head",
1914
+ formatContext
1853
1915
  );
1854
1916
  return JSCompiler_inline_result$jscomp$9;
1855
1917
  case "body":
@@ -1862,13 +1924,15 @@ function pushStartInstance(
1862
1924
  var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(
1863
1925
  preamble$jscomp$0.bodyChunks,
1864
1926
  props,
1865
- "body"
1927
+ "body",
1928
+ formatContext
1866
1929
  );
1867
1930
  } else
1868
1931
  JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
1869
1932
  target$jscomp$0,
1870
1933
  props,
1871
- "body"
1934
+ "body",
1935
+ formatContext
1872
1936
  );
1873
1937
  return JSCompiler_inline_result$jscomp$10;
1874
1938
  case "html":
@@ -1881,13 +1945,15 @@ function pushStartInstance(
1881
1945
  var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(
1882
1946
  preamble$jscomp$1.htmlChunks,
1883
1947
  props,
1884
- "html"
1948
+ "html",
1949
+ formatContext
1885
1950
  );
1886
1951
  } else
1887
1952
  JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(
1888
1953
  target$jscomp$0,
1889
1954
  props,
1890
- "html"
1955
+ "html",
1956
+ formatContext
1891
1957
  );
1892
1958
  return JSCompiler_inline_result$jscomp$11;
1893
1959
  default:
@@ -1937,12 +2003,13 @@ function pushStartInstance(
1937
2003
  }
1938
2004
  }
1939
2005
  }
2006
+ pushViewTransitionAttributes(target$jscomp$0, formatContext);
1940
2007
  target$jscomp$0.push(">");
1941
2008
  pushInnerHTML(target$jscomp$0, innerHTML$jscomp$8, children$jscomp$9);
1942
2009
  return children$jscomp$9;
1943
2010
  }
1944
2011
  }
1945
- return pushStartGenericElement(target$jscomp$0, props, type);
2012
+ return pushStartGenericElement(target$jscomp$0, props, type, formatContext);
1946
2013
  }
1947
2014
  var endTagCache = new Map();
1948
2015
  function endChunkForTag(tag) {
@@ -2555,7 +2622,7 @@ function preloadModule(href, options) {
2555
2622
  break;
2556
2623
  default:
2557
2624
  if (resumableState.moduleUnknownResources.hasOwnProperty(as)) {
2558
- var resources = resumableState.unknownResources[as];
2625
+ var resources = resumableState.moduleUnknownResources[as];
2559
2626
  if (resources.hasOwnProperty(href)) return;
2560
2627
  } else
2561
2628
  (resources = {}),
@@ -2752,16 +2819,16 @@ function createRenderState(resumableState, generateStaticMarkup) {
2752
2819
  "\x3c/script>"
2753
2820
  ));
2754
2821
  bootstrapScriptContent = idPrefix + "P:";
2755
- var JSCompiler_object_inline_segmentPrefix_1673 = idPrefix + "S:";
2822
+ var JSCompiler_object_inline_segmentPrefix_1724 = idPrefix + "S:";
2756
2823
  idPrefix += "B:";
2757
- var JSCompiler_object_inline_preconnects_1687 = new Set(),
2758
- JSCompiler_object_inline_fontPreloads_1688 = new Set(),
2759
- JSCompiler_object_inline_highImagePreloads_1689 = new Set(),
2760
- JSCompiler_object_inline_styles_1690 = new Map(),
2761
- JSCompiler_object_inline_bootstrapScripts_1691 = new Set(),
2762
- JSCompiler_object_inline_scripts_1692 = new Set(),
2763
- JSCompiler_object_inline_bulkPreloads_1693 = new Set(),
2764
- JSCompiler_object_inline_preloads_1694 = {
2824
+ var JSCompiler_object_inline_preconnects_1738 = new Set(),
2825
+ JSCompiler_object_inline_fontPreloads_1739 = new Set(),
2826
+ JSCompiler_object_inline_highImagePreloads_1740 = new Set(),
2827
+ JSCompiler_object_inline_styles_1741 = new Map(),
2828
+ JSCompiler_object_inline_bootstrapScripts_1742 = new Set(),
2829
+ JSCompiler_object_inline_scripts_1743 = new Set(),
2830
+ JSCompiler_object_inline_bulkPreloads_1744 = new Set(),
2831
+ JSCompiler_object_inline_preloads_1745 = {
2765
2832
  images: new Map(),
2766
2833
  stylesheets: new Map(),
2767
2834
  scripts: new Map(),
@@ -2798,7 +2865,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
2798
2865
  scriptConfig.moduleScriptResources[href] = null;
2799
2866
  scriptConfig = [];
2800
2867
  pushLinkImpl(scriptConfig, props);
2801
- JSCompiler_object_inline_bootstrapScripts_1691.add(scriptConfig);
2868
+ JSCompiler_object_inline_bootstrapScripts_1742.add(scriptConfig);
2802
2869
  bootstrapChunks.push('<script src="', escapeTextForBrowser(src), '"');
2803
2870
  "string" === typeof integrity &&
2804
2871
  bootstrapChunks.push(
@@ -2845,7 +2912,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
2845
2912
  (props.moduleScriptResources[scriptConfig] = null),
2846
2913
  (props = []),
2847
2914
  pushLinkImpl(props, integrity),
2848
- JSCompiler_object_inline_bootstrapScripts_1691.add(props),
2915
+ JSCompiler_object_inline_bootstrapScripts_1742.add(props),
2849
2916
  bootstrapChunks.push(
2850
2917
  '<script type="module" src="',
2851
2918
  escapeTextForBrowser(i),
@@ -2867,7 +2934,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
2867
2934
  bootstrapChunks.push(' async="">\x3c/script>');
2868
2935
  return {
2869
2936
  placeholderPrefix: bootstrapScriptContent,
2870
- segmentPrefix: JSCompiler_object_inline_segmentPrefix_1673,
2937
+ segmentPrefix: JSCompiler_object_inline_segmentPrefix_1724,
2871
2938
  boundaryPrefix: idPrefix,
2872
2939
  startInlineScript: "<script",
2873
2940
  startInlineStyle: "<style",
@@ -2887,14 +2954,14 @@ function createRenderState(resumableState, generateStaticMarkup) {
2887
2954
  charsetChunks: [],
2888
2955
  viewportChunks: [],
2889
2956
  hoistableChunks: [],
2890
- preconnects: JSCompiler_object_inline_preconnects_1687,
2891
- fontPreloads: JSCompiler_object_inline_fontPreloads_1688,
2892
- highImagePreloads: JSCompiler_object_inline_highImagePreloads_1689,
2893
- styles: JSCompiler_object_inline_styles_1690,
2894
- bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1691,
2895
- scripts: JSCompiler_object_inline_scripts_1692,
2896
- bulkPreloads: JSCompiler_object_inline_bulkPreloads_1693,
2897
- preloads: JSCompiler_object_inline_preloads_1694,
2957
+ preconnects: JSCompiler_object_inline_preconnects_1738,
2958
+ fontPreloads: JSCompiler_object_inline_fontPreloads_1739,
2959
+ highImagePreloads: JSCompiler_object_inline_highImagePreloads_1740,
2960
+ styles: JSCompiler_object_inline_styles_1741,
2961
+ bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1742,
2962
+ scripts: JSCompiler_object_inline_scripts_1743,
2963
+ bulkPreloads: JSCompiler_object_inline_bulkPreloads_1744,
2964
+ preloads: JSCompiler_object_inline_preloads_1745,
2898
2965
  nonce: { script: void 0, style: void 0 },
2899
2966
  stylesToHoist: !1,
2900
2967
  generateStaticMarkup: generateStaticMarkup
@@ -2936,6 +3003,8 @@ function getComponentNameFromType(type) {
2936
3003
  return "SuspenseList";
2937
3004
  case REACT_ACTIVITY_TYPE:
2938
3005
  return "Activity";
3006
+ case REACT_VIEW_TRANSITION_TYPE:
3007
+ return "ViewTransition";
2939
3008
  }
2940
3009
  if ("object" === typeof type)
2941
3010
  switch (type.$$typeof) {
@@ -3049,6 +3118,11 @@ var classComponentUpdater = {
3049
3118
  enqueueForceUpdate: function () {}
3050
3119
  },
3051
3120
  emptyTreeContext = { id: 1, overflow: "" };
3121
+ function getTreeId(context) {
3122
+ var overflow = context.overflow;
3123
+ context = context.id;
3124
+ return (context & ~(1 << (32 - clz32(context) - 1))).toString(32) + overflow;
3125
+ }
3052
3126
  function pushTreeContext(baseContext, totalChildren, index) {
3053
3127
  var baseIdWithLeadingBit = baseContext.id;
3054
3128
  baseContext = baseContext.overflow;
@@ -3097,7 +3171,12 @@ function trackUsedThenable(thenableState, thenable, index) {
3097
3171
  case "fulfilled":
3098
3172
  return thenable.value;
3099
3173
  case "rejected":
3100
- throw thenable.reason;
3174
+ thenableState = thenable.reason;
3175
+ if (void 0 === thenableState && !("reason" in thenable))
3176
+ throw Error(
3177
+ "A rejected Promise was passed to React without a `reason` property. React threw a generic error from where the Promise was used to assist in identifying the problematic Promise. Make sure that instrumented Promises correctly set the `reason` property when setting `status` to `'rejected'`."
3178
+ );
3179
+ throw thenableState;
3101
3180
  default:
3102
3181
  "string" === typeof thenable.status
3103
3182
  ? thenable.then(noop, noop)
@@ -3155,8 +3234,50 @@ var objectIs = "function" === typeof Object.is ? Object.is : is,
3155
3234
  actionStateCounter = 0,
3156
3235
  actionStateMatchingIndex = -1,
3157
3236
  thenableIndexCounter = 0,
3158
- thenableState = null,
3159
- renderPhaseUpdates = null,
3237
+ thenableState = null;
3238
+ function createRecoverableError(recoverable) {
3239
+ recoverable = recoverable._reason;
3240
+ if ("function" === typeof recoverable)
3241
+ try {
3242
+ var initializedReason = recoverable();
3243
+ } catch ($jscomp$unused$catch) {
3244
+ initializedReason =
3245
+ "The reason for browser-only rendering could not be determined because its initializer threw.";
3246
+ }
3247
+ else initializedReason = recoverable;
3248
+ initializedReason = Error(
3249
+ "Browser-only rendering was requested by `browser()`.",
3250
+ void 0 === recoverable ? void 0 : { cause: initializedReason }
3251
+ );
3252
+ Object.defineProperty(initializedReason, REACT_RECOVERABLE_TYPE, {
3253
+ value: !0
3254
+ });
3255
+ return initializedReason;
3256
+ }
3257
+ function isRecoverableError(error) {
3258
+ return "object" !== typeof error || null === error
3259
+ ? !1
3260
+ : !0 === error[REACT_RECOVERABLE_TYPE];
3261
+ }
3262
+ function cloneRecoverableErrorAsFatal(recoverableError) {
3263
+ var fatalRecoverableError = Error(
3264
+ "The server render could not complete because client rendering was requested outside a Suspense boundary. See this error's cause for additional details.",
3265
+ hasOwnProperty.call(recoverableError, "cause")
3266
+ ? { cause: recoverableError.cause }
3267
+ : void 0
3268
+ );
3269
+ recoverableError = recoverableError.stack;
3270
+ if (void 0 !== recoverableError) {
3271
+ var frameStart = recoverableError.indexOf("\n");
3272
+ fatalRecoverableError.stack =
3273
+ fatalRecoverableError.name +
3274
+ ": " +
3275
+ fatalRecoverableError.message +
3276
+ (-1 === frameStart ? "" : recoverableError.slice(frameStart));
3277
+ } else fatalRecoverableError.stack = void 0;
3278
+ return fatalRecoverableError;
3279
+ }
3280
+ var renderPhaseUpdates = null,
3160
3281
  numberOfReRenders = 0;
3161
3282
  function resolveCurrentlyRenderingComponent() {
3162
3283
  if (null === currentlyRenderingComponent)
@@ -3369,6 +3490,8 @@ var HooksDispatcher = {
3369
3490
  use: function (usable) {
3370
3491
  if (null !== usable && "object" === typeof usable) {
3371
3492
  if ("function" === typeof usable.then) return unwrapThenable(usable);
3493
+ if (usable.$$typeof === REACT_RECOVERABLE_TYPE)
3494
+ throw createRecoverableError(usable);
3372
3495
  if (usable.$$typeof === REACT_CONTEXT_TYPE)
3373
3496
  return usable._currentValue2;
3374
3497
  }
@@ -3411,24 +3534,14 @@ var HooksDispatcher = {
3411
3534
  return [!1, unsupportedStartTransition];
3412
3535
  },
3413
3536
  useId: function () {
3414
- var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
3415
- var overflow = JSCompiler_inline_result.overflow;
3416
- JSCompiler_inline_result = JSCompiler_inline_result.id;
3417
- JSCompiler_inline_result =
3418
- (
3419
- JSCompiler_inline_result &
3420
- ~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
3421
- ).toString(32) + overflow;
3422
- var resumableState = currentResumableState;
3537
+ var treeId = getTreeId(currentlyRenderingTask.treeContext),
3538
+ resumableState = currentResumableState;
3423
3539
  if (null === resumableState)
3424
3540
  throw Error(
3425
3541
  "Invalid hook call. Hooks can only be called inside of the body of a function component."
3426
3542
  );
3427
- overflow = localIdCounter++;
3428
- JSCompiler_inline_result =
3429
- "_" + resumableState.idPrefix + "R_" + JSCompiler_inline_result;
3430
- 0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
3431
- return JSCompiler_inline_result + "_";
3543
+ var localId = localIdCounter++;
3544
+ return makeId(resumableState, treeId, localId);
3432
3545
  },
3433
3546
  useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
3434
3547
  if (void 0 === getServerSnapshot)
@@ -3518,7 +3631,26 @@ function describeNativeComponentFrame(fn, construct) {
3518
3631
  } catch (x$24) {
3519
3632
  control = x$24;
3520
3633
  }
3521
- fn.call(Fake.prototype);
3634
+ Fake = !1;
3635
+ try {
3636
+ var prevProps = Object.getOwnPropertyDescriptor(
3637
+ fn.prototype,
3638
+ "props"
3639
+ );
3640
+ Object.defineProperty(fn.prototype, "props", {
3641
+ configurable: !0,
3642
+ set: function () {
3643
+ throw Error();
3644
+ }
3645
+ });
3646
+ Fake = !0;
3647
+ new fn();
3648
+ } finally {
3649
+ Fake &&
3650
+ (void 0 !== prevProps
3651
+ ? Object.defineProperty(fn.prototype, "props", prevProps)
3652
+ : delete fn.prototype.props);
3653
+ }
3522
3654
  }
3523
3655
  } else {
3524
3656
  try {
@@ -3680,11 +3812,15 @@ function describeComponentStackByType(type) {
3680
3812
  return describeBuiltInComponentFrame("SuspenseList");
3681
3813
  case REACT_SUSPENSE_TYPE:
3682
3814
  return describeBuiltInComponentFrame("Suspense");
3815
+ case REACT_VIEW_TRANSITION_TYPE:
3816
+ return describeBuiltInComponentFrame("ViewTransition");
3683
3817
  }
3684
3818
  return "";
3685
3819
  }
3686
3820
  function isEligibleForOutlining(request, boundary) {
3687
- return (500 < boundary.byteSize || !1) && null === boundary.contentPreamble;
3821
+ return (
3822
+ (500 < boundary.byteSize || boundary.defer) && null === boundary.preamble
3823
+ );
3688
3824
  }
3689
3825
  function defaultErrorHandler(error) {
3690
3826
  if (
@@ -3714,11 +3850,11 @@ function RequestInstance(
3714
3850
  rootFormatContext,
3715
3851
  progressiveChunkSize,
3716
3852
  onError,
3853
+ onBrowserBailout,
3717
3854
  onAllReady,
3718
3855
  onShellReady,
3719
3856
  onShellError,
3720
3857
  onFatalError,
3721
- onPostpone,
3722
3858
  formState
3723
3859
  ) {
3724
3860
  var abortSet = new Set();
@@ -3731,21 +3867,24 @@ function RequestInstance(
3731
3867
  void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize;
3732
3868
  this.status = 10;
3733
3869
  this.fatalError = null;
3870
+ this.aborted = !1;
3734
3871
  this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
3735
3872
  this.completedPreambleSegments = this.completedRootSegment = null;
3736
3873
  this.byteSize = 0;
3737
3874
  this.abortableTasks = abortSet;
3738
3875
  this.pingedTasks = [];
3876
+ this.currentTask = null;
3739
3877
  this.clientRenderedBoundaries = [];
3740
3878
  this.completedBoundaries = [];
3741
3879
  this.partialBoundaries = [];
3742
- this.trackedPostpones = null;
3880
+ this.postponedState = this.trackedPostpones = null;
3743
3881
  this.onError = void 0 === onError ? defaultErrorHandler : onError;
3744
- this.onPostpone = void 0 === onPostpone ? noop : onPostpone;
3882
+ this.onBrowserBailout = void 0 === onBrowserBailout ? noop : onBrowserBailout;
3745
3883
  this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
3746
3884
  this.onShellReady = void 0 === onShellReady ? noop : onShellReady;
3747
3885
  this.onShellError = void 0 === onShellError ? noop : onShellError;
3748
3886
  this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
3887
+ this.renderLifetimeController = null;
3749
3888
  this.formState = void 0 === formState ? null : formState;
3750
3889
  }
3751
3890
  function createRequest(
@@ -3755,11 +3894,11 @@ function createRequest(
3755
3894
  rootFormatContext,
3756
3895
  progressiveChunkSize,
3757
3896
  onError,
3897
+ onBrowserBailout,
3758
3898
  onAllReady,
3759
3899
  onShellReady,
3760
3900
  onShellError,
3761
3901
  onFatalError,
3762
- onPostpone,
3763
3902
  formState
3764
3903
  ) {
3765
3904
  resumableState = new RequestInstance(
@@ -3768,11 +3907,11 @@ function createRequest(
3768
3907
  rootFormatContext,
3769
3908
  progressiveChunkSize,
3770
3909
  onError,
3910
+ onBrowserBailout,
3771
3911
  onAllReady,
3772
3912
  onShellReady,
3773
3913
  onShellError,
3774
3914
  onFatalError,
3775
- onPostpone,
3776
3915
  formState
3777
3916
  );
3778
3917
  renderState = createPendingSegment(
@@ -3816,8 +3955,8 @@ function createSuspenseBoundary(
3816
3955
  request,
3817
3956
  row,
3818
3957
  fallbackAbortableTasks,
3819
- contentPreamble,
3820
- fallbackPreamble
3958
+ preamble,
3959
+ defer
3821
3960
  ) {
3822
3961
  fallbackAbortableTasks = {
3823
3962
  status: 0,
@@ -3827,22 +3966,21 @@ function createSuspenseBoundary(
3827
3966
  row: row,
3828
3967
  completedSegments: [],
3829
3968
  byteSize: 0,
3969
+ defer: defer,
3830
3970
  fallbackAbortableTasks: fallbackAbortableTasks,
3831
3971
  errorDigest: null,
3832
3972
  contentState: createHoistableState(),
3833
3973
  fallbackState: createHoistableState(),
3834
- contentPreamble: contentPreamble,
3835
- fallbackPreamble: fallbackPreamble,
3836
- trackedContentKeyPath: null,
3837
- trackedFallbackNode: null
3974
+ preamble: preamble,
3975
+ tracked: null
3838
3976
  };
3839
3977
  null !== row &&
3840
3978
  (row.pendingTasks++,
3841
- (contentPreamble = row.boundaries),
3842
- null !== contentPreamble &&
3979
+ (preamble = row.boundaries),
3980
+ null !== preamble &&
3843
3981
  (request.allPendingTasks++,
3844
3982
  fallbackAbortableTasks.pendingTasks++,
3845
- contentPreamble.push(fallbackAbortableTasks)),
3983
+ preamble.push(fallbackAbortableTasks)),
3846
3984
  (request = row.inheritedHoistables),
3847
3985
  null !== request &&
3848
3986
  hoistHoistables(fallbackAbortableTasks.contentState, request));
@@ -3874,8 +4012,16 @@ function createRenderTask(
3874
4012
  replay: null,
3875
4013
  node: node,
3876
4014
  childIndex: childIndex,
3877
- ping: function () {
3878
- return pingTask(request, task);
4015
+ ping: {
4016
+ resolve: function () {
4017
+ return pingTask(request, task);
4018
+ },
4019
+ reject: function (error) {
4020
+ request.aborted
4021
+ ? task.abortSet.delete(task) &&
4022
+ finishAbortedTask(task, request, error)
4023
+ : pingTask(request, task);
4024
+ }
3879
4025
  },
3880
4026
  blockedBoundary: blockedBoundary,
3881
4027
  blockedSegment: blockedSegment,
@@ -3919,8 +4065,16 @@ function createReplayTask(
3919
4065
  replay: replay,
3920
4066
  node: node,
3921
4067
  childIndex: childIndex,
3922
- ping: function () {
3923
- return pingTask(request, task);
4068
+ ping: {
4069
+ resolve: function () {
4070
+ return pingTask(request, task);
4071
+ },
4072
+ reject: function (error) {
4073
+ request.aborted
4074
+ ? task.abortSet.delete(task) &&
4075
+ finishAbortedTask(task, request, error)
4076
+ : pingTask(request, task);
4077
+ }
3924
4078
  },
3925
4079
  blockedBoundary: blockedBoundary,
3926
4080
  blockedSegment: null,
@@ -4003,18 +4157,22 @@ function getThrownInfo(node$jscomp$0) {
4003
4157
  return errorInfo;
4004
4158
  }
4005
4159
  function logRecoverableError(request, error, errorInfo) {
4160
+ if (isRecoverableError(error))
4161
+ return (request = request.onBrowserBailout), request(error, errorInfo), "";
4006
4162
  request = request.onError;
4007
4163
  error = request(error, errorInfo);
4008
- if (null == error || "string" === typeof error) return error;
4164
+ if (null == error || "string" === typeof error)
4165
+ return "" === error ? void 0 : error;
4009
4166
  }
4010
4167
  function fatalError(request, error) {
4011
4168
  var onShellError = request.onShellError,
4012
4169
  onFatalError = request.onFatalError;
4013
- onShellError(error);
4170
+ 0 !== request.pendingRootTasks && onShellError(error);
4014
4171
  onFatalError(error);
4172
+ endRenderLifetime(request);
4015
4173
  null !== request.destination
4016
- ? ((request.status = 14), request.destination.destroy(error))
4017
- : ((request.status = 13), (request.fatalError = error));
4174
+ ? ((request.status = 13), request.destination.destroy(error))
4175
+ : ((request.status = 12), request.aborted || (request.fatalError = error));
4018
4176
  }
4019
4177
  function finishSuspenseListRow(request, row) {
4020
4178
  unblockSuspenseListRow(request, row.next, row.hoistables);
@@ -4134,45 +4292,48 @@ function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
4134
4292
  0 === --previousSuspenseListRow.pendingTasks &&
4135
4293
  finishSuspenseListRow(request, previousSuspenseListRow);
4136
4294
  else {
4137
- revealOrder = task.blockedSegment;
4138
- resumeSlots = revealOrder.children.length;
4139
- n = revealOrder.chunks.length;
4140
- for (i = keyPath - 1; 0 <= i; i--) {
4141
- node = rows[i];
4295
+ resumeSlots = task.blockedSegment;
4296
+ n = resumeSlots.children.length;
4297
+ i = resumeSlots.chunks.length;
4298
+ for (node = 0; node < keyPath; node++) {
4299
+ resumeSegmentID =
4300
+ "unstable_legacy-backwards" === revealOrder ? keyPath - 1 - node : node;
4301
+ var node$39 = rows[resumeSegmentID];
4142
4302
  task.row = previousSuspenseListRow = createSuspenseListRow(
4143
4303
  previousSuspenseListRow
4144
4304
  );
4145
- task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
4146
- resumeSegmentID = createPendingSegment(
4305
+ task.treeContext = pushTreeContext(
4306
+ prevTreeContext,
4307
+ keyPath,
4308
+ resumeSegmentID
4309
+ );
4310
+ var newSegment = createPendingSegment(
4147
4311
  request,
4148
- n,
4312
+ i,
4149
4313
  null,
4150
4314
  task.formatContext,
4151
- 0 === i ? revealOrder.lastPushedText : !0,
4315
+ 0 === resumeSegmentID ? resumeSlots.lastPushedText : !0,
4152
4316
  !0
4153
4317
  );
4154
- revealOrder.children.splice(resumeSlots, 0, resumeSegmentID);
4155
- task.blockedSegment = resumeSegmentID;
4318
+ resumeSlots.children.splice(n, 0, newSegment);
4319
+ task.blockedSegment = newSegment;
4156
4320
  try {
4157
- renderNode(request, task, node, i),
4321
+ renderNode(request, task, node$39, resumeSegmentID),
4158
4322
  pushSegmentFinale(
4159
- resumeSegmentID.chunks,
4323
+ newSegment.chunks,
4160
4324
  request.renderState,
4161
- resumeSegmentID.lastPushedText,
4162
- resumeSegmentID.textEmbedded
4325
+ newSegment.lastPushedText,
4326
+ newSegment.textEmbedded
4163
4327
  ),
4164
- (resumeSegmentID.status = 1),
4328
+ (newSegment.status = 1),
4165
4329
  0 === --previousSuspenseListRow.pendingTasks &&
4166
4330
  finishSuspenseListRow(request, previousSuspenseListRow);
4167
4331
  } catch (thrownValue) {
4168
- throw (
4169
- ((resumeSegmentID.status = 12 === request.status ? 3 : 4),
4170
- thrownValue)
4171
- );
4332
+ throw ((newSegment.status = request.aborted ? 3 : 4), thrownValue);
4172
4333
  }
4173
4334
  }
4174
- task.blockedSegment = revealOrder;
4175
- revealOrder.lastPushedText = !1;
4335
+ task.blockedSegment = resumeSlots;
4336
+ resumeSlots.lastPushedText = !1;
4176
4337
  }
4177
4338
  null !== prevRow &&
4178
4339
  null !== previousSuspenseListRow &&
@@ -4249,113 +4410,143 @@ function renderElement(request, task, keyPath, type, props, ref) {
4249
4410
  var defaultProps = type.defaultProps;
4250
4411
  if (defaultProps) {
4251
4412
  newProps === props && (newProps = assign({}, newProps, props));
4252
- for (var propName$43 in defaultProps)
4253
- void 0 === newProps[propName$43] &&
4254
- (newProps[propName$43] = defaultProps[propName$43]);
4413
+ for (var propName$44 in defaultProps)
4414
+ void 0 === newProps[propName$44] &&
4415
+ (newProps[propName$44] = defaultProps[propName$44]);
4255
4416
  }
4256
- props = newProps;
4257
- newProps = emptyContextObject;
4258
- defaultProps = type.contextType;
4259
- "object" === typeof defaultProps &&
4260
- null !== defaultProps &&
4261
- (newProps = defaultProps._currentValue2);
4262
- newProps = new type(props, newProps);
4263
- var initialState = void 0 !== newProps.state ? newProps.state : null;
4264
- newProps.updater = classComponentUpdater;
4265
- newProps.props = props;
4266
- newProps.state = initialState;
4267
- defaultProps = { queue: [], replace: !1 };
4268
- newProps._reactInternals = defaultProps;
4269
- ref = type.contextType;
4270
- newProps.context =
4271
- "object" === typeof ref && null !== ref
4272
- ? ref._currentValue2
4417
+ var JSCompiler_inline_result = newProps;
4418
+ var context = emptyContextObject,
4419
+ contextType = type.contextType;
4420
+ "object" === typeof contextType &&
4421
+ null !== contextType &&
4422
+ (context = contextType._currentValue2);
4423
+ var JSCompiler_inline_result$jscomp$0 = new type(
4424
+ JSCompiler_inline_result,
4425
+ context
4426
+ );
4427
+ var initialState =
4428
+ void 0 !== JSCompiler_inline_result$jscomp$0.state
4429
+ ? JSCompiler_inline_result$jscomp$0.state
4430
+ : null;
4431
+ JSCompiler_inline_result$jscomp$0.updater = classComponentUpdater;
4432
+ JSCompiler_inline_result$jscomp$0.props = JSCompiler_inline_result;
4433
+ JSCompiler_inline_result$jscomp$0.state = initialState;
4434
+ var internalInstance = { queue: [], replace: !1 };
4435
+ JSCompiler_inline_result$jscomp$0._reactInternals = internalInstance;
4436
+ var contextType$jscomp$0 = type.contextType;
4437
+ JSCompiler_inline_result$jscomp$0.context =
4438
+ "object" === typeof contextType$jscomp$0 &&
4439
+ null !== contextType$jscomp$0
4440
+ ? contextType$jscomp$0._currentValue2
4273
4441
  : emptyContextObject;
4274
- ref = type.getDerivedStateFromProps;
4275
- "function" === typeof ref &&
4276
- ((ref = ref(props, initialState)),
4277
- (initialState =
4278
- null === ref || void 0 === ref
4442
+ var getDerivedStateFromProps = type.getDerivedStateFromProps;
4443
+ if ("function" === typeof getDerivedStateFromProps) {
4444
+ var partialState = getDerivedStateFromProps(
4445
+ JSCompiler_inline_result,
4446
+ initialState
4447
+ );
4448
+ var JSCompiler_inline_result$jscomp$1 =
4449
+ null === partialState || void 0 === partialState
4279
4450
  ? initialState
4280
- : assign({}, initialState, ref)),
4281
- (newProps.state = initialState));
4451
+ : assign({}, initialState, partialState);
4452
+ JSCompiler_inline_result$jscomp$0.state =
4453
+ JSCompiler_inline_result$jscomp$1;
4454
+ }
4282
4455
  if (
4283
4456
  "function" !== typeof type.getDerivedStateFromProps &&
4284
- "function" !== typeof newProps.getSnapshotBeforeUpdate &&
4285
- ("function" === typeof newProps.UNSAFE_componentWillMount ||
4286
- "function" === typeof newProps.componentWillMount)
4287
- )
4457
+ "function" !==
4458
+ typeof JSCompiler_inline_result$jscomp$0.getSnapshotBeforeUpdate &&
4459
+ ("function" ===
4460
+ typeof JSCompiler_inline_result$jscomp$0.UNSAFE_componentWillMount ||
4461
+ "function" ===
4462
+ typeof JSCompiler_inline_result$jscomp$0.componentWillMount)
4463
+ ) {
4464
+ var oldState = JSCompiler_inline_result$jscomp$0.state;
4465
+ "function" ===
4466
+ typeof JSCompiler_inline_result$jscomp$0.componentWillMount &&
4467
+ JSCompiler_inline_result$jscomp$0.componentWillMount();
4468
+ "function" ===
4469
+ typeof JSCompiler_inline_result$jscomp$0.UNSAFE_componentWillMount &&
4470
+ JSCompiler_inline_result$jscomp$0.UNSAFE_componentWillMount();
4471
+ oldState !== JSCompiler_inline_result$jscomp$0.state &&
4472
+ classComponentUpdater.enqueueReplaceState(
4473
+ JSCompiler_inline_result$jscomp$0,
4474
+ JSCompiler_inline_result$jscomp$0.state,
4475
+ null
4476
+ );
4288
4477
  if (
4289
- ((type = newProps.state),
4290
- "function" === typeof newProps.componentWillMount &&
4291
- newProps.componentWillMount(),
4292
- "function" === typeof newProps.UNSAFE_componentWillMount &&
4293
- newProps.UNSAFE_componentWillMount(),
4294
- type !== newProps.state &&
4295
- classComponentUpdater.enqueueReplaceState(
4296
- newProps,
4297
- newProps.state,
4298
- null
4299
- ),
4300
- null !== defaultProps.queue && 0 < defaultProps.queue.length)
4301
- )
4302
- if (
4303
- ((type = defaultProps.queue),
4304
- (ref = defaultProps.replace),
4305
- (defaultProps.queue = null),
4306
- (defaultProps.replace = !1),
4307
- ref && 1 === type.length)
4308
- )
4309
- newProps.state = type[0];
4478
+ null !== internalInstance.queue &&
4479
+ 0 < internalInstance.queue.length
4480
+ ) {
4481
+ var oldQueue = internalInstance.queue,
4482
+ oldReplace = internalInstance.replace;
4483
+ internalInstance.queue = null;
4484
+ internalInstance.replace = !1;
4485
+ if (oldReplace && 1 === oldQueue.length)
4486
+ JSCompiler_inline_result$jscomp$0.state = oldQueue[0];
4310
4487
  else {
4311
- defaultProps = ref ? type[0] : newProps.state;
4312
- initialState = !0;
4313
- for (ref = ref ? 1 : 0; ref < type.length; ref++)
4314
- (propName$43 = type[ref]),
4315
- (propName$43 =
4316
- "function" === typeof propName$43
4317
- ? propName$43.call(newProps, defaultProps, props, void 0)
4318
- : propName$43),
4319
- null != propName$43 &&
4320
- (initialState
4321
- ? ((initialState = !1),
4322
- (defaultProps = assign({}, defaultProps, propName$43)))
4323
- : assign(defaultProps, propName$43));
4324
- newProps.state = defaultProps;
4488
+ for (
4489
+ var nextState = oldReplace
4490
+ ? oldQueue[0]
4491
+ : JSCompiler_inline_result$jscomp$0.state,
4492
+ dontMutate = !0,
4493
+ i = oldReplace ? 1 : 0;
4494
+ i < oldQueue.length;
4495
+ i++
4496
+ ) {
4497
+ var partial = oldQueue[i],
4498
+ partialState$jscomp$0 =
4499
+ "function" === typeof partial
4500
+ ? partial.call(
4501
+ JSCompiler_inline_result$jscomp$0,
4502
+ nextState,
4503
+ JSCompiler_inline_result,
4504
+ void 0
4505
+ )
4506
+ : partial;
4507
+ null != partialState$jscomp$0 &&
4508
+ (dontMutate
4509
+ ? ((dontMutate = !1),
4510
+ (nextState = assign({}, nextState, partialState$jscomp$0)))
4511
+ : assign(nextState, partialState$jscomp$0));
4512
+ }
4513
+ JSCompiler_inline_result$jscomp$0.state = nextState;
4325
4514
  }
4326
- else defaultProps.queue = null;
4327
- type = newProps.render();
4328
- if (12 === request.status) throw null;
4329
- props = task.keyPath;
4515
+ } else internalInstance.queue = null;
4516
+ }
4517
+ var nextChildren = JSCompiler_inline_result$jscomp$0.render();
4518
+ if (request.aborted) throw null;
4519
+ var prevKeyPath = task.keyPath;
4330
4520
  task.keyPath = keyPath;
4331
- renderNodeDestructive(request, task, type, -1);
4332
- task.keyPath = props;
4521
+ renderNodeDestructive(request, task, nextChildren, -1);
4522
+ task.keyPath = prevKeyPath;
4333
4523
  } else {
4334
- type = renderWithHooks(request, task, keyPath, type, props, void 0);
4335
- if (12 === request.status) throw null;
4524
+ var value = renderWithHooks(request, task, keyPath, type, props, void 0);
4525
+ if (request.aborted) throw null;
4336
4526
  finishFunctionComponent(
4337
4527
  request,
4338
4528
  task,
4339
4529
  keyPath,
4340
- type,
4530
+ value,
4341
4531
  0 !== localIdCounter,
4342
4532
  actionStateCounter,
4343
4533
  actionStateMatchingIndex
4344
4534
  );
4345
4535
  }
4346
- else if ("string" === typeof type)
4347
- if (((newProps = task.blockedSegment), null === newProps))
4348
- (newProps = props.children),
4349
- (defaultProps = task.formatContext),
4350
- (initialState = task.keyPath),
4351
- (task.formatContext = getChildFormatContext(defaultProps, type, props)),
4352
- (task.keyPath = keyPath),
4353
- renderNode(request, task, newProps, -1),
4354
- (task.formatContext = defaultProps),
4355
- (task.keyPath = initialState);
4356
- else {
4357
- initialState = pushStartInstance(
4358
- newProps.chunks,
4536
+ else if ("string" === typeof type) {
4537
+ var segment = task.blockedSegment;
4538
+ if (null === segment) {
4539
+ var children = props.children,
4540
+ prevContext = task.formatContext,
4541
+ prevKeyPath$jscomp$0 = task.keyPath;
4542
+ task.formatContext = getChildFormatContext(prevContext, type, props);
4543
+ task.keyPath = keyPath;
4544
+ renderNode(request, task, children, -1);
4545
+ task.formatContext = prevContext;
4546
+ task.keyPath = prevKeyPath$jscomp$0;
4547
+ } else {
4548
+ var children$41 = pushStartInstance(
4549
+ segment.chunks,
4359
4550
  type,
4360
4551
  props,
4361
4552
  request.resumableState,
@@ -4363,18 +4554,21 @@ function renderElement(request, task, keyPath, type, props, ref) {
4363
4554
  task.blockedPreamble,
4364
4555
  task.hoistableState,
4365
4556
  task.formatContext,
4366
- newProps.lastPushedText
4557
+ segment.lastPushedText
4367
4558
  );
4368
- newProps.lastPushedText = !1;
4369
- defaultProps = task.formatContext;
4370
- ref = task.keyPath;
4559
+ segment.lastPushedText = !1;
4560
+ var prevContext$42 = task.formatContext,
4561
+ prevKeyPath$43 = task.keyPath;
4371
4562
  task.keyPath = keyPath;
4372
4563
  if (
4373
4564
  3 ===
4374
- (task.formatContext = getChildFormatContext(defaultProps, type, props))
4375
- .insertionMode
4565
+ (task.formatContext = getChildFormatContext(
4566
+ prevContext$42,
4567
+ type,
4568
+ props
4569
+ )).insertionMode
4376
4570
  ) {
4377
- keyPath = createPendingSegment(
4571
+ var preambleSegment = createPendingSegment(
4378
4572
  request,
4379
4573
  0,
4380
4574
  null,
@@ -4382,27 +4576,26 @@ function renderElement(request, task, keyPath, type, props, ref) {
4382
4576
  !1,
4383
4577
  !1
4384
4578
  );
4385
- newProps.preambleChildren.push(keyPath);
4386
- task.blockedSegment = keyPath;
4579
+ segment.preambleChildren.push(preambleSegment);
4580
+ task.blockedSegment = preambleSegment;
4387
4581
  try {
4388
- (keyPath.status = 6),
4389
- renderNode(request, task, initialState, -1),
4582
+ renderNode(request, task, children$41, -1),
4390
4583
  pushSegmentFinale(
4391
- keyPath.chunks,
4584
+ preambleSegment.chunks,
4392
4585
  request.renderState,
4393
- keyPath.lastPushedText,
4394
- keyPath.textEmbedded
4586
+ preambleSegment.lastPushedText,
4587
+ preambleSegment.textEmbedded
4395
4588
  ),
4396
- (keyPath.status = 1);
4589
+ (preambleSegment.status = 1);
4397
4590
  } finally {
4398
- task.blockedSegment = newProps;
4591
+ task.blockedSegment = segment;
4399
4592
  }
4400
- } else renderNode(request, task, initialState, -1);
4401
- task.formatContext = defaultProps;
4402
- task.keyPath = ref;
4593
+ } else renderNode(request, task, children$41, -1);
4594
+ task.formatContext = prevContext$42;
4595
+ task.keyPath = prevKeyPath$43;
4403
4596
  a: {
4404
- task = newProps.chunks;
4405
- request = request.resumableState;
4597
+ var target = segment.chunks,
4598
+ resumableState = request.resumableState;
4406
4599
  switch (type) {
4407
4600
  case "title":
4408
4601
  case "style":
@@ -4424,152 +4617,185 @@ function renderElement(request, task, keyPath, type, props, ref) {
4424
4617
  case "wbr":
4425
4618
  break a;
4426
4619
  case "body":
4427
- if (1 >= defaultProps.insertionMode) {
4428
- request.hasBody = !0;
4620
+ if (1 >= prevContext$42.insertionMode) {
4621
+ resumableState.hasBody = !0;
4429
4622
  break a;
4430
4623
  }
4431
4624
  break;
4432
4625
  case "html":
4433
- if (0 === defaultProps.insertionMode) {
4434
- request.hasHtml = !0;
4626
+ if (0 === prevContext$42.insertionMode) {
4627
+ resumableState.hasHtml = !0;
4435
4628
  break a;
4436
4629
  }
4437
4630
  break;
4438
4631
  case "head":
4439
- if (1 >= defaultProps.insertionMode) break a;
4632
+ if (1 >= prevContext$42.insertionMode) break a;
4440
4633
  }
4441
- task.push(endChunkForTag(type));
4634
+ target.push(endChunkForTag(type));
4442
4635
  }
4443
- newProps.lastPushedText = !1;
4636
+ segment.lastPushedText = !1;
4444
4637
  }
4445
- else {
4638
+ } else {
4446
4639
  switch (type) {
4447
4640
  case REACT_LEGACY_HIDDEN_TYPE:
4448
4641
  case REACT_STRICT_MODE_TYPE:
4449
4642
  case REACT_PROFILER_TYPE:
4450
4643
  case REACT_FRAGMENT_TYPE:
4451
- type = task.keyPath;
4644
+ var prevKeyPath$jscomp$1 = task.keyPath;
4452
4645
  task.keyPath = keyPath;
4453
4646
  renderNodeDestructive(request, task, props.children, -1);
4454
- task.keyPath = type;
4647
+ task.keyPath = prevKeyPath$jscomp$1;
4455
4648
  return;
4456
4649
  case REACT_ACTIVITY_TYPE:
4457
- type = task.blockedSegment;
4458
- null === type
4459
- ? "hidden" !== props.mode &&
4460
- ((type = task.keyPath),
4461
- (task.keyPath = keyPath),
4462
- renderNode(request, task, props.children, -1),
4463
- (task.keyPath = type))
4464
- : "hidden" !== props.mode &&
4465
- (request.renderState.generateStaticMarkup ||
4466
- type.chunks.push("\x3c!--&--\x3e"),
4467
- (type.lastPushedText = !1),
4468
- (newProps = task.keyPath),
4469
- (task.keyPath = keyPath),
4470
- renderNode(request, task, props.children, -1),
4471
- (task.keyPath = newProps),
4472
- request.renderState.generateStaticMarkup ||
4473
- type.chunks.push("\x3c!--/&--\x3e"),
4474
- (type.lastPushedText = !1));
4650
+ var segment$jscomp$0 = task.blockedSegment;
4651
+ if (null === segment$jscomp$0) {
4652
+ if ("hidden" !== props.mode) {
4653
+ var prevKeyPath$jscomp$2 = task.keyPath;
4654
+ task.keyPath = keyPath;
4655
+ renderNode(request, task, props.children, -1);
4656
+ task.keyPath = prevKeyPath$jscomp$2;
4657
+ }
4658
+ } else if ("hidden" !== props.mode) {
4659
+ request.renderState.generateStaticMarkup ||
4660
+ segment$jscomp$0.chunks.push("\x3c!--&--\x3e");
4661
+ segment$jscomp$0.lastPushedText = !1;
4662
+ var prevKeyPath$46 = task.keyPath;
4663
+ task.keyPath = keyPath;
4664
+ renderNode(request, task, props.children, -1);
4665
+ task.keyPath = prevKeyPath$46;
4666
+ request.renderState.generateStaticMarkup ||
4667
+ segment$jscomp$0.chunks.push("\x3c!--/&--\x3e");
4668
+ segment$jscomp$0.lastPushedText = !1;
4669
+ }
4475
4670
  return;
4476
4671
  case REACT_SUSPENSE_LIST_TYPE:
4477
4672
  a: {
4478
- type = props.children;
4479
- props = props.revealOrder;
4480
- if (
4481
- "forwards" === props ||
4482
- "backwards" === props ||
4483
- "unstable_legacy-backwards" === props
4484
- ) {
4485
- if (isArrayImpl(type)) {
4486
- renderSuspenseListRows(request, task, keyPath, type, props);
4673
+ var children$jscomp$0 = props.children,
4674
+ revealOrder = props.revealOrder;
4675
+ if ("independent" !== revealOrder && "together" !== revealOrder) {
4676
+ if (isArrayImpl(children$jscomp$0)) {
4677
+ renderSuspenseListRows(
4678
+ request,
4679
+ task,
4680
+ keyPath,
4681
+ children$jscomp$0,
4682
+ revealOrder
4683
+ );
4487
4684
  break a;
4488
4685
  }
4489
- if ((newProps = getIteratorFn(type)))
4490
- if ((newProps = newProps.call(type))) {
4491
- defaultProps = newProps.next();
4492
- if (!defaultProps.done) {
4493
- do defaultProps = newProps.next();
4494
- while (!defaultProps.done);
4495
- renderSuspenseListRows(request, task, keyPath, type, props);
4686
+ var iteratorFn = getIteratorFn(children$jscomp$0);
4687
+ if (iteratorFn) {
4688
+ var iterator = iteratorFn.call(children$jscomp$0);
4689
+ if (iterator) {
4690
+ var step = iterator.next();
4691
+ if (!step.done) {
4692
+ do step = iterator.next();
4693
+ while (!step.done);
4694
+ renderSuspenseListRows(
4695
+ request,
4696
+ task,
4697
+ keyPath,
4698
+ children$jscomp$0,
4699
+ revealOrder
4700
+ );
4496
4701
  }
4497
4702
  break a;
4498
4703
  }
4704
+ }
4705
+ }
4706
+ if ("together" === revealOrder) {
4707
+ var prevKeyPath$40 = task.keyPath,
4708
+ prevRow = task.row,
4709
+ newRow = (task.row = createSuspenseListRow(null));
4710
+ newRow.boundaries = [];
4711
+ newRow.together = !0;
4712
+ task.keyPath = keyPath;
4713
+ renderNodeDestructive(request, task, children$jscomp$0, -1);
4714
+ 0 === --newRow.pendingTasks &&
4715
+ finishSuspenseListRow(request, newRow);
4716
+ task.keyPath = prevKeyPath$40;
4717
+ task.row = prevRow;
4718
+ null !== prevRow &&
4719
+ 0 < newRow.pendingTasks &&
4720
+ (prevRow.pendingTasks++, (newRow.next = prevRow));
4721
+ } else {
4722
+ var prevKeyPath$jscomp$3 = task.keyPath;
4723
+ task.keyPath = keyPath;
4724
+ renderNodeDestructive(request, task, children$jscomp$0, -1);
4725
+ task.keyPath = prevKeyPath$jscomp$3;
4499
4726
  }
4500
- "together" === props
4501
- ? ((props = task.keyPath),
4502
- (newProps = task.row),
4503
- (defaultProps = task.row = createSuspenseListRow(null)),
4504
- (defaultProps.boundaries = []),
4505
- (defaultProps.together = !0),
4506
- (task.keyPath = keyPath),
4507
- renderNodeDestructive(request, task, type, -1),
4508
- 0 === --defaultProps.pendingTasks &&
4509
- finishSuspenseListRow(request, defaultProps),
4510
- (task.keyPath = props),
4511
- (task.row = newProps),
4512
- null !== newProps &&
4513
- 0 < defaultProps.pendingTasks &&
4514
- (newProps.pendingTasks++, (defaultProps.next = newProps)))
4515
- : ((props = task.keyPath),
4516
- (task.keyPath = keyPath),
4517
- renderNodeDestructive(request, task, type, -1),
4518
- (task.keyPath = props));
4519
4727
  }
4520
4728
  return;
4521
4729
  case REACT_VIEW_TRANSITION_TYPE:
4730
+ var prevContext$jscomp$0 = task.formatContext,
4731
+ prevKeyPath$jscomp$4 = task.keyPath;
4732
+ var resumableState$jscomp$0 = request.resumableState;
4733
+ if (null == props.name || "auto" === props.name) {
4734
+ var treeId = getTreeId(task.treeContext);
4735
+ makeId(resumableState$jscomp$0, treeId, 0);
4736
+ }
4737
+ task.formatContext = prevContext$jscomp$0;
4738
+ task.keyPath = keyPath;
4739
+ if (null != props.name && "auto" !== props.name)
4740
+ renderNodeDestructive(request, task, props.children, -1);
4741
+ else {
4742
+ var prevTreeContext = task.treeContext;
4743
+ task.treeContext = pushTreeContext(prevTreeContext, 1, 0);
4744
+ renderNode(request, task, props.children, -1);
4745
+ task.treeContext = prevTreeContext;
4746
+ }
4747
+ task.formatContext = prevContext$jscomp$0;
4748
+ task.keyPath = prevKeyPath$jscomp$4;
4749
+ return;
4522
4750
  case REACT_SCOPE_TYPE:
4523
4751
  throw Error("ReactDOMServer does not yet support scope components.");
4524
4752
  case REACT_SUSPENSE_TYPE:
4525
4753
  a: if (null !== task.replay) {
4526
- type = task.keyPath;
4527
- newProps = task.formatContext;
4528
- defaultProps = task.row;
4754
+ var prevKeyPath$26 = task.keyPath,
4755
+ prevContext$27 = task.formatContext,
4756
+ prevRow$28 = task.row;
4529
4757
  task.keyPath = keyPath;
4530
4758
  task.formatContext = getSuspenseContentFormatContext(
4531
4759
  request.resumableState,
4532
- newProps
4760
+ prevContext$27
4533
4761
  );
4534
4762
  task.row = null;
4535
- keyPath = props.children;
4763
+ var content$29 = props.children;
4536
4764
  try {
4537
- renderNode(request, task, keyPath, -1);
4765
+ renderNode(request, task, content$29, -1);
4538
4766
  } finally {
4539
- (task.keyPath = type),
4540
- (task.formatContext = newProps),
4541
- (task.row = defaultProps);
4767
+ (task.keyPath = prevKeyPath$26),
4768
+ (task.formatContext = prevContext$27),
4769
+ (task.row = prevRow$28);
4542
4770
  }
4543
4771
  } else {
4544
- type = task.keyPath;
4545
- ref = task.formatContext;
4546
- var prevRow = task.row,
4547
- parentBoundary = task.blockedBoundary;
4548
- propName$43 = task.blockedPreamble;
4549
- var parentHoistableState = task.hoistableState;
4550
- propName = task.blockedSegment;
4551
- var fallback = props.fallback;
4552
- props = props.children;
4553
- var fallbackAbortSet = new Set();
4554
- var newBoundary = createSuspenseBoundary(
4555
- request,
4556
- task.row,
4557
- fallbackAbortSet,
4558
- null,
4559
- null
4560
- );
4561
- null !== request.trackedPostpones &&
4562
- (newBoundary.trackedContentKeyPath = keyPath);
4563
- var boundarySegment = createPendingSegment(
4564
- request,
4565
- propName.chunks.length,
4566
- newBoundary,
4567
- task.formatContext,
4568
- !1,
4569
- !1
4570
- );
4571
- propName.children.push(boundarySegment);
4572
- propName.lastPushedText = !1;
4772
+ var prevKeyPath$jscomp$5 = task.keyPath,
4773
+ prevContext$jscomp$1 = task.formatContext,
4774
+ prevRow$jscomp$0 = task.row,
4775
+ parentBoundary = task.blockedBoundary,
4776
+ parentPreamble = task.blockedPreamble,
4777
+ parentHoistableState = task.hoistableState,
4778
+ parentSegment = task.blockedSegment,
4779
+ fallback = props.fallback,
4780
+ content = props.children,
4781
+ fallbackAbortSet = new Set(),
4782
+ newBoundary = createSuspenseBoundary(
4783
+ request,
4784
+ task.row,
4785
+ fallbackAbortSet,
4786
+ null,
4787
+ !1
4788
+ ),
4789
+ boundarySegment = createPendingSegment(
4790
+ request,
4791
+ parentSegment.chunks.length,
4792
+ newBoundary,
4793
+ task.formatContext,
4794
+ !1,
4795
+ !1
4796
+ );
4797
+ parentSegment.children.push(boundarySegment);
4798
+ parentSegment.lastPushedText = !1;
4573
4799
  var contentRootSegment = createPendingSegment(
4574
4800
  request,
4575
4801
  0,
@@ -4579,22 +4805,40 @@ function renderElement(request, task, keyPath, type, props, ref) {
4579
4805
  !1
4580
4806
  );
4581
4807
  contentRootSegment.parentFlushed = !0;
4582
- if (null !== request.trackedPostpones) {
4583
- newProps = task.componentStack;
4584
- defaultProps = [keyPath[0], "Suspense Fallback", keyPath[2]];
4585
- initialState = [defaultProps[1], defaultProps[2], [], null];
4586
- request.trackedPostpones.workingMap.set(defaultProps, initialState);
4587
- newBoundary.trackedFallbackNode = initialState;
4808
+ var trackedPostpones = request.trackedPostpones;
4809
+ if (null !== trackedPostpones) {
4810
+ var suspenseComponentStack = task.componentStack,
4811
+ fallbackKeyPath = [keyPath[0], "Suspense Fallback", keyPath[2]];
4812
+ if (null !== trackedPostpones) {
4813
+ var fallbackReplayNode = [
4814
+ fallbackKeyPath[1],
4815
+ fallbackKeyPath[2],
4816
+ [],
4817
+ null
4818
+ ];
4819
+ trackedPostpones.workingMap.set(
4820
+ fallbackKeyPath,
4821
+ fallbackReplayNode
4822
+ );
4823
+ newBoundary.tracked = {
4824
+ contentKeyPath: keyPath,
4825
+ fallbackNode: fallbackReplayNode
4826
+ };
4827
+ }
4588
4828
  task.blockedSegment = boundarySegment;
4589
- task.blockedPreamble = newBoundary.fallbackPreamble;
4590
- task.keyPath = defaultProps;
4829
+ task.blockedPreamble =
4830
+ null === newBoundary.preamble
4831
+ ? null
4832
+ : newBoundary.preamble.fallback;
4833
+ task.keyPath = fallbackKeyPath;
4591
4834
  task.formatContext = getSuspenseFallbackFormatContext(
4592
4835
  request.resumableState,
4593
- ref
4836
+ prevContext$jscomp$1
4594
4837
  );
4595
4838
  task.componentStack =
4596
- replaceSuspenseComponentStackWithSuspenseFallbackStack(newProps);
4597
- boundarySegment.status = 6;
4839
+ replaceSuspenseComponentStackWithSuspenseFallbackStack(
4840
+ suspenseComponentStack
4841
+ );
4598
4842
  try {
4599
4843
  renderNode(request, task, fallback, -1),
4600
4844
  pushSegmentFinale(
@@ -4606,23 +4850,25 @@ function renderElement(request, task, keyPath, type, props, ref) {
4606
4850
  (boundarySegment.status = 1);
4607
4851
  } catch (thrownValue) {
4608
4852
  throw (
4609
- ((boundarySegment.status = 12 === request.status ? 3 : 4),
4853
+ ((boundarySegment.status = request.aborted ? 3 : 4),
4610
4854
  thrownValue)
4611
4855
  );
4612
4856
  } finally {
4613
- (task.blockedSegment = propName),
4614
- (task.blockedPreamble = propName$43),
4615
- (task.keyPath = type),
4616
- (task.formatContext = ref);
4857
+ (task.blockedSegment = parentSegment),
4858
+ (task.blockedPreamble = parentPreamble),
4859
+ (task.keyPath = prevKeyPath$jscomp$5),
4860
+ (task.formatContext = prevContext$jscomp$1);
4617
4861
  }
4618
- task = createRenderTask(
4862
+ var suspendedPrimaryTask = createRenderTask(
4619
4863
  request,
4620
4864
  null,
4621
- props,
4865
+ content,
4622
4866
  -1,
4623
4867
  newBoundary,
4624
4868
  contentRootSegment,
4625
- newBoundary.contentPreamble,
4869
+ null === newBoundary.preamble
4870
+ ? null
4871
+ : newBoundary.preamble.content,
4626
4872
  newBoundary.contentState,
4627
4873
  task.abortSet,
4628
4874
  keyPath,
@@ -4633,25 +4879,27 @@ function renderElement(request, task, keyPath, type, props, ref) {
4633
4879
  task.context,
4634
4880
  task.treeContext,
4635
4881
  null,
4636
- newProps
4882
+ suspenseComponentStack
4637
4883
  );
4638
- pushComponentStack(task);
4639
- request.pingedTasks.push(task);
4884
+ pushComponentStack(suspendedPrimaryTask);
4885
+ request.pingedTasks.push(suspendedPrimaryTask);
4640
4886
  } else {
4641
4887
  task.blockedBoundary = newBoundary;
4642
- task.blockedPreamble = newBoundary.contentPreamble;
4888
+ task.blockedPreamble =
4889
+ null === newBoundary.preamble
4890
+ ? null
4891
+ : newBoundary.preamble.content;
4643
4892
  task.hoistableState = newBoundary.contentState;
4644
4893
  task.blockedSegment = contentRootSegment;
4645
4894
  task.keyPath = keyPath;
4646
4895
  task.formatContext = getSuspenseContentFormatContext(
4647
4896
  request.resumableState,
4648
- ref
4897
+ prevContext$jscomp$1
4649
4898
  );
4650
4899
  task.row = null;
4651
- contentRootSegment.status = 6;
4652
4900
  try {
4653
4901
  if (
4654
- (renderNode(request, task, props, -1),
4902
+ (renderNode(request, task, content, -1),
4655
4903
  pushSegmentFinale(
4656
4904
  contentRootSegment.chunks,
4657
4905
  request.renderState,
@@ -4666,50 +4914,47 @@ function renderElement(request, task, keyPath, type, props, ref) {
4666
4914
  ((newBoundary.status = 1),
4667
4915
  !isEligibleForOutlining(request, newBoundary))
4668
4916
  ) {
4669
- null !== prevRow &&
4670
- 0 === --prevRow.pendingTasks &&
4671
- finishSuspenseListRow(request, prevRow);
4917
+ null !== prevRow$jscomp$0 &&
4918
+ 0 === --prevRow$jscomp$0.pendingTasks &&
4919
+ finishSuspenseListRow(request, prevRow$jscomp$0);
4672
4920
  0 === request.pendingRootTasks &&
4673
4921
  task.blockedPreamble &&
4674
4922
  preparePreamble(request);
4675
4923
  break a;
4676
4924
  }
4677
4925
  } else
4678
- null !== prevRow &&
4679
- prevRow.together &&
4680
- tryToResolveTogetherRow(request, prevRow);
4926
+ null !== prevRow$jscomp$0 &&
4927
+ prevRow$jscomp$0.together &&
4928
+ tryToResolveTogetherRow(request, prevRow$jscomp$0);
4681
4929
  } catch (thrownValue$30) {
4682
- (newBoundary.status = 4),
4683
- 12 === request.status
4684
- ? ((contentRootSegment.status = 3),
4685
- (newProps = request.fatalError))
4686
- : ((contentRootSegment.status = 4),
4687
- (newProps = thrownValue$30)),
4688
- (defaultProps = getThrownInfo(task.componentStack)),
4689
- (initialState = logRecoverableError(
4690
- request,
4691
- newProps,
4692
- defaultProps
4693
- )),
4694
- (newBoundary.errorDigest = initialState),
4695
- untrackBoundary(request, newBoundary);
4930
+ newBoundary.status = 4;
4931
+ if (request.aborted) {
4932
+ contentRootSegment.status = 3;
4933
+ var error = request.fatalError;
4934
+ } else (contentRootSegment.status = 4), (error = thrownValue$30);
4935
+ var thrownInfo = getThrownInfo(task.componentStack),
4936
+ errorDigest = logRecoverableError(request, error, thrownInfo);
4937
+ newBoundary.errorDigest = errorDigest;
4938
+ untrackBoundary(request, newBoundary);
4696
4939
  } finally {
4697
4940
  (task.blockedBoundary = parentBoundary),
4698
- (task.blockedPreamble = propName$43),
4941
+ (task.blockedPreamble = parentPreamble),
4699
4942
  (task.hoistableState = parentHoistableState),
4700
- (task.blockedSegment = propName),
4701
- (task.keyPath = type),
4702
- (task.formatContext = ref),
4703
- (task.row = prevRow);
4943
+ (task.blockedSegment = parentSegment),
4944
+ (task.keyPath = prevKeyPath$jscomp$5),
4945
+ (task.formatContext = prevContext$jscomp$1),
4946
+ (task.row = prevRow$jscomp$0);
4704
4947
  }
4705
- task = createRenderTask(
4948
+ var suspendedFallbackTask = createRenderTask(
4706
4949
  request,
4707
4950
  null,
4708
4951
  fallback,
4709
4952
  -1,
4710
4953
  parentBoundary,
4711
4954
  boundarySegment,
4712
- newBoundary.fallbackPreamble,
4955
+ null === newBoundary.preamble
4956
+ ? null
4957
+ : newBoundary.preamble.fallback,
4713
4958
  newBoundary.fallbackState,
4714
4959
  fallbackAbortSet,
4715
4960
  [keyPath[0], "Suspense Fallback", keyPath[2]],
@@ -4724,8 +4969,8 @@ function renderElement(request, task, keyPath, type, props, ref) {
4724
4969
  task.componentStack
4725
4970
  )
4726
4971
  );
4727
- pushComponentStack(task);
4728
- request.pingedTasks.push(task);
4972
+ pushComponentStack(suspendedFallbackTask);
4973
+ request.pingedTasks.push(suspendedFallbackTask);
4729
4974
  }
4730
4975
  }
4731
4976
  return;
@@ -4733,23 +4978,24 @@ function renderElement(request, task, keyPath, type, props, ref) {
4733
4978
  if ("object" === typeof type && null !== type)
4734
4979
  switch (type.$$typeof) {
4735
4980
  case REACT_FORWARD_REF_TYPE:
4736
- if ("ref" in props)
4737
- for (fallback in ((newProps = {}), props))
4738
- "ref" !== fallback && (newProps[fallback] = props[fallback]);
4739
- else newProps = props;
4740
- type = renderWithHooks(
4981
+ if ("ref" in props) {
4982
+ var propsWithoutRef = {};
4983
+ for (var key in props)
4984
+ "ref" !== key && (propsWithoutRef[key] = props[key]);
4985
+ } else propsWithoutRef = props;
4986
+ var children$jscomp$1 = renderWithHooks(
4741
4987
  request,
4742
4988
  task,
4743
4989
  keyPath,
4744
4990
  type.render,
4745
- newProps,
4991
+ propsWithoutRef,
4746
4992
  ref
4747
4993
  );
4748
4994
  finishFunctionComponent(
4749
4995
  request,
4750
4996
  task,
4751
4997
  keyPath,
4752
- type,
4998
+ children$jscomp$1,
4753
4999
  0 !== localIdCounter,
4754
5000
  actionStateCounter,
4755
5001
  actionStateMatchingIndex
@@ -4759,45 +5005,47 @@ function renderElement(request, task, keyPath, type, props, ref) {
4759
5005
  renderElement(request, task, keyPath, type.type, props, ref);
4760
5006
  return;
4761
5007
  case REACT_CONTEXT_TYPE:
4762
- defaultProps = props.children;
4763
- newProps = task.keyPath;
4764
- props = props.value;
4765
- initialState = type._currentValue2;
4766
- type._currentValue2 = props;
4767
- ref = currentActiveSnapshot;
4768
- currentActiveSnapshot = type = {
4769
- parent: ref,
4770
- depth: null === ref ? 0 : ref.depth + 1,
4771
- context: type,
4772
- parentValue: initialState,
4773
- value: props
4774
- };
4775
- task.context = type;
5008
+ var children$jscomp$2 = props.children,
5009
+ prevKeyPath$jscomp$6 = task.keyPath,
5010
+ nextValue = props.value;
5011
+ var prevValue = type._currentValue2;
5012
+ type._currentValue2 = nextValue;
5013
+ var prevNode = currentActiveSnapshot,
5014
+ newNode = {
5015
+ parent: prevNode,
5016
+ depth: null === prevNode ? 0 : prevNode.depth + 1,
5017
+ context: type,
5018
+ parentValue: prevValue,
5019
+ value: nextValue
5020
+ };
5021
+ currentActiveSnapshot = newNode;
5022
+ task.context = newNode;
4776
5023
  task.keyPath = keyPath;
4777
- renderNodeDestructive(request, task, defaultProps, -1);
4778
- request = currentActiveSnapshot;
4779
- if (null === request)
5024
+ renderNodeDestructive(request, task, children$jscomp$2, -1);
5025
+ var prevSnapshot = currentActiveSnapshot;
5026
+ if (null === prevSnapshot)
4780
5027
  throw Error(
4781
5028
  "Tried to pop a Context at the root of the app. This is a bug in React."
4782
5029
  );
4783
- request.context._currentValue2 = request.parentValue;
4784
- request = currentActiveSnapshot = request.parent;
4785
- task.context = request;
4786
- task.keyPath = newProps;
5030
+ prevSnapshot.context._currentValue2 = prevSnapshot.parentValue;
5031
+ var JSCompiler_inline_result$jscomp$2 = (currentActiveSnapshot =
5032
+ prevSnapshot.parent);
5033
+ task.context = JSCompiler_inline_result$jscomp$2;
5034
+ task.keyPath = prevKeyPath$jscomp$6;
4787
5035
  return;
4788
5036
  case REACT_CONSUMER_TYPE:
4789
- props = props.children;
4790
- type = props(type._context._currentValue2);
4791
- props = task.keyPath;
5037
+ var render = props.children,
5038
+ newChildren = render(type._context._currentValue2),
5039
+ prevKeyPath$jscomp$7 = task.keyPath;
4792
5040
  task.keyPath = keyPath;
4793
- renderNodeDestructive(request, task, type, -1);
4794
- task.keyPath = props;
5041
+ renderNodeDestructive(request, task, newChildren, -1);
5042
+ task.keyPath = prevKeyPath$jscomp$7;
4795
5043
  return;
4796
5044
  case REACT_LAZY_TYPE:
4797
- newProps = type._init;
4798
- type = newProps(type._payload);
4799
- if (12 === request.status) throw null;
4800
- renderElement(request, task, keyPath, type, props, ref);
5045
+ var init = type._init;
5046
+ var Component = init(type._payload);
5047
+ if (request.aborted) throw null;
5048
+ renderElement(request, task, keyPath, Component, props, ref);
4801
5049
  return;
4802
5050
  }
4803
5051
  throw Error(
@@ -4857,7 +5105,11 @@ function retryNode(request, task) {
4857
5105
  var ref = void 0 !== node ? node : null,
4858
5106
  name = getComponentNameFromType(type),
4859
5107
  keyOrIndex =
4860
- null == key ? (-1 === childIndex ? 0 : childIndex) : key;
5108
+ null == key || key === REACT_OPTIMISTIC_KEY
5109
+ ? -1 === childIndex
5110
+ ? 0
5111
+ : childIndex
5112
+ : key;
4861
5113
  key = [task.keyPath, name, keyOrIndex];
4862
5114
  if (null !== task.replay)
4863
5115
  a: {
@@ -4875,12 +5127,12 @@ function retryNode(request, task) {
4875
5127
  name +
4876
5128
  ">. The tree doesn't match so React will fallback to client rendering."
4877
5129
  );
4878
- var childNodes = node$jscomp$0[2];
4879
- name = node$jscomp$0[3];
4880
- keyOrIndex = task.node;
5130
+ var childNodes = node$jscomp$0[2],
5131
+ childSlots = node$jscomp$0[3],
5132
+ currentNode = task.node;
4881
5133
  task.replay = {
4882
5134
  nodes: childNodes,
4883
- slots: name,
5135
+ slots: childSlots,
4884
5136
  pendingTasks: 1
4885
5137
  };
4886
5138
  try {
@@ -4898,27 +5150,28 @@ function retryNode(request, task) {
4898
5150
  "object" === typeof x &&
4899
5151
  null !== x &&
4900
5152
  (x === SuspenseException ||
4901
- "function" === typeof x.then)
5153
+ "function" === typeof x.then ||
5154
+ "Maximum call stack size exceeded" === x.message)
4902
5155
  )
4903
5156
  throw (
4904
- (task.node === keyOrIndex
5157
+ (task.node === currentNode
4905
5158
  ? (task.replay = replay)
4906
5159
  : childIndex.splice(node, 1),
4907
5160
  x)
4908
5161
  );
4909
5162
  task.replay.pendingTasks--;
4910
- props = getThrownInfo(task.componentStack);
4911
- key = request;
4912
- request = task.blockedBoundary;
4913
- type = x;
4914
- props = logRecoverableError(key, type, props);
5163
+ key = getThrownInfo(task.componentStack);
5164
+ currentNode = request;
5165
+ props = task.blockedBoundary;
5166
+ request = request.aborted ? request.fatalError : x;
5167
+ key = logRecoverableError(currentNode, request, key);
4915
5168
  abortRemainingReplayNodes(
4916
- key,
4917
- request,
5169
+ currentNode,
5170
+ props,
4918
5171
  childNodes,
4919
- name,
4920
- type,
4921
- props
5172
+ childSlots,
5173
+ request,
5174
+ key
4922
5175
  );
4923
5176
  }
4924
5177
  task.replay = replay;
@@ -4930,34 +5183,33 @@ function retryNode(request, task) {
4930
5183
  ">. The tree doesn't match so React will fallback to client rendering."
4931
5184
  );
4932
5185
  b: {
4933
- replay = void 0;
4934
- type = node$jscomp$0[5];
4935
- ref = node$jscomp$0[2];
4936
- name = node$jscomp$0[3];
4937
- keyOrIndex =
5186
+ replay = node$jscomp$0[5];
5187
+ type = node$jscomp$0[2];
5188
+ ref = node$jscomp$0[3];
5189
+ name =
4938
5190
  null === node$jscomp$0[4] ? [] : node$jscomp$0[4][2];
4939
5191
  node$jscomp$0 =
4940
5192
  null === node$jscomp$0[4] ? null : node$jscomp$0[4][3];
4941
- var prevKeyPath = task.keyPath,
4942
- prevContext = task.formatContext,
5193
+ keyOrIndex = task.keyPath;
5194
+ var prevContext = task.formatContext,
4943
5195
  prevRow = task.row,
4944
5196
  previousReplaySet = task.replay,
4945
5197
  parentBoundary = task.blockedBoundary,
4946
5198
  parentHoistableState = task.hoistableState,
4947
- content = props.children,
4948
- fallback = props.fallback,
4949
- fallbackAbortSet = new Set();
4950
- props = createSuspenseBoundary(
4951
- request,
4952
- task.row,
4953
- fallbackAbortSet,
4954
- null,
4955
- null
4956
- );
4957
- props.parentFlushed = !0;
4958
- props.rootSegmentID = type;
4959
- task.blockedBoundary = props;
4960
- task.hoistableState = props.contentState;
5199
+ content = props.children;
5200
+ props = props.fallback;
5201
+ var fallbackAbortSet = new Set(),
5202
+ resumedBoundary = createSuspenseBoundary(
5203
+ request,
5204
+ task.row,
5205
+ fallbackAbortSet,
5206
+ null,
5207
+ !1
5208
+ );
5209
+ resumedBoundary.parentFlushed = !0;
5210
+ resumedBoundary.rootSegmentID = replay;
5211
+ task.blockedBoundary = resumedBoundary;
5212
+ task.hoistableState = resumedBoundary.contentState;
4961
5213
  task.keyPath = key;
4962
5214
  task.formatContext = getSuspenseContentFormatContext(
4963
5215
  request.resumableState,
@@ -4965,8 +5217,8 @@ function retryNode(request, task) {
4965
5217
  );
4966
5218
  task.row = null;
4967
5219
  task.replay = {
4968
- nodes: ref,
4969
- slots: name,
5220
+ nodes: type,
5221
+ slots: ref,
4970
5222
  pendingTasks: 1
4971
5223
  };
4972
5224
  try {
@@ -4979,42 +5231,46 @@ function retryNode(request, task) {
4979
5231
  "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
4980
5232
  );
4981
5233
  task.replay.pendingTasks--;
4982
- if (0 === props.pendingTasks && 0 === props.status) {
4983
- props.status = 1;
4984
- request.completedBoundaries.push(props);
5234
+ if (
5235
+ 0 === resumedBoundary.pendingTasks &&
5236
+ 0 === resumedBoundary.status
5237
+ ) {
5238
+ resumedBoundary.status = 1;
5239
+ request.completedBoundaries.push(resumedBoundary);
4985
5240
  break b;
4986
5241
  }
4987
- } catch (error) {
4988
- (props.status = 4),
4989
- (childNodes = getThrownInfo(task.componentStack)),
4990
- (replay = logRecoverableError(
5242
+ } catch (thrownValue) {
5243
+ (resumedBoundary.status = 4),
5244
+ (childNodes = request.aborted
5245
+ ? request.fatalError
5246
+ : thrownValue),
5247
+ (childSlots = getThrownInfo(task.componentStack)),
5248
+ (currentNode = logRecoverableError(
4991
5249
  request,
4992
- error,
4993
- childNodes
5250
+ childNodes,
5251
+ childSlots
4994
5252
  )),
4995
- (props.errorDigest = replay),
5253
+ (resumedBoundary.errorDigest = currentNode),
4996
5254
  task.replay.pendingTasks--,
4997
- request.clientRenderedBoundaries.push(props);
5255
+ request.clientRenderedBoundaries.push(
5256
+ resumedBoundary
5257
+ );
4998
5258
  } finally {
4999
5259
  (task.blockedBoundary = parentBoundary),
5000
5260
  (task.hoistableState = parentHoistableState),
5001
5261
  (task.replay = previousReplaySet),
5002
- (task.keyPath = prevKeyPath),
5262
+ (task.keyPath = keyOrIndex),
5003
5263
  (task.formatContext = prevContext),
5004
5264
  (task.row = prevRow);
5005
5265
  }
5006
5266
  childNodes = createReplayTask(
5007
5267
  request,
5008
5268
  null,
5009
- {
5010
- nodes: keyOrIndex,
5011
- slots: node$jscomp$0,
5012
- pendingTasks: 0
5013
- },
5014
- fallback,
5269
+ { nodes: name, slots: node$jscomp$0, pendingTasks: 0 },
5270
+ props,
5015
5271
  -1,
5016
5272
  parentBoundary,
5017
- props.fallbackState,
5273
+ resumedBoundary.fallbackState,
5018
5274
  fallbackAbortSet,
5019
5275
  [key[0], "Suspense Fallback", key[2]],
5020
5276
  getSuspenseFallbackFormatContext(
@@ -5046,7 +5302,7 @@ function retryNode(request, task) {
5046
5302
  case REACT_LAZY_TYPE:
5047
5303
  childNodes = node._init;
5048
5304
  node = childNodes(node._payload);
5049
- if (12 === request.status) throw null;
5305
+ if (request.aborted) throw null;
5050
5306
  renderNodeDestructive(request, task, node, childIndex);
5051
5307
  return;
5052
5308
  }
@@ -5058,10 +5314,10 @@ function retryNode(request, task) {
5058
5314
  if ((childNodes = childNodes.call(node))) {
5059
5315
  node = childNodes.next();
5060
5316
  if (!node.done) {
5061
- props = [];
5062
- do props.push(node.value), (node = childNodes.next());
5317
+ childSlots = [];
5318
+ do childSlots.push(node.value), (node = childNodes.next());
5063
5319
  while (!node.done);
5064
- renderChildrenArray(request, task, props, childIndex);
5320
+ renderChildrenArray(request, task, childSlots, childIndex);
5065
5321
  }
5066
5322
  return;
5067
5323
  }
@@ -5138,17 +5394,18 @@ function renderChildrenArray(request, task, children, childIndex) {
5138
5394
  )
5139
5395
  throw x;
5140
5396
  task.replay.pendingTasks--;
5141
- children = getThrownInfo(task.componentStack);
5142
- var boundary = task.blockedBoundary,
5143
- error = x;
5144
- children = logRecoverableError(request, error, children);
5397
+ var thrownInfo = getThrownInfo(task.componentStack);
5398
+ children = request;
5399
+ var boundary = task.blockedBoundary;
5400
+ request = request.aborted ? request.fatalError : x;
5401
+ thrownInfo = logRecoverableError(children, request, thrownInfo);
5145
5402
  abortRemainingReplayNodes(
5146
- request,
5403
+ children,
5147
5404
  boundary,
5148
5405
  childIndex,
5149
5406
  node,
5150
- error,
5151
- children
5407
+ request,
5408
+ thrownInfo
5152
5409
  );
5153
5410
  }
5154
5411
  task.replay = replay;
@@ -5187,13 +5444,18 @@ function renderChildrenArray(request, task, children, childIndex) {
5187
5444
  function trackPostponedBoundary(request, trackedPostpones, boundary) {
5188
5445
  boundary.status = 5;
5189
5446
  boundary.rootSegmentID = request.nextSegmentId++;
5190
- request = boundary.trackedContentKeyPath;
5447
+ var tracked = boundary.tracked;
5448
+ if (null === tracked)
5449
+ throw Error(
5450
+ "It should not be possible to postpone at the root. This is a bug in React."
5451
+ );
5452
+ request = tracked.contentKeyPath;
5191
5453
  if (null === request)
5192
5454
  throw Error(
5193
5455
  "It should not be possible to postpone at the root. This is a bug in React."
5194
5456
  );
5195
- var fallbackReplayNode = boundary.trackedFallbackNode,
5196
- children = [],
5457
+ tracked = tracked.fallbackNode;
5458
+ var children = [],
5197
5459
  boundaryNode = trackedPostpones.workingMap.get(request);
5198
5460
  if (void 0 === boundaryNode)
5199
5461
  return (
@@ -5202,14 +5464,14 @@ function trackPostponedBoundary(request, trackedPostpones, boundary) {
5202
5464
  request[2],
5203
5465
  children,
5204
5466
  null,
5205
- fallbackReplayNode,
5467
+ tracked,
5206
5468
  boundary.rootSegmentID
5207
5469
  ]),
5208
5470
  trackedPostpones.workingMap.set(request, boundary),
5209
5471
  addToReplayParent(boundary, request[0], trackedPostpones),
5210
5472
  boundary
5211
5473
  );
5212
- boundaryNode[4] = fallbackReplayNode;
5474
+ boundaryNode[4] = tracked;
5213
5475
  boundaryNode[5] = boundary.rootSegmentID;
5214
5476
  return boundaryNode;
5215
5477
  }
@@ -5230,7 +5492,8 @@ function trackPostpone(request, trackedPostpones, task, segment) {
5230
5492
  boundary
5231
5493
  );
5232
5494
  if (
5233
- boundary.trackedContentKeyPath === keyPath &&
5495
+ null !== boundary.tracked &&
5496
+ boundary.tracked.contentKeyPath === keyPath &&
5234
5497
  -1 === task.childIndex
5235
5498
  ) {
5236
5499
  -1 === segment.id &&
@@ -5286,11 +5549,13 @@ function trackPostpone(request, trackedPostpones, task, segment) {
5286
5549
  function untrackBoundary(request, boundary) {
5287
5550
  request = request.trackedPostpones;
5288
5551
  null !== request &&
5289
- ((boundary = boundary.trackedContentKeyPath),
5552
+ ((boundary = boundary.tracked),
5290
5553
  null !== boundary &&
5291
- ((boundary = request.workingMap.get(boundary)),
5292
- void 0 !== boundary &&
5293
- ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
5554
+ ((boundary = boundary.contentKeyPath),
5555
+ null !== boundary &&
5556
+ ((request = request.workingMap.get(boundary)),
5557
+ void 0 !== request &&
5558
+ ((request.length = 4), (request[2] = []), (request[3] = null)))));
5294
5559
  }
5295
5560
  function spawnNewSuspendedReplayTask(request, task, thenableState) {
5296
5561
  return createReplayTask(
@@ -5358,7 +5623,7 @@ function renderNode(request, task, node, childIndex) {
5358
5623
  thrownValue === SuspenseException
5359
5624
  ? getSuspendedThenable()
5360
5625
  : thrownValue),
5361
- 12 !== request.status && "object" === typeof node && null !== node)
5626
+ !request.aborted && "object" === typeof node && null !== node)
5362
5627
  ) {
5363
5628
  if ("function" === typeof node.then) {
5364
5629
  childIndex =
@@ -5366,7 +5631,7 @@ function renderNode(request, task, node, childIndex) {
5366
5631
  ? getThenableStateAfterSuspending()
5367
5632
  : null;
5368
5633
  request = spawnNewSuspendedReplayTask(request, task, childIndex).ping;
5369
- node.then(request, request);
5634
+ node.then(request.resolve, request.reject);
5370
5635
  task.formatContext = previousFormatContext;
5371
5636
  task.context = previousContext;
5372
5637
  task.keyPath = previousKeyPath;
@@ -5399,25 +5664,25 @@ function renderNode(request, task, node, childIndex) {
5399
5664
  chunkLength = segment.chunks.length;
5400
5665
  try {
5401
5666
  return renderNodeDestructive(request, task, node, childIndex);
5402
- } catch (thrownValue$62) {
5667
+ } catch (thrownValue$63) {
5403
5668
  if (
5404
5669
  (resetHooksState(),
5405
5670
  (segment.children.length = childrenLength),
5406
5671
  (segment.chunks.length = chunkLength),
5407
5672
  (node =
5408
- thrownValue$62 === SuspenseException
5673
+ thrownValue$63 === SuspenseException
5409
5674
  ? getSuspendedThenable()
5410
- : thrownValue$62),
5411
- 12 !== request.status && "object" === typeof node && null !== node)
5675
+ : thrownValue$63),
5676
+ !request.aborted && "object" === typeof node && null !== node)
5412
5677
  ) {
5413
5678
  if ("function" === typeof node.then) {
5414
5679
  segment = node;
5415
5680
  node =
5416
- thrownValue$62 === SuspenseException
5681
+ thrownValue$63 === SuspenseException
5417
5682
  ? getThenableStateAfterSuspending()
5418
5683
  : null;
5419
5684
  request = spawnNewSuspendedRenderTask(request, task, node).ping;
5420
- segment.then(request, request);
5685
+ segment.then(request.resolve, request.reject);
5421
5686
  task.formatContext = previousFormatContext;
5422
5687
  task.context = previousContext;
5423
5688
  task.keyPath = previousKeyPath;
@@ -5428,7 +5693,7 @@ function renderNode(request, task, node, childIndex) {
5428
5693
  }
5429
5694
  if ("Maximum call stack size exceeded" === node.message) {
5430
5695
  segment =
5431
- thrownValue$62 === SuspenseException
5696
+ thrownValue$63 === SuspenseException
5432
5697
  ? getThenableStateAfterSuspending()
5433
5698
  : null;
5434
5699
  segment = spawnNewSuspendedRenderTask(request, task, segment);
@@ -5485,7 +5750,7 @@ function abortRemainingReplayNodes(
5485
5750
  null,
5486
5751
  new Set(),
5487
5752
  null,
5488
- null
5753
+ !1
5489
5754
  );
5490
5755
  resumedBoundary.parentFlushed = !0;
5491
5756
  resumedBoundary.rootSegmentID = node;
@@ -5509,78 +5774,104 @@ function abortRemainingReplayNodes(
5509
5774
  if ("object" === typeof slots) for (var index in slots) delete slots[index];
5510
5775
  }
5511
5776
  }
5512
- function abortTask(task, request, error) {
5513
- var boundary = task.blockedBoundary,
5514
- segment = task.blockedSegment;
5515
- if (null !== segment) {
5516
- if (6 === segment.status) return;
5517
- segment.status = 3;
5777
+ function abortTask(task, request) {
5778
+ if (task !== request.currentTask) {
5779
+ var boundary = task.blockedBoundary;
5780
+ task = task.blockedSegment;
5781
+ null !== task && (task.status = 3);
5782
+ null !== boundary &&
5783
+ boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
5784
+ return abortTask(fallbackTask, request);
5785
+ });
5518
5786
  }
5519
- var errorInfo = getThrownInfo(task.componentStack);
5520
- if (null === boundary) {
5521
- if (13 !== request.status && 14 !== request.status) {
5522
- boundary = task.replay;
5787
+ }
5788
+ function finishAbortedTask(task, request, error) {
5789
+ if (task !== request.currentTask) {
5790
+ var boundary = task.blockedBoundary,
5791
+ segment = task.blockedSegment;
5792
+ if (null === segment || 3 === segment.status) {
5793
+ var errorInfo = getThrownInfo(task.componentStack),
5794
+ isRecoverableReason = isRecoverableError(error);
5523
5795
  if (null === boundary) {
5524
- null !== request.trackedPostpones && null !== segment
5525
- ? ((boundary = request.trackedPostpones),
5526
- logRecoverableError(request, error, errorInfo),
5527
- trackPostpone(request, boundary, task, segment),
5528
- finishedTask(request, null, task.row, segment))
5529
- : (logRecoverableError(request, error, errorInfo),
5530
- fatalError(request, error));
5531
- return;
5796
+ boundary = task.replay;
5797
+ if (null === boundary) {
5798
+ isRecoverableReason ||
5799
+ null === request.trackedPostpones ||
5800
+ null === segment
5801
+ ? isRecoverableReason
5802
+ ? ((task = cloneRecoverableErrorAsFatal(error)),
5803
+ logRecoverableError(request, task, errorInfo),
5804
+ 12 !== request.status &&
5805
+ 13 !== request.status &&
5806
+ fatalError(request, task))
5807
+ : (logRecoverableError(request, error, errorInfo),
5808
+ 12 !== request.status &&
5809
+ 13 !== request.status &&
5810
+ fatalError(request, error))
5811
+ : ((boundary = request.trackedPostpones),
5812
+ logRecoverableError(request, error, errorInfo),
5813
+ trackPostpone(request, boundary, task, segment),
5814
+ finishedTask(request, null, task.row, segment));
5815
+ return;
5816
+ }
5817
+ 12 !== request.status &&
5818
+ 13 !== request.status &&
5819
+ (boundary.pendingTasks--,
5820
+ 0 === boundary.pendingTasks &&
5821
+ 0 < boundary.nodes.length &&
5822
+ ((errorInfo = logRecoverableError(request, error, errorInfo)),
5823
+ abortRemainingReplayNodes(
5824
+ request,
5825
+ null,
5826
+ boundary.nodes,
5827
+ boundary.slots,
5828
+ error,
5829
+ errorInfo
5830
+ )),
5831
+ request.pendingRootTasks--,
5832
+ 0 === request.pendingRootTasks && completeShell(request));
5833
+ } else {
5834
+ var trackedPostpones$64 = request.trackedPostpones;
5835
+ if (4 !== boundary.status) {
5836
+ if (
5837
+ !isRecoverableReason &&
5838
+ null !== trackedPostpones$64 &&
5839
+ null !== segment
5840
+ )
5841
+ return (
5842
+ logRecoverableError(request, error, errorInfo),
5843
+ trackPostpone(request, trackedPostpones$64, task, segment),
5844
+ boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
5845
+ return finishAbortedTask(fallbackTask, request, error);
5846
+ }),
5847
+ boundary.fallbackAbortableTasks.clear(),
5848
+ finishedTask(request, boundary, task.row, segment)
5849
+ );
5850
+ boundary.status = 4;
5851
+ errorInfo = logRecoverableError(request, error, errorInfo);
5852
+ boundary.errorDigest = errorInfo;
5853
+ untrackBoundary(request, boundary);
5854
+ boundary.parentFlushed &&
5855
+ request.clientRenderedBoundaries.push(boundary);
5856
+ }
5857
+ boundary.pendingTasks--;
5858
+ errorInfo = boundary.row;
5859
+ null !== errorInfo &&
5860
+ 0 === --errorInfo.pendingTasks &&
5861
+ finishSuspenseListRow(request, errorInfo);
5862
+ boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
5863
+ return finishAbortedTask(fallbackTask, request, error);
5864
+ });
5865
+ boundary.fallbackAbortableTasks.clear();
5532
5866
  }
5533
- boundary.pendingTasks--;
5534
- 0 === boundary.pendingTasks &&
5535
- 0 < boundary.nodes.length &&
5536
- ((segment = logRecoverableError(request, error, errorInfo)),
5537
- abortRemainingReplayNodes(
5538
- request,
5539
- null,
5540
- boundary.nodes,
5541
- boundary.slots,
5542
- error,
5543
- segment
5544
- ));
5545
- request.pendingRootTasks--;
5546
- 0 === request.pendingRootTasks && completeShell(request);
5547
- }
5548
- } else {
5549
- var trackedPostpones$63 = request.trackedPostpones;
5550
- if (4 !== boundary.status) {
5551
- if (null !== trackedPostpones$63 && null !== segment)
5552
- return (
5553
- logRecoverableError(request, error, errorInfo),
5554
- trackPostpone(request, trackedPostpones$63, task, segment),
5555
- boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
5556
- return abortTask(fallbackTask, request, error);
5557
- }),
5558
- boundary.fallbackAbortableTasks.clear(),
5559
- finishedTask(request, boundary, task.row, segment)
5560
- );
5561
- boundary.status = 4;
5562
- segment = logRecoverableError(request, error, errorInfo);
5563
- boundary.status = 4;
5564
- boundary.errorDigest = segment;
5565
- untrackBoundary(request, boundary);
5566
- boundary.parentFlushed && request.clientRenderedBoundaries.push(boundary);
5867
+ task = task.row;
5868
+ null !== task &&
5869
+ 0 === --task.pendingTasks &&
5870
+ finishSuspenseListRow(request, task);
5871
+ request.allPendingTasks--;
5872
+ 0 === request.allPendingTasks && completeAll(request);
5567
5873
  }
5568
- boundary.pendingTasks--;
5569
- segment = boundary.row;
5570
- null !== segment &&
5571
- 0 === --segment.pendingTasks &&
5572
- finishSuspenseListRow(request, segment);
5573
- boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
5574
- return abortTask(fallbackTask, request, error);
5575
- });
5576
- boundary.fallbackAbortableTasks.clear();
5577
5874
  }
5578
- task = task.row;
5579
- null !== task &&
5580
- 0 === --task.pendingTasks &&
5581
- finishSuspenseListRow(request, task);
5582
- request.allPendingTasks--;
5583
- 0 === request.allPendingTasks && completeAll(request);
5584
5875
  }
5585
5876
  function safelyEmitEarlyPreloads(request, shellComplete) {
5586
5877
  try {
@@ -5646,7 +5937,6 @@ function safelyEmitEarlyPreloads(request, shellComplete) {
5646
5937
  function completeShell(request) {
5647
5938
  null === request.trackedPostpones && safelyEmitEarlyPreloads(request, !0);
5648
5939
  null === request.trackedPostpones && preparePreamble(request);
5649
- request.onShellError = noop;
5650
5940
  request = request.onShellReady;
5651
5941
  request();
5652
5942
  }
@@ -5709,14 +5999,16 @@ function finishedTask(request, boundary, row, segment) {
5709
5999
  null !== row &&
5710
6000
  hoistHoistables(row.hoistables, boundary.contentState),
5711
6001
  isEligibleForOutlining(request, boundary) ||
5712
- (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
6002
+ (request.allPendingTasks++,
6003
+ boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
5713
6004
  boundary.fallbackAbortableTasks.clear(),
5714
6005
  null !== row &&
5715
6006
  0 === --row.pendingTasks &&
5716
- finishSuspenseListRow(request, row)),
6007
+ finishSuspenseListRow(request, row),
6008
+ request.allPendingTasks--),
5717
6009
  0 === request.pendingRootTasks &&
5718
6010
  null === request.trackedPostpones &&
5719
- null !== boundary.contentPreamble &&
6011
+ null !== boundary.preamble &&
5720
6012
  preparePreamble(request);
5721
6013
  else {
5722
6014
  if (
@@ -5740,8 +6032,10 @@ function finishedTask(request, boundary, row, segment) {
5740
6032
  finishedTask(request, postponedBoundary, null, null);
5741
6033
  }
5742
6034
  }
6035
+ request.allPendingTasks++;
5743
6036
  0 === --boundary.pendingTasks &&
5744
6037
  finishSuspenseListRow(request, boundary);
6038
+ request.allPendingTasks--;
5745
6039
  }
5746
6040
  }
5747
6041
  else
@@ -5758,211 +6052,255 @@ function finishedTask(request, boundary, row, segment) {
5758
6052
  tryToResolveTogetherRow(request, boundary);
5759
6053
  0 === request.allPendingTasks && completeAll(request);
5760
6054
  }
5761
- function performWork(request$jscomp$2) {
5762
- if (14 !== request$jscomp$2.status && 13 !== request$jscomp$2.status) {
6055
+ function performWork(request$jscomp$1) {
6056
+ if (!(request$jscomp$1.aborted || 11 < request$jscomp$1.status)) {
5763
6057
  var prevContext = currentActiveSnapshot,
5764
6058
  prevDispatcher = ReactSharedInternals.H;
5765
6059
  ReactSharedInternals.H = HooksDispatcher;
5766
6060
  var prevAsyncDispatcher = ReactSharedInternals.A;
5767
6061
  ReactSharedInternals.A = DefaultAsyncDispatcher;
5768
6062
  var prevRequest = currentRequest;
5769
- currentRequest = request$jscomp$2;
6063
+ currentRequest = request$jscomp$1;
5770
6064
  var prevResumableState = currentResumableState;
5771
- currentResumableState = request$jscomp$2.resumableState;
6065
+ currentResumableState = request$jscomp$1.resumableState;
5772
6066
  try {
5773
- var pingedTasks = request$jscomp$2.pingedTasks,
6067
+ var pingedTasks = request$jscomp$1.pingedTasks,
5774
6068
  i;
5775
6069
  for (i = 0; i < pingedTasks.length; i++) {
5776
6070
  var task = pingedTasks[i],
5777
- request = request$jscomp$2,
6071
+ request = request$jscomp$1,
5778
6072
  segment = task.blockedSegment;
5779
- if (null === segment) {
5780
- var request$jscomp$0 = request;
5781
- if (0 !== task.replay.pendingTasks) {
6073
+ if (null === segment)
6074
+ a: {
6075
+ if (0 !== task.replay.pendingTasks) {
6076
+ var prevTask = request.currentTask;
6077
+ request.currentTask = task;
6078
+ switchContext(task.context);
6079
+ var startNode = task.node;
6080
+ try {
6081
+ "number" === typeof task.replay.slots
6082
+ ? resumeNode(
6083
+ request,
6084
+ task,
6085
+ task.replay.slots,
6086
+ task.node,
6087
+ task.childIndex
6088
+ )
6089
+ : retryNode(request, task);
6090
+ if (
6091
+ 1 === task.replay.pendingTasks &&
6092
+ 0 < task.replay.nodes.length
6093
+ )
6094
+ throw Error(
6095
+ "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
6096
+ );
6097
+ task.replay.pendingTasks--;
6098
+ task.abortSet.delete(task);
6099
+ finishedTask(request, task.blockedBoundary, task.row, null);
6100
+ } catch (thrownValue) {
6101
+ resetHooksState();
6102
+ var x =
6103
+ thrownValue === SuspenseException
6104
+ ? getSuspendedThenable()
6105
+ : thrownValue;
6106
+ if (request.aborted) {
6107
+ thrownValue === SuspenseException &&
6108
+ (task.thenableState = getThenableStateAfterSuspending());
6109
+ request.currentTask = prevTask;
6110
+ var request$jscomp$0 = request;
6111
+ abortTask(task, request$jscomp$0);
6112
+ task.abortSet.delete(task);
6113
+ finishAbortedTask(
6114
+ task,
6115
+ request$jscomp$0,
6116
+ request$jscomp$0.fatalError
6117
+ );
6118
+ } else {
6119
+ if ("object" === typeof x && null !== x) {
6120
+ if ("function" === typeof x.then) {
6121
+ var ping = task.ping;
6122
+ x.then(ping.resolve, ping.reject);
6123
+ task.thenableState =
6124
+ thrownValue === SuspenseException
6125
+ ? getThenableStateAfterSuspending()
6126
+ : null;
6127
+ break a;
6128
+ }
6129
+ if (
6130
+ "Maximum call stack size exceeded" === x.message &&
6131
+ task.node !== startNode
6132
+ ) {
6133
+ task.thenableState = null;
6134
+ request.pingedTasks.push(task);
6135
+ break a;
6136
+ }
6137
+ }
6138
+ task.replay.pendingTasks--;
6139
+ task.abortSet.delete(task);
6140
+ var errorInfo = getThrownInfo(task.componentStack);
6141
+ request$jscomp$0 = request;
6142
+ var boundary = task.blockedBoundary,
6143
+ error$jscomp$0 = request.aborted ? request.fatalError : x,
6144
+ replayNodes = task.replay.nodes,
6145
+ resumeSlots = task.replay.slots,
6146
+ errorDigest = logRecoverableError(
6147
+ request$jscomp$0,
6148
+ error$jscomp$0,
6149
+ errorInfo
6150
+ );
6151
+ abortRemainingReplayNodes(
6152
+ request$jscomp$0,
6153
+ boundary,
6154
+ replayNodes,
6155
+ resumeSlots,
6156
+ error$jscomp$0,
6157
+ errorDigest
6158
+ );
6159
+ request.pendingRootTasks--;
6160
+ 0 === request.pendingRootTasks && completeShell(request);
6161
+ request.allPendingTasks--;
6162
+ 0 === request.allPendingTasks && completeAll(request);
6163
+ }
6164
+ } finally {
6165
+ request.currentTask = prevTask;
6166
+ }
6167
+ }
6168
+ }
6169
+ else
6170
+ a: if (
6171
+ ((request$jscomp$0 = segment), 0 === request$jscomp$0.status)
6172
+ ) {
6173
+ var prevTask$jscomp$0 = request.currentTask;
6174
+ request.currentTask = task;
5782
6175
  switchContext(task.context);
6176
+ var childrenLength = request$jscomp$0.children.length,
6177
+ chunkLength = request$jscomp$0.chunks.length,
6178
+ startNode$jscomp$0 = task.node;
5783
6179
  try {
5784
- "number" === typeof task.replay.slots
5785
- ? resumeNode(
5786
- request$jscomp$0,
5787
- task,
5788
- task.replay.slots,
5789
- task.node,
5790
- task.childIndex
5791
- )
5792
- : retryNode(request$jscomp$0, task);
5793
- if (
5794
- 1 === task.replay.pendingTasks &&
5795
- 0 < task.replay.nodes.length
5796
- )
5797
- throw Error(
5798
- "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
6180
+ retryNode(request, task),
6181
+ pushSegmentFinale(
6182
+ request$jscomp$0.chunks,
6183
+ request.renderState,
6184
+ request$jscomp$0.lastPushedText,
6185
+ request$jscomp$0.textEmbedded
6186
+ ),
6187
+ task.abortSet.delete(task),
6188
+ (request$jscomp$0.status = 1),
6189
+ finishedTask(
6190
+ request,
6191
+ task.blockedBoundary,
6192
+ task.row,
6193
+ request$jscomp$0
5799
6194
  );
5800
- task.replay.pendingTasks--;
5801
- task.abortSet.delete(task);
5802
- finishedTask(
5803
- request$jscomp$0,
5804
- task.blockedBoundary,
5805
- task.row,
5806
- null
5807
- );
5808
6195
  } catch (thrownValue) {
5809
6196
  resetHooksState();
5810
- var x =
6197
+ request$jscomp$0.children.length = childrenLength;
6198
+ request$jscomp$0.chunks.length = chunkLength;
6199
+ var x$jscomp$0 =
5811
6200
  thrownValue === SuspenseException
5812
6201
  ? getSuspendedThenable()
5813
6202
  : thrownValue;
5814
- if (
5815
- "object" === typeof x &&
5816
- null !== x &&
5817
- "function" === typeof x.then
5818
- ) {
5819
- var ping = task.ping;
5820
- x.then(ping, ping);
5821
- task.thenableState =
5822
- thrownValue === SuspenseException
5823
- ? getThenableStateAfterSuspending()
5824
- : null;
5825
- } else {
5826
- task.replay.pendingTasks--;
6203
+ if (request.aborted)
6204
+ thrownValue === SuspenseException &&
6205
+ (task.thenableState = getThenableStateAfterSuspending()),
6206
+ (request.currentTask = prevTask$jscomp$0),
6207
+ (request$jscomp$0 = request),
6208
+ abortTask(task, request$jscomp$0),
6209
+ task.abortSet.delete(task),
6210
+ finishAbortedTask(
6211
+ task,
6212
+ request$jscomp$0,
6213
+ request$jscomp$0.fatalError
6214
+ );
6215
+ else {
6216
+ if ("object" === typeof x$jscomp$0 && null !== x$jscomp$0) {
6217
+ if ("function" === typeof x$jscomp$0.then) {
6218
+ request$jscomp$0.status = 0;
6219
+ task.thenableState =
6220
+ thrownValue === SuspenseException
6221
+ ? getThenableStateAfterSuspending()
6222
+ : null;
6223
+ var ping$jscomp$0 = task.ping;
6224
+ x$jscomp$0.then(
6225
+ ping$jscomp$0.resolve,
6226
+ ping$jscomp$0.reject
6227
+ );
6228
+ break a;
6229
+ }
6230
+ if (
6231
+ "Maximum call stack size exceeded" === x$jscomp$0.message &&
6232
+ task.node !== startNode$jscomp$0
6233
+ ) {
6234
+ request$jscomp$0.status = 0;
6235
+ task.thenableState = null;
6236
+ request.pingedTasks.push(task);
6237
+ break a;
6238
+ }
6239
+ }
6240
+ var errorInfo$jscomp$0 = getThrownInfo(task.componentStack);
5827
6241
  task.abortSet.delete(task);
5828
- var errorInfo = getThrownInfo(task.componentStack);
5829
- request = void 0;
5830
- var request$jscomp$1 = request$jscomp$0,
5831
- boundary = task.blockedBoundary,
5832
- error$jscomp$0 =
5833
- 12 === request$jscomp$0.status
5834
- ? request$jscomp$0.fatalError
5835
- : x,
5836
- replayNodes = task.replay.nodes,
5837
- resumeSlots = task.replay.slots;
5838
- request = logRecoverableError(
5839
- request$jscomp$1,
5840
- error$jscomp$0,
5841
- errorInfo
5842
- );
5843
- abortRemainingReplayNodes(
5844
- request$jscomp$1,
5845
- boundary,
5846
- replayNodes,
5847
- resumeSlots,
5848
- error$jscomp$0,
5849
- request
5850
- );
5851
- request$jscomp$0.pendingRootTasks--;
5852
- 0 === request$jscomp$0.pendingRootTasks &&
5853
- completeShell(request$jscomp$0);
5854
- request$jscomp$0.allPendingTasks--;
5855
- 0 === request$jscomp$0.allPendingTasks &&
5856
- completeAll(request$jscomp$0);
6242
+ request$jscomp$0.status = 4;
6243
+ var boundary$jscomp$0 = task.blockedBoundary,
6244
+ row = task.row;
6245
+ null !== row &&
6246
+ 0 === --row.pendingTasks &&
6247
+ finishSuspenseListRow(request, row);
6248
+ request.allPendingTasks--;
6249
+ if (null === boundary$jscomp$0)
6250
+ if (isRecoverableError(x$jscomp$0)) {
6251
+ var fatalRecoverableError =
6252
+ cloneRecoverableErrorAsFatal(x$jscomp$0);
6253
+ logRecoverableError(
6254
+ request,
6255
+ fatalRecoverableError,
6256
+ errorInfo$jscomp$0
6257
+ );
6258
+ fatalError(request, fatalRecoverableError);
6259
+ } else
6260
+ logRecoverableError(
6261
+ request,
6262
+ x$jscomp$0,
6263
+ errorInfo$jscomp$0
6264
+ ),
6265
+ fatalError(request, x$jscomp$0);
6266
+ else {
6267
+ var errorDigest$jscomp$0 = logRecoverableError(
6268
+ request,
6269
+ x$jscomp$0,
6270
+ errorInfo$jscomp$0
6271
+ );
6272
+ boundary$jscomp$0.pendingTasks--;
6273
+ if (4 !== boundary$jscomp$0.status) {
6274
+ boundary$jscomp$0.status = 4;
6275
+ boundary$jscomp$0.errorDigest = errorDigest$jscomp$0;
6276
+ untrackBoundary(request, boundary$jscomp$0);
6277
+ var boundaryRow = boundary$jscomp$0.row;
6278
+ null !== boundaryRow &&
6279
+ (request.allPendingTasks++,
6280
+ 0 === --boundaryRow.pendingTasks &&
6281
+ finishSuspenseListRow(request, boundaryRow),
6282
+ request.allPendingTasks--);
6283
+ boundary$jscomp$0.parentFlushed &&
6284
+ request.clientRenderedBoundaries.push(boundary$jscomp$0);
6285
+ 0 === request.pendingRootTasks &&
6286
+ null === request.trackedPostpones &&
6287
+ null !== boundary$jscomp$0.preamble &&
6288
+ preparePreamble(request);
6289
+ }
6290
+ 0 === request.allPendingTasks && completeAll(request);
6291
+ }
5857
6292
  }
5858
6293
  } finally {
6294
+ request.currentTask = prevTask$jscomp$0;
5859
6295
  }
5860
6296
  }
5861
- } else if (
5862
- ((request$jscomp$0 = void 0),
5863
- (request$jscomp$1 = segment),
5864
- 0 === request$jscomp$1.status)
5865
- ) {
5866
- request$jscomp$1.status = 6;
5867
- switchContext(task.context);
5868
- var childrenLength = request$jscomp$1.children.length,
5869
- chunkLength = request$jscomp$1.chunks.length;
5870
- try {
5871
- retryNode(request, task),
5872
- pushSegmentFinale(
5873
- request$jscomp$1.chunks,
5874
- request.renderState,
5875
- request$jscomp$1.lastPushedText,
5876
- request$jscomp$1.textEmbedded
5877
- ),
5878
- task.abortSet.delete(task),
5879
- (request$jscomp$1.status = 1),
5880
- finishedTask(
5881
- request,
5882
- task.blockedBoundary,
5883
- task.row,
5884
- request$jscomp$1
5885
- );
5886
- } catch (thrownValue) {
5887
- resetHooksState();
5888
- request$jscomp$1.children.length = childrenLength;
5889
- request$jscomp$1.chunks.length = chunkLength;
5890
- var x$jscomp$0 =
5891
- thrownValue === SuspenseException
5892
- ? getSuspendedThenable()
5893
- : 12 === request.status
5894
- ? request.fatalError
5895
- : thrownValue;
5896
- if (12 === request.status && null !== request.trackedPostpones) {
5897
- var trackedPostpones = request.trackedPostpones,
5898
- thrownInfo = getThrownInfo(task.componentStack);
5899
- task.abortSet.delete(task);
5900
- logRecoverableError(request, x$jscomp$0, thrownInfo);
5901
- trackPostpone(request, trackedPostpones, task, request$jscomp$1);
5902
- finishedTask(
5903
- request,
5904
- task.blockedBoundary,
5905
- task.row,
5906
- request$jscomp$1
5907
- );
5908
- } else if (
5909
- "object" === typeof x$jscomp$0 &&
5910
- null !== x$jscomp$0 &&
5911
- "function" === typeof x$jscomp$0.then
5912
- ) {
5913
- request$jscomp$1.status = 0;
5914
- task.thenableState =
5915
- thrownValue === SuspenseException
5916
- ? getThenableStateAfterSuspending()
5917
- : null;
5918
- var ping$jscomp$0 = task.ping;
5919
- x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
5920
- } else {
5921
- var errorInfo$jscomp$0 = getThrownInfo(task.componentStack);
5922
- task.abortSet.delete(task);
5923
- request$jscomp$1.status = 4;
5924
- var boundary$jscomp$0 = task.blockedBoundary,
5925
- row = task.row;
5926
- null !== row &&
5927
- 0 === --row.pendingTasks &&
5928
- finishSuspenseListRow(request, row);
5929
- request.allPendingTasks--;
5930
- request$jscomp$0 = logRecoverableError(
5931
- request,
5932
- x$jscomp$0,
5933
- errorInfo$jscomp$0
5934
- );
5935
- if (null === boundary$jscomp$0) fatalError(request, x$jscomp$0);
5936
- else if (
5937
- (boundary$jscomp$0.pendingTasks--,
5938
- 4 !== boundary$jscomp$0.status)
5939
- ) {
5940
- boundary$jscomp$0.status = 4;
5941
- boundary$jscomp$0.errorDigest = request$jscomp$0;
5942
- untrackBoundary(request, boundary$jscomp$0);
5943
- var boundaryRow = boundary$jscomp$0.row;
5944
- null !== boundaryRow &&
5945
- 0 === --boundaryRow.pendingTasks &&
5946
- finishSuspenseListRow(request, boundaryRow);
5947
- boundary$jscomp$0.parentFlushed &&
5948
- request.clientRenderedBoundaries.push(boundary$jscomp$0);
5949
- 0 === request.pendingRootTasks &&
5950
- null === request.trackedPostpones &&
5951
- null !== boundary$jscomp$0.contentPreamble &&
5952
- preparePreamble(request);
5953
- }
5954
- 0 === request.allPendingTasks && completeAll(request);
5955
- }
5956
- } finally {
5957
- }
5958
- }
5959
6297
  }
5960
6298
  pingedTasks.splice(0, i);
5961
- null !== request$jscomp$2.destination &&
5962
- flushCompletedQueues(request$jscomp$2, request$jscomp$2.destination);
6299
+ null !== request$jscomp$1.destination &&
6300
+ flushCompletedQueues(request$jscomp$1, request$jscomp$1.destination);
5963
6301
  } catch (error) {
5964
- logRecoverableError(request$jscomp$2, error, {}),
5965
- fatalError(request$jscomp$2, error);
6302
+ logRecoverableError(request$jscomp$1, error, {}),
6303
+ fatalError(request$jscomp$1, error);
5966
6304
  } finally {
5967
6305
  (currentResumableState = prevResumableState),
5968
6306
  (ReactSharedInternals.H = prevDispatcher),
@@ -6000,12 +6338,11 @@ function preparePreambleFromSegment(
6000
6338
  segment,
6001
6339
  collectedPreambleSegments
6002
6340
  );
6003
- var preamble = boundary.contentPreamble,
6004
- fallbackPreamble = boundary.fallbackPreamble;
6005
- if (null === preamble || null === fallbackPreamble) return !1;
6341
+ var preamble = boundary.preamble;
6342
+ if (null === preamble) return !1;
6006
6343
  switch (boundary.status) {
6007
6344
  case 1:
6008
- hoistPreambleState(request.renderState, preamble);
6345
+ hoistPreambleState(request.renderState, preamble.content);
6009
6346
  request.byteSize += boundary.byteSize;
6010
6347
  segment = boundary.completedSegments[0];
6011
6348
  if (!segment)
@@ -6022,7 +6359,7 @@ function preparePreambleFromSegment(
6022
6359
  case 4:
6023
6360
  if (1 === segment.status)
6024
6361
  return (
6025
- hoistPreambleState(request.renderState, fallbackPreamble),
6362
+ hoistPreambleState(request.renderState, preamble.fallback),
6026
6363
  preparePreambleFromSubtree(
6027
6364
  request,
6028
6365
  segment,
@@ -6096,6 +6433,7 @@ function flushSegment(request, destination, segment, hoistableState) {
6096
6433
  var boundary = segment.boundary;
6097
6434
  if (null === boundary)
6098
6435
  return flushSubtree(request, destination, segment, hoistableState);
6436
+ segment.boundary = null;
6099
6437
  boundary.parentFlushed = !0;
6100
6438
  if (4 === boundary.status) {
6101
6439
  var row = boundary.row;
@@ -6106,7 +6444,7 @@ function flushSegment(request, destination, segment, hoistableState) {
6106
6444
  ((boundary = boundary.errorDigest),
6107
6445
  destination.push("\x3c!--$!--\x3e"),
6108
6446
  destination.push("<template"),
6109
- boundary &&
6447
+ null != boundary &&
6110
6448
  (destination.push(' data-dgst="'),
6111
6449
  (boundary = escapeTextForBrowser(boundary)),
6112
6450
  destination.push(boundary),
@@ -6136,7 +6474,8 @@ function flushSegment(request, destination, segment, hoistableState) {
6136
6474
  if (
6137
6475
  !flushingPartialBoundaries &&
6138
6476
  isEligibleForOutlining(request, boundary) &&
6139
- flushedByteSize + boundary.byteSize > request.progressiveChunkSize
6477
+ (flushedByteSize + boundary.byteSize > request.progressiveChunkSize ||
6478
+ boundary.defer)
6140
6479
  )
6141
6480
  return (
6142
6481
  (boundary.rootSegmentID = request.nextSegmentId++),
@@ -6207,7 +6546,8 @@ function flushCompletedBoundary(request, destination, boundary) {
6207
6546
  request = request.renderState;
6208
6547
  i = boundary.rootSegmentID;
6209
6548
  boundary = boundary.contentState;
6210
- var requiresStyleInsertion = request.stylesToHoist;
6549
+ var requiresStyleInsertion = request.stylesToHoist,
6550
+ requiresViewTransitions = 0 !== (completedSegments.instructions & 128);
6211
6551
  request.stylesToHoist = !1;
6212
6552
  destination.push(request.startInlineScript);
6213
6553
  destination.push(">");
@@ -6215,13 +6555,19 @@ function flushCompletedBoundary(request, destination, boundary) {
6215
6555
  ? (0 === (completedSegments.instructions & 4) &&
6216
6556
  ((completedSegments.instructions |= 4),
6217
6557
  destination.push(
6218
- '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};'
6558
+ '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,null!=c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};'
6219
6559
  )),
6220
6560
  0 === (completedSegments.instructions & 2) &&
6221
6561
  ((completedSegments.instructions |= 2),
6222
6562
  destination.push(
6223
6563
  '$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};'
6224
6564
  )),
6565
+ requiresViewTransitions &&
6566
+ 0 === (completedSegments.instructions & 256) &&
6567
+ ((completedSegments.instructions |= 256),
6568
+ destination.push(
6569
+ '$RV=function(B,g){function h(a,c){var e=a.getAttribute(c);e&&(c=a.style,l.push(a,c.viewTransitionName,c.viewTransitionClass),"auto"!==e&&(c.viewTransitionClass=e),(a=a.getAttribute("vt-name"))||(a="_T_"+N++ +"_"),a=CSS.escape(a)!==a?"r-"+btoa(a).replace(/=/g,""):a,c.viewTransitionName=a,C=!0)}var C=!1,N=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var k=g[f].querySelectorAll("[vt-share]"),d=0;d<k.length;d++){var b=k[d];m.set(b.getAttribute("vt-name"),b)}var u=[];for(k=0;k<g.length;k+=2){var D=g[k],x=D.parentNode;if(x){var v=x.getBoundingClientRect();if(v.left||v.top||v.width||v.height){b=D;for(f=0;b;){if(8===b.nodeType){var t=b.data;if("/$"===t)if(0===f)break;else f--;else"$"!==t&&"$?"!==t&&"$~"!==t&&"$!"!==t||f++}else if(1===b.nodeType){d=b;var E=d.getAttribute("vt-name"),y=m.get(E);h(d,y?"vt-share":"vt-exit");y&&(h(y,"vt-share"),m.set(E,null));for(var F=d.querySelectorAll("[vt-share]"),\nz=0;z<F.length;z++){var G=F[z],H=G.getAttribute("vt-name"),I=m.get(H);I&&(h(G,"vt-share"),h(I,"vt-share"),m.set(H,null))}var J=d.querySelectorAll("[vt-parent-exit]");for(d=0;d<J.length;d++)h(J[d],"vt-parent-exit")}b=b.nextSibling}for(var K=g[k+1],n=K.firstElementChild;n;){null!==m.get(n.getAttribute("vt-name"))&&h(n,"vt-enter");var L=n.querySelectorAll("[vt-parent-enter]");for(b=0;b<L.length;b++)h(L[b],"vt-parent-enter");n=n.nextElementSibling}b=x;do for(var p=b.firstElementChild;p;){var M=p.getAttribute("vt-update");\nM&&"none"!==M&&!l.includes(p)&&h(p,"vt-update");p=p.nextElementSibling}while((b=b.parentNode)&&1===b.nodeType&&"none"!==b.getAttribute("vt-update"));u.push.apply(u,K.querySelectorAll(\'img[src]:not([loading="lazy"])\'))}}}if(C){var A=document.__reactViewTransition=document.startViewTransition({update:function(){B(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],c={},e=0;e<u.length;c={g:c.g},e++)if(c.g=u[e],!c.g.complete){var q=c.g.getBoundingClientRect();0<q.bottom&&0<q.right&&\nq.top<window.innerHeight&&q.left<window.innerWidth&&(q=new Promise(function(w){return function(r){w.g.addEventListener("load",r);w.g.addEventListener("error",r)}}(c)),a.push(q))}return Promise.race([Promise.all(a),new Promise(function(w){var r=performance.now();setTimeout(w,2300>r&&2E3<r?2300-r:500)})])},types:[]});A.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var c=l[a],e=c.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];""===c.getAttribute("style")&&c.removeAttribute("style")}});\nA.finished.finally(function(){document.__reactViewTransition===A&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}B(g)}.bind(null,$RV);'
6570
+ )),
6225
6571
  0 === (completedSegments.instructions & 8)
6226
6572
  ? ((completedSegments.instructions |= 8),
6227
6573
  destination.push(
@@ -6233,6 +6579,12 @@ function flushCompletedBoundary(request, destination, boundary) {
6233
6579
  destination.push(
6234
6580
  '$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};'
6235
6581
  )),
6582
+ requiresViewTransitions &&
6583
+ 0 === (completedSegments.instructions & 256) &&
6584
+ ((completedSegments.instructions |= 256),
6585
+ destination.push(
6586
+ '$RV=function(B,g){function h(a,c){var e=a.getAttribute(c);e&&(c=a.style,l.push(a,c.viewTransitionName,c.viewTransitionClass),"auto"!==e&&(c.viewTransitionClass=e),(a=a.getAttribute("vt-name"))||(a="_T_"+N++ +"_"),a=CSS.escape(a)!==a?"r-"+btoa(a).replace(/=/g,""):a,c.viewTransitionName=a,C=!0)}var C=!1,N=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var k=g[f].querySelectorAll("[vt-share]"),d=0;d<k.length;d++){var b=k[d];m.set(b.getAttribute("vt-name"),b)}var u=[];for(k=0;k<g.length;k+=2){var D=g[k],x=D.parentNode;if(x){var v=x.getBoundingClientRect();if(v.left||v.top||v.width||v.height){b=D;for(f=0;b;){if(8===b.nodeType){var t=b.data;if("/$"===t)if(0===f)break;else f--;else"$"!==t&&"$?"!==t&&"$~"!==t&&"$!"!==t||f++}else if(1===b.nodeType){d=b;var E=d.getAttribute("vt-name"),y=m.get(E);h(d,y?"vt-share":"vt-exit");y&&(h(y,"vt-share"),m.set(E,null));for(var F=d.querySelectorAll("[vt-share]"),\nz=0;z<F.length;z++){var G=F[z],H=G.getAttribute("vt-name"),I=m.get(H);I&&(h(G,"vt-share"),h(I,"vt-share"),m.set(H,null))}var J=d.querySelectorAll("[vt-parent-exit]");for(d=0;d<J.length;d++)h(J[d],"vt-parent-exit")}b=b.nextSibling}for(var K=g[k+1],n=K.firstElementChild;n;){null!==m.get(n.getAttribute("vt-name"))&&h(n,"vt-enter");var L=n.querySelectorAll("[vt-parent-enter]");for(b=0;b<L.length;b++)h(L[b],"vt-parent-enter");n=n.nextElementSibling}b=x;do for(var p=b.firstElementChild;p;){var M=p.getAttribute("vt-update");\nM&&"none"!==M&&!l.includes(p)&&h(p,"vt-update");p=p.nextElementSibling}while((b=b.parentNode)&&1===b.nodeType&&"none"!==b.getAttribute("vt-update"));u.push.apply(u,K.querySelectorAll(\'img[src]:not([loading="lazy"])\'))}}}if(C){var A=document.__reactViewTransition=document.startViewTransition({update:function(){B(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],c={},e=0;e<u.length;c={g:c.g},e++)if(c.g=u[e],!c.g.complete){var q=c.g.getBoundingClientRect();0<q.bottom&&0<q.right&&\nq.top<window.innerHeight&&q.left<window.innerWidth&&(q=new Promise(function(w){return function(r){w.g.addEventListener("load",r);w.g.addEventListener("error",r)}}(c)),a.push(q))}return Promise.race([Promise.all(a),new Promise(function(w){var r=performance.now();setTimeout(w,2300>r&&2E3<r?2300-r:500)})])},types:[]});A.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var c=l[a],e=c.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];""===c.getAttribute("style")&&c.removeAttribute("style")}});\nA.finished.finally(function(){document.__reactViewTransition===A&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}B(g)}.bind(null,$RV);'
6587
+ )),
6236
6588
  destination.push('$RC("'));
6237
6589
  completedSegments = i.toString(16);
6238
6590
  destination.push(request.boundaryPrefix);
@@ -6446,20 +6798,21 @@ function flushCompletedQueues(request, destination) {
6446
6798
  0 === (resumableState$jscomp$1.instructions & 4)
6447
6799
  ? ((resumableState$jscomp$1.instructions |= 4),
6448
6800
  renderState$jscomp$1.push(
6449
- '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("'
6801
+ '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,null!=c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("'
6450
6802
  ))
6451
6803
  : renderState$jscomp$1.push('$RX("');
6452
6804
  renderState$jscomp$1.push(renderState$jscomp$2.boundaryPrefix);
6453
6805
  var chunk$jscomp$2 = id.toString(16);
6454
6806
  renderState$jscomp$1.push(chunk$jscomp$2);
6455
6807
  renderState$jscomp$1.push('"');
6456
- if (errorDigest) {
6457
- renderState$jscomp$1.push(",");
6458
- var chunk$jscomp$3 = escapeJSStringsForInstructionScripts(
6459
- errorDigest || ""
6460
- );
6461
- renderState$jscomp$1.push(chunk$jscomp$3);
6462
- }
6808
+ if (null != errorDigest)
6809
+ if ((renderState$jscomp$1.push(","), null == errorDigest))
6810
+ renderState$jscomp$1.push("null");
6811
+ else {
6812
+ var chunk$jscomp$3 =
6813
+ escapeJSStringsForInstructionScripts(errorDigest);
6814
+ renderState$jscomp$1.push(chunk$jscomp$3);
6815
+ }
6463
6816
  var JSCompiler_inline_result =
6464
6817
  renderState$jscomp$1.push(")\x3c/script>");
6465
6818
  if (!JSCompiler_inline_result) {
@@ -6484,12 +6837,12 @@ function flushCompletedQueues(request, destination) {
6484
6837
  flushingPartialBoundaries = !0;
6485
6838
  var partialBoundaries = request.partialBoundaries;
6486
6839
  for (i = 0; i < partialBoundaries.length; i++) {
6487
- var boundary$69 = partialBoundaries[i];
6840
+ var boundary$70 = partialBoundaries[i];
6488
6841
  a: {
6489
6842
  clientRenderedBoundaries = request;
6490
6843
  boundary = destination;
6491
- flushedByteSize = boundary$69.byteSize;
6492
- var completedSegments = boundary$69.completedSegments;
6844
+ flushedByteSize = boundary$70.byteSize;
6845
+ var completedSegments = boundary$70.completedSegments;
6493
6846
  for (
6494
6847
  JSCompiler_inline_result = 0;
6495
6848
  JSCompiler_inline_result < completedSegments.length;
@@ -6499,7 +6852,7 @@ function flushCompletedQueues(request, destination) {
6499
6852
  !flushPartiallyCompletedSegment(
6500
6853
  clientRenderedBoundaries,
6501
6854
  boundary,
6502
- boundary$69,
6855
+ boundary$70,
6503
6856
  completedSegments[JSCompiler_inline_result]
6504
6857
  )
6505
6858
  ) {
@@ -6509,10 +6862,10 @@ function flushCompletedQueues(request, destination) {
6509
6862
  break a;
6510
6863
  }
6511
6864
  completedSegments.splice(0, JSCompiler_inline_result);
6512
- var row = boundary$69.row;
6865
+ var row = boundary$70.row;
6513
6866
  null !== row &&
6514
6867
  row.together &&
6515
- 1 === boundary$69.pendingTasks &&
6868
+ 1 === boundary$70.pendingTasks &&
6516
6869
  (1 === row.pendingTasks
6517
6870
  ? unblockSuspenseListRow(
6518
6871
  clientRenderedBoundaries,
@@ -6522,7 +6875,7 @@ function flushCompletedQueues(request, destination) {
6522
6875
  : row.pendingTasks--);
6523
6876
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
6524
6877
  boundary,
6525
- boundary$69.contentState,
6878
+ boundary$70.contentState,
6526
6879
  clientRenderedBoundaries.renderState
6527
6880
  );
6528
6881
  }
@@ -6547,6 +6900,8 @@ function flushCompletedQueues(request, destination) {
6547
6900
  }
6548
6901
  } finally {
6549
6902
  (flushingPartialBoundaries = !1),
6903
+ (i = request.postponedState),
6904
+ null !== i && (i.nextSegmentId = request.nextSegmentId),
6550
6905
  0 === request.allPendingTasks &&
6551
6906
  0 === request.clientRenderedBoundaries.length &&
6552
6907
  0 === request.completedBoundaries.length &&
@@ -6556,7 +6911,8 @@ function flushCompletedQueues(request, destination) {
6556
6911
  ((partialBoundaries = endChunkForTag("body")),
6557
6912
  destination.push(partialBoundaries)),
6558
6913
  i.hasHtml && ((i = endChunkForTag("html")), destination.push(i)),
6559
- (request.status = 14),
6914
+ endRenderLifetime(request),
6915
+ (request.status = 13),
6560
6916
  destination.push(null),
6561
6917
  (request.destination = null));
6562
6918
  }
@@ -6575,40 +6931,63 @@ function enqueueFlush(request) {
6575
6931
  }
6576
6932
  }
6577
6933
  function startFlowing(request, destination) {
6578
- if (13 === request.status)
6579
- (request.status = 14), destination.destroy(request.fatalError);
6580
- else if (14 !== request.status && null === request.destination) {
6934
+ if (12 === request.status)
6935
+ (request.status = 13),
6936
+ (request = request.fatalError),
6937
+ isRecoverableError(request) &&
6938
+ (request = cloneRecoverableErrorAsFatal(request)),
6939
+ destination.destroy(request);
6940
+ else if (13 !== request.status && null === request.destination) {
6581
6941
  request.destination = destination;
6582
6942
  try {
6583
6943
  flushCompletedQueues(request, destination);
6584
- } catch (error) {
6585
- logRecoverableError(request, error, {}), fatalError(request, error);
6944
+ } catch (error$72) {
6945
+ logRecoverableError(request, error$72, {}), fatalError(request, error$72);
6586
6946
  }
6587
6947
  }
6588
6948
  }
6589
- function abort(request, reason) {
6590
- if (11 === request.status || 10 === request.status) request.status = 12;
6949
+ function finishAbort(request, abortableTasks) {
6591
6950
  try {
6592
- var abortableTasks = request.abortableTasks;
6593
6951
  if (0 < abortableTasks.size) {
6594
- var error =
6595
- void 0 === reason
6596
- ? Error("The render was aborted by the server without a reason.")
6597
- : "object" === typeof reason &&
6598
- null !== reason &&
6599
- "function" === typeof reason.then
6600
- ? Error("The render was aborted by the server with a promise.")
6601
- : reason;
6602
- request.fatalError = error;
6952
+ var error = request.fatalError;
6603
6953
  abortableTasks.forEach(function (task) {
6604
- return abortTask(task, request, error);
6954
+ return finishAbortedTask(task, request, error);
6605
6955
  });
6606
6956
  abortableTasks.clear();
6607
6957
  }
6608
6958
  null !== request.destination &&
6609
6959
  flushCompletedQueues(request, request.destination);
6610
- } catch (error$71) {
6611
- logRecoverableError(request, error$71, {}), fatalError(request, error$71);
6960
+ } catch (error$73) {
6961
+ logRecoverableError(request, error$73, {}), fatalError(request, error$73);
6962
+ }
6963
+ }
6964
+ function endRenderLifetime(request) {
6965
+ request = request.renderLifetimeController;
6966
+ null !== request && request.abort("The render ended.");
6967
+ }
6968
+ function abort(request, reason) {
6969
+ if (!(request.aborted || (11 !== request.status && 10 !== request.status))) {
6970
+ endRenderLifetime(request);
6971
+ var isRecoverableReason =
6972
+ "object" === typeof reason &&
6973
+ null !== reason &&
6974
+ reason.$$typeof === REACT_RECOVERABLE_TYPE;
6975
+ request.aborted = !0;
6976
+ reason = isRecoverableReason
6977
+ ? createRecoverableError(reason)
6978
+ : void 0 === reason
6979
+ ? Error("The render was aborted by the server without a reason.")
6980
+ : "object" === typeof reason &&
6981
+ null !== reason &&
6982
+ "function" === typeof reason.then
6983
+ ? Error("The render was aborted by the server with a promise.")
6984
+ : reason;
6985
+ request.fatalError = reason;
6986
+ reason = request.abortableTasks;
6987
+ reason.forEach(function (task) {
6988
+ return abortTask(task, request);
6989
+ });
6990
+ finishAbort(request, reason);
6612
6991
  }
6613
6992
  }
6614
6993
  function addToReplayParent(node, parentKeyPath, trackedPostpones) {
@@ -6643,6 +7022,7 @@ function renderToStringImpl(
6643
7022
  Infinity,
6644
7023
  onError,
6645
7024
  void 0,
7025
+ void 0,
6646
7026
  function () {
6647
7027
  readyToStream = !0;
6648
7028
  },
@@ -6689,4 +7069,4 @@ exports.renderToString = function (children, options) {
6689
7069
  'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server'
6690
7070
  );
6691
7071
  };
6692
- exports.version = "19.2.8";
7072
+ exports.version = "19.3.0";