diff --git a/compiled-rn/VERSION_NATIVE_FB b/compiled-rn/VERSION_NATIVE_FB index d0157d8f157d4..b63e3811ce4d4 100644 --- a/compiled-rn/VERSION_NATIVE_FB +++ b/compiled-rn/VERSION_NATIVE_FB @@ -1 +1 @@ -19.0.0-native-fb-3c7667a6-20240925 \ No newline at end of file +19.0.0-native-fb-0f1856c4-20240925 \ No newline at end of file diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js index c98a1fe0ecaa5..abf103af8365b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -420,5 +420,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-native-fb-3c7667a6-20240925"; + exports.version = "19.0.0-native-fb-0f1856c4-20240925"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js index e86d0423efef6..495ecbd6f3f62 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<547023b89ae2d39a60356535570a6d4a>> + * @generated SignedSource<<80a716efe68d232a2259f9d368a23144>> */ "use strict"; @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-native-fb-3c7667a6-20240925"; +exports.version = "19.0.0-native-fb-0f1856c4-20240925"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js index e86d0423efef6..495ecbd6f3f62 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<547023b89ae2d39a60356535570a6d4a>> + * @generated SignedSource<<80a716efe68d232a2259f9d368a23144>> */ "use strict"; @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-native-fb-3c7667a6-20240925"; +exports.version = "19.0.0-native-fb-0f1856c4-20240925"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js index 07b20ed38f6b7..1cd7376d63c51 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<2741b53e4737f118fb569f1df2d8ce24>> */ /* @@ -1046,7 +1046,8 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -1055,7 +1056,8 @@ __DEV__ && ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -1071,6 +1073,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1175,7 +1185,8 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); @@ -8943,32 +8954,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2322; - var JSCompiler_object_inline_stack_2323 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2324; + var JSCompiler_object_inline_stack_2325 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2324 = !1; + var JSCompiler_object_inline_componentStack_2326 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2322 = didSuspend) || - (JSCompiler_object_inline_digest_2322 = + (JSCompiler_object_inline_digest_2324 = didSuspend) || + (JSCompiler_object_inline_digest_2324 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2322 && - ((JSCompiler_object_inline_componentStack_2324 = !0), + JSCompiler_object_inline_digest_2324 && + ((JSCompiler_object_inline_componentStack_2326 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2322 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2324 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2324 + JSCompiler_object_inline_componentStack_2326 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2321 = nextHydratableInstance; + var JSCompiler_object_inline_message_2323 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2321)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2323)) { c: { - var instance = JSCompiler_object_inline_message_2321; + var instance = JSCompiler_object_inline_message_2323; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -9009,19 +9020,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2321 + JSCompiler_object_inline_message_2323 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2321 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2323 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2321 && - ((JSCompiler_object_inline_message_2321 = - JSCompiler_object_inline_message_2321.dehydrated), - null !== JSCompiler_object_inline_message_2321) + null !== JSCompiler_object_inline_message_2323 && + ((JSCompiler_object_inline_message_2323 = + JSCompiler_object_inline_message_2323.dehydrated), + null !== JSCompiler_object_inline_message_2323) ) return ( - JSCompiler_object_inline_message_2321.data === + JSCompiler_object_inline_message_2323.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9029,70 +9040,70 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2321 = - JSCompiler_object_inline_stack_2323.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2323.fallback; - if (JSCompiler_object_inline_componentStack_2324) + JSCompiler_object_inline_message_2323 = + JSCompiler_object_inline_stack_2325.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2325.fallback; + if (JSCompiler_object_inline_componentStack_2326) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2323 = + (JSCompiler_object_inline_stack_2325 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2321, + JSCompiler_object_inline_message_2323, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2324 = + (JSCompiler_object_inline_componentStack_2326 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2324.memoizedState = + (JSCompiler_object_inline_componentStack_2326.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2324.childLanes = + (JSCompiler_object_inline_componentStack_2326.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2322, + JSCompiler_object_inline_digest_2324, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2323 + JSCompiler_object_inline_stack_2325 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2323.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2325.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2323 = + (JSCompiler_object_inline_stack_2325 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2321, + JSCompiler_object_inline_message_2323, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2324 = + (JSCompiler_object_inline_componentStack_2326 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2324.memoizedState = + (JSCompiler_object_inline_componentStack_2326.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2324.childLanes = + (JSCompiler_object_inline_componentStack_2326.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2322, + JSCompiler_object_inline_digest_2324, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2323 + JSCompiler_object_inline_stack_2325 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2321 + JSCompiler_object_inline_message_2323 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2321 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2321) + ((JSCompiler_object_inline_message_2323 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2323) ) { if (didSuspend) workInProgress.flags & 256 @@ -9109,32 +9120,32 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2324 = - JSCompiler_object_inline_stack_2323.fallback), - (JSCompiler_object_inline_message_2321 = workInProgress.mode), - (JSCompiler_object_inline_stack_2323 = createFiberFromOffscreen( + (JSCompiler_object_inline_componentStack_2326 = + JSCompiler_object_inline_stack_2325.fallback), + (JSCompiler_object_inline_message_2323 = workInProgress.mode), + (JSCompiler_object_inline_stack_2325 = createFiberFromOffscreen( { mode: "visible", - children: JSCompiler_object_inline_stack_2323.children + children: JSCompiler_object_inline_stack_2325.children }, - JSCompiler_object_inline_message_2321, + JSCompiler_object_inline_message_2323, 0, null )), - (JSCompiler_object_inline_componentStack_2324 = + (JSCompiler_object_inline_componentStack_2326 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2324, - JSCompiler_object_inline_message_2321, + JSCompiler_object_inline_componentStack_2326, + JSCompiler_object_inline_message_2323, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2324.flags |= 2), - (JSCompiler_object_inline_stack_2323.return = workInProgress), - (JSCompiler_object_inline_componentStack_2324.return = + (JSCompiler_object_inline_componentStack_2326.flags |= 2), + (JSCompiler_object_inline_stack_2325.return = workInProgress), + (JSCompiler_object_inline_componentStack_2326.return = workInProgress), - (JSCompiler_object_inline_stack_2323.sibling = - JSCompiler_object_inline_componentStack_2324), - (workInProgress.child = JSCompiler_object_inline_stack_2323), + (JSCompiler_object_inline_stack_2325.sibling = + JSCompiler_object_inline_componentStack_2326), + (workInProgress.child = JSCompiler_object_inline_stack_2325), (workInProgress.mode & ConcurrentMode) !== NoMode && reconcileChildFibers( workInProgress, @@ -9142,63 +9153,63 @@ __DEV__ && null, renderLanes ), - (JSCompiler_object_inline_stack_2323 = workInProgress.child), - (JSCompiler_object_inline_stack_2323.memoizedState = + (JSCompiler_object_inline_stack_2325 = workInProgress.child), + (JSCompiler_object_inline_stack_2325.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2323.childLanes = + (JSCompiler_object_inline_stack_2325.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2322, + JSCompiler_object_inline_digest_2324, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2324)); + JSCompiler_object_inline_componentStack_2326)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2321.data === + JSCompiler_object_inline_message_2323.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2322 = - JSCompiler_object_inline_message_2321.nextSibling && - JSCompiler_object_inline_message_2321.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2322) { - JSCompiler_temp = JSCompiler_object_inline_digest_2322.dgst; - var message = JSCompiler_object_inline_digest_2322.msg; - instance = JSCompiler_object_inline_digest_2322.stck; - var componentStack = JSCompiler_object_inline_digest_2322.cstck; + JSCompiler_object_inline_digest_2324 = + JSCompiler_object_inline_message_2323.nextSibling && + JSCompiler_object_inline_message_2323.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2324) { + JSCompiler_temp = JSCompiler_object_inline_digest_2324.dgst; + var message = JSCompiler_object_inline_digest_2324.msg; + instance = JSCompiler_object_inline_digest_2324.stck; + var componentStack = JSCompiler_object_inline_digest_2324.cstck; } - JSCompiler_object_inline_message_2321 = message; - JSCompiler_object_inline_digest_2322 = JSCompiler_temp; - JSCompiler_object_inline_stack_2323 = instance; - JSCompiler_object_inline_componentStack_2324 = componentStack; - JSCompiler_object_inline_message_2321 = - JSCompiler_object_inline_message_2321 - ? Error(JSCompiler_object_inline_message_2321) + JSCompiler_object_inline_message_2323 = message; + JSCompiler_object_inline_digest_2324 = JSCompiler_temp; + JSCompiler_object_inline_stack_2325 = instance; + JSCompiler_object_inline_componentStack_2326 = componentStack; + JSCompiler_object_inline_message_2323 = + JSCompiler_object_inline_message_2323 + ? Error(JSCompiler_object_inline_message_2323) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2321.stack = - JSCompiler_object_inline_stack_2323 || ""; - JSCompiler_object_inline_message_2321.digest = - JSCompiler_object_inline_digest_2322; - JSCompiler_object_inline_digest_2322 = - void 0 === JSCompiler_object_inline_componentStack_2324 + JSCompiler_object_inline_message_2323.stack = + JSCompiler_object_inline_stack_2325 || ""; + JSCompiler_object_inline_message_2323.digest = + JSCompiler_object_inline_digest_2324; + JSCompiler_object_inline_digest_2324 = + void 0 === JSCompiler_object_inline_componentStack_2326 ? null - : JSCompiler_object_inline_componentStack_2324; - "string" === typeof JSCompiler_object_inline_digest_2322 && + : JSCompiler_object_inline_componentStack_2326; + "string" === typeof JSCompiler_object_inline_digest_2324 && CapturedStacks.set( - JSCompiler_object_inline_message_2321, - JSCompiler_object_inline_digest_2322 + JSCompiler_object_inline_message_2323, + JSCompiler_object_inline_digest_2324 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2321, + value: JSCompiler_object_inline_message_2323, source: null, - stack: JSCompiler_object_inline_digest_2322 + stack: JSCompiler_object_inline_digest_2324 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9214,25 +9225,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2322 = + (JSCompiler_object_inline_digest_2324 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2322) + didReceiveUpdate || JSCompiler_object_inline_digest_2324) ) { - JSCompiler_object_inline_digest_2322 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2322) { - JSCompiler_object_inline_stack_2323 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2323 & 42)) - JSCompiler_object_inline_stack_2323 = 1; + JSCompiler_object_inline_digest_2324 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2324) { + JSCompiler_object_inline_stack_2325 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2325 & 42)) + JSCompiler_object_inline_stack_2325 = 1; else - switch (JSCompiler_object_inline_stack_2323) { + switch (JSCompiler_object_inline_stack_2325) { case 2: - JSCompiler_object_inline_stack_2323 = 1; + JSCompiler_object_inline_stack_2325 = 1; break; case 8: - JSCompiler_object_inline_stack_2323 = 4; + JSCompiler_object_inline_stack_2325 = 4; break; case 32: - JSCompiler_object_inline_stack_2323 = 16; + JSCompiler_object_inline_stack_2325 = 16; break; case 128: case 256: @@ -9253,40 +9264,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2323 = 64; + JSCompiler_object_inline_stack_2325 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2323 = 134217728; + JSCompiler_object_inline_stack_2325 = 134217728; break; default: - JSCompiler_object_inline_stack_2323 = 0; + JSCompiler_object_inline_stack_2325 = 0; } - JSCompiler_object_inline_stack_2323 = + JSCompiler_object_inline_stack_2325 = 0 !== - (JSCompiler_object_inline_stack_2323 & - (JSCompiler_object_inline_digest_2322.suspendedLanes | + (JSCompiler_object_inline_stack_2325 & + (JSCompiler_object_inline_digest_2324.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2323; + : JSCompiler_object_inline_stack_2325; if ( - 0 !== JSCompiler_object_inline_stack_2323 && - JSCompiler_object_inline_stack_2323 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2325 && + JSCompiler_object_inline_stack_2325 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2323), + ((prevState.retryLane = JSCompiler_object_inline_stack_2325), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2323 + JSCompiler_object_inline_stack_2325 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2322, + JSCompiler_object_inline_digest_2324, current, - JSCompiler_object_inline_stack_2323 + JSCompiler_object_inline_stack_2325 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2321.data === + JSCompiler_object_inline_message_2323.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9294,7 +9305,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2321.data === + JSCompiler_object_inline_message_2323.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9302,12 +9313,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2321._reactRetry = + (JSCompiler_object_inline_message_2323._reactRetry = workInProgress), (workInProgress = null)) : ((renderLanes = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2321.nextSibling + JSCompiler_object_inline_message_2323.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9325,72 +9336,72 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2323.children + JSCompiler_object_inline_stack_2325.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2324) + if (JSCompiler_object_inline_componentStack_2326) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2324 = - JSCompiler_object_inline_stack_2323.fallback), - (JSCompiler_object_inline_message_2321 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2326 = + JSCompiler_object_inline_stack_2325.fallback), + (JSCompiler_object_inline_message_2323 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), (componentStack = { mode: "hidden", - children: JSCompiler_object_inline_stack_2323.children + children: JSCompiler_object_inline_stack_2325.children }), - (JSCompiler_object_inline_message_2321 & ConcurrentMode) === NoMode && + (JSCompiler_object_inline_message_2323 & ConcurrentMode) === NoMode && workInProgress.child !== JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2323 = workInProgress.child), - (JSCompiler_object_inline_stack_2323.childLanes = 0), - (JSCompiler_object_inline_stack_2323.pendingProps = + ? ((JSCompiler_object_inline_stack_2325 = workInProgress.child), + (JSCompiler_object_inline_stack_2325.childLanes = 0), + (JSCompiler_object_inline_stack_2325.pendingProps = componentStack), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2323.actualDuration = -0), - (JSCompiler_object_inline_stack_2323.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2323.selfBaseDuration = + ((JSCompiler_object_inline_stack_2325.actualDuration = -0), + (JSCompiler_object_inline_stack_2325.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2325.selfBaseDuration = JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2323.treeBaseDuration = + (JSCompiler_object_inline_stack_2325.treeBaseDuration = JSCompiler_temp.treeBaseDuration)), (workInProgress.deletions = null)) - : ((JSCompiler_object_inline_stack_2323 = createWorkInProgress( + : ((JSCompiler_object_inline_stack_2325 = createWorkInProgress( JSCompiler_temp, componentStack )), - (JSCompiler_object_inline_stack_2323.subtreeFlags = + (JSCompiler_object_inline_stack_2325.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280)), null !== instance - ? (JSCompiler_object_inline_componentStack_2324 = + ? (JSCompiler_object_inline_componentStack_2326 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2324 + JSCompiler_object_inline_componentStack_2326 )) - : ((JSCompiler_object_inline_componentStack_2324 = + : ((JSCompiler_object_inline_componentStack_2326 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2324, - JSCompiler_object_inline_message_2321, + JSCompiler_object_inline_componentStack_2326, + JSCompiler_object_inline_message_2323, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2324.flags |= 2)), - (JSCompiler_object_inline_componentStack_2324.return = + (JSCompiler_object_inline_componentStack_2326.flags |= 2)), + (JSCompiler_object_inline_componentStack_2326.return = workInProgress), - (JSCompiler_object_inline_stack_2323.return = workInProgress), - (JSCompiler_object_inline_stack_2323.sibling = - JSCompiler_object_inline_componentStack_2324), - (workInProgress.child = JSCompiler_object_inline_stack_2323), - (JSCompiler_object_inline_stack_2323 = - JSCompiler_object_inline_componentStack_2324), - (JSCompiler_object_inline_componentStack_2324 = workInProgress.child), - (JSCompiler_object_inline_message_2321 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2321 - ? (JSCompiler_object_inline_message_2321 = + (JSCompiler_object_inline_stack_2325.return = workInProgress), + (JSCompiler_object_inline_stack_2325.sibling = + JSCompiler_object_inline_componentStack_2326), + (workInProgress.child = JSCompiler_object_inline_stack_2325), + (JSCompiler_object_inline_stack_2325 = + JSCompiler_object_inline_componentStack_2326), + (JSCompiler_object_inline_componentStack_2326 = workInProgress.child), + (JSCompiler_object_inline_message_2323 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2323 + ? (JSCompiler_object_inline_message_2323 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2321.cachePool), + JSCompiler_object_inline_message_2323.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9398,45 +9409,45 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2321 = { + (JSCompiler_object_inline_message_2323 = { baseLanes: - JSCompiler_object_inline_message_2321.baseLanes | renderLanes, + JSCompiler_object_inline_message_2323.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2324.memoizedState = - JSCompiler_object_inline_message_2321), - (JSCompiler_object_inline_componentStack_2324.childLanes = + (JSCompiler_object_inline_componentStack_2326.memoizedState = + JSCompiler_object_inline_message_2323), + (JSCompiler_object_inline_componentStack_2326.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2322, + JSCompiler_object_inline_digest_2324, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2323 + JSCompiler_object_inline_stack_2325 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2322 = current.child; - current = JSCompiler_object_inline_digest_2322.sibling; - JSCompiler_object_inline_digest_2322 = createWorkInProgress( - JSCompiler_object_inline_digest_2322, + JSCompiler_object_inline_digest_2324 = current.child; + current = JSCompiler_object_inline_digest_2324.sibling; + JSCompiler_object_inline_digest_2324 = createWorkInProgress( + JSCompiler_object_inline_digest_2324, { mode: "visible", - children: JSCompiler_object_inline_stack_2323.children + children: JSCompiler_object_inline_stack_2325.children } ); (workInProgress.mode & ConcurrentMode) === NoMode && - (JSCompiler_object_inline_digest_2322.lanes = renderLanes); - JSCompiler_object_inline_digest_2322.return = workInProgress; - JSCompiler_object_inline_digest_2322.sibling = null; + (JSCompiler_object_inline_digest_2324.lanes = renderLanes); + JSCompiler_object_inline_digest_2324.return = workInProgress; + JSCompiler_object_inline_digest_2324.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2322; + workInProgress.child = JSCompiler_object_inline_digest_2324; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2322; + return JSCompiler_object_inline_digest_2324; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = createFiberFromOffscreen( @@ -14202,7 +14213,8 @@ __DEV__ && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -15035,7 +15047,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15078,7 +15090,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )), ensureRootIsScheduled(root), 2 !== lane || @@ -15091,191 +15103,193 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root.tag && exitStatus === RootErrored) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (0 !== root.tag && exitStatus === RootErrored) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - renderStartTime, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - renderStartTime, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + !workInProgressRootDidSkipSuspendedSiblings ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + 0 + ), + exitStatus + ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -15322,7 +15336,12 @@ __DEV__ && SUSPENDED_COMMIT ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -15388,18 +15407,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -15443,11 +15464,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -15570,7 +15587,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -15579,10 +15598,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -15603,37 +15622,46 @@ __DEV__ && } markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$42) { handleThrow(root, thrownValue$42); @@ -15644,15 +15672,12 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -15677,12 +15702,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); markRenderStarted(lanes); a: do try { @@ -16672,7 +16695,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -16746,45 +16770,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -25446,11 +25471,11 @@ __DEV__ && }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-native-fb-3c7667a6-20240925" !== isomorphicReactPackageVersion) + if ("19.0.0-native-fb-0f1856c4-20240925" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-native-fb-3c7667a6-20240925\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-native-fb-0f1856c4-20240925\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -25487,11 +25512,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925" + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25635,5 +25660,5 @@ __DEV__ && listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.0.0-native-fb-3c7667a6-20240925"; + exports.version = "19.0.0-native-fb-0f1856c4-20240925"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js index e33ee14bb4551..326ffbb7f3b6b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<096653a27e1fcdd1f46fe0ed48325842>> + * @generated SignedSource<> */ /* @@ -676,7 +676,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -685,7 +686,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -701,6 +703,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -800,7 +810,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); @@ -2055,19 +2066,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$290; + var JSCompiler_inline_result$jscomp$295; if (canUseDOM) { - var isSupported$jscomp$inline_423 = "oninput" in document; - if (!isSupported$jscomp$inline_423) { - var element$jscomp$inline_424 = document.createElement("div"); - element$jscomp$inline_424.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_423 = - "function" === typeof element$jscomp$inline_424.oninput; + var isSupported$jscomp$inline_428 = "oninput" in document; + if (!isSupported$jscomp$inline_428) { + var element$jscomp$inline_429 = document.createElement("div"); + element$jscomp$inline_429.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_428 = + "function" === typeof element$jscomp$inline_429.oninput; } - JSCompiler_inline_result$jscomp$290 = isSupported$jscomp$inline_423; - } else JSCompiler_inline_result$jscomp$290 = !1; + JSCompiler_inline_result$jscomp$295 = isSupported$jscomp$inline_428; + } else JSCompiler_inline_result$jscomp$295 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$290 && + JSCompiler_inline_result$jscomp$295 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -10181,7 +10192,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -10855,7 +10867,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -10867,7 +10879,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )), ensureRootIsScheduled(root), 2 === lane && @@ -10878,172 +10890,172 @@ function scheduleUpdateOnFiber(root, fiber, lane) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root$jscomp$0.tag && 2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (0 !== root$jscomp$0.tag && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11090,7 +11102,7 @@ function commitRootWhenReady( 1 ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11153,18 +11165,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$6 = 31 - clz32(lanes), lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + didAttemptEntireTree[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11208,9 +11222,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11298,7 +11310,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11307,10 +11321,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11318,6 +11332,7 @@ function renderRootSync(root, lanes) { if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11326,24 +11341,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$171) { - handleThrow(root, thrownValue$171); + } catch (thrownValue$176) { + handleThrow(root, thrownValue$176); } while (1); lanes && root.shellSuspendCounter++; @@ -11351,11 +11379,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11369,12 +11397,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11458,8 +11484,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$173) { - handleThrow(root, thrownValue$173); + } catch (thrownValue$178) { + handleThrow(root, thrownValue$178); } while (1); resetContextDependencies(); @@ -11781,7 +11807,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$177 = rootWithPendingPassiveEffects, + var root$182 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11820,7 +11846,7 @@ function flushPassiveEffects() { } finally { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$177, remainingLanes); + releaseRootPooledCache(root$182, remainingLanes); } } return !1; @@ -11980,14 +12006,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$179 = firstScheduledRoot; null !== root$179; ) { - if (!onlyLegacy || 0 === root$179.tag) + for (var root$184 = firstScheduledRoot; null !== root$184; ) { + if (!onlyLegacy || 0 === root$184.tag) if (0 !== syncTransitionLanes) { - var pendingLanes = root$179.pendingLanes; + var pendingLanes = root$184.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$179.suspendedLanes, - pingedLanes = root$179.pingedLanes; + var suspendedLanes = root$184.suspendedLanes, + pingedLanes = root$184.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12001,17 +12027,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$179, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$184, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$179, - root$179 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$184, + root$184 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$184, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$179, JSCompiler_inline_result)); - root$179 = root$179.next; + performSyncWorkOnRoot(root$184, JSCompiler_inline_result)); + root$184 = root$184.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -12080,39 +12107,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -12241,20 +12267,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1458 = 0; - i$jscomp$inline_1458 < simpleEventPluginEvents.length; - i$jscomp$inline_1458++ + var i$jscomp$inline_1465 = 0; + i$jscomp$inline_1465 < simpleEventPluginEvents.length; + i$jscomp$inline_1465++ ) { - var eventName$jscomp$inline_1459 = - simpleEventPluginEvents[i$jscomp$inline_1458], - domEventName$jscomp$inline_1460 = - eventName$jscomp$inline_1459.toLowerCase(), - capitalizedEvent$jscomp$inline_1461 = - eventName$jscomp$inline_1459[0].toUpperCase() + - eventName$jscomp$inline_1459.slice(1); + var eventName$jscomp$inline_1466 = + simpleEventPluginEvents[i$jscomp$inline_1465], + domEventName$jscomp$inline_1467 = + eventName$jscomp$inline_1466.toLowerCase(), + capitalizedEvent$jscomp$inline_1468 = + eventName$jscomp$inline_1466[0].toUpperCase() + + eventName$jscomp$inline_1466.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1460, - "on" + capitalizedEvent$jscomp$inline_1461 + domEventName$jscomp$inline_1467, + "on" + capitalizedEvent$jscomp$inline_1468 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -13437,34 +13463,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$193 = props[hasSrc]; - if (null != propValue$193) + var propValue$198 = props[hasSrc]; + if (null != propValue$198) switch (hasSrc) { case "name": - hasSrcSet = propValue$193; + hasSrcSet = propValue$198; break; case "type": - propValue = propValue$193; + propValue = propValue$198; break; case "checked": - checked = propValue$193; + checked = propValue$198; break; case "defaultChecked": - defaultChecked = propValue$193; + defaultChecked = propValue$198; break; case "value": - propKey = propValue$193; + propKey = propValue$198; break; case "defaultValue": - defaultValue = propValue$193; + defaultValue = propValue$198; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$193) + if (null != propValue$198) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$193, props, null); + setProp(domElement, tag, hasSrc, propValue$198, props, null); } } initInput( @@ -13601,14 +13627,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$193 in props) - props.hasOwnProperty(propValue$193) && - ((hasSrc = props[propValue$193]), + for (propValue$198 in props) + props.hasOwnProperty(propValue$198) && + ((hasSrc = props[propValue$198]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$193, + propValue$198, hasSrc, props, void 0 @@ -13656,14 +13682,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$210 in nextProps) { - var propKey = nextProps[propKey$210]; - lastProp = lastProps[propKey$210]; + for (var propKey$215 in nextProps) { + var propKey = nextProps[propKey$215]; + lastProp = lastProps[propKey$215]; if ( - nextProps.hasOwnProperty(propKey$210) && + nextProps.hasOwnProperty(propKey$215) && (null != propKey || null != lastProp) ) - switch (propKey$210) { + switch (propKey$215) { case "type": type = propKey; break; @@ -13692,7 +13718,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$210, + propKey$215, propKey, nextProps, lastProp @@ -13711,7 +13737,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$210 = null; + propKey = value = defaultValue = propKey$215 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -13742,7 +13768,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$210 = type; + propKey$215 = type; break; case "defaultValue": defaultValue = type; @@ -13763,15 +13789,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$210 - ? updateOptions(domElement, !!lastProps, propKey$210, !1) + null != propKey$215 + ? updateOptions(domElement, !!lastProps, propKey$215, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$210 = null; + propKey = propKey$215 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -13795,7 +13821,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$210 = name; + propKey$215 = name; break; case "defaultValue": propKey = name; @@ -13809,17 +13835,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$210, propKey); + updateTextarea(domElement, propKey$215, propKey); return; case "option": - for (var propKey$226 in lastProps) + for (var propKey$231 in lastProps) if ( - ((propKey$210 = lastProps[propKey$226]), - lastProps.hasOwnProperty(propKey$226) && - null != propKey$210 && - !nextProps.hasOwnProperty(propKey$226)) + ((propKey$215 = lastProps[propKey$231]), + lastProps.hasOwnProperty(propKey$231) && + null != propKey$215 && + !nextProps.hasOwnProperty(propKey$231)) ) - switch (propKey$226) { + switch (propKey$231) { case "selected": domElement.selected = !1; break; @@ -13827,33 +13853,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$226, + propKey$231, null, nextProps, - propKey$210 + propKey$215 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$210 = nextProps[lastDefaultValue]), + ((propKey$215 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$210 !== propKey && - (null != propKey$210 || null != propKey)) + propKey$215 !== propKey && + (null != propKey$215 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$210 && - "function" !== typeof propKey$210 && - "symbol" !== typeof propKey$210; + propKey$215 && + "function" !== typeof propKey$215 && + "symbol" !== typeof propKey$215; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$210, + propKey$215, nextProps, propKey ); @@ -13874,24 +13900,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$231 in lastProps) - (propKey$210 = lastProps[propKey$231]), - lastProps.hasOwnProperty(propKey$231) && - null != propKey$210 && - !nextProps.hasOwnProperty(propKey$231) && - setProp(domElement, tag, propKey$231, null, nextProps, propKey$210); + for (var propKey$236 in lastProps) + (propKey$215 = lastProps[propKey$236]), + lastProps.hasOwnProperty(propKey$236) && + null != propKey$215 && + !nextProps.hasOwnProperty(propKey$236) && + setProp(domElement, tag, propKey$236, null, nextProps, propKey$215); for (checked in nextProps) if ( - ((propKey$210 = nextProps[checked]), + ((propKey$215 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$210 !== propKey && - (null != propKey$210 || null != propKey)) + propKey$215 !== propKey && + (null != propKey$215 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$210) + if (null != propKey$215) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -13899,7 +13925,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$210, + propKey$215, nextProps, propKey ); @@ -13907,49 +13933,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$236 in lastProps) - (propKey$210 = lastProps[propKey$236]), - lastProps.hasOwnProperty(propKey$236) && - void 0 !== propKey$210 && - !nextProps.hasOwnProperty(propKey$236) && + for (var propKey$241 in lastProps) + (propKey$215 = lastProps[propKey$241]), + lastProps.hasOwnProperty(propKey$241) && + void 0 !== propKey$215 && + !nextProps.hasOwnProperty(propKey$241) && setPropOnCustomElement( domElement, tag, - propKey$236, + propKey$241, void 0, nextProps, - propKey$210 + propKey$215 ); for (defaultChecked in nextProps) - (propKey$210 = nextProps[defaultChecked]), + (propKey$215 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$210 === propKey || - (void 0 === propKey$210 && void 0 === propKey) || + propKey$215 === propKey || + (void 0 === propKey$215 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$210, + propKey$215, nextProps, propKey ); return; } } - for (var propKey$241 in lastProps) - (propKey$210 = lastProps[propKey$241]), - lastProps.hasOwnProperty(propKey$241) && - null != propKey$210 && - !nextProps.hasOwnProperty(propKey$241) && - setProp(domElement, tag, propKey$241, null, nextProps, propKey$210); + for (var propKey$246 in lastProps) + (propKey$215 = lastProps[propKey$246]), + lastProps.hasOwnProperty(propKey$246) && + null != propKey$215 && + !nextProps.hasOwnProperty(propKey$246) && + setProp(domElement, tag, propKey$246, null, nextProps, propKey$215); for (lastProp in nextProps) - (propKey$210 = nextProps[lastProp]), + (propKey$215 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$210 === propKey || - (null == propKey$210 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$210, nextProps, propKey); + propKey$215 === propKey || + (null == propKey$215 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$215, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -14489,26 +14515,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$249 = getResourcesFromRoot( + var styles$254 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$250 = styles$249.get(type); - resource$250 || + resource$255 = styles$254.get(type); + resource$255 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$250 = { + (resource$255 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$249.set(type, resource$250), - (styles$249 = JSCompiler_inline_result.querySelector( + styles$254.set(type, resource$255), + (styles$254 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$249._p && - ((resource$250.instance = styles$249), - (resource$250.state.loading = 5)), + !styles$254._p && + ((resource$255.instance = styles$254), + (resource$255.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -14521,16 +14547,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$249 || + styles$254 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$250.state + resource$255.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$250; + return resource$255; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -14627,37 +14653,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$255 = hoistableRoot.querySelector( + var instance$260 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$255) + if (instance$260) return ( (resource.state.loading |= 4), - (resource.instance = instance$255), - markNodeAsHoistable(instance$255), - instance$255 + (resource.instance = instance$260), + markNodeAsHoistable(instance$260), + instance$260 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$255 = ( + instance$260 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$255); - var linkInstance = instance$255; + markNodeAsHoistable(instance$260); + var linkInstance = instance$260; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$255, "link", instance); + setInitialProperties(instance$260, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$255, props.precedence, hoistableRoot); - return (resource.instance = instance$255); + insertStylesheet(instance$260, props.precedence, hoistableRoot); + return (resource.instance = instance$260); case "script": - instance$255 = getScriptKey(props.src); + instance$260 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$255) + getScriptSelectorFromKey(instance$260) )) ) return ( @@ -14666,7 +14692,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$255))) + if ((styleProps = preloadPropsMap.get(instance$260))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -15724,16 +15750,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1701 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1708 = React.version; if ( - "19.0.0-native-fb-3c7667a6-20240925" !== - isomorphicReactPackageVersion$jscomp$inline_1701 + "19.0.0-native-fb-0f1856c4-20240925" !== + isomorphicReactPackageVersion$jscomp$inline_1708 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1701, - "19.0.0-native-fb-3c7667a6-20240925" + isomorphicReactPackageVersion$jscomp$inline_1708, + "19.0.0-native-fb-0f1856c4-20240925" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15753,25 +15779,25 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2144 = { +var internals$jscomp$inline_2151 = { bundleType: 0, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925" + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2145 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2152 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2145.isDisabled && - hook$jscomp$inline_2145.supportsFiber + !hook$jscomp$inline_2152.isDisabled && + hook$jscomp$inline_2152.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2145.inject( - internals$jscomp$inline_2144 + (rendererID = hook$jscomp$inline_2152.inject( + internals$jscomp$inline_2151 )), - (injectedHook = hook$jscomp$inline_2145); + (injectedHook = hook$jscomp$inline_2152); } catch (err) {} } exports.createRoot = function (container, options) { @@ -15863,4 +15889,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.0.0-native-fb-3c7667a6-20240925"; +exports.version = "19.0.0-native-fb-0f1856c4-20240925"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js index 1f9b6684d8cf3..f6e5b15e7919e 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<3cd8bd8237aae5c674c35007fa4a75fa>> + * @generated SignedSource<> */ /* @@ -741,7 +741,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -750,7 +751,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -766,6 +768,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -865,7 +875,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); @@ -2150,19 +2161,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$306; + var JSCompiler_inline_result$jscomp$311; if (canUseDOM) { - var isSupported$jscomp$inline_439 = "oninput" in document; - if (!isSupported$jscomp$inline_439) { - var element$jscomp$inline_440 = document.createElement("div"); - element$jscomp$inline_440.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_439 = - "function" === typeof element$jscomp$inline_440.oninput; + var isSupported$jscomp$inline_444 = "oninput" in document; + if (!isSupported$jscomp$inline_444) { + var element$jscomp$inline_445 = document.createElement("div"); + element$jscomp$inline_445.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_444 = + "function" === typeof element$jscomp$inline_445.oninput; } - JSCompiler_inline_result$jscomp$306 = isSupported$jscomp$inline_439; - } else JSCompiler_inline_result$jscomp$306 = !1; + JSCompiler_inline_result$jscomp$311 = isSupported$jscomp$inline_444; + } else JSCompiler_inline_result$jscomp$311 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$306 && + JSCompiler_inline_result$jscomp$311 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -10652,7 +10663,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -11392,7 +11404,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -11405,7 +11417,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )), ensureRootIsScheduled(root), 2 === lane && @@ -11416,172 +11428,172 @@ function scheduleUpdateOnFiber(root, fiber, lane) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root$jscomp$0.tag && 2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (0 !== root$jscomp$0.tag && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now$1()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now$1()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11628,7 +11640,7 @@ function commitRootWhenReady( 1 ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11691,18 +11703,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$6 = 31 - clz32(lanes), lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + didAttemptEntireTree[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11746,9 +11760,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11865,7 +11877,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11874,10 +11888,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11895,32 +11909,46 @@ function renderRootSync(root, lanes) { } markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + memoizedUpdaters = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue, reason); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$186) { - handleThrow(root, thrownValue$186); + } catch (thrownValue$191) { + handleThrow(root, thrownValue$191); } while (1); lanes && root.shellSuspendCounter++; @@ -11928,12 +11956,12 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11955,12 +11983,7 @@ function renderRootConcurrent(root, lanes) { workInProgressRootRenderTargetTime = now$1() + 500; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); markRenderStarted(lanes); a: do try { @@ -12046,8 +12069,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$188) { - handleThrow(root, thrownValue$188); + } catch (thrownValue$193) { + handleThrow(root, thrownValue$193); } while (1); resetContextDependencies(); @@ -12407,7 +12430,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$192 = rootWithPendingPassiveEffects, + var root$197 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12457,7 +12480,7 @@ function flushPassiveEffects() { } finally { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$192, remainingLanes); + releaseRootPooledCache(root$197, remainingLanes); } } return !1; @@ -12624,14 +12647,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$194 = firstScheduledRoot; null !== root$194; ) { - if (!onlyLegacy || 0 === root$194.tag) + for (var root$199 = firstScheduledRoot; null !== root$199; ) { + if (!onlyLegacy || 0 === root$199.tag) if (0 !== syncTransitionLanes) { - var pendingLanes = root$194.pendingLanes; + var pendingLanes = root$199.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$194.suspendedLanes, - pingedLanes = root$194.pingedLanes; + var suspendedLanes = root$199.suspendedLanes, + pingedLanes = root$199.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12645,17 +12668,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$194, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$199, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$194, - root$194 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$199, + root$199 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$199, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$194, JSCompiler_inline_result)); - root$194 = root$194.next; + performSyncWorkOnRoot(root$199, JSCompiler_inline_result)); + root$199 = root$199.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -12724,39 +12748,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -12888,20 +12911,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1546 = 0; - i$jscomp$inline_1546 < simpleEventPluginEvents.length; - i$jscomp$inline_1546++ + var i$jscomp$inline_1553 = 0; + i$jscomp$inline_1553 < simpleEventPluginEvents.length; + i$jscomp$inline_1553++ ) { - var eventName$jscomp$inline_1547 = - simpleEventPluginEvents[i$jscomp$inline_1546], - domEventName$jscomp$inline_1548 = - eventName$jscomp$inline_1547.toLowerCase(), - capitalizedEvent$jscomp$inline_1549 = - eventName$jscomp$inline_1547[0].toUpperCase() + - eventName$jscomp$inline_1547.slice(1); + var eventName$jscomp$inline_1554 = + simpleEventPluginEvents[i$jscomp$inline_1553], + domEventName$jscomp$inline_1555 = + eventName$jscomp$inline_1554.toLowerCase(), + capitalizedEvent$jscomp$inline_1556 = + eventName$jscomp$inline_1554[0].toUpperCase() + + eventName$jscomp$inline_1554.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1548, - "on" + capitalizedEvent$jscomp$inline_1549 + domEventName$jscomp$inline_1555, + "on" + capitalizedEvent$jscomp$inline_1556 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14084,34 +14107,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$208 = props[hasSrc]; - if (null != propValue$208) + var propValue$213 = props[hasSrc]; + if (null != propValue$213) switch (hasSrc) { case "name": - hasSrcSet = propValue$208; + hasSrcSet = propValue$213; break; case "type": - propValue = propValue$208; + propValue = propValue$213; break; case "checked": - checked = propValue$208; + checked = propValue$213; break; case "defaultChecked": - defaultChecked = propValue$208; + defaultChecked = propValue$213; break; case "value": - propKey = propValue$208; + propKey = propValue$213; break; case "defaultValue": - defaultValue = propValue$208; + defaultValue = propValue$213; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$208) + if (null != propValue$213) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$208, props, null); + setProp(domElement, tag, hasSrc, propValue$213, props, null); } } initInput( @@ -14248,14 +14271,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$208 in props) - props.hasOwnProperty(propValue$208) && - ((hasSrc = props[propValue$208]), + for (propValue$213 in props) + props.hasOwnProperty(propValue$213) && + ((hasSrc = props[propValue$213]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$208, + propValue$213, hasSrc, props, void 0 @@ -14303,14 +14326,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$225 in nextProps) { - var propKey = nextProps[propKey$225]; - lastProp = lastProps[propKey$225]; + for (var propKey$230 in nextProps) { + var propKey = nextProps[propKey$230]; + lastProp = lastProps[propKey$230]; if ( - nextProps.hasOwnProperty(propKey$225) && + nextProps.hasOwnProperty(propKey$230) && (null != propKey || null != lastProp) ) - switch (propKey$225) { + switch (propKey$230) { case "type": type = propKey; break; @@ -14339,7 +14362,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$225, + propKey$230, propKey, nextProps, lastProp @@ -14358,7 +14381,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$225 = null; + propKey = value = defaultValue = propKey$230 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14389,7 +14412,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$225 = type; + propKey$230 = type; break; case "defaultValue": defaultValue = type; @@ -14410,15 +14433,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$225 - ? updateOptions(domElement, !!lastProps, propKey$225, !1) + null != propKey$230 + ? updateOptions(domElement, !!lastProps, propKey$230, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$225 = null; + propKey = propKey$230 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -14442,7 +14465,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$225 = name; + propKey$230 = name; break; case "defaultValue": propKey = name; @@ -14456,17 +14479,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$225, propKey); + updateTextarea(domElement, propKey$230, propKey); return; case "option": - for (var propKey$241 in lastProps) + for (var propKey$246 in lastProps) if ( - ((propKey$225 = lastProps[propKey$241]), - lastProps.hasOwnProperty(propKey$241) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$241)) + ((propKey$230 = lastProps[propKey$246]), + lastProps.hasOwnProperty(propKey$246) && + null != propKey$230 && + !nextProps.hasOwnProperty(propKey$246)) ) - switch (propKey$241) { + switch (propKey$246) { case "selected": domElement.selected = !1; break; @@ -14474,33 +14497,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$241, + propKey$246, null, nextProps, - propKey$225 + propKey$230 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$225 = nextProps[lastDefaultValue]), + ((propKey$230 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$225 !== propKey && - (null != propKey$225 || null != propKey)) + propKey$230 !== propKey && + (null != propKey$230 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$225 && - "function" !== typeof propKey$225 && - "symbol" !== typeof propKey$225; + propKey$230 && + "function" !== typeof propKey$230 && + "symbol" !== typeof propKey$230; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$225, + propKey$230, nextProps, propKey ); @@ -14521,24 +14544,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$246 in lastProps) - (propKey$225 = lastProps[propKey$246]), - lastProps.hasOwnProperty(propKey$246) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$246) && - setProp(domElement, tag, propKey$246, null, nextProps, propKey$225); + for (var propKey$251 in lastProps) + (propKey$230 = lastProps[propKey$251]), + lastProps.hasOwnProperty(propKey$251) && + null != propKey$230 && + !nextProps.hasOwnProperty(propKey$251) && + setProp(domElement, tag, propKey$251, null, nextProps, propKey$230); for (checked in nextProps) if ( - ((propKey$225 = nextProps[checked]), + ((propKey$230 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$225 !== propKey && - (null != propKey$225 || null != propKey)) + propKey$230 !== propKey && + (null != propKey$230 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$225) + if (null != propKey$230) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -14546,7 +14569,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$225, + propKey$230, nextProps, propKey ); @@ -14554,49 +14577,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$251 in lastProps) - (propKey$225 = lastProps[propKey$251]), - lastProps.hasOwnProperty(propKey$251) && - void 0 !== propKey$225 && - !nextProps.hasOwnProperty(propKey$251) && + for (var propKey$256 in lastProps) + (propKey$230 = lastProps[propKey$256]), + lastProps.hasOwnProperty(propKey$256) && + void 0 !== propKey$230 && + !nextProps.hasOwnProperty(propKey$256) && setPropOnCustomElement( domElement, tag, - propKey$251, + propKey$256, void 0, nextProps, - propKey$225 + propKey$230 ); for (defaultChecked in nextProps) - (propKey$225 = nextProps[defaultChecked]), + (propKey$230 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$225 === propKey || - (void 0 === propKey$225 && void 0 === propKey) || + propKey$230 === propKey || + (void 0 === propKey$230 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$225, + propKey$230, nextProps, propKey ); return; } } - for (var propKey$256 in lastProps) - (propKey$225 = lastProps[propKey$256]), - lastProps.hasOwnProperty(propKey$256) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$256) && - setProp(domElement, tag, propKey$256, null, nextProps, propKey$225); + for (var propKey$261 in lastProps) + (propKey$230 = lastProps[propKey$261]), + lastProps.hasOwnProperty(propKey$261) && + null != propKey$230 && + !nextProps.hasOwnProperty(propKey$261) && + setProp(domElement, tag, propKey$261, null, nextProps, propKey$230); for (lastProp in nextProps) - (propKey$225 = nextProps[lastProp]), + (propKey$230 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$225 === propKey || - (null == propKey$225 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$225, nextProps, propKey); + propKey$230 === propKey || + (null == propKey$230 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$230, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15136,26 +15159,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$264 = getResourcesFromRoot( + var styles$269 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$265 = styles$264.get(type); - resource$265 || + resource$270 = styles$269.get(type); + resource$270 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$265 = { + (resource$270 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$264.set(type, resource$265), - (styles$264 = JSCompiler_inline_result.querySelector( + styles$269.set(type, resource$270), + (styles$269 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$264._p && - ((resource$265.instance = styles$264), - (resource$265.state.loading = 5)), + !styles$269._p && + ((resource$270.instance = styles$269), + (resource$270.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15168,16 +15191,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$264 || + styles$269 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$265.state + resource$270.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$265; + return resource$270; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15274,37 +15297,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$270 = hoistableRoot.querySelector( + var instance$275 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$270) + if (instance$275) return ( (resource.state.loading |= 4), - (resource.instance = instance$270), - markNodeAsHoistable(instance$270), - instance$270 + (resource.instance = instance$275), + markNodeAsHoistable(instance$275), + instance$275 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$270 = ( + instance$275 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$270); - var linkInstance = instance$270; + markNodeAsHoistable(instance$275); + var linkInstance = instance$275; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$270, "link", instance); + setInitialProperties(instance$275, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$270, props.precedence, hoistableRoot); - return (resource.instance = instance$270); + insertStylesheet(instance$275, props.precedence, hoistableRoot); + return (resource.instance = instance$275); case "script": - instance$270 = getScriptKey(props.src); + instance$275 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$270) + getScriptSelectorFromKey(instance$275) )) ) return ( @@ -15313,7 +15336,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$270))) + if ((styleProps = preloadPropsMap.get(instance$275))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16379,16 +16402,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1791 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1798 = React.version; if ( - "19.0.0-native-fb-3c7667a6-20240925" !== - isomorphicReactPackageVersion$jscomp$inline_1791 + "19.0.0-native-fb-0f1856c4-20240925" !== + isomorphicReactPackageVersion$jscomp$inline_1798 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1791, - "19.0.0-native-fb-3c7667a6-20240925" + isomorphicReactPackageVersion$jscomp$inline_1798, + "19.0.0-native-fb-0f1856c4-20240925" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -16408,18 +16431,18 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_1798 = { +var internals$jscomp$inline_1805 = { bundleType: 0, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925", + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925", getLaneLabelMap: function () { for ( - var map = new Map(), lane = 1, index$287 = 0; - 31 > index$287; - index$287++ + var map = new Map(), lane = 1, index$292 = 0; + 31 > index$292; + index$292++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -16432,16 +16455,16 @@ var internals$jscomp$inline_1798 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2196 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2203 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2196.isDisabled && - hook$jscomp$inline_2196.supportsFiber + !hook$jscomp$inline_2203.isDisabled && + hook$jscomp$inline_2203.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2196.inject( - internals$jscomp$inline_1798 + (rendererID = hook$jscomp$inline_2203.inject( + internals$jscomp$inline_1805 )), - (injectedHook = hook$jscomp$inline_2196); + (injectedHook = hook$jscomp$inline_2203); } catch (err) {} } exports.createRoot = function (container, options) { @@ -16533,4 +16556,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.0.0-native-fb-3c7667a6-20240925"; +exports.version = "19.0.0-native-fb-0f1856c4-20240925"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js index a9ce2b16bc71c..2af7be366198c 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<5a8fc17a8906121e660883f8b6a7fe4d>> + * @generated SignedSource<<273b9b0979bdda8333444bb84fedf515>> */ /* @@ -1054,7 +1054,8 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -1063,7 +1064,8 @@ __DEV__ && ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -1079,6 +1081,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1183,7 +1193,8 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); @@ -8951,32 +8962,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2327; - var JSCompiler_object_inline_stack_2328 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2329; + var JSCompiler_object_inline_stack_2330 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2329 = !1; + var JSCompiler_object_inline_componentStack_2331 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2327 = didSuspend) || - (JSCompiler_object_inline_digest_2327 = + (JSCompiler_object_inline_digest_2329 = didSuspend) || + (JSCompiler_object_inline_digest_2329 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2327 && - ((JSCompiler_object_inline_componentStack_2329 = !0), + JSCompiler_object_inline_digest_2329 && + ((JSCompiler_object_inline_componentStack_2331 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2327 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2329 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2329 + JSCompiler_object_inline_componentStack_2331 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2326 = nextHydratableInstance; + var JSCompiler_object_inline_message_2328 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2326)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2328)) { c: { - var instance = JSCompiler_object_inline_message_2326; + var instance = JSCompiler_object_inline_message_2328; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -9017,19 +9028,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2326 + JSCompiler_object_inline_message_2328 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2326 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2328 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2326 && - ((JSCompiler_object_inline_message_2326 = - JSCompiler_object_inline_message_2326.dehydrated), - null !== JSCompiler_object_inline_message_2326) + null !== JSCompiler_object_inline_message_2328 && + ((JSCompiler_object_inline_message_2328 = + JSCompiler_object_inline_message_2328.dehydrated), + null !== JSCompiler_object_inline_message_2328) ) return ( - JSCompiler_object_inline_message_2326.data === + JSCompiler_object_inline_message_2328.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9037,70 +9048,70 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2326 = - JSCompiler_object_inline_stack_2328.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2328.fallback; - if (JSCompiler_object_inline_componentStack_2329) + JSCompiler_object_inline_message_2328 = + JSCompiler_object_inline_stack_2330.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2330.fallback; + if (JSCompiler_object_inline_componentStack_2331) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2328 = + (JSCompiler_object_inline_stack_2330 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2326, + JSCompiler_object_inline_message_2328, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2329 = + (JSCompiler_object_inline_componentStack_2331 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2329.memoizedState = + (JSCompiler_object_inline_componentStack_2331.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2329.childLanes = + (JSCompiler_object_inline_componentStack_2331.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2327, + JSCompiler_object_inline_digest_2329, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2328 + JSCompiler_object_inline_stack_2330 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2328.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2330.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2328 = + (JSCompiler_object_inline_stack_2330 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2326, + JSCompiler_object_inline_message_2328, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2329 = + (JSCompiler_object_inline_componentStack_2331 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2329.memoizedState = + (JSCompiler_object_inline_componentStack_2331.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2329.childLanes = + (JSCompiler_object_inline_componentStack_2331.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2327, + JSCompiler_object_inline_digest_2329, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2328 + JSCompiler_object_inline_stack_2330 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2326 + JSCompiler_object_inline_message_2328 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2326 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2326) + ((JSCompiler_object_inline_message_2328 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2328) ) { if (didSuspend) workInProgress.flags & 256 @@ -9117,32 +9128,32 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2329 = - JSCompiler_object_inline_stack_2328.fallback), - (JSCompiler_object_inline_message_2326 = workInProgress.mode), - (JSCompiler_object_inline_stack_2328 = createFiberFromOffscreen( + (JSCompiler_object_inline_componentStack_2331 = + JSCompiler_object_inline_stack_2330.fallback), + (JSCompiler_object_inline_message_2328 = workInProgress.mode), + (JSCompiler_object_inline_stack_2330 = createFiberFromOffscreen( { mode: "visible", - children: JSCompiler_object_inline_stack_2328.children + children: JSCompiler_object_inline_stack_2330.children }, - JSCompiler_object_inline_message_2326, + JSCompiler_object_inline_message_2328, 0, null )), - (JSCompiler_object_inline_componentStack_2329 = + (JSCompiler_object_inline_componentStack_2331 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2329, - JSCompiler_object_inline_message_2326, + JSCompiler_object_inline_componentStack_2331, + JSCompiler_object_inline_message_2328, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2329.flags |= 2), - (JSCompiler_object_inline_stack_2328.return = workInProgress), - (JSCompiler_object_inline_componentStack_2329.return = + (JSCompiler_object_inline_componentStack_2331.flags |= 2), + (JSCompiler_object_inline_stack_2330.return = workInProgress), + (JSCompiler_object_inline_componentStack_2331.return = workInProgress), - (JSCompiler_object_inline_stack_2328.sibling = - JSCompiler_object_inline_componentStack_2329), - (workInProgress.child = JSCompiler_object_inline_stack_2328), + (JSCompiler_object_inline_stack_2330.sibling = + JSCompiler_object_inline_componentStack_2331), + (workInProgress.child = JSCompiler_object_inline_stack_2330), (workInProgress.mode & ConcurrentMode) !== NoMode && reconcileChildFibers( workInProgress, @@ -9150,63 +9161,63 @@ __DEV__ && null, renderLanes ), - (JSCompiler_object_inline_stack_2328 = workInProgress.child), - (JSCompiler_object_inline_stack_2328.memoizedState = + (JSCompiler_object_inline_stack_2330 = workInProgress.child), + (JSCompiler_object_inline_stack_2330.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2328.childLanes = + (JSCompiler_object_inline_stack_2330.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2327, + JSCompiler_object_inline_digest_2329, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2329)); + JSCompiler_object_inline_componentStack_2331)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2326.data === + JSCompiler_object_inline_message_2328.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2327 = - JSCompiler_object_inline_message_2326.nextSibling && - JSCompiler_object_inline_message_2326.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2327) { - JSCompiler_temp = JSCompiler_object_inline_digest_2327.dgst; - var message = JSCompiler_object_inline_digest_2327.msg; - instance = JSCompiler_object_inline_digest_2327.stck; - var componentStack = JSCompiler_object_inline_digest_2327.cstck; + JSCompiler_object_inline_digest_2329 = + JSCompiler_object_inline_message_2328.nextSibling && + JSCompiler_object_inline_message_2328.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2329) { + JSCompiler_temp = JSCompiler_object_inline_digest_2329.dgst; + var message = JSCompiler_object_inline_digest_2329.msg; + instance = JSCompiler_object_inline_digest_2329.stck; + var componentStack = JSCompiler_object_inline_digest_2329.cstck; } - JSCompiler_object_inline_message_2326 = message; - JSCompiler_object_inline_digest_2327 = JSCompiler_temp; - JSCompiler_object_inline_stack_2328 = instance; - JSCompiler_object_inline_componentStack_2329 = componentStack; - JSCompiler_object_inline_message_2326 = - JSCompiler_object_inline_message_2326 - ? Error(JSCompiler_object_inline_message_2326) + JSCompiler_object_inline_message_2328 = message; + JSCompiler_object_inline_digest_2329 = JSCompiler_temp; + JSCompiler_object_inline_stack_2330 = instance; + JSCompiler_object_inline_componentStack_2331 = componentStack; + JSCompiler_object_inline_message_2328 = + JSCompiler_object_inline_message_2328 + ? Error(JSCompiler_object_inline_message_2328) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2326.stack = - JSCompiler_object_inline_stack_2328 || ""; - JSCompiler_object_inline_message_2326.digest = - JSCompiler_object_inline_digest_2327; - JSCompiler_object_inline_digest_2327 = - void 0 === JSCompiler_object_inline_componentStack_2329 + JSCompiler_object_inline_message_2328.stack = + JSCompiler_object_inline_stack_2330 || ""; + JSCompiler_object_inline_message_2328.digest = + JSCompiler_object_inline_digest_2329; + JSCompiler_object_inline_digest_2329 = + void 0 === JSCompiler_object_inline_componentStack_2331 ? null - : JSCompiler_object_inline_componentStack_2329; - "string" === typeof JSCompiler_object_inline_digest_2327 && + : JSCompiler_object_inline_componentStack_2331; + "string" === typeof JSCompiler_object_inline_digest_2329 && CapturedStacks.set( - JSCompiler_object_inline_message_2326, - JSCompiler_object_inline_digest_2327 + JSCompiler_object_inline_message_2328, + JSCompiler_object_inline_digest_2329 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2326, + value: JSCompiler_object_inline_message_2328, source: null, - stack: JSCompiler_object_inline_digest_2327 + stack: JSCompiler_object_inline_digest_2329 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9222,25 +9233,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2327 = + (JSCompiler_object_inline_digest_2329 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2327) + didReceiveUpdate || JSCompiler_object_inline_digest_2329) ) { - JSCompiler_object_inline_digest_2327 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2327) { - JSCompiler_object_inline_stack_2328 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2328 & 42)) - JSCompiler_object_inline_stack_2328 = 1; + JSCompiler_object_inline_digest_2329 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2329) { + JSCompiler_object_inline_stack_2330 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2330 & 42)) + JSCompiler_object_inline_stack_2330 = 1; else - switch (JSCompiler_object_inline_stack_2328) { + switch (JSCompiler_object_inline_stack_2330) { case 2: - JSCompiler_object_inline_stack_2328 = 1; + JSCompiler_object_inline_stack_2330 = 1; break; case 8: - JSCompiler_object_inline_stack_2328 = 4; + JSCompiler_object_inline_stack_2330 = 4; break; case 32: - JSCompiler_object_inline_stack_2328 = 16; + JSCompiler_object_inline_stack_2330 = 16; break; case 128: case 256: @@ -9261,40 +9272,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2328 = 64; + JSCompiler_object_inline_stack_2330 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2328 = 134217728; + JSCompiler_object_inline_stack_2330 = 134217728; break; default: - JSCompiler_object_inline_stack_2328 = 0; + JSCompiler_object_inline_stack_2330 = 0; } - JSCompiler_object_inline_stack_2328 = + JSCompiler_object_inline_stack_2330 = 0 !== - (JSCompiler_object_inline_stack_2328 & - (JSCompiler_object_inline_digest_2327.suspendedLanes | + (JSCompiler_object_inline_stack_2330 & + (JSCompiler_object_inline_digest_2329.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2328; + : JSCompiler_object_inline_stack_2330; if ( - 0 !== JSCompiler_object_inline_stack_2328 && - JSCompiler_object_inline_stack_2328 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2330 && + JSCompiler_object_inline_stack_2330 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2328), + ((prevState.retryLane = JSCompiler_object_inline_stack_2330), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2328 + JSCompiler_object_inline_stack_2330 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2327, + JSCompiler_object_inline_digest_2329, current, - JSCompiler_object_inline_stack_2328 + JSCompiler_object_inline_stack_2330 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2326.data === + JSCompiler_object_inline_message_2328.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9302,7 +9313,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2326.data === + JSCompiler_object_inline_message_2328.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9310,12 +9321,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2326._reactRetry = + (JSCompiler_object_inline_message_2328._reactRetry = workInProgress), (workInProgress = null)) : ((renderLanes = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2326.nextSibling + JSCompiler_object_inline_message_2328.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9333,72 +9344,72 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2328.children + JSCompiler_object_inline_stack_2330.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2329) + if (JSCompiler_object_inline_componentStack_2331) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2329 = - JSCompiler_object_inline_stack_2328.fallback), - (JSCompiler_object_inline_message_2326 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2331 = + JSCompiler_object_inline_stack_2330.fallback), + (JSCompiler_object_inline_message_2328 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), (componentStack = { mode: "hidden", - children: JSCompiler_object_inline_stack_2328.children + children: JSCompiler_object_inline_stack_2330.children }), - (JSCompiler_object_inline_message_2326 & ConcurrentMode) === NoMode && + (JSCompiler_object_inline_message_2328 & ConcurrentMode) === NoMode && workInProgress.child !== JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2328 = workInProgress.child), - (JSCompiler_object_inline_stack_2328.childLanes = 0), - (JSCompiler_object_inline_stack_2328.pendingProps = + ? ((JSCompiler_object_inline_stack_2330 = workInProgress.child), + (JSCompiler_object_inline_stack_2330.childLanes = 0), + (JSCompiler_object_inline_stack_2330.pendingProps = componentStack), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2328.actualDuration = -0), - (JSCompiler_object_inline_stack_2328.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2328.selfBaseDuration = + ((JSCompiler_object_inline_stack_2330.actualDuration = -0), + (JSCompiler_object_inline_stack_2330.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2330.selfBaseDuration = JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2328.treeBaseDuration = + (JSCompiler_object_inline_stack_2330.treeBaseDuration = JSCompiler_temp.treeBaseDuration)), (workInProgress.deletions = null)) - : ((JSCompiler_object_inline_stack_2328 = createWorkInProgress( + : ((JSCompiler_object_inline_stack_2330 = createWorkInProgress( JSCompiler_temp, componentStack )), - (JSCompiler_object_inline_stack_2328.subtreeFlags = + (JSCompiler_object_inline_stack_2330.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280)), null !== instance - ? (JSCompiler_object_inline_componentStack_2329 = + ? (JSCompiler_object_inline_componentStack_2331 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2329 + JSCompiler_object_inline_componentStack_2331 )) - : ((JSCompiler_object_inline_componentStack_2329 = + : ((JSCompiler_object_inline_componentStack_2331 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2329, - JSCompiler_object_inline_message_2326, + JSCompiler_object_inline_componentStack_2331, + JSCompiler_object_inline_message_2328, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2329.flags |= 2)), - (JSCompiler_object_inline_componentStack_2329.return = + (JSCompiler_object_inline_componentStack_2331.flags |= 2)), + (JSCompiler_object_inline_componentStack_2331.return = workInProgress), - (JSCompiler_object_inline_stack_2328.return = workInProgress), - (JSCompiler_object_inline_stack_2328.sibling = - JSCompiler_object_inline_componentStack_2329), - (workInProgress.child = JSCompiler_object_inline_stack_2328), - (JSCompiler_object_inline_stack_2328 = - JSCompiler_object_inline_componentStack_2329), - (JSCompiler_object_inline_componentStack_2329 = workInProgress.child), - (JSCompiler_object_inline_message_2326 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2326 - ? (JSCompiler_object_inline_message_2326 = + (JSCompiler_object_inline_stack_2330.return = workInProgress), + (JSCompiler_object_inline_stack_2330.sibling = + JSCompiler_object_inline_componentStack_2331), + (workInProgress.child = JSCompiler_object_inline_stack_2330), + (JSCompiler_object_inline_stack_2330 = + JSCompiler_object_inline_componentStack_2331), + (JSCompiler_object_inline_componentStack_2331 = workInProgress.child), + (JSCompiler_object_inline_message_2328 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2328 + ? (JSCompiler_object_inline_message_2328 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2326.cachePool), + JSCompiler_object_inline_message_2328.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9406,45 +9417,45 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2326 = { + (JSCompiler_object_inline_message_2328 = { baseLanes: - JSCompiler_object_inline_message_2326.baseLanes | renderLanes, + JSCompiler_object_inline_message_2328.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2329.memoizedState = - JSCompiler_object_inline_message_2326), - (JSCompiler_object_inline_componentStack_2329.childLanes = + (JSCompiler_object_inline_componentStack_2331.memoizedState = + JSCompiler_object_inline_message_2328), + (JSCompiler_object_inline_componentStack_2331.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2327, + JSCompiler_object_inline_digest_2329, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2328 + JSCompiler_object_inline_stack_2330 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2327 = current.child; - current = JSCompiler_object_inline_digest_2327.sibling; - JSCompiler_object_inline_digest_2327 = createWorkInProgress( - JSCompiler_object_inline_digest_2327, + JSCompiler_object_inline_digest_2329 = current.child; + current = JSCompiler_object_inline_digest_2329.sibling; + JSCompiler_object_inline_digest_2329 = createWorkInProgress( + JSCompiler_object_inline_digest_2329, { mode: "visible", - children: JSCompiler_object_inline_stack_2328.children + children: JSCompiler_object_inline_stack_2330.children } ); (workInProgress.mode & ConcurrentMode) === NoMode && - (JSCompiler_object_inline_digest_2327.lanes = renderLanes); - JSCompiler_object_inline_digest_2327.return = workInProgress; - JSCompiler_object_inline_digest_2327.sibling = null; + (JSCompiler_object_inline_digest_2329.lanes = renderLanes); + JSCompiler_object_inline_digest_2329.return = workInProgress; + JSCompiler_object_inline_digest_2329.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2327; + workInProgress.child = JSCompiler_object_inline_digest_2329; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2327; + return JSCompiler_object_inline_digest_2329; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = createFiberFromOffscreen( @@ -14210,7 +14221,8 @@ __DEV__ && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -15043,7 +15055,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15086,7 +15098,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )), ensureRootIsScheduled(root), 2 !== lane || @@ -15099,191 +15111,193 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root.tag && exitStatus === RootErrored) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (0 !== root.tag && exitStatus === RootErrored) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - renderStartTime, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - renderStartTime, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + !workInProgressRootDidSkipSuspendedSiblings ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + 0 + ), + exitStatus + ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -15334,7 +15348,12 @@ __DEV__ && SUSPENDED_COMMIT ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -15400,18 +15419,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -15455,11 +15476,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -15582,7 +15599,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -15591,10 +15610,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -15615,37 +15634,46 @@ __DEV__ && } markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$42) { handleThrow(root, thrownValue$42); @@ -15656,15 +15684,12 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -15689,12 +15714,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); markRenderStarted(lanes); a: do try { @@ -16684,7 +16707,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -16758,45 +16782,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -25507,11 +25532,11 @@ __DEV__ && }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-native-fb-3c7667a6-20240925" !== isomorphicReactPackageVersion) + if ("19.0.0-native-fb-0f1856c4-20240925" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-native-fb-3c7667a6-20240925\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-native-fb-0f1856c4-20240925\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -25548,11 +25573,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925" + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -26012,7 +26037,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-native-fb-3c7667a6-20240925"; + exports.version = "19.0.0-native-fb-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js index f3225b3833ddc..fc558e6848662 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<12d0f35a67264fce7b09d1463c9fab19>> */ /* @@ -676,7 +676,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -685,7 +686,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -701,6 +703,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -800,7 +810,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); @@ -2055,19 +2066,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$290; + var JSCompiler_inline_result$jscomp$295; if (canUseDOM) { - var isSupported$jscomp$inline_424 = "oninput" in document; - if (!isSupported$jscomp$inline_424) { - var element$jscomp$inline_425 = document.createElement("div"); - element$jscomp$inline_425.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_424 = - "function" === typeof element$jscomp$inline_425.oninput; + var isSupported$jscomp$inline_429 = "oninput" in document; + if (!isSupported$jscomp$inline_429) { + var element$jscomp$inline_430 = document.createElement("div"); + element$jscomp$inline_430.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_429 = + "function" === typeof element$jscomp$inline_430.oninput; } - JSCompiler_inline_result$jscomp$290 = isSupported$jscomp$inline_424; - } else JSCompiler_inline_result$jscomp$290 = !1; + JSCompiler_inline_result$jscomp$295 = isSupported$jscomp$inline_429; + } else JSCompiler_inline_result$jscomp$295 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$290 && + JSCompiler_inline_result$jscomp$295 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -10181,7 +10192,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -10855,7 +10867,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -10867,7 +10879,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )), ensureRootIsScheduled(root), 2 === lane && @@ -10878,172 +10890,172 @@ function scheduleUpdateOnFiber(root, fiber, lane) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root$jscomp$0.tag && 2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (0 !== root$jscomp$0.tag && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11090,7 +11102,7 @@ function commitRootWhenReady( 1 ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11153,18 +11165,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$6 = 31 - clz32(lanes), lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + didAttemptEntireTree[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11208,9 +11222,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11298,7 +11310,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11307,10 +11321,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11318,6 +11332,7 @@ function renderRootSync(root, lanes) { if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11326,24 +11341,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$171) { - handleThrow(root, thrownValue$171); + } catch (thrownValue$176) { + handleThrow(root, thrownValue$176); } while (1); lanes && root.shellSuspendCounter++; @@ -11351,11 +11379,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11369,12 +11397,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11458,8 +11484,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$173) { - handleThrow(root, thrownValue$173); + } catch (thrownValue$178) { + handleThrow(root, thrownValue$178); } while (1); resetContextDependencies(); @@ -11781,7 +11807,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$177 = rootWithPendingPassiveEffects, + var root$182 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11820,7 +11846,7 @@ function flushPassiveEffects() { } finally { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$177, remainingLanes); + releaseRootPooledCache(root$182, remainingLanes); } } return !1; @@ -11980,14 +12006,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$179 = firstScheduledRoot; null !== root$179; ) { - if (!onlyLegacy || 0 === root$179.tag) + for (var root$184 = firstScheduledRoot; null !== root$184; ) { + if (!onlyLegacy || 0 === root$184.tag) if (0 !== syncTransitionLanes) { - var pendingLanes = root$179.pendingLanes; + var pendingLanes = root$184.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$179.suspendedLanes, - pingedLanes = root$179.pingedLanes; + var suspendedLanes = root$184.suspendedLanes, + pingedLanes = root$184.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12001,17 +12027,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$179, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$184, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$179, - root$179 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$184, + root$184 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$184, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$179, JSCompiler_inline_result)); - root$179 = root$179.next; + performSyncWorkOnRoot(root$184, JSCompiler_inline_result)); + root$184 = root$184.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -12080,39 +12107,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -12241,20 +12267,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1459 = 0; - i$jscomp$inline_1459 < simpleEventPluginEvents.length; - i$jscomp$inline_1459++ + var i$jscomp$inline_1466 = 0; + i$jscomp$inline_1466 < simpleEventPluginEvents.length; + i$jscomp$inline_1466++ ) { - var eventName$jscomp$inline_1460 = - simpleEventPluginEvents[i$jscomp$inline_1459], - domEventName$jscomp$inline_1461 = - eventName$jscomp$inline_1460.toLowerCase(), - capitalizedEvent$jscomp$inline_1462 = - eventName$jscomp$inline_1460[0].toUpperCase() + - eventName$jscomp$inline_1460.slice(1); + var eventName$jscomp$inline_1467 = + simpleEventPluginEvents[i$jscomp$inline_1466], + domEventName$jscomp$inline_1468 = + eventName$jscomp$inline_1467.toLowerCase(), + capitalizedEvent$jscomp$inline_1469 = + eventName$jscomp$inline_1467[0].toUpperCase() + + eventName$jscomp$inline_1467.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1461, - "on" + capitalizedEvent$jscomp$inline_1462 + domEventName$jscomp$inline_1468, + "on" + capitalizedEvent$jscomp$inline_1469 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -13437,34 +13463,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$193 = props[hasSrc]; - if (null != propValue$193) + var propValue$198 = props[hasSrc]; + if (null != propValue$198) switch (hasSrc) { case "name": - hasSrcSet = propValue$193; + hasSrcSet = propValue$198; break; case "type": - propValue = propValue$193; + propValue = propValue$198; break; case "checked": - checked = propValue$193; + checked = propValue$198; break; case "defaultChecked": - defaultChecked = propValue$193; + defaultChecked = propValue$198; break; case "value": - propKey = propValue$193; + propKey = propValue$198; break; case "defaultValue": - defaultValue = propValue$193; + defaultValue = propValue$198; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$193) + if (null != propValue$198) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$193, props, null); + setProp(domElement, tag, hasSrc, propValue$198, props, null); } } initInput( @@ -13601,14 +13627,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$193 in props) - props.hasOwnProperty(propValue$193) && - ((hasSrc = props[propValue$193]), + for (propValue$198 in props) + props.hasOwnProperty(propValue$198) && + ((hasSrc = props[propValue$198]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$193, + propValue$198, hasSrc, props, void 0 @@ -13656,14 +13682,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$210 in nextProps) { - var propKey = nextProps[propKey$210]; - lastProp = lastProps[propKey$210]; + for (var propKey$215 in nextProps) { + var propKey = nextProps[propKey$215]; + lastProp = lastProps[propKey$215]; if ( - nextProps.hasOwnProperty(propKey$210) && + nextProps.hasOwnProperty(propKey$215) && (null != propKey || null != lastProp) ) - switch (propKey$210) { + switch (propKey$215) { case "type": type = propKey; break; @@ -13692,7 +13718,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$210, + propKey$215, propKey, nextProps, lastProp @@ -13711,7 +13737,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$210 = null; + propKey = value = defaultValue = propKey$215 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -13742,7 +13768,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$210 = type; + propKey$215 = type; break; case "defaultValue": defaultValue = type; @@ -13763,15 +13789,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$210 - ? updateOptions(domElement, !!lastProps, propKey$210, !1) + null != propKey$215 + ? updateOptions(domElement, !!lastProps, propKey$215, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$210 = null; + propKey = propKey$215 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -13795,7 +13821,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$210 = name; + propKey$215 = name; break; case "defaultValue": propKey = name; @@ -13809,17 +13835,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$210, propKey); + updateTextarea(domElement, propKey$215, propKey); return; case "option": - for (var propKey$226 in lastProps) + for (var propKey$231 in lastProps) if ( - ((propKey$210 = lastProps[propKey$226]), - lastProps.hasOwnProperty(propKey$226) && - null != propKey$210 && - !nextProps.hasOwnProperty(propKey$226)) + ((propKey$215 = lastProps[propKey$231]), + lastProps.hasOwnProperty(propKey$231) && + null != propKey$215 && + !nextProps.hasOwnProperty(propKey$231)) ) - switch (propKey$226) { + switch (propKey$231) { case "selected": domElement.selected = !1; break; @@ -13827,33 +13853,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$226, + propKey$231, null, nextProps, - propKey$210 + propKey$215 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$210 = nextProps[lastDefaultValue]), + ((propKey$215 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$210 !== propKey && - (null != propKey$210 || null != propKey)) + propKey$215 !== propKey && + (null != propKey$215 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$210 && - "function" !== typeof propKey$210 && - "symbol" !== typeof propKey$210; + propKey$215 && + "function" !== typeof propKey$215 && + "symbol" !== typeof propKey$215; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$210, + propKey$215, nextProps, propKey ); @@ -13874,24 +13900,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$231 in lastProps) - (propKey$210 = lastProps[propKey$231]), - lastProps.hasOwnProperty(propKey$231) && - null != propKey$210 && - !nextProps.hasOwnProperty(propKey$231) && - setProp(domElement, tag, propKey$231, null, nextProps, propKey$210); + for (var propKey$236 in lastProps) + (propKey$215 = lastProps[propKey$236]), + lastProps.hasOwnProperty(propKey$236) && + null != propKey$215 && + !nextProps.hasOwnProperty(propKey$236) && + setProp(domElement, tag, propKey$236, null, nextProps, propKey$215); for (checked in nextProps) if ( - ((propKey$210 = nextProps[checked]), + ((propKey$215 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$210 !== propKey && - (null != propKey$210 || null != propKey)) + propKey$215 !== propKey && + (null != propKey$215 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$210) + if (null != propKey$215) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -13899,7 +13925,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$210, + propKey$215, nextProps, propKey ); @@ -13907,49 +13933,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$236 in lastProps) - (propKey$210 = lastProps[propKey$236]), - lastProps.hasOwnProperty(propKey$236) && - void 0 !== propKey$210 && - !nextProps.hasOwnProperty(propKey$236) && + for (var propKey$241 in lastProps) + (propKey$215 = lastProps[propKey$241]), + lastProps.hasOwnProperty(propKey$241) && + void 0 !== propKey$215 && + !nextProps.hasOwnProperty(propKey$241) && setPropOnCustomElement( domElement, tag, - propKey$236, + propKey$241, void 0, nextProps, - propKey$210 + propKey$215 ); for (defaultChecked in nextProps) - (propKey$210 = nextProps[defaultChecked]), + (propKey$215 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$210 === propKey || - (void 0 === propKey$210 && void 0 === propKey) || + propKey$215 === propKey || + (void 0 === propKey$215 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$210, + propKey$215, nextProps, propKey ); return; } } - for (var propKey$241 in lastProps) - (propKey$210 = lastProps[propKey$241]), - lastProps.hasOwnProperty(propKey$241) && - null != propKey$210 && - !nextProps.hasOwnProperty(propKey$241) && - setProp(domElement, tag, propKey$241, null, nextProps, propKey$210); + for (var propKey$246 in lastProps) + (propKey$215 = lastProps[propKey$246]), + lastProps.hasOwnProperty(propKey$246) && + null != propKey$215 && + !nextProps.hasOwnProperty(propKey$246) && + setProp(domElement, tag, propKey$246, null, nextProps, propKey$215); for (lastProp in nextProps) - (propKey$210 = nextProps[lastProp]), + (propKey$215 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$210 === propKey || - (null == propKey$210 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$210, nextProps, propKey); + propKey$215 === propKey || + (null == propKey$215 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$215, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -14489,26 +14515,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$249 = getResourcesFromRoot( + var styles$254 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$250 = styles$249.get(type); - resource$250 || + resource$255 = styles$254.get(type); + resource$255 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$250 = { + (resource$255 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$249.set(type, resource$250), - (styles$249 = JSCompiler_inline_result.querySelector( + styles$254.set(type, resource$255), + (styles$254 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$249._p && - ((resource$250.instance = styles$249), - (resource$250.state.loading = 5)), + !styles$254._p && + ((resource$255.instance = styles$254), + (resource$255.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -14521,16 +14547,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$249 || + styles$254 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$250.state + resource$255.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$250; + return resource$255; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -14627,37 +14653,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$255 = hoistableRoot.querySelector( + var instance$260 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$255) + if (instance$260) return ( (resource.state.loading |= 4), - (resource.instance = instance$255), - markNodeAsHoistable(instance$255), - instance$255 + (resource.instance = instance$260), + markNodeAsHoistable(instance$260), + instance$260 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$255 = ( + instance$260 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$255); - var linkInstance = instance$255; + markNodeAsHoistable(instance$260); + var linkInstance = instance$260; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$255, "link", instance); + setInitialProperties(instance$260, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$255, props.precedence, hoistableRoot); - return (resource.instance = instance$255); + insertStylesheet(instance$260, props.precedence, hoistableRoot); + return (resource.instance = instance$260); case "script": - instance$255 = getScriptKey(props.src); + instance$260 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$255) + getScriptSelectorFromKey(instance$260) )) ) return ( @@ -14666,7 +14692,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$255))) + if ((styleProps = preloadPropsMap.get(instance$260))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -15735,16 +15761,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1702 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1709 = React.version; if ( - "19.0.0-native-fb-3c7667a6-20240925" !== - isomorphicReactPackageVersion$jscomp$inline_1702 + "19.0.0-native-fb-0f1856c4-20240925" !== + isomorphicReactPackageVersion$jscomp$inline_1709 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1702, - "19.0.0-native-fb-3c7667a6-20240925" + isomorphicReactPackageVersion$jscomp$inline_1709, + "19.0.0-native-fb-0f1856c4-20240925" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15764,25 +15790,25 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2147 = { +var internals$jscomp$inline_2154 = { bundleType: 0, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925" + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2148 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2155 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2148.isDisabled && - hook$jscomp$inline_2148.supportsFiber + !hook$jscomp$inline_2155.isDisabled && + hook$jscomp$inline_2155.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2148.inject( - internals$jscomp$inline_2147 + (rendererID = hook$jscomp$inline_2155.inject( + internals$jscomp$inline_2154 )), - (injectedHook = hook$jscomp$inline_2148); + (injectedHook = hook$jscomp$inline_2155); } catch (err) {} } function noop() {} @@ -16028,4 +16054,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-native-fb-3c7667a6-20240925"; +exports.version = "19.0.0-native-fb-0f1856c4-20240925"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js index 4d02f55d422d2..90305fcc4cc29 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<0347ccbaa0f61b841a5a7174882e7e73>> + * @generated SignedSource<<01ecad18cf4ae8ac305813bc6fafd341>> */ /* @@ -745,7 +745,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -754,7 +755,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -770,6 +772,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -869,7 +879,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); @@ -2154,19 +2165,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$306; + var JSCompiler_inline_result$jscomp$311; if (canUseDOM) { - var isSupported$jscomp$inline_440 = "oninput" in document; - if (!isSupported$jscomp$inline_440) { - var element$jscomp$inline_441 = document.createElement("div"); - element$jscomp$inline_441.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_440 = - "function" === typeof element$jscomp$inline_441.oninput; + var isSupported$jscomp$inline_445 = "oninput" in document; + if (!isSupported$jscomp$inline_445) { + var element$jscomp$inline_446 = document.createElement("div"); + element$jscomp$inline_446.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_445 = + "function" === typeof element$jscomp$inline_446.oninput; } - JSCompiler_inline_result$jscomp$306 = isSupported$jscomp$inline_440; - } else JSCompiler_inline_result$jscomp$306 = !1; + JSCompiler_inline_result$jscomp$311 = isSupported$jscomp$inline_445; + } else JSCompiler_inline_result$jscomp$311 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$306 && + JSCompiler_inline_result$jscomp$311 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -10656,7 +10667,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { if (!isHydrating) @@ -11396,7 +11408,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -11409,7 +11421,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )), ensureRootIsScheduled(root), 2 === lane && @@ -11420,172 +11432,172 @@ function scheduleUpdateOnFiber(root, fiber, lane) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root$jscomp$0.tag && 2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (0 !== root$jscomp$0.tag && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now$1()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now$1()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11632,7 +11644,7 @@ function commitRootWhenReady( 1 ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11695,18 +11707,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$6 = 31 - clz32(lanes), lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + didAttemptEntireTree[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11750,9 +11764,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11869,7 +11881,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11878,10 +11892,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11899,32 +11913,46 @@ function renderRootSync(root, lanes) { } markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + memoizedUpdaters = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue, reason); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$186) { - handleThrow(root, thrownValue$186); + } catch (thrownValue$191) { + handleThrow(root, thrownValue$191); } while (1); lanes && root.shellSuspendCounter++; @@ -11932,12 +11960,12 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11959,12 +11987,7 @@ function renderRootConcurrent(root, lanes) { workInProgressRootRenderTargetTime = now$1() + 500; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); markRenderStarted(lanes); a: do try { @@ -12050,8 +12073,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$188) { - handleThrow(root, thrownValue$188); + } catch (thrownValue$193) { + handleThrow(root, thrownValue$193); } while (1); resetContextDependencies(); @@ -12411,7 +12434,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$192 = rootWithPendingPassiveEffects, + var root$197 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12461,7 +12484,7 @@ function flushPassiveEffects() { } finally { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$192, remainingLanes); + releaseRootPooledCache(root$197, remainingLanes); } } return !1; @@ -12628,14 +12651,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$194 = firstScheduledRoot; null !== root$194; ) { - if (!onlyLegacy || 0 === root$194.tag) + for (var root$199 = firstScheduledRoot; null !== root$199; ) { + if (!onlyLegacy || 0 === root$199.tag) if (0 !== syncTransitionLanes) { - var pendingLanes = root$194.pendingLanes; + var pendingLanes = root$199.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$194.suspendedLanes, - pingedLanes = root$194.pingedLanes; + var suspendedLanes = root$199.suspendedLanes, + pingedLanes = root$199.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12649,17 +12672,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$194, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$199, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$194, - root$194 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$199, + root$199 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$199, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$194, JSCompiler_inline_result)); - root$194 = root$194.next; + performSyncWorkOnRoot(root$199, JSCompiler_inline_result)); + root$199 = root$199.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -12728,39 +12752,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -12892,20 +12915,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1547 = 0; - i$jscomp$inline_1547 < simpleEventPluginEvents.length; - i$jscomp$inline_1547++ + var i$jscomp$inline_1554 = 0; + i$jscomp$inline_1554 < simpleEventPluginEvents.length; + i$jscomp$inline_1554++ ) { - var eventName$jscomp$inline_1548 = - simpleEventPluginEvents[i$jscomp$inline_1547], - domEventName$jscomp$inline_1549 = - eventName$jscomp$inline_1548.toLowerCase(), - capitalizedEvent$jscomp$inline_1550 = - eventName$jscomp$inline_1548[0].toUpperCase() + - eventName$jscomp$inline_1548.slice(1); + var eventName$jscomp$inline_1555 = + simpleEventPluginEvents[i$jscomp$inline_1554], + domEventName$jscomp$inline_1556 = + eventName$jscomp$inline_1555.toLowerCase(), + capitalizedEvent$jscomp$inline_1557 = + eventName$jscomp$inline_1555[0].toUpperCase() + + eventName$jscomp$inline_1555.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1549, - "on" + capitalizedEvent$jscomp$inline_1550 + domEventName$jscomp$inline_1556, + "on" + capitalizedEvent$jscomp$inline_1557 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14088,34 +14111,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$208 = props[hasSrc]; - if (null != propValue$208) + var propValue$213 = props[hasSrc]; + if (null != propValue$213) switch (hasSrc) { case "name": - hasSrcSet = propValue$208; + hasSrcSet = propValue$213; break; case "type": - propValue = propValue$208; + propValue = propValue$213; break; case "checked": - checked = propValue$208; + checked = propValue$213; break; case "defaultChecked": - defaultChecked = propValue$208; + defaultChecked = propValue$213; break; case "value": - propKey = propValue$208; + propKey = propValue$213; break; case "defaultValue": - defaultValue = propValue$208; + defaultValue = propValue$213; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$208) + if (null != propValue$213) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$208, props, null); + setProp(domElement, tag, hasSrc, propValue$213, props, null); } } initInput( @@ -14252,14 +14275,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$208 in props) - props.hasOwnProperty(propValue$208) && - ((hasSrc = props[propValue$208]), + for (propValue$213 in props) + props.hasOwnProperty(propValue$213) && + ((hasSrc = props[propValue$213]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$208, + propValue$213, hasSrc, props, void 0 @@ -14307,14 +14330,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$225 in nextProps) { - var propKey = nextProps[propKey$225]; - lastProp = lastProps[propKey$225]; + for (var propKey$230 in nextProps) { + var propKey = nextProps[propKey$230]; + lastProp = lastProps[propKey$230]; if ( - nextProps.hasOwnProperty(propKey$225) && + nextProps.hasOwnProperty(propKey$230) && (null != propKey || null != lastProp) ) - switch (propKey$225) { + switch (propKey$230) { case "type": type = propKey; break; @@ -14343,7 +14366,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$225, + propKey$230, propKey, nextProps, lastProp @@ -14362,7 +14385,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$225 = null; + propKey = value = defaultValue = propKey$230 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14393,7 +14416,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$225 = type; + propKey$230 = type; break; case "defaultValue": defaultValue = type; @@ -14414,15 +14437,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$225 - ? updateOptions(domElement, !!lastProps, propKey$225, !1) + null != propKey$230 + ? updateOptions(domElement, !!lastProps, propKey$230, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$225 = null; + propKey = propKey$230 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -14446,7 +14469,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$225 = name; + propKey$230 = name; break; case "defaultValue": propKey = name; @@ -14460,17 +14483,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$225, propKey); + updateTextarea(domElement, propKey$230, propKey); return; case "option": - for (var propKey$241 in lastProps) + for (var propKey$246 in lastProps) if ( - ((propKey$225 = lastProps[propKey$241]), - lastProps.hasOwnProperty(propKey$241) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$241)) + ((propKey$230 = lastProps[propKey$246]), + lastProps.hasOwnProperty(propKey$246) && + null != propKey$230 && + !nextProps.hasOwnProperty(propKey$246)) ) - switch (propKey$241) { + switch (propKey$246) { case "selected": domElement.selected = !1; break; @@ -14478,33 +14501,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$241, + propKey$246, null, nextProps, - propKey$225 + propKey$230 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$225 = nextProps[lastDefaultValue]), + ((propKey$230 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$225 !== propKey && - (null != propKey$225 || null != propKey)) + propKey$230 !== propKey && + (null != propKey$230 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$225 && - "function" !== typeof propKey$225 && - "symbol" !== typeof propKey$225; + propKey$230 && + "function" !== typeof propKey$230 && + "symbol" !== typeof propKey$230; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$225, + propKey$230, nextProps, propKey ); @@ -14525,24 +14548,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$246 in lastProps) - (propKey$225 = lastProps[propKey$246]), - lastProps.hasOwnProperty(propKey$246) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$246) && - setProp(domElement, tag, propKey$246, null, nextProps, propKey$225); + for (var propKey$251 in lastProps) + (propKey$230 = lastProps[propKey$251]), + lastProps.hasOwnProperty(propKey$251) && + null != propKey$230 && + !nextProps.hasOwnProperty(propKey$251) && + setProp(domElement, tag, propKey$251, null, nextProps, propKey$230); for (checked in nextProps) if ( - ((propKey$225 = nextProps[checked]), + ((propKey$230 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$225 !== propKey && - (null != propKey$225 || null != propKey)) + propKey$230 !== propKey && + (null != propKey$230 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$225) + if (null != propKey$230) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -14550,7 +14573,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$225, + propKey$230, nextProps, propKey ); @@ -14558,49 +14581,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$251 in lastProps) - (propKey$225 = lastProps[propKey$251]), - lastProps.hasOwnProperty(propKey$251) && - void 0 !== propKey$225 && - !nextProps.hasOwnProperty(propKey$251) && + for (var propKey$256 in lastProps) + (propKey$230 = lastProps[propKey$256]), + lastProps.hasOwnProperty(propKey$256) && + void 0 !== propKey$230 && + !nextProps.hasOwnProperty(propKey$256) && setPropOnCustomElement( domElement, tag, - propKey$251, + propKey$256, void 0, nextProps, - propKey$225 + propKey$230 ); for (defaultChecked in nextProps) - (propKey$225 = nextProps[defaultChecked]), + (propKey$230 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$225 === propKey || - (void 0 === propKey$225 && void 0 === propKey) || + propKey$230 === propKey || + (void 0 === propKey$230 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$225, + propKey$230, nextProps, propKey ); return; } } - for (var propKey$256 in lastProps) - (propKey$225 = lastProps[propKey$256]), - lastProps.hasOwnProperty(propKey$256) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$256) && - setProp(domElement, tag, propKey$256, null, nextProps, propKey$225); + for (var propKey$261 in lastProps) + (propKey$230 = lastProps[propKey$261]), + lastProps.hasOwnProperty(propKey$261) && + null != propKey$230 && + !nextProps.hasOwnProperty(propKey$261) && + setProp(domElement, tag, propKey$261, null, nextProps, propKey$230); for (lastProp in nextProps) - (propKey$225 = nextProps[lastProp]), + (propKey$230 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$225 === propKey || - (null == propKey$225 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$225, nextProps, propKey); + propKey$230 === propKey || + (null == propKey$230 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$230, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15140,26 +15163,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$264 = getResourcesFromRoot( + var styles$269 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$265 = styles$264.get(type); - resource$265 || + resource$270 = styles$269.get(type); + resource$270 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$265 = { + (resource$270 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$264.set(type, resource$265), - (styles$264 = JSCompiler_inline_result.querySelector( + styles$269.set(type, resource$270), + (styles$269 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$264._p && - ((resource$265.instance = styles$264), - (resource$265.state.loading = 5)), + !styles$269._p && + ((resource$270.instance = styles$269), + (resource$270.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15172,16 +15195,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$264 || + styles$269 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$265.state + resource$270.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$265; + return resource$270; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15278,37 +15301,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$270 = hoistableRoot.querySelector( + var instance$275 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$270) + if (instance$275) return ( (resource.state.loading |= 4), - (resource.instance = instance$270), - markNodeAsHoistable(instance$270), - instance$270 + (resource.instance = instance$275), + markNodeAsHoistable(instance$275), + instance$275 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$270 = ( + instance$275 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$270); - var linkInstance = instance$270; + markNodeAsHoistable(instance$275); + var linkInstance = instance$275; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$270, "link", instance); + setInitialProperties(instance$275, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$270, props.precedence, hoistableRoot); - return (resource.instance = instance$270); + insertStylesheet(instance$275, props.precedence, hoistableRoot); + return (resource.instance = instance$275); case "script": - instance$270 = getScriptKey(props.src); + instance$275 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$270) + getScriptSelectorFromKey(instance$275) )) ) return ( @@ -15317,7 +15340,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$270))) + if ((styleProps = preloadPropsMap.get(instance$275))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16394,16 +16417,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1792 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1799 = React.version; if ( - "19.0.0-native-fb-3c7667a6-20240925" !== - isomorphicReactPackageVersion$jscomp$inline_1792 + "19.0.0-native-fb-0f1856c4-20240925" !== + isomorphicReactPackageVersion$jscomp$inline_1799 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1792, - "19.0.0-native-fb-3c7667a6-20240925" + isomorphicReactPackageVersion$jscomp$inline_1799, + "19.0.0-native-fb-0f1856c4-20240925" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -16423,18 +16446,18 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_1799 = { +var internals$jscomp$inline_1806 = { bundleType: 0, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925", + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925", getLaneLabelMap: function () { for ( - var map = new Map(), lane = 1, index$287 = 0; - 31 > index$287; - index$287++ + var map = new Map(), lane = 1, index$292 = 0; + 31 > index$292; + index$292++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -16447,16 +16470,16 @@ var internals$jscomp$inline_1799 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2199 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2206 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2199.isDisabled && - hook$jscomp$inline_2199.supportsFiber + !hook$jscomp$inline_2206.isDisabled && + hook$jscomp$inline_2206.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2199.inject( - internals$jscomp$inline_1799 + (rendererID = hook$jscomp$inline_2206.inject( + internals$jscomp$inline_1806 )), - (injectedHook = hook$jscomp$inline_2199); + (injectedHook = hook$jscomp$inline_2206); } catch (err) {} } function noop() {} @@ -16702,7 +16725,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-native-fb-3c7667a6-20240925"; +exports.version = "19.0.0-native-fb-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js index bdd910fe08e41..eb0daaff9c865 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,13 +7,13 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<2dcc2374e5a95b71150f597abbb146f3>> */ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1104() { + function JSCompiler_object_inline_createNodeMock_1102() { return null; } function findHook(fiber, id) { @@ -842,43 +842,39 @@ __DEV__ && var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -945,9 +941,7 @@ __DEV__ && root, finishedLanes, remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; @@ -958,17 +952,17 @@ __DEV__ && root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; + var index = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index; + finishedLanes[index] = 0; expirationTimes[index] = -1; var hiddenUpdatesForLane = hiddenUpdates[index]; if (null !== hiddenUpdatesForLane) @@ -980,13 +974,9 @@ __DEV__ && var update = hiddenUpdatesForLane[index]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -1895,7 +1885,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -1980,8 +1971,6 @@ __DEV__ && else return currentTime; switch (lanesToEventPriority(suspendedLanes)) { case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; case ContinuousEventPriority: suspendedLanes = UserBlockingPriority; break; @@ -7937,8 +7926,7 @@ __DEV__ && workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -10668,8 +10656,7 @@ __DEV__ && markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated(root, lane); if ( @@ -10710,8 +10697,7 @@ __DEV__ && markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root), 2 !== lane || @@ -10724,180 +10710,170 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root.tag && exitStatus === RootErrored) { - var lanesThatJustErrored = lanes; - root.errorRecoveryDisabledLanes & lanesThatJustErrored - ? (renderWasConcurrent = 0) - : ((renderWasConcurrent = root.pendingLanes & -536870913), - (renderWasConcurrent = - 0 !== renderWasConcurrent - ? renderWasConcurrent - : renderWasConcurrent & 536870912 - ? 536870912 - : 0)); - if (0 !== renderWasConcurrent) { - lanes = renderWasConcurrent; - a: { - exitStatus = root; - var originallyAttemptedLanes = lanesThatJustErrored; - lanesThatJustErrored = workInProgressRootConcurrentErrors; - renderWasConcurrent = renderRootSync( - exitStatus, - renderWasConcurrent - ); - if (renderWasConcurrent !== RootErrored) { - if (workInProgressRootDidAttachPingListener) { - exitStatus.errorRecoveryDisabledLanes |= - originallyAttemptedLanes; - workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) break; + else if (exitStatus === RootDidNotComplete) + markRootSuspended(root, lanes, 0); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (0 !== root.tag && exitStatus === RootErrored) { + var lanesThatJustErrored = lanes; + root.errorRecoveryDisabledLanes & lanesThatJustErrored + ? (renderWasConcurrent = 0) + : ((renderWasConcurrent = root.pendingLanes & -536870913), + (renderWasConcurrent = + 0 !== renderWasConcurrent + ? renderWasConcurrent + : renderWasConcurrent & 536870912 + ? 536870912 + : 0)); + if (0 !== renderWasConcurrent) { + lanes = renderWasConcurrent; + a: { + exitStatus = root; + var originallyAttemptedLanes = lanesThatJustErrored; + lanesThatJustErrored = workInProgressRootConcurrentErrors; + renderWasConcurrent = renderRootSync( + exitStatus, + renderWasConcurrent, + !1 + ); + if (renderWasConcurrent !== RootErrored) { + if (workInProgressRootDidAttachPingListener) { + exitStatus.errorRecoveryDisabledLanes |= + originallyAttemptedLanes; + workInProgressRootInterleavedUpdatedLanes |= + originallyAttemptedLanes; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = renderWasConcurrent; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = lanesThatJustErrored; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = renderWasConcurrent; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - -0, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - exitStatus === RootSuspended && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus + workInProgressDeferredLane ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + -0, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + exitStatus === RootSuspended && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + workInProgressDeferredLane ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus + ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -10985,22 +10961,19 @@ __DEV__ && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } - function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings - ) { + function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + expirationTimes[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11067,8 +11040,9 @@ __DEV__ && workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11188,8 +11162,7 @@ __DEV__ && markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function renderRootSync(root, lanes) { @@ -11204,6 +11177,7 @@ __DEV__ && (workInProgressTransitions = null), prepareFreshStack(root, lanes); markRenderStarted(lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if ( @@ -11215,21 +11189,26 @@ __DEV__ && switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + exitStatus = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; } catch (thrownValue$33) { handleThrow(root, thrownValue$33); @@ -11240,15 +11219,12 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11258,13 +11234,11 @@ __DEV__ && executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher(); - if ( - workInProgressRoot !== root || - workInProgressRootRenderLanes !== lanes - ) - (workInProgressTransitions = null), + workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes + ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS), - prepareFreshStack(root, lanes); + prepareFreshStack(root, lanes)) + : checkIfRootIsPrerendering(root, lanes); markRenderStarted(lanes); a: do try { @@ -11630,9 +11604,7 @@ __DEV__ && transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -11661,14 +11633,7 @@ __DEV__ && root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); + markRootFinished(root, lanes, remainingLanes, spawnedLane); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -11685,30 +11650,30 @@ __DEV__ && })); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = currentUpdatePriority), - (currentUpdatePriority = DiscreteEventPriority), - (updatedLanes = executionContext), - (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffectsOnFiber(finishedWork, root), - (root.current = finishedWork), - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = updatedLanes), - (currentUpdatePriority = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + commitBeforeMutationEffects(root, finishedWork); + commitMutationEffectsOnFiber(finishedWork, root); + root.current = finishedWork; + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes); + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + requestPaint(); + executionContext = prevExecutionContext; + currentUpdatePriority = spawnedLane; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; (transitions = rootDoesHavePassiveEffects) ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -15065,11 +15030,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925" + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15091,7 +15056,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1104, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1102, isConcurrent = !1, isStrictMode = !1; "object" === typeof options && @@ -15214,5 +15179,5 @@ __DEV__ && flushSyncWorkAcrossRoots_impl(0, !0)); } }; - exports.version = "19.0.0-native-fb-3c7667a6-20240925"; + exports.version = "19.0.0-native-fb-0f1856c4-20240925"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js index a518331f1c058..af8b705d1381a 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<9064d42607cf1d875841949ec6f38022>> */ "use strict"; @@ -537,43 +537,39 @@ function getNextLanes(root, wipLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -631,14 +627,7 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes -) { +function markRootFinished(root, finishedLanes, remainingLanes, spawnedLane) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; @@ -648,35 +637,31 @@ function markRootFinished( root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index$7 = 31 - clz32(remainingLanes), - lane = 1 << index$7; - entanglements[index$7] = 0; - expirationTimes[index$7] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$7]; + var index$6 = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index$6; + finishedLanes[index$6] = 0; + expirationTimes[index$6] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$6]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$7] = null, index$7 = 0; - index$7 < hiddenUpdatesForLane.length; - index$7++ + hiddenUpdates[index$6] = null, index$6 = 0; + index$6 < hiddenUpdatesForLane.length; + index$6++ ) { - var update = hiddenUpdatesForLane[index$7]; + var update = hiddenUpdatesForLane[index$6]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -691,10 +676,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$8 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$8; - (lane & entangledLanes) | (root[index$8] & entangledLanes) && - (root[index$8] |= entangledLanes); + var index$7 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$7; + (lane & entangledLanes) | (root[index$7] & entangledLanes) && + (root[index$7] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -1023,7 +1008,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -1061,12 +1047,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$5 = 31 - clz32(lanes), - lane = 1 << index$5, - expirationTime = expirationTimes[index$5]; + var index$4 = 31 - clz32(lanes), + lane = 1 << index$4, + expirationTime = expirationTimes[index$4]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$5] = computeExpirationTime(lane, currentTime); + expirationTimes[index$4] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -1103,8 +1089,6 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { null !== pingedLanes && cancelCallback$1(pingedLanes); switch (lanesToEventPriority(suspendedLanes)) { case 2: - suspendedLanes = ImmediatePriority; - break; case 8: suspendedLanes = UserBlockingPriority; break; @@ -2627,7 +2611,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$41 = !1; + didReadFromEntangledAsyncAction$40 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -2648,11 +2632,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$41 = !0); + (didReadFromEntangledAsyncAction$40 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$41 = !0); + (didReadFromEntangledAsyncAction$40 = !0); continue; } else (updateLane = { @@ -2698,7 +2682,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$41 && + didReadFromEntangledAsyncAction$40 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -2889,8 +2873,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$45) { - onActionError(actionQueue, node, error$45); + } catch (error$44) { + onActionError(actionQueue, node, error$44); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -3762,9 +3746,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$47 in Component) - void 0 === newProps[propName$47] && - (newProps[propName$47] = Component[propName$47]); + for (var propName$46 in Component) + void 0 === newProps[propName$46] && + (newProps[propName$46] = Component[propName$46]); } return newProps; } @@ -5713,8 +5697,7 @@ function scheduleRetryEffect(workInProgress, retryQueue) { workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -5730,14 +5713,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$87 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$87 = lastTailNode), + for (var lastTailNode$86 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$86 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$87 + null === lastTailNode$86 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$87.sibling = null); + : (lastTailNode$86.sibling = null); } } function bubbleProperties(completedWork) { @@ -5747,19 +5730,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$88 = completedWork.child; null !== child$88; ) - (newChildLanes |= child$88.lanes | child$88.childLanes), - (subtreeFlags |= child$88.subtreeFlags & 31457280), - (subtreeFlags |= child$88.flags & 31457280), - (child$88.return = completedWork), - (child$88 = child$88.sibling); + for (var child$87 = completedWork.child; null !== child$87; ) + (newChildLanes |= child$87.lanes | child$87.childLanes), + (subtreeFlags |= child$87.subtreeFlags & 31457280), + (subtreeFlags |= child$87.flags & 31457280), + (child$87.return = completedWork), + (child$87 = child$87.sibling); else - for (child$88 = completedWork.child; null !== child$88; ) - (newChildLanes |= child$88.lanes | child$88.childLanes), - (subtreeFlags |= child$88.subtreeFlags), - (subtreeFlags |= child$88.flags), - (child$88.return = completedWork), - (child$88 = child$88.sibling); + for (child$87 = completedWork.child; null !== child$87; ) + (newChildLanes |= child$87.lanes | child$87.childLanes), + (subtreeFlags |= child$87.subtreeFlags), + (subtreeFlags |= child$87.flags), + (child$87.return = completedWork), + (child$87 = child$87.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -5922,11 +5905,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (index = newProps.alternate.memoizedState.cachePool.pool); - var cache$92 = null; + var cache$91 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$92 = newProps.memoizedState.cachePool.pool); - cache$92 !== index && (newProps.flags |= 2048); + (cache$91 = newProps.memoizedState.cachePool.pool); + cache$91 !== index && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -5951,8 +5934,8 @@ function completeWork(current, workInProgress, renderLanes) { index = workInProgress.memoizedState; if (null === index) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$92 = index.rendering; - if (null === cache$92) + cache$91 = index.rendering; + if (null === cache$91) if (newProps) cutOffTailIfNeeded(index, !1); else { if ( @@ -5960,11 +5943,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$92 = findFirstSuspended(current); - if (null !== cache$92) { + cache$91 = findFirstSuspended(current); + if (null !== cache$91) { workInProgress.flags |= 128; cutOffTailIfNeeded(index, !1); - current = cache$92.updateQueue; + current = cache$91.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -5989,7 +5972,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$92)), null !== current)) { + if (((current = findFirstSuspended(cache$91)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -5999,7 +5982,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !0), null === index.tail && "hidden" === index.tailMode && - !cache$92.alternate) + !cache$91.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6011,13 +5994,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !1), (workInProgress.lanes = 4194304)); index.isBackwards - ? ((cache$92.sibling = workInProgress.child), - (workInProgress.child = cache$92)) + ? ((cache$91.sibling = workInProgress.child), + (workInProgress.child = cache$91)) : ((current = index.last), null !== current - ? (current.sibling = cache$92) - : (workInProgress.child = cache$92), - (index.last = cache$92)); + ? (current.sibling = cache$91) + : (workInProgress.child = cache$91), + (index.last = cache$91)); } if (null !== index.tail) return ( @@ -6199,9 +6182,9 @@ function commitHookEffectListMount(flags, finishedWork) { do { if ((updateQueue.tag & flags) === flags) { lastEffect = void 0; - var create$108 = updateQueue.create, + var create$107 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$108(); + lastEffect = create$107(); inst.destroy = lastEffect; } updateQueue = updateQueue.next; @@ -6314,8 +6297,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$110) { - captureCommitPhaseError(current, nearestMountedAncestor, error$110); + } catch (error$109) { + captureCommitPhaseError(current, nearestMountedAncestor, error$109); } else ref.current = null; } @@ -6479,11 +6462,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$109) { + } catch (error$108) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$109 + error$108 ); } } @@ -7019,12 +7002,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$111 = JSCompiler_inline_result.stateNode.containerInfo, - before$112 = getHostSibling(finishedWork); + var parent$110 = JSCompiler_inline_result.stateNode.containerInfo, + before$111 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$112, - parent$111 + before$111, + parent$110 ); break; default: @@ -7726,8 +7709,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -7738,8 +7720,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root), 2 === lane && @@ -7751,165 +7732,148 @@ function scheduleUpdateOnFiber(root, fiber, lane) { function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root$jscomp$0.tag && 2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) break; + else if (6 === exitStatus) markRootSuspended(root$jscomp$0, lanes, 0); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (0 !== root$jscomp$0.tag && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if (workInProgressRootDidAttachPingListener) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if (workInProgressRootDidAttachPingListener) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error("Root did not complete. This is a bug in React."); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error("Unknown root exit status."); } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error("Root did not complete. This is a bug in React."); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - 3 === exitStatus && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + 3 === renderWasConcurrent && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { + markRootSuspended(shouldTimeSlice, lanes, workInProgressDeferredLane); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -8003,22 +7967,19 @@ function markRootUpdated(root, updatedLanes) { : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } -function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings -) { +function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { - var index$6 = 31 - clz32(lanes), - lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5; + expirationTimes[index$5] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -8075,8 +8036,9 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = @@ -8095,9 +8057,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$4 = 31 - clz32(allEntangledLanes), - lane = 1 << index$4; - lanes |= root[index$4]; + var index$3 = 31 - clz32(allEntangledLanes), + lane = 1 << index$3; + lanes |= root[index$3]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -8161,8 +8123,7 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function renderRootSync(root, lanes) { @@ -8173,6 +8134,7 @@ function renderRootSync(root, lanes) { if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -8181,21 +8143,26 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; } catch (thrownValue$122) { handleThrow(root, thrownValue$122); @@ -8206,14 +8173,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -8223,10 +8187,11 @@ function renderRootConcurrent(root, lanes) { executionContext |= 2; var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher(); - if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) - (workInProgressTransitions = null), + workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes + ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now() + 500), - prepareFreshStack(root, lanes); + prepareFreshStack(root, lanes)) + : checkIfRootIsPrerendering(root, lanes); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -8471,9 +8436,7 @@ function commitRootImpl( transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -8493,14 +8456,7 @@ function commitRootImpl( root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); + markRootFinished(root, lanes, remainingLanes, spawnedLane); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -8516,22 +8472,22 @@ function commitRootImpl( return null; })); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = currentUpdatePriority), - (currentUpdatePriority = 2), - (updatedLanes = executionContext), - (executionContext |= 4), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffectsOnFiber(finishedWork, root), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - (currentUpdatePriority = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = currentUpdatePriority; + currentUpdatePriority = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + commitBeforeMutationEffects(root, finishedWork); + commitMutationEffectsOnFiber(finishedWork, root); + root.current = finishedWork; + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + requestPaint(); + executionContext = prevExecutionContext; + currentUpdatePriority = spawnedLane; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -9439,28 +9395,28 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var internals$jscomp$inline_1322 = { +var internals$jscomp$inline_1320 = { bundleType: 0, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function (mockNode) { mockNode = nodeToInstanceMap.get(mockNode); return void 0 !== mockNode ? mockNode.internalInstanceHandle : null; }, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925" + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1323 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1321 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1323.isDisabled && - hook$jscomp$inline_1323.supportsFiber + !hook$jscomp$inline_1321.isDisabled && + hook$jscomp$inline_1321.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1323.inject( - internals$jscomp$inline_1322 + (rendererID = hook$jscomp$inline_1321.inject( + internals$jscomp$inline_1320 )), - (injectedHook = hook$jscomp$inline_1323); + (injectedHook = hook$jscomp$inline_1321); } catch (err) {} } exports._Scheduler = Scheduler; @@ -9584,4 +9540,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.0.0-native-fb-3c7667a6-20240925"; +exports.version = "19.0.0-native-fb-0f1856c4-20240925"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js index 8cd34771f2f30..bffcc032421eb 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9a0a4ab4dc30da088bcd11b646b7083c>> + * @generated SignedSource<> */ "use strict"; @@ -602,43 +602,39 @@ function getNextLanes(root, wipLanes) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, - suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + suspendedLanes = root.suspendedLanes; + root = root.pingedLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), 0 !== pendingLanes ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), - 0 !== nonIdlePendingLanes - ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) - : 0 !== pingedLanes - ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : ((root &= nonIdlePendingLanes), + 0 !== root && (nextLanes = getHighestPriorityLanes(root)))) + : ((pendingLanes &= ~suspendedLanes), + 0 !== pendingLanes + ? (nextLanes = getHighestPriorityLanes(pendingLanes)) + : 0 !== root && (nextLanes = getHighestPriorityLanes(root))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (root = wipLanes & -wipLanes), + suspendedLanes >= root || + (32 === suspendedLanes && 0 !== (root & 4194176))) ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -696,14 +692,7 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes -) { +function markRootFinished(root, finishedLanes, remainingLanes, spawnedLane) { var previouslyPendingLanes = root.pendingLanes; root.pendingLanes = remainingLanes; root.suspendedLanes = 0; @@ -713,35 +702,31 @@ function markRootFinished( root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, + finishedLanes = root.entanglements; + var expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; for ( remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) { - var index$7 = 31 - clz32(remainingLanes), - lane = 1 << index$7; - entanglements[index$7] = 0; - expirationTimes[index$7] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$7]; + var index$6 = 31 - clz32(remainingLanes); + previouslyPendingLanes = 1 << index$6; + finishedLanes[index$6] = 0; + expirationTimes[index$6] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$6]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$7] = null, index$7 = 0; - index$7 < hiddenUpdatesForLane.length; - index$7++ + hiddenUpdates[index$6] = null, index$6 = 0; + index$6 < hiddenUpdatesForLane.length; + index$6++ ) { - var update = hiddenUpdatesForLane[index$7]; + var update = hiddenUpdatesForLane[index$6]; null !== update && (update.lane &= -536870913); } - remainingLanes &= ~lane; + remainingLanes &= ~previouslyPendingLanes; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; @@ -756,10 +741,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$8 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$8; - (lane & entangledLanes) | (root[index$8] & entangledLanes) && - (root[index$8] |= entangledLanes); + var index$7 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$7; + (lane & entangledLanes) | (root[index$7] & entangledLanes) && + (root[index$7] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -1142,7 +1127,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -1180,12 +1166,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < lanes; ) { - var index$5 = 31 - clz32(lanes), - lane = 1 << index$5, - expirationTime = expirationTimes[index$5]; + var index$4 = 31 - clz32(lanes), + lane = 1 << index$4, + expirationTime = expirationTimes[index$4]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$5] = computeExpirationTime(lane, currentTime); + expirationTimes[index$4] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -1222,8 +1208,6 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { null !== pingedLanes && cancelCallback$1(pingedLanes); switch (lanesToEventPriority(suspendedLanes)) { case 2: - suspendedLanes = ImmediatePriority; - break; case 8: suspendedLanes = UserBlockingPriority; break; @@ -2749,7 +2733,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$41 = !1; + didReadFromEntangledAsyncAction$40 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -2770,11 +2754,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$41 = !0); + (didReadFromEntangledAsyncAction$40 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$41 = !0); + (didReadFromEntangledAsyncAction$40 = !0); continue; } else (updateLane = { @@ -2820,7 +2804,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$41 && + didReadFromEntangledAsyncAction$40 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -3011,8 +2995,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$45) { - onActionError(actionQueue, node, error$45); + } catch (error$44) { + onActionError(actionQueue, node, error$44); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -3892,9 +3876,9 @@ function resolveClassComponentProps(Component, baseProps) { } if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$47 in Component) - void 0 === newProps[propName$47] && - (newProps[propName$47] = Component[propName$47]); + for (var propName$46 in Component) + void 0 === newProps[propName$46] && + (newProps[propName$46] = Component[propName$46]); } return newProps; } @@ -5882,8 +5866,7 @@ function scheduleRetryEffect(workInProgress, retryQueue) { workInProgress.flags & 16384 && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), - (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + (workInProgress.lanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -5899,14 +5882,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$88 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$88 = lastTailNode), + for (var lastTailNode$87 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$87 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$88 + null === lastTailNode$87 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$88.sibling = null); + : (lastTailNode$87.sibling = null); } } function bubbleProperties(completedWork) { @@ -5918,53 +5901,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$90 = completedWork.selfBaseDuration, - child$91 = completedWork.child; - null !== child$91; + var treeBaseDuration$89 = completedWork.selfBaseDuration, + child$90 = completedWork.child; + null !== child$90; ) - (newChildLanes |= child$91.lanes | child$91.childLanes), - (subtreeFlags |= child$91.subtreeFlags & 31457280), - (subtreeFlags |= child$91.flags & 31457280), - (treeBaseDuration$90 += child$91.treeBaseDuration), - (child$91 = child$91.sibling); - completedWork.treeBaseDuration = treeBaseDuration$90; + (newChildLanes |= child$90.lanes | child$90.childLanes), + (subtreeFlags |= child$90.subtreeFlags & 31457280), + (subtreeFlags |= child$90.flags & 31457280), + (treeBaseDuration$89 += child$90.treeBaseDuration), + (child$90 = child$90.sibling); + completedWork.treeBaseDuration = treeBaseDuration$89; } else for ( - treeBaseDuration$90 = completedWork.child; - null !== treeBaseDuration$90; + treeBaseDuration$89 = completedWork.child; + null !== treeBaseDuration$89; ) (newChildLanes |= - treeBaseDuration$90.lanes | treeBaseDuration$90.childLanes), - (subtreeFlags |= treeBaseDuration$90.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$90.flags & 31457280), - (treeBaseDuration$90.return = completedWork), - (treeBaseDuration$90 = treeBaseDuration$90.sibling); + treeBaseDuration$89.lanes | treeBaseDuration$89.childLanes), + (subtreeFlags |= treeBaseDuration$89.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$89.flags & 31457280), + (treeBaseDuration$89.return = completedWork), + (treeBaseDuration$89 = treeBaseDuration$89.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$90 = completedWork.actualDuration; - child$91 = completedWork.selfBaseDuration; + treeBaseDuration$89 = completedWork.actualDuration; + child$90 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$90 += child.actualDuration), - (child$91 += child.treeBaseDuration), + (treeBaseDuration$89 += child.actualDuration), + (child$90 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$90; - completedWork.treeBaseDuration = child$91; + completedWork.actualDuration = treeBaseDuration$89; + completedWork.treeBaseDuration = child$90; } else for ( - treeBaseDuration$90 = completedWork.child; - null !== treeBaseDuration$90; + treeBaseDuration$89 = completedWork.child; + null !== treeBaseDuration$89; ) (newChildLanes |= - treeBaseDuration$90.lanes | treeBaseDuration$90.childLanes), - (subtreeFlags |= treeBaseDuration$90.subtreeFlags), - (subtreeFlags |= treeBaseDuration$90.flags), - (treeBaseDuration$90.return = completedWork), - (treeBaseDuration$90 = treeBaseDuration$90.sibling); + treeBaseDuration$89.lanes | treeBaseDuration$89.childLanes), + (subtreeFlags |= treeBaseDuration$89.subtreeFlags), + (subtreeFlags |= treeBaseDuration$89.flags), + (treeBaseDuration$89.return = completedWork), + (treeBaseDuration$89 = treeBaseDuration$89.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6137,11 +6120,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (index = newProps.alternate.memoizedState.cachePool.pool); - var cache$98 = null; + var cache$97 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$98 = newProps.memoizedState.cachePool.pool); - cache$98 !== index && (newProps.flags |= 2048); + (cache$97 = newProps.memoizedState.cachePool.pool); + cache$97 !== index && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -6171,8 +6154,8 @@ function completeWork(current, workInProgress, renderLanes) { index = workInProgress.memoizedState; if (null === index) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$98 = index.rendering; - if (null === cache$98) + cache$97 = index.rendering; + if (null === cache$97) if (newProps) cutOffTailIfNeeded(index, !1); else { if ( @@ -6180,11 +6163,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$98 = findFirstSuspended(current); - if (null !== cache$98) { + cache$97 = findFirstSuspended(current); + if (null !== cache$97) { workInProgress.flags |= 128; cutOffTailIfNeeded(index, !1); - current = cache$98.updateQueue; + current = cache$97.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6209,7 +6192,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$98)), null !== current)) { + if (((current = findFirstSuspended(cache$97)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6219,7 +6202,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !0), null === index.tail && "hidden" === index.tailMode && - !cache$98.alternate) + !cache$97.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6231,13 +6214,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !1), (workInProgress.lanes = 4194304)); index.isBackwards - ? ((cache$98.sibling = workInProgress.child), - (workInProgress.child = cache$98)) + ? ((cache$97.sibling = workInProgress.child), + (workInProgress.child = cache$97)) : ((current = index.last), null !== current - ? (current.sibling = cache$98) - : (workInProgress.child = cache$98), - (index.last = cache$98)); + ? (current.sibling = cache$97) + : (workInProgress.child = cache$97), + (index.last = cache$97)); } if (null !== index.tail) return ( @@ -6471,9 +6454,9 @@ function commitHookEffectListMount(flags, finishedWork) { finishedWork ); lastEffect = void 0; - var create$114 = updateQueue.create, + var create$113 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$114(); + lastEffect = create$113(); inst.destroy = lastEffect; 0 !== (flags & 8) ? null !== injectedProfilingHooks && @@ -6612,8 +6595,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$118) { - captureCommitPhaseError(current, nearestMountedAncestor, error$118); + } catch (error$117) { + captureCommitPhaseError(current, nearestMountedAncestor, error$117); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -6673,8 +6656,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$119) { - captureCommitPhaseError(current, nearestMountedAncestor, error$119); + } catch (error$118) { + captureCommitPhaseError(current, nearestMountedAncestor, error$118); } else ref.current = null; } @@ -6865,11 +6848,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$115) { + } catch (error$114) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$115 + error$114 ); } else { @@ -6886,11 +6869,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$116) { + } catch (error$115) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$116 + error$115 ); } recordEffectDuration(); @@ -6901,11 +6884,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$117) { + } catch (error$116) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$117 + error$116 ); } } @@ -7459,12 +7442,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$120 = JSCompiler_inline_result.stateNode.containerInfo, - before$121 = getHostSibling(finishedWork); + var parent$119 = JSCompiler_inline_result.stateNode.containerInfo, + before$120 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$121, - parent$120 + before$120, + parent$119 ); break; default: @@ -8196,8 +8179,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -8208,8 +8190,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootSuspended( root, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane )), ensureRootIsScheduled(root), 2 === lane && @@ -8221,165 +8202,148 @@ function scheduleUpdateOnFiber(root, fiber, lane) { function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root$jscomp$0.tag && 2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) break; + else if (6 === exitStatus) markRootSuspended(root$jscomp$0, lanes, 0); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (0 !== root$jscomp$0.tag && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if (workInProgressRootDidAttachPingListener) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if (workInProgressRootDidAttachPingListener) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error("Root did not complete. This is a bug in React."); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error("Unknown root exit status."); } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error("Root did not complete. This is a bug in React."); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - 3 === exitStatus && - ((exitStatus = globalMostRecentFallbackTime + 300 - now$1()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + 3 === renderWasConcurrent && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now$1()), + 10 < renderWasConcurrent) + ) { + markRootSuspended(shouldTimeSlice, lanes, workInProgressDeferredLane); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -8473,22 +8437,19 @@ function markRootUpdated(root, updatedLanes) { : executionContext & 4 && (didIncludeCommitPhaseUpdate = !0); throwIfInfiniteUpdateLoopDetected(); } -function markRootSuspended( - root, - suspendedLanes, - spawnedLane, - didSkipSuspendedSiblings -) { +function markRootSuspended(root, suspendedLanes, spawnedLane) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; - for (var lanes = suspendedLanes; 0 < lanes; ) { - var index$6 = 31 - clz32(lanes), - lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + for ( + var expirationTimes = root.expirationTimes, lanes = suspendedLanes; + 0 < lanes; + + ) { + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5; + expirationTimes[index$5] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -8545,8 +8506,9 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = @@ -8565,9 +8527,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$4 = 31 - clz32(allEntangledLanes), - lane = 1 << index$4; - lanes |= root[index$4]; + var index$3 = 31 - clz32(allEntangledLanes), + lane = 1 << index$3; + lanes |= root[index$3]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -8659,8 +8621,7 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended( workInProgressRoot, workInProgressRootRenderLanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane ); } function renderRootSync(root, lanes) { @@ -8672,6 +8633,7 @@ function renderRootSync(root, lanes) { (workInProgressTransitions = null), prepareFreshStack(root, lanes); markRenderStarted(lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -8680,21 +8642,26 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; } catch (thrownValue$135) { handleThrow(root, thrownValue$135); @@ -8705,15 +8672,12 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -8723,10 +8687,11 @@ function renderRootConcurrent(root, lanes) { executionContext |= 2; var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher(); - if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) - (workInProgressTransitions = null), + workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes + ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now$1() + 500), - prepareFreshStack(root, lanes); + prepareFreshStack(root, lanes)) + : checkIfRootIsPrerendering(root, lanes); markRenderStarted(lanes); a: do try { @@ -8997,9 +8962,7 @@ function commitRootImpl( transitions, didIncludeRenderPhaseUpdate, renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + spawnedLane ) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); @@ -9022,14 +8985,7 @@ function commitRootImpl( root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); + markRootFinished(root, lanes, remainingLanes, spawnedLane); didIncludeCommitPhaseUpdate = !1; root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), @@ -9046,28 +9002,28 @@ function commitRootImpl( })); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = currentUpdatePriority), - (currentUpdatePriority = 2), - (updatedLanes = executionContext), - (executionContext |= 4), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffectsOnFiber(finishedWork, root), - (root.current = finishedWork), - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = updatedLanes), - (currentUpdatePriority = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = currentUpdatePriority; + currentUpdatePriority = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + commitBeforeMutationEffects(root, finishedWork); + commitMutationEffectsOnFiber(finishedWork, root); + root.current = finishedWork; + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes); + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + requestPaint(); + executionContext = prevExecutionContext; + currentUpdatePriority = spawnedLane; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root), @@ -10005,16 +9961,16 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var internals$jscomp$inline_1170 = { +var internals$jscomp$inline_1168 = { bundleType: 0, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function (mockNode) { mockNode = nodeToInstanceMap.get(mockNode); return void 0 !== mockNode ? mockNode.internalInstanceHandle : null; }, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925", + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$141 = 0; @@ -10032,16 +9988,16 @@ var internals$jscomp$inline_1170 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1379 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1377 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1379.isDisabled && - hook$jscomp$inline_1379.supportsFiber + !hook$jscomp$inline_1377.isDisabled && + hook$jscomp$inline_1377.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1379.inject( - internals$jscomp$inline_1170 + (rendererID = hook$jscomp$inline_1377.inject( + internals$jscomp$inline_1168 )), - (injectedHook = hook$jscomp$inline_1379); + (injectedHook = hook$jscomp$inline_1377); } catch (err) {} } exports._Scheduler = Scheduler; @@ -10165,4 +10121,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.0.0-native-fb-3c7667a6-20240925"; +exports.version = "19.0.0-native-fb-0f1856c4-20240925"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js index 8fb8f9be7acd3..b556134bbedc9 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<716aa7a6a6d9a83b88006c766ae3e1c1>> */ "use strict"; @@ -1704,7 +1704,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-native-fb-3c7667a6-20240925"; + exports.version = "19.0.0-native-fb-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js index d63c46e22f0c1..014a14939212d 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<316b3d30692eae8b50790b24928f44b7>> + * @generated SignedSource<<27392443fa72017f18ddbcf20de9b20a>> */ "use strict"; @@ -580,4 +580,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-native-fb-3c7667a6-20240925"; +exports.version = "19.0.0-native-fb-0f1856c4-20240925"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js index 8262b5c830410..c59f344745484 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8664d331e5e72708777773b51f98c7ca>> + * @generated SignedSource<<6744c035f711a8ced38e49fe9b946a4d>> */ "use strict"; @@ -584,7 +584,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-native-fb-3c7667a6-20240925"; +exports.version = "19.0.0-native-fb-0f1856c4-20240925"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index 4a8da9026df6d..028fccbc2886b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -3c7667a694face1827356a7c90ee6f86a9c0baa0 +0f1856c49febe96923e469f98c0b123130ea015c diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index 5f0a3703c05d0..dcfce19c3313e 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<2cc61b8961d4779bd4765a9678649694>> + * @generated SignedSource<> */ "use strict"; @@ -1606,7 +1606,8 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -1615,7 +1616,8 @@ __DEV__ && ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -1631,6 +1633,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1735,7 +1745,8 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); @@ -2737,7 +2748,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -2805,45 +2817,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -9198,7 +9211,8 @@ __DEV__ && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -11783,7 +11797,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -11826,7 +11840,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )), ensureRootIsScheduled(root), 2 !== lane || @@ -11839,184 +11853,188 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root.tag && exitStatus === RootErrored) { - var lanesThatJustErrored = lanes; - root.errorRecoveryDisabledLanes & lanesThatJustErrored - ? (renderWasConcurrent = 0) - : ((renderWasConcurrent = root.pendingLanes & -536870913), - (renderWasConcurrent = - 0 !== renderWasConcurrent - ? renderWasConcurrent - : renderWasConcurrent & 536870912 - ? 536870912 - : 0)); - if (0 !== renderWasConcurrent) { - lanes = renderWasConcurrent; - a: { - exitStatus = root; - var originallyAttemptedLanes = lanesThatJustErrored; - lanesThatJustErrored = workInProgressRootConcurrentErrors; - var wasRootDehydrated = supportsHydration; - renderWasConcurrent = renderRootSync( - exitStatus, - renderWasConcurrent - ); - if (renderWasConcurrent !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - originallyAttemptedLanes; - workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (0 !== root.tag && exitStatus === RootErrored) { + var lanesThatJustErrored = lanes; + root.errorRecoveryDisabledLanes & lanesThatJustErrored + ? (renderWasConcurrent = 0) + : ((renderWasConcurrent = root.pendingLanes & -536870913), + (renderWasConcurrent = + 0 !== renderWasConcurrent + ? renderWasConcurrent + : renderWasConcurrent & 536870912 + ? 536870912 + : 0)); + if (0 !== renderWasConcurrent) { + lanes = renderWasConcurrent; + a: { + exitStatus = root; + var originallyAttemptedLanes = lanesThatJustErrored; + lanesThatJustErrored = workInProgressRootConcurrentErrors; + var wasRootDehydrated = supportsHydration; + renderWasConcurrent = renderRootSync( + exitStatus, + renderWasConcurrent, + !1 + ); + if (renderWasConcurrent !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + originallyAttemptedLanes; + workInProgressRootInterleavedUpdatedLanes |= + originallyAttemptedLanes; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = renderWasConcurrent; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = lanesThatJustErrored; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = renderWasConcurrent; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - -0, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + -0, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || + renderWasConcurrent === RootSuspended) && + ((renderWasConcurrent = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < renderWasConcurrent) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + !workInProgressRootDidSkipSuspendedSiblings + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -12108,18 +12126,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -12163,11 +12183,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -12291,7 +12307,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -12300,10 +12318,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -12324,37 +12342,46 @@ __DEV__ && } markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$30) { handleThrow(root, thrownValue$30); @@ -12365,15 +12392,12 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -12398,12 +12422,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); markRenderStarted(lanes); a: do try { @@ -17074,11 +17096,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925" + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index c1c895aec9234..601b3a6c4c4c9 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<324c0ceaa8af19d96d9162c3caef24de>> + * @generated SignedSource<> */ "use strict"; @@ -1233,7 +1233,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_283 = { +var injectedNamesToPlugins$jscomp$inline_288 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -1279,32 +1279,32 @@ var injectedNamesToPlugins$jscomp$inline_283 = { } } }, - isOrderingDirty$jscomp$inline_284 = !1, - pluginName$jscomp$inline_285; -for (pluginName$jscomp$inline_285 in injectedNamesToPlugins$jscomp$inline_283) + isOrderingDirty$jscomp$inline_289 = !1, + pluginName$jscomp$inline_290; +for (pluginName$jscomp$inline_290 in injectedNamesToPlugins$jscomp$inline_288) if ( - injectedNamesToPlugins$jscomp$inline_283.hasOwnProperty( - pluginName$jscomp$inline_285 + injectedNamesToPlugins$jscomp$inline_288.hasOwnProperty( + pluginName$jscomp$inline_290 ) ) { - var pluginModule$jscomp$inline_286 = - injectedNamesToPlugins$jscomp$inline_283[pluginName$jscomp$inline_285]; + var pluginModule$jscomp$inline_291 = + injectedNamesToPlugins$jscomp$inline_288[pluginName$jscomp$inline_290]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_285) || - namesToPlugins[pluginName$jscomp$inline_285] !== - pluginModule$jscomp$inline_286 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_290) || + namesToPlugins[pluginName$jscomp$inline_290] !== + pluginModule$jscomp$inline_291 ) { - if (namesToPlugins[pluginName$jscomp$inline_285]) + if (namesToPlugins[pluginName$jscomp$inline_290]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_285 + "`.") + (pluginName$jscomp$inline_290 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_285] = - pluginModule$jscomp$inline_286; - isOrderingDirty$jscomp$inline_284 = !0; + namesToPlugins[pluginName$jscomp$inline_290] = + pluginModule$jscomp$inline_291; + isOrderingDirty$jscomp$inline_289 = !0; } } -isOrderingDirty$jscomp$inline_284 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_289 && recomputePluginOrdering(); var emptyObject$1 = {}, removedKeys = null, removedKeyCount = 0, @@ -1748,7 +1748,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -1757,7 +1758,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -1773,6 +1775,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1872,7 +1882,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); @@ -2284,7 +2295,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -2350,39 +2362,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -7318,7 +7329,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -9234,7 +9246,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -9246,7 +9258,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )), ensureRootIsScheduled(root), 2 === lane && @@ -9258,165 +9270,166 @@ function scheduleUpdateOnFiber(root, fiber, lane) { function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root$jscomp$0.tag && 2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (0 !== root$jscomp$0.tag && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if (workInProgressRootDidAttachPingListener) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if (workInProgressRootDidAttachPingListener) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error("Root did not complete. This is a bug in React."); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error("Root did not complete. This is a bug in React."); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -9514,18 +9527,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$9 = 31 - clz32(lanes), lane = 1 << index$9; - didSkipSuspendedSiblings[index$9] = -1; + didAttemptEntireTree[index$9] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -9564,9 +9579,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -9655,7 +9668,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -9664,10 +9679,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -9675,6 +9690,7 @@ function renderRootSync(root, lanes) { if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -9683,24 +9699,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$128) { - handleThrow(root, thrownValue$128); + } catch (thrownValue$133) { + handleThrow(root, thrownValue$133); } while (1); lanes && root.shellSuspendCounter++; @@ -9708,14 +9737,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -9729,12 +9755,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -9818,8 +9842,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$130) { - handleThrow(root, thrownValue$130); + } catch (thrownValue$135) { + handleThrow(root, thrownValue$135); } while (1); resetContextDependencies(); @@ -10999,27 +11023,27 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1183 = { + internals$jscomp$inline_1190 = { bundleType: 0, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925" + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1183.rendererConfig = extraDevToolsConfig); + (internals$jscomp$inline_1190.rendererConfig = extraDevToolsConfig); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1480 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1487 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1480.isDisabled && - hook$jscomp$inline_1480.supportsFiber + !hook$jscomp$inline_1487.isDisabled && + hook$jscomp$inline_1487.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1480.inject( - internals$jscomp$inline_1183 + (rendererID = hook$jscomp$inline_1487.inject( + internals$jscomp$inline_1190 )), - (injectedHook = hook$jscomp$inline_1480); + (injectedHook = hook$jscomp$inline_1487); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index 95c53ebbd0615..e7f56db624c42 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<276896924578d64ade660e98c5ab7253>> */ "use strict"; @@ -1237,7 +1237,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_299 = { +var injectedNamesToPlugins$jscomp$inline_304 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -1283,32 +1283,32 @@ var injectedNamesToPlugins$jscomp$inline_299 = { } } }, - isOrderingDirty$jscomp$inline_300 = !1, - pluginName$jscomp$inline_301; -for (pluginName$jscomp$inline_301 in injectedNamesToPlugins$jscomp$inline_299) + isOrderingDirty$jscomp$inline_305 = !1, + pluginName$jscomp$inline_306; +for (pluginName$jscomp$inline_306 in injectedNamesToPlugins$jscomp$inline_304) if ( - injectedNamesToPlugins$jscomp$inline_299.hasOwnProperty( - pluginName$jscomp$inline_301 + injectedNamesToPlugins$jscomp$inline_304.hasOwnProperty( + pluginName$jscomp$inline_306 ) ) { - var pluginModule$jscomp$inline_302 = - injectedNamesToPlugins$jscomp$inline_299[pluginName$jscomp$inline_301]; + var pluginModule$jscomp$inline_307 = + injectedNamesToPlugins$jscomp$inline_304[pluginName$jscomp$inline_306]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_301) || - namesToPlugins[pluginName$jscomp$inline_301] !== - pluginModule$jscomp$inline_302 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_306) || + namesToPlugins[pluginName$jscomp$inline_306] !== + pluginModule$jscomp$inline_307 ) { - if (namesToPlugins[pluginName$jscomp$inline_301]) + if (namesToPlugins[pluginName$jscomp$inline_306]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_301 + "`.") + (pluginName$jscomp$inline_306 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_301] = - pluginModule$jscomp$inline_302; - isOrderingDirty$jscomp$inline_300 = !0; + namesToPlugins[pluginName$jscomp$inline_306] = + pluginModule$jscomp$inline_307; + isOrderingDirty$jscomp$inline_305 = !0; } } -isOrderingDirty$jscomp$inline_300 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_305 && recomputePluginOrdering(); var emptyObject$1 = {}, removedKeys = null, removedKeyCount = 0, @@ -1817,7 +1817,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -1826,7 +1827,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -1842,6 +1844,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1941,7 +1951,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); @@ -2437,7 +2448,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -2503,39 +2515,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -7522,7 +7533,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -9763,7 +9775,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -9776,7 +9788,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )), ensureRootIsScheduled(root), 2 === lane && @@ -9788,165 +9800,166 @@ function scheduleUpdateOnFiber(root, fiber, lane) { function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root$jscomp$0.tag && 2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (0 !== root$jscomp$0.tag && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if (workInProgressRootDidAttachPingListener) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if (workInProgressRootDidAttachPingListener) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error("Root did not complete. This is a bug in React."); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now$1()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error("Root did not complete. This is a bug in React."); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now$1()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -10044,18 +10057,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$9 = 31 - clz32(lanes), lane = 1 << index$9; - didSkipSuspendedSiblings[index$9] = -1; + didAttemptEntireTree[index$9] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -10094,9 +10109,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -10214,7 +10227,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -10223,10 +10238,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -10244,32 +10259,46 @@ function renderRootSync(root, lanes) { } markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + memoizedUpdaters = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue, reason); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$143) { - handleThrow(root, thrownValue$143); + } catch (thrownValue$148) { + handleThrow(root, thrownValue$148); } while (1); lanes && root.shellSuspendCounter++; @@ -10277,15 +10306,12 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -10307,12 +10333,7 @@ function renderRootConcurrent(root, lanes) { workInProgressRootRenderTargetTime = now$1() + 500; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); markRenderStarted(lanes); a: do try { @@ -10398,8 +10419,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$145) { - handleThrow(root, thrownValue$145); + } catch (thrownValue$150) { + handleThrow(root, thrownValue$150); } while (1); resetContextDependencies(); @@ -11658,21 +11679,21 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1271 = { + internals$jscomp$inline_1278 = { bundleType: 0, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925" + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1271.rendererConfig = extraDevToolsConfig); -internals$jscomp$inline_1271.getLaneLabelMap = function () { + (internals$jscomp$inline_1278.rendererConfig = extraDevToolsConfig); +internals$jscomp$inline_1278.getLaneLabelMap = function () { for ( - var map = new Map(), lane = 1, index$149 = 0; - 31 > index$149; - index$149++ + var map = new Map(), lane = 1, index$154 = 0; + 31 > index$154; + index$154++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -11680,20 +11701,20 @@ internals$jscomp$inline_1271.getLaneLabelMap = function () { } return map; }; -internals$jscomp$inline_1271.injectProfilingHooks = function (profilingHooks) { +internals$jscomp$inline_1278.injectProfilingHooks = function (profilingHooks) { injectedProfilingHooks = profilingHooks; }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1531 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1538 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1531.isDisabled && - hook$jscomp$inline_1531.supportsFiber + !hook$jscomp$inline_1538.isDisabled && + hook$jscomp$inline_1538.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1531.inject( - internals$jscomp$inline_1271 + (rendererID = hook$jscomp$inline_1538.inject( + internals$jscomp$inline_1278 )), - (injectedHook = hook$jscomp$inline_1531); + (injectedHook = hook$jscomp$inline_1538); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index e3f7fd484f01f..1a71c3b03e15d 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<633143e46e2ccafa978d6ee4b558f7a8>> + * @generated SignedSource<> */ "use strict"; @@ -1697,7 +1697,8 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -1706,7 +1707,8 @@ __DEV__ && ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -1722,6 +1724,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1826,7 +1836,8 @@ __DEV__ && remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); @@ -2967,7 +2978,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -3035,45 +3047,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -9303,7 +9316,8 @@ __DEV__ && ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -12148,7 +12162,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -12191,7 +12205,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )), ensureRootIsScheduled(root), 2 !== lane || @@ -12204,180 +12218,182 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root.tag && exitStatus === RootErrored) { - var lanesThatJustErrored = lanes; - root.errorRecoveryDisabledLanes & lanesThatJustErrored - ? (renderWasConcurrent = 0) - : ((renderWasConcurrent = root.pendingLanes & -536870913), - (renderWasConcurrent = - 0 !== renderWasConcurrent - ? renderWasConcurrent - : renderWasConcurrent & 536870912 - ? 536870912 - : 0)); - if (0 !== renderWasConcurrent) { - lanes = renderWasConcurrent; - a: { - exitStatus = root; - var originallyAttemptedLanes = lanesThatJustErrored; - lanesThatJustErrored = workInProgressRootConcurrentErrors; - renderWasConcurrent = renderRootSync( - exitStatus, - renderWasConcurrent - ); - if (renderWasConcurrent !== RootErrored) { - if (workInProgressRootDidAttachPingListener) { - exitStatus.errorRecoveryDisabledLanes |= - originallyAttemptedLanes; - workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (0 !== root.tag && exitStatus === RootErrored) { + var lanesThatJustErrored = lanes; + root.errorRecoveryDisabledLanes & lanesThatJustErrored + ? (renderWasConcurrent = 0) + : ((renderWasConcurrent = root.pendingLanes & -536870913), + (renderWasConcurrent = + 0 !== renderWasConcurrent + ? renderWasConcurrent + : renderWasConcurrent & 536870912 + ? 536870912 + : 0)); + if (0 !== renderWasConcurrent) { + lanes = renderWasConcurrent; + a: { + exitStatus = root; + var originallyAttemptedLanes = lanesThatJustErrored; + lanesThatJustErrored = workInProgressRootConcurrentErrors; + renderWasConcurrent = renderRootSync( + exitStatus, + renderWasConcurrent, + !1 + ); + if (renderWasConcurrent !== RootErrored) { + if (workInProgressRootDidAttachPingListener) { + exitStatus.errorRecoveryDisabledLanes |= + originallyAttemptedLanes; + workInProgressRootInterleavedUpdatedLanes |= + originallyAttemptedLanes; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = renderWasConcurrent; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = lanesThatJustErrored; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = renderWasConcurrent; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - -0, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + -0, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + !workInProgressRootDidSkipSuspendedSiblings + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -12469,18 +12485,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -12524,11 +12542,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -12652,7 +12666,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -12661,10 +12677,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -12685,37 +12701,46 @@ __DEV__ && } markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$35) { handleThrow(root, thrownValue$35); @@ -12726,15 +12751,12 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -12759,12 +12781,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); markRenderStarted(lanes); a: do try { @@ -17293,11 +17313,11 @@ __DEV__ && shouldSuspendImpl = newShouldSuspendImpl; }; var isomorphicReactPackageVersion = React.version; - if ("19.0.0-native-fb-3c7667a6-20240925" !== isomorphicReactPackageVersion) + if ("19.0.0-native-fb-0f1856c4-20240925" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-native-fb-3c7667a6-20240925\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-native-fb-0f1856c4-20240925\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -17323,11 +17343,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromTag, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925" + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index 071dcd47aeb51..a7722293dd3b4 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<36316d61fd710ba9a17ae3b6f36e893b>> */ "use strict"; @@ -1227,7 +1227,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_290 = { +var injectedNamesToPlugins$jscomp$inline_295 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -1273,32 +1273,32 @@ var injectedNamesToPlugins$jscomp$inline_290 = { } } }, - isOrderingDirty$jscomp$inline_291 = !1, - pluginName$jscomp$inline_292; -for (pluginName$jscomp$inline_292 in injectedNamesToPlugins$jscomp$inline_290) + isOrderingDirty$jscomp$inline_296 = !1, + pluginName$jscomp$inline_297; +for (pluginName$jscomp$inline_297 in injectedNamesToPlugins$jscomp$inline_295) if ( - injectedNamesToPlugins$jscomp$inline_290.hasOwnProperty( - pluginName$jscomp$inline_292 + injectedNamesToPlugins$jscomp$inline_295.hasOwnProperty( + pluginName$jscomp$inline_297 ) ) { - var pluginModule$jscomp$inline_293 = - injectedNamesToPlugins$jscomp$inline_290[pluginName$jscomp$inline_292]; + var pluginModule$jscomp$inline_298 = + injectedNamesToPlugins$jscomp$inline_295[pluginName$jscomp$inline_297]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_292) || - namesToPlugins[pluginName$jscomp$inline_292] !== - pluginModule$jscomp$inline_293 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_297) || + namesToPlugins[pluginName$jscomp$inline_297] !== + pluginModule$jscomp$inline_298 ) { - if (namesToPlugins[pluginName$jscomp$inline_292]) + if (namesToPlugins[pluginName$jscomp$inline_297]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_292 + "`.") + (pluginName$jscomp$inline_297 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_292] = - pluginModule$jscomp$inline_293; - isOrderingDirty$jscomp$inline_291 = !0; + namesToPlugins[pluginName$jscomp$inline_297] = + pluginModule$jscomp$inline_298; + isOrderingDirty$jscomp$inline_296 = !0; } } -isOrderingDirty$jscomp$inline_291 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_296 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -1949,7 +1949,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -1958,7 +1959,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -1974,6 +1976,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -2073,7 +2083,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); @@ -2582,7 +2593,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -2648,39 +2660,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -7488,7 +7499,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -9666,7 +9678,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -9678,7 +9690,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )), ensureRootIsScheduled(root), 2 === lane && @@ -9690,165 +9702,166 @@ function scheduleUpdateOnFiber(root, fiber, lane) { function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root$jscomp$0.tag && 2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (0 !== root$jscomp$0.tag && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if (workInProgressRootDidAttachPingListener) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if (workInProgressRootDidAttachPingListener) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error("Root did not complete. This is a bug in React."); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error("Root did not complete. This is a bug in React."); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -9946,18 +9959,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$11 = 31 - clz32(lanes), lane = 1 << index$11; - didSkipSuspendedSiblings[index$11] = -1; + didAttemptEntireTree[index$11] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -9996,9 +10011,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -10087,7 +10100,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -10096,10 +10111,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -10107,6 +10122,7 @@ function renderRootSync(root, lanes) { if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -10115,24 +10131,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$132) { - handleThrow(root, thrownValue$132); + } catch (thrownValue$137) { + handleThrow(root, thrownValue$137); } while (1); lanes && root.shellSuspendCounter++; @@ -10140,14 +10169,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -10161,12 +10187,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -10250,8 +10274,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$134) { - handleThrow(root, thrownValue$134); + } catch (thrownValue$139) { + handleThrow(root, thrownValue$139); } while (1); resetContextDependencies(); @@ -11131,11 +11155,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.0.0-native-fb-3c7667a6-20240925" !== isomorphicReactPackageVersion) +if ("19.0.0-native-fb-0f1856c4-20240925" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-native-fb-3c7667a6-20240925\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-native-fb-0f1856c4-20240925\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11182,27 +11206,27 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1249 = { + internals$jscomp$inline_1256 = { bundleType: 0, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromTag, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925" + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1249.rendererConfig = extraDevToolsConfig); + (internals$jscomp$inline_1256.rendererConfig = extraDevToolsConfig); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1571 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1578 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1571.isDisabled && - hook$jscomp$inline_1571.supportsFiber + !hook$jscomp$inline_1578.isDisabled && + hook$jscomp$inline_1578.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1571.inject( - internals$jscomp$inline_1249 + (rendererID = hook$jscomp$inline_1578.inject( + internals$jscomp$inline_1256 )), - (injectedHook = hook$jscomp$inline_1571); + (injectedHook = hook$jscomp$inline_1578); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index e0593e5fd362e..a459ebfd44745 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<84e28b832d669478a4b1545de277d2e1>> + * @generated SignedSource<<8a6e6b8761366519e5c4bbca932728e8>> */ "use strict"; @@ -1231,7 +1231,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_306 = { +var injectedNamesToPlugins$jscomp$inline_311 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -1277,32 +1277,32 @@ var injectedNamesToPlugins$jscomp$inline_306 = { } } }, - isOrderingDirty$jscomp$inline_307 = !1, - pluginName$jscomp$inline_308; -for (pluginName$jscomp$inline_308 in injectedNamesToPlugins$jscomp$inline_306) + isOrderingDirty$jscomp$inline_312 = !1, + pluginName$jscomp$inline_313; +for (pluginName$jscomp$inline_313 in injectedNamesToPlugins$jscomp$inline_311) if ( - injectedNamesToPlugins$jscomp$inline_306.hasOwnProperty( - pluginName$jscomp$inline_308 + injectedNamesToPlugins$jscomp$inline_311.hasOwnProperty( + pluginName$jscomp$inline_313 ) ) { - var pluginModule$jscomp$inline_309 = - injectedNamesToPlugins$jscomp$inline_306[pluginName$jscomp$inline_308]; + var pluginModule$jscomp$inline_314 = + injectedNamesToPlugins$jscomp$inline_311[pluginName$jscomp$inline_313]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_308) || - namesToPlugins[pluginName$jscomp$inline_308] !== - pluginModule$jscomp$inline_309 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_313) || + namesToPlugins[pluginName$jscomp$inline_313] !== + pluginModule$jscomp$inline_314 ) { - if (namesToPlugins[pluginName$jscomp$inline_308]) + if (namesToPlugins[pluginName$jscomp$inline_313]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_308 + "`.") + (pluginName$jscomp$inline_313 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_308] = - pluginModule$jscomp$inline_309; - isOrderingDirty$jscomp$inline_307 = !0; + namesToPlugins[pluginName$jscomp$inline_313] = + pluginModule$jscomp$inline_314; + isOrderingDirty$jscomp$inline_312 = !0; } } -isOrderingDirty$jscomp$inline_307 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_312 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -2018,7 +2018,8 @@ function getNextLanes(root, wipLanes) { : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = nonIdlePendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes))))) @@ -2027,7 +2028,8 @@ function getNextLanes(root, wipLanes) { ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || + : enableSiblingPrerendering && + !root && ((warmLanes = pendingLanes & ~warmLanes), 0 !== warmLanes && (nextLanes = getHighestPriorityLanes(warmLanes)))); @@ -2043,6 +2045,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -2142,7 +2152,8 @@ function markRootFinished( remainingLanes &= ~lane; } 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && + enableSiblingPrerendering && + 0 !== suspendedRetryLanes && 0 === updatedLanes && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); @@ -2735,7 +2746,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -2801,39 +2813,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -7692,7 +7703,8 @@ function scheduleRetryEffect(workInProgress, retryQueue) { ((retryQueue = 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912), (workInProgress.lanes |= retryQueue), - (workInProgressSuspendedRetryLanes |= retryQueue)); + enableSiblingPrerendering && + (workInProgressSuspendedRetryLanes |= retryQueue)); } function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { switch (renderState.tailMode) { @@ -10194,7 +10206,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) @@ -10207,7 +10219,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )), ensureRootIsScheduled(root), 2 === lane && @@ -10219,165 +10231,166 @@ function scheduleUpdateOnFiber(root, fiber, lane) { function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (0 !== root$jscomp$0.tag && 2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (0 !== root$jscomp$0.tag && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if (workInProgressRootDidAttachPingListener) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if (workInProgressRootDidAttachPingListener) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error("Root did not complete. This is a bug in React."); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now$1()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error("Root did not complete. This is a bug in React."); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now$1()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -10475,18 +10488,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; - didSkipSuspendedSiblings || (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + enableSiblingPrerendering && + didAttemptEntireTree && + (root.warmLanes |= suspendedLanes); + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$11 = 31 - clz32(lanes), lane = 1 << index$11; - didSkipSuspendedSiblings[index$11] = -1; + didAttemptEntireTree[index$11] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -10525,9 +10540,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -10645,7 +10658,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -10654,10 +10669,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -10675,32 +10690,46 @@ function renderRootSync(root, lanes) { } markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + memoizedUpdaters = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue, reason); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$147) { - handleThrow(root, thrownValue$147); + } catch (thrownValue$152) { + handleThrow(root, thrownValue$152); } while (1); lanes && root.shellSuspendCounter++; @@ -10708,15 +10737,12 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -10738,12 +10764,7 @@ function renderRootConcurrent(root, lanes) { workInProgressRootRenderTargetTime = now$1() + 500; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); markRenderStarted(lanes); a: do try { @@ -10829,8 +10850,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$149) { - handleThrow(root, thrownValue$149); + } catch (thrownValue$154) { + handleThrow(root, thrownValue$154); } while (1); resetContextDependencies(); @@ -11789,11 +11810,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.0.0-native-fb-3c7667a6-20240925" !== isomorphicReactPackageVersion) +if ("19.0.0-native-fb-0f1856c4-20240925" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-native-fb-3c7667a6-20240925\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-native-fb-0f1856c4-20240925\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11840,21 +11861,21 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1337 = { + internals$jscomp$inline_1344 = { bundleType: 0, - version: "19.0.0-native-fb-3c7667a6-20240925", + version: "19.0.0-native-fb-0f1856c4-20240925", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromTag, - reconcilerVersion: "19.0.0-native-fb-3c7667a6-20240925" + reconcilerVersion: "19.0.0-native-fb-0f1856c4-20240925" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1337.rendererConfig = extraDevToolsConfig); -internals$jscomp$inline_1337.getLaneLabelMap = function () { + (internals$jscomp$inline_1344.rendererConfig = extraDevToolsConfig); +internals$jscomp$inline_1344.getLaneLabelMap = function () { for ( - var map = new Map(), lane = 1, index$153 = 0; - 31 > index$153; - index$153++ + var map = new Map(), lane = 1, index$158 = 0; + 31 > index$158; + index$158++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -11862,20 +11883,20 @@ internals$jscomp$inline_1337.getLaneLabelMap = function () { } return map; }; -internals$jscomp$inline_1337.injectProfilingHooks = function (profilingHooks) { +internals$jscomp$inline_1344.injectProfilingHooks = function (profilingHooks) { injectedProfilingHooks = profilingHooks; }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1622 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1629 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1622.isDisabled && - hook$jscomp$inline_1622.supportsFiber + !hook$jscomp$inline_1629.isDisabled && + hook$jscomp$inline_1629.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1622.inject( - internals$jscomp$inline_1337 + (rendererID = hook$jscomp$inline_1629.inject( + internals$jscomp$inline_1344 )), - (injectedHook = hook$jscomp$inline_1622); + (injectedHook = hook$jscomp$inline_1629); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {