diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 82d917ecd5..a609ff4ba8 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -17f88c80ed20b4e5f21255d9e1268542a2fbc1bd +3ef31d196a83e45d4c70b300a265a9c657c386b4 diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index 82d917ecd5..a609ff4ba8 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -17f88c80ed20b4e5f21255d9e1268542a2fbc1bd +3ef31d196a83e45d4c70b300a265a9c657c386b4 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 80d39791a7..d16e10c566 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -1538,7 +1538,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.2.0-www-classic-17f88c80-20250422"; + exports.version = "19.2.0-www-classic-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index 2db0b68cb5..a10fd60c65 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -1538,7 +1538,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.2.0-www-modern-17f88c80-20250422"; + exports.version = "19.2.0-www-modern-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index 4a59e38554..582d68342e 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -636,4 +636,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-www-classic-17f88c80-20250422"; +exports.version = "19.2.0-www-classic-3ef31d19-20250422"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index ed1a8a1e31..d6d7e04ea4 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -636,4 +636,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-www-modern-17f88c80-20250422"; +exports.version = "19.2.0-www-modern-3ef31d19-20250422"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 1f2ce68b65..ec7ebf9d06 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -640,7 +640,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-www-classic-17f88c80-20250422"; +exports.version = "19.2.0-www-classic-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index d1543f908b..2f95f8e617 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -640,7 +640,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-www-modern-17f88c80-20250422"; +exports.version = "19.2.0-www-modern-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 5b02f0c28b..66e21b315e 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -661,6 +661,50 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { @@ -4540,6 +4584,11 @@ __DEV__ && handler ); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -6394,6 +6443,7 @@ __DEV__ && returnFiber = suspenseHandlerStackCursor.current; if (null !== returnFiber) { switch (returnFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -6906,6 +6956,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -7712,10 +7798,10 @@ __DEV__ && didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -7729,9 +7815,9 @@ __DEV__ && ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (renderLanes = nextPrimaryChildren.updateQueue), + (renderLanes = showFallback.updateQueue), null === renderLanes - ? (nextPrimaryChildren.updateQueue = { + ? (showFallback.updateQueue = { transitions: workInProgress, markerInstances: current, retryQueue: null @@ -7749,10 +7835,10 @@ __DEV__ && didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -7787,22 +7873,22 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), reconcileChildFibers( workInProgress, @@ -7819,31 +7905,32 @@ __DEV__ && renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isSuspenseInstanceFallback()) ) - (showFallback = getSuspenseInstanceFallbackErrorDetails()), - (JSCompiler_temp = showFallback.digest), - (nextPrimaryChildren = showFallback.message), - (nextProps = showFallback.stack), - (showFallback = showFallback.componentStack), - (nextPrimaryChildren = nextPrimaryChildren - ? Error(nextPrimaryChildren) + (nextPrimaryChildren = getSuspenseInstanceFallbackErrorDetails()), + (JSCompiler_temp = nextPrimaryChildren.digest), + (showFallback = nextPrimaryChildren.message), + (nextProps = nextPrimaryChildren.stack), + (nextPrimaryChildren = nextPrimaryChildren.componentStack), + (showFallback = showFallback + ? Error(showFallback) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (nextPrimaryChildren.stack = nextProps || ""), - (nextPrimaryChildren.digest = JSCompiler_temp), - (JSCompiler_temp = void 0 === showFallback ? null : showFallback), + (showFallback.stack = nextProps || ""), + (showFallback.digest = JSCompiler_temp), + (JSCompiler_temp = + void 0 === nextPrimaryChildren ? null : nextPrimaryChildren), (nextProps = { - value: nextPrimaryChildren, + value: showFallback, source: null, stack: JSCompiler_temp }), "string" === typeof JSCompiler_temp && - CapturedStacks.set(nextPrimaryChildren, nextProps), + CapturedStacks.set(showFallback, nextProps), null === hydrationErrors ? (hydrationErrors = [nextProps]) : hydrationErrors.push(nextProps), @@ -7864,58 +7951,20 @@ __DEV__ && didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration( + JSCompiler_temp, + renderLanes + )), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); isSuspenseInstancePending() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -7936,37 +7985,37 @@ __DEV__ && } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling; - nextProps = createWorkInProgress(didSuspend, { + nextProps = updateWorkInProgressOffscreenFiber(didSuspend, { mode: "hidden", children: nextProps.children }); nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712; null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue2), (didSuspend = @@ -7977,42 +8026,43 @@ __DEV__ && } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; + showFallback.memoizedState = nextPrimaryChildren; if ( enableTransitionTracing && - ((showFallback = enableTransitionTracing + ((nextPrimaryChildren = enableTransitionTracing ? transitionStack.current : null), - null !== showFallback) + null !== nextPrimaryChildren) ) { didSuspend = enableTransitionTracing ? markerInstanceStack.current : null; - currentFallbackChildFragment = nextPrimaryChildren.updateQueue; + currentFallbackChildFragment = showFallback.updateQueue; var currentOffscreenQueue = current.updateQueue; null === currentFallbackChildFragment - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, + ? (showFallback.updateQueue = { + transitions: nextPrimaryChildren, markerInstances: didSuspend, retryQueue: null }) : currentFallbackChildFragment === currentOffscreenQueue - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, + ? (showFallback.updateQueue = { + transitions: nextPrimaryChildren, markerInstances: didSuspend, retryQueue: null !== currentOffscreenQueue ? currentOffscreenQueue.retryQueue : null }) - : ((currentFallbackChildFragment.transitions = showFallback), + : ((currentFallbackChildFragment.transitions = + nextPrimaryChildren), (currentFallbackChildFragment.markerInstances = didSuspend)); } - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -8023,7 +8073,7 @@ __DEV__ && pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; - renderLanes = createWorkInProgress(renderLanes, { + renderLanes = updateWorkInProgressOffscreenFiber(renderLanes, { mode: "visible", children: nextProps.children }); @@ -8081,6 +8131,9 @@ __DEV__ && }; return offscreenProps; } + function updateWorkInProgressOffscreenFiber(current, offscreenProps) { + return createWorkInProgress(current, offscreenProps); + } function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -8401,6 +8454,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -8649,10 +8710,10 @@ __DEV__ && current.$$typeof === REACT_LAZY_TYPE && (workInProgress = " Did you wrap a component in React.lazy() more than once?"); - current = getComponentNameFromType(current) || current; + renderLanes = getComponentNameFromType(current) || current; throw Error( "Element type is invalid. Received a promise that resolves to: " + - current + + renderLanes + ". Lazy element type must resolve to a class or function." + workInProgress ); @@ -8952,40 +9013,83 @@ __DEV__ && workInProgress.child ); case 31: - return ( - (renderLanes = workInProgress.pendingProps), - (returnFiber = renderLanes.hidden), - void 0 !== returnFiber && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === returnFiber - ? "hidden" - : !1 === returnFiber - ? "hidden={false}" - : "hidden={...}", - returnFiber ? 'mode="hidden"' : 'mode="visible"' - ), - (returnFiber = workInProgress.mode), - (renderLanes = { - mode: renderLanes.mode, - children: renderLanes.children - }), - null === current - ? ((current = mountWorkInProgressOffscreenFiber( + prevSibling = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, prevSibling); + else if ( + ((returnFiber = current.memoizedState), null !== returnFiber) + ) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, renderLanes, - returnFiber + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + prevSibling = workInProgressRoot; + if ( + null !== prevSibling && + ((nextProps = getBumpedLaneForHydration( + prevSibling, + renderLanes + )), + 0 !== nextProps && nextProps !== returnFiber.retryLane) + ) + throw ( + ((returnFiber.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(prevSibling, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (workInProgress = mountActivityChildren( + workInProgress, + prevSibling )), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)) - : ((current = createWorkInProgress(current.child, renderLanes)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)), - workInProgress - ); + (workInProgress.flags |= 4096); + } + else + (renderLanes = updateWorkInProgressOffscreenFiber(current.child, { + mode: prevSibling.mode, + children: prevSibling.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -9500,7 +9604,48 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== renderLanes) { + if (null === current) { + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + } + emitPendingHydrationWarnings(); + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -9508,7 +9653,8 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - if (null !== newProps && null !== newProps.dehydrated) { + instance = newProps; + if (null !== instance && null !== instance.dehydrated) { if (null === current) { throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." @@ -9519,11 +9665,11 @@ __DEV__ && } emitPendingHydrationWarnings(); 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null); + (instance = workInProgress.memoizedState = null); workInProgress.flags |= 4; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== instance && ((instance = workInProgress.child), null !== instance && (workInProgress.treeBaseDuration -= @@ -9808,6 +9954,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), + null === workInProgress.alternate) + ) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -9891,6 +10053,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -10731,16 +10897,19 @@ __DEV__ && } } function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && - 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && + 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { focusedInstanceHandle = null; @@ -11047,6 +11216,9 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -11558,6 +11730,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -11792,6 +11965,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -12225,6 +12407,13 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -12598,6 +12787,40 @@ __DEV__ && endTime ); break; + case 31: + flags = inHydratedSubtree; + enableComponentPerformanceTrack && + ((prevProfilerEffectDuration = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null), + (wasInHydratedSubtree = finishedWork.memoizedState), + null !== prevProfilerEffectDuration && null === wasInHydratedSubtree + ? ((wasInHydratedSubtree = finishedWork.deletions), + null !== wasInHydratedSubtree && + 0 < wasInHydratedSubtree.length && + 18 === wasInHydratedSubtree[0].tag + ? ((inHydratedSubtree = !1), + (prevProfilerEffectDuration = + prevProfilerEffectDuration.hydrationErrors), + null !== prevProfilerEffectDuration && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime, + prevProfilerEffectDuration + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1)); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + enableComponentPerformanceTrack && (inHydratedSubtree = flags); + break; case 13: flags = inHydratedSubtree; enableComponentPerformanceTrack && @@ -15476,6 +15699,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -18576,10 +18800,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-www-classic-17f88c80-20250422", + version: "19.2.0-www-classic-3ef31d19-20250422", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -18613,7 +18837,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.2.0-www-classic-17f88c80-20250422"; + exports.version = "19.2.0-www-classic-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index c54509f46a..240b05a298 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -661,6 +661,50 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { @@ -4446,6 +4490,11 @@ __DEV__ && handler ); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -6300,6 +6349,7 @@ __DEV__ && returnFiber = suspenseHandlerStackCursor.current; if (null !== returnFiber) { switch (returnFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -6812,6 +6862,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -7543,10 +7629,10 @@ __DEV__ && didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -7560,9 +7646,9 @@ __DEV__ && ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (renderLanes = nextPrimaryChildren.updateQueue), + (renderLanes = showFallback.updateQueue), null === renderLanes - ? (nextPrimaryChildren.updateQueue = { + ? (showFallback.updateQueue = { transitions: workInProgress, markerInstances: current, retryQueue: null @@ -7580,10 +7666,10 @@ __DEV__ && didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -7618,22 +7704,22 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), reconcileChildFibers( workInProgress, @@ -7650,31 +7736,32 @@ __DEV__ && renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isSuspenseInstanceFallback()) ) - (showFallback = getSuspenseInstanceFallbackErrorDetails()), - (JSCompiler_temp = showFallback.digest), - (nextPrimaryChildren = showFallback.message), - (nextProps = showFallback.stack), - (showFallback = showFallback.componentStack), - (nextPrimaryChildren = nextPrimaryChildren - ? Error(nextPrimaryChildren) + (nextPrimaryChildren = getSuspenseInstanceFallbackErrorDetails()), + (JSCompiler_temp = nextPrimaryChildren.digest), + (showFallback = nextPrimaryChildren.message), + (nextProps = nextPrimaryChildren.stack), + (nextPrimaryChildren = nextPrimaryChildren.componentStack), + (showFallback = showFallback + ? Error(showFallback) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (nextPrimaryChildren.stack = nextProps || ""), - (nextPrimaryChildren.digest = JSCompiler_temp), - (JSCompiler_temp = void 0 === showFallback ? null : showFallback), + (showFallback.stack = nextProps || ""), + (showFallback.digest = JSCompiler_temp), + (JSCompiler_temp = + void 0 === nextPrimaryChildren ? null : nextPrimaryChildren), (nextProps = { - value: nextPrimaryChildren, + value: showFallback, source: null, stack: JSCompiler_temp }), "string" === typeof JSCompiler_temp && - CapturedStacks.set(nextPrimaryChildren, nextProps), + CapturedStacks.set(showFallback, nextProps), null === hydrationErrors ? (hydrationErrors = [nextProps]) : hydrationErrors.push(nextProps), @@ -7695,58 +7782,20 @@ __DEV__ && didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration( + JSCompiler_temp, + renderLanes + )), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); isSuspenseInstancePending() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -7767,37 +7816,37 @@ __DEV__ && } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling; - nextProps = createWorkInProgress(didSuspend, { + nextProps = updateWorkInProgressOffscreenFiber(didSuspend, { mode: "hidden", children: nextProps.children }); nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712; null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue2), (didSuspend = @@ -7808,42 +7857,43 @@ __DEV__ && } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; + showFallback.memoizedState = nextPrimaryChildren; if ( enableTransitionTracing && - ((showFallback = enableTransitionTracing + ((nextPrimaryChildren = enableTransitionTracing ? transitionStack.current : null), - null !== showFallback) + null !== nextPrimaryChildren) ) { didSuspend = enableTransitionTracing ? markerInstanceStack.current : null; - currentFallbackChildFragment = nextPrimaryChildren.updateQueue; + currentFallbackChildFragment = showFallback.updateQueue; var currentOffscreenQueue = current.updateQueue; null === currentFallbackChildFragment - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, + ? (showFallback.updateQueue = { + transitions: nextPrimaryChildren, markerInstances: didSuspend, retryQueue: null }) : currentFallbackChildFragment === currentOffscreenQueue - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, + ? (showFallback.updateQueue = { + transitions: nextPrimaryChildren, markerInstances: didSuspend, retryQueue: null !== currentOffscreenQueue ? currentOffscreenQueue.retryQueue : null }) - : ((currentFallbackChildFragment.transitions = showFallback), + : ((currentFallbackChildFragment.transitions = + nextPrimaryChildren), (currentFallbackChildFragment.markerInstances = didSuspend)); } - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -7854,7 +7904,7 @@ __DEV__ && pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; - renderLanes = createWorkInProgress(renderLanes, { + renderLanes = updateWorkInProgressOffscreenFiber(renderLanes, { mode: "visible", children: nextProps.children }); @@ -7912,6 +7962,9 @@ __DEV__ && }; return offscreenProps; } + function updateWorkInProgressOffscreenFiber(current, offscreenProps) { + return createWorkInProgress(current, offscreenProps); + } function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -8231,6 +8284,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -8478,10 +8539,10 @@ __DEV__ && current.$$typeof === REACT_LAZY_TYPE && (workInProgress = " Did you wrap a component in React.lazy() more than once?"); - current = getComponentNameFromType(current) || current; + renderLanes = getComponentNameFromType(current) || current; throw Error( "Element type is invalid. Received a promise that resolves to: " + - current + + renderLanes + ". Lazy element type must resolve to a class or function." + workInProgress ); @@ -8784,40 +8845,83 @@ __DEV__ && workInProgress.child ); case 31: - return ( - (renderLanes = workInProgress.pendingProps), - (returnFiber = renderLanes.hidden), - void 0 !== returnFiber && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === returnFiber - ? "hidden" - : !1 === returnFiber - ? "hidden={false}" - : "hidden={...}", - returnFiber ? 'mode="hidden"' : 'mode="visible"' - ), - (returnFiber = workInProgress.mode), - (renderLanes = { - mode: renderLanes.mode, - children: renderLanes.children - }), - null === current - ? ((current = mountWorkInProgressOffscreenFiber( + prevSibling = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, prevSibling); + else if ( + ((returnFiber = current.memoizedState), null !== returnFiber) + ) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, renderLanes, - returnFiber + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + prevSibling = workInProgressRoot; + if ( + null !== prevSibling && + ((nextProps = getBumpedLaneForHydration( + prevSibling, + renderLanes + )), + 0 !== nextProps && nextProps !== returnFiber.retryLane) + ) + throw ( + ((returnFiber.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(prevSibling, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (workInProgress = mountActivityChildren( + workInProgress, + prevSibling )), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)) - : ((current = createWorkInProgress(current.child, renderLanes)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)), - workInProgress - ); + (workInProgress.flags |= 4096); + } + else + (renderLanes = updateWorkInProgressOffscreenFiber(current.child, { + mode: prevSibling.mode, + children: prevSibling.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -9326,7 +9430,48 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== renderLanes) { + if (null === current) { + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + } + emitPendingHydrationWarnings(); + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -9334,7 +9479,8 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - if (null !== newProps && null !== newProps.dehydrated) { + instance = newProps; + if (null !== instance && null !== instance.dehydrated) { if (null === current) { throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." @@ -9345,11 +9491,11 @@ __DEV__ && } emitPendingHydrationWarnings(); 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null); + (instance = workInProgress.memoizedState = null); workInProgress.flags |= 4; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== instance && ((instance = workInProgress.child), null !== instance && (workInProgress.treeBaseDuration -= @@ -9631,6 +9777,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), + null === workInProgress.alternate) + ) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -9709,6 +9871,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -10549,16 +10715,19 @@ __DEV__ && } } function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && - 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && + 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { focusedInstanceHandle = null; @@ -10865,6 +11034,9 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -11376,6 +11548,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -11610,6 +11783,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -12043,6 +12225,13 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -12416,6 +12605,40 @@ __DEV__ && endTime ); break; + case 31: + flags = inHydratedSubtree; + enableComponentPerformanceTrack && + ((prevProfilerEffectDuration = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null), + (wasInHydratedSubtree = finishedWork.memoizedState), + null !== prevProfilerEffectDuration && null === wasInHydratedSubtree + ? ((wasInHydratedSubtree = finishedWork.deletions), + null !== wasInHydratedSubtree && + 0 < wasInHydratedSubtree.length && + 18 === wasInHydratedSubtree[0].tag + ? ((inHydratedSubtree = !1), + (prevProfilerEffectDuration = + prevProfilerEffectDuration.hydrationErrors), + null !== prevProfilerEffectDuration && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime, + prevProfilerEffectDuration + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1)); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + enableComponentPerformanceTrack && (inHydratedSubtree = flags); + break; case 13: flags = inHydratedSubtree; enableComponentPerformanceTrack && @@ -15290,6 +15513,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -18348,10 +18572,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-www-modern-17f88c80-20250422", + version: "19.2.0-www-modern-3ef31d19-20250422", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -18385,7 +18609,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.2.0-www-modern-17f88c80-20250422"; + exports.version = "19.2.0-www-modern-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index dafe0f8d8b..9087aa4191 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -558,6 +558,50 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getTransitionsForLanes(root, lanes) { if (!enableTransitionTracing) return null; for (var transitionsForLanes = []; 0 < lanes; ) { @@ -2853,6 +2897,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? push(suspenseHandlerStackCursor, handler) : push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -4461,6 +4510,7 @@ function throwException( returnFiber = suspenseHandlerStackCursor.current; if (null !== returnFiber) { switch (returnFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -4919,6 +4969,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -5372,10 +5444,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5389,9 +5460,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (renderLanes = nextPrimaryChildren.updateQueue), + (renderLanes = showFallback.updateQueue), null === renderLanes - ? (nextPrimaryChildren.updateQueue = { + ? (showFallback.updateQueue = { transitions: workInProgress, markerInstances: current, retryQueue: null @@ -5409,10 +5480,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5441,22 +5511,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), reconcileChildFibers( workInProgress, @@ -5473,7 +5543,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$2())) (JSCompiler_temp = shim$2().digest), (nextProps = Error(formatProdErrorMessage(419))), @@ -5495,58 +5565,17 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); shim$2() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -5567,37 +5596,37 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling; - nextProps = createWorkInProgress(didSuspend, { + nextProps = updateWorkInProgressOffscreenFiber(didSuspend, { mode: "hidden", children: nextProps.children }); nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712; null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue2), (didSuspend = @@ -5608,40 +5637,40 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; + showFallback.memoizedState = nextPrimaryChildren; if ( enableTransitionTracing && - ((showFallback = enableTransitionTracing + ((nextPrimaryChildren = enableTransitionTracing ? transitionStack.current : null), - null !== showFallback) + null !== nextPrimaryChildren) ) { didSuspend = enableTransitionTracing ? markerInstanceStack.current : null; - currentFallbackChildFragment = nextPrimaryChildren.updateQueue; + currentFallbackChildFragment = showFallback.updateQueue; var currentOffscreenQueue = current.updateQueue; null === currentFallbackChildFragment - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, + ? (showFallback.updateQueue = { + transitions: nextPrimaryChildren, markerInstances: didSuspend, retryQueue: null }) : currentFallbackChildFragment === currentOffscreenQueue - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, + ? (showFallback.updateQueue = { + transitions: nextPrimaryChildren, markerInstances: didSuspend, retryQueue: null !== currentOffscreenQueue ? currentOffscreenQueue.retryQueue : null }) - : ((currentFallbackChildFragment.transitions = showFallback), + : ((currentFallbackChildFragment.transitions = nextPrimaryChildren), (currentFallbackChildFragment.markerInstances = didSuspend)); } - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5652,7 +5681,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; - renderLanes = createWorkInProgress(renderLanes, { + renderLanes = updateWorkInProgressOffscreenFiber(renderLanes, { mode: "visible", children: nextProps.children }); @@ -5709,6 +5738,9 @@ function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { }; return offscreenProps; } +function updateWorkInProgressOffscreenFiber(current, offscreenProps) { + return createWorkInProgress(current, offscreenProps); +} function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -5906,10 +5938,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$80 = workInProgress.memoizedState; + if (null !== state$80) { + if (null !== state$80.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -5929,17 +5969,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$80 = 0 !== (renderLanes & workInProgress.childLanes); + state$80 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$80 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$80) return updateSuspenseListComponent( current, workInProgress, @@ -5953,7 +5993,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$80) break; else return null; case 22: return ( @@ -5970,8 +6010,8 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 25: if (enableTransitionTracing) { - state = workInProgress.stateNode; - null !== state && pushMarkerInstance(workInProgress, state); + state$80 = workInProgress.stateNode; + null !== state$80 && pushMarkerInstance(workInProgress, state$80); break; } case 23: @@ -6279,26 +6319,73 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 31: - return ( - (props = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (props = { mode: props.mode, children: props.children }), - null === current - ? ((renderLanes = mountWorkInProgressOffscreenFiber( - props, + init = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, init); + else if (((props = current.memoizedState), null !== props)) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error(formatProdErrorMessage(558)); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + init = workInProgressRoot; + if ( + null !== init && + ((nextProps = getBumpedLaneForHydration(init, renderLanes)), + 0 !== nextProps && nextProps !== props.retryLane) + ) + throw ( + ((props.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(init, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, renderLanes - )), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)) - : ((renderLanes = createWorkInProgress(current.child, props)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)), - workInProgress - ); + ); + } else + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + } + else + (renderLanes = updateWorkInProgressOffscreenFiber(current.child, { + mode: init.mode, + children: init.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -6550,14 +6637,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$90 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$90 = lastTailNode), + for (var lastTailNode$91 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$91 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$90 + null === lastTailNode$91 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$90.sibling = null); + : (lastTailNode$91.sibling = null); } } function bubbleProperties(completedWork) { @@ -6567,19 +6654,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$91 = completedWork.child; null !== child$91; ) - (newChildLanes |= child$91.lanes | child$91.childLanes), - (subtreeFlags |= child$91.subtreeFlags & 65011712), - (subtreeFlags |= child$91.flags & 65011712), - (child$91.return = completedWork), - (child$91 = child$91.sibling); + for (var child$92 = completedWork.child; null !== child$92; ) + (newChildLanes |= child$92.lanes | child$92.childLanes), + (subtreeFlags |= child$92.subtreeFlags & 65011712), + (subtreeFlags |= child$92.flags & 65011712), + (child$92.return = completedWork), + (child$92 = child$92.sibling); else - for (child$91 = completedWork.child; null !== child$91; ) - (newChildLanes |= child$91.lanes | child$91.childLanes), - (subtreeFlags |= child$91.subtreeFlags), - (subtreeFlags |= child$91.flags), - (child$91.return = completedWork), - (child$91 = child$91.sibling); + for (child$92 = completedWork.child; null !== child$92; ) + (newChildLanes |= child$92.lanes | child$92.childLanes), + (subtreeFlags |= child$92.subtreeFlags), + (subtreeFlags |= child$92.flags), + (child$92.return = completedWork), + (child$92 = child$92.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6718,7 +6805,35 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== renderLanes) { + if (null === current) { + throw Error(formatProdErrorMessage(318)); + throw Error(formatProdErrorMessage(556)); + } + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -6761,11 +6876,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$96 = null; + var cache$99 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$96 = newProps.memoizedState.cachePool.pool); - cache$96 !== instance && (newProps.flags |= 2048); + (cache$99 = newProps.memoizedState.cachePool.pool); + cache$99 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -6793,8 +6908,8 @@ function completeWork(current, workInProgress, renderLanes) { instance = workInProgress.memoizedState; if (null === instance) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$96 = instance.rendering; - if (null === cache$96) + cache$99 = instance.rendering; + if (null === cache$99) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -6802,11 +6917,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$96 = findFirstSuspended(current); - if (null !== cache$96) { + cache$99 = findFirstSuspended(current); + if (null !== cache$99) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$96.updateQueue; + current = cache$99.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6831,7 +6946,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$96)), null !== current)) { + if (((current = findFirstSuspended(cache$99)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6841,7 +6956,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$96.alternate) + !cache$99.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6853,13 +6968,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 4194304)); instance.isBackwards - ? ((cache$96.sibling = workInProgress.child), - (workInProgress.child = cache$96)) + ? ((cache$99.sibling = workInProgress.child), + (workInProgress.child = cache$99)) : ((current = instance.last), null !== current - ? (current.sibling = cache$96) - : (workInProgress.child = cache$96), - (instance.last = cache$96)); + ? (current.sibling = cache$99) + : (workInProgress.child = cache$99), + (instance.last = cache$99)); } if (null !== instance.tail) return ( @@ -6982,6 +7097,16 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), null === workInProgress.alternate) + ) + throw Error(formatProdErrorMessage(340)); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -7059,6 +7184,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -7231,8 +7360,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$115) { - captureCommitPhaseError(current, nearestMountedAncestor, error$115); + } catch (error$119) { + captureCommitPhaseError(current, nearestMountedAncestor, error$119); } else ref.current = null; } @@ -7678,11 +7807,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$113) { + } catch (error$117) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$113 + error$117 ); } } @@ -7721,6 +7850,9 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -8133,6 +8265,7 @@ function commitDeletionEffectsOnFiber( } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -8285,6 +8418,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -8491,12 +8633,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$116 = hostParentFiber.stateNode.containerInfo, - before$117 = getHostSibling(finishedWork); + var parent$120 = hostParentFiber.stateNode.containerInfo, + before$121 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$117, - parent$116 + before$121, + parent$120 ); break; default: @@ -8636,6 +8778,13 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -8886,6 +9035,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -8909,14 +9066,14 @@ function commitPassiveMountOnFiber( ); break; case 22: - var instance$124 = finishedWork.stateNode, - current$125 = finishedWork.alternate; + var instance$129 = finishedWork.stateNode, + current$130 = finishedWork.alternate; null !== finishedWork.memoizedState ? (isViewTransitionEligible && - null !== current$125 && - null === current$125.memoizedState && - restoreEnterOrExitViewTransitions(current$125), - instance$124._visibility & 2 + null !== current$130 && + null === current$130.memoizedState && + restoreEnterOrExitViewTransitions(current$130), + instance$129._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -8928,17 +9085,17 @@ function commitPassiveMountOnFiber( finishedWork )) : (isViewTransitionEligible && - null !== current$125 && - null !== current$125.memoizedState && + null !== current$130 && + null !== current$130.memoizedState && restoreEnterOrExitViewTransitions(finishedWork), - instance$124._visibility & 2 + instance$129._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((instance$124._visibility |= 2), + : ((instance$129._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8948,9 +9105,9 @@ function commitPassiveMountOnFiber( ))); flags & 2048 && commitOffscreenPassiveMountEffects( - current$125, + current$130, finishedWork, - instance$124 + instance$129 ); break; case 24: @@ -9038,9 +9195,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$127 = finishedWork.stateNode; + var instance$132 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$127._visibility & 2 + ? instance$132._visibility & 2 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9052,7 +9209,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$127._visibility |= 2), + : ((instance$132._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9065,7 +9222,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$127 + instance$132 ); break; case 24: @@ -10014,8 +10171,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$139) { - handleThrow(root, thrownValue$139); + } catch (thrownValue$144) { + handleThrow(root, thrownValue$144); } while (1); lanes && root.shellSuspendCounter++; @@ -10130,8 +10287,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$141) { - handleThrow(root, thrownValue$141); + } catch (thrownValue$146) { + handleThrow(root, thrownValue$146); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -10697,6 +10854,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -11252,24 +11410,24 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1613 = { +var internals$jscomp$inline_1619 = { bundleType: 0, - version: "19.2.0-www-classic-17f88c80-20250422", + version: "19.2.0-www-classic-3ef31d19-20250422", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1614 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1620 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1614.isDisabled && - hook$jscomp$inline_1614.supportsFiber + !hook$jscomp$inline_1620.isDisabled && + hook$jscomp$inline_1620.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1614.inject( - internals$jscomp$inline_1613 + (rendererID = hook$jscomp$inline_1620.inject( + internals$jscomp$inline_1619 )), - (injectedHook = hook$jscomp$inline_1614); + (injectedHook = hook$jscomp$inline_1620); } catch (err) {} } var Path = Mode$1.Path; @@ -11283,4 +11441,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.2.0-www-classic-17f88c80-20250422"; +exports.version = "19.2.0-www-classic-3ef31d19-20250422"; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index a0e97093a4..7a30751a0f 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -486,6 +486,50 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getTransitionsForLanes(root, lanes) { if (!enableTransitionTracing) return null; for (var transitionsForLanes = []; 0 < lanes; ) { @@ -2708,6 +2752,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? push(suspenseHandlerStackCursor, handler) : push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -4316,6 +4365,7 @@ function throwException( returnFiber = suspenseHandlerStackCursor.current; if (null !== returnFiber) { switch (returnFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -4774,6 +4824,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -5150,10 +5222,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5167,9 +5238,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (renderLanes = nextPrimaryChildren.updateQueue), + (renderLanes = showFallback.updateQueue), null === renderLanes - ? (nextPrimaryChildren.updateQueue = { + ? (showFallback.updateQueue = { transitions: workInProgress, markerInstances: current, retryQueue: null @@ -5187,10 +5258,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5219,22 +5289,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), reconcileChildFibers( workInProgress, @@ -5251,7 +5321,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$2())) (JSCompiler_temp = shim$2().digest), (nextProps = Error(formatProdErrorMessage(419))), @@ -5273,58 +5343,17 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); shim$2() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -5345,37 +5374,37 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling; - nextProps = createWorkInProgress(didSuspend, { + nextProps = updateWorkInProgressOffscreenFiber(didSuspend, { mode: "hidden", children: nextProps.children }); nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712; null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue2), (didSuspend = @@ -5386,40 +5415,40 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; + showFallback.memoizedState = nextPrimaryChildren; if ( enableTransitionTracing && - ((showFallback = enableTransitionTracing + ((nextPrimaryChildren = enableTransitionTracing ? transitionStack.current : null), - null !== showFallback) + null !== nextPrimaryChildren) ) { didSuspend = enableTransitionTracing ? markerInstanceStack.current : null; - currentFallbackChildFragment = nextPrimaryChildren.updateQueue; + currentFallbackChildFragment = showFallback.updateQueue; var currentOffscreenQueue = current.updateQueue; null === currentFallbackChildFragment - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, + ? (showFallback.updateQueue = { + transitions: nextPrimaryChildren, markerInstances: didSuspend, retryQueue: null }) : currentFallbackChildFragment === currentOffscreenQueue - ? (nextPrimaryChildren.updateQueue = { - transitions: showFallback, + ? (showFallback.updateQueue = { + transitions: nextPrimaryChildren, markerInstances: didSuspend, retryQueue: null !== currentOffscreenQueue ? currentOffscreenQueue.retryQueue : null }) - : ((currentFallbackChildFragment.transitions = showFallback), + : ((currentFallbackChildFragment.transitions = nextPrimaryChildren), (currentFallbackChildFragment.markerInstances = didSuspend)); } - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5430,7 +5459,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; - renderLanes = createWorkInProgress(renderLanes, { + renderLanes = updateWorkInProgressOffscreenFiber(renderLanes, { mode: "visible", children: nextProps.children }); @@ -5487,6 +5516,9 @@ function mountWorkInProgressOffscreenFiber(offscreenProps, mode) { }; return offscreenProps; } +function updateWorkInProgressOffscreenFiber(current, offscreenProps) { + return createWorkInProgress(current, offscreenProps); +} function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -5680,10 +5712,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$80 = workInProgress.memoizedState; + if (null !== state$80) { + if (null !== state$80.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -5703,17 +5743,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$80 = 0 !== (renderLanes & workInProgress.childLanes); + state$80 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$80 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$80) return updateSuspenseListComponent( current, workInProgress, @@ -5727,7 +5767,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$80) break; else return null; case 22: return ( @@ -5744,8 +5784,8 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 25: if (enableTransitionTracing) { - state = workInProgress.stateNode; - null !== state && pushMarkerInstance(workInProgress, state); + state$80 = workInProgress.stateNode; + null !== state$80 && pushMarkerInstance(workInProgress, state$80); break; } case 23: @@ -6050,26 +6090,73 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 31: - return ( - (props = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (props = { mode: props.mode, children: props.children }), - null === current - ? ((renderLanes = mountWorkInProgressOffscreenFiber( - props, + init = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, init); + else if (((props = current.memoizedState), null !== props)) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error(formatProdErrorMessage(558)); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + init = workInProgressRoot; + if ( + null !== init && + ((nextProps = getBumpedLaneForHydration(init, renderLanes)), + 0 !== nextProps && nextProps !== props.retryLane) + ) + throw ( + ((props.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(init, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, renderLanes - )), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)) - : ((renderLanes = createWorkInProgress(current.child, props)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)), - workInProgress - ); + ); + } else + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + } + else + (renderLanes = updateWorkInProgressOffscreenFiber(current.child, { + mode: init.mode, + children: init.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -6321,14 +6408,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$90 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$90 = lastTailNode), + for (var lastTailNode$91 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$91 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$90 + null === lastTailNode$91 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$90.sibling = null); + : (lastTailNode$91.sibling = null); } } function bubbleProperties(completedWork) { @@ -6338,19 +6425,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$91 = completedWork.child; null !== child$91; ) - (newChildLanes |= child$91.lanes | child$91.childLanes), - (subtreeFlags |= child$91.subtreeFlags & 65011712), - (subtreeFlags |= child$91.flags & 65011712), - (child$91.return = completedWork), - (child$91 = child$91.sibling); + for (var child$92 = completedWork.child; null !== child$92; ) + (newChildLanes |= child$92.lanes | child$92.childLanes), + (subtreeFlags |= child$92.subtreeFlags & 65011712), + (subtreeFlags |= child$92.flags & 65011712), + (child$92.return = completedWork), + (child$92 = child$92.sibling); else - for (child$91 = completedWork.child; null !== child$91; ) - (newChildLanes |= child$91.lanes | child$91.childLanes), - (subtreeFlags |= child$91.subtreeFlags), - (subtreeFlags |= child$91.flags), - (child$91.return = completedWork), - (child$91 = child$91.sibling); + for (child$92 = completedWork.child; null !== child$92; ) + (newChildLanes |= child$92.lanes | child$92.childLanes), + (subtreeFlags |= child$92.subtreeFlags), + (subtreeFlags |= child$92.flags), + (child$92.return = completedWork), + (child$92 = child$92.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6482,7 +6569,35 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== renderLanes) { + if (null === current) { + throw Error(formatProdErrorMessage(318)); + throw Error(formatProdErrorMessage(556)); + } + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -6525,11 +6640,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$96 = null; + var cache$99 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$96 = newProps.memoizedState.cachePool.pool); - cache$96 !== instance && (newProps.flags |= 2048); + (cache$99 = newProps.memoizedState.cachePool.pool); + cache$99 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -6557,8 +6672,8 @@ function completeWork(current, workInProgress, renderLanes) { instance = workInProgress.memoizedState; if (null === instance) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$96 = instance.rendering; - if (null === cache$96) + cache$99 = instance.rendering; + if (null === cache$99) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -6566,11 +6681,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$96 = findFirstSuspended(current); - if (null !== cache$96) { + cache$99 = findFirstSuspended(current); + if (null !== cache$99) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$96.updateQueue; + current = cache$99.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6595,7 +6710,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$96)), null !== current)) { + if (((current = findFirstSuspended(cache$99)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6605,7 +6720,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$96.alternate) + !cache$99.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6617,13 +6732,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 4194304)); instance.isBackwards - ? ((cache$96.sibling = workInProgress.child), - (workInProgress.child = cache$96)) + ? ((cache$99.sibling = workInProgress.child), + (workInProgress.child = cache$99)) : ((current = instance.last), null !== current - ? (current.sibling = cache$96) - : (workInProgress.child = cache$96), - (instance.last = cache$96)); + ? (current.sibling = cache$99) + : (workInProgress.child = cache$99), + (instance.last = cache$99)); } if (null !== instance.tail) return ( @@ -6742,6 +6857,16 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), null === workInProgress.alternate) + ) + throw Error(formatProdErrorMessage(340)); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -6811,6 +6936,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -6983,8 +7112,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$115) { - captureCommitPhaseError(current, nearestMountedAncestor, error$115); + } catch (error$119) { + captureCommitPhaseError(current, nearestMountedAncestor, error$119); } else ref.current = null; } @@ -7430,11 +7559,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$113) { + } catch (error$117) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$113 + error$117 ); } } @@ -7473,6 +7602,9 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -7885,6 +8017,7 @@ function commitDeletionEffectsOnFiber( } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -8037,6 +8170,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -8243,12 +8385,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$116 = hostParentFiber.stateNode.containerInfo, - before$117 = getHostSibling(finishedWork); + var parent$120 = hostParentFiber.stateNode.containerInfo, + before$121 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$117, - parent$116 + before$121, + parent$120 ); break; default: @@ -8388,6 +8530,13 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -8638,6 +8787,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -8661,14 +8818,14 @@ function commitPassiveMountOnFiber( ); break; case 22: - var instance$124 = finishedWork.stateNode, - current$125 = finishedWork.alternate; + var instance$129 = finishedWork.stateNode, + current$130 = finishedWork.alternate; null !== finishedWork.memoizedState ? (isViewTransitionEligible && - null !== current$125 && - null === current$125.memoizedState && - restoreEnterOrExitViewTransitions(current$125), - instance$124._visibility & 2 + null !== current$130 && + null === current$130.memoizedState && + restoreEnterOrExitViewTransitions(current$130), + instance$129._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -8680,17 +8837,17 @@ function commitPassiveMountOnFiber( finishedWork )) : (isViewTransitionEligible && - null !== current$125 && - null !== current$125.memoizedState && + null !== current$130 && + null !== current$130.memoizedState && restoreEnterOrExitViewTransitions(finishedWork), - instance$124._visibility & 2 + instance$129._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((instance$124._visibility |= 2), + : ((instance$129._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8700,9 +8857,9 @@ function commitPassiveMountOnFiber( ))); flags & 2048 && commitOffscreenPassiveMountEffects( - current$125, + current$130, finishedWork, - instance$124 + instance$129 ); break; case 24: @@ -8790,9 +8947,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$127 = finishedWork.stateNode; + var instance$132 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$127._visibility & 2 + ? instance$132._visibility & 2 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8804,7 +8961,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$127._visibility |= 2), + : ((instance$132._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8817,7 +8974,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$127 + instance$132 ); break; case 24: @@ -9766,8 +9923,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$139) { - handleThrow(root, thrownValue$139); + } catch (thrownValue$144) { + handleThrow(root, thrownValue$144); } while (1); lanes && root.shellSuspendCounter++; @@ -9882,8 +10039,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$141) { - handleThrow(root, thrownValue$141); + } catch (thrownValue$146) { + handleThrow(root, thrownValue$146); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -10445,6 +10602,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -10965,24 +11123,24 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1586 = { +var internals$jscomp$inline_1592 = { bundleType: 0, - version: "19.2.0-www-modern-17f88c80-20250422", + version: "19.2.0-www-modern-3ef31d19-20250422", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1587 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1593 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1587.isDisabled && - hook$jscomp$inline_1587.supportsFiber + !hook$jscomp$inline_1593.isDisabled && + hook$jscomp$inline_1593.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1587.inject( - internals$jscomp$inline_1586 + (rendererID = hook$jscomp$inline_1593.inject( + internals$jscomp$inline_1592 )), - (injectedHook = hook$jscomp$inline_1587); + (injectedHook = hook$jscomp$inline_1593); } catch (err) {} } var Path = Mode$1.Path; @@ -10996,4 +11154,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.2.0-www-modern-17f88c80-20250422"; +exports.version = "19.2.0-www-modern-3ef31d19-20250422"; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 19881798fe..02c4f7a8fb 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -139,6 +139,16 @@ __DEV__ && } return null; } + function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; + } function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error("Unable to find node on an unmounted component."); @@ -637,6 +647,16 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -3537,6 +3557,21 @@ __DEV__ && (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function getSuspendedTreeContext() { + warnIfNotHydrating(); + return null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null; + } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function warnIfNotHydrating() { isHydrating || console.error( @@ -3584,6 +3619,12 @@ __DEV__ && siblings.push(distanceFromLeaf); return distanceFromLeaf; } + function warnIfHydrating() { + isHydrating && + console.error( + "We should not be hydrating here. This is a bug in React. Please file a bug." + ); + } function warnNonHydratedInstance(fiber, rejectedCandidate) { didSuspendOrErrorDEV || ((fiber = buildHydrationDiffNode(fiber, 0)), @@ -3710,6 +3751,7 @@ __DEV__ && for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -3717,8 +3759,6 @@ __DEV__ && case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -3760,20 +3800,26 @@ __DEV__ && ); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) + throw Error( + "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." + ); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -6439,6 +6485,11 @@ __DEV__ && handler ); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -8511,6 +8562,7 @@ __DEV__ && sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -9000,10 +9052,19 @@ __DEV__ && renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -9015,17 +9076,6 @@ __DEV__ && renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -9071,6 +9121,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -9868,23 +9954,24 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2880; - var JSCompiler_object_inline_stack_2881 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2930; + var JSCompiler_object_inline_stack_2931 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var showFallback = !1, - didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2880 = didSuspend) || - (JSCompiler_object_inline_digest_2880 = + var JSCompiler_object_inline_message_2929 = !1; + var didSuspend = 0 !== (workInProgress.flags & 128); + (JSCompiler_object_inline_digest_2930 = didSuspend) || + (JSCompiler_object_inline_digest_2930 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2880 && - ((showFallback = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2880 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2930 && + ((JSCompiler_object_inline_message_2929 = !0), + (workInProgress.flags &= -129)); + JSCompiler_object_inline_digest_2930 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - showFallback + JSCompiler_object_inline_message_2929 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); (current = nextHydratableInstance) @@ -9897,25 +9984,18 @@ __DEV__ && ? renderLanes : null), null !== renderLanes && - (warnIfNotHydrating(), - (workInProgress.memoizedState = { + ((JSCompiler_object_inline_digest_2930 = { dehydrated: renderLanes, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, + treeContext: getSuspendedTreeContext(), retryLane: 536870912, hydrationErrors: null }), - (JSCompiler_object_inline_digest_2880 = createFiber( - 18, - null, - null, - NoMode - )), - (JSCompiler_object_inline_digest_2880.stateNode = renderLanes), - (JSCompiler_object_inline_digest_2880.return = workInProgress), - (workInProgress.child = JSCompiler_object_inline_digest_2880), + (workInProgress.memoizedState = + JSCompiler_object_inline_digest_2930), + (JSCompiler_object_inline_digest_2930 = + createFiberFromDehydratedFragment(renderLanes)), + (JSCompiler_object_inline_digest_2930.return = workInProgress), + (workInProgress.child = JSCompiler_object_inline_digest_2930), (hydrationParentFiber = workInProgress), (nextHydratableInstance = null))) : (renderLanes = null); @@ -9929,29 +10009,26 @@ __DEV__ && : (workInProgress.lanes = 536870912); return null; } - var JSCompiler_object_inline_componentStack_2882 = - JSCompiler_object_inline_stack_2881.children; - var nextFallbackChildren = JSCompiler_object_inline_stack_2881.fallback; - if (showFallback) + var nextPrimaryChildren = JSCompiler_object_inline_stack_2931.children, + nextFallbackChildren = JSCompiler_object_inline_stack_2931.fallback; + if (JSCompiler_object_inline_message_2929) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2881 = + (JSCompiler_object_inline_stack_2931 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_componentStack_2882, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_componentStack_2882 = - workInProgress.child), - (JSCompiler_object_inline_componentStack_2882.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2882.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2880, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2930, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), enableTransitionTracing && ((workInProgress = enableTransitionTracing @@ -9961,307 +10038,271 @@ __DEV__ && ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (renderLanes = - JSCompiler_object_inline_componentStack_2882.updateQueue), + (renderLanes = nextPrimaryChildren.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2882.updateQueue = - { - transitions: workInProgress, - markerInstances: current, - retryQueue: null - }) + ? (nextPrimaryChildren.updateQueue = { + transitions: workInProgress, + markerInstances: current, + retryQueue: null + }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2881 + JSCompiler_object_inline_stack_2931 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2881.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2931.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2881 = + (JSCompiler_object_inline_stack_2931 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_componentStack_2882, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_componentStack_2882 = - workInProgress.child), - (JSCompiler_object_inline_componentStack_2882.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2882.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2880, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2930, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2881 + JSCompiler_object_inline_stack_2931 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_componentStack_2882 + nextPrimaryChildren ); } - var JSCompiler_object_inline_message_2879 = current.memoizedState; - if ( - null !== JSCompiler_object_inline_message_2879 && - ((JSCompiler_object_inline_componentStack_2882 = - JSCompiler_object_inline_message_2879.dehydrated), - null !== JSCompiler_object_inline_componentStack_2882) - ) { - if (didSuspend) - workInProgress.flags & 256 - ? (pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ))) - : null !== workInProgress.memoizedState - ? (reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - (workInProgress = null)) - : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2882 = - JSCompiler_object_inline_stack_2881.fallback), - (nextFallbackChildren = workInProgress.mode), - (JSCompiler_object_inline_stack_2881 = - mountWorkInProgressOffscreenFiber( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2881.children - }, - nextFallbackChildren - )), - (JSCompiler_object_inline_componentStack_2882 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2882, + var prevState = current.memoizedState; + if (null !== prevState) { + var JSCompiler_object_inline_componentStack_2932 = prevState.dehydrated; + if (null !== JSCompiler_object_inline_componentStack_2932) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (nextPrimaryChildren = + JSCompiler_object_inline_stack_2931.fallback), + (nextFallbackChildren = workInProgress.mode), + (JSCompiler_object_inline_stack_2931 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2931.children + }, + nextFallbackChildren + )), + (nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, nextFallbackChildren, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2882.flags |= 2), - (JSCompiler_object_inline_stack_2881.return = workInProgress), - (JSCompiler_object_inline_componentStack_2882.return = - workInProgress), - (JSCompiler_object_inline_stack_2881.sibling = - JSCompiler_object_inline_componentStack_2882), - (workInProgress.child = JSCompiler_object_inline_stack_2881), - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2881 = workInProgress.child), - (JSCompiler_object_inline_stack_2881.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2881.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2880, + (nextPrimaryChildren.flags |= 2), + (JSCompiler_object_inline_stack_2931.return = workInProgress), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2931.sibling = + nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2931), + reconcileChildFibers( + workInProgress, + current.child, + null, renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = - JSCompiler_object_inline_componentStack_2882)); - else if ( - (pushPrimaryTreeSuspenseHandler(workInProgress), - isHydrating && - console.error( - "We should not be hydrating here. This is a bug in React. Please file a bug." - ), - isSuspenseInstanceFallback( - JSCompiler_object_inline_componentStack_2882 - )) - ) { - JSCompiler_object_inline_digest_2880 = - JSCompiler_object_inline_componentStack_2882.nextSibling && - JSCompiler_object_inline_componentStack_2882.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2880) { - nextFallbackChildren = JSCompiler_object_inline_digest_2880.dgst; - var message = JSCompiler_object_inline_digest_2880.msg; - var componentStack = JSCompiler_object_inline_digest_2880.stck; - var componentStack$jscomp$0 = - JSCompiler_object_inline_digest_2880.cstck; - } - JSCompiler_object_inline_message_2879 = message; - JSCompiler_object_inline_digest_2880 = nextFallbackChildren; - JSCompiler_object_inline_stack_2881 = componentStack; - JSCompiler_object_inline_componentStack_2882 = - componentStack$jscomp$0; - nextFallbackChildren = JSCompiler_object_inline_message_2879; - componentStack = JSCompiler_object_inline_componentStack_2882; - JSCompiler_object_inline_componentStack_2882 = nextFallbackChildren - ? Error(nextFallbackChildren) - : Error( - "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ), + (JSCompiler_object_inline_stack_2931 = workInProgress.child), + (JSCompiler_object_inline_stack_2931.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_stack_2931.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2930, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = nextPrimaryChildren)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + warnIfHydrating(), + isSuspenseInstanceFallback( + JSCompiler_object_inline_componentStack_2932 + )) + ) { + JSCompiler_object_inline_digest_2930 = + JSCompiler_object_inline_componentStack_2932.nextSibling && + JSCompiler_object_inline_componentStack_2932.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2930) { + nextPrimaryChildren = JSCompiler_object_inline_digest_2930.dgst; + var message = JSCompiler_object_inline_digest_2930.msg; + nextFallbackChildren = JSCompiler_object_inline_digest_2930.stck; + var componentStack = JSCompiler_object_inline_digest_2930.cstck; + } + JSCompiler_object_inline_message_2929 = message; + JSCompiler_object_inline_digest_2930 = nextPrimaryChildren; + JSCompiler_object_inline_stack_2931 = nextFallbackChildren; + JSCompiler_object_inline_componentStack_2932 = componentStack; + nextPrimaryChildren = JSCompiler_object_inline_message_2929; + nextFallbackChildren = JSCompiler_object_inline_componentStack_2932; + nextPrimaryChildren = nextPrimaryChildren + ? Error(nextPrimaryChildren) + : Error( + "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ); + nextPrimaryChildren.stack = + JSCompiler_object_inline_stack_2931 || ""; + nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2930; + JSCompiler_object_inline_digest_2930 = + void 0 === nextFallbackChildren ? null : nextFallbackChildren; + JSCompiler_object_inline_stack_2931 = { + value: nextPrimaryChildren, + source: null, + stack: JSCompiler_object_inline_digest_2930 + }; + "string" === typeof JSCompiler_object_inline_digest_2930 && + CapturedStacks.set( + nextPrimaryChildren, + JSCompiler_object_inline_stack_2931 ); - JSCompiler_object_inline_componentStack_2882.stack = - JSCompiler_object_inline_stack_2881 || ""; - JSCompiler_object_inline_componentStack_2882.digest = - JSCompiler_object_inline_digest_2880; - JSCompiler_object_inline_digest_2880 = - void 0 === componentStack ? null : componentStack; - JSCompiler_object_inline_stack_2881 = { - value: JSCompiler_object_inline_componentStack_2882, - source: null, - stack: JSCompiler_object_inline_digest_2880 - }; - "string" === typeof JSCompiler_object_inline_digest_2880 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_2882, - JSCompiler_object_inline_stack_2881 - ); - queueHydrationError(JSCompiler_object_inline_stack_2881); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else if ( - (didReceiveUpdate || - propagateParentContextChanges( + queueHydrationError(JSCompiler_object_inline_stack_2931); + workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, - renderLanes, - !1 - ), - (JSCompiler_object_inline_digest_2880 = - 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2880) - ) { - JSCompiler_object_inline_digest_2880 = workInProgressRoot; - if ( - null !== JSCompiler_object_inline_digest_2880 && - ((JSCompiler_object_inline_stack_2881 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2881 = - 0 !== (JSCompiler_object_inline_stack_2881 & 42) - ? 1 - : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2881 - )), - (JSCompiler_object_inline_stack_2881 = - 0 !== - (JSCompiler_object_inline_stack_2881 & - (JSCompiler_object_inline_digest_2880.suspendedLanes | - renderLanes)) - ? 0 - : JSCompiler_object_inline_stack_2881), - 0 !== JSCompiler_object_inline_stack_2881 && - JSCompiler_object_inline_stack_2881 !== - JSCompiler_object_inline_message_2879.retryLane) - ) - throw ( - ((JSCompiler_object_inline_message_2879.retryLane = - JSCompiler_object_inline_stack_2881), - enqueueConcurrentRenderForLane( - current, - JSCompiler_object_inline_stack_2881 - ), - scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2880, - current, - JSCompiler_object_inline_stack_2881 - ), - SelectiveHydrationException) + renderLanes ); - JSCompiler_object_inline_componentStack_2882.data === - SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else - JSCompiler_object_inline_componentStack_2882.data === - SUSPENSE_PENDING_START_DATA - ? ((workInProgress.flags |= 192), - (workInProgress.child = current.child), - (workInProgress = null)) - : ((current = JSCompiler_object_inline_message_2879.treeContext), - (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_componentStack_2882.nextSibling - )), - (hydrationParentFiber = workInProgress), - (isHydrating = !0), - (hydrationErrors = null), - (didSuspendOrErrorDEV = !1), - (hydrationDiffRootDEV = null), - (rootOrSingletonContext = !1), - null !== current && - (warnIfNotHydrating(), - (idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), - (workInProgress = mountSuspensePrimaryChildren( + } else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - JSCompiler_object_inline_stack_2881.children + renderLanes, + !1 + ), + (JSCompiler_object_inline_digest_2930 = + 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_object_inline_digest_2930) + ) { + JSCompiler_object_inline_digest_2930 = workInProgressRoot; + if ( + null !== JSCompiler_object_inline_digest_2930 && + ((JSCompiler_object_inline_stack_2931 = getBumpedLaneForHydration( + JSCompiler_object_inline_digest_2930, + renderLanes )), - (workInProgress.flags |= 4096)); - return workInProgress; + 0 !== JSCompiler_object_inline_stack_2931 && + JSCompiler_object_inline_stack_2931 !== prevState.retryLane) + ) + throw ( + ((prevState.retryLane = JSCompiler_object_inline_stack_2931), + enqueueConcurrentRenderForLane( + current, + JSCompiler_object_inline_stack_2931 + ), + scheduleUpdateOnFiber( + JSCompiler_object_inline_digest_2930, + current, + JSCompiler_object_inline_stack_2931 + ), + SelectiveHydrationException) + ); + JSCompiler_object_inline_componentStack_2932.data === + SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + JSCompiler_object_inline_componentStack_2932.data === + SUSPENSE_PENDING_START_DATA + ? ((workInProgress.flags |= 192), + (workInProgress.child = current.child), + (workInProgress = null)) + : ((current = prevState.treeContext), + (nextHydratableInstance = getNextHydratable( + JSCompiler_object_inline_componentStack_2932.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== current && + restoreSuspendedTreeContext(workInProgress, current), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + JSCompiler_object_inline_stack_2931.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; + } } - if (showFallback) + if (JSCompiler_object_inline_message_2929) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2882 = - JSCompiler_object_inline_stack_2881.fallback), + (nextPrimaryChildren = JSCompiler_object_inline_stack_2931.fallback), (nextFallbackChildren = workInProgress.mode), (componentStack = current.child), - (componentStack$jscomp$0 = componentStack.sibling), - (JSCompiler_object_inline_stack_2881 = createWorkInProgress( + (JSCompiler_object_inline_componentStack_2932 = + componentStack.sibling), + (JSCompiler_object_inline_stack_2931 = createWorkInProgress( componentStack, { mode: "hidden", - children: JSCompiler_object_inline_stack_2881.children + children: JSCompiler_object_inline_stack_2931.children } )), - (JSCompiler_object_inline_stack_2881.subtreeFlags = + (JSCompiler_object_inline_stack_2931.subtreeFlags = componentStack.subtreeFlags & 65011712), - null !== componentStack$jscomp$0 - ? (JSCompiler_object_inline_componentStack_2882 = - createWorkInProgress( - componentStack$jscomp$0, - JSCompiler_object_inline_componentStack_2882 - )) - : ((JSCompiler_object_inline_componentStack_2882 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2882, - nextFallbackChildren, - renderLanes, - null - )), - (JSCompiler_object_inline_componentStack_2882.flags |= 2)), - (JSCompiler_object_inline_componentStack_2882.return = - workInProgress), - (JSCompiler_object_inline_stack_2881.return = workInProgress), - (JSCompiler_object_inline_stack_2881.sibling = - JSCompiler_object_inline_componentStack_2882), - (workInProgress.child = JSCompiler_object_inline_stack_2881), - (JSCompiler_object_inline_stack_2881 = - JSCompiler_object_inline_componentStack_2882), - (JSCompiler_object_inline_componentStack_2882 = workInProgress.child), + null !== JSCompiler_object_inline_componentStack_2932 + ? (nextPrimaryChildren = createWorkInProgress( + JSCompiler_object_inline_componentStack_2932, + nextPrimaryChildren + )) + : ((nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, + nextFallbackChildren, + renderLanes, + null + )), + (nextPrimaryChildren.flags |= 2)), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2931.return = workInProgress), + (JSCompiler_object_inline_stack_2931.sibling = nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2931), + (JSCompiler_object_inline_stack_2931 = nextPrimaryChildren), + (nextPrimaryChildren = workInProgress.child), (nextFallbackChildren = current.child.memoizedState), null === nextFallbackChildren ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) : ((componentStack = nextFallbackChildren.cachePool), null !== componentStack - ? ((componentStack$jscomp$0 = CacheContext._currentValue), + ? ((JSCompiler_object_inline_componentStack_2932 = + CacheContext._currentValue), (componentStack = - componentStack.parent !== componentStack$jscomp$0 + componentStack.parent !== + JSCompiler_object_inline_componentStack_2932 ? { - parent: componentStack$jscomp$0, - pool: componentStack$jscomp$0 + parent: JSCompiler_object_inline_componentStack_2932, + pool: JSCompiler_object_inline_componentStack_2932 } : componentStack)) : (componentStack = getSuspendedCache()), @@ -10269,8 +10310,7 @@ __DEV__ && baseLanes: nextFallbackChildren.baseLanes | renderLanes, cachePool: componentStack })), - (JSCompiler_object_inline_componentStack_2882.memoizedState = - nextFallbackChildren), + (nextPrimaryChildren.memoizedState = nextFallbackChildren), enableTransitionTracing && ((nextFallbackChildren = enableTransitionTracing ? transitionStack.current @@ -10279,54 +10319,52 @@ __DEV__ && ((componentStack = enableTransitionTracing ? markerInstanceStack.current : null), - (componentStack$jscomp$0 = - JSCompiler_object_inline_componentStack_2882.updateQueue), - (JSCompiler_object_inline_message_2879 = current.updateQueue), - null === componentStack$jscomp$0 - ? (JSCompiler_object_inline_componentStack_2882.updateQueue = { + (JSCompiler_object_inline_componentStack_2932 = + nextPrimaryChildren.updateQueue), + (JSCompiler_object_inline_message_2929 = current.updateQueue), + null === JSCompiler_object_inline_componentStack_2932 + ? (nextPrimaryChildren.updateQueue = { transitions: nextFallbackChildren, markerInstances: componentStack, retryQueue: null }) - : componentStack$jscomp$0 === - JSCompiler_object_inline_message_2879 - ? (JSCompiler_object_inline_componentStack_2882.updateQueue = - { - transitions: nextFallbackChildren, - markerInstances: componentStack, - retryQueue: - null !== JSCompiler_object_inline_message_2879 - ? JSCompiler_object_inline_message_2879.retryQueue - : null - }) - : ((componentStack$jscomp$0.transitions = + : JSCompiler_object_inline_componentStack_2932 === + JSCompiler_object_inline_message_2929 + ? (nextPrimaryChildren.updateQueue = { + transitions: nextFallbackChildren, + markerInstances: componentStack, + retryQueue: + null !== JSCompiler_object_inline_message_2929 + ? JSCompiler_object_inline_message_2929.retryQueue + : null + }) + : ((JSCompiler_object_inline_componentStack_2932.transitions = nextFallbackChildren), - (componentStack$jscomp$0.markerInstances = + (JSCompiler_object_inline_componentStack_2932.markerInstances = componentStack)))), - (JSCompiler_object_inline_componentStack_2882.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2880, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2930, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2881 + JSCompiler_object_inline_stack_2931 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2881.children + children: JSCompiler_object_inline_stack_2931.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2880 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2880 + ((JSCompiler_object_inline_digest_2930 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2930 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2880.push(current)); + : JSCompiler_object_inline_digest_2930.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10694,6 +10732,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -11454,69 +11500,160 @@ __DEV__ && return workInProgress.child; case 31: var nextProps$jscomp$1 = workInProgress.pendingProps, - hiddenProp = nextProps$jscomp$1.hidden; - void 0 !== hiddenProp && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === hiddenProp - ? "hidden" - : !1 === hiddenProp - ? "hidden={false}" - : "hidden={...}", - hiddenProp ? 'mode="hidden"' : 'mode="visible"' - ); - var mode = workInProgress.mode, - offscreenChildProps = { - mode: nextProps$jscomp$1.mode, - children: nextProps$jscomp$1.children - }; - if (null === current) { + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) if (isHydrating) { - var nextInstance$jscomp$1 = nextHydratableInstance; - if (nextInstance$jscomp$1) { - var hydratableInstance = canHydrateHydrationBoundary( - nextInstance$jscomp$1, - rootOrSingletonContext - ); - var activityInstance = - null !== hydratableInstance && - hydratableInstance.data === ACTIVITY_START_DATA - ? hydratableInstance - : null; - null !== activityInstance && - ((workInProgress.stateNode = activityInstance), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - activityInstance.nextSibling - ))); - var JSCompiler_temp$jscomp$2 = activityInstance; - } else JSCompiler_temp$jscomp$2 = null; - if (null === JSCompiler_temp$jscomp$2) - throw ( - (warnNonHydratedInstance( + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, + rootOrSingletonContext + ); + var activityInstance = + null !== hydratableInstance && + hydratableInstance.data === ACTIVITY_START_DATA + ? hydratableInstance + : null; + if (null !== activityInstance) { + var activityState = { + dehydrated: activityInstance, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }; + workInProgress.memoizedState = activityState; + var dehydratedFragment = + createFiberFromDehydratedFragment(activityInstance); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$2 = activityInstance; + } else JSCompiler_temp$jscomp$2 = null; + if (null === JSCompiler_temp$jscomp$2) + throw ( + (warnNonHydratedInstance( + workInProgress, + nextInstance$jscomp$1 + ), + throwOnHydrationMismatch(workInProgress)) + ); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$3 = null; + } else + JSCompiler_inline_result$jscomp$3 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var activityInstance$jscomp$0 = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$4 = null); + else + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + else { + warnIfHydrating(); + didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - nextInstance$jscomp$1 - ), - throwOnHydrationMismatch(workInProgress)) - ); + renderLanes, + !1 + ); + var hasContextChanged = + 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged) { + var root = workInProgressRoot; + if (null !== root) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = + attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + activityInstance$jscomp$0.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + didSuspendOrErrorDEV = !1; + hydrationDiffRootDEV = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$4 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$3 = + JSCompiler_inline_result$jscomp$4; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment$jscomp$0; } - var primaryChildFragment = mountWorkInProgressOffscreenFiber( - offscreenChildProps, - mode - ); - primaryChildFragment.ref = workInProgress.ref; - workInProgress.child = primaryChildFragment; - primaryChildFragment.return = workInProgress; - var JSCompiler_inline_result$jscomp$3 = primaryChildFragment; - } else { - var _primaryChildFragment = createWorkInProgress( - current.child, - offscreenChildProps - ); - _primaryChildFragment.ref = workInProgress.ref; - workInProgress.child = _primaryChildFragment; - _primaryChildFragment.return = workInProgress; - JSCompiler_inline_result$jscomp$3 = _primaryChildFragment; } return JSCompiler_inline_result$jscomp$3; case 22: @@ -11540,12 +11677,12 @@ __DEV__ && var cacheFromPool = peekCacheFromPool(); if (null !== cacheFromPool) var freshCache = cacheFromPool; else { - var root = workInProgressRoot, + var root$jscomp$0 = workInProgressRoot, freshCache$jscomp$0 = createCache(); - root.pooledCache = freshCache$jscomp$0; + root$jscomp$0.pooledCache = freshCache$jscomp$0; retainCache(freshCache$jscomp$0); null !== freshCache$jscomp$0 && - (root.pooledCacheLanes |= renderLanes); + (root$jscomp$0.pooledCacheLanes |= renderLanes); freshCache = freshCache$jscomp$0; } workInProgress.memoizedState = { @@ -11559,9 +11696,9 @@ __DEV__ && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()); - var prevState$jscomp$0 = current.memoizedState, + var prevState$jscomp$1 = current.memoizedState, nextState$jscomp$0 = workInProgress.memoizedState; - if (prevState$jscomp$0.parent !== parentCache) { + if (prevState$jscomp$1.parent !== parentCache) { var derivedState = { parent: parentCache, cache: parentCache }; workInProgress.memoizedState = derivedState; 0 === workInProgress.lanes && @@ -11572,7 +11709,7 @@ __DEV__ && } else { var nextCache$jscomp$0 = nextState$jscomp$0.cache; pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); - nextCache$jscomp$0 !== prevState$jscomp$0.cache && + nextCache$jscomp$0 !== prevState$jscomp$1.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -11621,9 +11758,9 @@ __DEV__ && nextProps$jscomp$2.children, renderLanes ); - var JSCompiler_inline_result$jscomp$4 = workInProgress.child; - } else JSCompiler_inline_result$jscomp$4 = null; - return JSCompiler_inline_result$jscomp$4; + var JSCompiler_inline_result$jscomp$5 = workInProgress.child; + } else JSCompiler_inline_result$jscomp$5 = null; + return JSCompiler_inline_result$jscomp$5; } break; case 30: @@ -12304,11 +12441,62 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) + throw Error( + "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue." + ); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + } else + emitPendingHydrationWarnings(), + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -12316,23 +12504,25 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) + if (!nextResource) throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." ); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - type[internalInstanceKey] = workInProgress; + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -12340,11 +12530,11 @@ __DEV__ && emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= @@ -12637,6 +12827,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (workInProgress.mode & ProfileMode) !== NoMode && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -12720,6 +12926,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -13937,16 +14147,19 @@ __DEV__ && } } function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && - 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && + 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { root = root.containerInfo; @@ -14359,6 +14572,11 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -14926,6 +15144,35 @@ __DEV__ && popComponentEffectDuration(prevEffectDuration); componentEffectErrors = prevEffectErrors; } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + runWithFiberInDEV( + finishedWork, + commitHydratedActivityInstance, + current + ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -14958,6 +15205,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -15385,6 +15633,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -15971,6 +16228,16 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -16350,6 +16617,41 @@ __DEV__ && endTime ); break; + case 31: + flags = inHydratedSubtree; + enableComponentPerformanceTrack && + ((isViewTransitionEligible = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null), + (prevProfilerEffectDuration = finishedWork.memoizedState), + null !== isViewTransitionEligible && + null === prevProfilerEffectDuration + ? ((prevProfilerEffectDuration = finishedWork.deletions), + null !== prevProfilerEffectDuration && + 0 < prevProfilerEffectDuration.length && + 18 === prevProfilerEffectDuration[0].tag + ? ((inHydratedSubtree = !1), + (isViewTransitionEligible = + isViewTransitionEligible.hydrationErrors), + null !== isViewTransitionEligible && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime, + isViewTransitionEligible + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1)); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + enableComponentPerformanceTrack && (inHydratedSubtree = flags); + break; case 13: flags = inHydratedSubtree; enableComponentPerformanceTrack && @@ -19441,6 +19743,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -20115,6 +20418,11 @@ __DEV__ && content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -20377,12 +20685,21 @@ __DEV__ && (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } + function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } + } function getCurrentFiberForDevTools() { return current; } @@ -24998,6 +25315,9 @@ __DEV__ && function commitHydratedContainer(container) { retryIfBlockedOn(container); } + function commitHydratedActivityInstance(activityInstance) { + retryIfBlockedOn(activityInstance); + } function commitHydratedSuspenseInstance(suspenseInstance) { retryIfBlockedOn(suspenseInstance); } @@ -26047,22 +26367,22 @@ __DEV__ && ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane( - nearestMounted, - lane - ); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -26345,6 +26665,7 @@ __DEV__ && } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -26390,8 +26711,11 @@ __DEV__ && targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -30590,11 +30914,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-www-classic-17f88c80-20250422" !== isomorphicReactPackageVersion) + if ("19.2.0-www-classic-3ef31d19-20250422" !== 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.2.0-www-classic-17f88c80-20250422\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-www-classic-3ef31d19-20250422\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -30637,10 +30961,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.2.0-www-classic-17f88c80-20250422", + version: "19.2.0-www-classic-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -31238,7 +31562,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-www-classic-17f88c80-20250422"; + exports.version = "19.2.0-www-classic-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index 9148dd8906..35de1306f4 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -139,6 +139,16 @@ __DEV__ && } return null; } + function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; + } function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error("Unable to find node on an unmounted component."); @@ -637,6 +647,16 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -3429,6 +3449,21 @@ __DEV__ && (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function getSuspendedTreeContext() { + warnIfNotHydrating(); + return null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null; + } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function warnIfNotHydrating() { isHydrating || console.error( @@ -3476,6 +3511,12 @@ __DEV__ && siblings.push(distanceFromLeaf); return distanceFromLeaf; } + function warnIfHydrating() { + isHydrating && + console.error( + "We should not be hydrating here. This is a bug in React. Please file a bug." + ); + } function warnNonHydratedInstance(fiber, rejectedCandidate) { didSuspendOrErrorDEV || ((fiber = buildHydrationDiffNode(fiber, 0)), @@ -3597,6 +3638,7 @@ __DEV__ && for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -3604,8 +3646,6 @@ __DEV__ && case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -3647,20 +3687,26 @@ __DEV__ && ); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) + throw Error( + "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." + ); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -6326,6 +6372,11 @@ __DEV__ && handler ); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -8398,6 +8449,7 @@ __DEV__ && sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -8887,10 +8939,19 @@ __DEV__ && renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -8902,17 +8963,6 @@ __DEV__ && renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -8958,6 +9008,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -9680,23 +9766,24 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2875; - var JSCompiler_object_inline_stack_2876 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2925; + var JSCompiler_object_inline_stack_2926 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var showFallback = !1, - didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2875 = didSuspend) || - (JSCompiler_object_inline_digest_2875 = + var JSCompiler_object_inline_message_2924 = !1; + var didSuspend = 0 !== (workInProgress.flags & 128); + (JSCompiler_object_inline_digest_2925 = didSuspend) || + (JSCompiler_object_inline_digest_2925 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2875 && - ((showFallback = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2875 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2925 && + ((JSCompiler_object_inline_message_2924 = !0), + (workInProgress.flags &= -129)); + JSCompiler_object_inline_digest_2925 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - showFallback + JSCompiler_object_inline_message_2924 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); (current = nextHydratableInstance) @@ -9709,25 +9796,18 @@ __DEV__ && ? renderLanes : null), null !== renderLanes && - (warnIfNotHydrating(), - (workInProgress.memoizedState = { + ((JSCompiler_object_inline_digest_2925 = { dehydrated: renderLanes, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, + treeContext: getSuspendedTreeContext(), retryLane: 536870912, hydrationErrors: null }), - (JSCompiler_object_inline_digest_2875 = createFiber( - 18, - null, - null, - NoMode - )), - (JSCompiler_object_inline_digest_2875.stateNode = renderLanes), - (JSCompiler_object_inline_digest_2875.return = workInProgress), - (workInProgress.child = JSCompiler_object_inline_digest_2875), + (workInProgress.memoizedState = + JSCompiler_object_inline_digest_2925), + (JSCompiler_object_inline_digest_2925 = + createFiberFromDehydratedFragment(renderLanes)), + (JSCompiler_object_inline_digest_2925.return = workInProgress), + (workInProgress.child = JSCompiler_object_inline_digest_2925), (hydrationParentFiber = workInProgress), (nextHydratableInstance = null))) : (renderLanes = null); @@ -9741,29 +9821,26 @@ __DEV__ && : (workInProgress.lanes = 536870912); return null; } - var JSCompiler_object_inline_componentStack_2877 = - JSCompiler_object_inline_stack_2876.children; - var nextFallbackChildren = JSCompiler_object_inline_stack_2876.fallback; - if (showFallback) + var nextPrimaryChildren = JSCompiler_object_inline_stack_2926.children, + nextFallbackChildren = JSCompiler_object_inline_stack_2926.fallback; + if (JSCompiler_object_inline_message_2924) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2876 = + (JSCompiler_object_inline_stack_2926 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_componentStack_2877, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_componentStack_2877 = - workInProgress.child), - (JSCompiler_object_inline_componentStack_2877.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2877.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2875, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2925, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), enableTransitionTracing && ((workInProgress = enableTransitionTracing @@ -9773,307 +9850,271 @@ __DEV__ && ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (renderLanes = - JSCompiler_object_inline_componentStack_2877.updateQueue), + (renderLanes = nextPrimaryChildren.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2877.updateQueue = - { - transitions: workInProgress, - markerInstances: current, - retryQueue: null - }) + ? (nextPrimaryChildren.updateQueue = { + transitions: workInProgress, + markerInstances: current, + retryQueue: null + }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2876 + JSCompiler_object_inline_stack_2926 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2876.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2926.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2876 = + (JSCompiler_object_inline_stack_2926 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_componentStack_2877, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_componentStack_2877 = - workInProgress.child), - (JSCompiler_object_inline_componentStack_2877.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2877.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2875, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2925, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2876 + JSCompiler_object_inline_stack_2926 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_componentStack_2877 + nextPrimaryChildren ); } - var JSCompiler_object_inline_message_2874 = current.memoizedState; - if ( - null !== JSCompiler_object_inline_message_2874 && - ((JSCompiler_object_inline_componentStack_2877 = - JSCompiler_object_inline_message_2874.dehydrated), - null !== JSCompiler_object_inline_componentStack_2877) - ) { - if (didSuspend) - workInProgress.flags & 256 - ? (pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ))) - : null !== workInProgress.memoizedState - ? (reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - (workInProgress = null)) - : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2877 = - JSCompiler_object_inline_stack_2876.fallback), - (nextFallbackChildren = workInProgress.mode), - (JSCompiler_object_inline_stack_2876 = - mountWorkInProgressOffscreenFiber( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2876.children - }, - nextFallbackChildren - )), - (JSCompiler_object_inline_componentStack_2877 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2877, + var prevState = current.memoizedState; + if (null !== prevState) { + var JSCompiler_object_inline_componentStack_2927 = prevState.dehydrated; + if (null !== JSCompiler_object_inline_componentStack_2927) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (nextPrimaryChildren = + JSCompiler_object_inline_stack_2926.fallback), + (nextFallbackChildren = workInProgress.mode), + (JSCompiler_object_inline_stack_2926 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2926.children + }, + nextFallbackChildren + )), + (nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, nextFallbackChildren, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2877.flags |= 2), - (JSCompiler_object_inline_stack_2876.return = workInProgress), - (JSCompiler_object_inline_componentStack_2877.return = - workInProgress), - (JSCompiler_object_inline_stack_2876.sibling = - JSCompiler_object_inline_componentStack_2877), - (workInProgress.child = JSCompiler_object_inline_stack_2876), - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2876 = workInProgress.child), - (JSCompiler_object_inline_stack_2876.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2876.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2875, + (nextPrimaryChildren.flags |= 2), + (JSCompiler_object_inline_stack_2926.return = workInProgress), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2926.sibling = + nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2926), + reconcileChildFibers( + workInProgress, + current.child, + null, renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = - JSCompiler_object_inline_componentStack_2877)); - else if ( - (pushPrimaryTreeSuspenseHandler(workInProgress), - isHydrating && - console.error( - "We should not be hydrating here. This is a bug in React. Please file a bug." - ), - isSuspenseInstanceFallback( - JSCompiler_object_inline_componentStack_2877 - )) - ) { - JSCompiler_object_inline_digest_2875 = - JSCompiler_object_inline_componentStack_2877.nextSibling && - JSCompiler_object_inline_componentStack_2877.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2875) { - nextFallbackChildren = JSCompiler_object_inline_digest_2875.dgst; - var message = JSCompiler_object_inline_digest_2875.msg; - var componentStack = JSCompiler_object_inline_digest_2875.stck; - var componentStack$jscomp$0 = - JSCompiler_object_inline_digest_2875.cstck; - } - JSCompiler_object_inline_message_2874 = message; - JSCompiler_object_inline_digest_2875 = nextFallbackChildren; - JSCompiler_object_inline_stack_2876 = componentStack; - JSCompiler_object_inline_componentStack_2877 = - componentStack$jscomp$0; - nextFallbackChildren = JSCompiler_object_inline_message_2874; - componentStack = JSCompiler_object_inline_componentStack_2877; - JSCompiler_object_inline_componentStack_2877 = nextFallbackChildren - ? Error(nextFallbackChildren) - : Error( - "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ), + (JSCompiler_object_inline_stack_2926 = workInProgress.child), + (JSCompiler_object_inline_stack_2926.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_stack_2926.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2925, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = nextPrimaryChildren)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + warnIfHydrating(), + isSuspenseInstanceFallback( + JSCompiler_object_inline_componentStack_2927 + )) + ) { + JSCompiler_object_inline_digest_2925 = + JSCompiler_object_inline_componentStack_2927.nextSibling && + JSCompiler_object_inline_componentStack_2927.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2925) { + nextPrimaryChildren = JSCompiler_object_inline_digest_2925.dgst; + var message = JSCompiler_object_inline_digest_2925.msg; + nextFallbackChildren = JSCompiler_object_inline_digest_2925.stck; + var componentStack = JSCompiler_object_inline_digest_2925.cstck; + } + JSCompiler_object_inline_message_2924 = message; + JSCompiler_object_inline_digest_2925 = nextPrimaryChildren; + JSCompiler_object_inline_stack_2926 = nextFallbackChildren; + JSCompiler_object_inline_componentStack_2927 = componentStack; + nextPrimaryChildren = JSCompiler_object_inline_message_2924; + nextFallbackChildren = JSCompiler_object_inline_componentStack_2927; + nextPrimaryChildren = nextPrimaryChildren + ? Error(nextPrimaryChildren) + : Error( + "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ); + nextPrimaryChildren.stack = + JSCompiler_object_inline_stack_2926 || ""; + nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2925; + JSCompiler_object_inline_digest_2925 = + void 0 === nextFallbackChildren ? null : nextFallbackChildren; + JSCompiler_object_inline_stack_2926 = { + value: nextPrimaryChildren, + source: null, + stack: JSCompiler_object_inline_digest_2925 + }; + "string" === typeof JSCompiler_object_inline_digest_2925 && + CapturedStacks.set( + nextPrimaryChildren, + JSCompiler_object_inline_stack_2926 ); - JSCompiler_object_inline_componentStack_2877.stack = - JSCompiler_object_inline_stack_2876 || ""; - JSCompiler_object_inline_componentStack_2877.digest = - JSCompiler_object_inline_digest_2875; - JSCompiler_object_inline_digest_2875 = - void 0 === componentStack ? null : componentStack; - JSCompiler_object_inline_stack_2876 = { - value: JSCompiler_object_inline_componentStack_2877, - source: null, - stack: JSCompiler_object_inline_digest_2875 - }; - "string" === typeof JSCompiler_object_inline_digest_2875 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_2877, - JSCompiler_object_inline_stack_2876 - ); - queueHydrationError(JSCompiler_object_inline_stack_2876); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else if ( - (didReceiveUpdate || - propagateParentContextChanges( + queueHydrationError(JSCompiler_object_inline_stack_2926); + workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, - renderLanes, - !1 - ), - (JSCompiler_object_inline_digest_2875 = - 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2875) - ) { - JSCompiler_object_inline_digest_2875 = workInProgressRoot; - if ( - null !== JSCompiler_object_inline_digest_2875 && - ((JSCompiler_object_inline_stack_2876 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2876 = - 0 !== (JSCompiler_object_inline_stack_2876 & 42) - ? 1 - : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2876 - )), - (JSCompiler_object_inline_stack_2876 = - 0 !== - (JSCompiler_object_inline_stack_2876 & - (JSCompiler_object_inline_digest_2875.suspendedLanes | - renderLanes)) - ? 0 - : JSCompiler_object_inline_stack_2876), - 0 !== JSCompiler_object_inline_stack_2876 && - JSCompiler_object_inline_stack_2876 !== - JSCompiler_object_inline_message_2874.retryLane) - ) - throw ( - ((JSCompiler_object_inline_message_2874.retryLane = - JSCompiler_object_inline_stack_2876), - enqueueConcurrentRenderForLane( - current, - JSCompiler_object_inline_stack_2876 - ), - scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2875, - current, - JSCompiler_object_inline_stack_2876 - ), - SelectiveHydrationException) + renderLanes ); - JSCompiler_object_inline_componentStack_2877.data === - SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else - JSCompiler_object_inline_componentStack_2877.data === - SUSPENSE_PENDING_START_DATA - ? ((workInProgress.flags |= 192), - (workInProgress.child = current.child), - (workInProgress = null)) - : ((current = JSCompiler_object_inline_message_2874.treeContext), - (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_componentStack_2877.nextSibling - )), - (hydrationParentFiber = workInProgress), - (isHydrating = !0), - (hydrationErrors = null), - (didSuspendOrErrorDEV = !1), - (hydrationDiffRootDEV = null), - (rootOrSingletonContext = !1), - null !== current && - (warnIfNotHydrating(), - (idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), - (workInProgress = mountSuspensePrimaryChildren( + } else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - JSCompiler_object_inline_stack_2876.children + renderLanes, + !1 + ), + (JSCompiler_object_inline_digest_2925 = + 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_object_inline_digest_2925) + ) { + JSCompiler_object_inline_digest_2925 = workInProgressRoot; + if ( + null !== JSCompiler_object_inline_digest_2925 && + ((JSCompiler_object_inline_stack_2926 = getBumpedLaneForHydration( + JSCompiler_object_inline_digest_2925, + renderLanes )), - (workInProgress.flags |= 4096)); - return workInProgress; + 0 !== JSCompiler_object_inline_stack_2926 && + JSCompiler_object_inline_stack_2926 !== prevState.retryLane) + ) + throw ( + ((prevState.retryLane = JSCompiler_object_inline_stack_2926), + enqueueConcurrentRenderForLane( + current, + JSCompiler_object_inline_stack_2926 + ), + scheduleUpdateOnFiber( + JSCompiler_object_inline_digest_2925, + current, + JSCompiler_object_inline_stack_2926 + ), + SelectiveHydrationException) + ); + JSCompiler_object_inline_componentStack_2927.data === + SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + JSCompiler_object_inline_componentStack_2927.data === + SUSPENSE_PENDING_START_DATA + ? ((workInProgress.flags |= 192), + (workInProgress.child = current.child), + (workInProgress = null)) + : ((current = prevState.treeContext), + (nextHydratableInstance = getNextHydratable( + JSCompiler_object_inline_componentStack_2927.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== current && + restoreSuspendedTreeContext(workInProgress, current), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + JSCompiler_object_inline_stack_2926.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; + } } - if (showFallback) + if (JSCompiler_object_inline_message_2924) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2877 = - JSCompiler_object_inline_stack_2876.fallback), + (nextPrimaryChildren = JSCompiler_object_inline_stack_2926.fallback), (nextFallbackChildren = workInProgress.mode), (componentStack = current.child), - (componentStack$jscomp$0 = componentStack.sibling), - (JSCompiler_object_inline_stack_2876 = createWorkInProgress( + (JSCompiler_object_inline_componentStack_2927 = + componentStack.sibling), + (JSCompiler_object_inline_stack_2926 = createWorkInProgress( componentStack, { mode: "hidden", - children: JSCompiler_object_inline_stack_2876.children + children: JSCompiler_object_inline_stack_2926.children } )), - (JSCompiler_object_inline_stack_2876.subtreeFlags = + (JSCompiler_object_inline_stack_2926.subtreeFlags = componentStack.subtreeFlags & 65011712), - null !== componentStack$jscomp$0 - ? (JSCompiler_object_inline_componentStack_2877 = - createWorkInProgress( - componentStack$jscomp$0, - JSCompiler_object_inline_componentStack_2877 - )) - : ((JSCompiler_object_inline_componentStack_2877 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2877, - nextFallbackChildren, - renderLanes, - null - )), - (JSCompiler_object_inline_componentStack_2877.flags |= 2)), - (JSCompiler_object_inline_componentStack_2877.return = - workInProgress), - (JSCompiler_object_inline_stack_2876.return = workInProgress), - (JSCompiler_object_inline_stack_2876.sibling = - JSCompiler_object_inline_componentStack_2877), - (workInProgress.child = JSCompiler_object_inline_stack_2876), - (JSCompiler_object_inline_stack_2876 = - JSCompiler_object_inline_componentStack_2877), - (JSCompiler_object_inline_componentStack_2877 = workInProgress.child), + null !== JSCompiler_object_inline_componentStack_2927 + ? (nextPrimaryChildren = createWorkInProgress( + JSCompiler_object_inline_componentStack_2927, + nextPrimaryChildren + )) + : ((nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, + nextFallbackChildren, + renderLanes, + null + )), + (nextPrimaryChildren.flags |= 2)), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2926.return = workInProgress), + (JSCompiler_object_inline_stack_2926.sibling = nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2926), + (JSCompiler_object_inline_stack_2926 = nextPrimaryChildren), + (nextPrimaryChildren = workInProgress.child), (nextFallbackChildren = current.child.memoizedState), null === nextFallbackChildren ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) : ((componentStack = nextFallbackChildren.cachePool), null !== componentStack - ? ((componentStack$jscomp$0 = CacheContext._currentValue), + ? ((JSCompiler_object_inline_componentStack_2927 = + CacheContext._currentValue), (componentStack = - componentStack.parent !== componentStack$jscomp$0 + componentStack.parent !== + JSCompiler_object_inline_componentStack_2927 ? { - parent: componentStack$jscomp$0, - pool: componentStack$jscomp$0 + parent: JSCompiler_object_inline_componentStack_2927, + pool: JSCompiler_object_inline_componentStack_2927 } : componentStack)) : (componentStack = getSuspendedCache()), @@ -10081,8 +10122,7 @@ __DEV__ && baseLanes: nextFallbackChildren.baseLanes | renderLanes, cachePool: componentStack })), - (JSCompiler_object_inline_componentStack_2877.memoizedState = - nextFallbackChildren), + (nextPrimaryChildren.memoizedState = nextFallbackChildren), enableTransitionTracing && ((nextFallbackChildren = enableTransitionTracing ? transitionStack.current @@ -10091,54 +10131,52 @@ __DEV__ && ((componentStack = enableTransitionTracing ? markerInstanceStack.current : null), - (componentStack$jscomp$0 = - JSCompiler_object_inline_componentStack_2877.updateQueue), - (JSCompiler_object_inline_message_2874 = current.updateQueue), - null === componentStack$jscomp$0 - ? (JSCompiler_object_inline_componentStack_2877.updateQueue = { + (JSCompiler_object_inline_componentStack_2927 = + nextPrimaryChildren.updateQueue), + (JSCompiler_object_inline_message_2924 = current.updateQueue), + null === JSCompiler_object_inline_componentStack_2927 + ? (nextPrimaryChildren.updateQueue = { transitions: nextFallbackChildren, markerInstances: componentStack, retryQueue: null }) - : componentStack$jscomp$0 === - JSCompiler_object_inline_message_2874 - ? (JSCompiler_object_inline_componentStack_2877.updateQueue = - { - transitions: nextFallbackChildren, - markerInstances: componentStack, - retryQueue: - null !== JSCompiler_object_inline_message_2874 - ? JSCompiler_object_inline_message_2874.retryQueue - : null - }) - : ((componentStack$jscomp$0.transitions = + : JSCompiler_object_inline_componentStack_2927 === + JSCompiler_object_inline_message_2924 + ? (nextPrimaryChildren.updateQueue = { + transitions: nextFallbackChildren, + markerInstances: componentStack, + retryQueue: + null !== JSCompiler_object_inline_message_2924 + ? JSCompiler_object_inline_message_2924.retryQueue + : null + }) + : ((JSCompiler_object_inline_componentStack_2927.transitions = nextFallbackChildren), - (componentStack$jscomp$0.markerInstances = + (JSCompiler_object_inline_componentStack_2927.markerInstances = componentStack)))), - (JSCompiler_object_inline_componentStack_2877.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2875, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2925, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2876 + JSCompiler_object_inline_stack_2926 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2876.children + children: JSCompiler_object_inline_stack_2926.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2875 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2875 + ((JSCompiler_object_inline_digest_2925 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2925 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2875.push(current)); + : JSCompiler_object_inline_digest_2925.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10505,6 +10543,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -11267,69 +11313,160 @@ __DEV__ && return workInProgress.child; case 31: var nextProps$jscomp$1 = workInProgress.pendingProps, - hiddenProp = nextProps$jscomp$1.hidden; - void 0 !== hiddenProp && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === hiddenProp - ? "hidden" - : !1 === hiddenProp - ? "hidden={false}" - : "hidden={...}", - hiddenProp ? 'mode="hidden"' : 'mode="visible"' - ); - var mode = workInProgress.mode, - offscreenChildProps = { - mode: nextProps$jscomp$1.mode, - children: nextProps$jscomp$1.children - }; - if (null === current) { + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) if (isHydrating) { - var nextInstance$jscomp$1 = nextHydratableInstance; - if (nextInstance$jscomp$1) { - var hydratableInstance = canHydrateHydrationBoundary( - nextInstance$jscomp$1, - rootOrSingletonContext - ); - var activityInstance = - null !== hydratableInstance && - hydratableInstance.data === ACTIVITY_START_DATA - ? hydratableInstance - : null; - null !== activityInstance && - ((workInProgress.stateNode = activityInstance), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - activityInstance.nextSibling - ))); - var JSCompiler_temp$jscomp$2 = activityInstance; - } else JSCompiler_temp$jscomp$2 = null; - if (null === JSCompiler_temp$jscomp$2) - throw ( - (warnNonHydratedInstance( + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, + rootOrSingletonContext + ); + var activityInstance = + null !== hydratableInstance && + hydratableInstance.data === ACTIVITY_START_DATA + ? hydratableInstance + : null; + if (null !== activityInstance) { + var activityState = { + dehydrated: activityInstance, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }; + workInProgress.memoizedState = activityState; + var dehydratedFragment = + createFiberFromDehydratedFragment(activityInstance); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$2 = activityInstance; + } else JSCompiler_temp$jscomp$2 = null; + if (null === JSCompiler_temp$jscomp$2) + throw ( + (warnNonHydratedInstance( + workInProgress, + nextInstance$jscomp$1 + ), + throwOnHydrationMismatch(workInProgress)) + ); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$3 = null; + } else + JSCompiler_inline_result$jscomp$3 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var activityInstance$jscomp$0 = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$4 = null); + else + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + else { + warnIfHydrating(); + didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - nextInstance$jscomp$1 - ), - throwOnHydrationMismatch(workInProgress)) - ); + renderLanes, + !1 + ); + var hasContextChanged = + 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged) { + var root = workInProgressRoot; + if (null !== root) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = + attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + activityInstance$jscomp$0.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + didSuspendOrErrorDEV = !1; + hydrationDiffRootDEV = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$4 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$3 = + JSCompiler_inline_result$jscomp$4; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment$jscomp$0; } - var primaryChildFragment = mountWorkInProgressOffscreenFiber( - offscreenChildProps, - mode - ); - primaryChildFragment.ref = workInProgress.ref; - workInProgress.child = primaryChildFragment; - primaryChildFragment.return = workInProgress; - var JSCompiler_inline_result$jscomp$3 = primaryChildFragment; - } else { - var _primaryChildFragment = createWorkInProgress( - current.child, - offscreenChildProps - ); - _primaryChildFragment.ref = workInProgress.ref; - workInProgress.child = _primaryChildFragment; - _primaryChildFragment.return = workInProgress; - JSCompiler_inline_result$jscomp$3 = _primaryChildFragment; } return JSCompiler_inline_result$jscomp$3; case 22: @@ -11353,12 +11490,12 @@ __DEV__ && var cacheFromPool = peekCacheFromPool(); if (null !== cacheFromPool) var freshCache = cacheFromPool; else { - var root = workInProgressRoot, + var root$jscomp$0 = workInProgressRoot, freshCache$jscomp$0 = createCache(); - root.pooledCache = freshCache$jscomp$0; + root$jscomp$0.pooledCache = freshCache$jscomp$0; retainCache(freshCache$jscomp$0); null !== freshCache$jscomp$0 && - (root.pooledCacheLanes |= renderLanes); + (root$jscomp$0.pooledCacheLanes |= renderLanes); freshCache = freshCache$jscomp$0; } workInProgress.memoizedState = { @@ -11372,9 +11509,9 @@ __DEV__ && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()); - var prevState$jscomp$0 = current.memoizedState, + var prevState$jscomp$1 = current.memoizedState, nextState$jscomp$0 = workInProgress.memoizedState; - if (prevState$jscomp$0.parent !== parentCache) { + if (prevState$jscomp$1.parent !== parentCache) { var derivedState = { parent: parentCache, cache: parentCache }; workInProgress.memoizedState = derivedState; 0 === workInProgress.lanes && @@ -11385,7 +11522,7 @@ __DEV__ && } else { var nextCache$jscomp$0 = nextState$jscomp$0.cache; pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); - nextCache$jscomp$0 !== prevState$jscomp$0.cache && + nextCache$jscomp$0 !== prevState$jscomp$1.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -11434,9 +11571,9 @@ __DEV__ && nextProps$jscomp$2.children, renderLanes ); - var JSCompiler_inline_result$jscomp$4 = workInProgress.child; - } else JSCompiler_inline_result$jscomp$4 = null; - return JSCompiler_inline_result$jscomp$4; + var JSCompiler_inline_result$jscomp$5 = workInProgress.child; + } else JSCompiler_inline_result$jscomp$5 = null; + return JSCompiler_inline_result$jscomp$5; } break; case 30: @@ -12111,11 +12248,62 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) + throw Error( + "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue." + ); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + } else + emitPendingHydrationWarnings(), + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -12123,23 +12311,25 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) + if (!nextResource) throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." ); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - type[internalInstanceKey] = workInProgress; + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -12147,11 +12337,11 @@ __DEV__ && emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= @@ -12441,6 +12631,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (workInProgress.mode & ProfileMode) !== NoMode && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -12519,6 +12725,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -13736,16 +13946,19 @@ __DEV__ && } } function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && - 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && + 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { root = root.containerInfo; @@ -14158,6 +14371,11 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -14725,6 +14943,35 @@ __DEV__ && popComponentEffectDuration(prevEffectDuration); componentEffectErrors = prevEffectErrors; } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + runWithFiberInDEV( + finishedWork, + commitHydratedActivityInstance, + current + ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -14757,6 +15004,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -15184,6 +15432,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -15770,6 +16027,16 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -16149,6 +16416,41 @@ __DEV__ && endTime ); break; + case 31: + flags = inHydratedSubtree; + enableComponentPerformanceTrack && + ((isViewTransitionEligible = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null), + (prevProfilerEffectDuration = finishedWork.memoizedState), + null !== isViewTransitionEligible && + null === prevProfilerEffectDuration + ? ((prevProfilerEffectDuration = finishedWork.deletions), + null !== prevProfilerEffectDuration && + 0 < prevProfilerEffectDuration.length && + 18 === prevProfilerEffectDuration[0].tag + ? ((inHydratedSubtree = !1), + (isViewTransitionEligible = + isViewTransitionEligible.hydrationErrors), + null !== isViewTransitionEligible && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime, + isViewTransitionEligible + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1)); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + enableComponentPerformanceTrack && (inHydratedSubtree = flags); + break; case 13: flags = inHydratedSubtree; enableComponentPerformanceTrack && @@ -19236,6 +19538,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -19910,6 +20213,11 @@ __DEV__ && content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -20146,12 +20454,21 @@ __DEV__ && (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } + function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } + } function getCurrentFiberForDevTools() { return current; } @@ -24792,6 +25109,9 @@ __DEV__ && function commitHydratedContainer(container) { retryIfBlockedOn(container); } + function commitHydratedActivityInstance(activityInstance) { + retryIfBlockedOn(activityInstance); + } function commitHydratedSuspenseInstance(suspenseInstance) { retryIfBlockedOn(suspenseInstance); } @@ -25841,22 +26161,22 @@ __DEV__ && ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane( - nearestMounted, - lane - ); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -26139,6 +26459,7 @@ __DEV__ && } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -26184,8 +26505,11 @@ __DEV__ && targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -30376,11 +30700,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-www-modern-17f88c80-20250422" !== isomorphicReactPackageVersion) + if ("19.2.0-www-modern-3ef31d19-20250422" !== 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.2.0-www-modern-17f88c80-20250422\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-www-modern-3ef31d19-20250422\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -30423,10 +30747,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.2.0-www-modern-17f88c80-20250422", + version: "19.2.0-www-modern-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -31024,7 +31348,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-www-modern-17f88c80-20250422"; + exports.version = "19.2.0-www-modern-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index 634d3632f4..078cf29ed9 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -87,6 +87,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -476,6 +486,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -1783,6 +1801,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -1883,6 +1909,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -1890,8 +1917,6 @@ function popToNextHostParent(fiber) { case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -1917,20 +1942,23 @@ function popHydrationState(fiber) { if (!fiber) throw Error(formatProdErrorMessage(317)); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -3723,6 +3751,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? push(suspenseHandlerStackCursor, handler) : push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -5488,6 +5521,7 @@ function throwException( sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -5725,10 +5759,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$94 = workInProgress.stateNode; + root$93 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$94.incompleteTransitions.has(transition)) { + if (!root$93.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5736,11 +5770,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$94.incompleteTransitions.set(transition, markerInstance); + root$93.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$94.incompleteTransitions.forEach(function (markerInstance) { + root$93.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5917,10 +5951,19 @@ function updateOffscreenComponent( renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -5930,17 +5973,6 @@ function updateOffscreenComponent( renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -5983,6 +6015,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6460,8 +6514,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { retryLane: 536870912, hydrationErrors: null }), - (renderLanes = createFiber(18, null, null, 0)), - (renderLanes.stateNode = current), + (renderLanes = createFiberFromDehydratedFragment(current)), (renderLanes.return = workInProgress), (workInProgress.child = renderLanes), (hydrationParentFiber = workInProgress), @@ -6558,14 +6611,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -6617,15 +6670,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -6654,12 +6699,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, current), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -6671,14 +6711,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), - (nextProps = createWorkInProgress(showFallback, { + (showFallback = workInProgress.mode), + (nextFallbackChildren = current.child), + (digest = nextFallbackChildren.sibling), + (nextProps = createWorkInProgress(nextFallbackChildren, { mode: "hidden", children: nextProps.children })), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712), + (nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -6686,7 +6726,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -6697,46 +6737,46 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (nextFallbackChildren = current.child.memoizedState), - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (nextFallbackChildren = + nextFallbackChildren.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })), - (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.memoizedState = showFallback), enableTransitionTracing && - ((nextFallbackChildren = enableTransitionTracing + ((showFallback = enableTransitionTracing ? transitionStack.current : null), - null !== nextFallbackChildren && - ((showFallback = enableTransitionTracing + null !== showFallback && + ((nextFallbackChildren = enableTransitionTracing ? markerInstanceStack.current : null), (digest = nextPrimaryChildren.updateQueue), (didSuspend = current.updateQueue), null === digest ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null }) : digest === didSuspend ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null !== didSuspend ? didSuspend.retryQueue : null }) - : ((digest.transitions = nextFallbackChildren), - (digest.markerInstances = showFallback)))), + : ((digest.transitions = showFallback), + (digest.markerInstances = nextFallbackChildren)))), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7003,10 +7043,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$118 = workInProgress.memoizedState; + if (null !== state$118) { + if (null !== state$118.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -7026,17 +7074,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$118 = 0 !== (renderLanes & workInProgress.childLanes); + state$118 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$118 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$118) return updateSuspenseListComponent( current, workInProgress, @@ -7050,7 +7098,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$118) break; else return null; case 22: return ( @@ -7067,8 +7115,8 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 25: if (enableTransitionTracing) { - state = workInProgress.stateNode; - null !== state && pushMarkerInstance(workInProgress, state); + state$118 = workInProgress.stateNode; + null !== state$118 && pushMarkerInstance(workInProgress, state$118); break; } case 23: @@ -7115,112 +7163,129 @@ function beginWork(current, workInProgress, renderLanes) { switch (workInProgress.tag) { case 16: a: { - var props = workInProgress.pendingProps; - current = workInProgress.elementType; - var init = current._init; - current = init(current._payload); - workInProgress.type = current; - if ("function" === typeof current) - shouldConstruct(current) - ? ((props = resolveClassComponentProps(current, props, !1)), - (workInProgress.tag = 1), - (workInProgress = updateClassComponent( - null, - workInProgress, - current, - props, - renderLanes - ))) - : ((props = disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(current, props)), - (workInProgress.tag = 0), - (workInProgress = updateFunctionComponent( - null, - workInProgress, - current, - props, - renderLanes - ))); + var props = workInProgress.pendingProps, + lazyComponent = workInProgress.elementType, + init = lazyComponent._init; + var Component = init(lazyComponent._payload); + workInProgress.type = Component; + if ("function" === typeof Component) + if (shouldConstruct(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props, + !1 + ); + workInProgress.tag = 1; + var JSCompiler_inline_result = updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + var resolvedProps$98 = disableDefaultPropsExceptForClasses + ? props + : resolveDefaultPropsOnNonClassComponent(Component, props); + workInProgress.tag = 0; + JSCompiler_inline_result = updateFunctionComponent( + null, + workInProgress, + Component, + resolvedProps$98, + renderLanes + ); + } else { - if (void 0 !== current && null !== current) - if (((init = current.$$typeof), init === REACT_FORWARD_REF_TYPE)) { - props = disableDefaultPropsExceptForClasses + if (void 0 !== Component && null !== Component) { + var $$typeof = Component.$$typeof; + if ($$typeof === REACT_FORWARD_REF_TYPE) { + var resolvedProps$99 = disableDefaultPropsExceptForClasses ? props - : resolveDefaultPropsOnNonClassComponent(current, props); + : resolveDefaultPropsOnNonClassComponent(Component, props); workInProgress.tag = 11; - workInProgress = updateForwardRef( + JSCompiler_inline_result = updateForwardRef( null, workInProgress, - current, - props, + Component, + resolvedProps$99, renderLanes ); break a; - } else if (init === REACT_MEMO_TYPE) { - props = disableDefaultPropsExceptForClasses + } else if ($$typeof === REACT_MEMO_TYPE) { + var resolvedProps$100 = disableDefaultPropsExceptForClasses ? props - : resolveDefaultPropsOnNonClassComponent(current, props); + : resolveDefaultPropsOnNonClassComponent(Component, props); workInProgress.tag = 14; - workInProgress = updateMemoComponent( + JSCompiler_inline_result = updateMemoComponent( null, workInProgress, - current, + Component, disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(current.type, props), + ? resolvedProps$100 + : resolveDefaultPropsOnNonClassComponent( + Component.type, + resolvedProps$100 + ), renderLanes ); break a; } - workInProgress = getComponentNameFromType(current) || current; - throw Error(formatProdErrorMessage(306, workInProgress, "")); + } + var loggedComponent = + getComponentNameFromType(Component) || Component; + throw Error(formatProdErrorMessage(306, loggedComponent, "")); } } - return workInProgress; + return JSCompiler_inline_result; case 0: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = + var Component$jscomp$0 = workInProgress.type, + unresolvedProps = workInProgress.pendingProps, + resolvedProps$jscomp$0 = disableDefaultPropsExceptForClasses || - workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateFunctionComponent( - current, - workInProgress, - props, - init, - renderLanes - ) + workInProgress.elementType === Component$jscomp$0 + ? unresolvedProps + : resolveDefaultPropsOnNonClassComponent( + Component$jscomp$0, + unresolvedProps + ); + return updateFunctionComponent( + current, + workInProgress, + Component$jscomp$0, + resolvedProps$jscomp$0, + renderLanes ); case 1: - return ( - (props = workInProgress.type), - (init = resolveClassComponentProps( - props, + var Component$120 = workInProgress.type, + resolvedProps$122 = resolveClassComponentProps( + Component$120, workInProgress.pendingProps, - workInProgress.elementType === props - )), - updateClassComponent(current, workInProgress, props, init, renderLanes) + workInProgress.elementType === Component$120 + ); + return updateClassComponent( + current, + workInProgress, + Component$120, + resolvedProps$122, + renderLanes ); case 3: a: { pushHostRootContext(workInProgress); if (null === current) throw Error(formatProdErrorMessage(387)); - props = workInProgress.pendingProps; - var prevState = workInProgress.memoizedState; - init = prevState.element; + var nextProps = workInProgress.pendingProps, + prevState = workInProgress.memoizedState, + prevChildren = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, props, null, renderLanes); + processUpdateQueue(workInProgress, nextProps, null, renderLanes); var nextState = workInProgress.memoizedState; enableTransitionTracing && push(transitionStack, workInProgressTransitions); enableTransitionTracing && pushRootMarkerInstance(workInProgress); - props = nextState.cache; - pushProvider(workInProgress, CacheContext, props); - props !== prevState.cache && + var nextCache = nextState.cache; + pushProvider(workInProgress, CacheContext, nextCache); + nextCache !== prevState.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -7228,233 +7293,259 @@ function beginWork(current, workInProgress, renderLanes) { !0 ); suspendIfUpdateReadFromEntangledAsyncAction(); - props = nextState.element; - if (prevState.isDehydrated) - if ( - ((prevState = { - element: props, - isDehydrated: !1, - cache: nextState.cache - }), - (workInProgress.updateQueue.baseState = prevState), - (workInProgress.memoizedState = prevState), - workInProgress.flags & 256) - ) { - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - props, - renderLanes - ); + var nextChildren = nextState.element; + if (prevState.isDehydrated) { + var overrideState = { + element: nextChildren, + isDehydrated: !1, + cache: nextState.cache + }; + workInProgress.updateQueue.baseState = overrideState; + workInProgress.memoizedState = overrideState; + if (workInProgress.flags & 256) { + var JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; - } else if (props !== init) { - init = createCapturedValueAtFiber( + } else if (nextChildren !== prevChildren) { + var recoverableError = createCapturedValueAtFiber( Error(formatProdErrorMessage(424)), workInProgress ); - queueHydrationError(init); - workInProgress = mountHostRootWithoutHydrating( + queueHydrationError(recoverableError); + JSCompiler_inline_result$jscomp$0 = mountHostRootWithoutHydrating( current, workInProgress, - props, + nextChildren, renderLanes ); break a; } else { - current = workInProgress.stateNode.containerInfo; - switch (current.nodeType) { + var parentContainer = workInProgress.stateNode.containerInfo; + switch (parentContainer.nodeType) { case 9: - current = current.body; + var parentElement = parentContainer.body; break; default: - current = - "HTML" === current.nodeName - ? current.ownerDocument.body - : current; + parentElement = + "HTML" === parentContainer.nodeName + ? parentContainer.ownerDocument.body + : parentContainer; } - nextHydratableInstance = getNextHydratable(current.firstChild); + nextHydratableInstance = getNextHydratable( + parentElement.firstChild + ); hydrationParentFiber = workInProgress; isHydrating = !0; hydrationErrors = null; rootOrSingletonContext = !0; - renderLanes = mountChildFibers( - workInProgress, - null, - props, - renderLanes - ); - for (workInProgress.child = renderLanes; renderLanes; ) - (renderLanes.flags = (renderLanes.flags & -3) | 4096), - (renderLanes = renderLanes.sibling); + for ( + var child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderLanes + ), + node = (workInProgress.child = child); + node; + + ) + (node.flags = (node.flags & -3) | 4096), (node = node.sibling); } - else { + } else { resetHydrationState(); - if (props === init) { - workInProgress = bailoutOnAlreadyFinishedWork( + if (nextChildren === prevChildren) { + JSCompiler_inline_result$jscomp$0 = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes ); break a; } - reconcileChildren(current, workInProgress, props, renderLanes); + reconcileChildren(current, workInProgress, nextChildren, renderLanes); } - workInProgress = workInProgress.child; + JSCompiler_inline_result$jscomp$0 = workInProgress.child; } - return workInProgress; + return JSCompiler_inline_result$jscomp$0; case 26: - return ( - markRef(current, workInProgress), - null === current - ? (renderLanes = getResource( - workInProgress.type, - null, - workInProgress.pendingProps, - null - )) - ? (workInProgress.memoizedState = renderLanes) - : isHydrating || - ((renderLanes = workInProgress.type), - (current = workInProgress.pendingProps), - (props = getOwnerDocumentFromRootContainer( - rootInstanceStackCursor.current - ).createElement(renderLanes)), - (props[internalInstanceKey] = workInProgress), - (props[internalPropsKey] = current), - setInitialProperties(props, renderLanes, current), - markNodeAsHoistable(props), - (workInProgress.stateNode = props)) - : (workInProgress.memoizedState = getResource( - workInProgress.type, - current.memoizedProps, - workInProgress.pendingProps, - current.memoizedState - )), - null - ); - case 27: - return ( - pushHostContext(workInProgress), - null === current && - isHydrating && - ((props = workInProgress.stateNode = - resolveSingletonInstance( - workInProgress.type, - workInProgress.pendingProps, + markRef(current, workInProgress); + if (null === current) { + var resource = getResource( + workInProgress.type, + null, + workInProgress.pendingProps, + null + ); + if (resource) workInProgress.memoizedState = resource; + else if (!isHydrating) { + var type = workInProgress.type, + props$jscomp$0 = workInProgress.pendingProps, + domElement = getOwnerDocumentFromRootContainer( rootInstanceStackCursor.current - )), - (hydrationParentFiber = workInProgress), - (rootOrSingletonContext = !0), - (init = nextHydratableInstance), - isSingletonScope(workInProgress.type) - ? ((previousHydratableOnEnteringScopedSingleton = init), - (nextHydratableInstance = getNextHydratable(props.firstChild))) - : (nextHydratableInstance = init)), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - markRef(current, workInProgress), - null === current && (workInProgress.flags |= 4194304), - workInProgress.child + ).createElement(type); + domElement[internalInstanceKey] = workInProgress; + domElement[internalPropsKey] = props$jscomp$0; + setInitialProperties(domElement, type, props$jscomp$0); + markNodeAsHoistable(domElement); + workInProgress.stateNode = domElement; + } + } else + workInProgress.memoizedState = getResource( + workInProgress.type, + current.memoizedProps, + workInProgress.pendingProps, + current.memoizedState + ); + return null; + case 27: + pushHostContext(workInProgress); + if (null === current && isHydrating) { + var instance = (workInProgress.stateNode = resolveSingletonInstance( + workInProgress.type, + workInProgress.pendingProps, + rootInstanceStackCursor.current + )); + hydrationParentFiber = workInProgress; + rootOrSingletonContext = !0; + var currentHydratableInstance = nextHydratableInstance; + isSingletonScope(workInProgress.type) + ? ((previousHydratableOnEnteringScopedSingleton = + currentHydratableInstance), + (nextHydratableInstance = getNextHydratable(instance.firstChild))) + : (nextHydratableInstance = currentHydratableInstance); + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + markRef(current, workInProgress); + null === current && (workInProgress.flags |= 4194304); + return workInProgress.child; case 5: if (null === current && isHydrating) { - if ((init = props = nextHydratableInstance)) - (props = canHydrateInstance( - props, + var nextInstance = nextHydratableInstance, + JSCompiler_temp; + if ((JSCompiler_temp = nextInstance)) { + var instance$jscomp$0 = canHydrateInstance( + nextInstance, workInProgress.type, workInProgress.pendingProps, rootOrSingletonContext - )), - null !== props - ? ((workInProgress.stateNode = props), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable(props.firstChild)), - (rootOrSingletonContext = !1), - (init = !0)) - : (init = !1); - init || throwOnHydrationMismatch(workInProgress); + ); + null !== instance$jscomp$0 + ? ((workInProgress.stateNode = instance$jscomp$0), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + instance$jscomp$0.firstChild + )), + (rootOrSingletonContext = !1), + (JSCompiler_temp = !0)) + : (JSCompiler_temp = !1); + } + JSCompiler_temp || throwOnHydrationMismatch(workInProgress); } pushHostContext(workInProgress); - init = workInProgress.type; - prevState = workInProgress.pendingProps; - nextState = null !== current ? current.memoizedProps : null; - props = prevState.children; - shouldSetTextContent(init, prevState) - ? (props = null) - : null !== nextState && - shouldSetTextContent(init, nextState) && + var type$jscomp$0 = workInProgress.type, + nextProps$jscomp$0 = workInProgress.pendingProps, + prevProps = null !== current ? current.memoizedProps : null, + nextChildren$jscomp$0 = nextProps$jscomp$0.children; + shouldSetTextContent(type$jscomp$0, nextProps$jscomp$0) + ? (nextChildren$jscomp$0 = null) + : null !== prevProps && + shouldSetTextContent(type$jscomp$0, prevProps) && (workInProgress.flags |= 32); - null !== workInProgress.memoizedState && - ((init = renderWithHooks( + if (null !== workInProgress.memoizedState) { + var newState = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, null, null, renderLanes - )), - (HostTransitionContext._currentValue = init)); + ); + HostTransitionContext._currentValue = newState; + } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, props, renderLanes); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$0, + renderLanes + ); return workInProgress.child; case 6: if (null === current && isHydrating) { - if ((current = renderLanes = nextHydratableInstance)) - (renderLanes = canHydrateTextInstance( - renderLanes, + var nextInstance$jscomp$0 = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if ((JSCompiler_temp$jscomp$0 = nextInstance$jscomp$0)) { + var textInstance = canHydrateTextInstance( + nextInstance$jscomp$0, workInProgress.pendingProps, rootOrSingletonContext - )), - null !== renderLanes - ? ((workInProgress.stateNode = renderLanes), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null), - (current = !0)) - : (current = !1); - current || throwOnHydrationMismatch(workInProgress); + ); + null !== textInstance + ? ((workInProgress.stateNode = textInstance), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (JSCompiler_temp$jscomp$0 = !0)) + : (JSCompiler_temp$jscomp$0 = !1); + } + JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(workInProgress); } return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - return ( - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ), - (props = workInProgress.pendingProps), - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - props, - renderLanes - )) - : reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + var nextChildren$jscomp$1 = workInProgress.pendingProps; + null === current + ? (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren$jscomp$1, + renderLanes + )) + : reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$1, + renderLanes + ); + return workInProgress.child; case 11: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = + var type$jscomp$1 = workInProgress.type, + unresolvedProps$123 = workInProgress.pendingProps, + resolvedProps$124 = disableDefaultPropsExceptForClasses || - workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateForwardRef(current, workInProgress, props, init, renderLanes) + workInProgress.elementType === type$jscomp$1 + ? unresolvedProps$123 + : resolveDefaultPropsOnNonClassComponent( + type$jscomp$1, + unresolvedProps$123 + ); + return updateForwardRef( + current, + workInProgress, + type$jscomp$1, + resolvedProps$124, + renderLanes ); case 7: - return ( - (props = workInProgress.pendingProps), - enableFragmentRefs && markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child + var nextChildren$jscomp$2 = workInProgress.pendingProps; + enableFragmentRefs && markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$2, + renderLanes ); + return workInProgress.child; case 8: return ( reconcileChildren( @@ -7476,42 +7567,53 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - return ( - (props = workInProgress.pendingProps), - pushProvider( - workInProgress, - enableRenderableContext - ? workInProgress.type - : workInProgress.type._context, - props.value - ), - reconcileChildren(current, workInProgress, props.children, renderLanes), - workInProgress.child + var newProps = workInProgress.pendingProps; + pushProvider( + workInProgress, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, + newProps.value ); + reconcileChildren( + current, + workInProgress, + newProps.children, + renderLanes + ); + return workInProgress.child; case 9: - return ( - (init = enableRenderableContext - ? workInProgress.type._context - : workInProgress.type), - (props = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress), - (init = readContext(init)), - (props = props(init)), - (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); + var context = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type; + var render = workInProgress.pendingProps.children; + prepareToReadContext(workInProgress); + var newValue = readContext(context); + var newChildren = render(newValue); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, newChildren, renderLanes); + return workInProgress.child; case 14: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) + var type$125 = workInProgress.type, + unresolvedProps$126 = workInProgress.pendingProps, + resolvedProps$127 = disableDefaultPropsExceptForClasses + ? unresolvedProps$126 + : resolveDefaultPropsOnNonClassComponent( + type$125, + unresolvedProps$126 + ); + resolvedProps$127 = disableDefaultPropsExceptForClasses + ? resolvedProps$127 + : resolveDefaultPropsOnNonClassComponent( + type$125.type, + resolvedProps$127 + ); + return updateMemoComponent( + current, + workInProgress, + type$125, + resolvedProps$127, + renderLanes ); case 15: return updateSimpleMemoComponent( @@ -7524,48 +7626,160 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: - return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child + var nextChildren$jscomp$3 = workInProgress.pendingProps.children; + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$3, + renderLanes ); + return workInProgress.child; case 31: - props = workInProgress.pendingProps; - renderLanes = workInProgress.mode; - props = { mode: props.mode, children: props.children }; - if (null === current) { - if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((current = canHydrateHydrationBoundary( - current, + var nextProps$jscomp$1 = workInProgress.pendingProps, + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, rootOrSingletonContext - )), - (current = - null !== current && "&" === current.data ? current : null), - null !== current && - ((workInProgress.stateNode = current), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - current.nextSibling - )))) - : (current = null), - null === current) - ) - throw throwOnHydrationMismatch(workInProgress); - renderLanes = mountWorkInProgressOffscreenFiber(props, renderLanes); - renderLanes.ref = workInProgress.ref; - workInProgress.child = renderLanes; - renderLanes.return = workInProgress; - workInProgress = renderLanes; - } else - (renderLanes = createWorkInProgress(current.child, props)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes); - return workInProgress; + ); + var JSCompiler_inline_result$jscomp$1 = + null !== hydratableInstance && "&" === hydratableInstance.data + ? hydratableInstance + : null; + if (null !== JSCompiler_inline_result$jscomp$1) { + workInProgress.memoizedState = { + dehydrated: JSCompiler_inline_result$jscomp$1, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }; + var dehydratedFragment = createFiberFromDehydratedFragment( + JSCompiler_inline_result$jscomp$1 + ); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$1 = JSCompiler_inline_result$jscomp$1; + } else JSCompiler_temp$jscomp$1 = null; + if (null === JSCompiler_temp$jscomp$1) + throw throwOnHydrationMismatch(workInProgress); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$2 = null; + } else + JSCompiler_inline_result$jscomp$2 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var dehydrated = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$3 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$3 = null); + else throw Error(formatProdErrorMessage(558)); + else { + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + var hasContextChanged$96 = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged$96) { + var root$97 = workInProgressRoot; + if (null !== root$97) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root$97, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root$97, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$3 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + dehydrated.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$2 = JSCompiler_inline_result$jscomp$3; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$2 = primaryChildFragment$jscomp$0; + } + } + return JSCompiler_inline_result$jscomp$2; case 22: return updateOffscreenComponent( current, @@ -7581,117 +7795,131 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.pendingProps ); case 24: - return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (prevState = createCache()), - (init.pooledCache = prevState), - prevState.refCount++, - null !== prevState && (init.pooledCacheLanes |= renderLanes), - (init = prevState)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (prevState = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = prevState.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + prepareToReadContext(workInProgress); + var parentCache = readContext(CacheContext); + if (null === current) { + var cacheFromPool = peekCacheFromPool(); + if (null !== cacheFromPool) + var JSCompiler_inline_result$jscomp$4 = cacheFromPool; + else { + var root = workInProgressRoot, + freshCache = createCache(); + root.pooledCache = freshCache; + freshCache.refCount++; + null !== freshCache && (root.pooledCacheLanes |= renderLanes); + JSCompiler_inline_result$jscomp$4 = freshCache; + } + var freshCache$jscomp$0 = JSCompiler_inline_result$jscomp$4; + workInProgress.memoizedState = { + parent: parentCache, + cache: freshCache$jscomp$0 + }; + initializeUpdateQueue(workInProgress); + pushProvider(workInProgress, CacheContext, freshCache$jscomp$0); + } else { + 0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()); + var prevState$jscomp$1 = current.memoizedState, + nextState$jscomp$0 = workInProgress.memoizedState; + if (prevState$jscomp$1.parent !== parentCache) { + var derivedState = { parent: parentCache, cache: parentCache }; + workInProgress.memoizedState = derivedState; + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + derivedState); + pushProvider(workInProgress, CacheContext, parentCache); + } else { + var nextCache$jscomp$0 = nextState$jscomp$0.cache; + pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); + nextCache$jscomp$0 !== prevState$jscomp$1.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); + } + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? ((props = workInProgress.pendingProps), - null === current && - ((init = enableTransitionTracing - ? transitionStack.current - : null), - null !== init && - ((init = { - tag: 1, - transitions: new Set(init), - pendingBoundaries: null, - name: props.name, - aborts: null - }), - (workInProgress.stateNode = init), - (workInProgress.flags |= 2048))), - (init = workInProgress.stateNode), - null !== init && pushMarkerInstance(workInProgress, init), - reconcileChildren( - current, - workInProgress, - props.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 30: - if (enableViewTransition) - return ( - (props = workInProgress.pendingProps), - (init = workInProgress.stateNode), - null != props.name && "auto" !== props.name - ? (workInProgress.flags |= null === current ? 18882560 : 18874368) - : (null === init.autoName && - ((prevState = workInProgressRoot.identifierPrefix), - isHydrating - ? ((nextState = getTreeId()), - (prevState = - "\u00ab" + prevState + "T" + nextState + "\u00bb")) - : ((nextState = globalClientIdCounter$1++), - (prevState = - "\u00ab" + - prevState + - "t" + - nextState.toString(32) + - "\u00bb")), - (init.autoName = prevState)), - isHydrating && pushMaterializedTreeId(workInProgress)), - null !== current && current.memoizedProps.name !== props.name - ? (workInProgress.flags |= 4194816) - : markRef(current, workInProgress), + if (enableTransitionTracing) { + if (enableTransitionTracing) { + var nextProps$jscomp$2 = workInProgress.pendingProps; + if (null === current) { + var currentTransitions = enableTransitionTracing + ? transitionStack.current + : null; + if (null !== currentTransitions) { + var markerInstance = { + tag: 1, + transitions: new Set(currentTransitions), + pendingBoundaries: null, + name: nextProps$jscomp$2.name, + aborts: null + }; + workInProgress.stateNode = markerInstance; + workInProgress.flags |= 2048; + } + } + var instance$jscomp$1 = workInProgress.stateNode; + null !== instance$jscomp$1 && + pushMarkerInstance(workInProgress, instance$jscomp$1); reconcileChildren( current, workInProgress, - props.children, + nextProps$jscomp$2.children, renderLanes - ), - workInProgress.child + ); + var JSCompiler_inline_result$jscomp$5 = workInProgress.child; + } else JSCompiler_inline_result$jscomp$5 = null; + return JSCompiler_inline_result$jscomp$5; + } + break; + case 30: + if (enableViewTransition) { + var pendingProps = workInProgress.pendingProps, + instance$jscomp$2 = workInProgress.stateNode; + if (null != pendingProps.name && "auto" !== pendingProps.name) + workInProgress.flags |= null === current ? 18882560 : 18874368; + else { + if (null === instance$jscomp$2.autoName) { + var identifierPrefix = workInProgressRoot.identifierPrefix; + if (isHydrating) { + var treeId = getTreeId(); + var name = "\u00ab" + identifierPrefix + "T" + treeId + "\u00bb"; + } else { + var globalClientId = globalClientIdCounter$1++; + name = + "\u00ab" + + identifierPrefix + + "t" + + globalClientId.toString(32) + + "\u00bb"; + } + instance$jscomp$2.autoName = name; + } + isHydrating && pushMaterializedTreeId(workInProgress); + } + null !== current && current.memoizedProps.name !== pendingProps.name + ? (workInProgress.flags |= 4194816) + : markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + pendingProps.children, + renderLanes ); + return workInProgress.child; + } break; case 29: throw workInProgress.pendingProps; @@ -7870,14 +8098,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$128 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$128 = lastTailNode), + for (var lastTailNode$129 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$129 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$128 + null === lastTailNode$129 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$128.sibling = null); + : (lastTailNode$129.sibling = null); } } function bubbleProperties(completedWork) { @@ -7887,19 +8115,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$129 = completedWork.child; null !== child$129; ) - (newChildLanes |= child$129.lanes | child$129.childLanes), - (subtreeFlags |= child$129.subtreeFlags & 65011712), - (subtreeFlags |= child$129.flags & 65011712), - (child$129.return = completedWork), - (child$129 = child$129.sibling); + for (var child$130 = completedWork.child; null !== child$130; ) + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags & 65011712), + (subtreeFlags |= child$130.flags & 65011712), + (child$130.return = completedWork), + (child$130 = child$130.sibling); else - for (child$129 = completedWork.child; null !== child$129; ) - (newChildLanes |= child$129.lanes | child$129.childLanes), - (subtreeFlags |= child$129.subtreeFlags), - (subtreeFlags |= child$129.flags), - (child$129.return = completedWork), - (child$129 = child$129.sibling); + for (child$130 = completedWork.child; null !== child$130; ) + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags), + (subtreeFlags |= child$130.flags), + (child$130.return = completedWork), + (child$130 = child$130.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8186,11 +8414,40 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null), + (workInProgress.flags |= 4); + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8469,6 +8726,17 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8546,6 +8814,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -8719,8 +8991,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$162) { - captureCommitPhaseError(current, nearestMountedAncestor, error$162); + } catch (error$166) { + captureCommitPhaseError(current, nearestMountedAncestor, error$166); } else ref.current = null; } @@ -9383,7 +9655,7 @@ function commitBeforeMutationEffects(root, firstChild, committedLanes) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$210) { + } catch (e$215) { JSCompiler_temp = null; break a; } @@ -9649,11 +9921,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$160) { + } catch (error$164) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$160 + error$164 ); } } @@ -9696,6 +9968,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -10162,6 +10438,31 @@ function commitDeletionEffectsOnFiber( ); } } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + retryIfBlockedOn(current); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -10189,6 +10490,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -10531,6 +10833,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -10752,25 +11063,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$163 = hostParentFiber.stateNode; + var parent$167 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$163, ""), (hostParentFiber.flags &= -33)); - var before$164 = getHostSibling(finishedWork); + (setTextContent(parent$167, ""), (hostParentFiber.flags &= -33)); + var before$168 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$164, - parent$163, + before$168, + parent$167, parentFragmentInstances ); break; case 3: case 4: - var parent$165 = hostParentFiber.stateNode.containerInfo, - before$166 = getHostSibling(finishedWork); + var parent$169 = hostParentFiber.stateNode.containerInfo, + before$170 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$166, - parent$165, + before$170, + parent$169, parentFragmentInstances ); break; @@ -11063,6 +11374,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -11316,6 +11637,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11339,14 +11668,14 @@ function commitPassiveMountOnFiber( ); break; case 22: - var instance$182 = finishedWork.stateNode, - current$183 = finishedWork.alternate; + var instance$187 = finishedWork.stateNode, + current$188 = finishedWork.alternate; null !== finishedWork.memoizedState ? (isViewTransitionEligible && - null !== current$183 && - null === current$183.memoizedState && - restoreEnterOrExitViewTransitions(current$183), - instance$182._visibility & 2 + null !== current$188 && + null === current$188.memoizedState && + restoreEnterOrExitViewTransitions(current$188), + instance$187._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -11358,17 +11687,17 @@ function commitPassiveMountOnFiber( finishedWork )) : (isViewTransitionEligible && - null !== current$183 && - null !== current$183.memoizedState && + null !== current$188 && + null !== current$188.memoizedState && restoreEnterOrExitViewTransitions(finishedWork), - instance$182._visibility & 2 + instance$187._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((instance$182._visibility |= 2), + : ((instance$187._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11378,9 +11707,9 @@ function commitPassiveMountOnFiber( ))); flags & 2048 && commitOffscreenPassiveMountEffects( - current$183, + current$188, finishedWork, - instance$182 + instance$187 ); break; case 24: @@ -11475,9 +11804,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$186 = finishedWork.stateNode; + var instance$191 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$186._visibility & 2 + ? instance$191._visibility & 2 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11489,7 +11818,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$186._visibility |= 2), + : ((instance$191._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11502,7 +11831,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$186 + instance$191 ); break; case 24: @@ -12539,8 +12868,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$199) { - handleThrow(root, thrownValue$199); + } catch (thrownValue$204) { + handleThrow(root, thrownValue$204); } while (1); lanes && root.shellSuspendCounter++; @@ -12659,8 +12988,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$201) { - handleThrow(root, thrownValue$201); + } catch (thrownValue$206) { + handleThrow(root, thrownValue$206); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -13371,6 +13700,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -13695,6 +14025,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -13890,12 +14225,21 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} var isInsideEventHandler = !1; function batchedUpdates(fn, a, b) { if (isInsideEventHandler) return fn(a, b); @@ -14804,20 +15148,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1753 = 0; - i$jscomp$inline_1753 < simpleEventPluginEvents.length; - i$jscomp$inline_1753++ + var i$jscomp$inline_1785 = 0; + i$jscomp$inline_1785 < simpleEventPluginEvents.length; + i$jscomp$inline_1785++ ) { - var eventName$jscomp$inline_1754 = - simpleEventPluginEvents[i$jscomp$inline_1753], - domEventName$jscomp$inline_1755 = - eventName$jscomp$inline_1754.toLowerCase(), - capitalizedEvent$jscomp$inline_1756 = - eventName$jscomp$inline_1754[0].toUpperCase() + - eventName$jscomp$inline_1754.slice(1); + var eventName$jscomp$inline_1786 = + simpleEventPluginEvents[i$jscomp$inline_1785], + domEventName$jscomp$inline_1787 = + eventName$jscomp$inline_1786.toLowerCase(), + capitalizedEvent$jscomp$inline_1788 = + eventName$jscomp$inline_1786[0].toUpperCase() + + eventName$jscomp$inline_1786.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1755, - "on" + capitalizedEvent$jscomp$inline_1756 + domEventName$jscomp$inline_1787, + "on" + capitalizedEvent$jscomp$inline_1788 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -16184,34 +16528,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$224 = props[hasSrc]; - if (null != propValue$224) + var propValue$229 = props[hasSrc]; + if (null != propValue$229) switch (hasSrc) { case "name": - hasSrcSet = propValue$224; + hasSrcSet = propValue$229; break; case "type": - propValue = propValue$224; + propValue = propValue$229; break; case "checked": - checked = propValue$224; + checked = propValue$229; break; case "defaultChecked": - defaultChecked = propValue$224; + defaultChecked = propValue$229; break; case "value": - propKey = propValue$224; + propKey = propValue$229; break; case "defaultValue": - defaultValue = propValue$224; + defaultValue = propValue$229; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$224) + if (null != propValue$229) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$224, props, null); + setProp(domElement, tag, hasSrc, propValue$229, props, null); } } initInput( @@ -16350,14 +16694,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$224 in props) - props.hasOwnProperty(propValue$224) && - ((hasSrc = props[propValue$224]), + for (propValue$229 in props) + props.hasOwnProperty(propValue$229) && + ((hasSrc = props[propValue$229]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$224, + propValue$229, hasSrc, props, void 0 @@ -16405,14 +16749,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$241 in nextProps) { - var propKey = nextProps[propKey$241]; - lastProp = lastProps[propKey$241]; + for (var propKey$246 in nextProps) { + var propKey = nextProps[propKey$246]; + lastProp = lastProps[propKey$246]; if ( - nextProps.hasOwnProperty(propKey$241) && + nextProps.hasOwnProperty(propKey$246) && (null != propKey || null != lastProp) ) - switch (propKey$241) { + switch (propKey$246) { case "type": propKey !== lastProp && trackHostMutation(); type = propKey; @@ -16447,7 +16791,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$241, + propKey$246, propKey, nextProps, lastProp @@ -16466,7 +16810,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$241 = null; + propKey = value = defaultValue = propKey$246 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16498,7 +16842,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && trackHostMutation(); - propKey$241 = type; + propKey$246 = type; break; case "defaultValue": type !== lastDefaultValue && trackHostMutation(); @@ -16520,15 +16864,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$241 - ? updateOptions(domElement, !!lastProps, propKey$241, !1) + null != propKey$246 + ? updateOptions(domElement, !!lastProps, propKey$246, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$241 = null; + propKey = propKey$246 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16553,7 +16897,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && trackHostMutation(); - propKey$241 = name; + propKey$246 = name; break; case "defaultValue": name !== type && trackHostMutation(); @@ -16568,17 +16912,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$241, propKey); + updateTextarea(domElement, propKey$246, propKey); return; case "option": - for (var propKey$257 in lastProps) + for (var propKey$262 in lastProps) if ( - ((propKey$241 = lastProps[propKey$257]), - lastProps.hasOwnProperty(propKey$257) && - null != propKey$241 && - !nextProps.hasOwnProperty(propKey$257)) + ((propKey$246 = lastProps[propKey$262]), + lastProps.hasOwnProperty(propKey$262) && + null != propKey$246 && + !nextProps.hasOwnProperty(propKey$262)) ) - switch (propKey$257) { + switch (propKey$262) { case "selected": domElement.selected = !1; break; @@ -16586,34 +16930,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$257, + propKey$262, null, nextProps, - propKey$241 + propKey$246 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$241 = nextProps[lastDefaultValue]), + ((propKey$246 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$241 !== propKey && - (null != propKey$241 || null != propKey)) + propKey$246 !== propKey && + (null != propKey$246 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$241 !== propKey && trackHostMutation(); + propKey$246 !== propKey && trackHostMutation(); domElement.selected = - propKey$241 && - "function" !== typeof propKey$241 && - "symbol" !== typeof propKey$241; + propKey$246 && + "function" !== typeof propKey$246 && + "symbol" !== typeof propKey$246; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$241, + propKey$246, nextProps, propKey ); @@ -16634,24 +16978,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$262 in lastProps) - (propKey$241 = lastProps[propKey$262]), - lastProps.hasOwnProperty(propKey$262) && - null != propKey$241 && - !nextProps.hasOwnProperty(propKey$262) && - setProp(domElement, tag, propKey$262, null, nextProps, propKey$241); + for (var propKey$267 in lastProps) + (propKey$246 = lastProps[propKey$267]), + lastProps.hasOwnProperty(propKey$267) && + null != propKey$246 && + !nextProps.hasOwnProperty(propKey$267) && + setProp(domElement, tag, propKey$267, null, nextProps, propKey$246); for (checked in nextProps) if ( - ((propKey$241 = nextProps[checked]), + ((propKey$246 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$241 !== propKey && - (null != propKey$241 || null != propKey)) + propKey$246 !== propKey && + (null != propKey$246 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$241) + if (null != propKey$246) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16659,7 +17003,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$241, + propKey$246, nextProps, propKey ); @@ -16667,49 +17011,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$267 in lastProps) - (propKey$241 = lastProps[propKey$267]), - lastProps.hasOwnProperty(propKey$267) && - void 0 !== propKey$241 && - !nextProps.hasOwnProperty(propKey$267) && + for (var propKey$272 in lastProps) + (propKey$246 = lastProps[propKey$272]), + lastProps.hasOwnProperty(propKey$272) && + void 0 !== propKey$246 && + !nextProps.hasOwnProperty(propKey$272) && setPropOnCustomElement( domElement, tag, - propKey$267, + propKey$272, void 0, nextProps, - propKey$241 + propKey$246 ); for (defaultChecked in nextProps) - (propKey$241 = nextProps[defaultChecked]), + (propKey$246 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$241 === propKey || - (void 0 === propKey$241 && void 0 === propKey) || + propKey$246 === propKey || + (void 0 === propKey$246 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$241, + propKey$246, nextProps, propKey ); return; } } - for (var propKey$272 in lastProps) - (propKey$241 = lastProps[propKey$272]), - lastProps.hasOwnProperty(propKey$272) && - null != propKey$241 && - !nextProps.hasOwnProperty(propKey$272) && - setProp(domElement, tag, propKey$272, null, nextProps, propKey$241); + for (var propKey$277 in lastProps) + (propKey$246 = lastProps[propKey$277]), + lastProps.hasOwnProperty(propKey$277) && + null != propKey$246 && + !nextProps.hasOwnProperty(propKey$277) && + setProp(domElement, tag, propKey$277, null, nextProps, propKey$246); for (lastProp in nextProps) - (propKey$241 = nextProps[lastProp]), + (propKey$246 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$241 === propKey || - (null == propKey$241 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$241, nextProps, propKey); + propKey$246 === propKey || + (null == propKey$246 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$246, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -17877,26 +18221,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$284 = getResourcesFromRoot( + var styles$289 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$285 = styles$284.get(type); - resource$285 || + resource$290 = styles$289.get(type); + resource$290 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$285 = { + (resource$290 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$284.set(type, resource$285), - (styles$284 = JSCompiler_inline_result.querySelector( + styles$289.set(type, resource$290), + (styles$289 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$284._p && - ((resource$285.instance = styles$284), - (resource$285.state.loading = 5)), + !styles$289._p && + ((resource$290.instance = styles$289), + (resource$290.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -17909,16 +18253,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$284 || + styles$289 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$285.state + resource$290.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$285; + return resource$290; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -18015,37 +18359,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$290 = hoistableRoot.querySelector( + var instance$295 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$290) + if (instance$295) return ( (resource.state.loading |= 4), - (resource.instance = instance$290), - markNodeAsHoistable(instance$290), - instance$290 + (resource.instance = instance$295), + markNodeAsHoistable(instance$295), + instance$295 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$290 = ( + instance$295 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$290); - var linkInstance = instance$290; + markNodeAsHoistable(instance$295); + var linkInstance = instance$295; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$290, "link", instance); + setInitialProperties(instance$295, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$290, props.precedence, hoistableRoot); - return (resource.instance = instance$290); + insertStylesheet(instance$295, props.precedence, hoistableRoot); + return (resource.instance = instance$295); case "script": - instance$290 = getScriptKey(props.src); + instance$295 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$290) + getScriptSelectorFromKey(instance$295) )) ) return ( @@ -18054,7 +18398,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$290))) + if ((styleProps = preloadPropsMap.get(instance$295))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -18624,19 +18968,22 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -18899,6 +19246,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -18945,8 +19293,11 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -19087,16 +19438,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1998 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2029 = React.version; if ( - "19.2.0-www-classic-17f88c80-20250422" !== - isomorphicReactPackageVersion$jscomp$inline_1998 + "19.2.0-www-classic-3ef31d19-20250422" !== + isomorphicReactPackageVersion$jscomp$inline_2029 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1998, - "19.2.0-www-classic-17f88c80-20250422" + isomorphicReactPackageVersion$jscomp$inline_2029, + "19.2.0-www-classic-3ef31d19-20250422" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -19112,24 +19463,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2594 = { +var internals$jscomp$inline_2635 = { bundleType: 0, - version: "19.2.0-www-classic-17f88c80-20250422", + version: "19.2.0-www-classic-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2595 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2636 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2595.isDisabled && - hook$jscomp$inline_2595.supportsFiber + !hook$jscomp$inline_2636.isDisabled && + hook$jscomp$inline_2636.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2595.inject( - internals$jscomp$inline_2594 + (rendererID = hook$jscomp$inline_2636.inject( + internals$jscomp$inline_2635 )), - (injectedHook = hook$jscomp$inline_2595); + (injectedHook = hook$jscomp$inline_2636); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -19481,4 +19832,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-www-classic-17f88c80-20250422"; +exports.version = "19.2.0-www-classic-3ef31d19-20250422"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index a1badbf70b..76a47d4d29 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -85,6 +85,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -474,6 +484,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -1627,6 +1645,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -1727,6 +1753,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -1734,8 +1761,6 @@ function popToNextHostParent(fiber) { case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -1761,20 +1786,23 @@ function popHydrationState(fiber) { if (!fiber) throw Error(formatProdErrorMessage(317)); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -3567,6 +3595,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? push(suspenseHandlerStackCursor, handler) : push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -5332,6 +5365,7 @@ function throwException( sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -5569,10 +5603,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$94 = workInProgress.stateNode; + root$93 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$94.incompleteTransitions.has(transition)) { + if (!root$93.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5580,11 +5614,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$94.incompleteTransitions.set(transition, markerInstance); + root$93.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$94.incompleteTransitions.forEach(function (markerInstance) { + root$93.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5761,10 +5795,19 @@ function updateOffscreenComponent( renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -5774,17 +5817,6 @@ function updateOffscreenComponent( renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -5827,6 +5859,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6227,8 +6281,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { retryLane: 536870912, hydrationErrors: null }), - (renderLanes = createFiber(18, null, null, 0)), - (renderLanes.stateNode = current), + (renderLanes = createFiberFromDehydratedFragment(current)), (renderLanes.return = workInProgress), (workInProgress.child = renderLanes), (hydrationParentFiber = workInProgress), @@ -6325,14 +6378,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -6384,15 +6437,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -6421,12 +6466,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, current), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -6438,14 +6478,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), - (nextProps = createWorkInProgress(showFallback, { + (showFallback = workInProgress.mode), + (nextFallbackChildren = current.child), + (digest = nextFallbackChildren.sibling), + (nextProps = createWorkInProgress(nextFallbackChildren, { mode: "hidden", children: nextProps.children })), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712), + (nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -6453,7 +6493,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -6464,46 +6504,46 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (nextFallbackChildren = current.child.memoizedState), - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (nextFallbackChildren = + nextFallbackChildren.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })), - (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.memoizedState = showFallback), enableTransitionTracing && - ((nextFallbackChildren = enableTransitionTracing + ((showFallback = enableTransitionTracing ? transitionStack.current : null), - null !== nextFallbackChildren && - ((showFallback = enableTransitionTracing + null !== showFallback && + ((nextFallbackChildren = enableTransitionTracing ? markerInstanceStack.current : null), (digest = nextPrimaryChildren.updateQueue), (didSuspend = current.updateQueue), null === digest ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null }) : digest === didSuspend ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null !== didSuspend ? didSuspend.retryQueue : null }) - : ((digest.transitions = nextFallbackChildren), - (digest.markerInstances = showFallback)))), + : ((digest.transitions = showFallback), + (digest.markerInstances = nextFallbackChildren)))), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -6766,10 +6806,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$118 = workInProgress.memoizedState; + if (null !== state$118) { + if (null !== state$118.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -6789,17 +6837,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$118 = 0 !== (renderLanes & workInProgress.childLanes); + state$118 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$118 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$118) return updateSuspenseListComponent( current, workInProgress, @@ -6813,7 +6861,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$118) break; else return null; case 22: return ( @@ -6830,8 +6878,8 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 25: if (enableTransitionTracing) { - state = workInProgress.stateNode; - null !== state && pushMarkerInstance(workInProgress, state); + state$118 = workInProgress.stateNode; + null !== state$118 && pushMarkerInstance(workInProgress, state$118); break; } case 23: @@ -6875,95 +6923,112 @@ function beginWork(current, workInProgress, renderLanes) { switch (workInProgress.tag) { case 16: a: { - var props = workInProgress.pendingProps; - current = workInProgress.elementType; - var init = current._init; - current = init(current._payload); - workInProgress.type = current; - if ("function" === typeof current) - shouldConstruct(current) - ? ((props = resolveClassComponentProps(current, props, !1)), - (workInProgress.tag = 1), - (workInProgress = updateClassComponent( - null, - workInProgress, - current, - props, - renderLanes - ))) - : ((props = disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(current, props)), - (workInProgress.tag = 0), - (workInProgress = updateFunctionComponent( - null, - workInProgress, - current, - props, - renderLanes - ))); + var props = workInProgress.pendingProps, + lazyComponent = workInProgress.elementType, + init = lazyComponent._init; + var Component = init(lazyComponent._payload); + workInProgress.type = Component; + if ("function" === typeof Component) + if (shouldConstruct(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props, + !1 + ); + workInProgress.tag = 1; + var JSCompiler_inline_result = updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + var resolvedProps$98 = disableDefaultPropsExceptForClasses + ? props + : resolveDefaultPropsOnNonClassComponent(Component, props); + workInProgress.tag = 0; + JSCompiler_inline_result = updateFunctionComponent( + null, + workInProgress, + Component, + resolvedProps$98, + renderLanes + ); + } else { - if (void 0 !== current && null !== current) - if (((init = current.$$typeof), init === REACT_FORWARD_REF_TYPE)) { - props = disableDefaultPropsExceptForClasses + if (void 0 !== Component && null !== Component) { + var $$typeof = Component.$$typeof; + if ($$typeof === REACT_FORWARD_REF_TYPE) { + var resolvedProps$99 = disableDefaultPropsExceptForClasses ? props - : resolveDefaultPropsOnNonClassComponent(current, props); + : resolveDefaultPropsOnNonClassComponent(Component, props); workInProgress.tag = 11; - workInProgress = updateForwardRef( + JSCompiler_inline_result = updateForwardRef( null, workInProgress, - current, - props, + Component, + resolvedProps$99, renderLanes ); break a; - } else if (init === REACT_MEMO_TYPE) { - props = disableDefaultPropsExceptForClasses + } else if ($$typeof === REACT_MEMO_TYPE) { + var resolvedProps$100 = disableDefaultPropsExceptForClasses ? props - : resolveDefaultPropsOnNonClassComponent(current, props); + : resolveDefaultPropsOnNonClassComponent(Component, props); workInProgress.tag = 14; - workInProgress = updateMemoComponent( + JSCompiler_inline_result = updateMemoComponent( null, workInProgress, - current, + Component, disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(current.type, props), + ? resolvedProps$100 + : resolveDefaultPropsOnNonClassComponent( + Component.type, + resolvedProps$100 + ), renderLanes ); break a; } - workInProgress = getComponentNameFromType(current) || current; - throw Error(formatProdErrorMessage(306, workInProgress, "")); + } + var loggedComponent = + getComponentNameFromType(Component) || Component; + throw Error(formatProdErrorMessage(306, loggedComponent, "")); } } - return workInProgress; + return JSCompiler_inline_result; case 0: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = + var Component$jscomp$0 = workInProgress.type, + unresolvedProps = workInProgress.pendingProps, + resolvedProps$jscomp$0 = disableDefaultPropsExceptForClasses || - workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateFunctionComponent( - current, - workInProgress, - props, - init, - renderLanes - ) + workInProgress.elementType === Component$jscomp$0 + ? unresolvedProps + : resolveDefaultPropsOnNonClassComponent( + Component$jscomp$0, + unresolvedProps + ); + return updateFunctionComponent( + current, + workInProgress, + Component$jscomp$0, + resolvedProps$jscomp$0, + renderLanes ); case 1: - return ( - (props = workInProgress.type), - (init = resolveClassComponentProps( - props, + var Component$120 = workInProgress.type, + resolvedProps$122 = resolveClassComponentProps( + Component$120, workInProgress.pendingProps, - workInProgress.elementType === props - )), - updateClassComponent(current, workInProgress, props, init, renderLanes) + workInProgress.elementType === Component$120 + ); + return updateClassComponent( + current, + workInProgress, + Component$120, + resolvedProps$122, + renderLanes ); case 3: a: { @@ -6972,18 +7037,18 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.stateNode.containerInfo ); if (null === current) throw Error(formatProdErrorMessage(387)); - props = workInProgress.pendingProps; - var prevState = workInProgress.memoizedState; - init = prevState.element; + var nextProps = workInProgress.pendingProps, + prevState = workInProgress.memoizedState, + prevChildren = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, props, null, renderLanes); + processUpdateQueue(workInProgress, nextProps, null, renderLanes); var nextState = workInProgress.memoizedState; enableTransitionTracing && push(transitionStack, workInProgressTransitions); enableTransitionTracing && pushRootMarkerInstance(workInProgress); - props = nextState.cache; - pushProvider(workInProgress, CacheContext, props); - props !== prevState.cache && + var nextCache = nextState.cache; + pushProvider(workInProgress, CacheContext, nextCache); + nextCache !== prevState.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -6991,233 +7056,259 @@ function beginWork(current, workInProgress, renderLanes) { !0 ); suspendIfUpdateReadFromEntangledAsyncAction(); - props = nextState.element; - if (prevState.isDehydrated) - if ( - ((prevState = { - element: props, - isDehydrated: !1, - cache: nextState.cache - }), - (workInProgress.updateQueue.baseState = prevState), - (workInProgress.memoizedState = prevState), - workInProgress.flags & 256) - ) { - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - props, - renderLanes - ); + var nextChildren = nextState.element; + if (prevState.isDehydrated) { + var overrideState = { + element: nextChildren, + isDehydrated: !1, + cache: nextState.cache + }; + workInProgress.updateQueue.baseState = overrideState; + workInProgress.memoizedState = overrideState; + if (workInProgress.flags & 256) { + var JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; - } else if (props !== init) { - init = createCapturedValueAtFiber( + } else if (nextChildren !== prevChildren) { + var recoverableError = createCapturedValueAtFiber( Error(formatProdErrorMessage(424)), workInProgress ); - queueHydrationError(init); - workInProgress = mountHostRootWithoutHydrating( + queueHydrationError(recoverableError); + JSCompiler_inline_result$jscomp$0 = mountHostRootWithoutHydrating( current, workInProgress, - props, + nextChildren, renderLanes ); break a; } else { - current = workInProgress.stateNode.containerInfo; - switch (current.nodeType) { + var parentContainer = workInProgress.stateNode.containerInfo; + switch (parentContainer.nodeType) { case 9: - current = current.body; + var parentElement = parentContainer.body; break; default: - current = - "HTML" === current.nodeName - ? current.ownerDocument.body - : current; + parentElement = + "HTML" === parentContainer.nodeName + ? parentContainer.ownerDocument.body + : parentContainer; } - nextHydratableInstance = getNextHydratable(current.firstChild); + nextHydratableInstance = getNextHydratable( + parentElement.firstChild + ); hydrationParentFiber = workInProgress; isHydrating = !0; hydrationErrors = null; rootOrSingletonContext = !0; - renderLanes = mountChildFibers( - workInProgress, - null, - props, - renderLanes - ); - for (workInProgress.child = renderLanes; renderLanes; ) - (renderLanes.flags = (renderLanes.flags & -3) | 4096), - (renderLanes = renderLanes.sibling); + for ( + var child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderLanes + ), + node = (workInProgress.child = child); + node; + + ) + (node.flags = (node.flags & -3) | 4096), (node = node.sibling); } - else { + } else { resetHydrationState(); - if (props === init) { - workInProgress = bailoutOnAlreadyFinishedWork( + if (nextChildren === prevChildren) { + JSCompiler_inline_result$jscomp$0 = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes ); break a; } - reconcileChildren(current, workInProgress, props, renderLanes); + reconcileChildren(current, workInProgress, nextChildren, renderLanes); } - workInProgress = workInProgress.child; + JSCompiler_inline_result$jscomp$0 = workInProgress.child; } - return workInProgress; + return JSCompiler_inline_result$jscomp$0; case 26: - return ( - markRef(current, workInProgress), - null === current - ? (renderLanes = getResource( - workInProgress.type, - null, - workInProgress.pendingProps, - null - )) - ? (workInProgress.memoizedState = renderLanes) - : isHydrating || - ((renderLanes = workInProgress.type), - (current = workInProgress.pendingProps), - (props = getOwnerDocumentFromRootContainer( - rootInstanceStackCursor.current - ).createElement(renderLanes)), - (props[internalInstanceKey] = workInProgress), - (props[internalPropsKey] = current), - setInitialProperties(props, renderLanes, current), - markNodeAsHoistable(props), - (workInProgress.stateNode = props)) - : (workInProgress.memoizedState = getResource( - workInProgress.type, - current.memoizedProps, - workInProgress.pendingProps, - current.memoizedState - )), - null - ); - case 27: - return ( - pushHostContext(workInProgress), - null === current && - isHydrating && - ((props = workInProgress.stateNode = - resolveSingletonInstance( - workInProgress.type, - workInProgress.pendingProps, + markRef(current, workInProgress); + if (null === current) { + var resource = getResource( + workInProgress.type, + null, + workInProgress.pendingProps, + null + ); + if (resource) workInProgress.memoizedState = resource; + else if (!isHydrating) { + var type = workInProgress.type, + props$jscomp$0 = workInProgress.pendingProps, + domElement = getOwnerDocumentFromRootContainer( rootInstanceStackCursor.current - )), - (hydrationParentFiber = workInProgress), - (rootOrSingletonContext = !0), - (init = nextHydratableInstance), - isSingletonScope(workInProgress.type) - ? ((previousHydratableOnEnteringScopedSingleton = init), - (nextHydratableInstance = getNextHydratable(props.firstChild))) - : (nextHydratableInstance = init)), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - markRef(current, workInProgress), - null === current && (workInProgress.flags |= 4194304), - workInProgress.child + ).createElement(type); + domElement[internalInstanceKey] = workInProgress; + domElement[internalPropsKey] = props$jscomp$0; + setInitialProperties(domElement, type, props$jscomp$0); + markNodeAsHoistable(domElement); + workInProgress.stateNode = domElement; + } + } else + workInProgress.memoizedState = getResource( + workInProgress.type, + current.memoizedProps, + workInProgress.pendingProps, + current.memoizedState + ); + return null; + case 27: + pushHostContext(workInProgress); + if (null === current && isHydrating) { + var instance = (workInProgress.stateNode = resolveSingletonInstance( + workInProgress.type, + workInProgress.pendingProps, + rootInstanceStackCursor.current + )); + hydrationParentFiber = workInProgress; + rootOrSingletonContext = !0; + var currentHydratableInstance = nextHydratableInstance; + isSingletonScope(workInProgress.type) + ? ((previousHydratableOnEnteringScopedSingleton = + currentHydratableInstance), + (nextHydratableInstance = getNextHydratable(instance.firstChild))) + : (nextHydratableInstance = currentHydratableInstance); + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + markRef(current, workInProgress); + null === current && (workInProgress.flags |= 4194304); + return workInProgress.child; case 5: if (null === current && isHydrating) { - if ((init = props = nextHydratableInstance)) - (props = canHydrateInstance( - props, + var nextInstance = nextHydratableInstance, + JSCompiler_temp; + if ((JSCompiler_temp = nextInstance)) { + var instance$jscomp$0 = canHydrateInstance( + nextInstance, workInProgress.type, workInProgress.pendingProps, rootOrSingletonContext - )), - null !== props - ? ((workInProgress.stateNode = props), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable(props.firstChild)), - (rootOrSingletonContext = !1), - (init = !0)) - : (init = !1); - init || throwOnHydrationMismatch(workInProgress); + ); + null !== instance$jscomp$0 + ? ((workInProgress.stateNode = instance$jscomp$0), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + instance$jscomp$0.firstChild + )), + (rootOrSingletonContext = !1), + (JSCompiler_temp = !0)) + : (JSCompiler_temp = !1); + } + JSCompiler_temp || throwOnHydrationMismatch(workInProgress); } pushHostContext(workInProgress); - init = workInProgress.type; - prevState = workInProgress.pendingProps; - nextState = null !== current ? current.memoizedProps : null; - props = prevState.children; - shouldSetTextContent(init, prevState) - ? (props = null) - : null !== nextState && - shouldSetTextContent(init, nextState) && + var type$jscomp$0 = workInProgress.type, + nextProps$jscomp$0 = workInProgress.pendingProps, + prevProps = null !== current ? current.memoizedProps : null, + nextChildren$jscomp$0 = nextProps$jscomp$0.children; + shouldSetTextContent(type$jscomp$0, nextProps$jscomp$0) + ? (nextChildren$jscomp$0 = null) + : null !== prevProps && + shouldSetTextContent(type$jscomp$0, prevProps) && (workInProgress.flags |= 32); - null !== workInProgress.memoizedState && - ((init = renderWithHooks( + if (null !== workInProgress.memoizedState) { + var newState = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, null, null, renderLanes - )), - (HostTransitionContext._currentValue = init)); + ); + HostTransitionContext._currentValue = newState; + } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, props, renderLanes); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$0, + renderLanes + ); return workInProgress.child; case 6: if (null === current && isHydrating) { - if ((current = renderLanes = nextHydratableInstance)) - (renderLanes = canHydrateTextInstance( - renderLanes, + var nextInstance$jscomp$0 = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if ((JSCompiler_temp$jscomp$0 = nextInstance$jscomp$0)) { + var textInstance = canHydrateTextInstance( + nextInstance$jscomp$0, workInProgress.pendingProps, rootOrSingletonContext - )), - null !== renderLanes - ? ((workInProgress.stateNode = renderLanes), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null), - (current = !0)) - : (current = !1); - current || throwOnHydrationMismatch(workInProgress); + ); + null !== textInstance + ? ((workInProgress.stateNode = textInstance), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (JSCompiler_temp$jscomp$0 = !0)) + : (JSCompiler_temp$jscomp$0 = !1); + } + JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(workInProgress); } return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - return ( - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ), - (props = workInProgress.pendingProps), - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - props, - renderLanes - )) - : reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + var nextChildren$jscomp$1 = workInProgress.pendingProps; + null === current + ? (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren$jscomp$1, + renderLanes + )) + : reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$1, + renderLanes + ); + return workInProgress.child; case 11: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = + var type$jscomp$1 = workInProgress.type, + unresolvedProps$123 = workInProgress.pendingProps, + resolvedProps$124 = disableDefaultPropsExceptForClasses || - workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateForwardRef(current, workInProgress, props, init, renderLanes) + workInProgress.elementType === type$jscomp$1 + ? unresolvedProps$123 + : resolveDefaultPropsOnNonClassComponent( + type$jscomp$1, + unresolvedProps$123 + ); + return updateForwardRef( + current, + workInProgress, + type$jscomp$1, + resolvedProps$124, + renderLanes ); case 7: - return ( - (props = workInProgress.pendingProps), - enableFragmentRefs && markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child + var nextChildren$jscomp$2 = workInProgress.pendingProps; + enableFragmentRefs && markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$2, + renderLanes ); + return workInProgress.child; case 8: return ( reconcileChildren( @@ -7239,42 +7330,53 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - return ( - (props = workInProgress.pendingProps), - pushProvider( - workInProgress, - enableRenderableContext - ? workInProgress.type - : workInProgress.type._context, - props.value - ), - reconcileChildren(current, workInProgress, props.children, renderLanes), - workInProgress.child + var newProps = workInProgress.pendingProps; + pushProvider( + workInProgress, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, + newProps.value ); + reconcileChildren( + current, + workInProgress, + newProps.children, + renderLanes + ); + return workInProgress.child; case 9: - return ( - (init = enableRenderableContext - ? workInProgress.type._context - : workInProgress.type), - (props = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress), - (init = readContext(init)), - (props = props(init)), - (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); + var context = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type; + var render = workInProgress.pendingProps.children; + prepareToReadContext(workInProgress); + var newValue = readContext(context); + var newChildren = render(newValue); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, newChildren, renderLanes); + return workInProgress.child; case 14: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) + var type$125 = workInProgress.type, + unresolvedProps$126 = workInProgress.pendingProps, + resolvedProps$127 = disableDefaultPropsExceptForClasses + ? unresolvedProps$126 + : resolveDefaultPropsOnNonClassComponent( + type$125, + unresolvedProps$126 + ); + resolvedProps$127 = disableDefaultPropsExceptForClasses + ? resolvedProps$127 + : resolveDefaultPropsOnNonClassComponent( + type$125.type, + resolvedProps$127 + ); + return updateMemoComponent( + current, + workInProgress, + type$125, + resolvedProps$127, + renderLanes ); case 15: return updateSimpleMemoComponent( @@ -7287,48 +7389,160 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: - return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child + var nextChildren$jscomp$3 = workInProgress.pendingProps.children; + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$3, + renderLanes ); + return workInProgress.child; case 31: - props = workInProgress.pendingProps; - renderLanes = workInProgress.mode; - props = { mode: props.mode, children: props.children }; - if (null === current) { - if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((current = canHydrateHydrationBoundary( - current, + var nextProps$jscomp$1 = workInProgress.pendingProps, + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, rootOrSingletonContext - )), - (current = - null !== current && "&" === current.data ? current : null), - null !== current && - ((workInProgress.stateNode = current), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - current.nextSibling - )))) - : (current = null), - null === current) - ) - throw throwOnHydrationMismatch(workInProgress); - renderLanes = mountWorkInProgressOffscreenFiber(props, renderLanes); - renderLanes.ref = workInProgress.ref; - workInProgress.child = renderLanes; - renderLanes.return = workInProgress; - workInProgress = renderLanes; - } else - (renderLanes = createWorkInProgress(current.child, props)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes); - return workInProgress; + ); + var JSCompiler_inline_result$jscomp$1 = + null !== hydratableInstance && "&" === hydratableInstance.data + ? hydratableInstance + : null; + if (null !== JSCompiler_inline_result$jscomp$1) { + workInProgress.memoizedState = { + dehydrated: JSCompiler_inline_result$jscomp$1, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }; + var dehydratedFragment = createFiberFromDehydratedFragment( + JSCompiler_inline_result$jscomp$1 + ); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$1 = JSCompiler_inline_result$jscomp$1; + } else JSCompiler_temp$jscomp$1 = null; + if (null === JSCompiler_temp$jscomp$1) + throw throwOnHydrationMismatch(workInProgress); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$2 = null; + } else + JSCompiler_inline_result$jscomp$2 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var dehydrated = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$3 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$3 = null); + else throw Error(formatProdErrorMessage(558)); + else { + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + var hasContextChanged$96 = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged$96) { + var root$97 = workInProgressRoot; + if (null !== root$97) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root$97, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root$97, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$3 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + dehydrated.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$2 = JSCompiler_inline_result$jscomp$3; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$2 = primaryChildFragment$jscomp$0; + } + } + return JSCompiler_inline_result$jscomp$2; case 22: return updateOffscreenComponent( current, @@ -7344,117 +7558,131 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.pendingProps ); case 24: - return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (prevState = createCache()), - (init.pooledCache = prevState), - prevState.refCount++, - null !== prevState && (init.pooledCacheLanes |= renderLanes), - (init = prevState)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (prevState = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = prevState.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + prepareToReadContext(workInProgress); + var parentCache = readContext(CacheContext); + if (null === current) { + var cacheFromPool = peekCacheFromPool(); + if (null !== cacheFromPool) + var JSCompiler_inline_result$jscomp$4 = cacheFromPool; + else { + var root = workInProgressRoot, + freshCache = createCache(); + root.pooledCache = freshCache; + freshCache.refCount++; + null !== freshCache && (root.pooledCacheLanes |= renderLanes); + JSCompiler_inline_result$jscomp$4 = freshCache; + } + var freshCache$jscomp$0 = JSCompiler_inline_result$jscomp$4; + workInProgress.memoizedState = { + parent: parentCache, + cache: freshCache$jscomp$0 + }; + initializeUpdateQueue(workInProgress); + pushProvider(workInProgress, CacheContext, freshCache$jscomp$0); + } else { + 0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()); + var prevState$jscomp$1 = current.memoizedState, + nextState$jscomp$0 = workInProgress.memoizedState; + if (prevState$jscomp$1.parent !== parentCache) { + var derivedState = { parent: parentCache, cache: parentCache }; + workInProgress.memoizedState = derivedState; + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + derivedState); + pushProvider(workInProgress, CacheContext, parentCache); + } else { + var nextCache$jscomp$0 = nextState$jscomp$0.cache; + pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); + nextCache$jscomp$0 !== prevState$jscomp$1.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); + } + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? ((props = workInProgress.pendingProps), - null === current && - ((init = enableTransitionTracing - ? transitionStack.current - : null), - null !== init && - ((init = { - tag: 1, - transitions: new Set(init), - pendingBoundaries: null, - name: props.name, - aborts: null - }), - (workInProgress.stateNode = init), - (workInProgress.flags |= 2048))), - (init = workInProgress.stateNode), - null !== init && pushMarkerInstance(workInProgress, init), - reconcileChildren( - current, - workInProgress, - props.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 30: - if (enableViewTransition) - return ( - (props = workInProgress.pendingProps), - (init = workInProgress.stateNode), - null != props.name && "auto" !== props.name - ? (workInProgress.flags |= null === current ? 18882560 : 18874368) - : (null === init.autoName && - ((prevState = workInProgressRoot.identifierPrefix), - isHydrating - ? ((nextState = getTreeId()), - (prevState = - "\u00ab" + prevState + "T" + nextState + "\u00bb")) - : ((nextState = globalClientIdCounter$1++), - (prevState = - "\u00ab" + - prevState + - "t" + - nextState.toString(32) + - "\u00bb")), - (init.autoName = prevState)), - isHydrating && pushMaterializedTreeId(workInProgress)), - null !== current && current.memoizedProps.name !== props.name - ? (workInProgress.flags |= 4194816) - : markRef(current, workInProgress), + if (enableTransitionTracing) { + if (enableTransitionTracing) { + var nextProps$jscomp$2 = workInProgress.pendingProps; + if (null === current) { + var currentTransitions = enableTransitionTracing + ? transitionStack.current + : null; + if (null !== currentTransitions) { + var markerInstance = { + tag: 1, + transitions: new Set(currentTransitions), + pendingBoundaries: null, + name: nextProps$jscomp$2.name, + aborts: null + }; + workInProgress.stateNode = markerInstance; + workInProgress.flags |= 2048; + } + } + var instance$jscomp$1 = workInProgress.stateNode; + null !== instance$jscomp$1 && + pushMarkerInstance(workInProgress, instance$jscomp$1); reconcileChildren( current, workInProgress, - props.children, + nextProps$jscomp$2.children, renderLanes - ), - workInProgress.child + ); + var JSCompiler_inline_result$jscomp$5 = workInProgress.child; + } else JSCompiler_inline_result$jscomp$5 = null; + return JSCompiler_inline_result$jscomp$5; + } + break; + case 30: + if (enableViewTransition) { + var pendingProps = workInProgress.pendingProps, + instance$jscomp$2 = workInProgress.stateNode; + if (null != pendingProps.name && "auto" !== pendingProps.name) + workInProgress.flags |= null === current ? 18882560 : 18874368; + else { + if (null === instance$jscomp$2.autoName) { + var identifierPrefix = workInProgressRoot.identifierPrefix; + if (isHydrating) { + var treeId = getTreeId(); + var name = "\u00ab" + identifierPrefix + "T" + treeId + "\u00bb"; + } else { + var globalClientId = globalClientIdCounter$1++; + name = + "\u00ab" + + identifierPrefix + + "t" + + globalClientId.toString(32) + + "\u00bb"; + } + instance$jscomp$2.autoName = name; + } + isHydrating && pushMaterializedTreeId(workInProgress); + } + null !== current && current.memoizedProps.name !== pendingProps.name + ? (workInProgress.flags |= 4194816) + : markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + pendingProps.children, + renderLanes ); + return workInProgress.child; + } break; case 29: throw workInProgress.pendingProps; @@ -7633,14 +7861,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$128 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$128 = lastTailNode), + for (var lastTailNode$129 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$129 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$128 + null === lastTailNode$129 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$128.sibling = null); + : (lastTailNode$129.sibling = null); } } function bubbleProperties(completedWork) { @@ -7650,19 +7878,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$129 = completedWork.child; null !== child$129; ) - (newChildLanes |= child$129.lanes | child$129.childLanes), - (subtreeFlags |= child$129.subtreeFlags & 65011712), - (subtreeFlags |= child$129.flags & 65011712), - (child$129.return = completedWork), - (child$129 = child$129.sibling); + for (var child$130 = completedWork.child; null !== child$130; ) + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags & 65011712), + (subtreeFlags |= child$130.flags & 65011712), + (child$130.return = completedWork), + (child$130 = child$130.sibling); else - for (child$129 = completedWork.child; null !== child$129; ) - (newChildLanes |= child$129.lanes | child$129.childLanes), - (subtreeFlags |= child$129.subtreeFlags), - (subtreeFlags |= child$129.flags), - (child$129.return = completedWork), - (child$129 = child$129.sibling); + for (child$130 = completedWork.child; null !== child$130; ) + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags), + (subtreeFlags |= child$130.flags), + (child$130.return = completedWork), + (child$130 = child$130.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7942,11 +8170,40 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null), + (workInProgress.flags |= 4); + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8221,6 +8478,17 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8290,6 +8558,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -8463,8 +8735,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$162) { - captureCommitPhaseError(current, nearestMountedAncestor, error$162); + } catch (error$166) { + captureCommitPhaseError(current, nearestMountedAncestor, error$166); } else ref.current = null; } @@ -9127,7 +9399,7 @@ function commitBeforeMutationEffects(root, firstChild, committedLanes) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$210) { + } catch (e$215) { JSCompiler_temp = null; break a; } @@ -9393,11 +9665,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$160) { + } catch (error$164) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$160 + error$164 ); } } @@ -9440,6 +9712,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -9906,6 +10182,31 @@ function commitDeletionEffectsOnFiber( ); } } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + retryIfBlockedOn(current); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -9933,6 +10234,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -10275,6 +10577,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -10496,25 +10807,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$163 = hostParentFiber.stateNode; + var parent$167 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$163, ""), (hostParentFiber.flags &= -33)); - var before$164 = getHostSibling(finishedWork); + (setTextContent(parent$167, ""), (hostParentFiber.flags &= -33)); + var before$168 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$164, - parent$163, + before$168, + parent$167, parentFragmentInstances ); break; case 3: case 4: - var parent$165 = hostParentFiber.stateNode.containerInfo, - before$166 = getHostSibling(finishedWork); + var parent$169 = hostParentFiber.stateNode.containerInfo, + before$170 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$166, - parent$165, + before$170, + parent$169, parentFragmentInstances ); break; @@ -10807,6 +11118,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -11060,6 +11381,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11083,14 +11412,14 @@ function commitPassiveMountOnFiber( ); break; case 22: - var instance$182 = finishedWork.stateNode, - current$183 = finishedWork.alternate; + var instance$187 = finishedWork.stateNode, + current$188 = finishedWork.alternate; null !== finishedWork.memoizedState ? (isViewTransitionEligible && - null !== current$183 && - null === current$183.memoizedState && - restoreEnterOrExitViewTransitions(current$183), - instance$182._visibility & 2 + null !== current$188 && + null === current$188.memoizedState && + restoreEnterOrExitViewTransitions(current$188), + instance$187._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -11102,17 +11431,17 @@ function commitPassiveMountOnFiber( finishedWork )) : (isViewTransitionEligible && - null !== current$183 && - null !== current$183.memoizedState && + null !== current$188 && + null !== current$188.memoizedState && restoreEnterOrExitViewTransitions(finishedWork), - instance$182._visibility & 2 + instance$187._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((instance$182._visibility |= 2), + : ((instance$187._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11122,9 +11451,9 @@ function commitPassiveMountOnFiber( ))); flags & 2048 && commitOffscreenPassiveMountEffects( - current$183, + current$188, finishedWork, - instance$182 + instance$187 ); break; case 24: @@ -11219,9 +11548,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$186 = finishedWork.stateNode; + var instance$191 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$186._visibility & 2 + ? instance$191._visibility & 2 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11233,7 +11562,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$186._visibility |= 2), + : ((instance$191._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11246,7 +11575,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$186 + instance$191 ); break; case 24: @@ -12283,8 +12612,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$199) { - handleThrow(root, thrownValue$199); + } catch (thrownValue$204) { + handleThrow(root, thrownValue$204); } while (1); lanes && root.shellSuspendCounter++; @@ -12403,8 +12732,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$201) { - handleThrow(root, thrownValue$201); + } catch (thrownValue$206) { + handleThrow(root, thrownValue$206); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -13111,6 +13440,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -13435,6 +13765,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -13596,12 +13931,21 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} var isInsideEventHandler = !1; function batchedUpdates(fn, a, b) { if (isInsideEventHandler) return fn(a, b); @@ -14538,20 +14882,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1743 = 0; - i$jscomp$inline_1743 < simpleEventPluginEvents.length; - i$jscomp$inline_1743++ + var i$jscomp$inline_1775 = 0; + i$jscomp$inline_1775 < simpleEventPluginEvents.length; + i$jscomp$inline_1775++ ) { - var eventName$jscomp$inline_1744 = - simpleEventPluginEvents[i$jscomp$inline_1743], - domEventName$jscomp$inline_1745 = - eventName$jscomp$inline_1744.toLowerCase(), - capitalizedEvent$jscomp$inline_1746 = - eventName$jscomp$inline_1744[0].toUpperCase() + - eventName$jscomp$inline_1744.slice(1); + var eventName$jscomp$inline_1776 = + simpleEventPluginEvents[i$jscomp$inline_1775], + domEventName$jscomp$inline_1777 = + eventName$jscomp$inline_1776.toLowerCase(), + capitalizedEvent$jscomp$inline_1778 = + eventName$jscomp$inline_1776[0].toUpperCase() + + eventName$jscomp$inline_1776.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1745, - "on" + capitalizedEvent$jscomp$inline_1746 + domEventName$jscomp$inline_1777, + "on" + capitalizedEvent$jscomp$inline_1778 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15914,34 +16258,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$224 = props[hasSrc]; - if (null != propValue$224) + var propValue$229 = props[hasSrc]; + if (null != propValue$229) switch (hasSrc) { case "name": - hasSrcSet = propValue$224; + hasSrcSet = propValue$229; break; case "type": - propKey = propValue$224; + propKey = propValue$229; break; case "checked": - checked = propValue$224; + checked = propValue$229; break; case "defaultChecked": - defaultChecked = propValue$224; + defaultChecked = propValue$229; break; case "value": - propValue = propValue$224; + propValue = propValue$229; break; case "defaultValue": - defaultValue = propValue$224; + defaultValue = propValue$229; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$224) + if (null != propValue$229) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$224, props, null); + setProp(domElement, tag, hasSrc, propValue$229, props, null); } } initInput( @@ -16079,14 +16423,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$224 in props) - props.hasOwnProperty(propValue$224) && - ((hasSrc = props[propValue$224]), + for (propValue$229 in props) + props.hasOwnProperty(propValue$229) && + ((hasSrc = props[propValue$229]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$224, + propValue$229, hasSrc, props, void 0 @@ -16134,14 +16478,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$241 in nextProps) { - var propKey = nextProps[propKey$241]; - lastProp = lastProps[propKey$241]; + for (var propKey$246 in nextProps) { + var propKey = nextProps[propKey$246]; + lastProp = lastProps[propKey$246]; if ( - nextProps.hasOwnProperty(propKey$241) && + nextProps.hasOwnProperty(propKey$246) && (null != propKey || null != lastProp) ) - switch (propKey$241) { + switch (propKey$246) { case "type": propKey !== lastProp && trackHostMutation(); type = propKey; @@ -16176,7 +16520,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$241, + propKey$246, propKey, nextProps, lastProp @@ -16195,7 +16539,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$241 = null; + propKey = value = defaultValue = propKey$246 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16227,7 +16571,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && trackHostMutation(); - propKey$241 = type; + propKey$246 = type; break; case "defaultValue": type !== lastDefaultValue && trackHostMutation(); @@ -16249,15 +16593,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$241 - ? updateOptions(domElement, !!lastProps, propKey$241, !1) + null != propKey$246 + ? updateOptions(domElement, !!lastProps, propKey$246, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$241 = null; + propKey = propKey$246 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16282,7 +16626,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && trackHostMutation(); - propKey$241 = name; + propKey$246 = name; break; case "defaultValue": name !== type && trackHostMutation(); @@ -16297,17 +16641,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$241, propKey); + updateTextarea(domElement, propKey$246, propKey); return; case "option": - for (var propKey$257 in lastProps) + for (var propKey$262 in lastProps) if ( - ((propKey$241 = lastProps[propKey$257]), - lastProps.hasOwnProperty(propKey$257) && - null != propKey$241 && - !nextProps.hasOwnProperty(propKey$257)) + ((propKey$246 = lastProps[propKey$262]), + lastProps.hasOwnProperty(propKey$262) && + null != propKey$246 && + !nextProps.hasOwnProperty(propKey$262)) ) - switch (propKey$257) { + switch (propKey$262) { case "selected": domElement.selected = !1; break; @@ -16315,34 +16659,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$257, + propKey$262, null, nextProps, - propKey$241 + propKey$246 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$241 = nextProps[lastDefaultValue]), + ((propKey$246 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$241 !== propKey && - (null != propKey$241 || null != propKey)) + propKey$246 !== propKey && + (null != propKey$246 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$241 !== propKey && trackHostMutation(); + propKey$246 !== propKey && trackHostMutation(); domElement.selected = - propKey$241 && - "function" !== typeof propKey$241 && - "symbol" !== typeof propKey$241; + propKey$246 && + "function" !== typeof propKey$246 && + "symbol" !== typeof propKey$246; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$241, + propKey$246, nextProps, propKey ); @@ -16363,24 +16707,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$262 in lastProps) - (propKey$241 = lastProps[propKey$262]), - lastProps.hasOwnProperty(propKey$262) && - null != propKey$241 && - !nextProps.hasOwnProperty(propKey$262) && - setProp(domElement, tag, propKey$262, null, nextProps, propKey$241); + for (var propKey$267 in lastProps) + (propKey$246 = lastProps[propKey$267]), + lastProps.hasOwnProperty(propKey$267) && + null != propKey$246 && + !nextProps.hasOwnProperty(propKey$267) && + setProp(domElement, tag, propKey$267, null, nextProps, propKey$246); for (checked in nextProps) if ( - ((propKey$241 = nextProps[checked]), + ((propKey$246 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$241 !== propKey && - (null != propKey$241 || null != propKey)) + propKey$246 !== propKey && + (null != propKey$246 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$241) + if (null != propKey$246) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16388,7 +16732,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$241, + propKey$246, nextProps, propKey ); @@ -16396,49 +16740,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$267 in lastProps) - (propKey$241 = lastProps[propKey$267]), - lastProps.hasOwnProperty(propKey$267) && - void 0 !== propKey$241 && - !nextProps.hasOwnProperty(propKey$267) && + for (var propKey$272 in lastProps) + (propKey$246 = lastProps[propKey$272]), + lastProps.hasOwnProperty(propKey$272) && + void 0 !== propKey$246 && + !nextProps.hasOwnProperty(propKey$272) && setPropOnCustomElement( domElement, tag, - propKey$267, + propKey$272, void 0, nextProps, - propKey$241 + propKey$246 ); for (defaultChecked in nextProps) - (propKey$241 = nextProps[defaultChecked]), + (propKey$246 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$241 === propKey || - (void 0 === propKey$241 && void 0 === propKey) || + propKey$246 === propKey || + (void 0 === propKey$246 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$241, + propKey$246, nextProps, propKey ); return; } } - for (var propKey$272 in lastProps) - (propKey$241 = lastProps[propKey$272]), - lastProps.hasOwnProperty(propKey$272) && - null != propKey$241 && - !nextProps.hasOwnProperty(propKey$272) && - setProp(domElement, tag, propKey$272, null, nextProps, propKey$241); + for (var propKey$277 in lastProps) + (propKey$246 = lastProps[propKey$277]), + lastProps.hasOwnProperty(propKey$277) && + null != propKey$246 && + !nextProps.hasOwnProperty(propKey$277) && + setProp(domElement, tag, propKey$277, null, nextProps, propKey$246); for (lastProp in nextProps) - (propKey$241 = nextProps[lastProp]), + (propKey$246 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$241 === propKey || - (null == propKey$241 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$241, nextProps, propKey); + propKey$246 === propKey || + (null == propKey$246 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$246, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -17606,26 +17950,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$284 = getResourcesFromRoot( + var styles$289 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$285 = styles$284.get(type); - resource$285 || + resource$290 = styles$289.get(type); + resource$290 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$285 = { + (resource$290 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$284.set(type, resource$285), - (styles$284 = JSCompiler_inline_result.querySelector( + styles$289.set(type, resource$290), + (styles$289 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$284._p && - ((resource$285.instance = styles$284), - (resource$285.state.loading = 5)), + !styles$289._p && + ((resource$290.instance = styles$289), + (resource$290.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -17638,16 +17982,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$284 || + styles$289 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$285.state + resource$290.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$285; + return resource$290; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -17744,37 +18088,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$290 = hoistableRoot.querySelector( + var instance$295 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$290) + if (instance$295) return ( (resource.state.loading |= 4), - (resource.instance = instance$290), - markNodeAsHoistable(instance$290), - instance$290 + (resource.instance = instance$295), + markNodeAsHoistable(instance$295), + instance$295 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$290 = ( + instance$295 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$290); - var linkInstance = instance$290; + markNodeAsHoistable(instance$295); + var linkInstance = instance$295; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$290, "link", instance); + setInitialProperties(instance$295, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$290, props.precedence, hoistableRoot); - return (resource.instance = instance$290); + insertStylesheet(instance$295, props.precedence, hoistableRoot); + return (resource.instance = instance$295); case "script": - instance$290 = getScriptKey(props.src); + instance$295 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$290) + getScriptSelectorFromKey(instance$295) )) ) return ( @@ -17783,7 +18127,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$290))) + if ((styleProps = preloadPropsMap.get(instance$295))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -18353,19 +18697,22 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -18628,6 +18975,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -18674,8 +19022,11 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -18816,16 +19167,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1988 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2019 = React.version; if ( - "19.2.0-www-modern-17f88c80-20250422" !== - isomorphicReactPackageVersion$jscomp$inline_1988 + "19.2.0-www-modern-3ef31d19-20250422" !== + isomorphicReactPackageVersion$jscomp$inline_2019 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1988, - "19.2.0-www-modern-17f88c80-20250422" + isomorphicReactPackageVersion$jscomp$inline_2019, + "19.2.0-www-modern-3ef31d19-20250422" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -18841,24 +19192,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2576 = { +var internals$jscomp$inline_2617 = { bundleType: 0, - version: "19.2.0-www-modern-17f88c80-20250422", + version: "19.2.0-www-modern-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2577 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2618 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2577.isDisabled && - hook$jscomp$inline_2577.supportsFiber + !hook$jscomp$inline_2618.isDisabled && + hook$jscomp$inline_2618.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2577.inject( - internals$jscomp$inline_2576 + (rendererID = hook$jscomp$inline_2618.inject( + internals$jscomp$inline_2617 )), - (injectedHook = hook$jscomp$inline_2577); + (injectedHook = hook$jscomp$inline_2618); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -19210,4 +19561,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-www-modern-17f88c80-20250422"; +exports.version = "19.2.0-www-modern-3ef31d19-20250422"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index 09bcd48b07..e4e869f65b 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -94,6 +94,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -559,6 +569,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -1896,6 +1914,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -1996,6 +2022,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -2003,8 +2030,6 @@ function popToNextHostParent(fiber) { case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -2030,20 +2055,23 @@ function popHydrationState(fiber) { if (!fiber) throw Error(formatProdErrorMessage(317)); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -4268,6 +4296,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? push(suspenseHandlerStackCursor, handler) : push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -6051,6 +6084,7 @@ function throwException( sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -6288,10 +6322,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$98 = workInProgress.stateNode; + root$97 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$98.incompleteTransitions.has(transition)) { + if (!root$97.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -6299,11 +6333,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$98.incompleteTransitions.set(transition, markerInstance); + root$97.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$98.incompleteTransitions.forEach(function (markerInstance) { + root$97.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6482,10 +6516,19 @@ function updateOffscreenComponent( renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -6495,17 +6538,6 @@ function updateOffscreenComponent( renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -6548,6 +6580,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -7032,8 +7086,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { retryLane: 536870912, hydrationErrors: null }), - (renderLanes = createFiber(18, null, null, 0)), - (renderLanes.stateNode = current), + (renderLanes = createFiberFromDehydratedFragment(current)), (renderLanes.return = workInProgress), (workInProgress.child = renderLanes), (hydrationParentFiber = workInProgress), @@ -7130,14 +7183,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7189,15 +7242,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -7226,12 +7271,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, current), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -7243,14 +7283,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), - (nextProps = createWorkInProgress(showFallback, { + (showFallback = workInProgress.mode), + (nextFallbackChildren = current.child), + (digest = nextFallbackChildren.sibling), + (nextProps = createWorkInProgress(nextFallbackChildren, { mode: "hidden", children: nextProps.children })), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712), + (nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -7258,7 +7298,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7269,46 +7309,46 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (nextFallbackChildren = current.child.memoizedState), - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (nextFallbackChildren = + nextFallbackChildren.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })), - (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.memoizedState = showFallback), enableTransitionTracing && - ((nextFallbackChildren = enableTransitionTracing + ((showFallback = enableTransitionTracing ? transitionStack.current : null), - null !== nextFallbackChildren && - ((showFallback = enableTransitionTracing + null !== showFallback && + ((nextFallbackChildren = enableTransitionTracing ? markerInstanceStack.current : null), (digest = nextPrimaryChildren.updateQueue), (didSuspend = current.updateQueue), null === digest ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null }) : digest === didSuspend ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null !== didSuspend ? didSuspend.retryQueue : null }) - : ((digest.transitions = nextFallbackChildren), - (digest.markerInstances = showFallback)))), + : ((digest.transitions = showFallback), + (digest.markerInstances = nextFallbackChildren)))), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7584,6 +7624,14 @@ function attemptEarlyBailoutIfNoScheduledUpdate( stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -7696,112 +7744,129 @@ function beginWork(current, workInProgress, renderLanes) { switch (workInProgress.tag) { case 16: a: { - var props = workInProgress.pendingProps; - current = workInProgress.elementType; - var init = current._init; - current = init(current._payload); - workInProgress.type = current; - if ("function" === typeof current) - shouldConstruct(current) - ? ((props = resolveClassComponentProps(current, props, !1)), - (workInProgress.tag = 1), - (workInProgress = updateClassComponent( - null, - workInProgress, - current, - props, - renderLanes - ))) - : ((props = disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(current, props)), - (workInProgress.tag = 0), - (workInProgress = updateFunctionComponent( - null, - workInProgress, - current, - props, - renderLanes - ))); + var props = workInProgress.pendingProps, + lazyComponent = workInProgress.elementType, + init = lazyComponent._init; + var Component = init(lazyComponent._payload); + workInProgress.type = Component; + if ("function" === typeof Component) + if (shouldConstruct(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props, + !1 + ); + workInProgress.tag = 1; + var JSCompiler_inline_result = updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + var resolvedProps$102 = disableDefaultPropsExceptForClasses + ? props + : resolveDefaultPropsOnNonClassComponent(Component, props); + workInProgress.tag = 0; + JSCompiler_inline_result = updateFunctionComponent( + null, + workInProgress, + Component, + resolvedProps$102, + renderLanes + ); + } else { - if (void 0 !== current && null !== current) - if (((init = current.$$typeof), init === REACT_FORWARD_REF_TYPE)) { - props = disableDefaultPropsExceptForClasses + if (void 0 !== Component && null !== Component) { + var $$typeof = Component.$$typeof; + if ($$typeof === REACT_FORWARD_REF_TYPE) { + var resolvedProps$103 = disableDefaultPropsExceptForClasses ? props - : resolveDefaultPropsOnNonClassComponent(current, props); + : resolveDefaultPropsOnNonClassComponent(Component, props); workInProgress.tag = 11; - workInProgress = updateForwardRef( + JSCompiler_inline_result = updateForwardRef( null, workInProgress, - current, - props, + Component, + resolvedProps$103, renderLanes ); break a; - } else if (init === REACT_MEMO_TYPE) { - props = disableDefaultPropsExceptForClasses + } else if ($$typeof === REACT_MEMO_TYPE) { + var resolvedProps$104 = disableDefaultPropsExceptForClasses ? props - : resolveDefaultPropsOnNonClassComponent(current, props); + : resolveDefaultPropsOnNonClassComponent(Component, props); workInProgress.tag = 14; - workInProgress = updateMemoComponent( + JSCompiler_inline_result = updateMemoComponent( null, workInProgress, - current, + Component, disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(current.type, props), + ? resolvedProps$104 + : resolveDefaultPropsOnNonClassComponent( + Component.type, + resolvedProps$104 + ), renderLanes ); break a; } - workInProgress = getComponentNameFromType(current) || current; - throw Error(formatProdErrorMessage(306, workInProgress, "")); + } + var loggedComponent = + getComponentNameFromType(Component) || Component; + throw Error(formatProdErrorMessage(306, loggedComponent, "")); } } - return workInProgress; + return JSCompiler_inline_result; case 0: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = + var Component$jscomp$0 = workInProgress.type, + unresolvedProps = workInProgress.pendingProps, + resolvedProps$jscomp$0 = disableDefaultPropsExceptForClasses || - workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateFunctionComponent( - current, - workInProgress, - props, - init, - renderLanes - ) + workInProgress.elementType === Component$jscomp$0 + ? unresolvedProps + : resolveDefaultPropsOnNonClassComponent( + Component$jscomp$0, + unresolvedProps + ); + return updateFunctionComponent( + current, + workInProgress, + Component$jscomp$0, + resolvedProps$jscomp$0, + renderLanes ); case 1: - return ( - (props = workInProgress.type), - (init = resolveClassComponentProps( - props, + var Component$125 = workInProgress.type, + resolvedProps$127 = resolveClassComponentProps( + Component$125, workInProgress.pendingProps, - workInProgress.elementType === props - )), - updateClassComponent(current, workInProgress, props, init, renderLanes) + workInProgress.elementType === Component$125 + ); + return updateClassComponent( + current, + workInProgress, + Component$125, + resolvedProps$127, + renderLanes ); case 3: a: { pushHostRootContext(workInProgress); if (null === current) throw Error(formatProdErrorMessage(387)); - props = workInProgress.pendingProps; - var prevState = workInProgress.memoizedState; - init = prevState.element; + var nextProps = workInProgress.pendingProps, + prevState = workInProgress.memoizedState, + prevChildren = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, props, null, renderLanes); + processUpdateQueue(workInProgress, nextProps, null, renderLanes); var nextState = workInProgress.memoizedState; enableTransitionTracing && push(transitionStack, workInProgressTransitions); enableTransitionTracing && pushRootMarkerInstance(workInProgress); - props = nextState.cache; - pushProvider(workInProgress, CacheContext, props); - props !== prevState.cache && + var nextCache = nextState.cache; + pushProvider(workInProgress, CacheContext, nextCache); + nextCache !== prevState.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -7809,233 +7874,259 @@ function beginWork(current, workInProgress, renderLanes) { !0 ); suspendIfUpdateReadFromEntangledAsyncAction(); - props = nextState.element; - if (prevState.isDehydrated) - if ( - ((prevState = { - element: props, - isDehydrated: !1, - cache: nextState.cache - }), - (workInProgress.updateQueue.baseState = prevState), - (workInProgress.memoizedState = prevState), - workInProgress.flags & 256) - ) { - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - props, - renderLanes - ); + var nextChildren = nextState.element; + if (prevState.isDehydrated) { + var overrideState = { + element: nextChildren, + isDehydrated: !1, + cache: nextState.cache + }; + workInProgress.updateQueue.baseState = overrideState; + workInProgress.memoizedState = overrideState; + if (workInProgress.flags & 256) { + var JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; - } else if (props !== init) { - init = createCapturedValueAtFiber( + } else if (nextChildren !== prevChildren) { + var recoverableError = createCapturedValueAtFiber( Error(formatProdErrorMessage(424)), workInProgress ); - queueHydrationError(init); - workInProgress = mountHostRootWithoutHydrating( + queueHydrationError(recoverableError); + JSCompiler_inline_result$jscomp$0 = mountHostRootWithoutHydrating( current, workInProgress, - props, + nextChildren, renderLanes ); break a; } else { - current = workInProgress.stateNode.containerInfo; - switch (current.nodeType) { + var parentContainer = workInProgress.stateNode.containerInfo; + switch (parentContainer.nodeType) { case 9: - current = current.body; + var parentElement = parentContainer.body; break; default: - current = - "HTML" === current.nodeName - ? current.ownerDocument.body - : current; + parentElement = + "HTML" === parentContainer.nodeName + ? parentContainer.ownerDocument.body + : parentContainer; } - nextHydratableInstance = getNextHydratable(current.firstChild); + nextHydratableInstance = getNextHydratable( + parentElement.firstChild + ); hydrationParentFiber = workInProgress; isHydrating = !0; hydrationErrors = null; rootOrSingletonContext = !0; - renderLanes = mountChildFibers( - workInProgress, - null, - props, - renderLanes - ); - for (workInProgress.child = renderLanes; renderLanes; ) - (renderLanes.flags = (renderLanes.flags & -3) | 4096), - (renderLanes = renderLanes.sibling); + for ( + var child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderLanes + ), + node = (workInProgress.child = child); + node; + + ) + (node.flags = (node.flags & -3) | 4096), (node = node.sibling); } - else { + } else { resetHydrationState(); - if (props === init) { - workInProgress = bailoutOnAlreadyFinishedWork( + if (nextChildren === prevChildren) { + JSCompiler_inline_result$jscomp$0 = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes ); break a; } - reconcileChildren(current, workInProgress, props, renderLanes); + reconcileChildren(current, workInProgress, nextChildren, renderLanes); } - workInProgress = workInProgress.child; + JSCompiler_inline_result$jscomp$0 = workInProgress.child; } - return workInProgress; + return JSCompiler_inline_result$jscomp$0; case 26: - return ( - markRef(current, workInProgress), - null === current - ? (renderLanes = getResource( - workInProgress.type, - null, - workInProgress.pendingProps, - null - )) - ? (workInProgress.memoizedState = renderLanes) - : isHydrating || - ((renderLanes = workInProgress.type), - (current = workInProgress.pendingProps), - (props = getOwnerDocumentFromRootContainer( - rootInstanceStackCursor.current - ).createElement(renderLanes)), - (props[internalInstanceKey] = workInProgress), - (props[internalPropsKey] = current), - setInitialProperties(props, renderLanes, current), - markNodeAsHoistable(props), - (workInProgress.stateNode = props)) - : (workInProgress.memoizedState = getResource( - workInProgress.type, - current.memoizedProps, - workInProgress.pendingProps, - current.memoizedState - )), - null - ); - case 27: - return ( - pushHostContext(workInProgress), - null === current && - isHydrating && - ((props = workInProgress.stateNode = - resolveSingletonInstance( - workInProgress.type, - workInProgress.pendingProps, + markRef(current, workInProgress); + if (null === current) { + var resource = getResource( + workInProgress.type, + null, + workInProgress.pendingProps, + null + ); + if (resource) workInProgress.memoizedState = resource; + else if (!isHydrating) { + var type = workInProgress.type, + props$jscomp$0 = workInProgress.pendingProps, + domElement = getOwnerDocumentFromRootContainer( rootInstanceStackCursor.current - )), - (hydrationParentFiber = workInProgress), - (rootOrSingletonContext = !0), - (init = nextHydratableInstance), - isSingletonScope(workInProgress.type) - ? ((previousHydratableOnEnteringScopedSingleton = init), - (nextHydratableInstance = getNextHydratable(props.firstChild))) - : (nextHydratableInstance = init)), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - markRef(current, workInProgress), - null === current && (workInProgress.flags |= 4194304), - workInProgress.child + ).createElement(type); + domElement[internalInstanceKey] = workInProgress; + domElement[internalPropsKey] = props$jscomp$0; + setInitialProperties(domElement, type, props$jscomp$0); + markNodeAsHoistable(domElement); + workInProgress.stateNode = domElement; + } + } else + workInProgress.memoizedState = getResource( + workInProgress.type, + current.memoizedProps, + workInProgress.pendingProps, + current.memoizedState + ); + return null; + case 27: + pushHostContext(workInProgress); + if (null === current && isHydrating) { + var instance = (workInProgress.stateNode = resolveSingletonInstance( + workInProgress.type, + workInProgress.pendingProps, + rootInstanceStackCursor.current + )); + hydrationParentFiber = workInProgress; + rootOrSingletonContext = !0; + var currentHydratableInstance = nextHydratableInstance; + isSingletonScope(workInProgress.type) + ? ((previousHydratableOnEnteringScopedSingleton = + currentHydratableInstance), + (nextHydratableInstance = getNextHydratable(instance.firstChild))) + : (nextHydratableInstance = currentHydratableInstance); + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + markRef(current, workInProgress); + null === current && (workInProgress.flags |= 4194304); + return workInProgress.child; case 5: if (null === current && isHydrating) { - if ((init = props = nextHydratableInstance)) - (props = canHydrateInstance( - props, + var nextInstance = nextHydratableInstance, + JSCompiler_temp; + if ((JSCompiler_temp = nextInstance)) { + var instance$jscomp$0 = canHydrateInstance( + nextInstance, workInProgress.type, workInProgress.pendingProps, rootOrSingletonContext - )), - null !== props - ? ((workInProgress.stateNode = props), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable(props.firstChild)), - (rootOrSingletonContext = !1), - (init = !0)) - : (init = !1); - init || throwOnHydrationMismatch(workInProgress); + ); + null !== instance$jscomp$0 + ? ((workInProgress.stateNode = instance$jscomp$0), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + instance$jscomp$0.firstChild + )), + (rootOrSingletonContext = !1), + (JSCompiler_temp = !0)) + : (JSCompiler_temp = !1); + } + JSCompiler_temp || throwOnHydrationMismatch(workInProgress); } pushHostContext(workInProgress); - init = workInProgress.type; - prevState = workInProgress.pendingProps; - nextState = null !== current ? current.memoizedProps : null; - props = prevState.children; - shouldSetTextContent(init, prevState) - ? (props = null) - : null !== nextState && - shouldSetTextContent(init, nextState) && + var type$jscomp$0 = workInProgress.type, + nextProps$jscomp$0 = workInProgress.pendingProps, + prevProps = null !== current ? current.memoizedProps : null, + nextChildren$jscomp$0 = nextProps$jscomp$0.children; + shouldSetTextContent(type$jscomp$0, nextProps$jscomp$0) + ? (nextChildren$jscomp$0 = null) + : null !== prevProps && + shouldSetTextContent(type$jscomp$0, prevProps) && (workInProgress.flags |= 32); - null !== workInProgress.memoizedState && - ((init = renderWithHooks( + if (null !== workInProgress.memoizedState) { + var newState = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, null, null, renderLanes - )), - (HostTransitionContext._currentValue = init)); + ); + HostTransitionContext._currentValue = newState; + } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, props, renderLanes); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$0, + renderLanes + ); return workInProgress.child; case 6: if (null === current && isHydrating) { - if ((current = renderLanes = nextHydratableInstance)) - (renderLanes = canHydrateTextInstance( - renderLanes, + var nextInstance$jscomp$0 = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if ((JSCompiler_temp$jscomp$0 = nextInstance$jscomp$0)) { + var textInstance = canHydrateTextInstance( + nextInstance$jscomp$0, workInProgress.pendingProps, rootOrSingletonContext - )), - null !== renderLanes - ? ((workInProgress.stateNode = renderLanes), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null), - (current = !0)) - : (current = !1); - current || throwOnHydrationMismatch(workInProgress); + ); + null !== textInstance + ? ((workInProgress.stateNode = textInstance), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (JSCompiler_temp$jscomp$0 = !0)) + : (JSCompiler_temp$jscomp$0 = !1); + } + JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(workInProgress); } return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - return ( - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ), - (props = workInProgress.pendingProps), - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - props, - renderLanes - )) - : reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + var nextChildren$jscomp$1 = workInProgress.pendingProps; + null === current + ? (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren$jscomp$1, + renderLanes + )) + : reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$1, + renderLanes + ); + return workInProgress.child; case 11: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = + var type$jscomp$1 = workInProgress.type, + unresolvedProps$128 = workInProgress.pendingProps, + resolvedProps$129 = disableDefaultPropsExceptForClasses || - workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateForwardRef(current, workInProgress, props, init, renderLanes) + workInProgress.elementType === type$jscomp$1 + ? unresolvedProps$128 + : resolveDefaultPropsOnNonClassComponent( + type$jscomp$1, + unresolvedProps$128 + ); + return updateForwardRef( + current, + workInProgress, + type$jscomp$1, + resolvedProps$129, + renderLanes ); case 7: - return ( - (props = workInProgress.pendingProps), - enableFragmentRefs && markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child + var nextChildren$jscomp$2 = workInProgress.pendingProps; + enableFragmentRefs && markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$2, + renderLanes ); + return workInProgress.child; case 8: return ( reconcileChildren( @@ -8047,59 +8138,68 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 12: - return ( - (workInProgress.flags |= 4), - (workInProgress.flags |= 2048), - (props = workInProgress.stateNode), - (props.effectDuration = -0), - (props.passiveEffectDuration = -0), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + workInProgress.flags |= 4; + workInProgress.flags |= 2048; + var stateNode = workInProgress.stateNode; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 10: - return ( - (props = workInProgress.pendingProps), - pushProvider( - workInProgress, - enableRenderableContext - ? workInProgress.type - : workInProgress.type._context, - props.value - ), - reconcileChildren(current, workInProgress, props.children, renderLanes), - workInProgress.child + var newProps = workInProgress.pendingProps; + pushProvider( + workInProgress, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, + newProps.value ); + reconcileChildren( + current, + workInProgress, + newProps.children, + renderLanes + ); + return workInProgress.child; case 9: - return ( - (init = enableRenderableContext - ? workInProgress.type._context - : workInProgress.type), - (props = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress), - (init = readContext(init)), - enableSchedulingProfiler && markComponentRenderStarted(workInProgress), - (props = props(init)), - enableSchedulingProfiler && markComponentRenderStopped(), - (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); + var context = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type; + var render = workInProgress.pendingProps.children; + prepareToReadContext(workInProgress); + var newValue = readContext(context); + enableSchedulingProfiler && markComponentRenderStarted(workInProgress); + var newChildren = render(newValue); + enableSchedulingProfiler && markComponentRenderStopped(); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, newChildren, renderLanes); + return workInProgress.child; case 14: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) + var type$130 = workInProgress.type, + unresolvedProps$131 = workInProgress.pendingProps, + resolvedProps$132 = disableDefaultPropsExceptForClasses + ? unresolvedProps$131 + : resolveDefaultPropsOnNonClassComponent( + type$130, + unresolvedProps$131 + ); + resolvedProps$132 = disableDefaultPropsExceptForClasses + ? resolvedProps$132 + : resolveDefaultPropsOnNonClassComponent( + type$130.type, + resolvedProps$132 + ); + return updateMemoComponent( + current, + workInProgress, + type$130, + resolvedProps$132, + renderLanes ); case 15: return updateSimpleMemoComponent( @@ -8112,48 +8212,161 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: - return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child + var nextChildren$jscomp$3 = workInProgress.pendingProps.children; + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$3, + renderLanes ); + return workInProgress.child; case 31: - props = workInProgress.pendingProps; - renderLanes = workInProgress.mode; - props = { mode: props.mode, children: props.children }; - if (null === current) { - if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((current = canHydrateHydrationBoundary( - current, + var nextProps$jscomp$1 = workInProgress.pendingProps, + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, rootOrSingletonContext - )), - (current = - null !== current && "&" === current.data ? current : null), - null !== current && - ((workInProgress.stateNode = current), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - current.nextSibling - )))) - : (current = null), - null === current) - ) - throw throwOnHydrationMismatch(workInProgress); - renderLanes = mountWorkInProgressOffscreenFiber(props, renderLanes); - renderLanes.ref = workInProgress.ref; - workInProgress.child = renderLanes; - renderLanes.return = workInProgress; - workInProgress = renderLanes; - } else - (renderLanes = createWorkInProgress(current.child, props)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes); - return workInProgress; + ); + var JSCompiler_inline_result$jscomp$1 = + null !== hydratableInstance && "&" === hydratableInstance.data + ? hydratableInstance + : null; + if (null !== JSCompiler_inline_result$jscomp$1) { + workInProgress.memoizedState = { + dehydrated: JSCompiler_inline_result$jscomp$1, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }; + var dehydratedFragment = createFiberFromDehydratedFragment( + JSCompiler_inline_result$jscomp$1 + ); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$1 = JSCompiler_inline_result$jscomp$1; + } else JSCompiler_temp$jscomp$1 = null; + if (null === JSCompiler_temp$jscomp$1) + throw throwOnHydrationMismatch(workInProgress); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$2 = null; + } else + JSCompiler_inline_result$jscomp$2 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var dehydrated = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$3 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$3 = null); + else throw Error(formatProdErrorMessage(558)); + else { + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + var hasContextChanged$100 = + 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged$100) { + var root$101 = workInProgressRoot; + if (null !== root$101) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root$101, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root$101, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$3 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + dehydrated.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$2 = JSCompiler_inline_result$jscomp$3; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$2 = primaryChildFragment$jscomp$0; + } + } + return JSCompiler_inline_result$jscomp$2; case 22: return updateOffscreenComponent( current, @@ -8169,117 +8382,131 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.pendingProps ); case 24: - return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (prevState = createCache()), - (init.pooledCache = prevState), - prevState.refCount++, - null !== prevState && (init.pooledCacheLanes |= renderLanes), - (init = prevState)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (prevState = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = prevState.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + prepareToReadContext(workInProgress); + var parentCache = readContext(CacheContext); + if (null === current) { + var cacheFromPool = peekCacheFromPool(); + if (null !== cacheFromPool) + var JSCompiler_inline_result$jscomp$4 = cacheFromPool; + else { + var root = workInProgressRoot, + freshCache = createCache(); + root.pooledCache = freshCache; + freshCache.refCount++; + null !== freshCache && (root.pooledCacheLanes |= renderLanes); + JSCompiler_inline_result$jscomp$4 = freshCache; + } + var freshCache$jscomp$0 = JSCompiler_inline_result$jscomp$4; + workInProgress.memoizedState = { + parent: parentCache, + cache: freshCache$jscomp$0 + }; + initializeUpdateQueue(workInProgress); + pushProvider(workInProgress, CacheContext, freshCache$jscomp$0); + } else { + 0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()); + var prevState$jscomp$1 = current.memoizedState, + nextState$jscomp$0 = workInProgress.memoizedState; + if (prevState$jscomp$1.parent !== parentCache) { + var derivedState = { parent: parentCache, cache: parentCache }; + workInProgress.memoizedState = derivedState; + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + derivedState); + pushProvider(workInProgress, CacheContext, parentCache); + } else { + var nextCache$jscomp$0 = nextState$jscomp$0.cache; + pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); + nextCache$jscomp$0 !== prevState$jscomp$1.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); + } + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? ((props = workInProgress.pendingProps), - null === current && - ((init = enableTransitionTracing - ? transitionStack.current - : null), - null !== init && - ((init = { - tag: 1, - transitions: new Set(init), - pendingBoundaries: null, - name: props.name, - aborts: null - }), - (workInProgress.stateNode = init), - (workInProgress.flags |= 2048))), - (init = workInProgress.stateNode), - null !== init && pushMarkerInstance(workInProgress, init), - reconcileChildren( - current, - workInProgress, - props.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 30: - if (enableViewTransition) - return ( - (props = workInProgress.pendingProps), - (init = workInProgress.stateNode), - null != props.name && "auto" !== props.name - ? (workInProgress.flags |= null === current ? 18882560 : 18874368) - : (null === init.autoName && - ((prevState = workInProgressRoot.identifierPrefix), - isHydrating - ? ((nextState = getTreeId()), - (prevState = - "\u00ab" + prevState + "T" + nextState + "\u00bb")) - : ((nextState = globalClientIdCounter$1++), - (prevState = - "\u00ab" + - prevState + - "t" + - nextState.toString(32) + - "\u00bb")), - (init.autoName = prevState)), - isHydrating && pushMaterializedTreeId(workInProgress)), - null !== current && current.memoizedProps.name !== props.name - ? (workInProgress.flags |= 4194816) - : markRef(current, workInProgress), + if (enableTransitionTracing) { + if (enableTransitionTracing) { + var nextProps$jscomp$2 = workInProgress.pendingProps; + if (null === current) { + var currentTransitions = enableTransitionTracing + ? transitionStack.current + : null; + if (null !== currentTransitions) { + var markerInstance = { + tag: 1, + transitions: new Set(currentTransitions), + pendingBoundaries: null, + name: nextProps$jscomp$2.name, + aborts: null + }; + workInProgress.stateNode = markerInstance; + workInProgress.flags |= 2048; + } + } + var instance$jscomp$1 = workInProgress.stateNode; + null !== instance$jscomp$1 && + pushMarkerInstance(workInProgress, instance$jscomp$1); reconcileChildren( current, workInProgress, - props.children, + nextProps$jscomp$2.children, renderLanes - ), - workInProgress.child + ); + var JSCompiler_inline_result$jscomp$5 = workInProgress.child; + } else JSCompiler_inline_result$jscomp$5 = null; + return JSCompiler_inline_result$jscomp$5; + } + break; + case 30: + if (enableViewTransition) { + var pendingProps = workInProgress.pendingProps, + instance$jscomp$2 = workInProgress.stateNode; + if (null != pendingProps.name && "auto" !== pendingProps.name) + workInProgress.flags |= null === current ? 18882560 : 18874368; + else { + if (null === instance$jscomp$2.autoName) { + var identifierPrefix = workInProgressRoot.identifierPrefix; + if (isHydrating) { + var treeId = getTreeId(); + var name = "\u00ab" + identifierPrefix + "T" + treeId + "\u00bb"; + } else { + var globalClientId = globalClientIdCounter$1++; + name = + "\u00ab" + + identifierPrefix + + "t" + + globalClientId.toString(32) + + "\u00bb"; + } + instance$jscomp$2.autoName = name; + } + isHydrating && pushMaterializedTreeId(workInProgress); + } + null !== current && current.memoizedProps.name !== pendingProps.name + ? (workInProgress.flags |= 4194816) + : markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + pendingProps.children, + renderLanes ); + return workInProgress.child; + } break; case 29: throw workInProgress.pendingProps; @@ -8458,14 +8685,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$133 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$133 = lastTailNode), + for (var lastTailNode$134 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$134 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$133 + null === lastTailNode$134 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$133.sibling = null); + : (lastTailNode$134.sibling = null); } } function bubbleProperties(completedWork) { @@ -8477,53 +8704,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$135 = completedWork.selfBaseDuration, - child$136 = completedWork.child; - null !== child$136; + var treeBaseDuration$136 = completedWork.selfBaseDuration, + child$137 = completedWork.child; + null !== child$137; ) - (newChildLanes |= child$136.lanes | child$136.childLanes), - (subtreeFlags |= child$136.subtreeFlags & 65011712), - (subtreeFlags |= child$136.flags & 65011712), - (treeBaseDuration$135 += child$136.treeBaseDuration), - (child$136 = child$136.sibling); - completedWork.treeBaseDuration = treeBaseDuration$135; + (newChildLanes |= child$137.lanes | child$137.childLanes), + (subtreeFlags |= child$137.subtreeFlags & 65011712), + (subtreeFlags |= child$137.flags & 65011712), + (treeBaseDuration$136 += child$137.treeBaseDuration), + (child$137 = child$137.sibling); + completedWork.treeBaseDuration = treeBaseDuration$136; } else for ( - treeBaseDuration$135 = completedWork.child; - null !== treeBaseDuration$135; + treeBaseDuration$136 = completedWork.child; + null !== treeBaseDuration$136; ) (newChildLanes |= - treeBaseDuration$135.lanes | treeBaseDuration$135.childLanes), - (subtreeFlags |= treeBaseDuration$135.subtreeFlags & 65011712), - (subtreeFlags |= treeBaseDuration$135.flags & 65011712), - (treeBaseDuration$135.return = completedWork), - (treeBaseDuration$135 = treeBaseDuration$135.sibling); + treeBaseDuration$136.lanes | treeBaseDuration$136.childLanes), + (subtreeFlags |= treeBaseDuration$136.subtreeFlags & 65011712), + (subtreeFlags |= treeBaseDuration$136.flags & 65011712), + (treeBaseDuration$136.return = completedWork), + (treeBaseDuration$136 = treeBaseDuration$136.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$135 = completedWork.actualDuration; - child$136 = completedWork.selfBaseDuration; + treeBaseDuration$136 = completedWork.actualDuration; + child$137 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$135 += child.actualDuration), - (child$136 += child.treeBaseDuration), + (treeBaseDuration$136 += child.actualDuration), + (child$137 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$135; - completedWork.treeBaseDuration = child$136; + completedWork.actualDuration = treeBaseDuration$136; + completedWork.treeBaseDuration = child$137; } else for ( - treeBaseDuration$135 = completedWork.child; - null !== treeBaseDuration$135; + treeBaseDuration$136 = completedWork.child; + null !== treeBaseDuration$136; ) (newChildLanes |= - treeBaseDuration$135.lanes | treeBaseDuration$135.childLanes), - (subtreeFlags |= treeBaseDuration$135.subtreeFlags), - (subtreeFlags |= treeBaseDuration$135.flags), - (treeBaseDuration$135.return = completedWork), - (treeBaseDuration$135 = treeBaseDuration$135.sibling); + treeBaseDuration$136.lanes | treeBaseDuration$136.childLanes), + (subtreeFlags |= treeBaseDuration$136.subtreeFlags), + (subtreeFlags |= treeBaseDuration$136.flags), + (treeBaseDuration$136.return = completedWork), + (treeBaseDuration$136 = treeBaseDuration$136.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8810,11 +9037,52 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= current.treeBaseDuration)); + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8822,28 +9090,30 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) throw Error(formatProdErrorMessage(318)); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) throw Error(formatProdErrorMessage(317)); - type[internalInstanceKey] = workInProgress; + if (!nextResource) throw Error(formatProdErrorMessage(318)); + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error(formatProdErrorMessage(317)); + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); } else resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -9117,6 +9387,20 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -9200,6 +9484,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -9437,8 +9725,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$173) { - captureCommitPhaseError(current, nearestMountedAncestor, error$173); + } catch (error$179) { + captureCommitPhaseError(current, nearestMountedAncestor, error$179); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -9515,8 +9803,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$175) { - captureCommitPhaseError(current, nearestMountedAncestor, error$175); + } catch (error$181) { + captureCommitPhaseError(current, nearestMountedAncestor, error$181); } else ref.current = null; } @@ -10182,15 +10470,18 @@ var offscreenSubtreeIsHidden = !1, viewTransitionContextChanged = !1, rootViewTransitionAffected = !1; function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { root = root.containerInfo; @@ -10217,7 +10508,7 @@ function commitBeforeMutationEffects(root, firstChild, committedLanes) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$235) { + } catch (e$250) { JSCompiler_temp = null; break a; } @@ -10479,11 +10770,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$170) { + } catch (error$176) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$170 + error$176 ); } else { @@ -10501,11 +10792,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$171) { + } catch (error$177) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$171 + error$177 ); } recordEffectDuration(); @@ -10516,11 +10807,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$172) { + } catch (error$178) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$172 + error$178 ); } } @@ -10573,6 +10864,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -11095,6 +11390,31 @@ function commitDeletionEffectsOnFiber( popComponentEffectDuration(prevEffectDuration); componentEffectErrors = prevEffectErrors; } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + retryIfBlockedOn(current); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -11122,6 +11442,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -11491,6 +11812,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -11759,25 +12089,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$176 = hostParentFiber.stateNode; + var parent$182 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$176, ""), (hostParentFiber.flags &= -33)); - var before$177 = getHostSibling(finishedWork); + (setTextContent(parent$182, ""), (hostParentFiber.flags &= -33)); + var before$183 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$177, - parent$176, + before$183, + parent$182, parentFragmentInstances ); break; case 3: case 4: - var parent$178 = hostParentFiber.stateNode.containerInfo, - before$179 = getHostSibling(finishedWork); + var parent$184 = hostParentFiber.stateNode.containerInfo, + before$185 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$179, - parent$178, + before$185, + parent$184, parentFragmentInstances ); break; @@ -12106,6 +12436,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -12460,6 +12800,37 @@ function commitPassiveMountOnFiber( endTime ); break; + case 31: + flags = inHydratedSubtree; + enableComponentPerformanceTrack && + ((isViewTransitionEligible = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null), + (prevProfilerEffectDuration = finishedWork.memoizedState), + null !== isViewTransitionEligible && null === prevProfilerEffectDuration + ? ((prevProfilerEffectDuration = finishedWork.deletions), + null !== prevProfilerEffectDuration && + 0 < prevProfilerEffectDuration.length && + 18 === prevProfilerEffectDuration[0].tag + ? ((inHydratedSubtree = !1), + null !== isViewTransitionEligible.hydrationErrors && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1)); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + enableComponentPerformanceTrack && (inHydratedSubtree = flags); + break; case 13: flags = inHydratedSubtree; enableComponentPerformanceTrack && @@ -12743,9 +13114,9 @@ function reconnectPassiveEffects( ); break; case 22: - var instance$207 = finishedWork.stateNode; + var instance$222 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$207._visibility & 2 + ? instance$222._visibility & 2 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12761,7 +13132,7 @@ function reconnectPassiveEffects( committedTransitions, endTime ) - : ((instance$207._visibility |= 2), + : ((instance$222._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12775,7 +13146,7 @@ function reconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$207 + instance$222 ); break; case 24: @@ -14269,8 +14640,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$223) { - handleThrow(root, thrownValue$223); + } catch (thrownValue$238) { + handleThrow(root, thrownValue$238); } while (1); lanes && root.shellSuspendCounter++; @@ -14397,8 +14768,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$225) { - handleThrow(root, thrownValue$225); + } catch (thrownValue$240) { + handleThrow(root, thrownValue$240); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -15269,6 +15640,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -15615,6 +15987,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -15821,18 +16198,27 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$233 = 0; - 31 > index$233; - index$233++ + var map = new Map(), lane = 1, index$248 = 0; + 31 > index$248; + index$248++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -16750,20 +17136,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1949 = 0; - i$jscomp$inline_1949 < simpleEventPluginEvents.length; - i$jscomp$inline_1949++ + var i$jscomp$inline_1995 = 0; + i$jscomp$inline_1995 < simpleEventPluginEvents.length; + i$jscomp$inline_1995++ ) { - var eventName$jscomp$inline_1950 = - simpleEventPluginEvents[i$jscomp$inline_1949], - domEventName$jscomp$inline_1951 = - eventName$jscomp$inline_1950.toLowerCase(), - capitalizedEvent$jscomp$inline_1952 = - eventName$jscomp$inline_1950[0].toUpperCase() + - eventName$jscomp$inline_1950.slice(1); + var eventName$jscomp$inline_1996 = + simpleEventPluginEvents[i$jscomp$inline_1995], + domEventName$jscomp$inline_1997 = + eventName$jscomp$inline_1996.toLowerCase(), + capitalizedEvent$jscomp$inline_1998 = + eventName$jscomp$inline_1996[0].toUpperCase() + + eventName$jscomp$inline_1996.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1951, - "on" + capitalizedEvent$jscomp$inline_1952 + domEventName$jscomp$inline_1997, + "on" + capitalizedEvent$jscomp$inline_1998 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -18130,34 +18516,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$249 = props[hasSrc]; - if (null != propValue$249) + var propValue$264 = props[hasSrc]; + if (null != propValue$264) switch (hasSrc) { case "name": - hasSrcSet = propValue$249; + hasSrcSet = propValue$264; break; case "type": - propValue = propValue$249; + propValue = propValue$264; break; case "checked": - checked = propValue$249; + checked = propValue$264; break; case "defaultChecked": - defaultChecked = propValue$249; + defaultChecked = propValue$264; break; case "value": - propKey = propValue$249; + propKey = propValue$264; break; case "defaultValue": - defaultValue = propValue$249; + defaultValue = propValue$264; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$249) + if (null != propValue$264) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$249, props, null); + setProp(domElement, tag, hasSrc, propValue$264, props, null); } } initInput( @@ -18296,14 +18682,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$249 in props) - props.hasOwnProperty(propValue$249) && - ((hasSrc = props[propValue$249]), + for (propValue$264 in props) + props.hasOwnProperty(propValue$264) && + ((hasSrc = props[propValue$264]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$249, + propValue$264, hasSrc, props, void 0 @@ -18351,14 +18737,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$266 in nextProps) { - var propKey = nextProps[propKey$266]; - lastProp = lastProps[propKey$266]; + for (var propKey$281 in nextProps) { + var propKey = nextProps[propKey$281]; + lastProp = lastProps[propKey$281]; if ( - nextProps.hasOwnProperty(propKey$266) && + nextProps.hasOwnProperty(propKey$281) && (null != propKey || null != lastProp) ) - switch (propKey$266) { + switch (propKey$281) { case "type": propKey !== lastProp && trackHostMutation(); type = propKey; @@ -18393,7 +18779,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$266, + propKey$281, propKey, nextProps, lastProp @@ -18412,7 +18798,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$266 = null; + propKey = value = defaultValue = propKey$281 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -18444,7 +18830,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && trackHostMutation(); - propKey$266 = type; + propKey$281 = type; break; case "defaultValue": type !== lastDefaultValue && trackHostMutation(); @@ -18466,15 +18852,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$266 - ? updateOptions(domElement, !!lastProps, propKey$266, !1) + null != propKey$281 + ? updateOptions(domElement, !!lastProps, propKey$281, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$266 = null; + propKey = propKey$281 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -18499,7 +18885,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && trackHostMutation(); - propKey$266 = name; + propKey$281 = name; break; case "defaultValue": name !== type && trackHostMutation(); @@ -18514,17 +18900,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$266, propKey); + updateTextarea(domElement, propKey$281, propKey); return; case "option": - for (var propKey$282 in lastProps) + for (var propKey$297 in lastProps) if ( - ((propKey$266 = lastProps[propKey$282]), - lastProps.hasOwnProperty(propKey$282) && - null != propKey$266 && - !nextProps.hasOwnProperty(propKey$282)) + ((propKey$281 = lastProps[propKey$297]), + lastProps.hasOwnProperty(propKey$297) && + null != propKey$281 && + !nextProps.hasOwnProperty(propKey$297)) ) - switch (propKey$282) { + switch (propKey$297) { case "selected": domElement.selected = !1; break; @@ -18532,34 +18918,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$282, + propKey$297, null, nextProps, - propKey$266 + propKey$281 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$266 = nextProps[lastDefaultValue]), + ((propKey$281 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$266 !== propKey && - (null != propKey$266 || null != propKey)) + propKey$281 !== propKey && + (null != propKey$281 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$266 !== propKey && trackHostMutation(); + propKey$281 !== propKey && trackHostMutation(); domElement.selected = - propKey$266 && - "function" !== typeof propKey$266 && - "symbol" !== typeof propKey$266; + propKey$281 && + "function" !== typeof propKey$281 && + "symbol" !== typeof propKey$281; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$266, + propKey$281, nextProps, propKey ); @@ -18580,24 +18966,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$287 in lastProps) - (propKey$266 = lastProps[propKey$287]), - lastProps.hasOwnProperty(propKey$287) && - null != propKey$266 && - !nextProps.hasOwnProperty(propKey$287) && - setProp(domElement, tag, propKey$287, null, nextProps, propKey$266); + for (var propKey$302 in lastProps) + (propKey$281 = lastProps[propKey$302]), + lastProps.hasOwnProperty(propKey$302) && + null != propKey$281 && + !nextProps.hasOwnProperty(propKey$302) && + setProp(domElement, tag, propKey$302, null, nextProps, propKey$281); for (checked in nextProps) if ( - ((propKey$266 = nextProps[checked]), + ((propKey$281 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$266 !== propKey && - (null != propKey$266 || null != propKey)) + propKey$281 !== propKey && + (null != propKey$281 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$266) + if (null != propKey$281) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -18605,7 +18991,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$266, + propKey$281, nextProps, propKey ); @@ -18613,49 +18999,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$292 in lastProps) - (propKey$266 = lastProps[propKey$292]), - lastProps.hasOwnProperty(propKey$292) && - void 0 !== propKey$266 && - !nextProps.hasOwnProperty(propKey$292) && + for (var propKey$307 in lastProps) + (propKey$281 = lastProps[propKey$307]), + lastProps.hasOwnProperty(propKey$307) && + void 0 !== propKey$281 && + !nextProps.hasOwnProperty(propKey$307) && setPropOnCustomElement( domElement, tag, - propKey$292, + propKey$307, void 0, nextProps, - propKey$266 + propKey$281 ); for (defaultChecked in nextProps) - (propKey$266 = nextProps[defaultChecked]), + (propKey$281 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$266 === propKey || - (void 0 === propKey$266 && void 0 === propKey) || + propKey$281 === propKey || + (void 0 === propKey$281 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$266, + propKey$281, nextProps, propKey ); return; } } - for (var propKey$297 in lastProps) - (propKey$266 = lastProps[propKey$297]), - lastProps.hasOwnProperty(propKey$297) && - null != propKey$266 && - !nextProps.hasOwnProperty(propKey$297) && - setProp(domElement, tag, propKey$297, null, nextProps, propKey$266); + for (var propKey$312 in lastProps) + (propKey$281 = lastProps[propKey$312]), + lastProps.hasOwnProperty(propKey$312) && + null != propKey$281 && + !nextProps.hasOwnProperty(propKey$312) && + setProp(domElement, tag, propKey$312, null, nextProps, propKey$281); for (lastProp in nextProps) - (propKey$266 = nextProps[lastProp]), + (propKey$281 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$266 === propKey || - (null == propKey$266 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$266, nextProps, propKey); + propKey$281 === propKey || + (null == propKey$281 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$281, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -19832,26 +20218,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$309 = getResourcesFromRoot( + var styles$324 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$310 = styles$309.get(type); - resource$310 || + resource$325 = styles$324.get(type); + resource$325 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$310 = { + (resource$325 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$309.set(type, resource$310), - (styles$309 = JSCompiler_inline_result.querySelector( + styles$324.set(type, resource$325), + (styles$324 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$309._p && - ((resource$310.instance = styles$309), - (resource$310.state.loading = 5)), + !styles$324._p && + ((resource$325.instance = styles$324), + (resource$325.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -19864,16 +20250,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$309 || + styles$324 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$310.state + resource$325.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$310; + return resource$325; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -19970,37 +20356,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$315 = hoistableRoot.querySelector( + var instance$330 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$315) + if (instance$330) return ( (resource.state.loading |= 4), - (resource.instance = instance$315), - markNodeAsHoistable(instance$315), - instance$315 + (resource.instance = instance$330), + markNodeAsHoistable(instance$330), + instance$330 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$315 = ( + instance$330 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$315); - var linkInstance = instance$315; + markNodeAsHoistable(instance$330); + var linkInstance = instance$330; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$315, "link", instance); + setInitialProperties(instance$330, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$315, props.precedence, hoistableRoot); - return (resource.instance = instance$315); + insertStylesheet(instance$330, props.precedence, hoistableRoot); + return (resource.instance = instance$330); case "script": - instance$315 = getScriptKey(props.src); + instance$330 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$315) + getScriptSelectorFromKey(instance$330) )) ) return ( @@ -20009,7 +20395,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$315))) + if ((styleProps = preloadPropsMap.get(instance$330))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -20579,19 +20965,22 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -20854,6 +21243,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -20900,8 +21290,11 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -21042,16 +21435,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_2194 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2239 = React.version; if ( - "19.2.0-www-classic-17f88c80-20250422" !== - isomorphicReactPackageVersion$jscomp$inline_2194 + "19.2.0-www-classic-3ef31d19-20250422" !== + isomorphicReactPackageVersion$jscomp$inline_2239 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_2194, - "19.2.0-www-classic-17f88c80-20250422" + isomorphicReactPackageVersion$jscomp$inline_2239, + "19.2.0-www-classic-3ef31d19-20250422" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -21067,27 +21460,27 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2196 = { +var internals$jscomp$inline_2241 = { bundleType: 0, - version: "19.2.0-www-classic-17f88c80-20250422", + version: "19.2.0-www-classic-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422" }; enableSchedulingProfiler && - ((internals$jscomp$inline_2196.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_2196.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_2241.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_2241.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2786 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2841 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2786.isDisabled && - hook$jscomp$inline_2786.supportsFiber + !hook$jscomp$inline_2841.isDisabled && + hook$jscomp$inline_2841.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2786.inject( - internals$jscomp$inline_2196 + (rendererID = hook$jscomp$inline_2841.inject( + internals$jscomp$inline_2241 )), - (injectedHook = hook$jscomp$inline_2786); + (injectedHook = hook$jscomp$inline_2841); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -21439,7 +21832,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-www-classic-17f88c80-20250422"; +exports.version = "19.2.0-www-classic-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index 8a839eac3c..2458db81db 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -92,6 +92,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -557,6 +567,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -1810,6 +1828,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -1910,6 +1936,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -1917,8 +1944,6 @@ function popToNextHostParent(fiber) { case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -1944,20 +1969,23 @@ function popHydrationState(fiber) { if (!fiber) throw Error(formatProdErrorMessage(317)); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -4182,6 +4210,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? push(suspenseHandlerStackCursor, handler) : push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -5965,6 +5998,7 @@ function throwException( sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -6202,10 +6236,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$98 = workInProgress.stateNode; + root$97 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$98.incompleteTransitions.has(transition)) { + if (!root$97.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -6213,11 +6247,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$98.incompleteTransitions.set(transition, markerInstance); + root$97.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$98.incompleteTransitions.forEach(function (markerInstance) { + root$97.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6396,10 +6430,19 @@ function updateOffscreenComponent( renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -6409,17 +6452,6 @@ function updateOffscreenComponent( renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -6462,6 +6494,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6868,8 +6922,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { retryLane: 536870912, hydrationErrors: null }), - (renderLanes = createFiber(18, null, null, 0)), - (renderLanes.stateNode = current), + (renderLanes = createFiberFromDehydratedFragment(current)), (renderLanes.return = workInProgress), (workInProgress.child = renderLanes), (hydrationParentFiber = workInProgress), @@ -6966,14 +7019,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7025,15 +7078,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -7062,12 +7107,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, current), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -7079,14 +7119,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), - (nextProps = createWorkInProgress(showFallback, { + (showFallback = workInProgress.mode), + (nextFallbackChildren = current.child), + (digest = nextFallbackChildren.sibling), + (nextProps = createWorkInProgress(nextFallbackChildren, { mode: "hidden", children: nextProps.children })), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712), + (nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -7094,7 +7134,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7105,46 +7145,46 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (nextFallbackChildren = current.child.memoizedState), - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (nextFallbackChildren = + nextFallbackChildren.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })), - (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.memoizedState = showFallback), enableTransitionTracing && - ((nextFallbackChildren = enableTransitionTracing + ((showFallback = enableTransitionTracing ? transitionStack.current : null), - null !== nextFallbackChildren && - ((showFallback = enableTransitionTracing + null !== showFallback && + ((nextFallbackChildren = enableTransitionTracing ? markerInstanceStack.current : null), (digest = nextPrimaryChildren.updateQueue), (didSuspend = current.updateQueue), null === digest ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null }) : digest === didSuspend ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null !== didSuspend ? didSuspend.retryQueue : null }) - : ((digest.transitions = nextFallbackChildren), - (digest.markerInstances = showFallback)))), + : ((digest.transitions = showFallback), + (digest.markerInstances = nextFallbackChildren)))), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7416,6 +7456,14 @@ function attemptEarlyBailoutIfNoScheduledUpdate( stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -7525,95 +7573,112 @@ function beginWork(current, workInProgress, renderLanes) { switch (workInProgress.tag) { case 16: a: { - var props = workInProgress.pendingProps; - current = workInProgress.elementType; - var init = current._init; - current = init(current._payload); - workInProgress.type = current; - if ("function" === typeof current) - shouldConstruct(current) - ? ((props = resolveClassComponentProps(current, props, !1)), - (workInProgress.tag = 1), - (workInProgress = updateClassComponent( - null, - workInProgress, - current, - props, - renderLanes - ))) - : ((props = disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(current, props)), - (workInProgress.tag = 0), - (workInProgress = updateFunctionComponent( - null, - workInProgress, - current, - props, - renderLanes - ))); + var props = workInProgress.pendingProps, + lazyComponent = workInProgress.elementType, + init = lazyComponent._init; + var Component = init(lazyComponent._payload); + workInProgress.type = Component; + if ("function" === typeof Component) + if (shouldConstruct(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props, + !1 + ); + workInProgress.tag = 1; + var JSCompiler_inline_result = updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + var resolvedProps$102 = disableDefaultPropsExceptForClasses + ? props + : resolveDefaultPropsOnNonClassComponent(Component, props); + workInProgress.tag = 0; + JSCompiler_inline_result = updateFunctionComponent( + null, + workInProgress, + Component, + resolvedProps$102, + renderLanes + ); + } else { - if (void 0 !== current && null !== current) - if (((init = current.$$typeof), init === REACT_FORWARD_REF_TYPE)) { - props = disableDefaultPropsExceptForClasses + if (void 0 !== Component && null !== Component) { + var $$typeof = Component.$$typeof; + if ($$typeof === REACT_FORWARD_REF_TYPE) { + var resolvedProps$103 = disableDefaultPropsExceptForClasses ? props - : resolveDefaultPropsOnNonClassComponent(current, props); + : resolveDefaultPropsOnNonClassComponent(Component, props); workInProgress.tag = 11; - workInProgress = updateForwardRef( + JSCompiler_inline_result = updateForwardRef( null, workInProgress, - current, - props, + Component, + resolvedProps$103, renderLanes ); break a; - } else if (init === REACT_MEMO_TYPE) { - props = disableDefaultPropsExceptForClasses + } else if ($$typeof === REACT_MEMO_TYPE) { + var resolvedProps$104 = disableDefaultPropsExceptForClasses ? props - : resolveDefaultPropsOnNonClassComponent(current, props); + : resolveDefaultPropsOnNonClassComponent(Component, props); workInProgress.tag = 14; - workInProgress = updateMemoComponent( + JSCompiler_inline_result = updateMemoComponent( null, workInProgress, - current, + Component, disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(current.type, props), + ? resolvedProps$104 + : resolveDefaultPropsOnNonClassComponent( + Component.type, + resolvedProps$104 + ), renderLanes ); break a; } - workInProgress = getComponentNameFromType(current) || current; - throw Error(formatProdErrorMessage(306, workInProgress, "")); + } + var loggedComponent = + getComponentNameFromType(Component) || Component; + throw Error(formatProdErrorMessage(306, loggedComponent, "")); } } - return workInProgress; + return JSCompiler_inline_result; case 0: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = + var Component$jscomp$0 = workInProgress.type, + unresolvedProps = workInProgress.pendingProps, + resolvedProps$jscomp$0 = disableDefaultPropsExceptForClasses || - workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateFunctionComponent( - current, - workInProgress, - props, - init, - renderLanes - ) + workInProgress.elementType === Component$jscomp$0 + ? unresolvedProps + : resolveDefaultPropsOnNonClassComponent( + Component$jscomp$0, + unresolvedProps + ); + return updateFunctionComponent( + current, + workInProgress, + Component$jscomp$0, + resolvedProps$jscomp$0, + renderLanes ); case 1: - return ( - (props = workInProgress.type), - (init = resolveClassComponentProps( - props, + var Component$125 = workInProgress.type, + resolvedProps$127 = resolveClassComponentProps( + Component$125, workInProgress.pendingProps, - workInProgress.elementType === props - )), - updateClassComponent(current, workInProgress, props, init, renderLanes) + workInProgress.elementType === Component$125 + ); + return updateClassComponent( + current, + workInProgress, + Component$125, + resolvedProps$127, + renderLanes ); case 3: a: { @@ -7622,18 +7687,18 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.stateNode.containerInfo ); if (null === current) throw Error(formatProdErrorMessage(387)); - props = workInProgress.pendingProps; - var prevState = workInProgress.memoizedState; - init = prevState.element; + var nextProps = workInProgress.pendingProps, + prevState = workInProgress.memoizedState, + prevChildren = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, props, null, renderLanes); + processUpdateQueue(workInProgress, nextProps, null, renderLanes); var nextState = workInProgress.memoizedState; enableTransitionTracing && push(transitionStack, workInProgressTransitions); enableTransitionTracing && pushRootMarkerInstance(workInProgress); - props = nextState.cache; - pushProvider(workInProgress, CacheContext, props); - props !== prevState.cache && + var nextCache = nextState.cache; + pushProvider(workInProgress, CacheContext, nextCache); + nextCache !== prevState.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -7641,233 +7706,259 @@ function beginWork(current, workInProgress, renderLanes) { !0 ); suspendIfUpdateReadFromEntangledAsyncAction(); - props = nextState.element; - if (prevState.isDehydrated) - if ( - ((prevState = { - element: props, - isDehydrated: !1, - cache: nextState.cache - }), - (workInProgress.updateQueue.baseState = prevState), - (workInProgress.memoizedState = prevState), - workInProgress.flags & 256) - ) { - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - props, - renderLanes - ); + var nextChildren = nextState.element; + if (prevState.isDehydrated) { + var overrideState = { + element: nextChildren, + isDehydrated: !1, + cache: nextState.cache + }; + workInProgress.updateQueue.baseState = overrideState; + workInProgress.memoizedState = overrideState; + if (workInProgress.flags & 256) { + var JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; - } else if (props !== init) { - init = createCapturedValueAtFiber( + } else if (nextChildren !== prevChildren) { + var recoverableError = createCapturedValueAtFiber( Error(formatProdErrorMessage(424)), workInProgress ); - queueHydrationError(init); - workInProgress = mountHostRootWithoutHydrating( + queueHydrationError(recoverableError); + JSCompiler_inline_result$jscomp$0 = mountHostRootWithoutHydrating( current, workInProgress, - props, + nextChildren, renderLanes ); break a; } else { - current = workInProgress.stateNode.containerInfo; - switch (current.nodeType) { + var parentContainer = workInProgress.stateNode.containerInfo; + switch (parentContainer.nodeType) { case 9: - current = current.body; + var parentElement = parentContainer.body; break; default: - current = - "HTML" === current.nodeName - ? current.ownerDocument.body - : current; + parentElement = + "HTML" === parentContainer.nodeName + ? parentContainer.ownerDocument.body + : parentContainer; } - nextHydratableInstance = getNextHydratable(current.firstChild); + nextHydratableInstance = getNextHydratable( + parentElement.firstChild + ); hydrationParentFiber = workInProgress; isHydrating = !0; hydrationErrors = null; rootOrSingletonContext = !0; - renderLanes = mountChildFibers( - workInProgress, - null, - props, - renderLanes - ); - for (workInProgress.child = renderLanes; renderLanes; ) - (renderLanes.flags = (renderLanes.flags & -3) | 4096), - (renderLanes = renderLanes.sibling); + for ( + var child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderLanes + ), + node = (workInProgress.child = child); + node; + + ) + (node.flags = (node.flags & -3) | 4096), (node = node.sibling); } - else { + } else { resetHydrationState(); - if (props === init) { - workInProgress = bailoutOnAlreadyFinishedWork( + if (nextChildren === prevChildren) { + JSCompiler_inline_result$jscomp$0 = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes ); break a; } - reconcileChildren(current, workInProgress, props, renderLanes); + reconcileChildren(current, workInProgress, nextChildren, renderLanes); } - workInProgress = workInProgress.child; + JSCompiler_inline_result$jscomp$0 = workInProgress.child; } - return workInProgress; + return JSCompiler_inline_result$jscomp$0; case 26: - return ( - markRef(current, workInProgress), - null === current - ? (renderLanes = getResource( - workInProgress.type, - null, - workInProgress.pendingProps, - null - )) - ? (workInProgress.memoizedState = renderLanes) - : isHydrating || - ((renderLanes = workInProgress.type), - (current = workInProgress.pendingProps), - (props = getOwnerDocumentFromRootContainer( - rootInstanceStackCursor.current - ).createElement(renderLanes)), - (props[internalInstanceKey] = workInProgress), - (props[internalPropsKey] = current), - setInitialProperties(props, renderLanes, current), - markNodeAsHoistable(props), - (workInProgress.stateNode = props)) - : (workInProgress.memoizedState = getResource( - workInProgress.type, - current.memoizedProps, - workInProgress.pendingProps, - current.memoizedState - )), - null - ); - case 27: - return ( - pushHostContext(workInProgress), - null === current && - isHydrating && - ((props = workInProgress.stateNode = - resolveSingletonInstance( - workInProgress.type, - workInProgress.pendingProps, + markRef(current, workInProgress); + if (null === current) { + var resource = getResource( + workInProgress.type, + null, + workInProgress.pendingProps, + null + ); + if (resource) workInProgress.memoizedState = resource; + else if (!isHydrating) { + var type = workInProgress.type, + props$jscomp$0 = workInProgress.pendingProps, + domElement = getOwnerDocumentFromRootContainer( rootInstanceStackCursor.current - )), - (hydrationParentFiber = workInProgress), - (rootOrSingletonContext = !0), - (init = nextHydratableInstance), - isSingletonScope(workInProgress.type) - ? ((previousHydratableOnEnteringScopedSingleton = init), - (nextHydratableInstance = getNextHydratable(props.firstChild))) - : (nextHydratableInstance = init)), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - markRef(current, workInProgress), - null === current && (workInProgress.flags |= 4194304), - workInProgress.child + ).createElement(type); + domElement[internalInstanceKey] = workInProgress; + domElement[internalPropsKey] = props$jscomp$0; + setInitialProperties(domElement, type, props$jscomp$0); + markNodeAsHoistable(domElement); + workInProgress.stateNode = domElement; + } + } else + workInProgress.memoizedState = getResource( + workInProgress.type, + current.memoizedProps, + workInProgress.pendingProps, + current.memoizedState + ); + return null; + case 27: + pushHostContext(workInProgress); + if (null === current && isHydrating) { + var instance = (workInProgress.stateNode = resolveSingletonInstance( + workInProgress.type, + workInProgress.pendingProps, + rootInstanceStackCursor.current + )); + hydrationParentFiber = workInProgress; + rootOrSingletonContext = !0; + var currentHydratableInstance = nextHydratableInstance; + isSingletonScope(workInProgress.type) + ? ((previousHydratableOnEnteringScopedSingleton = + currentHydratableInstance), + (nextHydratableInstance = getNextHydratable(instance.firstChild))) + : (nextHydratableInstance = currentHydratableInstance); + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + markRef(current, workInProgress); + null === current && (workInProgress.flags |= 4194304); + return workInProgress.child; case 5: if (null === current && isHydrating) { - if ((init = props = nextHydratableInstance)) - (props = canHydrateInstance( - props, + var nextInstance = nextHydratableInstance, + JSCompiler_temp; + if ((JSCompiler_temp = nextInstance)) { + var instance$jscomp$0 = canHydrateInstance( + nextInstance, workInProgress.type, workInProgress.pendingProps, rootOrSingletonContext - )), - null !== props - ? ((workInProgress.stateNode = props), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable(props.firstChild)), - (rootOrSingletonContext = !1), - (init = !0)) - : (init = !1); - init || throwOnHydrationMismatch(workInProgress); + ); + null !== instance$jscomp$0 + ? ((workInProgress.stateNode = instance$jscomp$0), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + instance$jscomp$0.firstChild + )), + (rootOrSingletonContext = !1), + (JSCompiler_temp = !0)) + : (JSCompiler_temp = !1); + } + JSCompiler_temp || throwOnHydrationMismatch(workInProgress); } pushHostContext(workInProgress); - init = workInProgress.type; - prevState = workInProgress.pendingProps; - nextState = null !== current ? current.memoizedProps : null; - props = prevState.children; - shouldSetTextContent(init, prevState) - ? (props = null) - : null !== nextState && - shouldSetTextContent(init, nextState) && + var type$jscomp$0 = workInProgress.type, + nextProps$jscomp$0 = workInProgress.pendingProps, + prevProps = null !== current ? current.memoizedProps : null, + nextChildren$jscomp$0 = nextProps$jscomp$0.children; + shouldSetTextContent(type$jscomp$0, nextProps$jscomp$0) + ? (nextChildren$jscomp$0 = null) + : null !== prevProps && + shouldSetTextContent(type$jscomp$0, prevProps) && (workInProgress.flags |= 32); - null !== workInProgress.memoizedState && - ((init = renderWithHooks( + if (null !== workInProgress.memoizedState) { + var newState = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, null, null, renderLanes - )), - (HostTransitionContext._currentValue = init)); + ); + HostTransitionContext._currentValue = newState; + } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, props, renderLanes); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$0, + renderLanes + ); return workInProgress.child; case 6: if (null === current && isHydrating) { - if ((current = renderLanes = nextHydratableInstance)) - (renderLanes = canHydrateTextInstance( - renderLanes, + var nextInstance$jscomp$0 = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if ((JSCompiler_temp$jscomp$0 = nextInstance$jscomp$0)) { + var textInstance = canHydrateTextInstance( + nextInstance$jscomp$0, workInProgress.pendingProps, rootOrSingletonContext - )), - null !== renderLanes - ? ((workInProgress.stateNode = renderLanes), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null), - (current = !0)) - : (current = !1); - current || throwOnHydrationMismatch(workInProgress); + ); + null !== textInstance + ? ((workInProgress.stateNode = textInstance), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (JSCompiler_temp$jscomp$0 = !0)) + : (JSCompiler_temp$jscomp$0 = !1); + } + JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(workInProgress); } return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - return ( - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ), - (props = workInProgress.pendingProps), - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - props, - renderLanes - )) - : reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + var nextChildren$jscomp$1 = workInProgress.pendingProps; + null === current + ? (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren$jscomp$1, + renderLanes + )) + : reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$1, + renderLanes + ); + return workInProgress.child; case 11: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = + var type$jscomp$1 = workInProgress.type, + unresolvedProps$128 = workInProgress.pendingProps, + resolvedProps$129 = disableDefaultPropsExceptForClasses || - workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateForwardRef(current, workInProgress, props, init, renderLanes) + workInProgress.elementType === type$jscomp$1 + ? unresolvedProps$128 + : resolveDefaultPropsOnNonClassComponent( + type$jscomp$1, + unresolvedProps$128 + ); + return updateForwardRef( + current, + workInProgress, + type$jscomp$1, + resolvedProps$129, + renderLanes ); case 7: - return ( - (props = workInProgress.pendingProps), - enableFragmentRefs && markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child + var nextChildren$jscomp$2 = workInProgress.pendingProps; + enableFragmentRefs && markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$2, + renderLanes ); + return workInProgress.child; case 8: return ( reconcileChildren( @@ -7879,59 +7970,68 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 12: - return ( - (workInProgress.flags |= 4), - (workInProgress.flags |= 2048), - (props = workInProgress.stateNode), - (props.effectDuration = -0), - (props.passiveEffectDuration = -0), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + workInProgress.flags |= 4; + workInProgress.flags |= 2048; + var stateNode = workInProgress.stateNode; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 10: - return ( - (props = workInProgress.pendingProps), - pushProvider( - workInProgress, - enableRenderableContext - ? workInProgress.type - : workInProgress.type._context, - props.value - ), - reconcileChildren(current, workInProgress, props.children, renderLanes), - workInProgress.child + var newProps = workInProgress.pendingProps; + pushProvider( + workInProgress, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, + newProps.value ); + reconcileChildren( + current, + workInProgress, + newProps.children, + renderLanes + ); + return workInProgress.child; case 9: - return ( - (init = enableRenderableContext - ? workInProgress.type._context - : workInProgress.type), - (props = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress), - (init = readContext(init)), - enableSchedulingProfiler && markComponentRenderStarted(workInProgress), - (props = props(init)), - enableSchedulingProfiler && markComponentRenderStopped(), - (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); + var context = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type; + var render = workInProgress.pendingProps.children; + prepareToReadContext(workInProgress); + var newValue = readContext(context); + enableSchedulingProfiler && markComponentRenderStarted(workInProgress); + var newChildren = render(newValue); + enableSchedulingProfiler && markComponentRenderStopped(); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, newChildren, renderLanes); + return workInProgress.child; case 14: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) + var type$130 = workInProgress.type, + unresolvedProps$131 = workInProgress.pendingProps, + resolvedProps$132 = disableDefaultPropsExceptForClasses + ? unresolvedProps$131 + : resolveDefaultPropsOnNonClassComponent( + type$130, + unresolvedProps$131 + ); + resolvedProps$132 = disableDefaultPropsExceptForClasses + ? resolvedProps$132 + : resolveDefaultPropsOnNonClassComponent( + type$130.type, + resolvedProps$132 + ); + return updateMemoComponent( + current, + workInProgress, + type$130, + resolvedProps$132, + renderLanes ); case 15: return updateSimpleMemoComponent( @@ -7944,48 +8044,161 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: - return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child + var nextChildren$jscomp$3 = workInProgress.pendingProps.children; + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$3, + renderLanes ); + return workInProgress.child; case 31: - props = workInProgress.pendingProps; - renderLanes = workInProgress.mode; - props = { mode: props.mode, children: props.children }; - if (null === current) { - if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((current = canHydrateHydrationBoundary( - current, + var nextProps$jscomp$1 = workInProgress.pendingProps, + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, rootOrSingletonContext - )), - (current = - null !== current && "&" === current.data ? current : null), - null !== current && - ((workInProgress.stateNode = current), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - current.nextSibling - )))) - : (current = null), - null === current) - ) - throw throwOnHydrationMismatch(workInProgress); - renderLanes = mountWorkInProgressOffscreenFiber(props, renderLanes); - renderLanes.ref = workInProgress.ref; - workInProgress.child = renderLanes; - renderLanes.return = workInProgress; - workInProgress = renderLanes; - } else - (renderLanes = createWorkInProgress(current.child, props)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes); - return workInProgress; + ); + var JSCompiler_inline_result$jscomp$1 = + null !== hydratableInstance && "&" === hydratableInstance.data + ? hydratableInstance + : null; + if (null !== JSCompiler_inline_result$jscomp$1) { + workInProgress.memoizedState = { + dehydrated: JSCompiler_inline_result$jscomp$1, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }; + var dehydratedFragment = createFiberFromDehydratedFragment( + JSCompiler_inline_result$jscomp$1 + ); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$1 = JSCompiler_inline_result$jscomp$1; + } else JSCompiler_temp$jscomp$1 = null; + if (null === JSCompiler_temp$jscomp$1) + throw throwOnHydrationMismatch(workInProgress); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$2 = null; + } else + JSCompiler_inline_result$jscomp$2 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var dehydrated = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$3 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$3 = null); + else throw Error(formatProdErrorMessage(558)); + else { + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + var hasContextChanged$100 = + 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged$100) { + var root$101 = workInProgressRoot; + if (null !== root$101) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root$101, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root$101, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$3 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + dehydrated.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$2 = JSCompiler_inline_result$jscomp$3; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$2 = primaryChildFragment$jscomp$0; + } + } + return JSCompiler_inline_result$jscomp$2; case 22: return updateOffscreenComponent( current, @@ -8001,117 +8214,131 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.pendingProps ); case 24: - return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (prevState = createCache()), - (init.pooledCache = prevState), - prevState.refCount++, - null !== prevState && (init.pooledCacheLanes |= renderLanes), - (init = prevState)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (prevState = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = prevState.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + prepareToReadContext(workInProgress); + var parentCache = readContext(CacheContext); + if (null === current) { + var cacheFromPool = peekCacheFromPool(); + if (null !== cacheFromPool) + var JSCompiler_inline_result$jscomp$4 = cacheFromPool; + else { + var root = workInProgressRoot, + freshCache = createCache(); + root.pooledCache = freshCache; + freshCache.refCount++; + null !== freshCache && (root.pooledCacheLanes |= renderLanes); + JSCompiler_inline_result$jscomp$4 = freshCache; + } + var freshCache$jscomp$0 = JSCompiler_inline_result$jscomp$4; + workInProgress.memoizedState = { + parent: parentCache, + cache: freshCache$jscomp$0 + }; + initializeUpdateQueue(workInProgress); + pushProvider(workInProgress, CacheContext, freshCache$jscomp$0); + } else { + 0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()); + var prevState$jscomp$1 = current.memoizedState, + nextState$jscomp$0 = workInProgress.memoizedState; + if (prevState$jscomp$1.parent !== parentCache) { + var derivedState = { parent: parentCache, cache: parentCache }; + workInProgress.memoizedState = derivedState; + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + derivedState); + pushProvider(workInProgress, CacheContext, parentCache); + } else { + var nextCache$jscomp$0 = nextState$jscomp$0.cache; + pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); + nextCache$jscomp$0 !== prevState$jscomp$1.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); + } + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? ((props = workInProgress.pendingProps), - null === current && - ((init = enableTransitionTracing - ? transitionStack.current - : null), - null !== init && - ((init = { - tag: 1, - transitions: new Set(init), - pendingBoundaries: null, - name: props.name, - aborts: null - }), - (workInProgress.stateNode = init), - (workInProgress.flags |= 2048))), - (init = workInProgress.stateNode), - null !== init && pushMarkerInstance(workInProgress, init), - reconcileChildren( - current, - workInProgress, - props.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 30: - if (enableViewTransition) - return ( - (props = workInProgress.pendingProps), - (init = workInProgress.stateNode), - null != props.name && "auto" !== props.name - ? (workInProgress.flags |= null === current ? 18882560 : 18874368) - : (null === init.autoName && - ((prevState = workInProgressRoot.identifierPrefix), - isHydrating - ? ((nextState = getTreeId()), - (prevState = - "\u00ab" + prevState + "T" + nextState + "\u00bb")) - : ((nextState = globalClientIdCounter$1++), - (prevState = - "\u00ab" + - prevState + - "t" + - nextState.toString(32) + - "\u00bb")), - (init.autoName = prevState)), - isHydrating && pushMaterializedTreeId(workInProgress)), - null !== current && current.memoizedProps.name !== props.name - ? (workInProgress.flags |= 4194816) - : markRef(current, workInProgress), + if (enableTransitionTracing) { + if (enableTransitionTracing) { + var nextProps$jscomp$2 = workInProgress.pendingProps; + if (null === current) { + var currentTransitions = enableTransitionTracing + ? transitionStack.current + : null; + if (null !== currentTransitions) { + var markerInstance = { + tag: 1, + transitions: new Set(currentTransitions), + pendingBoundaries: null, + name: nextProps$jscomp$2.name, + aborts: null + }; + workInProgress.stateNode = markerInstance; + workInProgress.flags |= 2048; + } + } + var instance$jscomp$1 = workInProgress.stateNode; + null !== instance$jscomp$1 && + pushMarkerInstance(workInProgress, instance$jscomp$1); reconcileChildren( current, workInProgress, - props.children, + nextProps$jscomp$2.children, renderLanes - ), - workInProgress.child + ); + var JSCompiler_inline_result$jscomp$5 = workInProgress.child; + } else JSCompiler_inline_result$jscomp$5 = null; + return JSCompiler_inline_result$jscomp$5; + } + break; + case 30: + if (enableViewTransition) { + var pendingProps = workInProgress.pendingProps, + instance$jscomp$2 = workInProgress.stateNode; + if (null != pendingProps.name && "auto" !== pendingProps.name) + workInProgress.flags |= null === current ? 18882560 : 18874368; + else { + if (null === instance$jscomp$2.autoName) { + var identifierPrefix = workInProgressRoot.identifierPrefix; + if (isHydrating) { + var treeId = getTreeId(); + var name = "\u00ab" + identifierPrefix + "T" + treeId + "\u00bb"; + } else { + var globalClientId = globalClientIdCounter$1++; + name = + "\u00ab" + + identifierPrefix + + "t" + + globalClientId.toString(32) + + "\u00bb"; + } + instance$jscomp$2.autoName = name; + } + isHydrating && pushMaterializedTreeId(workInProgress); + } + null !== current && current.memoizedProps.name !== pendingProps.name + ? (workInProgress.flags |= 4194816) + : markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + pendingProps.children, + renderLanes ); + return workInProgress.child; + } break; case 29: throw workInProgress.pendingProps; @@ -8290,14 +8517,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$133 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$133 = lastTailNode), + for (var lastTailNode$134 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$134 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$133 + null === lastTailNode$134 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$133.sibling = null); + : (lastTailNode$134.sibling = null); } } function bubbleProperties(completedWork) { @@ -8309,53 +8536,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$135 = completedWork.selfBaseDuration, - child$136 = completedWork.child; - null !== child$136; + var treeBaseDuration$136 = completedWork.selfBaseDuration, + child$137 = completedWork.child; + null !== child$137; ) - (newChildLanes |= child$136.lanes | child$136.childLanes), - (subtreeFlags |= child$136.subtreeFlags & 65011712), - (subtreeFlags |= child$136.flags & 65011712), - (treeBaseDuration$135 += child$136.treeBaseDuration), - (child$136 = child$136.sibling); - completedWork.treeBaseDuration = treeBaseDuration$135; + (newChildLanes |= child$137.lanes | child$137.childLanes), + (subtreeFlags |= child$137.subtreeFlags & 65011712), + (subtreeFlags |= child$137.flags & 65011712), + (treeBaseDuration$136 += child$137.treeBaseDuration), + (child$137 = child$137.sibling); + completedWork.treeBaseDuration = treeBaseDuration$136; } else for ( - treeBaseDuration$135 = completedWork.child; - null !== treeBaseDuration$135; + treeBaseDuration$136 = completedWork.child; + null !== treeBaseDuration$136; ) (newChildLanes |= - treeBaseDuration$135.lanes | treeBaseDuration$135.childLanes), - (subtreeFlags |= treeBaseDuration$135.subtreeFlags & 65011712), - (subtreeFlags |= treeBaseDuration$135.flags & 65011712), - (treeBaseDuration$135.return = completedWork), - (treeBaseDuration$135 = treeBaseDuration$135.sibling); + treeBaseDuration$136.lanes | treeBaseDuration$136.childLanes), + (subtreeFlags |= treeBaseDuration$136.subtreeFlags & 65011712), + (subtreeFlags |= treeBaseDuration$136.flags & 65011712), + (treeBaseDuration$136.return = completedWork), + (treeBaseDuration$136 = treeBaseDuration$136.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$135 = completedWork.actualDuration; - child$136 = completedWork.selfBaseDuration; + treeBaseDuration$136 = completedWork.actualDuration; + child$137 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$135 += child.actualDuration), - (child$136 += child.treeBaseDuration), + (treeBaseDuration$136 += child.actualDuration), + (child$137 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$135; - completedWork.treeBaseDuration = child$136; + completedWork.actualDuration = treeBaseDuration$136; + completedWork.treeBaseDuration = child$137; } else for ( - treeBaseDuration$135 = completedWork.child; - null !== treeBaseDuration$135; + treeBaseDuration$136 = completedWork.child; + null !== treeBaseDuration$136; ) (newChildLanes |= - treeBaseDuration$135.lanes | treeBaseDuration$135.childLanes), - (subtreeFlags |= treeBaseDuration$135.subtreeFlags), - (subtreeFlags |= treeBaseDuration$135.flags), - (treeBaseDuration$135.return = completedWork), - (treeBaseDuration$135 = treeBaseDuration$135.sibling); + treeBaseDuration$136.lanes | treeBaseDuration$136.childLanes), + (subtreeFlags |= treeBaseDuration$136.subtreeFlags), + (subtreeFlags |= treeBaseDuration$136.flags), + (treeBaseDuration$136.return = completedWork), + (treeBaseDuration$136 = treeBaseDuration$136.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8635,11 +8862,52 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= current.treeBaseDuration)); + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8647,28 +8915,30 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) throw Error(formatProdErrorMessage(318)); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) throw Error(formatProdErrorMessage(317)); - type[internalInstanceKey] = workInProgress; + if (!nextResource) throw Error(formatProdErrorMessage(318)); + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error(formatProdErrorMessage(317)); + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); } else resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -8938,6 +9208,20 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -9013,6 +9297,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -9250,8 +9538,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$173) { - captureCommitPhaseError(current, nearestMountedAncestor, error$173); + } catch (error$179) { + captureCommitPhaseError(current, nearestMountedAncestor, error$179); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -9328,8 +9616,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$175) { - captureCommitPhaseError(current, nearestMountedAncestor, error$175); + } catch (error$181) { + captureCommitPhaseError(current, nearestMountedAncestor, error$181); } else ref.current = null; } @@ -9995,15 +10283,18 @@ var offscreenSubtreeIsHidden = !1, viewTransitionContextChanged = !1, rootViewTransitionAffected = !1; function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { root = root.containerInfo; @@ -10030,7 +10321,7 @@ function commitBeforeMutationEffects(root, firstChild, committedLanes) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$235) { + } catch (e$250) { JSCompiler_temp = null; break a; } @@ -10292,11 +10583,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$170) { + } catch (error$176) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$170 + error$176 ); } else { @@ -10314,11 +10605,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$171) { + } catch (error$177) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$171 + error$177 ); } recordEffectDuration(); @@ -10329,11 +10620,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$172) { + } catch (error$178) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$172 + error$178 ); } } @@ -10386,6 +10677,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -10908,6 +11203,31 @@ function commitDeletionEffectsOnFiber( popComponentEffectDuration(prevEffectDuration); componentEffectErrors = prevEffectErrors; } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + retryIfBlockedOn(current); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -10935,6 +11255,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -11304,6 +11625,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -11572,25 +11902,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$176 = hostParentFiber.stateNode; + var parent$182 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$176, ""), (hostParentFiber.flags &= -33)); - var before$177 = getHostSibling(finishedWork); + (setTextContent(parent$182, ""), (hostParentFiber.flags &= -33)); + var before$183 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$177, - parent$176, + before$183, + parent$182, parentFragmentInstances ); break; case 3: case 4: - var parent$178 = hostParentFiber.stateNode.containerInfo, - before$179 = getHostSibling(finishedWork); + var parent$184 = hostParentFiber.stateNode.containerInfo, + before$185 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$179, - parent$178, + before$185, + parent$184, parentFragmentInstances ); break; @@ -11919,6 +12249,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -12273,6 +12613,37 @@ function commitPassiveMountOnFiber( endTime ); break; + case 31: + flags = inHydratedSubtree; + enableComponentPerformanceTrack && + ((isViewTransitionEligible = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null), + (prevProfilerEffectDuration = finishedWork.memoizedState), + null !== isViewTransitionEligible && null === prevProfilerEffectDuration + ? ((prevProfilerEffectDuration = finishedWork.deletions), + null !== prevProfilerEffectDuration && + 0 < prevProfilerEffectDuration.length && + 18 === prevProfilerEffectDuration[0].tag + ? ((inHydratedSubtree = !1), + null !== isViewTransitionEligible.hydrationErrors && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1)); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + enableComponentPerformanceTrack && (inHydratedSubtree = flags); + break; case 13: flags = inHydratedSubtree; enableComponentPerformanceTrack && @@ -12556,9 +12927,9 @@ function reconnectPassiveEffects( ); break; case 22: - var instance$207 = finishedWork.stateNode; + var instance$222 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$207._visibility & 2 + ? instance$222._visibility & 2 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12574,7 +12945,7 @@ function reconnectPassiveEffects( committedTransitions, endTime ) - : ((instance$207._visibility |= 2), + : ((instance$222._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12588,7 +12959,7 @@ function reconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$207 + instance$222 ); break; case 24: @@ -14082,8 +14453,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$223) { - handleThrow(root, thrownValue$223); + } catch (thrownValue$238) { + handleThrow(root, thrownValue$238); } while (1); lanes && root.shellSuspendCounter++; @@ -14210,8 +14581,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$225) { - handleThrow(root, thrownValue$225); + } catch (thrownValue$240) { + handleThrow(root, thrownValue$240); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -15078,6 +15449,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -15424,6 +15796,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -15596,18 +15973,27 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$233 = 0; - 31 > index$233; - index$233++ + var map = new Map(), lane = 1, index$248 = 0; + 31 > index$248; + index$248++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -16553,20 +16939,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1939 = 0; - i$jscomp$inline_1939 < simpleEventPluginEvents.length; - i$jscomp$inline_1939++ + var i$jscomp$inline_1985 = 0; + i$jscomp$inline_1985 < simpleEventPluginEvents.length; + i$jscomp$inline_1985++ ) { - var eventName$jscomp$inline_1940 = - simpleEventPluginEvents[i$jscomp$inline_1939], - domEventName$jscomp$inline_1941 = - eventName$jscomp$inline_1940.toLowerCase(), - capitalizedEvent$jscomp$inline_1942 = - eventName$jscomp$inline_1940[0].toUpperCase() + - eventName$jscomp$inline_1940.slice(1); + var eventName$jscomp$inline_1986 = + simpleEventPluginEvents[i$jscomp$inline_1985], + domEventName$jscomp$inline_1987 = + eventName$jscomp$inline_1986.toLowerCase(), + capitalizedEvent$jscomp$inline_1988 = + eventName$jscomp$inline_1986[0].toUpperCase() + + eventName$jscomp$inline_1986.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1941, - "on" + capitalizedEvent$jscomp$inline_1942 + domEventName$jscomp$inline_1987, + "on" + capitalizedEvent$jscomp$inline_1988 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -17929,34 +18315,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$249 = props[hasSrc]; - if (null != propValue$249) + var propValue$264 = props[hasSrc]; + if (null != propValue$264) switch (hasSrc) { case "name": - hasSrcSet = propValue$249; + hasSrcSet = propValue$264; break; case "type": - propKey = propValue$249; + propKey = propValue$264; break; case "checked": - checked = propValue$249; + checked = propValue$264; break; case "defaultChecked": - defaultChecked = propValue$249; + defaultChecked = propValue$264; break; case "value": - propValue = propValue$249; + propValue = propValue$264; break; case "defaultValue": - defaultValue = propValue$249; + defaultValue = propValue$264; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$249) + if (null != propValue$264) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$249, props, null); + setProp(domElement, tag, hasSrc, propValue$264, props, null); } } initInput( @@ -18094,14 +18480,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$249 in props) - props.hasOwnProperty(propValue$249) && - ((hasSrc = props[propValue$249]), + for (propValue$264 in props) + props.hasOwnProperty(propValue$264) && + ((hasSrc = props[propValue$264]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$249, + propValue$264, hasSrc, props, void 0 @@ -18149,14 +18535,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$266 in nextProps) { - var propKey = nextProps[propKey$266]; - lastProp = lastProps[propKey$266]; + for (var propKey$281 in nextProps) { + var propKey = nextProps[propKey$281]; + lastProp = lastProps[propKey$281]; if ( - nextProps.hasOwnProperty(propKey$266) && + nextProps.hasOwnProperty(propKey$281) && (null != propKey || null != lastProp) ) - switch (propKey$266) { + switch (propKey$281) { case "type": propKey !== lastProp && trackHostMutation(); type = propKey; @@ -18191,7 +18577,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$266, + propKey$281, propKey, nextProps, lastProp @@ -18210,7 +18596,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$266 = null; + propKey = value = defaultValue = propKey$281 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -18242,7 +18628,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && trackHostMutation(); - propKey$266 = type; + propKey$281 = type; break; case "defaultValue": type !== lastDefaultValue && trackHostMutation(); @@ -18264,15 +18650,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$266 - ? updateOptions(domElement, !!lastProps, propKey$266, !1) + null != propKey$281 + ? updateOptions(domElement, !!lastProps, propKey$281, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$266 = null; + propKey = propKey$281 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -18297,7 +18683,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && trackHostMutation(); - propKey$266 = name; + propKey$281 = name; break; case "defaultValue": name !== type && trackHostMutation(); @@ -18312,17 +18698,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$266, propKey); + updateTextarea(domElement, propKey$281, propKey); return; case "option": - for (var propKey$282 in lastProps) + for (var propKey$297 in lastProps) if ( - ((propKey$266 = lastProps[propKey$282]), - lastProps.hasOwnProperty(propKey$282) && - null != propKey$266 && - !nextProps.hasOwnProperty(propKey$282)) + ((propKey$281 = lastProps[propKey$297]), + lastProps.hasOwnProperty(propKey$297) && + null != propKey$281 && + !nextProps.hasOwnProperty(propKey$297)) ) - switch (propKey$282) { + switch (propKey$297) { case "selected": domElement.selected = !1; break; @@ -18330,34 +18716,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$282, + propKey$297, null, nextProps, - propKey$266 + propKey$281 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$266 = nextProps[lastDefaultValue]), + ((propKey$281 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$266 !== propKey && - (null != propKey$266 || null != propKey)) + propKey$281 !== propKey && + (null != propKey$281 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$266 !== propKey && trackHostMutation(); + propKey$281 !== propKey && trackHostMutation(); domElement.selected = - propKey$266 && - "function" !== typeof propKey$266 && - "symbol" !== typeof propKey$266; + propKey$281 && + "function" !== typeof propKey$281 && + "symbol" !== typeof propKey$281; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$266, + propKey$281, nextProps, propKey ); @@ -18378,24 +18764,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$287 in lastProps) - (propKey$266 = lastProps[propKey$287]), - lastProps.hasOwnProperty(propKey$287) && - null != propKey$266 && - !nextProps.hasOwnProperty(propKey$287) && - setProp(domElement, tag, propKey$287, null, nextProps, propKey$266); + for (var propKey$302 in lastProps) + (propKey$281 = lastProps[propKey$302]), + lastProps.hasOwnProperty(propKey$302) && + null != propKey$281 && + !nextProps.hasOwnProperty(propKey$302) && + setProp(domElement, tag, propKey$302, null, nextProps, propKey$281); for (checked in nextProps) if ( - ((propKey$266 = nextProps[checked]), + ((propKey$281 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$266 !== propKey && - (null != propKey$266 || null != propKey)) + propKey$281 !== propKey && + (null != propKey$281 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$266) + if (null != propKey$281) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -18403,7 +18789,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$266, + propKey$281, nextProps, propKey ); @@ -18411,49 +18797,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$292 in lastProps) - (propKey$266 = lastProps[propKey$292]), - lastProps.hasOwnProperty(propKey$292) && - void 0 !== propKey$266 && - !nextProps.hasOwnProperty(propKey$292) && + for (var propKey$307 in lastProps) + (propKey$281 = lastProps[propKey$307]), + lastProps.hasOwnProperty(propKey$307) && + void 0 !== propKey$281 && + !nextProps.hasOwnProperty(propKey$307) && setPropOnCustomElement( domElement, tag, - propKey$292, + propKey$307, void 0, nextProps, - propKey$266 + propKey$281 ); for (defaultChecked in nextProps) - (propKey$266 = nextProps[defaultChecked]), + (propKey$281 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$266 === propKey || - (void 0 === propKey$266 && void 0 === propKey) || + propKey$281 === propKey || + (void 0 === propKey$281 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$266, + propKey$281, nextProps, propKey ); return; } } - for (var propKey$297 in lastProps) - (propKey$266 = lastProps[propKey$297]), - lastProps.hasOwnProperty(propKey$297) && - null != propKey$266 && - !nextProps.hasOwnProperty(propKey$297) && - setProp(domElement, tag, propKey$297, null, nextProps, propKey$266); + for (var propKey$312 in lastProps) + (propKey$281 = lastProps[propKey$312]), + lastProps.hasOwnProperty(propKey$312) && + null != propKey$281 && + !nextProps.hasOwnProperty(propKey$312) && + setProp(domElement, tag, propKey$312, null, nextProps, propKey$281); for (lastProp in nextProps) - (propKey$266 = nextProps[lastProp]), + (propKey$281 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$266 === propKey || - (null == propKey$266 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$266, nextProps, propKey); + propKey$281 === propKey || + (null == propKey$281 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$281, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -19630,26 +20016,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$309 = getResourcesFromRoot( + var styles$324 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$310 = styles$309.get(type); - resource$310 || + resource$325 = styles$324.get(type); + resource$325 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$310 = { + (resource$325 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$309.set(type, resource$310), - (styles$309 = JSCompiler_inline_result.querySelector( + styles$324.set(type, resource$325), + (styles$324 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$309._p && - ((resource$310.instance = styles$309), - (resource$310.state.loading = 5)), + !styles$324._p && + ((resource$325.instance = styles$324), + (resource$325.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -19662,16 +20048,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$309 || + styles$324 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$310.state + resource$325.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$310; + return resource$325; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -19768,37 +20154,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$315 = hoistableRoot.querySelector( + var instance$330 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$315) + if (instance$330) return ( (resource.state.loading |= 4), - (resource.instance = instance$315), - markNodeAsHoistable(instance$315), - instance$315 + (resource.instance = instance$330), + markNodeAsHoistable(instance$330), + instance$330 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$315 = ( + instance$330 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$315); - var linkInstance = instance$315; + markNodeAsHoistable(instance$330); + var linkInstance = instance$330; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$315, "link", instance); + setInitialProperties(instance$330, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$315, props.precedence, hoistableRoot); - return (resource.instance = instance$315); + insertStylesheet(instance$330, props.precedence, hoistableRoot); + return (resource.instance = instance$330); case "script": - instance$315 = getScriptKey(props.src); + instance$330 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$315) + getScriptSelectorFromKey(instance$330) )) ) return ( @@ -19807,7 +20193,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$315))) + if ((styleProps = preloadPropsMap.get(instance$330))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -20377,19 +20763,22 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -20652,6 +21041,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -20698,8 +21088,11 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -20840,16 +21233,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_2184 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2229 = React.version; if ( - "19.2.0-www-modern-17f88c80-20250422" !== - isomorphicReactPackageVersion$jscomp$inline_2184 + "19.2.0-www-modern-3ef31d19-20250422" !== + isomorphicReactPackageVersion$jscomp$inline_2229 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_2184, - "19.2.0-www-modern-17f88c80-20250422" + isomorphicReactPackageVersion$jscomp$inline_2229, + "19.2.0-www-modern-3ef31d19-20250422" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -20865,27 +21258,27 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2186 = { +var internals$jscomp$inline_2231 = { bundleType: 0, - version: "19.2.0-www-modern-17f88c80-20250422", + version: "19.2.0-www-modern-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422" }; enableSchedulingProfiler && - ((internals$jscomp$inline_2186.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_2186.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_2231.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_2231.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2768 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2823 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2768.isDisabled && - hook$jscomp$inline_2768.supportsFiber + !hook$jscomp$inline_2823.isDisabled && + hook$jscomp$inline_2823.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2768.inject( - internals$jscomp$inline_2186 + (rendererID = hook$jscomp$inline_2823.inject( + internals$jscomp$inline_2231 )), - (injectedHook = hook$jscomp$inline_2768); + (injectedHook = hook$jscomp$inline_2823); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -21237,7 +21630,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-www-modern-17f88c80-20250422"; +exports.version = "19.2.0-www-modern-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index 63c12f42df..9020c5063b 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -5591,16 +5591,14 @@ __DEV__ && renderNode(request, task, props.children, -1); task.keyPath = prevKeyPath$jscomp$2; } - } else { + } else if ("hidden" !== props.mode) { request.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("\x3c!--&--\x3e"); segment$jscomp$0.lastPushedText = !1; - if ("hidden" !== props.mode) { - var _prevKeyPath3 = task.keyPath; - task.keyPath = keyPath; - renderNode(request, task, props.children, -1); - task.keyPath = _prevKeyPath3; - } + var _prevKeyPath3 = task.keyPath; + task.keyPath = keyPath; + renderNode(request, task, props.children, -1); + task.keyPath = _prevKeyPath3; request.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("\x3c!--/&--\x3e"); segment$jscomp$0.lastPushedText = !1; @@ -9440,5 +9438,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.2.0-www-classic-17f88c80-20250422"; + exports.version = "19.2.0-www-classic-3ef31d19-20250422"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 85989c8107..f9f5291b85 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -5530,16 +5530,14 @@ __DEV__ && renderNode(request, task, props.children, -1); task.keyPath = prevKeyPath$jscomp$2; } - } else { + } else if ("hidden" !== props.mode) { request.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("\x3c!--&--\x3e"); segment$jscomp$0.lastPushedText = !1; - if ("hidden" !== props.mode) { - var _prevKeyPath3 = task.keyPath; - task.keyPath = keyPath; - renderNode(request, task, props.children, -1); - task.keyPath = _prevKeyPath3; - } + var _prevKeyPath3 = task.keyPath; + task.keyPath = keyPath; + renderNode(request, task, props.children, -1); + task.keyPath = _prevKeyPath3; request.renderState.generateStaticMarkup || segment$jscomp$0.chunks.push("\x3c!--/&--\x3e"); segment$jscomp$0.lastPushedText = !1; @@ -9369,5 +9367,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.2.0-www-modern-17f88c80-20250422"; + exports.version = "19.2.0-www-modern-3ef31d19-20250422"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 63274c170e..faf79a46e3 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -4324,14 +4324,14 @@ function renderElement(request, task, keyPath, type, props, ref) { (task.keyPath = keyPath), renderNode(request, task, props.children, -1), (task.keyPath = type)) - : (request.renderState.generateStaticMarkup || + : "hidden" !== props.mode && + (request.renderState.generateStaticMarkup || type.chunks.push("\x3c!--&--\x3e"), (type.lastPushedText = !1), - "hidden" !== props.mode && - ((contextKey = task.keyPath), - (task.keyPath = keyPath), - renderNode(request, task, props.children, -1), - (task.keyPath = contextKey)), + (contextKey = task.keyPath), + (task.keyPath = keyPath), + renderNode(request, task, props.children, -1), + (task.keyPath = contextKey), request.renderState.generateStaticMarkup || type.chunks.push("\x3c!--/&--\x3e"), (type.lastPushedText = !1)); @@ -6200,4 +6200,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.2.0-www-classic-17f88c80-20250422"; +exports.version = "19.2.0-www-classic-3ef31d19-20250422"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 215486e221..8c8746ae5b 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -4257,14 +4257,14 @@ function renderElement(request, task, keyPath, type, props, ref) { (task.keyPath = keyPath), renderNode(request, task, props.children, -1), (task.keyPath = type)) - : (request.renderState.generateStaticMarkup || + : "hidden" !== props.mode && + (request.renderState.generateStaticMarkup || type.chunks.push("\x3c!--&--\x3e"), (type.lastPushedText = !1), - "hidden" !== props.mode && - ((newProps = task.keyPath), - (task.keyPath = keyPath), - renderNode(request, task, props.children, -1), - (task.keyPath = newProps)), + (newProps = task.keyPath), + (task.keyPath = keyPath), + renderNode(request, task, props.children, -1), + (task.keyPath = newProps), request.renderState.generateStaticMarkup || type.chunks.push("\x3c!--/&--\x3e"), (type.lastPushedText = !1)); @@ -6112,4 +6112,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.2.0-www-modern-17f88c80-20250422"; +exports.version = "19.2.0-www-modern-3ef31d19-20250422"; diff --git a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js index 6bc855702c..67cc03c5d9 100644 --- a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js @@ -5259,15 +5259,13 @@ __DEV__ && renderNode(request, task, props.children, -1); task.keyPath = prevKeyPath$jscomp$2; } - } else { + } else if ("hidden" !== props.mode) { segment$jscomp$0.chunks.push("\x3c!--&--\x3e"); segment$jscomp$0.lastPushedText = !1; - if ("hidden" !== props.mode) { - var _prevKeyPath3 = task.keyPath; - task.keyPath = keyPath; - renderNode(request, task, props.children, -1); - task.keyPath = _prevKeyPath3; - } + var _prevKeyPath3 = task.keyPath; + task.keyPath = keyPath; + renderNode(request, task, props.children, -1); + task.keyPath = _prevKeyPath3; segment$jscomp$0.chunks.push("\x3c!--/&--\x3e"); segment$jscomp$0.lastPushedText = !1; } diff --git a/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js b/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js index 3e7ddbfc6b..63141a46e4 100644 --- a/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js @@ -4100,13 +4100,13 @@ function renderElement(request, task, keyPath, type, props, ref) { (task.keyPath = keyPath), renderNode(request, task, props.children, -1), (task.keyPath = type)) - : (type.chunks.push("\x3c!--&--\x3e"), + : "hidden" !== props.mode && + (type.chunks.push("\x3c!--&--\x3e"), (type.lastPushedText = !1), - "hidden" !== props.mode && - ((newProps = task.keyPath), - (task.keyPath = keyPath), - renderNode(request, task, props.children, -1), - (task.keyPath = newProps)), + (newProps = task.keyPath), + (task.keyPath = keyPath), + renderNode(request, task, props.children, -1), + (task.keyPath = newProps), type.chunks.push("\x3c!--/&--\x3e"), (type.lastPushedText = !1)); return; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index ad8c88f5da..bc98128119 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -139,6 +139,16 @@ __DEV__ && } return null; } + function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; + } function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error("Unable to find node on an unmounted component."); @@ -637,6 +647,16 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -3578,6 +3598,21 @@ __DEV__ && (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function getSuspendedTreeContext() { + warnIfNotHydrating(); + return null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null; + } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function warnIfNotHydrating() { isHydrating || console.error( @@ -3625,6 +3660,12 @@ __DEV__ && siblings.push(distanceFromLeaf); return distanceFromLeaf; } + function warnIfHydrating() { + isHydrating && + console.error( + "We should not be hydrating here. This is a bug in React. Please file a bug." + ); + } function warnNonHydratedInstance(fiber, rejectedCandidate) { didSuspendOrErrorDEV || ((fiber = buildHydrationDiffNode(fiber, 0)), @@ -3751,6 +3792,7 @@ __DEV__ && for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -3758,8 +3800,6 @@ __DEV__ && case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -3801,20 +3841,26 @@ __DEV__ && ); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) + throw Error( + "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." + ); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -6480,6 +6526,11 @@ __DEV__ && handler ); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -8552,6 +8603,7 @@ __DEV__ && sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -9041,10 +9093,19 @@ __DEV__ && renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -9056,17 +9117,6 @@ __DEV__ && renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -9112,6 +9162,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -9909,23 +9995,24 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2914; - var JSCompiler_object_inline_stack_2915 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2964; + var JSCompiler_object_inline_stack_2965 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var showFallback = !1, - didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2914 = didSuspend) || - (JSCompiler_object_inline_digest_2914 = + var JSCompiler_object_inline_message_2963 = !1; + var didSuspend = 0 !== (workInProgress.flags & 128); + (JSCompiler_object_inline_digest_2964 = didSuspend) || + (JSCompiler_object_inline_digest_2964 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2914 && - ((showFallback = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2914 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2964 && + ((JSCompiler_object_inline_message_2963 = !0), + (workInProgress.flags &= -129)); + JSCompiler_object_inline_digest_2964 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - showFallback + JSCompiler_object_inline_message_2963 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); (current = nextHydratableInstance) @@ -9938,25 +10025,18 @@ __DEV__ && ? renderLanes : null), null !== renderLanes && - (warnIfNotHydrating(), - (workInProgress.memoizedState = { + ((JSCompiler_object_inline_digest_2964 = { dehydrated: renderLanes, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, + treeContext: getSuspendedTreeContext(), retryLane: 536870912, hydrationErrors: null }), - (JSCompiler_object_inline_digest_2914 = createFiber( - 18, - null, - null, - NoMode - )), - (JSCompiler_object_inline_digest_2914.stateNode = renderLanes), - (JSCompiler_object_inline_digest_2914.return = workInProgress), - (workInProgress.child = JSCompiler_object_inline_digest_2914), + (workInProgress.memoizedState = + JSCompiler_object_inline_digest_2964), + (JSCompiler_object_inline_digest_2964 = + createFiberFromDehydratedFragment(renderLanes)), + (JSCompiler_object_inline_digest_2964.return = workInProgress), + (workInProgress.child = JSCompiler_object_inline_digest_2964), (hydrationParentFiber = workInProgress), (nextHydratableInstance = null))) : (renderLanes = null); @@ -9970,29 +10050,26 @@ __DEV__ && : (workInProgress.lanes = 536870912); return null; } - var JSCompiler_object_inline_componentStack_2916 = - JSCompiler_object_inline_stack_2915.children; - var nextFallbackChildren = JSCompiler_object_inline_stack_2915.fallback; - if (showFallback) + var nextPrimaryChildren = JSCompiler_object_inline_stack_2965.children, + nextFallbackChildren = JSCompiler_object_inline_stack_2965.fallback; + if (JSCompiler_object_inline_message_2963) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2915 = + (JSCompiler_object_inline_stack_2965 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_componentStack_2916, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_componentStack_2916 = - workInProgress.child), - (JSCompiler_object_inline_componentStack_2916.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2916.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2914, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2964, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), enableTransitionTracing && ((workInProgress = enableTransitionTracing @@ -10002,307 +10079,271 @@ __DEV__ && ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (renderLanes = - JSCompiler_object_inline_componentStack_2916.updateQueue), + (renderLanes = nextPrimaryChildren.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2916.updateQueue = - { - transitions: workInProgress, - markerInstances: current, - retryQueue: null - }) + ? (nextPrimaryChildren.updateQueue = { + transitions: workInProgress, + markerInstances: current, + retryQueue: null + }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2915 + JSCompiler_object_inline_stack_2965 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2915.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2965.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2915 = + (JSCompiler_object_inline_stack_2965 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_componentStack_2916, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_componentStack_2916 = - workInProgress.child), - (JSCompiler_object_inline_componentStack_2916.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2916.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2914, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2964, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2915 + JSCompiler_object_inline_stack_2965 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_componentStack_2916 + nextPrimaryChildren ); } - var JSCompiler_object_inline_message_2913 = current.memoizedState; - if ( - null !== JSCompiler_object_inline_message_2913 && - ((JSCompiler_object_inline_componentStack_2916 = - JSCompiler_object_inline_message_2913.dehydrated), - null !== JSCompiler_object_inline_componentStack_2916) - ) { - if (didSuspend) - workInProgress.flags & 256 - ? (pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ))) - : null !== workInProgress.memoizedState - ? (reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - (workInProgress = null)) - : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2916 = - JSCompiler_object_inline_stack_2915.fallback), - (nextFallbackChildren = workInProgress.mode), - (JSCompiler_object_inline_stack_2915 = - mountWorkInProgressOffscreenFiber( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2915.children - }, - nextFallbackChildren - )), - (JSCompiler_object_inline_componentStack_2916 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2916, + var prevState = current.memoizedState; + if (null !== prevState) { + var JSCompiler_object_inline_componentStack_2966 = prevState.dehydrated; + if (null !== JSCompiler_object_inline_componentStack_2966) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (nextPrimaryChildren = + JSCompiler_object_inline_stack_2965.fallback), + (nextFallbackChildren = workInProgress.mode), + (JSCompiler_object_inline_stack_2965 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2965.children + }, + nextFallbackChildren + )), + (nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, nextFallbackChildren, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2916.flags |= 2), - (JSCompiler_object_inline_stack_2915.return = workInProgress), - (JSCompiler_object_inline_componentStack_2916.return = - workInProgress), - (JSCompiler_object_inline_stack_2915.sibling = - JSCompiler_object_inline_componentStack_2916), - (workInProgress.child = JSCompiler_object_inline_stack_2915), - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2915 = workInProgress.child), - (JSCompiler_object_inline_stack_2915.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2915.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2914, + (nextPrimaryChildren.flags |= 2), + (JSCompiler_object_inline_stack_2965.return = workInProgress), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2965.sibling = + nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2965), + reconcileChildFibers( + workInProgress, + current.child, + null, renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = - JSCompiler_object_inline_componentStack_2916)); - else if ( - (pushPrimaryTreeSuspenseHandler(workInProgress), - isHydrating && - console.error( - "We should not be hydrating here. This is a bug in React. Please file a bug." - ), - isSuspenseInstanceFallback( - JSCompiler_object_inline_componentStack_2916 - )) - ) { - JSCompiler_object_inline_digest_2914 = - JSCompiler_object_inline_componentStack_2916.nextSibling && - JSCompiler_object_inline_componentStack_2916.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2914) { - nextFallbackChildren = JSCompiler_object_inline_digest_2914.dgst; - var message = JSCompiler_object_inline_digest_2914.msg; - var componentStack = JSCompiler_object_inline_digest_2914.stck; - var componentStack$jscomp$0 = - JSCompiler_object_inline_digest_2914.cstck; - } - JSCompiler_object_inline_message_2913 = message; - JSCompiler_object_inline_digest_2914 = nextFallbackChildren; - JSCompiler_object_inline_stack_2915 = componentStack; - JSCompiler_object_inline_componentStack_2916 = - componentStack$jscomp$0; - nextFallbackChildren = JSCompiler_object_inline_message_2913; - componentStack = JSCompiler_object_inline_componentStack_2916; - JSCompiler_object_inline_componentStack_2916 = nextFallbackChildren - ? Error(nextFallbackChildren) - : Error( - "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ), + (JSCompiler_object_inline_stack_2965 = workInProgress.child), + (JSCompiler_object_inline_stack_2965.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_stack_2965.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2964, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = nextPrimaryChildren)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + warnIfHydrating(), + isSuspenseInstanceFallback( + JSCompiler_object_inline_componentStack_2966 + )) + ) { + JSCompiler_object_inline_digest_2964 = + JSCompiler_object_inline_componentStack_2966.nextSibling && + JSCompiler_object_inline_componentStack_2966.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2964) { + nextPrimaryChildren = JSCompiler_object_inline_digest_2964.dgst; + var message = JSCompiler_object_inline_digest_2964.msg; + nextFallbackChildren = JSCompiler_object_inline_digest_2964.stck; + var componentStack = JSCompiler_object_inline_digest_2964.cstck; + } + JSCompiler_object_inline_message_2963 = message; + JSCompiler_object_inline_digest_2964 = nextPrimaryChildren; + JSCompiler_object_inline_stack_2965 = nextFallbackChildren; + JSCompiler_object_inline_componentStack_2966 = componentStack; + nextPrimaryChildren = JSCompiler_object_inline_message_2963; + nextFallbackChildren = JSCompiler_object_inline_componentStack_2966; + nextPrimaryChildren = nextPrimaryChildren + ? Error(nextPrimaryChildren) + : Error( + "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ); + nextPrimaryChildren.stack = + JSCompiler_object_inline_stack_2965 || ""; + nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2964; + JSCompiler_object_inline_digest_2964 = + void 0 === nextFallbackChildren ? null : nextFallbackChildren; + JSCompiler_object_inline_stack_2965 = { + value: nextPrimaryChildren, + source: null, + stack: JSCompiler_object_inline_digest_2964 + }; + "string" === typeof JSCompiler_object_inline_digest_2964 && + CapturedStacks.set( + nextPrimaryChildren, + JSCompiler_object_inline_stack_2965 ); - JSCompiler_object_inline_componentStack_2916.stack = - JSCompiler_object_inline_stack_2915 || ""; - JSCompiler_object_inline_componentStack_2916.digest = - JSCompiler_object_inline_digest_2914; - JSCompiler_object_inline_digest_2914 = - void 0 === componentStack ? null : componentStack; - JSCompiler_object_inline_stack_2915 = { - value: JSCompiler_object_inline_componentStack_2916, - source: null, - stack: JSCompiler_object_inline_digest_2914 - }; - "string" === typeof JSCompiler_object_inline_digest_2914 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_2916, - JSCompiler_object_inline_stack_2915 - ); - queueHydrationError(JSCompiler_object_inline_stack_2915); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else if ( - (didReceiveUpdate || - propagateParentContextChanges( + queueHydrationError(JSCompiler_object_inline_stack_2965); + workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, - renderLanes, - !1 - ), - (JSCompiler_object_inline_digest_2914 = - 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2914) - ) { - JSCompiler_object_inline_digest_2914 = workInProgressRoot; - if ( - null !== JSCompiler_object_inline_digest_2914 && - ((JSCompiler_object_inline_stack_2915 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2915 = - 0 !== (JSCompiler_object_inline_stack_2915 & 42) - ? 1 - : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2915 - )), - (JSCompiler_object_inline_stack_2915 = - 0 !== - (JSCompiler_object_inline_stack_2915 & - (JSCompiler_object_inline_digest_2914.suspendedLanes | - renderLanes)) - ? 0 - : JSCompiler_object_inline_stack_2915), - 0 !== JSCompiler_object_inline_stack_2915 && - JSCompiler_object_inline_stack_2915 !== - JSCompiler_object_inline_message_2913.retryLane) - ) - throw ( - ((JSCompiler_object_inline_message_2913.retryLane = - JSCompiler_object_inline_stack_2915), - enqueueConcurrentRenderForLane( - current, - JSCompiler_object_inline_stack_2915 - ), - scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2914, - current, - JSCompiler_object_inline_stack_2915 - ), - SelectiveHydrationException) + renderLanes ); - JSCompiler_object_inline_componentStack_2916.data === - SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else - JSCompiler_object_inline_componentStack_2916.data === - SUSPENSE_PENDING_START_DATA - ? ((workInProgress.flags |= 192), - (workInProgress.child = current.child), - (workInProgress = null)) - : ((current = JSCompiler_object_inline_message_2913.treeContext), - (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_componentStack_2916.nextSibling - )), - (hydrationParentFiber = workInProgress), - (isHydrating = !0), - (hydrationErrors = null), - (didSuspendOrErrorDEV = !1), - (hydrationDiffRootDEV = null), - (rootOrSingletonContext = !1), - null !== current && - (warnIfNotHydrating(), - (idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), - (workInProgress = mountSuspensePrimaryChildren( + } else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - JSCompiler_object_inline_stack_2915.children + renderLanes, + !1 + ), + (JSCompiler_object_inline_digest_2964 = + 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_object_inline_digest_2964) + ) { + JSCompiler_object_inline_digest_2964 = workInProgressRoot; + if ( + null !== JSCompiler_object_inline_digest_2964 && + ((JSCompiler_object_inline_stack_2965 = getBumpedLaneForHydration( + JSCompiler_object_inline_digest_2964, + renderLanes )), - (workInProgress.flags |= 4096)); - return workInProgress; + 0 !== JSCompiler_object_inline_stack_2965 && + JSCompiler_object_inline_stack_2965 !== prevState.retryLane) + ) + throw ( + ((prevState.retryLane = JSCompiler_object_inline_stack_2965), + enqueueConcurrentRenderForLane( + current, + JSCompiler_object_inline_stack_2965 + ), + scheduleUpdateOnFiber( + JSCompiler_object_inline_digest_2964, + current, + JSCompiler_object_inline_stack_2965 + ), + SelectiveHydrationException) + ); + JSCompiler_object_inline_componentStack_2966.data === + SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + JSCompiler_object_inline_componentStack_2966.data === + SUSPENSE_PENDING_START_DATA + ? ((workInProgress.flags |= 192), + (workInProgress.child = current.child), + (workInProgress = null)) + : ((current = prevState.treeContext), + (nextHydratableInstance = getNextHydratable( + JSCompiler_object_inline_componentStack_2966.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== current && + restoreSuspendedTreeContext(workInProgress, current), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + JSCompiler_object_inline_stack_2965.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; + } } - if (showFallback) + if (JSCompiler_object_inline_message_2963) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2916 = - JSCompiler_object_inline_stack_2915.fallback), + (nextPrimaryChildren = JSCompiler_object_inline_stack_2965.fallback), (nextFallbackChildren = workInProgress.mode), (componentStack = current.child), - (componentStack$jscomp$0 = componentStack.sibling), - (JSCompiler_object_inline_stack_2915 = createWorkInProgress( + (JSCompiler_object_inline_componentStack_2966 = + componentStack.sibling), + (JSCompiler_object_inline_stack_2965 = createWorkInProgress( componentStack, { mode: "hidden", - children: JSCompiler_object_inline_stack_2915.children + children: JSCompiler_object_inline_stack_2965.children } )), - (JSCompiler_object_inline_stack_2915.subtreeFlags = + (JSCompiler_object_inline_stack_2965.subtreeFlags = componentStack.subtreeFlags & 65011712), - null !== componentStack$jscomp$0 - ? (JSCompiler_object_inline_componentStack_2916 = - createWorkInProgress( - componentStack$jscomp$0, - JSCompiler_object_inline_componentStack_2916 - )) - : ((JSCompiler_object_inline_componentStack_2916 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2916, - nextFallbackChildren, - renderLanes, - null - )), - (JSCompiler_object_inline_componentStack_2916.flags |= 2)), - (JSCompiler_object_inline_componentStack_2916.return = - workInProgress), - (JSCompiler_object_inline_stack_2915.return = workInProgress), - (JSCompiler_object_inline_stack_2915.sibling = - JSCompiler_object_inline_componentStack_2916), - (workInProgress.child = JSCompiler_object_inline_stack_2915), - (JSCompiler_object_inline_stack_2915 = - JSCompiler_object_inline_componentStack_2916), - (JSCompiler_object_inline_componentStack_2916 = workInProgress.child), + null !== JSCompiler_object_inline_componentStack_2966 + ? (nextPrimaryChildren = createWorkInProgress( + JSCompiler_object_inline_componentStack_2966, + nextPrimaryChildren + )) + : ((nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, + nextFallbackChildren, + renderLanes, + null + )), + (nextPrimaryChildren.flags |= 2)), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2965.return = workInProgress), + (JSCompiler_object_inline_stack_2965.sibling = nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2965), + (JSCompiler_object_inline_stack_2965 = nextPrimaryChildren), + (nextPrimaryChildren = workInProgress.child), (nextFallbackChildren = current.child.memoizedState), null === nextFallbackChildren ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) : ((componentStack = nextFallbackChildren.cachePool), null !== componentStack - ? ((componentStack$jscomp$0 = CacheContext._currentValue), + ? ((JSCompiler_object_inline_componentStack_2966 = + CacheContext._currentValue), (componentStack = - componentStack.parent !== componentStack$jscomp$0 + componentStack.parent !== + JSCompiler_object_inline_componentStack_2966 ? { - parent: componentStack$jscomp$0, - pool: componentStack$jscomp$0 + parent: JSCompiler_object_inline_componentStack_2966, + pool: JSCompiler_object_inline_componentStack_2966 } : componentStack)) : (componentStack = getSuspendedCache()), @@ -10310,8 +10351,7 @@ __DEV__ && baseLanes: nextFallbackChildren.baseLanes | renderLanes, cachePool: componentStack })), - (JSCompiler_object_inline_componentStack_2916.memoizedState = - nextFallbackChildren), + (nextPrimaryChildren.memoizedState = nextFallbackChildren), enableTransitionTracing && ((nextFallbackChildren = enableTransitionTracing ? transitionStack.current @@ -10320,54 +10360,52 @@ __DEV__ && ((componentStack = enableTransitionTracing ? markerInstanceStack.current : null), - (componentStack$jscomp$0 = - JSCompiler_object_inline_componentStack_2916.updateQueue), - (JSCompiler_object_inline_message_2913 = current.updateQueue), - null === componentStack$jscomp$0 - ? (JSCompiler_object_inline_componentStack_2916.updateQueue = { + (JSCompiler_object_inline_componentStack_2966 = + nextPrimaryChildren.updateQueue), + (JSCompiler_object_inline_message_2963 = current.updateQueue), + null === JSCompiler_object_inline_componentStack_2966 + ? (nextPrimaryChildren.updateQueue = { transitions: nextFallbackChildren, markerInstances: componentStack, retryQueue: null }) - : componentStack$jscomp$0 === - JSCompiler_object_inline_message_2913 - ? (JSCompiler_object_inline_componentStack_2916.updateQueue = - { - transitions: nextFallbackChildren, - markerInstances: componentStack, - retryQueue: - null !== JSCompiler_object_inline_message_2913 - ? JSCompiler_object_inline_message_2913.retryQueue - : null - }) - : ((componentStack$jscomp$0.transitions = + : JSCompiler_object_inline_componentStack_2966 === + JSCompiler_object_inline_message_2963 + ? (nextPrimaryChildren.updateQueue = { + transitions: nextFallbackChildren, + markerInstances: componentStack, + retryQueue: + null !== JSCompiler_object_inline_message_2963 + ? JSCompiler_object_inline_message_2963.retryQueue + : null + }) + : ((JSCompiler_object_inline_componentStack_2966.transitions = nextFallbackChildren), - (componentStack$jscomp$0.markerInstances = + (JSCompiler_object_inline_componentStack_2966.markerInstances = componentStack)))), - (JSCompiler_object_inline_componentStack_2916.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2914, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2964, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2915 + JSCompiler_object_inline_stack_2965 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2915.children + children: JSCompiler_object_inline_stack_2965.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2914 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2914 + ((JSCompiler_object_inline_digest_2964 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2964 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2914.push(current)); + : JSCompiler_object_inline_digest_2964.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10735,6 +10773,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -11495,69 +11541,160 @@ __DEV__ && return workInProgress.child; case 31: var nextProps$jscomp$1 = workInProgress.pendingProps, - hiddenProp = nextProps$jscomp$1.hidden; - void 0 !== hiddenProp && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === hiddenProp - ? "hidden" - : !1 === hiddenProp - ? "hidden={false}" - : "hidden={...}", - hiddenProp ? 'mode="hidden"' : 'mode="visible"' - ); - var mode = workInProgress.mode, - offscreenChildProps = { - mode: nextProps$jscomp$1.mode, - children: nextProps$jscomp$1.children - }; - if (null === current) { + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) if (isHydrating) { - var nextInstance$jscomp$1 = nextHydratableInstance; - if (nextInstance$jscomp$1) { - var hydratableInstance = canHydrateHydrationBoundary( - nextInstance$jscomp$1, - rootOrSingletonContext - ); - var activityInstance = - null !== hydratableInstance && - hydratableInstance.data === ACTIVITY_START_DATA - ? hydratableInstance - : null; - null !== activityInstance && - ((workInProgress.stateNode = activityInstance), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - activityInstance.nextSibling - ))); - var JSCompiler_temp$jscomp$2 = activityInstance; - } else JSCompiler_temp$jscomp$2 = null; - if (null === JSCompiler_temp$jscomp$2) - throw ( - (warnNonHydratedInstance( + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, + rootOrSingletonContext + ); + var activityInstance = + null !== hydratableInstance && + hydratableInstance.data === ACTIVITY_START_DATA + ? hydratableInstance + : null; + if (null !== activityInstance) { + var activityState = { + dehydrated: activityInstance, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }; + workInProgress.memoizedState = activityState; + var dehydratedFragment = + createFiberFromDehydratedFragment(activityInstance); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$2 = activityInstance; + } else JSCompiler_temp$jscomp$2 = null; + if (null === JSCompiler_temp$jscomp$2) + throw ( + (warnNonHydratedInstance( + workInProgress, + nextInstance$jscomp$1 + ), + throwOnHydrationMismatch(workInProgress)) + ); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$3 = null; + } else + JSCompiler_inline_result$jscomp$3 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var activityInstance$jscomp$0 = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$4 = null); + else + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + else { + warnIfHydrating(); + didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - nextInstance$jscomp$1 - ), - throwOnHydrationMismatch(workInProgress)) - ); + renderLanes, + !1 + ); + var hasContextChanged = + 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged) { + var root = workInProgressRoot; + if (null !== root) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = + attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + activityInstance$jscomp$0.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + didSuspendOrErrorDEV = !1; + hydrationDiffRootDEV = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$4 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$3 = + JSCompiler_inline_result$jscomp$4; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment$jscomp$0; } - var primaryChildFragment = mountWorkInProgressOffscreenFiber( - offscreenChildProps, - mode - ); - primaryChildFragment.ref = workInProgress.ref; - workInProgress.child = primaryChildFragment; - primaryChildFragment.return = workInProgress; - var JSCompiler_inline_result$jscomp$3 = primaryChildFragment; - } else { - var _primaryChildFragment = createWorkInProgress( - current.child, - offscreenChildProps - ); - _primaryChildFragment.ref = workInProgress.ref; - workInProgress.child = _primaryChildFragment; - _primaryChildFragment.return = workInProgress; - JSCompiler_inline_result$jscomp$3 = _primaryChildFragment; } return JSCompiler_inline_result$jscomp$3; case 22: @@ -11581,12 +11718,12 @@ __DEV__ && var cacheFromPool = peekCacheFromPool(); if (null !== cacheFromPool) var freshCache = cacheFromPool; else { - var root = workInProgressRoot, + var root$jscomp$0 = workInProgressRoot, freshCache$jscomp$0 = createCache(); - root.pooledCache = freshCache$jscomp$0; + root$jscomp$0.pooledCache = freshCache$jscomp$0; retainCache(freshCache$jscomp$0); null !== freshCache$jscomp$0 && - (root.pooledCacheLanes |= renderLanes); + (root$jscomp$0.pooledCacheLanes |= renderLanes); freshCache = freshCache$jscomp$0; } workInProgress.memoizedState = { @@ -11600,9 +11737,9 @@ __DEV__ && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()); - var prevState$jscomp$0 = current.memoizedState, + var prevState$jscomp$1 = current.memoizedState, nextState$jscomp$0 = workInProgress.memoizedState; - if (prevState$jscomp$0.parent !== parentCache) { + if (prevState$jscomp$1.parent !== parentCache) { var derivedState = { parent: parentCache, cache: parentCache }; workInProgress.memoizedState = derivedState; 0 === workInProgress.lanes && @@ -11613,7 +11750,7 @@ __DEV__ && } else { var nextCache$jscomp$0 = nextState$jscomp$0.cache; pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); - nextCache$jscomp$0 !== prevState$jscomp$0.cache && + nextCache$jscomp$0 !== prevState$jscomp$1.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -11662,9 +11799,9 @@ __DEV__ && nextProps$jscomp$2.children, renderLanes ); - var JSCompiler_inline_result$jscomp$4 = workInProgress.child; - } else JSCompiler_inline_result$jscomp$4 = null; - return JSCompiler_inline_result$jscomp$4; + var JSCompiler_inline_result$jscomp$5 = workInProgress.child; + } else JSCompiler_inline_result$jscomp$5 = null; + return JSCompiler_inline_result$jscomp$5; } break; case 30: @@ -12345,11 +12482,62 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) + throw Error( + "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue." + ); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + } else + emitPendingHydrationWarnings(), + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -12357,23 +12545,25 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) + if (!nextResource) throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." ); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - type[internalInstanceKey] = workInProgress; + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -12381,11 +12571,11 @@ __DEV__ && emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= @@ -12678,6 +12868,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (workInProgress.mode & ProfileMode) !== NoMode && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -12761,6 +12967,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -13978,16 +14188,19 @@ __DEV__ && } } function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && - 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && + 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { root = root.containerInfo; @@ -14400,6 +14613,11 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -14967,6 +15185,35 @@ __DEV__ && popComponentEffectDuration(prevEffectDuration); componentEffectErrors = prevEffectErrors; } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + runWithFiberInDEV( + finishedWork, + commitHydratedActivityInstance, + current + ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -14999,6 +15246,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -15426,6 +15674,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -16012,6 +16269,16 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -16391,6 +16658,41 @@ __DEV__ && endTime ); break; + case 31: + flags = inHydratedSubtree; + enableComponentPerformanceTrack && + ((isViewTransitionEligible = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null), + (prevProfilerEffectDuration = finishedWork.memoizedState), + null !== isViewTransitionEligible && + null === prevProfilerEffectDuration + ? ((prevProfilerEffectDuration = finishedWork.deletions), + null !== prevProfilerEffectDuration && + 0 < prevProfilerEffectDuration.length && + 18 === prevProfilerEffectDuration[0].tag + ? ((inHydratedSubtree = !1), + (isViewTransitionEligible = + isViewTransitionEligible.hydrationErrors), + null !== isViewTransitionEligible && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime, + isViewTransitionEligible + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1)); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + enableComponentPerformanceTrack && (inHydratedSubtree = flags); + break; case 13: flags = inHydratedSubtree; enableComponentPerformanceTrack && @@ -19664,6 +19966,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -20338,6 +20641,11 @@ __DEV__ && content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -20600,12 +20908,21 @@ __DEV__ && (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } + function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } + } function getCurrentFiberForDevTools() { return current; } @@ -25221,6 +25538,9 @@ __DEV__ && function commitHydratedContainer(container) { retryIfBlockedOn(container); } + function commitHydratedActivityInstance(activityInstance) { + retryIfBlockedOn(activityInstance); + } function commitHydratedSuspenseInstance(suspenseInstance) { retryIfBlockedOn(suspenseInstance); } @@ -26322,22 +26642,22 @@ __DEV__ && ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane( - nearestMounted, - lane - ); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -26620,6 +26940,7 @@ __DEV__ && } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -26665,8 +26986,11 @@ __DEV__ && targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -30911,11 +31235,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-www-classic-17f88c80-20250422" !== isomorphicReactPackageVersion) + if ("19.2.0-www-classic-3ef31d19-20250422" !== 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.2.0-www-classic-17f88c80-20250422\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-www-classic-3ef31d19-20250422\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -30958,10 +31282,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.2.0-www-classic-17f88c80-20250422", + version: "19.2.0-www-classic-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -31725,5 +32049,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-www-classic-17f88c80-20250422"; + exports.version = "19.2.0-www-classic-3ef31d19-20250422"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 394ba4fd54..6f191177f2 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -139,6 +139,16 @@ __DEV__ && } return null; } + function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; + } function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error("Unable to find node on an unmounted component."); @@ -637,6 +647,16 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -3470,6 +3490,21 @@ __DEV__ && (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function getSuspendedTreeContext() { + warnIfNotHydrating(); + return null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null; + } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function warnIfNotHydrating() { isHydrating || console.error( @@ -3517,6 +3552,12 @@ __DEV__ && siblings.push(distanceFromLeaf); return distanceFromLeaf; } + function warnIfHydrating() { + isHydrating && + console.error( + "We should not be hydrating here. This is a bug in React. Please file a bug." + ); + } function warnNonHydratedInstance(fiber, rejectedCandidate) { didSuspendOrErrorDEV || ((fiber = buildHydrationDiffNode(fiber, 0)), @@ -3638,6 +3679,7 @@ __DEV__ && for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -3645,8 +3687,6 @@ __DEV__ && case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -3688,20 +3728,26 @@ __DEV__ && ); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) + throw Error( + "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." + ); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -6367,6 +6413,11 @@ __DEV__ && handler ); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -8439,6 +8490,7 @@ __DEV__ && sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -8928,10 +8980,19 @@ __DEV__ && renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -8943,17 +9004,6 @@ __DEV__ && renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -8999,6 +9049,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -9721,23 +9807,24 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2909; - var JSCompiler_object_inline_stack_2910 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2959; + var JSCompiler_object_inline_stack_2960 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var showFallback = !1, - didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2909 = didSuspend) || - (JSCompiler_object_inline_digest_2909 = + var JSCompiler_object_inline_message_2958 = !1; + var didSuspend = 0 !== (workInProgress.flags & 128); + (JSCompiler_object_inline_digest_2959 = didSuspend) || + (JSCompiler_object_inline_digest_2959 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2909 && - ((showFallback = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2909 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2959 && + ((JSCompiler_object_inline_message_2958 = !0), + (workInProgress.flags &= -129)); + JSCompiler_object_inline_digest_2959 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - showFallback + JSCompiler_object_inline_message_2958 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); (current = nextHydratableInstance) @@ -9750,25 +9837,18 @@ __DEV__ && ? renderLanes : null), null !== renderLanes && - (warnIfNotHydrating(), - (workInProgress.memoizedState = { + ((JSCompiler_object_inline_digest_2959 = { dehydrated: renderLanes, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, + treeContext: getSuspendedTreeContext(), retryLane: 536870912, hydrationErrors: null }), - (JSCompiler_object_inline_digest_2909 = createFiber( - 18, - null, - null, - NoMode - )), - (JSCompiler_object_inline_digest_2909.stateNode = renderLanes), - (JSCompiler_object_inline_digest_2909.return = workInProgress), - (workInProgress.child = JSCompiler_object_inline_digest_2909), + (workInProgress.memoizedState = + JSCompiler_object_inline_digest_2959), + (JSCompiler_object_inline_digest_2959 = + createFiberFromDehydratedFragment(renderLanes)), + (JSCompiler_object_inline_digest_2959.return = workInProgress), + (workInProgress.child = JSCompiler_object_inline_digest_2959), (hydrationParentFiber = workInProgress), (nextHydratableInstance = null))) : (renderLanes = null); @@ -9782,29 +9862,26 @@ __DEV__ && : (workInProgress.lanes = 536870912); return null; } - var JSCompiler_object_inline_componentStack_2911 = - JSCompiler_object_inline_stack_2910.children; - var nextFallbackChildren = JSCompiler_object_inline_stack_2910.fallback; - if (showFallback) + var nextPrimaryChildren = JSCompiler_object_inline_stack_2960.children, + nextFallbackChildren = JSCompiler_object_inline_stack_2960.fallback; + if (JSCompiler_object_inline_message_2958) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2910 = + (JSCompiler_object_inline_stack_2960 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_componentStack_2911, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_componentStack_2911 = - workInProgress.child), - (JSCompiler_object_inline_componentStack_2911.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2911.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2909, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2959, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), enableTransitionTracing && ((workInProgress = enableTransitionTracing @@ -9814,307 +9891,271 @@ __DEV__ && ((current = enableTransitionTracing ? markerInstanceStack.current : null), - (renderLanes = - JSCompiler_object_inline_componentStack_2911.updateQueue), + (renderLanes = nextPrimaryChildren.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2911.updateQueue = - { - transitions: workInProgress, - markerInstances: current, - retryQueue: null - }) + ? (nextPrimaryChildren.updateQueue = { + transitions: workInProgress, + markerInstances: current, + retryQueue: null + }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2910 + JSCompiler_object_inline_stack_2960 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2910.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2960.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2910 = + (JSCompiler_object_inline_stack_2960 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_componentStack_2911, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_componentStack_2911 = - workInProgress.child), - (JSCompiler_object_inline_componentStack_2911.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2911.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2909, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2959, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2910 + JSCompiler_object_inline_stack_2960 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_componentStack_2911 + nextPrimaryChildren ); } - var JSCompiler_object_inline_message_2908 = current.memoizedState; - if ( - null !== JSCompiler_object_inline_message_2908 && - ((JSCompiler_object_inline_componentStack_2911 = - JSCompiler_object_inline_message_2908.dehydrated), - null !== JSCompiler_object_inline_componentStack_2911) - ) { - if (didSuspend) - workInProgress.flags & 256 - ? (pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ))) - : null !== workInProgress.memoizedState - ? (reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - (workInProgress = null)) - : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2911 = - JSCompiler_object_inline_stack_2910.fallback), - (nextFallbackChildren = workInProgress.mode), - (JSCompiler_object_inline_stack_2910 = - mountWorkInProgressOffscreenFiber( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2910.children - }, - nextFallbackChildren - )), - (JSCompiler_object_inline_componentStack_2911 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2911, + var prevState = current.memoizedState; + if (null !== prevState) { + var JSCompiler_object_inline_componentStack_2961 = prevState.dehydrated; + if (null !== JSCompiler_object_inline_componentStack_2961) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (nextPrimaryChildren = + JSCompiler_object_inline_stack_2960.fallback), + (nextFallbackChildren = workInProgress.mode), + (JSCompiler_object_inline_stack_2960 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2960.children + }, + nextFallbackChildren + )), + (nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, nextFallbackChildren, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2911.flags |= 2), - (JSCompiler_object_inline_stack_2910.return = workInProgress), - (JSCompiler_object_inline_componentStack_2911.return = - workInProgress), - (JSCompiler_object_inline_stack_2910.sibling = - JSCompiler_object_inline_componentStack_2911), - (workInProgress.child = JSCompiler_object_inline_stack_2910), - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2910 = workInProgress.child), - (JSCompiler_object_inline_stack_2910.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2910.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2909, + (nextPrimaryChildren.flags |= 2), + (JSCompiler_object_inline_stack_2960.return = workInProgress), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2960.sibling = + nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2960), + reconcileChildFibers( + workInProgress, + current.child, + null, renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = - JSCompiler_object_inline_componentStack_2911)); - else if ( - (pushPrimaryTreeSuspenseHandler(workInProgress), - isHydrating && - console.error( - "We should not be hydrating here. This is a bug in React. Please file a bug." - ), - isSuspenseInstanceFallback( - JSCompiler_object_inline_componentStack_2911 - )) - ) { - JSCompiler_object_inline_digest_2909 = - JSCompiler_object_inline_componentStack_2911.nextSibling && - JSCompiler_object_inline_componentStack_2911.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2909) { - nextFallbackChildren = JSCompiler_object_inline_digest_2909.dgst; - var message = JSCompiler_object_inline_digest_2909.msg; - var componentStack = JSCompiler_object_inline_digest_2909.stck; - var componentStack$jscomp$0 = - JSCompiler_object_inline_digest_2909.cstck; - } - JSCompiler_object_inline_message_2908 = message; - JSCompiler_object_inline_digest_2909 = nextFallbackChildren; - JSCompiler_object_inline_stack_2910 = componentStack; - JSCompiler_object_inline_componentStack_2911 = - componentStack$jscomp$0; - nextFallbackChildren = JSCompiler_object_inline_message_2908; - componentStack = JSCompiler_object_inline_componentStack_2911; - JSCompiler_object_inline_componentStack_2911 = nextFallbackChildren - ? Error(nextFallbackChildren) - : Error( - "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ), + (JSCompiler_object_inline_stack_2960 = workInProgress.child), + (JSCompiler_object_inline_stack_2960.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_stack_2960.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2959, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = nextPrimaryChildren)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + warnIfHydrating(), + isSuspenseInstanceFallback( + JSCompiler_object_inline_componentStack_2961 + )) + ) { + JSCompiler_object_inline_digest_2959 = + JSCompiler_object_inline_componentStack_2961.nextSibling && + JSCompiler_object_inline_componentStack_2961.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2959) { + nextPrimaryChildren = JSCompiler_object_inline_digest_2959.dgst; + var message = JSCompiler_object_inline_digest_2959.msg; + nextFallbackChildren = JSCompiler_object_inline_digest_2959.stck; + var componentStack = JSCompiler_object_inline_digest_2959.cstck; + } + JSCompiler_object_inline_message_2958 = message; + JSCompiler_object_inline_digest_2959 = nextPrimaryChildren; + JSCompiler_object_inline_stack_2960 = nextFallbackChildren; + JSCompiler_object_inline_componentStack_2961 = componentStack; + nextPrimaryChildren = JSCompiler_object_inline_message_2958; + nextFallbackChildren = JSCompiler_object_inline_componentStack_2961; + nextPrimaryChildren = nextPrimaryChildren + ? Error(nextPrimaryChildren) + : Error( + "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ); + nextPrimaryChildren.stack = + JSCompiler_object_inline_stack_2960 || ""; + nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2959; + JSCompiler_object_inline_digest_2959 = + void 0 === nextFallbackChildren ? null : nextFallbackChildren; + JSCompiler_object_inline_stack_2960 = { + value: nextPrimaryChildren, + source: null, + stack: JSCompiler_object_inline_digest_2959 + }; + "string" === typeof JSCompiler_object_inline_digest_2959 && + CapturedStacks.set( + nextPrimaryChildren, + JSCompiler_object_inline_stack_2960 ); - JSCompiler_object_inline_componentStack_2911.stack = - JSCompiler_object_inline_stack_2910 || ""; - JSCompiler_object_inline_componentStack_2911.digest = - JSCompiler_object_inline_digest_2909; - JSCompiler_object_inline_digest_2909 = - void 0 === componentStack ? null : componentStack; - JSCompiler_object_inline_stack_2910 = { - value: JSCompiler_object_inline_componentStack_2911, - source: null, - stack: JSCompiler_object_inline_digest_2909 - }; - "string" === typeof JSCompiler_object_inline_digest_2909 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_2911, - JSCompiler_object_inline_stack_2910 - ); - queueHydrationError(JSCompiler_object_inline_stack_2910); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else if ( - (didReceiveUpdate || - propagateParentContextChanges( + queueHydrationError(JSCompiler_object_inline_stack_2960); + workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, - renderLanes, - !1 - ), - (JSCompiler_object_inline_digest_2909 = - 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2909) - ) { - JSCompiler_object_inline_digest_2909 = workInProgressRoot; - if ( - null !== JSCompiler_object_inline_digest_2909 && - ((JSCompiler_object_inline_stack_2910 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2910 = - 0 !== (JSCompiler_object_inline_stack_2910 & 42) - ? 1 - : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2910 - )), - (JSCompiler_object_inline_stack_2910 = - 0 !== - (JSCompiler_object_inline_stack_2910 & - (JSCompiler_object_inline_digest_2909.suspendedLanes | - renderLanes)) - ? 0 - : JSCompiler_object_inline_stack_2910), - 0 !== JSCompiler_object_inline_stack_2910 && - JSCompiler_object_inline_stack_2910 !== - JSCompiler_object_inline_message_2908.retryLane) - ) - throw ( - ((JSCompiler_object_inline_message_2908.retryLane = - JSCompiler_object_inline_stack_2910), - enqueueConcurrentRenderForLane( - current, - JSCompiler_object_inline_stack_2910 - ), - scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2909, - current, - JSCompiler_object_inline_stack_2910 - ), - SelectiveHydrationException) + renderLanes ); - JSCompiler_object_inline_componentStack_2911.data === - SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else - JSCompiler_object_inline_componentStack_2911.data === - SUSPENSE_PENDING_START_DATA - ? ((workInProgress.flags |= 192), - (workInProgress.child = current.child), - (workInProgress = null)) - : ((current = JSCompiler_object_inline_message_2908.treeContext), - (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_componentStack_2911.nextSibling - )), - (hydrationParentFiber = workInProgress), - (isHydrating = !0), - (hydrationErrors = null), - (didSuspendOrErrorDEV = !1), - (hydrationDiffRootDEV = null), - (rootOrSingletonContext = !1), - null !== current && - (warnIfNotHydrating(), - (idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), - (workInProgress = mountSuspensePrimaryChildren( + } else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - JSCompiler_object_inline_stack_2910.children + renderLanes, + !1 + ), + (JSCompiler_object_inline_digest_2959 = + 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_object_inline_digest_2959) + ) { + JSCompiler_object_inline_digest_2959 = workInProgressRoot; + if ( + null !== JSCompiler_object_inline_digest_2959 && + ((JSCompiler_object_inline_stack_2960 = getBumpedLaneForHydration( + JSCompiler_object_inline_digest_2959, + renderLanes )), - (workInProgress.flags |= 4096)); - return workInProgress; + 0 !== JSCompiler_object_inline_stack_2960 && + JSCompiler_object_inline_stack_2960 !== prevState.retryLane) + ) + throw ( + ((prevState.retryLane = JSCompiler_object_inline_stack_2960), + enqueueConcurrentRenderForLane( + current, + JSCompiler_object_inline_stack_2960 + ), + scheduleUpdateOnFiber( + JSCompiler_object_inline_digest_2959, + current, + JSCompiler_object_inline_stack_2960 + ), + SelectiveHydrationException) + ); + JSCompiler_object_inline_componentStack_2961.data === + SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + JSCompiler_object_inline_componentStack_2961.data === + SUSPENSE_PENDING_START_DATA + ? ((workInProgress.flags |= 192), + (workInProgress.child = current.child), + (workInProgress = null)) + : ((current = prevState.treeContext), + (nextHydratableInstance = getNextHydratable( + JSCompiler_object_inline_componentStack_2961.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== current && + restoreSuspendedTreeContext(workInProgress, current), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + JSCompiler_object_inline_stack_2960.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; + } } - if (showFallback) + if (JSCompiler_object_inline_message_2958) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2911 = - JSCompiler_object_inline_stack_2910.fallback), + (nextPrimaryChildren = JSCompiler_object_inline_stack_2960.fallback), (nextFallbackChildren = workInProgress.mode), (componentStack = current.child), - (componentStack$jscomp$0 = componentStack.sibling), - (JSCompiler_object_inline_stack_2910 = createWorkInProgress( + (JSCompiler_object_inline_componentStack_2961 = + componentStack.sibling), + (JSCompiler_object_inline_stack_2960 = createWorkInProgress( componentStack, { mode: "hidden", - children: JSCompiler_object_inline_stack_2910.children + children: JSCompiler_object_inline_stack_2960.children } )), - (JSCompiler_object_inline_stack_2910.subtreeFlags = + (JSCompiler_object_inline_stack_2960.subtreeFlags = componentStack.subtreeFlags & 65011712), - null !== componentStack$jscomp$0 - ? (JSCompiler_object_inline_componentStack_2911 = - createWorkInProgress( - componentStack$jscomp$0, - JSCompiler_object_inline_componentStack_2911 - )) - : ((JSCompiler_object_inline_componentStack_2911 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2911, - nextFallbackChildren, - renderLanes, - null - )), - (JSCompiler_object_inline_componentStack_2911.flags |= 2)), - (JSCompiler_object_inline_componentStack_2911.return = - workInProgress), - (JSCompiler_object_inline_stack_2910.return = workInProgress), - (JSCompiler_object_inline_stack_2910.sibling = - JSCompiler_object_inline_componentStack_2911), - (workInProgress.child = JSCompiler_object_inline_stack_2910), - (JSCompiler_object_inline_stack_2910 = - JSCompiler_object_inline_componentStack_2911), - (JSCompiler_object_inline_componentStack_2911 = workInProgress.child), + null !== JSCompiler_object_inline_componentStack_2961 + ? (nextPrimaryChildren = createWorkInProgress( + JSCompiler_object_inline_componentStack_2961, + nextPrimaryChildren + )) + : ((nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, + nextFallbackChildren, + renderLanes, + null + )), + (nextPrimaryChildren.flags |= 2)), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2960.return = workInProgress), + (JSCompiler_object_inline_stack_2960.sibling = nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2960), + (JSCompiler_object_inline_stack_2960 = nextPrimaryChildren), + (nextPrimaryChildren = workInProgress.child), (nextFallbackChildren = current.child.memoizedState), null === nextFallbackChildren ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) : ((componentStack = nextFallbackChildren.cachePool), null !== componentStack - ? ((componentStack$jscomp$0 = CacheContext._currentValue), + ? ((JSCompiler_object_inline_componentStack_2961 = + CacheContext._currentValue), (componentStack = - componentStack.parent !== componentStack$jscomp$0 + componentStack.parent !== + JSCompiler_object_inline_componentStack_2961 ? { - parent: componentStack$jscomp$0, - pool: componentStack$jscomp$0 + parent: JSCompiler_object_inline_componentStack_2961, + pool: JSCompiler_object_inline_componentStack_2961 } : componentStack)) : (componentStack = getSuspendedCache()), @@ -10122,8 +10163,7 @@ __DEV__ && baseLanes: nextFallbackChildren.baseLanes | renderLanes, cachePool: componentStack })), - (JSCompiler_object_inline_componentStack_2911.memoizedState = - nextFallbackChildren), + (nextPrimaryChildren.memoizedState = nextFallbackChildren), enableTransitionTracing && ((nextFallbackChildren = enableTransitionTracing ? transitionStack.current @@ -10132,54 +10172,52 @@ __DEV__ && ((componentStack = enableTransitionTracing ? markerInstanceStack.current : null), - (componentStack$jscomp$0 = - JSCompiler_object_inline_componentStack_2911.updateQueue), - (JSCompiler_object_inline_message_2908 = current.updateQueue), - null === componentStack$jscomp$0 - ? (JSCompiler_object_inline_componentStack_2911.updateQueue = { + (JSCompiler_object_inline_componentStack_2961 = + nextPrimaryChildren.updateQueue), + (JSCompiler_object_inline_message_2958 = current.updateQueue), + null === JSCompiler_object_inline_componentStack_2961 + ? (nextPrimaryChildren.updateQueue = { transitions: nextFallbackChildren, markerInstances: componentStack, retryQueue: null }) - : componentStack$jscomp$0 === - JSCompiler_object_inline_message_2908 - ? (JSCompiler_object_inline_componentStack_2911.updateQueue = - { - transitions: nextFallbackChildren, - markerInstances: componentStack, - retryQueue: - null !== JSCompiler_object_inline_message_2908 - ? JSCompiler_object_inline_message_2908.retryQueue - : null - }) - : ((componentStack$jscomp$0.transitions = + : JSCompiler_object_inline_componentStack_2961 === + JSCompiler_object_inline_message_2958 + ? (nextPrimaryChildren.updateQueue = { + transitions: nextFallbackChildren, + markerInstances: componentStack, + retryQueue: + null !== JSCompiler_object_inline_message_2958 + ? JSCompiler_object_inline_message_2958.retryQueue + : null + }) + : ((JSCompiler_object_inline_componentStack_2961.transitions = nextFallbackChildren), - (componentStack$jscomp$0.markerInstances = + (JSCompiler_object_inline_componentStack_2961.markerInstances = componentStack)))), - (JSCompiler_object_inline_componentStack_2911.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2909, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2959, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2910 + JSCompiler_object_inline_stack_2960 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2910.children + children: JSCompiler_object_inline_stack_2960.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2909 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2909 + ((JSCompiler_object_inline_digest_2959 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2959 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2909.push(current)); + : JSCompiler_object_inline_digest_2959.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10546,6 +10584,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -11308,69 +11354,160 @@ __DEV__ && return workInProgress.child; case 31: var nextProps$jscomp$1 = workInProgress.pendingProps, - hiddenProp = nextProps$jscomp$1.hidden; - void 0 !== hiddenProp && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === hiddenProp - ? "hidden" - : !1 === hiddenProp - ? "hidden={false}" - : "hidden={...}", - hiddenProp ? 'mode="hidden"' : 'mode="visible"' - ); - var mode = workInProgress.mode, - offscreenChildProps = { - mode: nextProps$jscomp$1.mode, - children: nextProps$jscomp$1.children - }; - if (null === current) { + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) if (isHydrating) { - var nextInstance$jscomp$1 = nextHydratableInstance; - if (nextInstance$jscomp$1) { - var hydratableInstance = canHydrateHydrationBoundary( - nextInstance$jscomp$1, - rootOrSingletonContext - ); - var activityInstance = - null !== hydratableInstance && - hydratableInstance.data === ACTIVITY_START_DATA - ? hydratableInstance - : null; - null !== activityInstance && - ((workInProgress.stateNode = activityInstance), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - activityInstance.nextSibling - ))); - var JSCompiler_temp$jscomp$2 = activityInstance; - } else JSCompiler_temp$jscomp$2 = null; - if (null === JSCompiler_temp$jscomp$2) - throw ( - (warnNonHydratedInstance( + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, + rootOrSingletonContext + ); + var activityInstance = + null !== hydratableInstance && + hydratableInstance.data === ACTIVITY_START_DATA + ? hydratableInstance + : null; + if (null !== activityInstance) { + var activityState = { + dehydrated: activityInstance, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }; + workInProgress.memoizedState = activityState; + var dehydratedFragment = + createFiberFromDehydratedFragment(activityInstance); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$2 = activityInstance; + } else JSCompiler_temp$jscomp$2 = null; + if (null === JSCompiler_temp$jscomp$2) + throw ( + (warnNonHydratedInstance( + workInProgress, + nextInstance$jscomp$1 + ), + throwOnHydrationMismatch(workInProgress)) + ); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$3 = null; + } else + JSCompiler_inline_result$jscomp$3 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var activityInstance$jscomp$0 = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$4 = null); + else + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + else { + warnIfHydrating(); + didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - nextInstance$jscomp$1 - ), - throwOnHydrationMismatch(workInProgress)) - ); + renderLanes, + !1 + ); + var hasContextChanged = + 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged) { + var root = workInProgressRoot; + if (null !== root) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = + attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + activityInstance$jscomp$0.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + didSuspendOrErrorDEV = !1; + hydrationDiffRootDEV = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$4 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$3 = + JSCompiler_inline_result$jscomp$4; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment$jscomp$0; } - var primaryChildFragment = mountWorkInProgressOffscreenFiber( - offscreenChildProps, - mode - ); - primaryChildFragment.ref = workInProgress.ref; - workInProgress.child = primaryChildFragment; - primaryChildFragment.return = workInProgress; - var JSCompiler_inline_result$jscomp$3 = primaryChildFragment; - } else { - var _primaryChildFragment = createWorkInProgress( - current.child, - offscreenChildProps - ); - _primaryChildFragment.ref = workInProgress.ref; - workInProgress.child = _primaryChildFragment; - _primaryChildFragment.return = workInProgress; - JSCompiler_inline_result$jscomp$3 = _primaryChildFragment; } return JSCompiler_inline_result$jscomp$3; case 22: @@ -11394,12 +11531,12 @@ __DEV__ && var cacheFromPool = peekCacheFromPool(); if (null !== cacheFromPool) var freshCache = cacheFromPool; else { - var root = workInProgressRoot, + var root$jscomp$0 = workInProgressRoot, freshCache$jscomp$0 = createCache(); - root.pooledCache = freshCache$jscomp$0; + root$jscomp$0.pooledCache = freshCache$jscomp$0; retainCache(freshCache$jscomp$0); null !== freshCache$jscomp$0 && - (root.pooledCacheLanes |= renderLanes); + (root$jscomp$0.pooledCacheLanes |= renderLanes); freshCache = freshCache$jscomp$0; } workInProgress.memoizedState = { @@ -11413,9 +11550,9 @@ __DEV__ && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()); - var prevState$jscomp$0 = current.memoizedState, + var prevState$jscomp$1 = current.memoizedState, nextState$jscomp$0 = workInProgress.memoizedState; - if (prevState$jscomp$0.parent !== parentCache) { + if (prevState$jscomp$1.parent !== parentCache) { var derivedState = { parent: parentCache, cache: parentCache }; workInProgress.memoizedState = derivedState; 0 === workInProgress.lanes && @@ -11426,7 +11563,7 @@ __DEV__ && } else { var nextCache$jscomp$0 = nextState$jscomp$0.cache; pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); - nextCache$jscomp$0 !== prevState$jscomp$0.cache && + nextCache$jscomp$0 !== prevState$jscomp$1.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -11475,9 +11612,9 @@ __DEV__ && nextProps$jscomp$2.children, renderLanes ); - var JSCompiler_inline_result$jscomp$4 = workInProgress.child; - } else JSCompiler_inline_result$jscomp$4 = null; - return JSCompiler_inline_result$jscomp$4; + var JSCompiler_inline_result$jscomp$5 = workInProgress.child; + } else JSCompiler_inline_result$jscomp$5 = null; + return JSCompiler_inline_result$jscomp$5; } break; case 30: @@ -12152,11 +12289,62 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) + throw Error( + "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue." + ); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + } else + emitPendingHydrationWarnings(), + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -12164,23 +12352,25 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) + if (!nextResource) throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." ); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - type[internalInstanceKey] = workInProgress; + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -12188,11 +12378,11 @@ __DEV__ && emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= @@ -12482,6 +12672,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (workInProgress.mode & ProfileMode) !== NoMode && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -12560,6 +12766,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -13777,16 +13987,19 @@ __DEV__ && } } function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && - 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && + 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { root = root.containerInfo; @@ -14199,6 +14412,11 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -14766,6 +14984,35 @@ __DEV__ && popComponentEffectDuration(prevEffectDuration); componentEffectErrors = prevEffectErrors; } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + runWithFiberInDEV( + finishedWork, + commitHydratedActivityInstance, + current + ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -14798,6 +15045,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -15225,6 +15473,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -15811,6 +16068,16 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -16190,6 +16457,41 @@ __DEV__ && endTime ); break; + case 31: + flags = inHydratedSubtree; + enableComponentPerformanceTrack && + ((isViewTransitionEligible = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null), + (prevProfilerEffectDuration = finishedWork.memoizedState), + null !== isViewTransitionEligible && + null === prevProfilerEffectDuration + ? ((prevProfilerEffectDuration = finishedWork.deletions), + null !== prevProfilerEffectDuration && + 0 < prevProfilerEffectDuration.length && + 18 === prevProfilerEffectDuration[0].tag + ? ((inHydratedSubtree = !1), + (isViewTransitionEligible = + isViewTransitionEligible.hydrationErrors), + null !== isViewTransitionEligible && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime, + isViewTransitionEligible + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1)); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + enableComponentPerformanceTrack && (inHydratedSubtree = flags); + break; case 13: flags = inHydratedSubtree; enableComponentPerformanceTrack && @@ -19459,6 +19761,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -20133,6 +20436,11 @@ __DEV__ && content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -20369,12 +20677,21 @@ __DEV__ && (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } + function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } + } function getCurrentFiberForDevTools() { return current; } @@ -25015,6 +25332,9 @@ __DEV__ && function commitHydratedContainer(container) { retryIfBlockedOn(container); } + function commitHydratedActivityInstance(activityInstance) { + retryIfBlockedOn(activityInstance); + } function commitHydratedSuspenseInstance(suspenseInstance) { retryIfBlockedOn(suspenseInstance); } @@ -26116,22 +26436,22 @@ __DEV__ && ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane( - nearestMounted, - lane - ); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -26414,6 +26734,7 @@ __DEV__ && } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -26459,8 +26780,11 @@ __DEV__ && targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -30697,11 +31021,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-www-modern-17f88c80-20250422" !== isomorphicReactPackageVersion) + if ("19.2.0-www-modern-3ef31d19-20250422" !== 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.2.0-www-modern-17f88c80-20250422\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-www-modern-3ef31d19-20250422\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -30744,10 +31068,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.2.0-www-modern-17f88c80-20250422", + version: "19.2.0-www-modern-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -31511,5 +31835,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-www-modern-17f88c80-20250422"; + exports.version = "19.2.0-www-modern-3ef31d19-20250422"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 143e2a91a4..0a29eff761 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -87,6 +87,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -476,6 +486,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -1869,6 +1887,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -1969,6 +1995,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -1976,8 +2003,6 @@ function popToNextHostParent(fiber) { case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -2003,20 +2028,23 @@ function popHydrationState(fiber) { if (!fiber) throw Error(formatProdErrorMessage(317)); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -3809,6 +3837,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? push(suspenseHandlerStackCursor, handler) : push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -5574,6 +5607,7 @@ function throwException( sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -5811,10 +5845,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$94 = workInProgress.stateNode; + root$93 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$94.incompleteTransitions.has(transition)) { + if (!root$93.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5822,11 +5856,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$94.incompleteTransitions.set(transition, markerInstance); + root$93.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$94.incompleteTransitions.forEach(function (markerInstance) { + root$93.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6003,10 +6037,19 @@ function updateOffscreenComponent( renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -6016,17 +6059,6 @@ function updateOffscreenComponent( renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -6069,6 +6101,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6546,8 +6600,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { retryLane: 536870912, hydrationErrors: null }), - (renderLanes = createFiber(18, null, null, 0)), - (renderLanes.stateNode = current), + (renderLanes = createFiberFromDehydratedFragment(current)), (renderLanes.return = workInProgress), (workInProgress.child = renderLanes), (hydrationParentFiber = workInProgress), @@ -6644,14 +6697,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -6703,15 +6756,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -6740,12 +6785,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, current), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -6757,14 +6797,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), - (nextProps = createWorkInProgress(showFallback, { + (showFallback = workInProgress.mode), + (nextFallbackChildren = current.child), + (digest = nextFallbackChildren.sibling), + (nextProps = createWorkInProgress(nextFallbackChildren, { mode: "hidden", children: nextProps.children })), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712), + (nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -6772,7 +6812,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -6783,46 +6823,46 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (nextFallbackChildren = current.child.memoizedState), - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (nextFallbackChildren = + nextFallbackChildren.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })), - (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.memoizedState = showFallback), enableTransitionTracing && - ((nextFallbackChildren = enableTransitionTracing + ((showFallback = enableTransitionTracing ? transitionStack.current : null), - null !== nextFallbackChildren && - ((showFallback = enableTransitionTracing + null !== showFallback && + ((nextFallbackChildren = enableTransitionTracing ? markerInstanceStack.current : null), (digest = nextPrimaryChildren.updateQueue), (didSuspend = current.updateQueue), null === digest ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null }) : digest === didSuspend ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null !== didSuspend ? didSuspend.retryQueue : null }) - : ((digest.transitions = nextFallbackChildren), - (digest.markerInstances = showFallback)))), + : ((digest.transitions = showFallback), + (digest.markerInstances = nextFallbackChildren)))), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7089,10 +7129,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$118 = workInProgress.memoizedState; + if (null !== state$118) { + if (null !== state$118.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -7112,17 +7160,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$118 = 0 !== (renderLanes & workInProgress.childLanes); + state$118 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$118 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$118) return updateSuspenseListComponent( current, workInProgress, @@ -7136,7 +7184,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$118) break; else return null; case 22: return ( @@ -7153,8 +7201,8 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 25: if (enableTransitionTracing) { - state = workInProgress.stateNode; - null !== state && pushMarkerInstance(workInProgress, state); + state$118 = workInProgress.stateNode; + null !== state$118 && pushMarkerInstance(workInProgress, state$118); break; } case 23: @@ -7201,112 +7249,129 @@ function beginWork(current, workInProgress, renderLanes) { switch (workInProgress.tag) { case 16: a: { - var props = workInProgress.pendingProps; - current = workInProgress.elementType; - var init = current._init; - current = init(current._payload); - workInProgress.type = current; - if ("function" === typeof current) - shouldConstruct(current) - ? ((props = resolveClassComponentProps(current, props, !1)), - (workInProgress.tag = 1), - (workInProgress = updateClassComponent( - null, - workInProgress, - current, - props, - renderLanes - ))) - : ((props = disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(current, props)), - (workInProgress.tag = 0), - (workInProgress = updateFunctionComponent( - null, - workInProgress, - current, - props, - renderLanes - ))); + var props = workInProgress.pendingProps, + lazyComponent = workInProgress.elementType, + init = lazyComponent._init; + var Component = init(lazyComponent._payload); + workInProgress.type = Component; + if ("function" === typeof Component) + if (shouldConstruct(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props, + !1 + ); + workInProgress.tag = 1; + var JSCompiler_inline_result = updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + var resolvedProps$98 = disableDefaultPropsExceptForClasses + ? props + : resolveDefaultPropsOnNonClassComponent(Component, props); + workInProgress.tag = 0; + JSCompiler_inline_result = updateFunctionComponent( + null, + workInProgress, + Component, + resolvedProps$98, + renderLanes + ); + } else { - if (void 0 !== current && null !== current) - if (((init = current.$$typeof), init === REACT_FORWARD_REF_TYPE)) { - props = disableDefaultPropsExceptForClasses + if (void 0 !== Component && null !== Component) { + var $$typeof = Component.$$typeof; + if ($$typeof === REACT_FORWARD_REF_TYPE) { + var resolvedProps$99 = disableDefaultPropsExceptForClasses ? props - : resolveDefaultPropsOnNonClassComponent(current, props); + : resolveDefaultPropsOnNonClassComponent(Component, props); workInProgress.tag = 11; - workInProgress = updateForwardRef( + JSCompiler_inline_result = updateForwardRef( null, workInProgress, - current, - props, + Component, + resolvedProps$99, renderLanes ); break a; - } else if (init === REACT_MEMO_TYPE) { - props = disableDefaultPropsExceptForClasses + } else if ($$typeof === REACT_MEMO_TYPE) { + var resolvedProps$100 = disableDefaultPropsExceptForClasses ? props - : resolveDefaultPropsOnNonClassComponent(current, props); + : resolveDefaultPropsOnNonClassComponent(Component, props); workInProgress.tag = 14; - workInProgress = updateMemoComponent( + JSCompiler_inline_result = updateMemoComponent( null, workInProgress, - current, + Component, disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(current.type, props), + ? resolvedProps$100 + : resolveDefaultPropsOnNonClassComponent( + Component.type, + resolvedProps$100 + ), renderLanes ); break a; } - workInProgress = getComponentNameFromType(current) || current; - throw Error(formatProdErrorMessage(306, workInProgress, "")); + } + var loggedComponent = + getComponentNameFromType(Component) || Component; + throw Error(formatProdErrorMessage(306, loggedComponent, "")); } } - return workInProgress; + return JSCompiler_inline_result; case 0: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = + var Component$jscomp$0 = workInProgress.type, + unresolvedProps = workInProgress.pendingProps, + resolvedProps$jscomp$0 = disableDefaultPropsExceptForClasses || - workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateFunctionComponent( - current, - workInProgress, - props, - init, - renderLanes - ) + workInProgress.elementType === Component$jscomp$0 + ? unresolvedProps + : resolveDefaultPropsOnNonClassComponent( + Component$jscomp$0, + unresolvedProps + ); + return updateFunctionComponent( + current, + workInProgress, + Component$jscomp$0, + resolvedProps$jscomp$0, + renderLanes ); case 1: - return ( - (props = workInProgress.type), - (init = resolveClassComponentProps( - props, + var Component$120 = workInProgress.type, + resolvedProps$122 = resolveClassComponentProps( + Component$120, workInProgress.pendingProps, - workInProgress.elementType === props - )), - updateClassComponent(current, workInProgress, props, init, renderLanes) + workInProgress.elementType === Component$120 + ); + return updateClassComponent( + current, + workInProgress, + Component$120, + resolvedProps$122, + renderLanes ); case 3: a: { pushHostRootContext(workInProgress); if (null === current) throw Error(formatProdErrorMessage(387)); - props = workInProgress.pendingProps; - var prevState = workInProgress.memoizedState; - init = prevState.element; + var nextProps = workInProgress.pendingProps, + prevState = workInProgress.memoizedState, + prevChildren = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, props, null, renderLanes); + processUpdateQueue(workInProgress, nextProps, null, renderLanes); var nextState = workInProgress.memoizedState; enableTransitionTracing && push(transitionStack, workInProgressTransitions); enableTransitionTracing && pushRootMarkerInstance(workInProgress); - props = nextState.cache; - pushProvider(workInProgress, CacheContext, props); - props !== prevState.cache && + var nextCache = nextState.cache; + pushProvider(workInProgress, CacheContext, nextCache); + nextCache !== prevState.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -7314,233 +7379,259 @@ function beginWork(current, workInProgress, renderLanes) { !0 ); suspendIfUpdateReadFromEntangledAsyncAction(); - props = nextState.element; - if (prevState.isDehydrated) - if ( - ((prevState = { - element: props, - isDehydrated: !1, - cache: nextState.cache - }), - (workInProgress.updateQueue.baseState = prevState), - (workInProgress.memoizedState = prevState), - workInProgress.flags & 256) - ) { - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - props, - renderLanes - ); + var nextChildren = nextState.element; + if (prevState.isDehydrated) { + var overrideState = { + element: nextChildren, + isDehydrated: !1, + cache: nextState.cache + }; + workInProgress.updateQueue.baseState = overrideState; + workInProgress.memoizedState = overrideState; + if (workInProgress.flags & 256) { + var JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; - } else if (props !== init) { - init = createCapturedValueAtFiber( + } else if (nextChildren !== prevChildren) { + var recoverableError = createCapturedValueAtFiber( Error(formatProdErrorMessage(424)), workInProgress ); - queueHydrationError(init); - workInProgress = mountHostRootWithoutHydrating( + queueHydrationError(recoverableError); + JSCompiler_inline_result$jscomp$0 = mountHostRootWithoutHydrating( current, workInProgress, - props, + nextChildren, renderLanes ); break a; } else { - current = workInProgress.stateNode.containerInfo; - switch (current.nodeType) { + var parentContainer = workInProgress.stateNode.containerInfo; + switch (parentContainer.nodeType) { case 9: - current = current.body; + var parentElement = parentContainer.body; break; default: - current = - "HTML" === current.nodeName - ? current.ownerDocument.body - : current; + parentElement = + "HTML" === parentContainer.nodeName + ? parentContainer.ownerDocument.body + : parentContainer; } - nextHydratableInstance = getNextHydratable(current.firstChild); + nextHydratableInstance = getNextHydratable( + parentElement.firstChild + ); hydrationParentFiber = workInProgress; isHydrating = !0; hydrationErrors = null; rootOrSingletonContext = !0; - renderLanes = mountChildFibers( - workInProgress, - null, - props, - renderLanes - ); - for (workInProgress.child = renderLanes; renderLanes; ) - (renderLanes.flags = (renderLanes.flags & -3) | 4096), - (renderLanes = renderLanes.sibling); + for ( + var child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderLanes + ), + node = (workInProgress.child = child); + node; + + ) + (node.flags = (node.flags & -3) | 4096), (node = node.sibling); } - else { + } else { resetHydrationState(); - if (props === init) { - workInProgress = bailoutOnAlreadyFinishedWork( + if (nextChildren === prevChildren) { + JSCompiler_inline_result$jscomp$0 = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes ); break a; } - reconcileChildren(current, workInProgress, props, renderLanes); + reconcileChildren(current, workInProgress, nextChildren, renderLanes); } - workInProgress = workInProgress.child; + JSCompiler_inline_result$jscomp$0 = workInProgress.child; } - return workInProgress; + return JSCompiler_inline_result$jscomp$0; case 26: - return ( - markRef(current, workInProgress), - null === current - ? (renderLanes = getResource( - workInProgress.type, - null, - workInProgress.pendingProps, - null - )) - ? (workInProgress.memoizedState = renderLanes) - : isHydrating || - ((renderLanes = workInProgress.type), - (current = workInProgress.pendingProps), - (props = getOwnerDocumentFromRootContainer( - rootInstanceStackCursor.current - ).createElement(renderLanes)), - (props[internalInstanceKey] = workInProgress), - (props[internalPropsKey] = current), - setInitialProperties(props, renderLanes, current), - markNodeAsHoistable(props), - (workInProgress.stateNode = props)) - : (workInProgress.memoizedState = getResource( - workInProgress.type, - current.memoizedProps, - workInProgress.pendingProps, - current.memoizedState - )), - null - ); - case 27: - return ( - pushHostContext(workInProgress), - null === current && - isHydrating && - ((props = workInProgress.stateNode = - resolveSingletonInstance( - workInProgress.type, - workInProgress.pendingProps, + markRef(current, workInProgress); + if (null === current) { + var resource = getResource( + workInProgress.type, + null, + workInProgress.pendingProps, + null + ); + if (resource) workInProgress.memoizedState = resource; + else if (!isHydrating) { + var type = workInProgress.type, + props$jscomp$0 = workInProgress.pendingProps, + domElement = getOwnerDocumentFromRootContainer( rootInstanceStackCursor.current - )), - (hydrationParentFiber = workInProgress), - (rootOrSingletonContext = !0), - (init = nextHydratableInstance), - isSingletonScope(workInProgress.type) - ? ((previousHydratableOnEnteringScopedSingleton = init), - (nextHydratableInstance = getNextHydratable(props.firstChild))) - : (nextHydratableInstance = init)), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - markRef(current, workInProgress), - null === current && (workInProgress.flags |= 4194304), - workInProgress.child + ).createElement(type); + domElement[internalInstanceKey] = workInProgress; + domElement[internalPropsKey] = props$jscomp$0; + setInitialProperties(domElement, type, props$jscomp$0); + markNodeAsHoistable(domElement); + workInProgress.stateNode = domElement; + } + } else + workInProgress.memoizedState = getResource( + workInProgress.type, + current.memoizedProps, + workInProgress.pendingProps, + current.memoizedState + ); + return null; + case 27: + pushHostContext(workInProgress); + if (null === current && isHydrating) { + var instance = (workInProgress.stateNode = resolveSingletonInstance( + workInProgress.type, + workInProgress.pendingProps, + rootInstanceStackCursor.current + )); + hydrationParentFiber = workInProgress; + rootOrSingletonContext = !0; + var currentHydratableInstance = nextHydratableInstance; + isSingletonScope(workInProgress.type) + ? ((previousHydratableOnEnteringScopedSingleton = + currentHydratableInstance), + (nextHydratableInstance = getNextHydratable(instance.firstChild))) + : (nextHydratableInstance = currentHydratableInstance); + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + markRef(current, workInProgress); + null === current && (workInProgress.flags |= 4194304); + return workInProgress.child; case 5: if (null === current && isHydrating) { - if ((init = props = nextHydratableInstance)) - (props = canHydrateInstance( - props, + var nextInstance = nextHydratableInstance, + JSCompiler_temp; + if ((JSCompiler_temp = nextInstance)) { + var instance$jscomp$0 = canHydrateInstance( + nextInstance, workInProgress.type, workInProgress.pendingProps, rootOrSingletonContext - )), - null !== props - ? ((workInProgress.stateNode = props), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable(props.firstChild)), - (rootOrSingletonContext = !1), - (init = !0)) - : (init = !1); - init || throwOnHydrationMismatch(workInProgress); + ); + null !== instance$jscomp$0 + ? ((workInProgress.stateNode = instance$jscomp$0), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + instance$jscomp$0.firstChild + )), + (rootOrSingletonContext = !1), + (JSCompiler_temp = !0)) + : (JSCompiler_temp = !1); + } + JSCompiler_temp || throwOnHydrationMismatch(workInProgress); } pushHostContext(workInProgress); - init = workInProgress.type; - prevState = workInProgress.pendingProps; - nextState = null !== current ? current.memoizedProps : null; - props = prevState.children; - shouldSetTextContent(init, prevState) - ? (props = null) - : null !== nextState && - shouldSetTextContent(init, nextState) && + var type$jscomp$0 = workInProgress.type, + nextProps$jscomp$0 = workInProgress.pendingProps, + prevProps = null !== current ? current.memoizedProps : null, + nextChildren$jscomp$0 = nextProps$jscomp$0.children; + shouldSetTextContent(type$jscomp$0, nextProps$jscomp$0) + ? (nextChildren$jscomp$0 = null) + : null !== prevProps && + shouldSetTextContent(type$jscomp$0, prevProps) && (workInProgress.flags |= 32); - null !== workInProgress.memoizedState && - ((init = renderWithHooks( + if (null !== workInProgress.memoizedState) { + var newState = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, null, null, renderLanes - )), - (HostTransitionContext._currentValue = init)); + ); + HostTransitionContext._currentValue = newState; + } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, props, renderLanes); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$0, + renderLanes + ); return workInProgress.child; case 6: if (null === current && isHydrating) { - if ((current = renderLanes = nextHydratableInstance)) - (renderLanes = canHydrateTextInstance( - renderLanes, + var nextInstance$jscomp$0 = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if ((JSCompiler_temp$jscomp$0 = nextInstance$jscomp$0)) { + var textInstance = canHydrateTextInstance( + nextInstance$jscomp$0, workInProgress.pendingProps, rootOrSingletonContext - )), - null !== renderLanes - ? ((workInProgress.stateNode = renderLanes), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null), - (current = !0)) - : (current = !1); - current || throwOnHydrationMismatch(workInProgress); + ); + null !== textInstance + ? ((workInProgress.stateNode = textInstance), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (JSCompiler_temp$jscomp$0 = !0)) + : (JSCompiler_temp$jscomp$0 = !1); + } + JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(workInProgress); } return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - return ( - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ), - (props = workInProgress.pendingProps), - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - props, - renderLanes - )) - : reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + var nextChildren$jscomp$1 = workInProgress.pendingProps; + null === current + ? (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren$jscomp$1, + renderLanes + )) + : reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$1, + renderLanes + ); + return workInProgress.child; case 11: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = + var type$jscomp$1 = workInProgress.type, + unresolvedProps$123 = workInProgress.pendingProps, + resolvedProps$124 = disableDefaultPropsExceptForClasses || - workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateForwardRef(current, workInProgress, props, init, renderLanes) + workInProgress.elementType === type$jscomp$1 + ? unresolvedProps$123 + : resolveDefaultPropsOnNonClassComponent( + type$jscomp$1, + unresolvedProps$123 + ); + return updateForwardRef( + current, + workInProgress, + type$jscomp$1, + resolvedProps$124, + renderLanes ); case 7: - return ( - (props = workInProgress.pendingProps), - enableFragmentRefs && markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child + var nextChildren$jscomp$2 = workInProgress.pendingProps; + enableFragmentRefs && markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$2, + renderLanes ); + return workInProgress.child; case 8: return ( reconcileChildren( @@ -7562,42 +7653,53 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - return ( - (props = workInProgress.pendingProps), - pushProvider( - workInProgress, - enableRenderableContext - ? workInProgress.type - : workInProgress.type._context, - props.value - ), - reconcileChildren(current, workInProgress, props.children, renderLanes), - workInProgress.child + var newProps = workInProgress.pendingProps; + pushProvider( + workInProgress, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, + newProps.value ); + reconcileChildren( + current, + workInProgress, + newProps.children, + renderLanes + ); + return workInProgress.child; case 9: - return ( - (init = enableRenderableContext - ? workInProgress.type._context - : workInProgress.type), - (props = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress), - (init = readContext(init)), - (props = props(init)), - (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); + var context = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type; + var render = workInProgress.pendingProps.children; + prepareToReadContext(workInProgress); + var newValue = readContext(context); + var newChildren = render(newValue); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, newChildren, renderLanes); + return workInProgress.child; case 14: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) + var type$125 = workInProgress.type, + unresolvedProps$126 = workInProgress.pendingProps, + resolvedProps$127 = disableDefaultPropsExceptForClasses + ? unresolvedProps$126 + : resolveDefaultPropsOnNonClassComponent( + type$125, + unresolvedProps$126 + ); + resolvedProps$127 = disableDefaultPropsExceptForClasses + ? resolvedProps$127 + : resolveDefaultPropsOnNonClassComponent( + type$125.type, + resolvedProps$127 + ); + return updateMemoComponent( + current, + workInProgress, + type$125, + resolvedProps$127, + renderLanes ); case 15: return updateSimpleMemoComponent( @@ -7610,48 +7712,160 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: - return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child + var nextChildren$jscomp$3 = workInProgress.pendingProps.children; + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$3, + renderLanes ); + return workInProgress.child; case 31: - props = workInProgress.pendingProps; - renderLanes = workInProgress.mode; - props = { mode: props.mode, children: props.children }; - if (null === current) { - if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((current = canHydrateHydrationBoundary( - current, + var nextProps$jscomp$1 = workInProgress.pendingProps, + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, rootOrSingletonContext - )), - (current = - null !== current && "&" === current.data ? current : null), - null !== current && - ((workInProgress.stateNode = current), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - current.nextSibling - )))) - : (current = null), - null === current) - ) - throw throwOnHydrationMismatch(workInProgress); - renderLanes = mountWorkInProgressOffscreenFiber(props, renderLanes); - renderLanes.ref = workInProgress.ref; - workInProgress.child = renderLanes; - renderLanes.return = workInProgress; - workInProgress = renderLanes; - } else - (renderLanes = createWorkInProgress(current.child, props)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes); - return workInProgress; + ); + var JSCompiler_inline_result$jscomp$1 = + null !== hydratableInstance && "&" === hydratableInstance.data + ? hydratableInstance + : null; + if (null !== JSCompiler_inline_result$jscomp$1) { + workInProgress.memoizedState = { + dehydrated: JSCompiler_inline_result$jscomp$1, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }; + var dehydratedFragment = createFiberFromDehydratedFragment( + JSCompiler_inline_result$jscomp$1 + ); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$1 = JSCompiler_inline_result$jscomp$1; + } else JSCompiler_temp$jscomp$1 = null; + if (null === JSCompiler_temp$jscomp$1) + throw throwOnHydrationMismatch(workInProgress); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$2 = null; + } else + JSCompiler_inline_result$jscomp$2 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var dehydrated = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$3 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$3 = null); + else throw Error(formatProdErrorMessage(558)); + else { + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + var hasContextChanged$96 = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged$96) { + var root$97 = workInProgressRoot; + if (null !== root$97) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root$97, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root$97, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$3 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + dehydrated.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$2 = JSCompiler_inline_result$jscomp$3; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$2 = primaryChildFragment$jscomp$0; + } + } + return JSCompiler_inline_result$jscomp$2; case 22: return updateOffscreenComponent( current, @@ -7667,117 +7881,131 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.pendingProps ); case 24: - return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (prevState = createCache()), - (init.pooledCache = prevState), - prevState.refCount++, - null !== prevState && (init.pooledCacheLanes |= renderLanes), - (init = prevState)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (prevState = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = prevState.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + prepareToReadContext(workInProgress); + var parentCache = readContext(CacheContext); + if (null === current) { + var cacheFromPool = peekCacheFromPool(); + if (null !== cacheFromPool) + var JSCompiler_inline_result$jscomp$4 = cacheFromPool; + else { + var root = workInProgressRoot, + freshCache = createCache(); + root.pooledCache = freshCache; + freshCache.refCount++; + null !== freshCache && (root.pooledCacheLanes |= renderLanes); + JSCompiler_inline_result$jscomp$4 = freshCache; + } + var freshCache$jscomp$0 = JSCompiler_inline_result$jscomp$4; + workInProgress.memoizedState = { + parent: parentCache, + cache: freshCache$jscomp$0 + }; + initializeUpdateQueue(workInProgress); + pushProvider(workInProgress, CacheContext, freshCache$jscomp$0); + } else { + 0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()); + var prevState$jscomp$1 = current.memoizedState, + nextState$jscomp$0 = workInProgress.memoizedState; + if (prevState$jscomp$1.parent !== parentCache) { + var derivedState = { parent: parentCache, cache: parentCache }; + workInProgress.memoizedState = derivedState; + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + derivedState); + pushProvider(workInProgress, CacheContext, parentCache); + } else { + var nextCache$jscomp$0 = nextState$jscomp$0.cache; + pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); + nextCache$jscomp$0 !== prevState$jscomp$1.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); + } + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? ((props = workInProgress.pendingProps), - null === current && - ((init = enableTransitionTracing - ? transitionStack.current - : null), - null !== init && - ((init = { - tag: 1, - transitions: new Set(init), - pendingBoundaries: null, - name: props.name, - aborts: null - }), - (workInProgress.stateNode = init), - (workInProgress.flags |= 2048))), - (init = workInProgress.stateNode), - null !== init && pushMarkerInstance(workInProgress, init), - reconcileChildren( - current, - workInProgress, - props.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 30: - if (enableViewTransition) - return ( - (props = workInProgress.pendingProps), - (init = workInProgress.stateNode), - null != props.name && "auto" !== props.name - ? (workInProgress.flags |= null === current ? 18882560 : 18874368) - : (null === init.autoName && - ((prevState = workInProgressRoot.identifierPrefix), - isHydrating - ? ((nextState = getTreeId()), - (prevState = - "\u00ab" + prevState + "T" + nextState + "\u00bb")) - : ((nextState = globalClientIdCounter$1++), - (prevState = - "\u00ab" + - prevState + - "t" + - nextState.toString(32) + - "\u00bb")), - (init.autoName = prevState)), - isHydrating && pushMaterializedTreeId(workInProgress)), - null !== current && current.memoizedProps.name !== props.name - ? (workInProgress.flags |= 4194816) - : markRef(current, workInProgress), + if (enableTransitionTracing) { + if (enableTransitionTracing) { + var nextProps$jscomp$2 = workInProgress.pendingProps; + if (null === current) { + var currentTransitions = enableTransitionTracing + ? transitionStack.current + : null; + if (null !== currentTransitions) { + var markerInstance = { + tag: 1, + transitions: new Set(currentTransitions), + pendingBoundaries: null, + name: nextProps$jscomp$2.name, + aborts: null + }; + workInProgress.stateNode = markerInstance; + workInProgress.flags |= 2048; + } + } + var instance$jscomp$1 = workInProgress.stateNode; + null !== instance$jscomp$1 && + pushMarkerInstance(workInProgress, instance$jscomp$1); reconcileChildren( current, workInProgress, - props.children, + nextProps$jscomp$2.children, renderLanes - ), - workInProgress.child + ); + var JSCompiler_inline_result$jscomp$5 = workInProgress.child; + } else JSCompiler_inline_result$jscomp$5 = null; + return JSCompiler_inline_result$jscomp$5; + } + break; + case 30: + if (enableViewTransition) { + var pendingProps = workInProgress.pendingProps, + instance$jscomp$2 = workInProgress.stateNode; + if (null != pendingProps.name && "auto" !== pendingProps.name) + workInProgress.flags |= null === current ? 18882560 : 18874368; + else { + if (null === instance$jscomp$2.autoName) { + var identifierPrefix = workInProgressRoot.identifierPrefix; + if (isHydrating) { + var treeId = getTreeId(); + var name = "\u00ab" + identifierPrefix + "T" + treeId + "\u00bb"; + } else { + var globalClientId = globalClientIdCounter$1++; + name = + "\u00ab" + + identifierPrefix + + "t" + + globalClientId.toString(32) + + "\u00bb"; + } + instance$jscomp$2.autoName = name; + } + isHydrating && pushMaterializedTreeId(workInProgress); + } + null !== current && current.memoizedProps.name !== pendingProps.name + ? (workInProgress.flags |= 4194816) + : markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + pendingProps.children, + renderLanes ); + return workInProgress.child; + } break; case 29: throw workInProgress.pendingProps; @@ -7956,14 +8184,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$128 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$128 = lastTailNode), + for (var lastTailNode$129 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$129 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$128 + null === lastTailNode$129 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$128.sibling = null); + : (lastTailNode$129.sibling = null); } } function bubbleProperties(completedWork) { @@ -7973,19 +8201,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$129 = completedWork.child; null !== child$129; ) - (newChildLanes |= child$129.lanes | child$129.childLanes), - (subtreeFlags |= child$129.subtreeFlags & 65011712), - (subtreeFlags |= child$129.flags & 65011712), - (child$129.return = completedWork), - (child$129 = child$129.sibling); + for (var child$130 = completedWork.child; null !== child$130; ) + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags & 65011712), + (subtreeFlags |= child$130.flags & 65011712), + (child$130.return = completedWork), + (child$130 = child$130.sibling); else - for (child$129 = completedWork.child; null !== child$129; ) - (newChildLanes |= child$129.lanes | child$129.childLanes), - (subtreeFlags |= child$129.subtreeFlags), - (subtreeFlags |= child$129.flags), - (child$129.return = completedWork), - (child$129 = child$129.sibling); + for (child$130 = completedWork.child; null !== child$130; ) + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags), + (subtreeFlags |= child$130.flags), + (child$130.return = completedWork), + (child$130 = child$130.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8272,11 +8500,40 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null), + (workInProgress.flags |= 4); + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8555,6 +8812,17 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8632,6 +8900,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -8805,8 +9077,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$162) { - captureCommitPhaseError(current, nearestMountedAncestor, error$162); + } catch (error$166) { + captureCommitPhaseError(current, nearestMountedAncestor, error$166); } else ref.current = null; } @@ -9469,7 +9741,7 @@ function commitBeforeMutationEffects(root, firstChild, committedLanes) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$211) { + } catch (e$216) { JSCompiler_temp = null; break a; } @@ -9735,11 +10007,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$160) { + } catch (error$164) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$160 + error$164 ); } } @@ -9782,6 +10054,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -10248,6 +10524,31 @@ function commitDeletionEffectsOnFiber( ); } } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + retryIfBlockedOn(current); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -10275,6 +10576,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -10617,6 +10919,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -10838,25 +11149,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$163 = hostParentFiber.stateNode; + var parent$167 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$163, ""), (hostParentFiber.flags &= -33)); - var before$164 = getHostSibling(finishedWork); + (setTextContent(parent$167, ""), (hostParentFiber.flags &= -33)); + var before$168 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$164, - parent$163, + before$168, + parent$167, parentFragmentInstances ); break; case 3: case 4: - var parent$165 = hostParentFiber.stateNode.containerInfo, - before$166 = getHostSibling(finishedWork); + var parent$169 = hostParentFiber.stateNode.containerInfo, + before$170 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$166, - parent$165, + before$170, + parent$169, parentFragmentInstances ); break; @@ -11149,6 +11460,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -11402,6 +11723,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11425,14 +11754,14 @@ function commitPassiveMountOnFiber( ); break; case 22: - var instance$182 = finishedWork.stateNode, - current$183 = finishedWork.alternate; + var instance$187 = finishedWork.stateNode, + current$188 = finishedWork.alternate; null !== finishedWork.memoizedState ? (isViewTransitionEligible && - null !== current$183 && - null === current$183.memoizedState && - restoreEnterOrExitViewTransitions(current$183), - instance$182._visibility & 2 + null !== current$188 && + null === current$188.memoizedState && + restoreEnterOrExitViewTransitions(current$188), + instance$187._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -11444,17 +11773,17 @@ function commitPassiveMountOnFiber( finishedWork )) : (isViewTransitionEligible && - null !== current$183 && - null !== current$183.memoizedState && + null !== current$188 && + null !== current$188.memoizedState && restoreEnterOrExitViewTransitions(finishedWork), - instance$182._visibility & 2 + instance$187._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((instance$182._visibility |= 2), + : ((instance$187._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11464,9 +11793,9 @@ function commitPassiveMountOnFiber( ))); flags & 2048 && commitOffscreenPassiveMountEffects( - current$183, + current$188, finishedWork, - instance$182 + instance$187 ); break; case 24: @@ -11561,9 +11890,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$186 = finishedWork.stateNode; + var instance$191 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$186._visibility & 2 + ? instance$191._visibility & 2 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11575,7 +11904,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$186._visibility |= 2), + : ((instance$191._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11588,7 +11917,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$186 + instance$191 ); break; case 24: @@ -12811,8 +13140,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$200) { - handleThrow(root, thrownValue$200); + } catch (thrownValue$205) { + handleThrow(root, thrownValue$205); } while (1); lanes && root.shellSuspendCounter++; @@ -12931,8 +13260,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$202) { - handleThrow(root, thrownValue$202); + } catch (thrownValue$207) { + handleThrow(root, thrownValue$207); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -13643,6 +13972,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -13967,6 +14297,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -14162,12 +14497,21 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} var isInsideEventHandler = !1; function batchedUpdates(fn, a, b) { if (isInsideEventHandler) return fn(a, b); @@ -15076,20 +15420,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1782 = 0; - i$jscomp$inline_1782 < simpleEventPluginEvents.length; - i$jscomp$inline_1782++ + var i$jscomp$inline_1814 = 0; + i$jscomp$inline_1814 < simpleEventPluginEvents.length; + i$jscomp$inline_1814++ ) { - var eventName$jscomp$inline_1783 = - simpleEventPluginEvents[i$jscomp$inline_1782], - domEventName$jscomp$inline_1784 = - eventName$jscomp$inline_1783.toLowerCase(), - capitalizedEvent$jscomp$inline_1785 = - eventName$jscomp$inline_1783[0].toUpperCase() + - eventName$jscomp$inline_1783.slice(1); + var eventName$jscomp$inline_1815 = + simpleEventPluginEvents[i$jscomp$inline_1814], + domEventName$jscomp$inline_1816 = + eventName$jscomp$inline_1815.toLowerCase(), + capitalizedEvent$jscomp$inline_1817 = + eventName$jscomp$inline_1815[0].toUpperCase() + + eventName$jscomp$inline_1815.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1784, - "on" + capitalizedEvent$jscomp$inline_1785 + domEventName$jscomp$inline_1816, + "on" + capitalizedEvent$jscomp$inline_1817 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -16456,34 +16800,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$225 = props[hasSrc]; - if (null != propValue$225) + var propValue$230 = props[hasSrc]; + if (null != propValue$230) switch (hasSrc) { case "name": - hasSrcSet = propValue$225; + hasSrcSet = propValue$230; break; case "type": - propValue = propValue$225; + propValue = propValue$230; break; case "checked": - checked = propValue$225; + checked = propValue$230; break; case "defaultChecked": - defaultChecked = propValue$225; + defaultChecked = propValue$230; break; case "value": - propKey = propValue$225; + propKey = propValue$230; break; case "defaultValue": - defaultValue = propValue$225; + defaultValue = propValue$230; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$225) + if (null != propValue$230) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$225, props, null); + setProp(domElement, tag, hasSrc, propValue$230, props, null); } } initInput( @@ -16622,14 +16966,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$225 in props) - props.hasOwnProperty(propValue$225) && - ((hasSrc = props[propValue$225]), + for (propValue$230 in props) + props.hasOwnProperty(propValue$230) && + ((hasSrc = props[propValue$230]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$225, + propValue$230, hasSrc, props, void 0 @@ -16677,14 +17021,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$242 in nextProps) { - var propKey = nextProps[propKey$242]; - lastProp = lastProps[propKey$242]; + for (var propKey$247 in nextProps) { + var propKey = nextProps[propKey$247]; + lastProp = lastProps[propKey$247]; if ( - nextProps.hasOwnProperty(propKey$242) && + nextProps.hasOwnProperty(propKey$247) && (null != propKey || null != lastProp) ) - switch (propKey$242) { + switch (propKey$247) { case "type": propKey !== lastProp && trackHostMutation(); type = propKey; @@ -16719,7 +17063,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$242, + propKey$247, propKey, nextProps, lastProp @@ -16738,7 +17082,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$242 = null; + propKey = value = defaultValue = propKey$247 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16770,7 +17114,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && trackHostMutation(); - propKey$242 = type; + propKey$247 = type; break; case "defaultValue": type !== lastDefaultValue && trackHostMutation(); @@ -16792,15 +17136,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$242 - ? updateOptions(domElement, !!lastProps, propKey$242, !1) + null != propKey$247 + ? updateOptions(domElement, !!lastProps, propKey$247, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$242 = null; + propKey = propKey$247 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16825,7 +17169,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && trackHostMutation(); - propKey$242 = name; + propKey$247 = name; break; case "defaultValue": name !== type && trackHostMutation(); @@ -16840,17 +17184,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$242, propKey); + updateTextarea(domElement, propKey$247, propKey); return; case "option": - for (var propKey$258 in lastProps) + for (var propKey$263 in lastProps) if ( - ((propKey$242 = lastProps[propKey$258]), - lastProps.hasOwnProperty(propKey$258) && - null != propKey$242 && - !nextProps.hasOwnProperty(propKey$258)) + ((propKey$247 = lastProps[propKey$263]), + lastProps.hasOwnProperty(propKey$263) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$263)) ) - switch (propKey$258) { + switch (propKey$263) { case "selected": domElement.selected = !1; break; @@ -16858,34 +17202,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$258, + propKey$263, null, nextProps, - propKey$242 + propKey$247 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$242 = nextProps[lastDefaultValue]), + ((propKey$247 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$242 !== propKey && - (null != propKey$242 || null != propKey)) + propKey$247 !== propKey && + (null != propKey$247 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$242 !== propKey && trackHostMutation(); + propKey$247 !== propKey && trackHostMutation(); domElement.selected = - propKey$242 && - "function" !== typeof propKey$242 && - "symbol" !== typeof propKey$242; + propKey$247 && + "function" !== typeof propKey$247 && + "symbol" !== typeof propKey$247; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$242, + propKey$247, nextProps, propKey ); @@ -16906,24 +17250,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$263 in lastProps) - (propKey$242 = lastProps[propKey$263]), - lastProps.hasOwnProperty(propKey$263) && - null != propKey$242 && - !nextProps.hasOwnProperty(propKey$263) && - setProp(domElement, tag, propKey$263, null, nextProps, propKey$242); + for (var propKey$268 in lastProps) + (propKey$247 = lastProps[propKey$268]), + lastProps.hasOwnProperty(propKey$268) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$268) && + setProp(domElement, tag, propKey$268, null, nextProps, propKey$247); for (checked in nextProps) if ( - ((propKey$242 = nextProps[checked]), + ((propKey$247 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$242 !== propKey && - (null != propKey$242 || null != propKey)) + propKey$247 !== propKey && + (null != propKey$247 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$242) + if (null != propKey$247) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16931,7 +17275,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$242, + propKey$247, nextProps, propKey ); @@ -16939,49 +17283,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$268 in lastProps) - (propKey$242 = lastProps[propKey$268]), - lastProps.hasOwnProperty(propKey$268) && - void 0 !== propKey$242 && - !nextProps.hasOwnProperty(propKey$268) && + for (var propKey$273 in lastProps) + (propKey$247 = lastProps[propKey$273]), + lastProps.hasOwnProperty(propKey$273) && + void 0 !== propKey$247 && + !nextProps.hasOwnProperty(propKey$273) && setPropOnCustomElement( domElement, tag, - propKey$268, + propKey$273, void 0, nextProps, - propKey$242 + propKey$247 ); for (defaultChecked in nextProps) - (propKey$242 = nextProps[defaultChecked]), + (propKey$247 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$242 === propKey || - (void 0 === propKey$242 && void 0 === propKey) || + propKey$247 === propKey || + (void 0 === propKey$247 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$242, + propKey$247, nextProps, propKey ); return; } } - for (var propKey$273 in lastProps) - (propKey$242 = lastProps[propKey$273]), - lastProps.hasOwnProperty(propKey$273) && - null != propKey$242 && - !nextProps.hasOwnProperty(propKey$273) && - setProp(domElement, tag, propKey$273, null, nextProps, propKey$242); + for (var propKey$278 in lastProps) + (propKey$247 = lastProps[propKey$278]), + lastProps.hasOwnProperty(propKey$278) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$278) && + setProp(domElement, tag, propKey$278, null, nextProps, propKey$247); for (lastProp in nextProps) - (propKey$242 = nextProps[lastProp]), + (propKey$247 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$242 === propKey || - (null == propKey$242 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$242, nextProps, propKey); + propKey$247 === propKey || + (null == propKey$247 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$247, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -18193,26 +18537,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$285 = getResourcesFromRoot( + var styles$290 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$286 = styles$285.get(type); - resource$286 || + resource$291 = styles$290.get(type); + resource$291 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$286 = { + (resource$291 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$285.set(type, resource$286), - (styles$285 = JSCompiler_inline_result.querySelector( + styles$290.set(type, resource$291), + (styles$290 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$285._p && - ((resource$286.instance = styles$285), - (resource$286.state.loading = 5)), + !styles$290._p && + ((resource$291.instance = styles$290), + (resource$291.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -18225,16 +18569,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$285 || + styles$290 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$286.state + resource$291.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$286; + return resource$291; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -18331,37 +18675,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$291 = hoistableRoot.querySelector( + var instance$296 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$291) + if (instance$296) return ( (resource.state.loading |= 4), - (resource.instance = instance$291), - markNodeAsHoistable(instance$291), - instance$291 + (resource.instance = instance$296), + markNodeAsHoistable(instance$296), + instance$296 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$291 = ( + instance$296 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$291); - var linkInstance = instance$291; + markNodeAsHoistable(instance$296); + var linkInstance = instance$296; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$291, "link", instance); + setInitialProperties(instance$296, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$291, props.precedence, hoistableRoot); - return (resource.instance = instance$291); + insertStylesheet(instance$296, props.precedence, hoistableRoot); + return (resource.instance = instance$296); case "script": - instance$291 = getScriptKey(props.src); + instance$296 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$291) + getScriptSelectorFromKey(instance$296) )) ) return ( @@ -18370,7 +18714,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$291))) + if ((styleProps = preloadPropsMap.get(instance$296))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -18940,19 +19284,22 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -19215,6 +19562,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -19261,8 +19609,11 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -19403,16 +19754,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_2027 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2058 = React.version; if ( - "19.2.0-www-classic-17f88c80-20250422" !== - isomorphicReactPackageVersion$jscomp$inline_2027 + "19.2.0-www-classic-3ef31d19-20250422" !== + isomorphicReactPackageVersion$jscomp$inline_2058 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_2027, - "19.2.0-www-classic-17f88c80-20250422" + isomorphicReactPackageVersion$jscomp$inline_2058, + "19.2.0-www-classic-3ef31d19-20250422" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -19428,24 +19779,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2628 = { +var internals$jscomp$inline_2669 = { bundleType: 0, - version: "19.2.0-www-classic-17f88c80-20250422", + version: "19.2.0-www-classic-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2629 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2670 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2629.isDisabled && - hook$jscomp$inline_2629.supportsFiber + !hook$jscomp$inline_2670.isDisabled && + hook$jscomp$inline_2670.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2629.inject( - internals$jscomp$inline_2628 + (rendererID = hook$jscomp$inline_2670.inject( + internals$jscomp$inline_2669 )), - (injectedHook = hook$jscomp$inline_2629); + (injectedHook = hook$jscomp$inline_2670); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -19948,4 +20299,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-www-classic-17f88c80-20250422"; +exports.version = "19.2.0-www-classic-3ef31d19-20250422"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 8fc0192439..fecbb06d82 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -85,6 +85,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -474,6 +484,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -1713,6 +1731,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -1813,6 +1839,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -1820,8 +1847,6 @@ function popToNextHostParent(fiber) { case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -1847,20 +1872,23 @@ function popHydrationState(fiber) { if (!fiber) throw Error(formatProdErrorMessage(317)); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -3653,6 +3681,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? push(suspenseHandlerStackCursor, handler) : push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -5418,6 +5451,7 @@ function throwException( sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -5655,10 +5689,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$94 = workInProgress.stateNode; + root$93 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$94.incompleteTransitions.has(transition)) { + if (!root$93.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5666,11 +5700,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$94.incompleteTransitions.set(transition, markerInstance); + root$93.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$94.incompleteTransitions.forEach(function (markerInstance) { + root$93.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5847,10 +5881,19 @@ function updateOffscreenComponent( renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -5860,17 +5903,6 @@ function updateOffscreenComponent( renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -5913,6 +5945,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6313,8 +6367,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { retryLane: 536870912, hydrationErrors: null }), - (renderLanes = createFiber(18, null, null, 0)), - (renderLanes.stateNode = current), + (renderLanes = createFiberFromDehydratedFragment(current)), (renderLanes.return = workInProgress), (workInProgress.child = renderLanes), (hydrationParentFiber = workInProgress), @@ -6411,14 +6464,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -6470,15 +6523,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -6507,12 +6552,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, current), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -6524,14 +6564,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), - (nextProps = createWorkInProgress(showFallback, { + (showFallback = workInProgress.mode), + (nextFallbackChildren = current.child), + (digest = nextFallbackChildren.sibling), + (nextProps = createWorkInProgress(nextFallbackChildren, { mode: "hidden", children: nextProps.children })), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712), + (nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -6539,7 +6579,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -6550,46 +6590,46 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (nextFallbackChildren = current.child.memoizedState), - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (nextFallbackChildren = + nextFallbackChildren.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })), - (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.memoizedState = showFallback), enableTransitionTracing && - ((nextFallbackChildren = enableTransitionTracing + ((showFallback = enableTransitionTracing ? transitionStack.current : null), - null !== nextFallbackChildren && - ((showFallback = enableTransitionTracing + null !== showFallback && + ((nextFallbackChildren = enableTransitionTracing ? markerInstanceStack.current : null), (digest = nextPrimaryChildren.updateQueue), (didSuspend = current.updateQueue), null === digest ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null }) : digest === didSuspend ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null !== didSuspend ? didSuspend.retryQueue : null }) - : ((digest.transitions = nextFallbackChildren), - (digest.markerInstances = showFallback)))), + : ((digest.transitions = showFallback), + (digest.markerInstances = nextFallbackChildren)))), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -6852,10 +6892,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$118 = workInProgress.memoizedState; + if (null !== state$118) { + if (null !== state$118.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -6875,17 +6923,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$118 = 0 !== (renderLanes & workInProgress.childLanes); + state$118 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$118 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$118) return updateSuspenseListComponent( current, workInProgress, @@ -6899,7 +6947,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$118) break; else return null; case 22: return ( @@ -6916,8 +6964,8 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 25: if (enableTransitionTracing) { - state = workInProgress.stateNode; - null !== state && pushMarkerInstance(workInProgress, state); + state$118 = workInProgress.stateNode; + null !== state$118 && pushMarkerInstance(workInProgress, state$118); break; } case 23: @@ -6961,95 +7009,112 @@ function beginWork(current, workInProgress, renderLanes) { switch (workInProgress.tag) { case 16: a: { - var props = workInProgress.pendingProps; - current = workInProgress.elementType; - var init = current._init; - current = init(current._payload); - workInProgress.type = current; - if ("function" === typeof current) - shouldConstruct(current) - ? ((props = resolveClassComponentProps(current, props, !1)), - (workInProgress.tag = 1), - (workInProgress = updateClassComponent( - null, - workInProgress, - current, - props, - renderLanes - ))) - : ((props = disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(current, props)), - (workInProgress.tag = 0), - (workInProgress = updateFunctionComponent( - null, - workInProgress, - current, - props, - renderLanes - ))); + var props = workInProgress.pendingProps, + lazyComponent = workInProgress.elementType, + init = lazyComponent._init; + var Component = init(lazyComponent._payload); + workInProgress.type = Component; + if ("function" === typeof Component) + if (shouldConstruct(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props, + !1 + ); + workInProgress.tag = 1; + var JSCompiler_inline_result = updateClassComponent( + null, + workInProgress, + Component, + resolvedProps, + renderLanes + ); + } else { + var resolvedProps$98 = disableDefaultPropsExceptForClasses + ? props + : resolveDefaultPropsOnNonClassComponent(Component, props); + workInProgress.tag = 0; + JSCompiler_inline_result = updateFunctionComponent( + null, + workInProgress, + Component, + resolvedProps$98, + renderLanes + ); + } else { - if (void 0 !== current && null !== current) - if (((init = current.$$typeof), init === REACT_FORWARD_REF_TYPE)) { - props = disableDefaultPropsExceptForClasses + if (void 0 !== Component && null !== Component) { + var $$typeof = Component.$$typeof; + if ($$typeof === REACT_FORWARD_REF_TYPE) { + var resolvedProps$99 = disableDefaultPropsExceptForClasses ? props - : resolveDefaultPropsOnNonClassComponent(current, props); + : resolveDefaultPropsOnNonClassComponent(Component, props); workInProgress.tag = 11; - workInProgress = updateForwardRef( + JSCompiler_inline_result = updateForwardRef( null, workInProgress, - current, - props, + Component, + resolvedProps$99, renderLanes ); break a; - } else if (init === REACT_MEMO_TYPE) { - props = disableDefaultPropsExceptForClasses + } else if ($$typeof === REACT_MEMO_TYPE) { + var resolvedProps$100 = disableDefaultPropsExceptForClasses ? props - : resolveDefaultPropsOnNonClassComponent(current, props); + : resolveDefaultPropsOnNonClassComponent(Component, props); workInProgress.tag = 14; - workInProgress = updateMemoComponent( + JSCompiler_inline_result = updateMemoComponent( null, workInProgress, - current, + Component, disableDefaultPropsExceptForClasses - ? props - : resolveDefaultPropsOnNonClassComponent(current.type, props), + ? resolvedProps$100 + : resolveDefaultPropsOnNonClassComponent( + Component.type, + resolvedProps$100 + ), renderLanes ); break a; } - workInProgress = getComponentNameFromType(current) || current; - throw Error(formatProdErrorMessage(306, workInProgress, "")); + } + var loggedComponent = + getComponentNameFromType(Component) || Component; + throw Error(formatProdErrorMessage(306, loggedComponent, "")); } } - return workInProgress; + return JSCompiler_inline_result; case 0: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = + var Component$jscomp$0 = workInProgress.type, + unresolvedProps = workInProgress.pendingProps, + resolvedProps$jscomp$0 = disableDefaultPropsExceptForClasses || - workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateFunctionComponent( - current, - workInProgress, - props, - init, - renderLanes - ) + workInProgress.elementType === Component$jscomp$0 + ? unresolvedProps + : resolveDefaultPropsOnNonClassComponent( + Component$jscomp$0, + unresolvedProps + ); + return updateFunctionComponent( + current, + workInProgress, + Component$jscomp$0, + resolvedProps$jscomp$0, + renderLanes ); case 1: - return ( - (props = workInProgress.type), - (init = resolveClassComponentProps( - props, + var Component$120 = workInProgress.type, + resolvedProps$122 = resolveClassComponentProps( + Component$120, workInProgress.pendingProps, - workInProgress.elementType === props - )), - updateClassComponent(current, workInProgress, props, init, renderLanes) + workInProgress.elementType === Component$120 + ); + return updateClassComponent( + current, + workInProgress, + Component$120, + resolvedProps$122, + renderLanes ); case 3: a: { @@ -7058,18 +7123,18 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.stateNode.containerInfo ); if (null === current) throw Error(formatProdErrorMessage(387)); - props = workInProgress.pendingProps; - var prevState = workInProgress.memoizedState; - init = prevState.element; + var nextProps = workInProgress.pendingProps, + prevState = workInProgress.memoizedState, + prevChildren = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, props, null, renderLanes); + processUpdateQueue(workInProgress, nextProps, null, renderLanes); var nextState = workInProgress.memoizedState; enableTransitionTracing && push(transitionStack, workInProgressTransitions); enableTransitionTracing && pushRootMarkerInstance(workInProgress); - props = nextState.cache; - pushProvider(workInProgress, CacheContext, props); - props !== prevState.cache && + var nextCache = nextState.cache; + pushProvider(workInProgress, CacheContext, nextCache); + nextCache !== prevState.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -7077,233 +7142,259 @@ function beginWork(current, workInProgress, renderLanes) { !0 ); suspendIfUpdateReadFromEntangledAsyncAction(); - props = nextState.element; - if (prevState.isDehydrated) - if ( - ((prevState = { - element: props, - isDehydrated: !1, - cache: nextState.cache - }), - (workInProgress.updateQueue.baseState = prevState), - (workInProgress.memoizedState = prevState), - workInProgress.flags & 256) - ) { - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - props, - renderLanes - ); + var nextChildren = nextState.element; + if (prevState.isDehydrated) { + var overrideState = { + element: nextChildren, + isDehydrated: !1, + cache: nextState.cache + }; + workInProgress.updateQueue.baseState = overrideState; + workInProgress.memoizedState = overrideState; + if (workInProgress.flags & 256) { + var JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; - } else if (props !== init) { - init = createCapturedValueAtFiber( + } else if (nextChildren !== prevChildren) { + var recoverableError = createCapturedValueAtFiber( Error(formatProdErrorMessage(424)), workInProgress ); - queueHydrationError(init); - workInProgress = mountHostRootWithoutHydrating( + queueHydrationError(recoverableError); + JSCompiler_inline_result$jscomp$0 = mountHostRootWithoutHydrating( current, workInProgress, - props, + nextChildren, renderLanes ); break a; } else { - current = workInProgress.stateNode.containerInfo; - switch (current.nodeType) { + var parentContainer = workInProgress.stateNode.containerInfo; + switch (parentContainer.nodeType) { case 9: - current = current.body; + var parentElement = parentContainer.body; break; default: - current = - "HTML" === current.nodeName - ? current.ownerDocument.body - : current; + parentElement = + "HTML" === parentContainer.nodeName + ? parentContainer.ownerDocument.body + : parentContainer; } - nextHydratableInstance = getNextHydratable(current.firstChild); + nextHydratableInstance = getNextHydratable( + parentElement.firstChild + ); hydrationParentFiber = workInProgress; isHydrating = !0; hydrationErrors = null; rootOrSingletonContext = !0; - renderLanes = mountChildFibers( - workInProgress, - null, - props, - renderLanes - ); - for (workInProgress.child = renderLanes; renderLanes; ) - (renderLanes.flags = (renderLanes.flags & -3) | 4096), - (renderLanes = renderLanes.sibling); + for ( + var child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderLanes + ), + node = (workInProgress.child = child); + node; + + ) + (node.flags = (node.flags & -3) | 4096), (node = node.sibling); } - else { + } else { resetHydrationState(); - if (props === init) { - workInProgress = bailoutOnAlreadyFinishedWork( + if (nextChildren === prevChildren) { + JSCompiler_inline_result$jscomp$0 = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes ); break a; } - reconcileChildren(current, workInProgress, props, renderLanes); + reconcileChildren(current, workInProgress, nextChildren, renderLanes); } - workInProgress = workInProgress.child; + JSCompiler_inline_result$jscomp$0 = workInProgress.child; } - return workInProgress; + return JSCompiler_inline_result$jscomp$0; case 26: - return ( - markRef(current, workInProgress), - null === current - ? (renderLanes = getResource( - workInProgress.type, - null, - workInProgress.pendingProps, - null - )) - ? (workInProgress.memoizedState = renderLanes) - : isHydrating || - ((renderLanes = workInProgress.type), - (current = workInProgress.pendingProps), - (props = getOwnerDocumentFromRootContainer( - rootInstanceStackCursor.current - ).createElement(renderLanes)), - (props[internalInstanceKey] = workInProgress), - (props[internalPropsKey] = current), - setInitialProperties(props, renderLanes, current), - markNodeAsHoistable(props), - (workInProgress.stateNode = props)) - : (workInProgress.memoizedState = getResource( - workInProgress.type, - current.memoizedProps, - workInProgress.pendingProps, - current.memoizedState - )), - null - ); - case 27: - return ( - pushHostContext(workInProgress), - null === current && - isHydrating && - ((props = workInProgress.stateNode = - resolveSingletonInstance( - workInProgress.type, - workInProgress.pendingProps, + markRef(current, workInProgress); + if (null === current) { + var resource = getResource( + workInProgress.type, + null, + workInProgress.pendingProps, + null + ); + if (resource) workInProgress.memoizedState = resource; + else if (!isHydrating) { + var type = workInProgress.type, + props$jscomp$0 = workInProgress.pendingProps, + domElement = getOwnerDocumentFromRootContainer( rootInstanceStackCursor.current - )), - (hydrationParentFiber = workInProgress), - (rootOrSingletonContext = !0), - (init = nextHydratableInstance), - isSingletonScope(workInProgress.type) - ? ((previousHydratableOnEnteringScopedSingleton = init), - (nextHydratableInstance = getNextHydratable(props.firstChild))) - : (nextHydratableInstance = init)), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - markRef(current, workInProgress), - null === current && (workInProgress.flags |= 4194304), - workInProgress.child + ).createElement(type); + domElement[internalInstanceKey] = workInProgress; + domElement[internalPropsKey] = props$jscomp$0; + setInitialProperties(domElement, type, props$jscomp$0); + markNodeAsHoistable(domElement); + workInProgress.stateNode = domElement; + } + } else + workInProgress.memoizedState = getResource( + workInProgress.type, + current.memoizedProps, + workInProgress.pendingProps, + current.memoizedState + ); + return null; + case 27: + pushHostContext(workInProgress); + if (null === current && isHydrating) { + var instance = (workInProgress.stateNode = resolveSingletonInstance( + workInProgress.type, + workInProgress.pendingProps, + rootInstanceStackCursor.current + )); + hydrationParentFiber = workInProgress; + rootOrSingletonContext = !0; + var currentHydratableInstance = nextHydratableInstance; + isSingletonScope(workInProgress.type) + ? ((previousHydratableOnEnteringScopedSingleton = + currentHydratableInstance), + (nextHydratableInstance = getNextHydratable(instance.firstChild))) + : (nextHydratableInstance = currentHydratableInstance); + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + markRef(current, workInProgress); + null === current && (workInProgress.flags |= 4194304); + return workInProgress.child; case 5: if (null === current && isHydrating) { - if ((init = props = nextHydratableInstance)) - (props = canHydrateInstance( - props, + var nextInstance = nextHydratableInstance, + JSCompiler_temp; + if ((JSCompiler_temp = nextInstance)) { + var instance$jscomp$0 = canHydrateInstance( + nextInstance, workInProgress.type, workInProgress.pendingProps, rootOrSingletonContext - )), - null !== props - ? ((workInProgress.stateNode = props), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable(props.firstChild)), - (rootOrSingletonContext = !1), - (init = !0)) - : (init = !1); - init || throwOnHydrationMismatch(workInProgress); + ); + null !== instance$jscomp$0 + ? ((workInProgress.stateNode = instance$jscomp$0), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = getNextHydratable( + instance$jscomp$0.firstChild + )), + (rootOrSingletonContext = !1), + (JSCompiler_temp = !0)) + : (JSCompiler_temp = !1); + } + JSCompiler_temp || throwOnHydrationMismatch(workInProgress); } pushHostContext(workInProgress); - init = workInProgress.type; - prevState = workInProgress.pendingProps; - nextState = null !== current ? current.memoizedProps : null; - props = prevState.children; - shouldSetTextContent(init, prevState) - ? (props = null) - : null !== nextState && - shouldSetTextContent(init, nextState) && + var type$jscomp$0 = workInProgress.type, + nextProps$jscomp$0 = workInProgress.pendingProps, + prevProps = null !== current ? current.memoizedProps : null, + nextChildren$jscomp$0 = nextProps$jscomp$0.children; + shouldSetTextContent(type$jscomp$0, nextProps$jscomp$0) + ? (nextChildren$jscomp$0 = null) + : null !== prevProps && + shouldSetTextContent(type$jscomp$0, prevProps) && (workInProgress.flags |= 32); - null !== workInProgress.memoizedState && - ((init = renderWithHooks( + if (null !== workInProgress.memoizedState) { + var newState = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, null, null, renderLanes - )), - (HostTransitionContext._currentValue = init)); + ); + HostTransitionContext._currentValue = newState; + } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, props, renderLanes); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$0, + renderLanes + ); return workInProgress.child; case 6: if (null === current && isHydrating) { - if ((current = renderLanes = nextHydratableInstance)) - (renderLanes = canHydrateTextInstance( - renderLanes, + var nextInstance$jscomp$0 = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if ((JSCompiler_temp$jscomp$0 = nextInstance$jscomp$0)) { + var textInstance = canHydrateTextInstance( + nextInstance$jscomp$0, workInProgress.pendingProps, rootOrSingletonContext - )), - null !== renderLanes - ? ((workInProgress.stateNode = renderLanes), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null), - (current = !0)) - : (current = !1); - current || throwOnHydrationMismatch(workInProgress); + ); + null !== textInstance + ? ((workInProgress.stateNode = textInstance), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null), + (JSCompiler_temp$jscomp$0 = !0)) + : (JSCompiler_temp$jscomp$0 = !1); + } + JSCompiler_temp$jscomp$0 || throwOnHydrationMismatch(workInProgress); } return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - return ( - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ), - (props = workInProgress.pendingProps), - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - props, - renderLanes - )) - : reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); + pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); + var nextChildren$jscomp$1 = workInProgress.pendingProps; + null === current + ? (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren$jscomp$1, + renderLanes + )) + : reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$1, + renderLanes + ); + return workInProgress.child; case 11: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = + var type$jscomp$1 = workInProgress.type, + unresolvedProps$123 = workInProgress.pendingProps, + resolvedProps$124 = disableDefaultPropsExceptForClasses || - workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateForwardRef(current, workInProgress, props, init, renderLanes) + workInProgress.elementType === type$jscomp$1 + ? unresolvedProps$123 + : resolveDefaultPropsOnNonClassComponent( + type$jscomp$1, + unresolvedProps$123 + ); + return updateForwardRef( + current, + workInProgress, + type$jscomp$1, + resolvedProps$124, + renderLanes ); case 7: - return ( - (props = workInProgress.pendingProps), - enableFragmentRefs && markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child + var nextChildren$jscomp$2 = workInProgress.pendingProps; + enableFragmentRefs && markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$2, + renderLanes ); + return workInProgress.child; case 8: return ( reconcileChildren( @@ -7325,42 +7416,53 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - return ( - (props = workInProgress.pendingProps), - pushProvider( - workInProgress, - enableRenderableContext - ? workInProgress.type - : workInProgress.type._context, - props.value - ), - reconcileChildren(current, workInProgress, props.children, renderLanes), - workInProgress.child + var newProps = workInProgress.pendingProps; + pushProvider( + workInProgress, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, + newProps.value ); + reconcileChildren( + current, + workInProgress, + newProps.children, + renderLanes + ); + return workInProgress.child; case 9: - return ( - (init = enableRenderableContext - ? workInProgress.type._context - : workInProgress.type), - (props = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress), - (init = readContext(init)), - (props = props(init)), - (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); + var context = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type; + var render = workInProgress.pendingProps.children; + prepareToReadContext(workInProgress); + var newValue = readContext(context); + var newChildren = render(newValue); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, newChildren, renderLanes); + return workInProgress.child; case 14: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) + var type$125 = workInProgress.type, + unresolvedProps$126 = workInProgress.pendingProps, + resolvedProps$127 = disableDefaultPropsExceptForClasses + ? unresolvedProps$126 + : resolveDefaultPropsOnNonClassComponent( + type$125, + unresolvedProps$126 + ); + resolvedProps$127 = disableDefaultPropsExceptForClasses + ? resolvedProps$127 + : resolveDefaultPropsOnNonClassComponent( + type$125.type, + resolvedProps$127 + ); + return updateMemoComponent( + current, + workInProgress, + type$125, + resolvedProps$127, + renderLanes ); case 15: return updateSimpleMemoComponent( @@ -7373,48 +7475,160 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 21: - return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child + var nextChildren$jscomp$3 = workInProgress.pendingProps.children; + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$3, + renderLanes ); + return workInProgress.child; case 31: - props = workInProgress.pendingProps; - renderLanes = workInProgress.mode; - props = { mode: props.mode, children: props.children }; - if (null === current) { - if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((current = canHydrateHydrationBoundary( - current, + var nextProps$jscomp$1 = workInProgress.pendingProps, + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, rootOrSingletonContext - )), - (current = - null !== current && "&" === current.data ? current : null), - null !== current && - ((workInProgress.stateNode = current), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - current.nextSibling - )))) - : (current = null), - null === current) - ) - throw throwOnHydrationMismatch(workInProgress); - renderLanes = mountWorkInProgressOffscreenFiber(props, renderLanes); - renderLanes.ref = workInProgress.ref; - workInProgress.child = renderLanes; - renderLanes.return = workInProgress; - workInProgress = renderLanes; - } else - (renderLanes = createWorkInProgress(current.child, props)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes); - return workInProgress; + ); + var JSCompiler_inline_result$jscomp$1 = + null !== hydratableInstance && "&" === hydratableInstance.data + ? hydratableInstance + : null; + if (null !== JSCompiler_inline_result$jscomp$1) { + workInProgress.memoizedState = { + dehydrated: JSCompiler_inline_result$jscomp$1, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }; + var dehydratedFragment = createFiberFromDehydratedFragment( + JSCompiler_inline_result$jscomp$1 + ); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$1 = JSCompiler_inline_result$jscomp$1; + } else JSCompiler_temp$jscomp$1 = null; + if (null === JSCompiler_temp$jscomp$1) + throw throwOnHydrationMismatch(workInProgress); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$2 = null; + } else + JSCompiler_inline_result$jscomp$2 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var dehydrated = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$3 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$3 = null); + else throw Error(formatProdErrorMessage(558)); + else { + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + var hasContextChanged$96 = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged$96) { + var root$97 = workInProgressRoot; + if (null !== root$97) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root$97, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root$97, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$3 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + dehydrated.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$2 = JSCompiler_inline_result$jscomp$3; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$2 = primaryChildFragment$jscomp$0; + } + } + return JSCompiler_inline_result$jscomp$2; case 22: return updateOffscreenComponent( current, @@ -7430,117 +7644,131 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.pendingProps ); case 24: - return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (prevState = createCache()), - (init.pooledCache = prevState), - prevState.refCount++, - null !== prevState && (init.pooledCacheLanes |= renderLanes), - (init = prevState)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (prevState = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = prevState.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + prepareToReadContext(workInProgress); + var parentCache = readContext(CacheContext); + if (null === current) { + var cacheFromPool = peekCacheFromPool(); + if (null !== cacheFromPool) + var JSCompiler_inline_result$jscomp$4 = cacheFromPool; + else { + var root = workInProgressRoot, + freshCache = createCache(); + root.pooledCache = freshCache; + freshCache.refCount++; + null !== freshCache && (root.pooledCacheLanes |= renderLanes); + JSCompiler_inline_result$jscomp$4 = freshCache; + } + var freshCache$jscomp$0 = JSCompiler_inline_result$jscomp$4; + workInProgress.memoizedState = { + parent: parentCache, + cache: freshCache$jscomp$0 + }; + initializeUpdateQueue(workInProgress); + pushProvider(workInProgress, CacheContext, freshCache$jscomp$0); + } else { + 0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()); + var prevState$jscomp$1 = current.memoizedState, + nextState$jscomp$0 = workInProgress.memoizedState; + if (prevState$jscomp$1.parent !== parentCache) { + var derivedState = { parent: parentCache, cache: parentCache }; + workInProgress.memoizedState = derivedState; + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + derivedState); + pushProvider(workInProgress, CacheContext, parentCache); + } else { + var nextCache$jscomp$0 = nextState$jscomp$0.cache; + pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); + nextCache$jscomp$0 !== prevState$jscomp$1.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); + } + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? ((props = workInProgress.pendingProps), - null === current && - ((init = enableTransitionTracing - ? transitionStack.current - : null), - null !== init && - ((init = { - tag: 1, - transitions: new Set(init), - pendingBoundaries: null, - name: props.name, - aborts: null - }), - (workInProgress.stateNode = init), - (workInProgress.flags |= 2048))), - (init = workInProgress.stateNode), - null !== init && pushMarkerInstance(workInProgress, init), - reconcileChildren( - current, - workInProgress, - props.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 30: - if (enableViewTransition) - return ( - (props = workInProgress.pendingProps), - (init = workInProgress.stateNode), - null != props.name && "auto" !== props.name - ? (workInProgress.flags |= null === current ? 18882560 : 18874368) - : (null === init.autoName && - ((prevState = workInProgressRoot.identifierPrefix), - isHydrating - ? ((nextState = getTreeId()), - (prevState = - "\u00ab" + prevState + "T" + nextState + "\u00bb")) - : ((nextState = globalClientIdCounter$1++), - (prevState = - "\u00ab" + - prevState + - "t" + - nextState.toString(32) + - "\u00bb")), - (init.autoName = prevState)), - isHydrating && pushMaterializedTreeId(workInProgress)), - null !== current && current.memoizedProps.name !== props.name - ? (workInProgress.flags |= 4194816) - : markRef(current, workInProgress), + if (enableTransitionTracing) { + if (enableTransitionTracing) { + var nextProps$jscomp$2 = workInProgress.pendingProps; + if (null === current) { + var currentTransitions = enableTransitionTracing + ? transitionStack.current + : null; + if (null !== currentTransitions) { + var markerInstance = { + tag: 1, + transitions: new Set(currentTransitions), + pendingBoundaries: null, + name: nextProps$jscomp$2.name, + aborts: null + }; + workInProgress.stateNode = markerInstance; + workInProgress.flags |= 2048; + } + } + var instance$jscomp$1 = workInProgress.stateNode; + null !== instance$jscomp$1 && + pushMarkerInstance(workInProgress, instance$jscomp$1); reconcileChildren( current, workInProgress, - props.children, + nextProps$jscomp$2.children, renderLanes - ), - workInProgress.child + ); + var JSCompiler_inline_result$jscomp$5 = workInProgress.child; + } else JSCompiler_inline_result$jscomp$5 = null; + return JSCompiler_inline_result$jscomp$5; + } + break; + case 30: + if (enableViewTransition) { + var pendingProps = workInProgress.pendingProps, + instance$jscomp$2 = workInProgress.stateNode; + if (null != pendingProps.name && "auto" !== pendingProps.name) + workInProgress.flags |= null === current ? 18882560 : 18874368; + else { + if (null === instance$jscomp$2.autoName) { + var identifierPrefix = workInProgressRoot.identifierPrefix; + if (isHydrating) { + var treeId = getTreeId(); + var name = "\u00ab" + identifierPrefix + "T" + treeId + "\u00bb"; + } else { + var globalClientId = globalClientIdCounter$1++; + name = + "\u00ab" + + identifierPrefix + + "t" + + globalClientId.toString(32) + + "\u00bb"; + } + instance$jscomp$2.autoName = name; + } + isHydrating && pushMaterializedTreeId(workInProgress); + } + null !== current && current.memoizedProps.name !== pendingProps.name + ? (workInProgress.flags |= 4194816) + : markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + pendingProps.children, + renderLanes ); + return workInProgress.child; + } break; case 29: throw workInProgress.pendingProps; @@ -7719,14 +7947,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$128 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$128 = lastTailNode), + for (var lastTailNode$129 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$129 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$128 + null === lastTailNode$129 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$128.sibling = null); + : (lastTailNode$129.sibling = null); } } function bubbleProperties(completedWork) { @@ -7736,19 +7964,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$129 = completedWork.child; null !== child$129; ) - (newChildLanes |= child$129.lanes | child$129.childLanes), - (subtreeFlags |= child$129.subtreeFlags & 65011712), - (subtreeFlags |= child$129.flags & 65011712), - (child$129.return = completedWork), - (child$129 = child$129.sibling); + for (var child$130 = completedWork.child; null !== child$130; ) + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags & 65011712), + (subtreeFlags |= child$130.flags & 65011712), + (child$130.return = completedWork), + (child$130 = child$130.sibling); else - for (child$129 = completedWork.child; null !== child$129; ) - (newChildLanes |= child$129.lanes | child$129.childLanes), - (subtreeFlags |= child$129.subtreeFlags), - (subtreeFlags |= child$129.flags), - (child$129.return = completedWork), - (child$129 = child$129.sibling); + for (child$130 = completedWork.child; null !== child$130; ) + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags), + (subtreeFlags |= child$130.flags), + (child$130.return = completedWork), + (child$130 = child$130.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8028,11 +8256,40 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null), + (workInProgress.flags |= 4); + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8307,6 +8564,17 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8376,6 +8644,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -8549,8 +8821,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$162) { - captureCommitPhaseError(current, nearestMountedAncestor, error$162); + } catch (error$166) { + captureCommitPhaseError(current, nearestMountedAncestor, error$166); } else ref.current = null; } @@ -9213,7 +9485,7 @@ function commitBeforeMutationEffects(root, firstChild, committedLanes) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$211) { + } catch (e$216) { JSCompiler_temp = null; break a; } @@ -9479,11 +9751,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$160) { + } catch (error$164) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$160 + error$164 ); } } @@ -9526,6 +9798,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -9992,6 +10268,31 @@ function commitDeletionEffectsOnFiber( ); } } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + retryIfBlockedOn(current); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -10019,6 +10320,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -10361,6 +10663,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) { recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -10582,25 +10893,25 @@ function commitReconciliationEffects(finishedWork) { ); break; case 5: - var parent$163 = hostParentFiber.stateNode; + var parent$167 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$163, ""), (hostParentFiber.flags &= -33)); - var before$164 = getHostSibling(finishedWork); + (setTextContent(parent$167, ""), (hostParentFiber.flags &= -33)); + var before$168 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$164, - parent$163, + before$168, + parent$167, parentFragmentInstances ); break; case 3: case 4: - var parent$165 = hostParentFiber.stateNode.containerInfo, - before$166 = getHostSibling(finishedWork); + var parent$169 = hostParentFiber.stateNode.containerInfo, + before$170 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$166, - parent$165, + before$170, + parent$169, parentFragmentInstances ); break; @@ -10893,6 +11204,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -11146,6 +11467,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11169,14 +11498,14 @@ function commitPassiveMountOnFiber( ); break; case 22: - var instance$182 = finishedWork.stateNode, - current$183 = finishedWork.alternate; + var instance$187 = finishedWork.stateNode, + current$188 = finishedWork.alternate; null !== finishedWork.memoizedState ? (isViewTransitionEligible && - null !== current$183 && - null === current$183.memoizedState && - restoreEnterOrExitViewTransitions(current$183), - instance$182._visibility & 2 + null !== current$188 && + null === current$188.memoizedState && + restoreEnterOrExitViewTransitions(current$188), + instance$187._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -11188,17 +11517,17 @@ function commitPassiveMountOnFiber( finishedWork )) : (isViewTransitionEligible && - null !== current$183 && - null !== current$183.memoizedState && + null !== current$188 && + null !== current$188.memoizedState && restoreEnterOrExitViewTransitions(finishedWork), - instance$182._visibility & 2 + instance$187._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((instance$182._visibility |= 2), + : ((instance$187._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11208,9 +11537,9 @@ function commitPassiveMountOnFiber( ))); flags & 2048 && commitOffscreenPassiveMountEffects( - current$183, + current$188, finishedWork, - instance$182 + instance$187 ); break; case 24: @@ -11305,9 +11634,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$186 = finishedWork.stateNode; + var instance$191 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$186._visibility & 2 + ? instance$191._visibility & 2 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11319,7 +11648,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$186._visibility |= 2), + : ((instance$191._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11332,7 +11661,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$186 + instance$191 ); break; case 24: @@ -12555,8 +12884,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$200) { - handleThrow(root, thrownValue$200); + } catch (thrownValue$205) { + handleThrow(root, thrownValue$205); } while (1); lanes && root.shellSuspendCounter++; @@ -12675,8 +13004,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$202) { - handleThrow(root, thrownValue$202); + } catch (thrownValue$207) { + handleThrow(root, thrownValue$207); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -13383,6 +13712,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -13707,6 +14037,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -13868,12 +14203,21 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} var isInsideEventHandler = !1; function batchedUpdates(fn, a, b) { if (isInsideEventHandler) return fn(a, b); @@ -14810,20 +15154,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1772 = 0; - i$jscomp$inline_1772 < simpleEventPluginEvents.length; - i$jscomp$inline_1772++ + var i$jscomp$inline_1804 = 0; + i$jscomp$inline_1804 < simpleEventPluginEvents.length; + i$jscomp$inline_1804++ ) { - var eventName$jscomp$inline_1773 = - simpleEventPluginEvents[i$jscomp$inline_1772], - domEventName$jscomp$inline_1774 = - eventName$jscomp$inline_1773.toLowerCase(), - capitalizedEvent$jscomp$inline_1775 = - eventName$jscomp$inline_1773[0].toUpperCase() + - eventName$jscomp$inline_1773.slice(1); + var eventName$jscomp$inline_1805 = + simpleEventPluginEvents[i$jscomp$inline_1804], + domEventName$jscomp$inline_1806 = + eventName$jscomp$inline_1805.toLowerCase(), + capitalizedEvent$jscomp$inline_1807 = + eventName$jscomp$inline_1805[0].toUpperCase() + + eventName$jscomp$inline_1805.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1774, - "on" + capitalizedEvent$jscomp$inline_1775 + domEventName$jscomp$inline_1806, + "on" + capitalizedEvent$jscomp$inline_1807 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -16186,34 +16530,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$225 = props[hasSrc]; - if (null != propValue$225) + var propValue$230 = props[hasSrc]; + if (null != propValue$230) switch (hasSrc) { case "name": - hasSrcSet = propValue$225; + hasSrcSet = propValue$230; break; case "type": - propKey = propValue$225; + propKey = propValue$230; break; case "checked": - checked = propValue$225; + checked = propValue$230; break; case "defaultChecked": - defaultChecked = propValue$225; + defaultChecked = propValue$230; break; case "value": - propValue = propValue$225; + propValue = propValue$230; break; case "defaultValue": - defaultValue = propValue$225; + defaultValue = propValue$230; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$225) + if (null != propValue$230) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$225, props, null); + setProp(domElement, tag, hasSrc, propValue$230, props, null); } } initInput( @@ -16351,14 +16695,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$225 in props) - props.hasOwnProperty(propValue$225) && - ((hasSrc = props[propValue$225]), + for (propValue$230 in props) + props.hasOwnProperty(propValue$230) && + ((hasSrc = props[propValue$230]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$225, + propValue$230, hasSrc, props, void 0 @@ -16406,14 +16750,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$242 in nextProps) { - var propKey = nextProps[propKey$242]; - lastProp = lastProps[propKey$242]; + for (var propKey$247 in nextProps) { + var propKey = nextProps[propKey$247]; + lastProp = lastProps[propKey$247]; if ( - nextProps.hasOwnProperty(propKey$242) && + nextProps.hasOwnProperty(propKey$247) && (null != propKey || null != lastProp) ) - switch (propKey$242) { + switch (propKey$247) { case "type": propKey !== lastProp && trackHostMutation(); type = propKey; @@ -16448,7 +16792,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$242, + propKey$247, propKey, nextProps, lastProp @@ -16467,7 +16811,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$242 = null; + propKey = value = defaultValue = propKey$247 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16499,7 +16843,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (name) { case "value": type !== lastDefaultValue && trackHostMutation(); - propKey$242 = type; + propKey$247 = type; break; case "defaultValue": type !== lastDefaultValue && trackHostMutation(); @@ -16521,15 +16865,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$242 - ? updateOptions(domElement, !!lastProps, propKey$242, !1) + null != propKey$247 + ? updateOptions(domElement, !!lastProps, propKey$247, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$242 = null; + propKey = propKey$247 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16554,7 +16898,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { switch (value) { case "value": name !== type && trackHostMutation(); - propKey$242 = name; + propKey$247 = name; break; case "defaultValue": name !== type && trackHostMutation(); @@ -16569,17 +16913,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$242, propKey); + updateTextarea(domElement, propKey$247, propKey); return; case "option": - for (var propKey$258 in lastProps) + for (var propKey$263 in lastProps) if ( - ((propKey$242 = lastProps[propKey$258]), - lastProps.hasOwnProperty(propKey$258) && - null != propKey$242 && - !nextProps.hasOwnProperty(propKey$258)) + ((propKey$247 = lastProps[propKey$263]), + lastProps.hasOwnProperty(propKey$263) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$263)) ) - switch (propKey$258) { + switch (propKey$263) { case "selected": domElement.selected = !1; break; @@ -16587,34 +16931,34 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$258, + propKey$263, null, nextProps, - propKey$242 + propKey$247 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$242 = nextProps[lastDefaultValue]), + ((propKey$247 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$242 !== propKey && - (null != propKey$242 || null != propKey)) + propKey$247 !== propKey && + (null != propKey$247 || null != propKey)) ) switch (lastDefaultValue) { case "selected": - propKey$242 !== propKey && trackHostMutation(); + propKey$247 !== propKey && trackHostMutation(); domElement.selected = - propKey$242 && - "function" !== typeof propKey$242 && - "symbol" !== typeof propKey$242; + propKey$247 && + "function" !== typeof propKey$247 && + "symbol" !== typeof propKey$247; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$242, + propKey$247, nextProps, propKey ); @@ -16635,24 +16979,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$263 in lastProps) - (propKey$242 = lastProps[propKey$263]), - lastProps.hasOwnProperty(propKey$263) && - null != propKey$242 && - !nextProps.hasOwnProperty(propKey$263) && - setProp(domElement, tag, propKey$263, null, nextProps, propKey$242); + for (var propKey$268 in lastProps) + (propKey$247 = lastProps[propKey$268]), + lastProps.hasOwnProperty(propKey$268) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$268) && + setProp(domElement, tag, propKey$268, null, nextProps, propKey$247); for (checked in nextProps) if ( - ((propKey$242 = nextProps[checked]), + ((propKey$247 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$242 !== propKey && - (null != propKey$242 || null != propKey)) + propKey$247 !== propKey && + (null != propKey$247 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$242) + if (null != propKey$247) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16660,7 +17004,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$242, + propKey$247, nextProps, propKey ); @@ -16668,49 +17012,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$268 in lastProps) - (propKey$242 = lastProps[propKey$268]), - lastProps.hasOwnProperty(propKey$268) && - void 0 !== propKey$242 && - !nextProps.hasOwnProperty(propKey$268) && + for (var propKey$273 in lastProps) + (propKey$247 = lastProps[propKey$273]), + lastProps.hasOwnProperty(propKey$273) && + void 0 !== propKey$247 && + !nextProps.hasOwnProperty(propKey$273) && setPropOnCustomElement( domElement, tag, - propKey$268, + propKey$273, void 0, nextProps, - propKey$242 + propKey$247 ); for (defaultChecked in nextProps) - (propKey$242 = nextProps[defaultChecked]), + (propKey$247 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$242 === propKey || - (void 0 === propKey$242 && void 0 === propKey) || + propKey$247 === propKey || + (void 0 === propKey$247 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$242, + propKey$247, nextProps, propKey ); return; } } - for (var propKey$273 in lastProps) - (propKey$242 = lastProps[propKey$273]), - lastProps.hasOwnProperty(propKey$273) && - null != propKey$242 && - !nextProps.hasOwnProperty(propKey$273) && - setProp(domElement, tag, propKey$273, null, nextProps, propKey$242); + for (var propKey$278 in lastProps) + (propKey$247 = lastProps[propKey$278]), + lastProps.hasOwnProperty(propKey$278) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$278) && + setProp(domElement, tag, propKey$278, null, nextProps, propKey$247); for (lastProp in nextProps) - (propKey$242 = nextProps[lastProp]), + (propKey$247 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$242 === propKey || - (null == propKey$242 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$242, nextProps, propKey); + propKey$247 === propKey || + (null == propKey$247 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$247, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -17922,26 +18266,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$285 = getResourcesFromRoot( + var styles$290 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$286 = styles$285.get(type); - resource$286 || + resource$291 = styles$290.get(type); + resource$291 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$286 = { + (resource$291 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$285.set(type, resource$286), - (styles$285 = JSCompiler_inline_result.querySelector( + styles$290.set(type, resource$291), + (styles$290 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$285._p && - ((resource$286.instance = styles$285), - (resource$286.state.loading = 5)), + !styles$290._p && + ((resource$291.instance = styles$290), + (resource$291.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -17954,16 +18298,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$285 || + styles$290 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$286.state + resource$291.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$286; + return resource$291; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -18060,37 +18404,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$291 = hoistableRoot.querySelector( + var instance$296 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$291) + if (instance$296) return ( (resource.state.loading |= 4), - (resource.instance = instance$291), - markNodeAsHoistable(instance$291), - instance$291 + (resource.instance = instance$296), + markNodeAsHoistable(instance$296), + instance$296 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$291 = ( + instance$296 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$291); - var linkInstance = instance$291; + markNodeAsHoistable(instance$296); + var linkInstance = instance$296; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$291, "link", instance); + setInitialProperties(instance$296, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$291, props.precedence, hoistableRoot); - return (resource.instance = instance$291); + insertStylesheet(instance$296, props.precedence, hoistableRoot); + return (resource.instance = instance$296); case "script": - instance$291 = getScriptKey(props.src); + instance$296 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$291) + getScriptSelectorFromKey(instance$296) )) ) return ( @@ -18099,7 +18443,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$291))) + if ((styleProps = preloadPropsMap.get(instance$296))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -18669,19 +19013,22 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -18944,6 +19291,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -18990,8 +19338,11 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -19132,16 +19483,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_2017 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_2048 = React.version; if ( - "19.2.0-www-modern-17f88c80-20250422" !== - isomorphicReactPackageVersion$jscomp$inline_2017 + "19.2.0-www-modern-3ef31d19-20250422" !== + isomorphicReactPackageVersion$jscomp$inline_2048 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_2017, - "19.2.0-www-modern-17f88c80-20250422" + isomorphicReactPackageVersion$jscomp$inline_2048, + "19.2.0-www-modern-3ef31d19-20250422" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -19157,24 +19508,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2610 = { +var internals$jscomp$inline_2651 = { bundleType: 0, - version: "19.2.0-www-modern-17f88c80-20250422", + version: "19.2.0-www-modern-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2611 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2652 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2611.isDisabled && - hook$jscomp$inline_2611.supportsFiber + !hook$jscomp$inline_2652.isDisabled && + hook$jscomp$inline_2652.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2611.inject( - internals$jscomp$inline_2610 + (rendererID = hook$jscomp$inline_2652.inject( + internals$jscomp$inline_2651 )), - (injectedHook = hook$jscomp$inline_2611); + (injectedHook = hook$jscomp$inline_2652); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -19677,4 +20028,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-www-modern-17f88c80-20250422"; +exports.version = "19.2.0-www-modern-3ef31d19-20250422"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index 1a49cf3a89..cbf055ee7d 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -784,6 +784,16 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -1377,6 +1387,21 @@ __DEV__ && (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function getSuspendedTreeContext() { + warnIfNotHydrating(); + return null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null; + } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function warnIfNotHydrating() { isHydrating || console.error( @@ -2008,6 +2033,12 @@ __DEV__ && siblings.push(distanceFromLeaf); return distanceFromLeaf; } + function warnIfHydrating() { + isHydrating && + console.error( + "We should not be hydrating here. This is a bug in React. Please file a bug." + ); + } function warnNonHydratedInstance(fiber, rejectedCandidate) { didSuspendOrErrorDEV || ((fiber = buildHydrationDiffNode(fiber, 0)), @@ -2056,6 +2087,7 @@ __DEV__ && for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -2063,8 +2095,6 @@ __DEV__ && case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -2102,18 +2132,25 @@ __DEV__ && ); nextHydratableInstance = getNextHydratableInstanceAfterSuspenseInstance(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) + throw Error( + "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." + ); + nextHydratableInstance = + getNextHydratableInstanceAfterActivityInstance(fiber); } else nextHydratableInstance = - 31 === tag - ? getNextHydratableInstanceAfterActivityInstance(fiber.stateNode) - : supportsSingletons && 27 === tag - ? getNextHydratableSiblingAfterSingleton( - fiber.type, - nextHydratableInstance - ) - : hydrationParentFiber - ? getNextHydratableSibling(fiber.stateNode) - : null; + supportsSingletons && 27 === tag + ? getNextHydratableSiblingAfterSingleton( + fiber.type, + nextHydratableInstance + ) + : hydrationParentFiber + ? getNextHydratableSibling(fiber.stateNode) + : null; return !0; } function warnIfUnhydratedTailNodes(fiber) { @@ -4820,6 +4857,11 @@ __DEV__ && handler ); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -6776,6 +6818,7 @@ __DEV__ && sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -7265,10 +7308,19 @@ __DEV__ && renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -7280,17 +7332,6 @@ __DEV__ && renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -7338,6 +7379,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -8159,18 +8236,15 @@ __DEV__ && rootOrSingletonContext )), null !== renderLanes && - (warnIfNotHydrating(), - (workInProgress.memoizedState = { + ((JSCompiler_temp = { dehydrated: renderLanes, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, + treeContext: getSuspendedTreeContext(), retryLane: 536870912, hydrationErrors: null }), - (JSCompiler_temp = createFiber(18, null, null, NoMode)), - (JSCompiler_temp.stateNode = renderLanes), + (workInProgress.memoizedState = JSCompiler_temp), + (JSCompiler_temp = + createFiberFromDehydratedFragment(renderLanes)), (JSCompiler_temp.return = workInProgress), (workInProgress.child = JSCompiler_temp), (hydrationParentFiber = workInProgress), @@ -8274,14 +8348,14 @@ __DEV__ && (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -8308,18 +8382,15 @@ __DEV__ && (workInProgress = nextPrimaryChildren)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), - isHydrating && - console.error( - "We should not be hydrating here. This is a bug in React. Please file a bug." - ), + warnIfHydrating(), isSuspenseInstanceFallback(nextPrimaryChildren)) ) - (nextFallbackChildren = + (showFallback = getSuspenseInstanceFallbackErrorDetails(nextPrimaryChildren)), - (JSCompiler_temp = nextFallbackChildren.digest), - (nextPrimaryChildren = nextFallbackChildren.message), - (nextProps = nextFallbackChildren.stack), - (nextFallbackChildren = nextFallbackChildren.componentStack), + (JSCompiler_temp = showFallback.digest), + (nextPrimaryChildren = showFallback.message), + (nextProps = showFallback.stack), + (showFallback = showFallback.componentStack), (nextPrimaryChildren = nextPrimaryChildren ? Error(nextPrimaryChildren) : Error( @@ -8327,8 +8398,7 @@ __DEV__ && )), (nextPrimaryChildren.stack = nextProps || ""), (nextPrimaryChildren.digest = JSCompiler_temp), - (JSCompiler_temp = - void 0 === nextFallbackChildren ? null : nextFallbackChildren), + (JSCompiler_temp = void 0 === showFallback ? null : showFallback), (nextProps = { value: nextPrimaryChildren, source: null, @@ -8356,15 +8426,10 @@ __DEV__ && JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration( + JSCompiler_temp, + renderLanes + )), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -8398,13 +8463,7 @@ __DEV__ && (hydrationDiffRootDEV = null), (rootOrSingletonContext = !1), null !== current && - (warnIfNotHydrating(), - (idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress))), + restoreSuspendedTreeContext(workInProgress, current)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -8415,14 +8474,14 @@ __DEV__ && if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); nextPrimaryChildren = nextProps.fallback; - nextFallbackChildren = workInProgress.mode; - showFallback = current.child; - didSuspend = showFallback.sibling; - nextProps = createWorkInProgress(showFallback, { + showFallback = workInProgress.mode; + nextFallbackChildren = current.child; + didSuspend = nextFallbackChildren.sibling; + nextProps = createWorkInProgress(nextFallbackChildren, { mode: "hidden", children: nextProps.children }); - nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712; + nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712; null !== didSuspend ? (nextPrimaryChildren = createWorkInProgress( didSuspend, @@ -8430,7 +8489,7 @@ __DEV__ && )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -8441,53 +8500,53 @@ __DEV__ && workInProgress.child = nextProps; nextProps = nextPrimaryChildren; nextPrimaryChildren = workInProgress.child; - nextFallbackChildren = current.child.memoizedState; - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + showFallback = current.child.memoizedState; + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((didSuspend = isPrimaryRenderer ? CacheContext._currentValue : CacheContext._currentValue2), - (showFallback = - showFallback.parent !== didSuspend + (nextFallbackChildren = + nextFallbackChildren.parent !== didSuspend ? { parent: didSuspend, pool: didSuspend } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })); - nextPrimaryChildren.memoizedState = nextFallbackChildren; + nextPrimaryChildren.memoizedState = showFallback; if ( enableTransitionTracing && - ((nextFallbackChildren = enableTransitionTracing + ((showFallback = enableTransitionTracing ? transitionStack.current : null), - null !== nextFallbackChildren) + null !== showFallback) ) { - showFallback = enableTransitionTracing + nextFallbackChildren = enableTransitionTracing ? markerInstanceStack.current : null; didSuspend = nextPrimaryChildren.updateQueue; var currentOffscreenQueue = current.updateQueue; null === didSuspend ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null }) : didSuspend === currentOffscreenQueue ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null !== currentOffscreenQueue ? currentOffscreenQueue.retryQueue : null }) - : ((didSuspend.transitions = nextFallbackChildren), - (didSuspend.markerInstances = showFallback)); + : ((didSuspend.transitions = showFallback), + (didSuspend.markerInstances = nextFallbackChildren)); } nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, @@ -8879,6 +8938,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -9621,65 +9688,157 @@ __DEV__ && return workInProgress.child; case 31: var nextProps$jscomp$1 = workInProgress.pendingProps, - hiddenProp = nextProps$jscomp$1.hidden; - void 0 !== hiddenProp && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === hiddenProp - ? "hidden" - : !1 === hiddenProp - ? "hidden={false}" - : "hidden={...}", - hiddenProp ? 'mode="hidden"' : 'mode="visible"' - ); - var mode = workInProgress.mode, - offscreenChildProps = { - mode: nextProps$jscomp$1.mode, - children: nextProps$jscomp$1.children - }; - if (null === current) { + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) if (isHydrating) { - var nextInstance$jscomp$1 = nextHydratableInstance; - if (nextInstance$jscomp$1) { - var activityInstance = canHydrateActivityInstance( - nextInstance$jscomp$1, - rootOrSingletonContext - ); - null !== activityInstance && - ((workInProgress.stateNode = activityInstance), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = - getFirstHydratableChildWithinActivityInstance( - activityInstance - ))); - var JSCompiler_temp$jscomp$2 = activityInstance; - } else JSCompiler_temp$jscomp$2 = null; - if (null === JSCompiler_temp$jscomp$2) - throw ( - (warnNonHydratedInstance( + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var activityInstance = canHydrateActivityInstance( + nextInstance$jscomp$1, + rootOrSingletonContext + ); + if (null !== activityInstance) { + var activityState = { + dehydrated: activityInstance, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }; + workInProgress.memoizedState = activityState; + var dehydratedFragment = + createFiberFromDehydratedFragment(activityInstance); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$2 = activityInstance; + } else JSCompiler_temp$jscomp$2 = null; + if (null === JSCompiler_temp$jscomp$2) + throw ( + (warnNonHydratedInstance( + workInProgress, + nextInstance$jscomp$1 + ), + throwOnHydrationMismatch(workInProgress)) + ); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$3 = null; + } else + JSCompiler_inline_result$jscomp$3 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var activityInstance$jscomp$0 = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$4 = null); + else + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + else { + warnIfHydrating(); + didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - nextInstance$jscomp$1 - ), - throwOnHydrationMismatch(workInProgress)) - ); + renderLanes, + !1 + ); + var hasContextChanged = + 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged) { + var root = workInProgressRoot; + if (null !== root) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = + attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + supportsHydration && + ((nextHydratableInstance = + getFirstHydratableChildWithinActivityInstance( + activityInstance$jscomp$0 + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext)); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$4 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$3 = + JSCompiler_inline_result$jscomp$4; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment$jscomp$0; } - var primaryChildFragment = mountWorkInProgressOffscreenFiber( - offscreenChildProps, - mode - ); - primaryChildFragment.ref = workInProgress.ref; - workInProgress.child = primaryChildFragment; - primaryChildFragment.return = workInProgress; - var JSCompiler_inline_result$jscomp$3 = primaryChildFragment; - } else { - var _primaryChildFragment = createWorkInProgress( - current.child, - offscreenChildProps - ); - _primaryChildFragment.ref = workInProgress.ref; - workInProgress.child = _primaryChildFragment; - _primaryChildFragment.return = workInProgress; - JSCompiler_inline_result$jscomp$3 = _primaryChildFragment; } return JSCompiler_inline_result$jscomp$3; case 22: @@ -9703,12 +9862,12 @@ __DEV__ && var cacheFromPool = peekCacheFromPool(); if (null !== cacheFromPool) var freshCache = cacheFromPool; else { - var root = workInProgressRoot, + var root$jscomp$0 = workInProgressRoot, freshCache$jscomp$0 = createCache(); - root.pooledCache = freshCache$jscomp$0; + root$jscomp$0.pooledCache = freshCache$jscomp$0; retainCache(freshCache$jscomp$0); null !== freshCache$jscomp$0 && - (root.pooledCacheLanes |= renderLanes); + (root$jscomp$0.pooledCacheLanes |= renderLanes); freshCache = freshCache$jscomp$0; } workInProgress.memoizedState = { @@ -9722,9 +9881,9 @@ __DEV__ && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()); - var prevState$jscomp$0 = current.memoizedState, + var prevState$jscomp$1 = current.memoizedState, nextState$jscomp$0 = workInProgress.memoizedState; - if (prevState$jscomp$0.parent !== parentCache) { + if (prevState$jscomp$1.parent !== parentCache) { var derivedState = { parent: parentCache, cache: parentCache }; workInProgress.memoizedState = derivedState; 0 === workInProgress.lanes && @@ -9735,7 +9894,7 @@ __DEV__ && } else { var nextCache$jscomp$0 = nextState$jscomp$0.cache; pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); - nextCache$jscomp$0 !== prevState$jscomp$0.cache && + nextCache$jscomp$0 !== prevState$jscomp$1.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -9784,9 +9943,9 @@ __DEV__ && nextProps$jscomp$2.children, renderLanes ); - var JSCompiler_inline_result$jscomp$4 = workInProgress.child; - } else JSCompiler_inline_result$jscomp$4 = null; - return JSCompiler_inline_result$jscomp$4; + var JSCompiler_inline_result$jscomp$5 = workInProgress.child; + } else JSCompiler_inline_result$jscomp$5 = null; + return JSCompiler_inline_result$jscomp$5; } break; case 30: @@ -10565,11 +10724,66 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + if (!supportsHydration) + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) + throw Error( + "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue." + ); + hydrateActivityInstance(current, workInProgress); + bubbleProperties(workInProgress); + (workInProgress.mode & 2) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + } else + emitPendingHydrationWarnings(), + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + (workInProgress.mode & 2) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -10577,10 +10791,11 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) + if (!nextResource) throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." ); @@ -10588,16 +10803,17 @@ __DEV__ && throw Error( "Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." ); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - hydrateSuspenseInstance(type, workInProgress); + hydrateSuspenseInstance(nextResource, workInProgress); bubbleProperties(workInProgress); (workInProgress.mode & 2) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -10605,11 +10821,11 @@ __DEV__ && emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), (workInProgress.mode & 2) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= @@ -10901,6 +11117,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (workInProgress.mode & 2) !== NoMode && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -10984,6 +11216,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -12199,16 +12435,19 @@ __DEV__ && } } function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && - 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && + 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { focusedInstanceHandle = prepareForCommit(root.containerInfo); @@ -12526,6 +12765,11 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -13108,6 +13352,35 @@ __DEV__ && popComponentEffectDuration(prevEffectDuration); componentEffectErrors = prevEffectErrors; } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (supportsHydration && null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + runWithFiberInDEV( + finishedWork, + commitHydratedActivityInstance, + current + ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (supportsHydration && null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -13140,6 +13413,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -13507,6 +13781,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -14072,6 +14355,16 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -14452,6 +14745,41 @@ __DEV__ && endTime ); break; + case 31: + flags = inHydratedSubtree; + enableComponentPerformanceTrack && + ((isViewTransitionEligible = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null), + (prevProfilerEffectDuration = finishedWork.memoizedState), + null !== isViewTransitionEligible && + null === prevProfilerEffectDuration + ? ((prevProfilerEffectDuration = finishedWork.deletions), + null !== prevProfilerEffectDuration && + 0 < prevProfilerEffectDuration.length && + 18 === prevProfilerEffectDuration[0].tag + ? ((inHydratedSubtree = !1), + (isViewTransitionEligible = + isViewTransitionEligible.hydrationErrors), + null !== isViewTransitionEligible && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime, + isViewTransitionEligible + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1)); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + enableComponentPerformanceTrack && (inHydratedSubtree = flags); + break; case 13: flags = inHydratedSubtree; enableComponentPerformanceTrack && @@ -17578,6 +17906,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -18268,6 +18597,11 @@ __DEV__ && content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -18703,17 +19037,16 @@ __DEV__ && canHydrateActivityInstance = $$$config.canHydrateActivityInstance, canHydrateSuspenseInstance = $$$config.canHydrateSuspenseInstance, hydrateInstance = $$$config.hydrateInstance, - hydrateTextInstance = $$$config.hydrateTextInstance; - $$$config.hydrateActivityInstance; - var hydrateSuspenseInstance = $$$config.hydrateSuspenseInstance, + hydrateTextInstance = $$$config.hydrateTextInstance, + hydrateActivityInstance = $$$config.hydrateActivityInstance, + hydrateSuspenseInstance = $$$config.hydrateSuspenseInstance, getNextHydratableInstanceAfterActivityInstance = $$$config.getNextHydratableInstanceAfterActivityInstance, getNextHydratableInstanceAfterSuspenseInstance = $$$config.getNextHydratableInstanceAfterSuspenseInstance, - commitHydratedContainer = $$$config.commitHydratedContainer; - $$$config.commitHydratedActivityInstance; - var commitHydratedSuspenseInstance = - $$$config.commitHydratedSuspenseInstance; + commitHydratedContainer = $$$config.commitHydratedContainer, + commitHydratedActivityInstance = $$$config.commitHydratedActivityInstance, + commitHydratedSuspenseInstance = $$$config.commitHydratedSuspenseInstance; $$$config.clearActivityBoundary; var clearSuspenseBoundary = $$$config.clearSuspenseBoundary; $$$config.clearActivityBoundaryFromContainer; @@ -20863,14 +21196,14 @@ __DEV__ && shouldSuspendImpl = newShouldSuspendImpl; }; exports.attemptContinuousHydration = function (fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } }; exports.attemptHydrationAtCurrentPriority = function (fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var lane = requestUpdateLane(fiber); lane = getBumpedLaneForHydrationByLane(lane); var root = enqueueConcurrentRenderForLane(fiber, lane); @@ -20900,6 +21233,7 @@ __DEV__ && } } break; + case 31: case 13: (lanes = enqueueConcurrentRenderForLane(fiber, 2)), null !== lanes && scheduleUpdateOnFiber(lanes, fiber, 2), @@ -21301,7 +21635,7 @@ __DEV__ && version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index 0230eccc71..a1ce4b0b38 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -690,6 +690,16 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -1283,6 +1293,21 @@ __DEV__ && (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function getSuspendedTreeContext() { + warnIfNotHydrating(); + return null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null; + } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function warnIfNotHydrating() { isHydrating || console.error( @@ -1914,6 +1939,12 @@ __DEV__ && siblings.push(distanceFromLeaf); return distanceFromLeaf; } + function warnIfHydrating() { + isHydrating && + console.error( + "We should not be hydrating here. This is a bug in React. Please file a bug." + ); + } function warnNonHydratedInstance(fiber, rejectedCandidate) { didSuspendOrErrorDEV || ((fiber = buildHydrationDiffNode(fiber, 0)), @@ -1962,6 +1993,7 @@ __DEV__ && for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -1969,8 +2001,6 @@ __DEV__ && case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -2008,18 +2038,25 @@ __DEV__ && ); nextHydratableInstance = getNextHydratableInstanceAfterSuspenseInstance(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) + throw Error( + "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." + ); + nextHydratableInstance = + getNextHydratableInstanceAfterActivityInstance(fiber); } else nextHydratableInstance = - 31 === tag - ? getNextHydratableInstanceAfterActivityInstance(fiber.stateNode) - : supportsSingletons && 27 === tag - ? getNextHydratableSiblingAfterSingleton( - fiber.type, - nextHydratableInstance - ) - : hydrationParentFiber - ? getNextHydratableSibling(fiber.stateNode) - : null; + supportsSingletons && 27 === tag + ? getNextHydratableSiblingAfterSingleton( + fiber.type, + nextHydratableInstance + ) + : hydrationParentFiber + ? getNextHydratableSibling(fiber.stateNode) + : null; return !0; } function warnIfUnhydratedTailNodes(fiber) { @@ -4726,6 +4763,11 @@ __DEV__ && handler ); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -6682,6 +6724,7 @@ __DEV__ && sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -7171,10 +7214,19 @@ __DEV__ && renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -7186,17 +7238,6 @@ __DEV__ && renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -7244,6 +7285,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -7990,18 +8067,15 @@ __DEV__ && rootOrSingletonContext )), null !== renderLanes && - (warnIfNotHydrating(), - (workInProgress.memoizedState = { + ((JSCompiler_temp = { dehydrated: renderLanes, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, + treeContext: getSuspendedTreeContext(), retryLane: 536870912, hydrationErrors: null }), - (JSCompiler_temp = createFiber(18, null, null, NoMode)), - (JSCompiler_temp.stateNode = renderLanes), + (workInProgress.memoizedState = JSCompiler_temp), + (JSCompiler_temp = + createFiberFromDehydratedFragment(renderLanes)), (JSCompiler_temp.return = workInProgress), (workInProgress.child = JSCompiler_temp), (hydrationParentFiber = workInProgress), @@ -8105,14 +8179,14 @@ __DEV__ && (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -8139,18 +8213,15 @@ __DEV__ && (workInProgress = nextPrimaryChildren)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), - isHydrating && - console.error( - "We should not be hydrating here. This is a bug in React. Please file a bug." - ), + warnIfHydrating(), isSuspenseInstanceFallback(nextPrimaryChildren)) ) - (nextFallbackChildren = + (showFallback = getSuspenseInstanceFallbackErrorDetails(nextPrimaryChildren)), - (JSCompiler_temp = nextFallbackChildren.digest), - (nextPrimaryChildren = nextFallbackChildren.message), - (nextProps = nextFallbackChildren.stack), - (nextFallbackChildren = nextFallbackChildren.componentStack), + (JSCompiler_temp = showFallback.digest), + (nextPrimaryChildren = showFallback.message), + (nextProps = showFallback.stack), + (showFallback = showFallback.componentStack), (nextPrimaryChildren = nextPrimaryChildren ? Error(nextPrimaryChildren) : Error( @@ -8158,8 +8229,7 @@ __DEV__ && )), (nextPrimaryChildren.stack = nextProps || ""), (nextPrimaryChildren.digest = JSCompiler_temp), - (JSCompiler_temp = - void 0 === nextFallbackChildren ? null : nextFallbackChildren), + (JSCompiler_temp = void 0 === showFallback ? null : showFallback), (nextProps = { value: nextPrimaryChildren, source: null, @@ -8187,15 +8257,10 @@ __DEV__ && JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration( + JSCompiler_temp, + renderLanes + )), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -8229,13 +8294,7 @@ __DEV__ && (hydrationDiffRootDEV = null), (rootOrSingletonContext = !1), null !== current && - (warnIfNotHydrating(), - (idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress))), + restoreSuspendedTreeContext(workInProgress, current)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -8246,14 +8305,14 @@ __DEV__ && if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); nextPrimaryChildren = nextProps.fallback; - nextFallbackChildren = workInProgress.mode; - showFallback = current.child; - didSuspend = showFallback.sibling; - nextProps = createWorkInProgress(showFallback, { + showFallback = workInProgress.mode; + nextFallbackChildren = current.child; + didSuspend = nextFallbackChildren.sibling; + nextProps = createWorkInProgress(nextFallbackChildren, { mode: "hidden", children: nextProps.children }); - nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712; + nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712; null !== didSuspend ? (nextPrimaryChildren = createWorkInProgress( didSuspend, @@ -8261,7 +8320,7 @@ __DEV__ && )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -8272,53 +8331,53 @@ __DEV__ && workInProgress.child = nextProps; nextProps = nextPrimaryChildren; nextPrimaryChildren = workInProgress.child; - nextFallbackChildren = current.child.memoizedState; - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + showFallback = current.child.memoizedState; + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((didSuspend = isPrimaryRenderer ? CacheContext._currentValue : CacheContext._currentValue2), - (showFallback = - showFallback.parent !== didSuspend + (nextFallbackChildren = + nextFallbackChildren.parent !== didSuspend ? { parent: didSuspend, pool: didSuspend } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })); - nextPrimaryChildren.memoizedState = nextFallbackChildren; + nextPrimaryChildren.memoizedState = showFallback; if ( enableTransitionTracing && - ((nextFallbackChildren = enableTransitionTracing + ((showFallback = enableTransitionTracing ? transitionStack.current : null), - null !== nextFallbackChildren) + null !== showFallback) ) { - showFallback = enableTransitionTracing + nextFallbackChildren = enableTransitionTracing ? markerInstanceStack.current : null; didSuspend = nextPrimaryChildren.updateQueue; var currentOffscreenQueue = current.updateQueue; null === didSuspend ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null }) : didSuspend === currentOffscreenQueue ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null !== currentOffscreenQueue ? currentOffscreenQueue.retryQueue : null }) - : ((didSuspend.transitions = nextFallbackChildren), - (didSuspend.markerInstances = showFallback)); + : ((didSuspend.transitions = showFallback), + (didSuspend.markerInstances = nextFallbackChildren)); } nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, @@ -8709,6 +8768,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -9453,65 +9520,157 @@ __DEV__ && return workInProgress.child; case 31: var nextProps$jscomp$1 = workInProgress.pendingProps, - hiddenProp = nextProps$jscomp$1.hidden; - void 0 !== hiddenProp && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === hiddenProp - ? "hidden" - : !1 === hiddenProp - ? "hidden={false}" - : "hidden={...}", - hiddenProp ? 'mode="hidden"' : 'mode="visible"' - ); - var mode = workInProgress.mode, - offscreenChildProps = { - mode: nextProps$jscomp$1.mode, - children: nextProps$jscomp$1.children - }; - if (null === current) { + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) if (isHydrating) { - var nextInstance$jscomp$1 = nextHydratableInstance; - if (nextInstance$jscomp$1) { - var activityInstance = canHydrateActivityInstance( - nextInstance$jscomp$1, - rootOrSingletonContext - ); - null !== activityInstance && - ((workInProgress.stateNode = activityInstance), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = - getFirstHydratableChildWithinActivityInstance( - activityInstance - ))); - var JSCompiler_temp$jscomp$2 = activityInstance; - } else JSCompiler_temp$jscomp$2 = null; - if (null === JSCompiler_temp$jscomp$2) - throw ( - (warnNonHydratedInstance( + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var activityInstance = canHydrateActivityInstance( + nextInstance$jscomp$1, + rootOrSingletonContext + ); + if (null !== activityInstance) { + var activityState = { + dehydrated: activityInstance, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }; + workInProgress.memoizedState = activityState; + var dehydratedFragment = + createFiberFromDehydratedFragment(activityInstance); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$2 = activityInstance; + } else JSCompiler_temp$jscomp$2 = null; + if (null === JSCompiler_temp$jscomp$2) + throw ( + (warnNonHydratedInstance( + workInProgress, + nextInstance$jscomp$1 + ), + throwOnHydrationMismatch(workInProgress)) + ); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$3 = null; + } else + JSCompiler_inline_result$jscomp$3 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var activityInstance$jscomp$0 = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$4 = null); + else + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + else { + warnIfHydrating(); + didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - nextInstance$jscomp$1 - ), - throwOnHydrationMismatch(workInProgress)) - ); + renderLanes, + !1 + ); + var hasContextChanged = + 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged) { + var root = workInProgressRoot; + if (null !== root) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = + attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + supportsHydration && + ((nextHydratableInstance = + getFirstHydratableChildWithinActivityInstance( + activityInstance$jscomp$0 + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext)); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$4 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$3 = + JSCompiler_inline_result$jscomp$4; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment$jscomp$0; } - var primaryChildFragment = mountWorkInProgressOffscreenFiber( - offscreenChildProps, - mode - ); - primaryChildFragment.ref = workInProgress.ref; - workInProgress.child = primaryChildFragment; - primaryChildFragment.return = workInProgress; - var JSCompiler_inline_result$jscomp$3 = primaryChildFragment; - } else { - var _primaryChildFragment = createWorkInProgress( - current.child, - offscreenChildProps - ); - _primaryChildFragment.ref = workInProgress.ref; - workInProgress.child = _primaryChildFragment; - _primaryChildFragment.return = workInProgress; - JSCompiler_inline_result$jscomp$3 = _primaryChildFragment; } return JSCompiler_inline_result$jscomp$3; case 22: @@ -9535,12 +9694,12 @@ __DEV__ && var cacheFromPool = peekCacheFromPool(); if (null !== cacheFromPool) var freshCache = cacheFromPool; else { - var root = workInProgressRoot, + var root$jscomp$0 = workInProgressRoot, freshCache$jscomp$0 = createCache(); - root.pooledCache = freshCache$jscomp$0; + root$jscomp$0.pooledCache = freshCache$jscomp$0; retainCache(freshCache$jscomp$0); null !== freshCache$jscomp$0 && - (root.pooledCacheLanes |= renderLanes); + (root$jscomp$0.pooledCacheLanes |= renderLanes); freshCache = freshCache$jscomp$0; } workInProgress.memoizedState = { @@ -9554,9 +9713,9 @@ __DEV__ && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()); - var prevState$jscomp$0 = current.memoizedState, + var prevState$jscomp$1 = current.memoizedState, nextState$jscomp$0 = workInProgress.memoizedState; - if (prevState$jscomp$0.parent !== parentCache) { + if (prevState$jscomp$1.parent !== parentCache) { var derivedState = { parent: parentCache, cache: parentCache }; workInProgress.memoizedState = derivedState; 0 === workInProgress.lanes && @@ -9567,7 +9726,7 @@ __DEV__ && } else { var nextCache$jscomp$0 = nextState$jscomp$0.cache; pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); - nextCache$jscomp$0 !== prevState$jscomp$0.cache && + nextCache$jscomp$0 !== prevState$jscomp$1.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -9616,9 +9775,9 @@ __DEV__ && nextProps$jscomp$2.children, renderLanes ); - var JSCompiler_inline_result$jscomp$4 = workInProgress.child; - } else JSCompiler_inline_result$jscomp$4 = null; - return JSCompiler_inline_result$jscomp$4; + var JSCompiler_inline_result$jscomp$5 = workInProgress.child; + } else JSCompiler_inline_result$jscomp$5 = null; + return JSCompiler_inline_result$jscomp$5; } break; case 30: @@ -10391,11 +10550,66 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + if (!supportsHydration) + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) + throw Error( + "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue." + ); + hydrateActivityInstance(current, workInProgress); + bubbleProperties(workInProgress); + (workInProgress.mode & 2) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + } else + emitPendingHydrationWarnings(), + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + (workInProgress.mode & 2) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -10403,10 +10617,11 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) + if (!nextResource) throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." ); @@ -10414,16 +10629,17 @@ __DEV__ && throw Error( "Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." ); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - hydrateSuspenseInstance(type, workInProgress); + hydrateSuspenseInstance(nextResource, workInProgress); bubbleProperties(workInProgress); (workInProgress.mode & 2) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -10431,11 +10647,11 @@ __DEV__ && emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), (workInProgress.mode & 2) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= @@ -10724,6 +10940,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (workInProgress.mode & 2) !== NoMode && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -10802,6 +11034,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -12017,16 +12253,19 @@ __DEV__ && } } function isHydratingParent(current, finishedWork) { - return 13 === finishedWork.tag - ? ((current = current.memoizedState), - (finishedWork = finishedWork.memoizedState), - null !== current && - null !== current.dehydrated && - (null === finishedWork || null === finishedWork.dehydrated)) - : 3 === finishedWork.tag - ? current.memoizedState.isDehydrated && - 0 === (finishedWork.flags & 256) - : !1; + return 31 === finishedWork.tag + ? ((finishedWork = finishedWork.memoizedState), + null !== current.memoizedState && null === finishedWork) + : 13 === finishedWork.tag + ? ((current = current.memoizedState), + (finishedWork = finishedWork.memoizedState), + null !== current && + null !== current.dehydrated && + (null === finishedWork || null === finishedWork.dehydrated)) + : 3 === finishedWork.tag + ? current.memoizedState.isDehydrated && + 0 === (finishedWork.flags & 256) + : !1; } function commitBeforeMutationEffects(root, firstChild, committedLanes) { focusedInstanceHandle = prepareForCommit(root.containerInfo); @@ -12344,6 +12583,11 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -12926,6 +13170,35 @@ __DEV__ && popComponentEffectDuration(prevEffectDuration); componentEffectErrors = prevEffectErrors; } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (supportsHydration && null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + runWithFiberInDEV( + finishedWork, + commitHydratedActivityInstance, + current + ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (supportsHydration && null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -12958,6 +13231,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -13325,6 +13599,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -13890,6 +14173,16 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -14270,6 +14563,41 @@ __DEV__ && endTime ); break; + case 31: + flags = inHydratedSubtree; + enableComponentPerformanceTrack && + ((isViewTransitionEligible = + null !== finishedWork.alternate + ? finishedWork.alternate.memoizedState + : null), + (prevProfilerEffectDuration = finishedWork.memoizedState), + null !== isViewTransitionEligible && + null === prevProfilerEffectDuration + ? ((prevProfilerEffectDuration = finishedWork.deletions), + null !== prevProfilerEffectDuration && + 0 < prevProfilerEffectDuration.length && + 18 === prevProfilerEffectDuration[0].tag + ? ((inHydratedSubtree = !1), + (isViewTransitionEligible = + isViewTransitionEligible.hydrationErrors), + null !== isViewTransitionEligible && + logComponentErrored( + finishedWork, + finishedWork.actualStartTime, + endTime, + isViewTransitionEligible + )) + : (inHydratedSubtree = !0)) + : (inHydratedSubtree = !1)); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + endTime + ); + enableComponentPerformanceTrack && (inHydratedSubtree = flags); + break; case 13: flags = inHydratedSubtree; enableComponentPerformanceTrack && @@ -17392,6 +17720,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -18082,6 +18411,11 @@ __DEV__ && content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -18489,17 +18823,16 @@ __DEV__ && canHydrateActivityInstance = $$$config.canHydrateActivityInstance, canHydrateSuspenseInstance = $$$config.canHydrateSuspenseInstance, hydrateInstance = $$$config.hydrateInstance, - hydrateTextInstance = $$$config.hydrateTextInstance; - $$$config.hydrateActivityInstance; - var hydrateSuspenseInstance = $$$config.hydrateSuspenseInstance, + hydrateTextInstance = $$$config.hydrateTextInstance, + hydrateActivityInstance = $$$config.hydrateActivityInstance, + hydrateSuspenseInstance = $$$config.hydrateSuspenseInstance, getNextHydratableInstanceAfterActivityInstance = $$$config.getNextHydratableInstanceAfterActivityInstance, getNextHydratableInstanceAfterSuspenseInstance = $$$config.getNextHydratableInstanceAfterSuspenseInstance, - commitHydratedContainer = $$$config.commitHydratedContainer; - $$$config.commitHydratedActivityInstance; - var commitHydratedSuspenseInstance = - $$$config.commitHydratedSuspenseInstance; + commitHydratedContainer = $$$config.commitHydratedContainer, + commitHydratedActivityInstance = $$$config.commitHydratedActivityInstance, + commitHydratedSuspenseInstance = $$$config.commitHydratedSuspenseInstance; $$$config.clearActivityBoundary; var clearSuspenseBoundary = $$$config.clearSuspenseBoundary; $$$config.clearActivityBoundaryFromContainer; @@ -20644,14 +20977,14 @@ __DEV__ && shouldSuspendImpl = newShouldSuspendImpl; }; exports.attemptContinuousHydration = function (fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } }; exports.attemptHydrationAtCurrentPriority = function (fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var lane = requestUpdateLane(fiber); lane = getBumpedLaneForHydrationByLane(lane); var root = enqueueConcurrentRenderForLane(fiber, lane); @@ -20681,6 +21014,7 @@ __DEV__ && } } break; + case 31: case 13: (lanes = enqueueConcurrentRenderForLane(fiber, 2)), null !== lanes && scheduleUpdateOnFiber(lanes, fiber, 2), @@ -21082,7 +21416,7 @@ __DEV__ && version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index e8067dfda3..ddda433708 100644 --- a/compiled/facebook-www/ReactReconciler-prod.classic.js +++ b/compiled/facebook-www/ReactReconciler-prod.classic.js @@ -619,6 +619,14 @@ module.exports = function ($$$config) { rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -981,6 +989,14 @@ module.exports = function ($$$config) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function pushHostContainer(fiber, nextRootInstance) { push(rootInstanceStackCursor, nextRootInstance); push(contextFiberStackCursor, fiber); @@ -1040,6 +1056,7 @@ module.exports = function ($$$config) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -1047,8 +1064,6 @@ module.exports = function ($$$config) { case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -1079,18 +1094,22 @@ module.exports = function ($$$config) { if (!fiber) throw Error(formatProdErrorMessage(317)); nextHydratableInstance = getNextHydratableInstanceAfterSuspenseInstance(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterActivityInstance(fiber); } else nextHydratableInstance = - 31 === tag - ? getNextHydratableInstanceAfterActivityInstance(fiber.stateNode) - : supportsSingletons && 27 === tag - ? getNextHydratableSiblingAfterSingleton( - fiber.type, - nextHydratableInstance - ) - : hydrationParentFiber - ? getNextHydratableSibling(fiber.stateNode) - : null; + supportsSingletons && 27 === tag + ? getNextHydratableSiblingAfterSingleton( + fiber.type, + nextHydratableInstance + ) + : hydrationParentFiber + ? getNextHydratableSibling(fiber.stateNode) + : null; return !0; } function resetHydrationState() { @@ -2839,6 +2858,11 @@ module.exports = function ($$$config) { ? push(suspenseHandlerStackCursor, handler) : push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -4172,6 +4196,7 @@ module.exports = function ($$$config) { sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -4616,10 +4641,19 @@ module.exports = function ($$$config) { renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -4631,17 +4665,6 @@ module.exports = function ($$$config) { renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -4689,6 +4712,31 @@ module.exports = function ($$$config) { propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -5172,8 +5220,7 @@ module.exports = function ($$$config) { retryLane: 536870912, hydrationErrors: null }), - (renderLanes = createFiber(18, null, null, 0)), - (renderLanes.stateNode = current), + (renderLanes = createFiberFromDehydratedFragment(current)), (renderLanes.return = workInProgress), (workInProgress.child = renderLanes), (hydrationParentFiber = workInProgress), @@ -5270,14 +5317,14 @@ module.exports = function ($$$config) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -5331,15 +5378,10 @@ module.exports = function ($$$config) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration( + JSCompiler_temp, + renderLanes + )), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -5371,12 +5413,7 @@ module.exports = function ($$$config) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress))), + restoreSuspendedTreeContext(workInProgress, current)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -5387,14 +5424,14 @@ module.exports = function ($$$config) { if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); nextPrimaryChildren = nextProps.fallback; - nextFallbackChildren = workInProgress.mode; - showFallback = current.child; - didSuspend = showFallback.sibling; - nextProps = createWorkInProgress(showFallback, { + showFallback = workInProgress.mode; + nextFallbackChildren = current.child; + didSuspend = nextFallbackChildren.sibling; + nextProps = createWorkInProgress(nextFallbackChildren, { mode: "hidden", children: nextProps.children }); - nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712; + nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712; null !== didSuspend ? (nextPrimaryChildren = createWorkInProgress( didSuspend, @@ -5402,7 +5439,7 @@ module.exports = function ($$$config) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -5413,53 +5450,53 @@ module.exports = function ($$$config) { workInProgress.child = nextProps; nextProps = nextPrimaryChildren; nextPrimaryChildren = workInProgress.child; - nextFallbackChildren = current.child.memoizedState; - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + showFallback = current.child.memoizedState; + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((didSuspend = isPrimaryRenderer ? CacheContext._currentValue : CacheContext._currentValue2), - (showFallback = - showFallback.parent !== didSuspend + (nextFallbackChildren = + nextFallbackChildren.parent !== didSuspend ? { parent: didSuspend, pool: didSuspend } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })); - nextPrimaryChildren.memoizedState = nextFallbackChildren; + nextPrimaryChildren.memoizedState = showFallback; if ( enableTransitionTracing && - ((nextFallbackChildren = enableTransitionTracing + ((showFallback = enableTransitionTracing ? transitionStack.current : null), - null !== nextFallbackChildren) + null !== showFallback) ) { - showFallback = enableTransitionTracing + nextFallbackChildren = enableTransitionTracing ? markerInstanceStack.current : null; didSuspend = nextPrimaryChildren.updateQueue; var currentOffscreenQueue = current.updateQueue; null === didSuspend ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null }) : didSuspend === currentOffscreenQueue ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null !== currentOffscreenQueue ? currentOffscreenQueue.retryQueue : null }) - : ((didSuspend.transitions = nextFallbackChildren), - (didSuspend.markerInstances = showFallback)); + : ((didSuspend.transitions = showFallback), + (didSuspend.markerInstances = nextFallbackChildren)); } nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, @@ -5731,10 +5768,18 @@ module.exports = function ($$$config) { workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$96 = workInProgress.memoizedState; + if (null !== state$96) { + if (null !== state$96.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -5758,17 +5803,17 @@ module.exports = function ($$$config) { break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$96 = 0 !== (renderLanes & workInProgress.childLanes); + state$96 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$96 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$96) return updateSuspenseListComponent( current, workInProgress, @@ -5782,7 +5827,7 @@ module.exports = function ($$$config) { (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$96) break; else return null; case 22: return ( @@ -5799,8 +5844,8 @@ module.exports = function ($$$config) { break; case 25: if (enableTransitionTracing) { - state = workInProgress.stateNode; - null !== state && pushMarkerInstance(workInProgress, state); + state$96 = workInProgress.stateNode; + null !== state$96 && pushMarkerInstance(workInProgress, state$96); break; } case 23: @@ -6291,33 +6336,107 @@ module.exports = function ($$$config) { workInProgress.child ); case 31: - props = workInProgress.pendingProps; - renderLanes = workInProgress.mode; - props = { mode: props.mode, children: props.children }; - if (null === current) { + init = workInProgress.pendingProps; + nextState = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === init.mode) + mountActivityChildren(workInProgress, init); + else if ( + (pushDehydratedActivitySuspenseHandler(workInProgress), + (renderLanes = nextHydratableInstance) + ? ((renderLanes = canHydrateActivityInstance( + renderLanes, + rootOrSingletonContext + )), + null !== renderLanes && + ((workInProgress.memoizedState = { + dehydrated: renderLanes, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (current = createFiberFromDehydratedFragment(renderLanes)), + (current.return = workInProgress), + (workInProgress.child = current), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null), + null === renderLanes) + ) + throw throwOnHydrationMismatch(workInProgress); + workInProgress.lanes = 536870912; + workInProgress = null; + } else workInProgress = mountActivityChildren(workInProgress, init); + else if (((props = current.memoizedState), null !== props)) if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((current = canHydrateActivityInstance( - current, - rootOrSingletonContext - )), - null !== current && - ((workInProgress.stateNode = current), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = - getFirstHydratableChildWithinActivityInstance(current)))) - : (current = null), - null === current) + ((nextProps = props.dehydrated), + pushDehydratedActivitySuspenseHandler(workInProgress), + nextState) ) - throw throwOnHydrationMismatch(workInProgress); - renderLanes = mountWorkInProgressOffscreenFiber(props, renderLanes); - renderLanes.ref = workInProgress.ref; - workInProgress.child = renderLanes; - renderLanes.return = workInProgress; - workInProgress = renderLanes; - } else - (renderLanes = createWorkInProgress(current.child, props)), + if (workInProgress.flags & 256) + (workInProgress.flags &= -257), + (workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + )); + else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null); + else throw Error(formatProdErrorMessage(558)); + else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (nextState = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || nextState) + ) { + init = workInProgressRoot; + if ( + null !== init && + ((nextProps = getBumpedLaneForHydration(init, renderLanes)), + 0 !== nextProps && nextProps !== props.retryLane) + ) + throw ( + ((props.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(init, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (renderLanes = props.treeContext), + supportsHydration && + ((nextHydratableInstance = + getFirstHydratableChildWithinActivityInstance(nextProps)), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes)), + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), (renderLanes.ref = workInProgress.ref), (workInProgress.child = renderLanes), (renderLanes.return = workInProgress), @@ -7004,17 +7123,17 @@ module.exports = function ($$$config) { if (popHydrationState(workInProgress)) prepareToHydrateHostInstance(workInProgress, nextResource); else { - var instance$121 = createInstance( + var instance$122 = createInstance( type, newProps, rootInstanceStackCursor.current, nextResource, workInProgress ); - appendAllChildren(instance$121, workInProgress, !1, !1); - workInProgress.stateNode = instance$121; + appendAllChildren(instance$122, workInProgress, !1, !1); + workInProgress.stateNode = instance$122; finalizeInitialChildren( - instance$121, + instance$122, type, newProps, nextResource @@ -7082,11 +7201,41 @@ module.exports = function ($$$config) { bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + if (!supportsHydration) throw Error(formatProdErrorMessage(556)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + hydrateActivityInstance(current, workInProgress); + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null), + (workInProgress.flags |= 4); + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -7376,6 +7525,17 @@ module.exports = function ($$$config) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -7454,6 +7614,10 @@ module.exports = function ($$$config) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -7627,8 +7791,8 @@ module.exports = function ($$$config) { else if ("function" === typeof ref) try { ref(null); - } catch (error$145) { - captureCommitPhaseError(current, nearestMountedAncestor, error$145); + } catch (error$148) { + captureCommitPhaseError(current, nearestMountedAncestor, error$148); } else ref.current = null; } @@ -8440,11 +8604,11 @@ module.exports = function ($$$config) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$143) { + } catch (error$146) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$143 + error$146 ); } } @@ -8488,6 +8652,11 @@ module.exports = function ($$$config) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -8974,6 +9143,31 @@ module.exports = function ($$$config) { ); } } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (supportsHydration && null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + commitHydratedActivityInstance(current); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (supportsHydration && null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -9001,6 +9195,7 @@ module.exports = function ($$$config) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -9285,6 +9480,15 @@ module.exports = function ($$$config) { recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -9492,25 +9696,25 @@ module.exports = function ($$$config) { break; } case 5: - var parent$146 = hostParentFiber.stateNode; + var parent$149 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (resetTextContent(parent$146), (hostParentFiber.flags &= -33)); - var before$147 = getHostSibling(finishedWork); + (resetTextContent(parent$149), (hostParentFiber.flags &= -33)); + var before$150 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$147, - parent$146, + before$150, + parent$149, parentFragmentInstances ); break; case 3: case 4: - var parent$148 = hostParentFiber.stateNode.containerInfo, - before$149 = getHostSibling(finishedWork); + var parent$151 = hostParentFiber.stateNode.containerInfo, + before$152 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$149, - parent$148, + before$152, + parent$151, parentFragmentInstances ); break; @@ -9782,6 +9986,16 @@ module.exports = function ($$$config) { includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -10036,6 +10250,14 @@ module.exports = function ($$$config) { committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -10059,14 +10281,14 @@ module.exports = function ($$$config) { ); break; case 22: - var instance$162 = finishedWork.stateNode, - current$163 = finishedWork.alternate; + var instance$166 = finishedWork.stateNode, + current$167 = finishedWork.alternate; null !== finishedWork.memoizedState ? (isViewTransitionEligible && - null !== current$163 && - null === current$163.memoizedState && - restoreEnterOrExitViewTransitions(current$163), - instance$162._visibility & 2 + null !== current$167 && + null === current$167.memoizedState && + restoreEnterOrExitViewTransitions(current$167), + instance$166._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -10078,17 +10300,17 @@ module.exports = function ($$$config) { finishedWork )) : (isViewTransitionEligible && - null !== current$163 && - null !== current$163.memoizedState && + null !== current$167 && + null !== current$167.memoizedState && restoreEnterOrExitViewTransitions(finishedWork), - instance$162._visibility & 2 + instance$166._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((instance$162._visibility |= 2), + : ((instance$166._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10098,9 +10320,9 @@ module.exports = function ($$$config) { ))); flags & 2048 && commitOffscreenPassiveMountEffects( - current$163, + current$167, finishedWork, - instance$162 + instance$166 ); break; case 24: @@ -10195,9 +10417,9 @@ module.exports = function ($$$config) { ); break; case 22: - var instance$166 = finishedWork.stateNode; + var instance$170 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$166._visibility & 2 + ? instance$170._visibility & 2 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10209,7 +10431,7 @@ module.exports = function ($$$config) { finishedRoot, finishedWork ) - : ((instance$166._visibility |= 2), + : ((instance$170._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10222,7 +10444,7 @@ module.exports = function ($$$config) { commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$166 + instance$170 ); break; case 24: @@ -11351,8 +11573,8 @@ module.exports = function ($$$config) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$183) { - handleThrow(root, thrownValue$183); + } catch (thrownValue$187) { + handleThrow(root, thrownValue$187); } while (1); lanes && root.shellSuspendCounter++; @@ -11473,8 +11695,8 @@ module.exports = function ($$$config) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$185) { - handleThrow(root, thrownValue$185); + } catch (thrownValue$189) { + handleThrow(root, thrownValue$189); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -12101,6 +12323,7 @@ module.exports = function ($$$config) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -12445,6 +12668,11 @@ module.exports = function ($$$config) { content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -12817,16 +13045,16 @@ module.exports = function ($$$config) { canHydrateActivityInstance = $$$config.canHydrateActivityInstance, canHydrateSuspenseInstance = $$$config.canHydrateSuspenseInstance, hydrateInstance = $$$config.hydrateInstance, - hydrateTextInstance = $$$config.hydrateTextInstance; - $$$config.hydrateActivityInstance; - var hydrateSuspenseInstance = $$$config.hydrateSuspenseInstance, + hydrateTextInstance = $$$config.hydrateTextInstance, + hydrateActivityInstance = $$$config.hydrateActivityInstance, + hydrateSuspenseInstance = $$$config.hydrateSuspenseInstance, getNextHydratableInstanceAfterActivityInstance = $$$config.getNextHydratableInstanceAfterActivityInstance, getNextHydratableInstanceAfterSuspenseInstance = $$$config.getNextHydratableInstanceAfterSuspenseInstance, - commitHydratedContainer = $$$config.commitHydratedContainer; - $$$config.commitHydratedActivityInstance; - var commitHydratedSuspenseInstance = $$$config.commitHydratedSuspenseInstance; + commitHydratedContainer = $$$config.commitHydratedContainer, + commitHydratedActivityInstance = $$$config.commitHydratedActivityInstance, + commitHydratedSuspenseInstance = $$$config.commitHydratedSuspenseInstance; $$$config.clearActivityBoundary; var clearSuspenseBoundary = $$$config.clearSuspenseBoundary; $$$config.clearActivityBoundaryFromContainer; @@ -13512,14 +13740,14 @@ module.exports = function ($$$config) { ? createFiberImplObject : createFiberImplClass; exports.attemptContinuousHydration = function (fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } }; exports.attemptHydrationAtCurrentPriority = function (fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var lane = requestUpdateLane(); lane = getBumpedLaneForHydrationByLane(lane); var root = enqueueConcurrentRenderForLane(fiber, lane); @@ -13547,6 +13775,7 @@ module.exports = function ($$$config) { } } break; + case 31: case 13: (lanes = enqueueConcurrentRenderForLane(fiber, 2)), null !== lanes && scheduleUpdateOnFiber(lanes, fiber, 2), @@ -13859,7 +14088,7 @@ module.exports = function ($$$config) { version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js index 5aa6feb02b..1578ed345f 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -478,6 +478,14 @@ module.exports = function ($$$config) { rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -840,6 +848,14 @@ module.exports = function ($$$config) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function pushHostContainer(fiber, nextRootInstance) { push(rootInstanceStackCursor, nextRootInstance); push(contextFiberStackCursor, fiber); @@ -899,6 +915,7 @@ module.exports = function ($$$config) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -906,8 +923,6 @@ module.exports = function ($$$config) { case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -938,18 +953,22 @@ module.exports = function ($$$config) { if (!fiber) throw Error(formatProdErrorMessage(317)); nextHydratableInstance = getNextHydratableInstanceAfterSuspenseInstance(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterActivityInstance(fiber); } else nextHydratableInstance = - 31 === tag - ? getNextHydratableInstanceAfterActivityInstance(fiber.stateNode) - : supportsSingletons && 27 === tag - ? getNextHydratableSiblingAfterSingleton( - fiber.type, - nextHydratableInstance - ) - : hydrationParentFiber - ? getNextHydratableSibling(fiber.stateNode) - : null; + supportsSingletons && 27 === tag + ? getNextHydratableSiblingAfterSingleton( + fiber.type, + nextHydratableInstance + ) + : hydrationParentFiber + ? getNextHydratableSibling(fiber.stateNode) + : null; return !0; } function resetHydrationState() { @@ -2698,6 +2717,11 @@ module.exports = function ($$$config) { ? push(suspenseHandlerStackCursor, handler) : push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -4031,6 +4055,7 @@ module.exports = function ($$$config) { sourceFiber = suspenseHandlerStackCursor.current; if (null !== sourceFiber) { switch (sourceFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -4475,10 +4500,19 @@ module.exports = function ($$$config) { renderLanes ); } - if ( - 0 === (renderLanes & 536870912) || - (isHydrating && "unstable-defer-without-hiding" !== nextProps.mode) - ) + if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( + workInProgress, + null !== prevState ? prevState.cachePool : null, + null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else return ( (workInProgress.lanes = workInProgress.childLanes = 536870912), deferHiddenOffscreenComponent( @@ -4490,17 +4524,6 @@ module.exports = function ($$$config) { renderLanes ) ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( - workInProgress, - null !== prevState ? prevState.cachePool : null, - null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - pushOffscreenSuspenseHandler(workInProgress); } else if (null !== prevState) { nextProps = prevState.cachePool; var transitions = null; @@ -4548,6 +4571,31 @@ module.exports = function ($$$config) { propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -4947,8 +4995,7 @@ module.exports = function ($$$config) { retryLane: 536870912, hydrationErrors: null }), - (renderLanes = createFiber(18, null, null, 0)), - (renderLanes.stateNode = current), + (renderLanes = createFiberFromDehydratedFragment(current)), (renderLanes.return = workInProgress), (workInProgress.child = renderLanes), (hydrationParentFiber = workInProgress), @@ -5045,14 +5092,14 @@ module.exports = function ($$$config) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -5106,15 +5153,10 @@ module.exports = function ($$$config) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration( + JSCompiler_temp, + renderLanes + )), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -5146,12 +5188,7 @@ module.exports = function ($$$config) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== current && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = current.id), - (treeContextOverflow = current.overflow), - (treeContextProvider = workInProgress))), + restoreSuspendedTreeContext(workInProgress, current)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -5162,14 +5199,14 @@ module.exports = function ($$$config) { if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); nextPrimaryChildren = nextProps.fallback; - nextFallbackChildren = workInProgress.mode; - showFallback = current.child; - didSuspend = showFallback.sibling; - nextProps = createWorkInProgress(showFallback, { + showFallback = workInProgress.mode; + nextFallbackChildren = current.child; + didSuspend = nextFallbackChildren.sibling; + nextProps = createWorkInProgress(nextFallbackChildren, { mode: "hidden", children: nextProps.children }); - nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712; + nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712; null !== didSuspend ? (nextPrimaryChildren = createWorkInProgress( didSuspend, @@ -5177,7 +5214,7 @@ module.exports = function ($$$config) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -5188,53 +5225,53 @@ module.exports = function ($$$config) { workInProgress.child = nextProps; nextProps = nextPrimaryChildren; nextPrimaryChildren = workInProgress.child; - nextFallbackChildren = current.child.memoizedState; - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + showFallback = current.child.memoizedState; + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((didSuspend = isPrimaryRenderer ? CacheContext._currentValue : CacheContext._currentValue2), - (showFallback = - showFallback.parent !== didSuspend + (nextFallbackChildren = + nextFallbackChildren.parent !== didSuspend ? { parent: didSuspend, pool: didSuspend } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })); - nextPrimaryChildren.memoizedState = nextFallbackChildren; + nextPrimaryChildren.memoizedState = showFallback; if ( enableTransitionTracing && - ((nextFallbackChildren = enableTransitionTracing + ((showFallback = enableTransitionTracing ? transitionStack.current : null), - null !== nextFallbackChildren) + null !== showFallback) ) { - showFallback = enableTransitionTracing + nextFallbackChildren = enableTransitionTracing ? markerInstanceStack.current : null; didSuspend = nextPrimaryChildren.updateQueue; var currentOffscreenQueue = current.updateQueue; null === didSuspend ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null }) : didSuspend === currentOffscreenQueue ? (nextPrimaryChildren.updateQueue = { - transitions: nextFallbackChildren, - markerInstances: showFallback, + transitions: showFallback, + markerInstances: nextFallbackChildren, retryQueue: null !== currentOffscreenQueue ? currentOffscreenQueue.retryQueue : null }) - : ((didSuspend.transitions = nextFallbackChildren), - (didSuspend.markerInstances = showFallback)); + : ((didSuspend.transitions = showFallback), + (didSuspend.markerInstances = nextFallbackChildren)); } nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, @@ -5505,10 +5542,18 @@ module.exports = function ($$$config) { workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$96 = workInProgress.memoizedState; + if (null !== state$96) { + if (null !== state$96.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -5532,17 +5577,17 @@ module.exports = function ($$$config) { break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$96 = 0 !== (renderLanes & workInProgress.childLanes); + state$96 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$96 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$96) return updateSuspenseListComponent( current, workInProgress, @@ -5556,7 +5601,7 @@ module.exports = function ($$$config) { (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$96) break; else return null; case 22: return ( @@ -5573,8 +5618,8 @@ module.exports = function ($$$config) { break; case 25: if (enableTransitionTracing) { - state = workInProgress.stateNode; - null !== state && pushMarkerInstance(workInProgress, state); + state$96 = workInProgress.stateNode; + null !== state$96 && pushMarkerInstance(workInProgress, state$96); break; } case 23: @@ -6065,33 +6110,107 @@ module.exports = function ($$$config) { workInProgress.child ); case 31: - props = workInProgress.pendingProps; - renderLanes = workInProgress.mode; - props = { mode: props.mode, children: props.children }; - if (null === current) { + init = workInProgress.pendingProps; + nextState = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === init.mode) + mountActivityChildren(workInProgress, init); + else if ( + (pushDehydratedActivitySuspenseHandler(workInProgress), + (renderLanes = nextHydratableInstance) + ? ((renderLanes = canHydrateActivityInstance( + renderLanes, + rootOrSingletonContext + )), + null !== renderLanes && + ((workInProgress.memoizedState = { + dehydrated: renderLanes, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (current = createFiberFromDehydratedFragment(renderLanes)), + (current.return = workInProgress), + (workInProgress.child = current), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null), + null === renderLanes) + ) + throw throwOnHydrationMismatch(workInProgress); + workInProgress.lanes = 536870912; + workInProgress = null; + } else workInProgress = mountActivityChildren(workInProgress, init); + else if (((props = current.memoizedState), null !== props)) if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((current = canHydrateActivityInstance( - current, - rootOrSingletonContext - )), - null !== current && - ((workInProgress.stateNode = current), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = - getFirstHydratableChildWithinActivityInstance(current)))) - : (current = null), - null === current) + ((nextProps = props.dehydrated), + pushDehydratedActivitySuspenseHandler(workInProgress), + nextState) ) - throw throwOnHydrationMismatch(workInProgress); - renderLanes = mountWorkInProgressOffscreenFiber(props, renderLanes); - renderLanes.ref = workInProgress.ref; - workInProgress.child = renderLanes; - renderLanes.return = workInProgress; - workInProgress = renderLanes; - } else - (renderLanes = createWorkInProgress(current.child, props)), + if (workInProgress.flags & 256) + (workInProgress.flags &= -257), + (workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + )); + else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null); + else throw Error(formatProdErrorMessage(558)); + else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (nextState = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || nextState) + ) { + init = workInProgressRoot; + if ( + null !== init && + ((nextProps = getBumpedLaneForHydration(init, renderLanes)), + 0 !== nextProps && nextProps !== props.retryLane) + ) + throw ( + ((props.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(init, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (renderLanes = props.treeContext), + supportsHydration && + ((nextHydratableInstance = + getFirstHydratableChildWithinActivityInstance(nextProps)), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes)), + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), (renderLanes.ref = workInProgress.ref), (workInProgress.child = renderLanes), (renderLanes.return = workInProgress), @@ -6771,17 +6890,17 @@ module.exports = function ($$$config) { if (popHydrationState(workInProgress)) prepareToHydrateHostInstance(workInProgress, nextResource); else { - var instance$121 = createInstance( + var instance$122 = createInstance( type, newProps, rootInstanceStackCursor.current, nextResource, workInProgress ); - appendAllChildren(instance$121, workInProgress, !1, !1); - workInProgress.stateNode = instance$121; + appendAllChildren(instance$122, workInProgress, !1, !1); + workInProgress.stateNode = instance$122; finalizeInitialChildren( - instance$121, + instance$122, type, newProps, nextResource @@ -6849,11 +6968,41 @@ module.exports = function ($$$config) { bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + if (!supportsHydration) throw Error(formatProdErrorMessage(556)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + hydrateActivityInstance(current, workInProgress); + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null), + (workInProgress.flags |= 4); + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -7139,6 +7288,17 @@ module.exports = function ($$$config) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -7209,6 +7369,10 @@ module.exports = function ($$$config) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -7382,8 +7546,8 @@ module.exports = function ($$$config) { else if ("function" === typeof ref) try { ref(null); - } catch (error$145) { - captureCommitPhaseError(current, nearestMountedAncestor, error$145); + } catch (error$148) { + captureCommitPhaseError(current, nearestMountedAncestor, error$148); } else ref.current = null; } @@ -8195,11 +8359,11 @@ module.exports = function ($$$config) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$143) { + } catch (error$146) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$143 + error$146 ); } } @@ -8243,6 +8407,11 @@ module.exports = function ($$$config) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -8729,6 +8898,31 @@ module.exports = function ($$$config) { ); } } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (supportsHydration && null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + commitHydratedActivityInstance(current); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (supportsHydration && null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -8756,6 +8950,7 @@ module.exports = function ($$$config) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -9040,6 +9235,15 @@ module.exports = function ($$$config) { recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork, lanes); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork, lanes); commitReconciliationEffects(finishedWork); @@ -9247,25 +9451,25 @@ module.exports = function ($$$config) { break; } case 5: - var parent$146 = hostParentFiber.stateNode; + var parent$149 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (resetTextContent(parent$146), (hostParentFiber.flags &= -33)); - var before$147 = getHostSibling(finishedWork); + (resetTextContent(parent$149), (hostParentFiber.flags &= -33)); + var before$150 = getHostSibling(finishedWork); insertOrAppendPlacementNode( finishedWork, - before$147, - parent$146, + before$150, + parent$149, parentFragmentInstances ); break; case 3: case 4: - var parent$148 = hostParentFiber.stateNode.containerInfo, - before$149 = getHostSibling(finishedWork); + var parent$151 = hostParentFiber.stateNode.containerInfo, + before$152 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$149, - parent$148, + before$152, + parent$151, parentFragmentInstances ); break; @@ -9537,6 +9741,16 @@ module.exports = function ($$$config) { includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -9791,6 +10005,14 @@ module.exports = function ($$$config) { committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -9814,14 +10036,14 @@ module.exports = function ($$$config) { ); break; case 22: - var instance$162 = finishedWork.stateNode, - current$163 = finishedWork.alternate; + var instance$166 = finishedWork.stateNode, + current$167 = finishedWork.alternate; null !== finishedWork.memoizedState ? (isViewTransitionEligible && - null !== current$163 && - null === current$163.memoizedState && - restoreEnterOrExitViewTransitions(current$163), - instance$162._visibility & 2 + null !== current$167 && + null === current$167.memoizedState && + restoreEnterOrExitViewTransitions(current$167), + instance$166._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -9833,17 +10055,17 @@ module.exports = function ($$$config) { finishedWork )) : (isViewTransitionEligible && - null !== current$163 && - null !== current$163.memoizedState && + null !== current$167 && + null !== current$167.memoizedState && restoreEnterOrExitViewTransitions(finishedWork), - instance$162._visibility & 2 + instance$166._visibility & 2 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((instance$162._visibility |= 2), + : ((instance$166._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9853,9 +10075,9 @@ module.exports = function ($$$config) { ))); flags & 2048 && commitOffscreenPassiveMountEffects( - current$163, + current$167, finishedWork, - instance$162 + instance$166 ); break; case 24: @@ -9950,9 +10172,9 @@ module.exports = function ($$$config) { ); break; case 22: - var instance$166 = finishedWork.stateNode; + var instance$170 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$166._visibility & 2 + ? instance$170._visibility & 2 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9964,7 +10186,7 @@ module.exports = function ($$$config) { finishedRoot, finishedWork ) - : ((instance$166._visibility |= 2), + : ((instance$170._visibility |= 2), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9977,7 +10199,7 @@ module.exports = function ($$$config) { commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$166 + instance$170 ); break; case 24: @@ -11106,8 +11328,8 @@ module.exports = function ($$$config) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$183) { - handleThrow(root, thrownValue$183); + } catch (thrownValue$187) { + handleThrow(root, thrownValue$187); } while (1); lanes && root.shellSuspendCounter++; @@ -11228,8 +11450,8 @@ module.exports = function ($$$config) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$185) { - handleThrow(root, thrownValue$185); + } catch (thrownValue$189) { + handleThrow(root, thrownValue$189); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -11852,6 +12074,7 @@ module.exports = function ($$$config) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -12196,6 +12419,11 @@ module.exports = function ($$$config) { content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -12537,16 +12765,16 @@ module.exports = function ($$$config) { canHydrateActivityInstance = $$$config.canHydrateActivityInstance, canHydrateSuspenseInstance = $$$config.canHydrateSuspenseInstance, hydrateInstance = $$$config.hydrateInstance, - hydrateTextInstance = $$$config.hydrateTextInstance; - $$$config.hydrateActivityInstance; - var hydrateSuspenseInstance = $$$config.hydrateSuspenseInstance, + hydrateTextInstance = $$$config.hydrateTextInstance, + hydrateActivityInstance = $$$config.hydrateActivityInstance, + hydrateSuspenseInstance = $$$config.hydrateSuspenseInstance, getNextHydratableInstanceAfterActivityInstance = $$$config.getNextHydratableInstanceAfterActivityInstance, getNextHydratableInstanceAfterSuspenseInstance = $$$config.getNextHydratableInstanceAfterSuspenseInstance, - commitHydratedContainer = $$$config.commitHydratedContainer; - $$$config.commitHydratedActivityInstance; - var commitHydratedSuspenseInstance = $$$config.commitHydratedSuspenseInstance; + commitHydratedContainer = $$$config.commitHydratedContainer, + commitHydratedActivityInstance = $$$config.commitHydratedActivityInstance, + commitHydratedSuspenseInstance = $$$config.commitHydratedSuspenseInstance; $$$config.clearActivityBoundary; var clearSuspenseBoundary = $$$config.clearSuspenseBoundary; $$$config.clearActivityBoundaryFromContainer; @@ -13229,14 +13457,14 @@ module.exports = function ($$$config) { ? createFiberImplObject : createFiberImplClass; exports.attemptContinuousHydration = function (fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } }; exports.attemptHydrationAtCurrentPriority = function (fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var lane = requestUpdateLane(); lane = getBumpedLaneForHydrationByLane(lane); var root = enqueueConcurrentRenderForLane(fiber, lane); @@ -13264,6 +13492,7 @@ module.exports = function ($$$config) { } } break; + case 31: case 13: (lanes = enqueueConcurrentRenderForLane(fiber, 2)), null !== lanes && scheduleUpdateOnFiber(lanes, fiber, 2), @@ -13576,7 +13805,7 @@ module.exports = function ($$$config) { version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index ec5e0edeb7..9933ae68d6 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -13,7 +13,7 @@ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1141() { + function JSCompiler_object_inline_createNodeMock_1158() { return null; } function findHook(fiber, id) { @@ -669,6 +669,50 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function lanesToEventPriority(lanes) { lanes &= -lanes; return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes @@ -3961,6 +4005,11 @@ __DEV__ && handler ); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -5792,6 +5841,7 @@ __DEV__ && returnFiber = suspenseHandlerStackCursor.current; if (null !== returnFiber) { switch (returnFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -6133,6 +6183,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6921,10 +7007,10 @@ __DEV__ && (nextProps.return = workInProgress), (nextPrimaryChildren.sibling = nextProps), (workInProgress.child = nextPrimaryChildren), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -6958,22 +7044,22 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), reconcileChildFibers( workInProgress, @@ -6990,31 +7076,32 @@ __DEV__ && renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isSuspenseInstanceFallback()) ) - (showFallback = getSuspenseInstanceFallbackErrorDetails()), - (JSCompiler_temp = showFallback.digest), - (nextPrimaryChildren = showFallback.message), - (nextProps = showFallback.stack), - (showFallback = showFallback.componentStack), - (nextPrimaryChildren = nextPrimaryChildren - ? Error(nextPrimaryChildren) + (nextPrimaryChildren = getSuspenseInstanceFallbackErrorDetails()), + (JSCompiler_temp = nextPrimaryChildren.digest), + (showFallback = nextPrimaryChildren.message), + (nextProps = nextPrimaryChildren.stack), + (nextPrimaryChildren = nextPrimaryChildren.componentStack), + (showFallback = showFallback + ? Error(showFallback) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (nextPrimaryChildren.stack = nextProps || ""), - (nextPrimaryChildren.digest = JSCompiler_temp), - (JSCompiler_temp = void 0 === showFallback ? null : showFallback), + (showFallback.stack = nextProps || ""), + (showFallback.digest = JSCompiler_temp), + (JSCompiler_temp = + void 0 === nextPrimaryChildren ? null : nextPrimaryChildren), (nextProps = { - value: nextPrimaryChildren, + value: showFallback, source: null, stack: JSCompiler_temp }), "string" === typeof JSCompiler_temp && - CapturedStacks.set(nextPrimaryChildren, nextProps), + CapturedStacks.set(showFallback, nextProps), null === hydrationErrors ? (hydrationErrors = [nextProps]) : hydrationErrors.push(nextProps), @@ -7035,58 +7122,20 @@ __DEV__ && didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration( + JSCompiler_temp, + renderLanes + )), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); isSuspenseInstancePending() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -7107,37 +7156,37 @@ __DEV__ && } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling; - nextProps = createWorkInProgress(didSuspend, { + nextProps = updateWorkInProgressOffscreenFiber(didSuspend, { mode: "hidden", children: nextProps.children }); nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712; null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue2), (didSuspend = @@ -7148,12 +7197,12 @@ __DEV__ && } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.memoizedState = nextPrimaryChildren; + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -7164,7 +7213,7 @@ __DEV__ && pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; - renderLanes = createWorkInProgress(renderLanes, { + renderLanes = updateWorkInProgressOffscreenFiber(renderLanes, { mode: "visible", children: nextProps.children }); @@ -7199,6 +7248,9 @@ __DEV__ && }; return offscreenProps; } + function updateWorkInProgressOffscreenFiber(current, offscreenProps) { + return createWorkInProgress(current, offscreenProps); + } function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -7514,6 +7566,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -7963,40 +8023,83 @@ __DEV__ && workInProgress.child ); case 31: - return ( - (renderLanes = workInProgress.pendingProps), - (returnFiber = renderLanes.hidden), - void 0 !== returnFiber && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === returnFiber - ? "hidden" - : !1 === returnFiber - ? "hidden={false}" - : "hidden={...}", - returnFiber ? 'mode="hidden"' : 'mode="visible"' - ), - (returnFiber = workInProgress.mode), - (renderLanes = { - mode: renderLanes.mode, - children: renderLanes.children - }), - null === current - ? ((current = mountWorkInProgressOffscreenFiber( + prevSibling = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, prevSibling); + else if ( + ((returnFiber = current.memoizedState), null !== returnFiber) + ) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, renderLanes, - returnFiber + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + prevSibling = workInProgressRoot; + if ( + null !== prevSibling && + ((nextProps = getBumpedLaneForHydration( + prevSibling, + renderLanes + )), + 0 !== nextProps && nextProps !== returnFiber.retryLane) + ) + throw ( + ((returnFiber.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(prevSibling, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (workInProgress = mountActivityChildren( + workInProgress, + prevSibling )), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)) - : ((current = createWorkInProgress(current.child, renderLanes)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)), - workInProgress - ); + (workInProgress.flags |= 4096); + } + else + (current = updateWorkInProgressOffscreenFiber(current.child, { + mode: prevSibling.mode, + children: prevSibling.children + })), + (current.ref = workInProgress.ref), + (workInProgress.child = current), + (current.return = workInProgress), + (workInProgress = current); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -8395,7 +8498,48 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== renderLanes) { + if (null === current) { + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + } + emitPendingHydrationWarnings(); + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8403,7 +8547,8 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - if (null !== newProps && null !== newProps.dehydrated) { + child = newProps; + if (null !== child && null !== child.dehydrated) { if (null === current) { throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." @@ -8414,11 +8559,11 @@ __DEV__ && } emitPendingHydrationWarnings(); 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null); + (child = workInProgress.memoizedState = null); workInProgress.flags |= 4; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== child && ((child = workInProgress.child), null !== child && (workInProgress.treeBaseDuration -= child.treeBaseDuration)); @@ -8679,6 +8824,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), + null === workInProgress.alternate) + ) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8746,6 +8907,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -9452,6 +9617,9 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -9688,6 +9856,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -9894,6 +10063,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -10249,6 +10427,13 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -10411,6 +10596,14 @@ __DEV__ && committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -12198,6 +12391,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -15147,10 +15341,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-www-classic-17f88c80-20250422", + version: "19.2.0-www-classic-3ef31d19-20250422", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15170,7 +15364,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1141, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1158, isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT, isConcurrent = isConcurrentOnly, isStrictMode = !1; @@ -15285,5 +15479,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.2.0-www-classic-17f88c80-20250422"; + exports.version = "19.2.0-www-classic-3ef31d19-20250422"; })(); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index a59ee12ff2..855589f8fb 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -13,7 +13,7 @@ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1141() { + function JSCompiler_object_inline_createNodeMock_1158() { return null; } function findHook(fiber, id) { @@ -669,6 +669,50 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function lanesToEventPriority(lanes) { lanes &= -lanes; return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes @@ -3961,6 +4005,11 @@ __DEV__ && handler ); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -5792,6 +5841,7 @@ __DEV__ && returnFiber = suspenseHandlerStackCursor.current; if (null !== returnFiber) { switch (returnFiber.tag) { + case 31: case 13: return ( null === shellBoundary @@ -6133,6 +6183,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6921,10 +7007,10 @@ __DEV__ && (nextProps.return = workInProgress), (nextPrimaryChildren.sibling = nextProps), (workInProgress.child = nextPrimaryChildren), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -6958,22 +7044,22 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), reconcileChildFibers( workInProgress, @@ -6990,31 +7076,32 @@ __DEV__ && renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isSuspenseInstanceFallback()) ) - (showFallback = getSuspenseInstanceFallbackErrorDetails()), - (JSCompiler_temp = showFallback.digest), - (nextPrimaryChildren = showFallback.message), - (nextProps = showFallback.stack), - (showFallback = showFallback.componentStack), - (nextPrimaryChildren = nextPrimaryChildren - ? Error(nextPrimaryChildren) + (nextPrimaryChildren = getSuspenseInstanceFallbackErrorDetails()), + (JSCompiler_temp = nextPrimaryChildren.digest), + (showFallback = nextPrimaryChildren.message), + (nextProps = nextPrimaryChildren.stack), + (nextPrimaryChildren = nextPrimaryChildren.componentStack), + (showFallback = showFallback + ? Error(showFallback) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (nextPrimaryChildren.stack = nextProps || ""), - (nextPrimaryChildren.digest = JSCompiler_temp), - (JSCompiler_temp = void 0 === showFallback ? null : showFallback), + (showFallback.stack = nextProps || ""), + (showFallback.digest = JSCompiler_temp), + (JSCompiler_temp = + void 0 === nextPrimaryChildren ? null : nextPrimaryChildren), (nextProps = { - value: nextPrimaryChildren, + value: showFallback, source: null, stack: JSCompiler_temp }), "string" === typeof JSCompiler_temp && - CapturedStacks.set(nextPrimaryChildren, nextProps), + CapturedStacks.set(showFallback, nextProps), null === hydrationErrors ? (hydrationErrors = [nextProps]) : hydrationErrors.push(nextProps), @@ -7035,58 +7122,20 @@ __DEV__ && didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration( + JSCompiler_temp, + renderLanes + )), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); isSuspenseInstancePending() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -7107,37 +7156,37 @@ __DEV__ && } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling; - nextProps = createWorkInProgress(didSuspend, { + nextProps = updateWorkInProgressOffscreenFiber(didSuspend, { mode: "hidden", children: nextProps.children }); nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712; null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue2), (didSuspend = @@ -7148,12 +7197,12 @@ __DEV__ && } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.memoizedState = nextPrimaryChildren; + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -7164,7 +7213,7 @@ __DEV__ && pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; - renderLanes = createWorkInProgress(renderLanes, { + renderLanes = updateWorkInProgressOffscreenFiber(renderLanes, { mode: "visible", children: nextProps.children }); @@ -7199,6 +7248,9 @@ __DEV__ && }; return offscreenProps; } + function updateWorkInProgressOffscreenFiber(current, offscreenProps) { + return createWorkInProgress(current, offscreenProps); + } function retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -7514,6 +7566,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -7963,40 +8023,83 @@ __DEV__ && workInProgress.child ); case 31: - return ( - (renderLanes = workInProgress.pendingProps), - (returnFiber = renderLanes.hidden), - void 0 !== returnFiber && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === returnFiber - ? "hidden" - : !1 === returnFiber - ? "hidden={false}" - : "hidden={...}", - returnFiber ? 'mode="hidden"' : 'mode="visible"' - ), - (returnFiber = workInProgress.mode), - (renderLanes = { - mode: renderLanes.mode, - children: renderLanes.children - }), - null === current - ? ((current = mountWorkInProgressOffscreenFiber( + prevSibling = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, prevSibling); + else if ( + ((returnFiber = current.memoizedState), null !== returnFiber) + ) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, renderLanes, - returnFiber + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + prevSibling = workInProgressRoot; + if ( + null !== prevSibling && + ((nextProps = getBumpedLaneForHydration( + prevSibling, + renderLanes + )), + 0 !== nextProps && nextProps !== returnFiber.retryLane) + ) + throw ( + ((returnFiber.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(prevSibling, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (workInProgress = mountActivityChildren( + workInProgress, + prevSibling )), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)) - : ((current = createWorkInProgress(current.child, renderLanes)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)), - workInProgress - ); + (workInProgress.flags |= 4096); + } + else + (current = updateWorkInProgressOffscreenFiber(current.child, { + mode: prevSibling.mode, + children: prevSibling.children + })), + (current.ref = workInProgress.ref), + (workInProgress.child = current), + (current.return = workInProgress), + (workInProgress = current); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -8395,7 +8498,48 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== renderLanes) { + if (null === current) { + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + } + emitPendingHydrationWarnings(); + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8403,7 +8547,8 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - if (null !== newProps && null !== newProps.dehydrated) { + child = newProps; + if (null !== child && null !== child.dehydrated) { if (null === current) { throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." @@ -8414,11 +8559,11 @@ __DEV__ && } emitPendingHydrationWarnings(); 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null); + (child = workInProgress.memoizedState = null); workInProgress.flags |= 4; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== child && ((child = workInProgress.child), null !== child && (workInProgress.treeBaseDuration -= child.treeBaseDuration)); @@ -8679,6 +8824,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), + null === workInProgress.alternate) + ) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8746,6 +8907,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -9452,6 +9617,9 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -9688,6 +9856,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -9894,6 +10063,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -10249,6 +10427,13 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -10411,6 +10596,14 @@ __DEV__ && committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -12198,6 +12391,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -15147,10 +15341,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-www-modern-17f88c80-20250422", + version: "19.2.0-www-modern-3ef31d19-20250422", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422" + reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15170,7 +15364,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1141, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1158, isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT, isConcurrent = isConcurrentOnly, isStrictMode = !1; @@ -15285,5 +15479,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.2.0-www-modern-17f88c80-20250422"; + exports.version = "19.2.0-www-modern-3ef31d19-20250422"; })(); diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC index fd50d2887b..e420c7cdfe 100644 --- a/compiled/facebook-www/VERSION_CLASSIC +++ b/compiled/facebook-www/VERSION_CLASSIC @@ -1 +1 @@ -19.2.0-www-classic-17f88c80-20250422 \ No newline at end of file +19.2.0-www-classic-3ef31d19-20250422 \ No newline at end of file diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN index afdee8cc64..c2ffc37b60 100644 --- a/compiled/facebook-www/VERSION_MODERN +++ b/compiled/facebook-www/VERSION_MODERN @@ -1 +1 @@ -19.2.0-www-modern-17f88c80-20250422 \ No newline at end of file +19.2.0-www-modern-3ef31d19-20250422 \ No newline at end of file