diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index a6043fa86b8c7..63dc63f2983cf 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -13411e4589f3d999727c5322781e2dd7bef3b256 +6c4bbc783286bf6eebd9927cb52e8fec5ad4dd74 diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index a6043fa86b8c7..63dc63f2983cf 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -13411e4589f3d999727c5322781e2dd7bef3b256 +6c4bbc783286bf6eebd9927cb52e8fec5ad4dd74 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 159886f78b539..ed2768297e4b4 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -2017,7 +2017,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-classic-13411e45-20241014"; + exports.version = "19.0.0-www-classic-6c4bbc78-20241015"; "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 16f743f8fb2b2..fad19a00d38e4 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -1997,7 +1997,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-modern-13411e45-20241014"; + exports.version = "19.0.0-www-modern-6c4bbc78-20241015"; "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 cfb7250c24f57..fcddf34684f6e 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -824,4 +824,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-13411e45-20241014"; +exports.version = "19.0.0-www-classic-6c4bbc78-20241015"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index f64f2001461d4..412c7e3be409a 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -820,4 +820,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-13411e45-20241014"; +exports.version = "19.0.0-www-modern-6c4bbc78-20241015"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index b0a6c0e11adc7..ad7d5de468e8a 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -828,7 +828,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-13411e45-20241014"; +exports.version = "19.0.0-www-classic-6c4bbc78-20241015"; "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 a7ade58801eb4..6702ebda06c54 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -824,7 +824,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-13411e45-20241014"; +exports.version = "19.0.0-www-modern-6c4bbc78-20241015"; "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 290e9b32abb92..41565cf47a0ea 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -884,6 +884,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -2166,7 +2174,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -2237,45 +2246,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -12422,7 +12432,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -12481,7 +12491,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -12496,203 +12506,203 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root.tag) && - exitStatus === RootErrored - ) { - var lanesThatJustErrored = lanes; - root.errorRecoveryDisabledLanes & lanesThatJustErrored - ? (renderWasConcurrent = 0) - : ((renderWasConcurrent = root.pendingLanes & -536870913), - (renderWasConcurrent = - 0 !== renderWasConcurrent - ? renderWasConcurrent - : renderWasConcurrent & 536870912 - ? 536870912 - : 0)); - if (0 !== renderWasConcurrent) { - lanes = renderWasConcurrent; - a: { - exitStatus = root; - var originallyAttemptedLanes = lanesThatJustErrored; - lanesThatJustErrored = workInProgressRootConcurrentErrors; - renderWasConcurrent = renderRootSync( - exitStatus, - renderWasConcurrent - ); - if (renderWasConcurrent !== RootErrored) { - if (workInProgressRootDidAttachPingListener) { - exitStatus.errorRecoveryDisabledLanes |= - originallyAttemptedLanes; - workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if ( + (disableLegacyMode || 0 !== root.tag) && + exitStatus === RootErrored + ) { + var lanesThatJustErrored = lanes; + root.errorRecoveryDisabledLanes & lanesThatJustErrored + ? (renderWasConcurrent = 0) + : ((renderWasConcurrent = root.pendingLanes & -536870913), + (renderWasConcurrent = + 0 !== renderWasConcurrent + ? renderWasConcurrent + : renderWasConcurrent & 536870912 + ? 536870912 + : 0)); + if (0 !== renderWasConcurrent) { + lanes = renderWasConcurrent; + a: { + exitStatus = root; + var originallyAttemptedLanes = lanesThatJustErrored; + lanesThatJustErrored = workInProgressRootConcurrentErrors; + renderWasConcurrent = renderRootSync( + exitStatus, + renderWasConcurrent, + !1 + ); + if (renderWasConcurrent !== RootErrored) { + if (workInProgressRootDidAttachPingListener) { + exitStatus.errorRecoveryDisabledLanes |= + originallyAttemptedLanes; + workInProgressRootInterleavedUpdatedLanes |= + originallyAttemptedLanes; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = renderWasConcurrent; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = lanesThatJustErrored; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = renderWasConcurrent; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) { - lanes = renderWasConcurrent; - forceSync = workInProgressRootRecoverableErrors; - exitStatus = workInProgressTransitions; - renderWasConcurrent = - workInProgressRootDidIncludeRecursiveRenderUpdate; - lanesThatJustErrored = workInProgressDeferredLane; - originallyAttemptedLanes = - workInProgressRootInterleavedUpdatedLanes; - var suspendedRetryLanes = workInProgressSuspendedRetryLanes, - suspendedCommitReason = IMMEDIATE_COMMIT, - prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - lanes, - forceSync, - exitStatus, - renderWasConcurrent, - previousUpdateLanePriority, - lanesThatJustErrored, - originallyAttemptedLanes, - suspendedRetryLanes, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) { + lanes = shouldTimeSlice; + forceSync = workInProgressRootRecoverableErrors; + shouldTimeSlice = workInProgressTransitions; + exitStatus = workInProgressRootDidIncludeRecursiveRenderUpdate; + renderWasConcurrent = workInProgressDeferredLane; + lanesThatJustErrored = workInProgressRootInterleavedUpdatedLanes; + originallyAttemptedLanes = workInProgressSuspendedRetryLanes; + var suspendedCommitReason = IMMEDIATE_COMMIT, + prevTransition = ReactSharedInternals.T, + previousUpdateLanePriority = currentUpdatePriority; + try { + (currentUpdatePriority = DiscreteEventPriority), + (ReactSharedInternals.T = null), + commitRootImpl( + lanes, + forceSync, + shouldTimeSlice, + exitStatus, + previousUpdateLanePriority, + renderWasConcurrent, + lanesThatJustErrored, + originallyAttemptedLanes, + suspendedCommitReason, + -0, + 0 + ); + } finally { + (ReactSharedInternals.T = prevTransition), + (currentUpdatePriority = previousUpdateLanePriority); + } + } else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + !workInProgressRootDidSkipSuspendedSiblings + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -12795,20 +12805,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -12852,11 +12862,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -12979,7 +12985,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -12988,10 +12996,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -13013,37 +13021,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$34) { handleThrow(root, thrownValue$34); @@ -13054,16 +13071,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -13088,12 +13102,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -17024,11 +17036,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-13411e45-20241014", + version: "19.0.0-www-classic-6c4bbc78-20241015", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-13411e45-20241014" + reconcilerVersion: "19.0.0-www-classic-6c4bbc78-20241015" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -17062,7 +17074,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.0.0-www-classic-13411e45-20241014"; + exports.version = "19.0.0-www-classic-6c4bbc78-20241015"; "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 1d79ef908516c..4b9f741371fe7 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -867,6 +867,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -2051,7 +2059,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -2122,45 +2131,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -11978,7 +11988,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -12036,7 +12046,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -12044,200 +12054,200 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (exitStatus === RootErrored) { - var lanesThatJustErrored = lanes; - root.errorRecoveryDisabledLanes & lanesThatJustErrored - ? (renderWasConcurrent = 0) - : ((renderWasConcurrent = root.pendingLanes & -536870913), - (renderWasConcurrent = - 0 !== renderWasConcurrent - ? renderWasConcurrent - : renderWasConcurrent & 536870912 - ? 536870912 - : 0)); - if (0 !== renderWasConcurrent) { - lanes = renderWasConcurrent; - a: { - exitStatus = root; - var originallyAttemptedLanes = lanesThatJustErrored; - lanesThatJustErrored = workInProgressRootConcurrentErrors; - renderWasConcurrent = renderRootSync( - exitStatus, - renderWasConcurrent - ); - if (renderWasConcurrent !== RootErrored) { - if (workInProgressRootDidAttachPingListener) { - exitStatus.errorRecoveryDisabledLanes |= - originallyAttemptedLanes; - workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + var lanesThatJustErrored = lanes; + root.errorRecoveryDisabledLanes & lanesThatJustErrored + ? (renderWasConcurrent = 0) + : ((renderWasConcurrent = root.pendingLanes & -536870913), + (renderWasConcurrent = + 0 !== renderWasConcurrent + ? renderWasConcurrent + : renderWasConcurrent & 536870912 + ? 536870912 + : 0)); + if (0 !== renderWasConcurrent) { + lanes = renderWasConcurrent; + a: { + exitStatus = root; + var originallyAttemptedLanes = lanesThatJustErrored; + lanesThatJustErrored = workInProgressRootConcurrentErrors; + renderWasConcurrent = renderRootSync( + exitStatus, + renderWasConcurrent, + !1 + ); + if (renderWasConcurrent !== RootErrored) { + if (workInProgressRootDidAttachPingListener) { + exitStatus.errorRecoveryDisabledLanes |= + originallyAttemptedLanes; + workInProgressRootInterleavedUpdatedLanes |= + originallyAttemptedLanes; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = renderWasConcurrent; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = lanesThatJustErrored; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = renderWasConcurrent; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) { - lanes = renderWasConcurrent; - forceSync = workInProgressRootRecoverableErrors; - exitStatus = workInProgressTransitions; - renderWasConcurrent = - workInProgressRootDidIncludeRecursiveRenderUpdate; - lanesThatJustErrored = workInProgressDeferredLane; - originallyAttemptedLanes = - workInProgressRootInterleavedUpdatedLanes; - var suspendedRetryLanes = workInProgressSuspendedRetryLanes, - suspendedCommitReason = IMMEDIATE_COMMIT, - prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - lanes, - forceSync, - exitStatus, - renderWasConcurrent, - previousUpdateLanePriority, - lanesThatJustErrored, - originallyAttemptedLanes, - suspendedRetryLanes, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) { + lanes = shouldTimeSlice; + forceSync = workInProgressRootRecoverableErrors; + shouldTimeSlice = workInProgressTransitions; + exitStatus = workInProgressRootDidIncludeRecursiveRenderUpdate; + renderWasConcurrent = workInProgressDeferredLane; + lanesThatJustErrored = workInProgressRootInterleavedUpdatedLanes; + originallyAttemptedLanes = workInProgressSuspendedRetryLanes; + var suspendedCommitReason = IMMEDIATE_COMMIT, + prevTransition = ReactSharedInternals.T, + previousUpdateLanePriority = currentUpdatePriority; + try { + (currentUpdatePriority = DiscreteEventPriority), + (ReactSharedInternals.T = null), + commitRootImpl( + lanes, + forceSync, + shouldTimeSlice, + exitStatus, + previousUpdateLanePriority, + renderWasConcurrent, + lanesThatJustErrored, + originallyAttemptedLanes, + suspendedCommitReason, + -0, + 0 + ); + } finally { + (ReactSharedInternals.T = prevTransition), + (currentUpdatePriority = previousUpdateLanePriority); + } + } else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + !workInProgressRootDidSkipSuspendedSiblings ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus + ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -12340,20 +12350,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -12397,11 +12407,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -12524,7 +12530,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -12533,10 +12541,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -12558,37 +12566,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$34) { handleThrow(root, thrownValue$34); @@ -12599,16 +12616,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -12633,12 +12647,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -16467,11 +16479,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-13411e45-20241014", + version: "19.0.0-www-modern-6c4bbc78-20241015", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-13411e45-20241014" + reconcilerVersion: "19.0.0-www-modern-6c4bbc78-20241015" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -16505,7 +16517,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.0.0-www-modern-13411e45-20241014"; + exports.version = "19.0.0-www-modern-6c4bbc78-20241015"; "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 39956ea098fc9..e5cceca6be13d 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -628,6 +628,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1233,7 +1241,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -1302,39 +1311,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -9174,7 +9182,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -9202,7 +9210,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -9215,168 +9223,166 @@ function scheduleUpdateOnFiber(root, fiber, lane) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if ((disableLegacyMode || 0 !== root$jscomp$0.tag) && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if (workInProgressRootDidAttachPingListener) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if (workInProgressRootDidAttachPingListener) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -9475,20 +9481,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$6 = 31 - clz32(lanes), lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + didAttemptEntireTree[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -9532,9 +9538,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -9624,7 +9628,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -9633,10 +9639,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -9645,6 +9651,7 @@ function renderRootSync(root, lanes) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -9653,24 +9660,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$151) { - handleThrow(root, thrownValue$151); + } catch (thrownValue$156) { + handleThrow(root, thrownValue$156); } while (1); lanes && root.shellSuspendCounter++; @@ -9678,11 +9698,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -9696,12 +9716,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -9785,8 +9803,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$153) { - handleThrow(root, thrownValue$153); + } catch (thrownValue$158) { + handleThrow(root, thrownValue$158); } while (1); resetContextDependencies(); @@ -10833,27 +10851,27 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1467 = { +var internals$jscomp$inline_1474 = { bundleType: 0, - version: "19.0.0-www-classic-13411e45-20241014", + version: "19.0.0-www-classic-6c4bbc78-20241015", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function () { return null; }, - reconcilerVersion: "19.0.0-www-classic-13411e45-20241014" + reconcilerVersion: "19.0.0-www-classic-6c4bbc78-20241015" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1468 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1475 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1468.isDisabled && - hook$jscomp$inline_1468.supportsFiber + !hook$jscomp$inline_1475.isDisabled && + hook$jscomp$inline_1475.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1468.inject( - internals$jscomp$inline_1467 + (rendererID = hook$jscomp$inline_1475.inject( + internals$jscomp$inline_1474 )), - (injectedHook = hook$jscomp$inline_1468); + (injectedHook = hook$jscomp$inline_1475); } catch (err) {} } var Path = Mode$1.Path; @@ -10867,4 +10885,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.0.0-www-classic-13411e45-20241014"; +exports.version = "19.0.0-www-classic-6c4bbc78-20241015"; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 62770475d546a..123f7c907686a 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -545,6 +545,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1072,7 +1080,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -1141,39 +1150,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -8747,7 +8755,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -8774,172 +8782,173 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if (workInProgressRootDidAttachPingListener) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if (workInProgressRootDidAttachPingListener) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -9038,20 +9047,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$6 = 31 - clz32(lanes), lane = 1 << index$6; - didSkipSuspendedSiblings[index$6] = -1; + didAttemptEntireTree[index$6] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -9095,9 +9104,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -9187,7 +9194,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -9196,10 +9205,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -9208,6 +9217,7 @@ function renderRootSync(root, lanes) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -9216,24 +9226,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$142) { - handleThrow(root, thrownValue$142); + } catch (thrownValue$147) { + handleThrow(root, thrownValue$147); } while (1); lanes && root.shellSuspendCounter++; @@ -9241,11 +9264,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -9259,12 +9282,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -9348,8 +9369,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$144) { - handleThrow(root, thrownValue$144); + } catch (thrownValue$149) { + handleThrow(root, thrownValue$149); } while (1); resetContextDependencies(); @@ -10344,27 +10365,27 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1460 = { +var internals$jscomp$inline_1467 = { bundleType: 0, - version: "19.0.0-www-modern-13411e45-20241014", + version: "19.0.0-www-modern-6c4bbc78-20241015", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function () { return null; }, - reconcilerVersion: "19.0.0-www-modern-13411e45-20241014" + reconcilerVersion: "19.0.0-www-modern-6c4bbc78-20241015" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1461 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1468 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1461.isDisabled && - hook$jscomp$inline_1461.supportsFiber + !hook$jscomp$inline_1468.isDisabled && + hook$jscomp$inline_1468.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1461.inject( - internals$jscomp$inline_1460 + (rendererID = hook$jscomp$inline_1468.inject( + internals$jscomp$inline_1467 )), - (injectedHook = hook$jscomp$inline_1461); + (injectedHook = hook$jscomp$inline_1468); } catch (err) {} } var Path = Mode$1.Path; @@ -10378,4 +10399,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.0.0-www-modern-13411e45-20241014"; +exports.version = "19.0.0-www-modern-6c4bbc78-20241015"; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index a4adad1ce2885..84b7d62cd7020 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -981,6 +981,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -3909,7 +3917,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -3986,45 +3995,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -9220,32 +9230,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2427; - var JSCompiler_object_inline_stack_2428 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2429; + var JSCompiler_object_inline_stack_2430 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2429 = !1; + var JSCompiler_object_inline_componentStack_2431 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2427 = didSuspend) || - (JSCompiler_object_inline_digest_2427 = + (JSCompiler_object_inline_digest_2429 = didSuspend) || + (JSCompiler_object_inline_digest_2429 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2427 && - ((JSCompiler_object_inline_componentStack_2429 = !0), + JSCompiler_object_inline_digest_2429 && + ((JSCompiler_object_inline_componentStack_2431 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2427 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2429 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2429 + JSCompiler_object_inline_componentStack_2431 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2426 = nextHydratableInstance; + var JSCompiler_object_inline_message_2428 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2426)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2428)) { c: { - var instance = JSCompiler_object_inline_message_2426; + var instance = JSCompiler_object_inline_message_2428; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9286,19 +9296,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2426 + JSCompiler_object_inline_message_2428 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2426 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2428 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2426 && - ((JSCompiler_object_inline_message_2426 = - JSCompiler_object_inline_message_2426.dehydrated), - null !== JSCompiler_object_inline_message_2426) + null !== JSCompiler_object_inline_message_2428 && + ((JSCompiler_object_inline_message_2428 = + JSCompiler_object_inline_message_2428.dehydrated), + null !== JSCompiler_object_inline_message_2428) ) return ( - JSCompiler_object_inline_message_2426.data === + JSCompiler_object_inline_message_2428.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9306,27 +9316,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2426 = - JSCompiler_object_inline_stack_2428.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2428.fallback; - if (JSCompiler_object_inline_componentStack_2429) + JSCompiler_object_inline_message_2428 = + JSCompiler_object_inline_stack_2430.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2430.fallback; + if (JSCompiler_object_inline_componentStack_2431) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2428 = + (JSCompiler_object_inline_stack_2430 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2426, + JSCompiler_object_inline_message_2428, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2429 = + (JSCompiler_object_inline_componentStack_2431 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2429.memoizedState = + (JSCompiler_object_inline_componentStack_2431.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2429.childLanes = + (JSCompiler_object_inline_componentStack_2431.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2427, + JSCompiler_object_inline_digest_2429, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9339,9 +9349,9 @@ __DEV__ && ? markerInstanceStack.current : null), (current = - JSCompiler_object_inline_componentStack_2429.updateQueue), + JSCompiler_object_inline_componentStack_2431.updateQueue), null === current - ? (JSCompiler_object_inline_componentStack_2429.updateQueue = + ? (JSCompiler_object_inline_componentStack_2431.updateQueue = { transitions: workInProgress, markerInstances: renderLanes, @@ -9349,46 +9359,46 @@ __DEV__ && }) : ((current.transitions = workInProgress), (current.markerInstances = renderLanes)))), - JSCompiler_object_inline_stack_2428 + JSCompiler_object_inline_stack_2430 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2428.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2430.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2428 = + (JSCompiler_object_inline_stack_2430 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2426, + JSCompiler_object_inline_message_2428, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2429 = + (JSCompiler_object_inline_componentStack_2431 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2429.memoizedState = + (JSCompiler_object_inline_componentStack_2431.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2429.childLanes = + (JSCompiler_object_inline_componentStack_2431.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2427, + JSCompiler_object_inline_digest_2429, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2428 + JSCompiler_object_inline_stack_2430 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2426 + JSCompiler_object_inline_message_2428 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2426 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2426) + ((JSCompiler_object_inline_message_2428 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2428) ) { if (didSuspend) workInProgress.flags & 256 @@ -9405,32 +9415,32 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2429 = - JSCompiler_object_inline_stack_2428.fallback), - (JSCompiler_object_inline_message_2426 = workInProgress.mode), - (JSCompiler_object_inline_stack_2428 = createFiberFromOffscreen( + (JSCompiler_object_inline_componentStack_2431 = + JSCompiler_object_inline_stack_2430.fallback), + (JSCompiler_object_inline_message_2428 = workInProgress.mode), + (JSCompiler_object_inline_stack_2430 = createFiberFromOffscreen( { mode: "visible", - children: JSCompiler_object_inline_stack_2428.children + children: JSCompiler_object_inline_stack_2430.children }, - JSCompiler_object_inline_message_2426, + JSCompiler_object_inline_message_2428, 0, null )), - (JSCompiler_object_inline_componentStack_2429 = + (JSCompiler_object_inline_componentStack_2431 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2429, - JSCompiler_object_inline_message_2426, + JSCompiler_object_inline_componentStack_2431, + JSCompiler_object_inline_message_2428, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2429.flags |= 2), - (JSCompiler_object_inline_stack_2428.return = workInProgress), - (JSCompiler_object_inline_componentStack_2429.return = + (JSCompiler_object_inline_componentStack_2431.flags |= 2), + (JSCompiler_object_inline_stack_2430.return = workInProgress), + (JSCompiler_object_inline_componentStack_2431.return = workInProgress), - (JSCompiler_object_inline_stack_2428.sibling = - JSCompiler_object_inline_componentStack_2429), - (workInProgress.child = JSCompiler_object_inline_stack_2428), + (JSCompiler_object_inline_stack_2430.sibling = + JSCompiler_object_inline_componentStack_2431), + (workInProgress.child = JSCompiler_object_inline_stack_2430), (disableLegacyMode || (workInProgress.mode & ConcurrentMode) !== NoMode) && reconcileChildFibers( @@ -9439,63 +9449,63 @@ __DEV__ && null, renderLanes ), - (JSCompiler_object_inline_stack_2428 = workInProgress.child), - (JSCompiler_object_inline_stack_2428.memoizedState = + (JSCompiler_object_inline_stack_2430 = workInProgress.child), + (JSCompiler_object_inline_stack_2430.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2428.childLanes = + (JSCompiler_object_inline_stack_2430.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2427, + JSCompiler_object_inline_digest_2429, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2429)); + JSCompiler_object_inline_componentStack_2431)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2426.data === + JSCompiler_object_inline_message_2428.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2427 = - JSCompiler_object_inline_message_2426.nextSibling && - JSCompiler_object_inline_message_2426.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2427) { - JSCompiler_temp = JSCompiler_object_inline_digest_2427.dgst; - var message = JSCompiler_object_inline_digest_2427.msg; - instance = JSCompiler_object_inline_digest_2427.stck; - var componentStack = JSCompiler_object_inline_digest_2427.cstck; + JSCompiler_object_inline_digest_2429 = + JSCompiler_object_inline_message_2428.nextSibling && + JSCompiler_object_inline_message_2428.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2429) { + JSCompiler_temp = JSCompiler_object_inline_digest_2429.dgst; + var message = JSCompiler_object_inline_digest_2429.msg; + instance = JSCompiler_object_inline_digest_2429.stck; + var componentStack = JSCompiler_object_inline_digest_2429.cstck; } - JSCompiler_object_inline_message_2426 = message; - JSCompiler_object_inline_digest_2427 = JSCompiler_temp; - JSCompiler_object_inline_stack_2428 = instance; - JSCompiler_object_inline_componentStack_2429 = componentStack; - JSCompiler_object_inline_message_2426 = - JSCompiler_object_inline_message_2426 - ? Error(JSCompiler_object_inline_message_2426) + JSCompiler_object_inline_message_2428 = message; + JSCompiler_object_inline_digest_2429 = JSCompiler_temp; + JSCompiler_object_inline_stack_2430 = instance; + JSCompiler_object_inline_componentStack_2431 = componentStack; + JSCompiler_object_inline_message_2428 = + JSCompiler_object_inline_message_2428 + ? Error(JSCompiler_object_inline_message_2428) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2426.stack = - JSCompiler_object_inline_stack_2428 || ""; - JSCompiler_object_inline_message_2426.digest = - JSCompiler_object_inline_digest_2427; - JSCompiler_object_inline_digest_2427 = - void 0 === JSCompiler_object_inline_componentStack_2429 + JSCompiler_object_inline_message_2428.stack = + JSCompiler_object_inline_stack_2430 || ""; + JSCompiler_object_inline_message_2428.digest = + JSCompiler_object_inline_digest_2429; + JSCompiler_object_inline_digest_2429 = + void 0 === JSCompiler_object_inline_componentStack_2431 ? null - : JSCompiler_object_inline_componentStack_2429; - "string" === typeof JSCompiler_object_inline_digest_2427 && + : JSCompiler_object_inline_componentStack_2431; + "string" === typeof JSCompiler_object_inline_digest_2429 && CapturedStacks.set( - JSCompiler_object_inline_message_2426, - JSCompiler_object_inline_digest_2427 + JSCompiler_object_inline_message_2428, + JSCompiler_object_inline_digest_2429 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2426, + value: JSCompiler_object_inline_message_2428, source: null, - stack: JSCompiler_object_inline_digest_2427 + stack: JSCompiler_object_inline_digest_2429 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9510,25 +9520,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2427 = + (JSCompiler_object_inline_digest_2429 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2427) + didReceiveUpdate || JSCompiler_object_inline_digest_2429) ) { - JSCompiler_object_inline_digest_2427 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2427) { - JSCompiler_object_inline_stack_2428 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2428 & 42)) - JSCompiler_object_inline_stack_2428 = 1; + JSCompiler_object_inline_digest_2429 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2429) { + JSCompiler_object_inline_stack_2430 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2430 & 42)) + JSCompiler_object_inline_stack_2430 = 1; else - switch (JSCompiler_object_inline_stack_2428) { + switch (JSCompiler_object_inline_stack_2430) { case 2: - JSCompiler_object_inline_stack_2428 = 1; + JSCompiler_object_inline_stack_2430 = 1; break; case 8: - JSCompiler_object_inline_stack_2428 = 4; + JSCompiler_object_inline_stack_2430 = 4; break; case 32: - JSCompiler_object_inline_stack_2428 = 16; + JSCompiler_object_inline_stack_2430 = 16; break; case 128: case 256: @@ -9549,40 +9559,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2428 = 64; + JSCompiler_object_inline_stack_2430 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2428 = 134217728; + JSCompiler_object_inline_stack_2430 = 134217728; break; default: - JSCompiler_object_inline_stack_2428 = 0; + JSCompiler_object_inline_stack_2430 = 0; } - JSCompiler_object_inline_stack_2428 = + JSCompiler_object_inline_stack_2430 = 0 !== - (JSCompiler_object_inline_stack_2428 & - (JSCompiler_object_inline_digest_2427.suspendedLanes | + (JSCompiler_object_inline_stack_2430 & + (JSCompiler_object_inline_digest_2429.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2428; + : JSCompiler_object_inline_stack_2430; if ( - 0 !== JSCompiler_object_inline_stack_2428 && - JSCompiler_object_inline_stack_2428 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2430 && + JSCompiler_object_inline_stack_2430 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2428), + ((prevState.retryLane = JSCompiler_object_inline_stack_2430), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2428 + JSCompiler_object_inline_stack_2430 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2427, + JSCompiler_object_inline_digest_2429, current, - JSCompiler_object_inline_stack_2428 + JSCompiler_object_inline_stack_2430 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2426.data === + JSCompiler_object_inline_message_2428.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9590,7 +9600,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2426.data === + JSCompiler_object_inline_message_2428.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9598,12 +9608,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2426._reactRetry = + (JSCompiler_object_inline_message_2428._reactRetry = workInProgress), (workInProgress = null)) : ((renderLanes = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2426.nextSibling + JSCompiler_object_inline_message_2428.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9621,73 +9631,73 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2428.children + JSCompiler_object_inline_stack_2430.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2429) + if (JSCompiler_object_inline_componentStack_2431) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2429 = - JSCompiler_object_inline_stack_2428.fallback), - (JSCompiler_object_inline_message_2426 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2431 = + JSCompiler_object_inline_stack_2430.fallback), + (JSCompiler_object_inline_message_2428 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), (componentStack = { mode: "hidden", - children: JSCompiler_object_inline_stack_2428.children + children: JSCompiler_object_inline_stack_2430.children }), disableLegacyMode || - (JSCompiler_object_inline_message_2426 & ConcurrentMode) !== NoMode || + (JSCompiler_object_inline_message_2428 & ConcurrentMode) !== NoMode || workInProgress.child === JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2428 = createWorkInProgress( + ? ((JSCompiler_object_inline_stack_2430 = createWorkInProgress( JSCompiler_temp, componentStack )), - (JSCompiler_object_inline_stack_2428.subtreeFlags = + (JSCompiler_object_inline_stack_2430.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280)) - : ((JSCompiler_object_inline_stack_2428 = workInProgress.child), - (JSCompiler_object_inline_stack_2428.childLanes = 0), - (JSCompiler_object_inline_stack_2428.pendingProps = + : ((JSCompiler_object_inline_stack_2430 = workInProgress.child), + (JSCompiler_object_inline_stack_2430.childLanes = 0), + (JSCompiler_object_inline_stack_2430.pendingProps = componentStack), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2428.actualDuration = -0), - (JSCompiler_object_inline_stack_2428.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2428.selfBaseDuration = + ((JSCompiler_object_inline_stack_2430.actualDuration = -0), + (JSCompiler_object_inline_stack_2430.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2430.selfBaseDuration = JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2428.treeBaseDuration = + (JSCompiler_object_inline_stack_2430.treeBaseDuration = JSCompiler_temp.treeBaseDuration)), (workInProgress.deletions = null)), null !== instance - ? (JSCompiler_object_inline_componentStack_2429 = + ? (JSCompiler_object_inline_componentStack_2431 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2429 + JSCompiler_object_inline_componentStack_2431 )) - : ((JSCompiler_object_inline_componentStack_2429 = + : ((JSCompiler_object_inline_componentStack_2431 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2429, - JSCompiler_object_inline_message_2426, + JSCompiler_object_inline_componentStack_2431, + JSCompiler_object_inline_message_2428, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2429.flags |= 2)), - (JSCompiler_object_inline_componentStack_2429.return = + (JSCompiler_object_inline_componentStack_2431.flags |= 2)), + (JSCompiler_object_inline_componentStack_2431.return = workInProgress), - (JSCompiler_object_inline_stack_2428.return = workInProgress), - (JSCompiler_object_inline_stack_2428.sibling = - JSCompiler_object_inline_componentStack_2429), - (workInProgress.child = JSCompiler_object_inline_stack_2428), - (JSCompiler_object_inline_stack_2428 = - JSCompiler_object_inline_componentStack_2429), - (JSCompiler_object_inline_componentStack_2429 = workInProgress.child), - (JSCompiler_object_inline_message_2426 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2426 - ? (JSCompiler_object_inline_message_2426 = + (JSCompiler_object_inline_stack_2430.return = workInProgress), + (JSCompiler_object_inline_stack_2430.sibling = + JSCompiler_object_inline_componentStack_2431), + (workInProgress.child = JSCompiler_object_inline_stack_2430), + (JSCompiler_object_inline_stack_2430 = + JSCompiler_object_inline_componentStack_2431), + (JSCompiler_object_inline_componentStack_2431 = workInProgress.child), + (JSCompiler_object_inline_message_2428 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2428 + ? (JSCompiler_object_inline_message_2428 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2426.cachePool), + JSCompiler_object_inline_message_2428.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9695,34 +9705,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2426 = { + (JSCompiler_object_inline_message_2428 = { baseLanes: - JSCompiler_object_inline_message_2426.baseLanes | renderLanes, + JSCompiler_object_inline_message_2428.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2429.memoizedState = - JSCompiler_object_inline_message_2426), + (JSCompiler_object_inline_componentStack_2431.memoizedState = + JSCompiler_object_inline_message_2428), enableTransitionTracing && - ((JSCompiler_object_inline_message_2426 = enableTransitionTracing + ((JSCompiler_object_inline_message_2428 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2426 && + null !== JSCompiler_object_inline_message_2428 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2429.updateQueue), + JSCompiler_object_inline_componentStack_2431.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2429.updateQueue = { - transitions: JSCompiler_object_inline_message_2426, + ? (JSCompiler_object_inline_componentStack_2431.updateQueue = { + transitions: JSCompiler_object_inline_message_2428, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2429.updateQueue = + ? (JSCompiler_object_inline_componentStack_2431.updateQueue = { - transitions: JSCompiler_object_inline_message_2426, + transitions: JSCompiler_object_inline_message_2428, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9730,41 +9740,41 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2426), + JSCompiler_object_inline_message_2428), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2429.childLanes = + (JSCompiler_object_inline_componentStack_2431.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2427, + JSCompiler_object_inline_digest_2429, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2428 + JSCompiler_object_inline_stack_2430 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2427 = current.child; - current = JSCompiler_object_inline_digest_2427.sibling; - JSCompiler_object_inline_digest_2427 = createWorkInProgress( - JSCompiler_object_inline_digest_2427, + JSCompiler_object_inline_digest_2429 = current.child; + current = JSCompiler_object_inline_digest_2429.sibling; + JSCompiler_object_inline_digest_2429 = createWorkInProgress( + JSCompiler_object_inline_digest_2429, { mode: "visible", - children: JSCompiler_object_inline_stack_2428.children + children: JSCompiler_object_inline_stack_2430.children } ); disableLegacyMode || (workInProgress.mode & ConcurrentMode) !== NoMode || - (JSCompiler_object_inline_digest_2427.lanes = renderLanes); - JSCompiler_object_inline_digest_2427.return = workInProgress; - JSCompiler_object_inline_digest_2427.sibling = null; + (JSCompiler_object_inline_digest_2429.lanes = renderLanes); + JSCompiler_object_inline_digest_2429.return = workInProgress; + JSCompiler_object_inline_digest_2429.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2427; + workInProgress.child = JSCompiler_object_inline_digest_2429; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2427; + return JSCompiler_object_inline_digest_2429; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = createFiberFromOffscreen( @@ -15577,7 +15587,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15636,7 +15646,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -15651,194 +15661,196 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root.tag) && - exitStatus === RootErrored - ) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if ( + (disableLegacyMode || 0 !== root.tag) && + exitStatus === RootErrored + ) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - renderStartTime, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - renderStartTime, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + !workInProgressRootDidSkipSuspendedSiblings + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -15887,7 +15899,12 @@ __DEV__ && completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -15954,20 +15971,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -16025,11 +16042,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -16151,7 +16164,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -16160,10 +16175,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -16185,37 +16200,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$38) { handleThrow(root, thrownValue$38); @@ -16226,16 +16250,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -16260,12 +16281,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -27781,11 +27800,11 @@ __DEV__ && : flushSyncErrorInBuildsThatSupportLegacyMode; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-classic-13411e45-20241014" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-6c4bbc78-20241015" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-www-classic-13411e45-20241014\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-6c4bbc78-20241015\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27829,11 +27848,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-13411e45-20241014", + version: "19.0.0-www-classic-6c4bbc78-20241015", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-13411e45-20241014" + reconcilerVersion: "19.0.0-www-classic-6c4bbc78-20241015" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28486,7 +28505,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-13411e45-20241014"; + exports.version = "19.0.0-www-classic-6c4bbc78-20241015"; "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 c05477de29a5f..c7563fc4364d9 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -965,6 +965,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -3776,7 +3784,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -3853,45 +3862,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -8905,32 +8915,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2448; - var JSCompiler_object_inline_stack_2449 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2450; + var JSCompiler_object_inline_stack_2451 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2450 = !1; + var JSCompiler_object_inline_componentStack_2452 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2448 = didSuspend) || - (JSCompiler_object_inline_digest_2448 = + (JSCompiler_object_inline_digest_2450 = didSuspend) || + (JSCompiler_object_inline_digest_2450 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2448 && - ((JSCompiler_object_inline_componentStack_2450 = !0), + JSCompiler_object_inline_digest_2450 && + ((JSCompiler_object_inline_componentStack_2452 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2448 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2450 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2450 + JSCompiler_object_inline_componentStack_2452 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2447 = nextHydratableInstance; + var JSCompiler_object_inline_message_2449 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2447)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2449)) { c: { - var instance = JSCompiler_object_inline_message_2447; + var instance = JSCompiler_object_inline_message_2449; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -8971,19 +8981,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2447 + JSCompiler_object_inline_message_2449 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2447 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2449 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2447 && - ((JSCompiler_object_inline_message_2447 = - JSCompiler_object_inline_message_2447.dehydrated), - null !== JSCompiler_object_inline_message_2447) + null !== JSCompiler_object_inline_message_2449 && + ((JSCompiler_object_inline_message_2449 = + JSCompiler_object_inline_message_2449.dehydrated), + null !== JSCompiler_object_inline_message_2449) ) return ( - JSCompiler_object_inline_message_2447.data === + JSCompiler_object_inline_message_2449.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8991,27 +9001,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2447 = - JSCompiler_object_inline_stack_2449.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2449.fallback; - if (JSCompiler_object_inline_componentStack_2450) + JSCompiler_object_inline_message_2449 = + JSCompiler_object_inline_stack_2451.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2451.fallback; + if (JSCompiler_object_inline_componentStack_2452) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2449 = + (JSCompiler_object_inline_stack_2451 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2447, + JSCompiler_object_inline_message_2449, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2450 = + (JSCompiler_object_inline_componentStack_2452 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2450.memoizedState = + (JSCompiler_object_inline_componentStack_2452.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2450.childLanes = + (JSCompiler_object_inline_componentStack_2452.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2448, + JSCompiler_object_inline_digest_2450, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9024,9 +9034,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2450.updateQueue), + JSCompiler_object_inline_componentStack_2452.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2450.updateQueue = + ? (JSCompiler_object_inline_componentStack_2452.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9034,46 +9044,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2451 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2449.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2451.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2449 = + (JSCompiler_object_inline_stack_2451 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2447, + JSCompiler_object_inline_message_2449, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2450 = + (JSCompiler_object_inline_componentStack_2452 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2450.memoizedState = + (JSCompiler_object_inline_componentStack_2452.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2450.childLanes = + (JSCompiler_object_inline_componentStack_2452.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2448, + JSCompiler_object_inline_digest_2450, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2451 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2447 + JSCompiler_object_inline_message_2449 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2447 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2447) + ((JSCompiler_object_inline_message_2449 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2449) ) { if (didSuspend) workInProgress.flags & 256 @@ -9090,94 +9100,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2450 = - JSCompiler_object_inline_stack_2449.fallback), - (JSCompiler_object_inline_message_2447 = workInProgress.mode), - (JSCompiler_object_inline_stack_2449 = + (JSCompiler_object_inline_componentStack_2452 = + JSCompiler_object_inline_stack_2451.fallback), + (JSCompiler_object_inline_message_2449 = workInProgress.mode), + (JSCompiler_object_inline_stack_2451 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2449.children + children: JSCompiler_object_inline_stack_2451.children }, - JSCompiler_object_inline_message_2447 + JSCompiler_object_inline_message_2449 )), - (JSCompiler_object_inline_componentStack_2450 = + (JSCompiler_object_inline_componentStack_2452 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2450, - JSCompiler_object_inline_message_2447, + JSCompiler_object_inline_componentStack_2452, + JSCompiler_object_inline_message_2449, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2450.flags |= 2), - (JSCompiler_object_inline_stack_2449.return = workInProgress), - (JSCompiler_object_inline_componentStack_2450.return = + (JSCompiler_object_inline_componentStack_2452.flags |= 2), + (JSCompiler_object_inline_stack_2451.return = workInProgress), + (JSCompiler_object_inline_componentStack_2452.return = workInProgress), - (JSCompiler_object_inline_stack_2449.sibling = - JSCompiler_object_inline_componentStack_2450), - (workInProgress.child = JSCompiler_object_inline_stack_2449), + (JSCompiler_object_inline_stack_2451.sibling = + JSCompiler_object_inline_componentStack_2452), + (workInProgress.child = JSCompiler_object_inline_stack_2451), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2449 = workInProgress.child), - (JSCompiler_object_inline_stack_2449.memoizedState = + (JSCompiler_object_inline_stack_2451 = workInProgress.child), + (JSCompiler_object_inline_stack_2451.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2449.childLanes = + (JSCompiler_object_inline_stack_2451.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2448, + JSCompiler_object_inline_digest_2450, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2450)); + JSCompiler_object_inline_componentStack_2452)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2447.data === + JSCompiler_object_inline_message_2449.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2448 = - JSCompiler_object_inline_message_2447.nextSibling && - JSCompiler_object_inline_message_2447.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2448) { - JSCompiler_temp = JSCompiler_object_inline_digest_2448.dgst; - var message = JSCompiler_object_inline_digest_2448.msg; - instance = JSCompiler_object_inline_digest_2448.stck; - var componentStack = JSCompiler_object_inline_digest_2448.cstck; + JSCompiler_object_inline_digest_2450 = + JSCompiler_object_inline_message_2449.nextSibling && + JSCompiler_object_inline_message_2449.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2450) { + JSCompiler_temp = JSCompiler_object_inline_digest_2450.dgst; + var message = JSCompiler_object_inline_digest_2450.msg; + instance = JSCompiler_object_inline_digest_2450.stck; + var componentStack = JSCompiler_object_inline_digest_2450.cstck; } - JSCompiler_object_inline_message_2447 = message; - JSCompiler_object_inline_digest_2448 = JSCompiler_temp; - JSCompiler_object_inline_stack_2449 = instance; - JSCompiler_object_inline_componentStack_2450 = componentStack; - JSCompiler_object_inline_message_2447 = - JSCompiler_object_inline_message_2447 - ? Error(JSCompiler_object_inline_message_2447) + JSCompiler_object_inline_message_2449 = message; + JSCompiler_object_inline_digest_2450 = JSCompiler_temp; + JSCompiler_object_inline_stack_2451 = instance; + JSCompiler_object_inline_componentStack_2452 = componentStack; + JSCompiler_object_inline_message_2449 = + JSCompiler_object_inline_message_2449 + ? Error(JSCompiler_object_inline_message_2449) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2447.stack = - JSCompiler_object_inline_stack_2449 || ""; - JSCompiler_object_inline_message_2447.digest = - JSCompiler_object_inline_digest_2448; - JSCompiler_object_inline_digest_2448 = - void 0 === JSCompiler_object_inline_componentStack_2450 + JSCompiler_object_inline_message_2449.stack = + JSCompiler_object_inline_stack_2451 || ""; + JSCompiler_object_inline_message_2449.digest = + JSCompiler_object_inline_digest_2450; + JSCompiler_object_inline_digest_2450 = + void 0 === JSCompiler_object_inline_componentStack_2452 ? null - : JSCompiler_object_inline_componentStack_2450; - "string" === typeof JSCompiler_object_inline_digest_2448 && + : JSCompiler_object_inline_componentStack_2452; + "string" === typeof JSCompiler_object_inline_digest_2450 && CapturedStacks.set( - JSCompiler_object_inline_message_2447, - JSCompiler_object_inline_digest_2448 + JSCompiler_object_inline_message_2449, + JSCompiler_object_inline_digest_2450 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2447, + value: JSCompiler_object_inline_message_2449, source: null, - stack: JSCompiler_object_inline_digest_2448 + stack: JSCompiler_object_inline_digest_2450 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9192,25 +9202,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2448 = + (JSCompiler_object_inline_digest_2450 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2448) + didReceiveUpdate || JSCompiler_object_inline_digest_2450) ) { - JSCompiler_object_inline_digest_2448 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2448) { - JSCompiler_object_inline_stack_2449 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2449 & 42)) - JSCompiler_object_inline_stack_2449 = 1; + JSCompiler_object_inline_digest_2450 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2450) { + JSCompiler_object_inline_stack_2451 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2451 & 42)) + JSCompiler_object_inline_stack_2451 = 1; else - switch (JSCompiler_object_inline_stack_2449) { + switch (JSCompiler_object_inline_stack_2451) { case 2: - JSCompiler_object_inline_stack_2449 = 1; + JSCompiler_object_inline_stack_2451 = 1; break; case 8: - JSCompiler_object_inline_stack_2449 = 4; + JSCompiler_object_inline_stack_2451 = 4; break; case 32: - JSCompiler_object_inline_stack_2449 = 16; + JSCompiler_object_inline_stack_2451 = 16; break; case 128: case 256: @@ -9231,40 +9241,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2449 = 64; + JSCompiler_object_inline_stack_2451 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2449 = 134217728; + JSCompiler_object_inline_stack_2451 = 134217728; break; default: - JSCompiler_object_inline_stack_2449 = 0; + JSCompiler_object_inline_stack_2451 = 0; } - JSCompiler_object_inline_stack_2449 = + JSCompiler_object_inline_stack_2451 = 0 !== - (JSCompiler_object_inline_stack_2449 & - (JSCompiler_object_inline_digest_2448.suspendedLanes | + (JSCompiler_object_inline_stack_2451 & + (JSCompiler_object_inline_digest_2450.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2449; + : JSCompiler_object_inline_stack_2451; if ( - 0 !== JSCompiler_object_inline_stack_2449 && - JSCompiler_object_inline_stack_2449 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2451 && + JSCompiler_object_inline_stack_2451 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2449), + ((prevState.retryLane = JSCompiler_object_inline_stack_2451), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2451 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2448, + JSCompiler_object_inline_digest_2450, current, - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2451 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2447.data === + JSCompiler_object_inline_message_2449.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9272,7 +9282,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2447.data === + JSCompiler_object_inline_message_2449.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9280,12 +9290,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2447._reactRetry = + (JSCompiler_object_inline_message_2449._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2447.nextSibling + JSCompiler_object_inline_message_2449.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9303,57 +9313,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2449.children + JSCompiler_object_inline_stack_2451.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2450) + if (JSCompiler_object_inline_componentStack_2452) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2450 = - JSCompiler_object_inline_stack_2449.fallback), - (JSCompiler_object_inline_message_2447 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2452 = + JSCompiler_object_inline_stack_2451.fallback), + (JSCompiler_object_inline_message_2449 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2449 = createWorkInProgress( + (JSCompiler_object_inline_stack_2451 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2449.children + children: JSCompiler_object_inline_stack_2451.children } )), - (JSCompiler_object_inline_stack_2449.subtreeFlags = + (JSCompiler_object_inline_stack_2451.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2450 = + ? (JSCompiler_object_inline_componentStack_2452 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2450 + JSCompiler_object_inline_componentStack_2452 )) - : ((JSCompiler_object_inline_componentStack_2450 = + : ((JSCompiler_object_inline_componentStack_2452 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2450, - JSCompiler_object_inline_message_2447, + JSCompiler_object_inline_componentStack_2452, + JSCompiler_object_inline_message_2449, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2450.flags |= 2)), - (JSCompiler_object_inline_componentStack_2450.return = + (JSCompiler_object_inline_componentStack_2452.flags |= 2)), + (JSCompiler_object_inline_componentStack_2452.return = workInProgress), - (JSCompiler_object_inline_stack_2449.return = workInProgress), - (JSCompiler_object_inline_stack_2449.sibling = - JSCompiler_object_inline_componentStack_2450), - (workInProgress.child = JSCompiler_object_inline_stack_2449), - (JSCompiler_object_inline_stack_2449 = - JSCompiler_object_inline_componentStack_2450), - (JSCompiler_object_inline_componentStack_2450 = workInProgress.child), - (JSCompiler_object_inline_message_2447 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2447 - ? (JSCompiler_object_inline_message_2447 = + (JSCompiler_object_inline_stack_2451.return = workInProgress), + (JSCompiler_object_inline_stack_2451.sibling = + JSCompiler_object_inline_componentStack_2452), + (workInProgress.child = JSCompiler_object_inline_stack_2451), + (JSCompiler_object_inline_stack_2451 = + JSCompiler_object_inline_componentStack_2452), + (JSCompiler_object_inline_componentStack_2452 = workInProgress.child), + (JSCompiler_object_inline_message_2449 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2449 + ? (JSCompiler_object_inline_message_2449 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2447.cachePool), + JSCompiler_object_inline_message_2449.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9361,34 +9371,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2447 = { + (JSCompiler_object_inline_message_2449 = { baseLanes: - JSCompiler_object_inline_message_2447.baseLanes | renderLanes, + JSCompiler_object_inline_message_2449.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2450.memoizedState = - JSCompiler_object_inline_message_2447), + (JSCompiler_object_inline_componentStack_2452.memoizedState = + JSCompiler_object_inline_message_2449), enableTransitionTracing && - ((JSCompiler_object_inline_message_2447 = enableTransitionTracing + ((JSCompiler_object_inline_message_2449 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2447 && + null !== JSCompiler_object_inline_message_2449 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2450.updateQueue), + JSCompiler_object_inline_componentStack_2452.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2450.updateQueue = { - transitions: JSCompiler_object_inline_message_2447, + ? (JSCompiler_object_inline_componentStack_2452.updateQueue = { + transitions: JSCompiler_object_inline_message_2449, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2450.updateQueue = + ? (JSCompiler_object_inline_componentStack_2452.updateQueue = { - transitions: JSCompiler_object_inline_message_2447, + transitions: JSCompiler_object_inline_message_2449, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9396,32 +9406,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2447), + JSCompiler_object_inline_message_2449), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2450.childLanes = + (JSCompiler_object_inline_componentStack_2452.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2448, + JSCompiler_object_inline_digest_2450, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2451 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2449.children + children: JSCompiler_object_inline_stack_2451.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2448 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2448 + ((JSCompiler_object_inline_digest_2450 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2450 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2448.push(current)); + : JSCompiler_object_inline_digest_2450.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -15067,7 +15077,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15125,7 +15135,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -15133,191 +15143,193 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (exitStatus === RootErrored) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - renderStartTime, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - renderStartTime, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + !workInProgressRootDidSkipSuspendedSiblings ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + 0 + ), + exitStatus + ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -15366,7 +15378,12 @@ __DEV__ && completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -15433,20 +15450,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -15490,11 +15507,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -15616,7 +15629,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -15625,10 +15640,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -15650,37 +15665,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$38) { handleThrow(root, thrownValue$38); @@ -15691,16 +15715,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -15725,12 +15746,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -26895,11 +26914,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-13411e45-20241014" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-6c4bbc78-20241015" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-www-modern-13411e45-20241014\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-6c4bbc78-20241015\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -26942,11 +26961,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-13411e45-20241014", + version: "19.0.0-www-modern-6c4bbc78-20241015", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-13411e45-20241014" + reconcilerVersion: "19.0.0-www-modern-6c4bbc78-20241015" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27551,7 +27570,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-13411e45-20241014"; + exports.version = "19.0.0-www-modern-6c4bbc78-20241015"; "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 5d3c6cfd165f5..698d127b0ddd5 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -676,6 +676,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1982,7 +1990,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$27, root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); root$27 = root$27.next; @@ -2057,39 +2066,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -8774,7 +8782,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$220) { + } catch (e$225) { JSCompiler_temp = null; break a; } @@ -11041,7 +11049,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -11069,7 +11077,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -11082,175 +11090,172 @@ function scheduleUpdateOnFiber(root, fiber, lane) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if ((disableLegacyMode || 0 !== root$jscomp$0.tag) && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11299,7 +11304,7 @@ function commitRootWhenReady( completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11363,20 +11368,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$8 = 31 - clz32(lanes), lane = 1 << index$8; - didSkipSuspendedSiblings[index$8] = -1; + didAttemptEntireTree[index$8] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11433,9 +11438,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11524,7 +11527,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11533,10 +11538,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11545,6 +11550,7 @@ function renderRootSync(root, lanes) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11553,24 +11559,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$206) { - handleThrow(root, thrownValue$206); + } catch (thrownValue$211) { + handleThrow(root, thrownValue$211); } while (1); lanes && root.shellSuspendCounter++; @@ -11578,11 +11597,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11596,12 +11615,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11685,8 +11702,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$208) { - handleThrow(root, thrownValue$208); + } catch (thrownValue$213) { + handleThrow(root, thrownValue$213); } while (1); resetContextDependencies(); @@ -12040,7 +12057,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$215 = rootWithPendingPassiveEffects, + var root$220 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12055,7 +12072,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$215, remainingLanes); + releaseRootPooledCache(root$220, remainingLanes); } } return !1; @@ -13374,19 +13391,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$380; + var JSCompiler_inline_result$jscomp$385; if (canUseDOM) { - var isSupported$jscomp$inline_1560 = "oninput" in document; - if (!isSupported$jscomp$inline_1560) { - var element$jscomp$inline_1561 = document.createElement("div"); - element$jscomp$inline_1561.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1560 = - "function" === typeof element$jscomp$inline_1561.oninput; + var isSupported$jscomp$inline_1567 = "oninput" in document; + if (!isSupported$jscomp$inline_1567) { + var element$jscomp$inline_1568 = document.createElement("div"); + element$jscomp$inline_1568.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1567 = + "function" === typeof element$jscomp$inline_1568.oninput; } - JSCompiler_inline_result$jscomp$380 = isSupported$jscomp$inline_1560; - } else JSCompiler_inline_result$jscomp$380 = !1; + JSCompiler_inline_result$jscomp$385 = isSupported$jscomp$inline_1567; + } else JSCompiler_inline_result$jscomp$385 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$380 && + JSCompiler_inline_result$jscomp$385 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13797,20 +13814,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1601 = 0; - i$jscomp$inline_1601 < simpleEventPluginEvents.length; - i$jscomp$inline_1601++ + var i$jscomp$inline_1608 = 0; + i$jscomp$inline_1608 < simpleEventPluginEvents.length; + i$jscomp$inline_1608++ ) { - var eventName$jscomp$inline_1602 = - simpleEventPluginEvents[i$jscomp$inline_1601], - domEventName$jscomp$inline_1603 = - eventName$jscomp$inline_1602.toLowerCase(), - capitalizedEvent$jscomp$inline_1604 = - eventName$jscomp$inline_1602[0].toUpperCase() + - eventName$jscomp$inline_1602.slice(1); + var eventName$jscomp$inline_1609 = + simpleEventPluginEvents[i$jscomp$inline_1608], + domEventName$jscomp$inline_1610 = + eventName$jscomp$inline_1609.toLowerCase(), + capitalizedEvent$jscomp$inline_1611 = + eventName$jscomp$inline_1609[0].toUpperCase() + + eventName$jscomp$inline_1609.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1603, - "on" + capitalizedEvent$jscomp$inline_1604 + domEventName$jscomp$inline_1610, + "on" + capitalizedEvent$jscomp$inline_1611 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15103,34 +15120,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$234 = props[hasSrc]; - if (null != propValue$234) + var propValue$239 = props[hasSrc]; + if (null != propValue$239) switch (hasSrc) { case "name": - hasSrcSet = propValue$234; + hasSrcSet = propValue$239; break; case "type": - propValue = propValue$234; + propValue = propValue$239; break; case "checked": - checked = propValue$234; + checked = propValue$239; break; case "defaultChecked": - defaultChecked = propValue$234; + defaultChecked = propValue$239; break; case "value": - propKey = propValue$234; + propKey = propValue$239; break; case "defaultValue": - defaultValue = propValue$234; + defaultValue = propValue$239; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$234) + if (null != propValue$239) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$234, props, null); + setProp(domElement, tag, hasSrc, propValue$239, props, null); } } initInput( @@ -15267,14 +15284,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$234 in props) - props.hasOwnProperty(propValue$234) && - ((hasSrc = props[propValue$234]), + for (propValue$239 in props) + props.hasOwnProperty(propValue$239) && + ((hasSrc = props[propValue$239]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$234, + propValue$239, hasSrc, props, void 0 @@ -15322,14 +15339,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$251 in nextProps) { - var propKey = nextProps[propKey$251]; - lastProp = lastProps[propKey$251]; + for (var propKey$256 in nextProps) { + var propKey = nextProps[propKey$256]; + lastProp = lastProps[propKey$256]; if ( - nextProps.hasOwnProperty(propKey$251) && + nextProps.hasOwnProperty(propKey$256) && (null != propKey || null != lastProp) ) - switch (propKey$251) { + switch (propKey$256) { case "type": type = propKey; break; @@ -15358,7 +15375,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$251, + propKey$256, propKey, nextProps, lastProp @@ -15377,7 +15394,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$251 = null; + propKey = value = defaultValue = propKey$256 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15408,7 +15425,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$251 = type; + propKey$256 = type; break; case "defaultValue": defaultValue = type; @@ -15429,15 +15446,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$251 - ? updateOptions(domElement, !!lastProps, propKey$251, !1) + null != propKey$256 + ? updateOptions(domElement, !!lastProps, propKey$256, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$251 = null; + propKey = propKey$256 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15461,7 +15478,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$251 = name; + propKey$256 = name; break; case "defaultValue": propKey = name; @@ -15475,17 +15492,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$251, propKey); + updateTextarea(domElement, propKey$256, propKey); return; case "option": - for (var propKey$267 in lastProps) + for (var propKey$272 in lastProps) if ( - ((propKey$251 = lastProps[propKey$267]), - lastProps.hasOwnProperty(propKey$267) && - null != propKey$251 && - !nextProps.hasOwnProperty(propKey$267)) + ((propKey$256 = lastProps[propKey$272]), + lastProps.hasOwnProperty(propKey$272) && + null != propKey$256 && + !nextProps.hasOwnProperty(propKey$272)) ) - switch (propKey$267) { + switch (propKey$272) { case "selected": domElement.selected = !1; break; @@ -15493,33 +15510,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$267, + propKey$272, null, nextProps, - propKey$251 + propKey$256 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$251 = nextProps[lastDefaultValue]), + ((propKey$256 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$251 !== propKey && - (null != propKey$251 || null != propKey)) + propKey$256 !== propKey && + (null != propKey$256 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$251 && - "function" !== typeof propKey$251 && - "symbol" !== typeof propKey$251; + propKey$256 && + "function" !== typeof propKey$256 && + "symbol" !== typeof propKey$256; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$251, + propKey$256, nextProps, propKey ); @@ -15540,24 +15557,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$272 in lastProps) - (propKey$251 = lastProps[propKey$272]), - lastProps.hasOwnProperty(propKey$272) && - null != propKey$251 && - !nextProps.hasOwnProperty(propKey$272) && - setProp(domElement, tag, propKey$272, null, nextProps, propKey$251); + for (var propKey$277 in lastProps) + (propKey$256 = lastProps[propKey$277]), + lastProps.hasOwnProperty(propKey$277) && + null != propKey$256 && + !nextProps.hasOwnProperty(propKey$277) && + setProp(domElement, tag, propKey$277, null, nextProps, propKey$256); for (checked in nextProps) if ( - ((propKey$251 = nextProps[checked]), + ((propKey$256 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$251 !== propKey && - (null != propKey$251 || null != propKey)) + propKey$256 !== propKey && + (null != propKey$256 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$251) + if (null != propKey$256) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15565,7 +15582,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$251, + propKey$256, nextProps, propKey ); @@ -15573,49 +15590,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$277 in lastProps) - (propKey$251 = lastProps[propKey$277]), - lastProps.hasOwnProperty(propKey$277) && - void 0 !== propKey$251 && - !nextProps.hasOwnProperty(propKey$277) && + for (var propKey$282 in lastProps) + (propKey$256 = lastProps[propKey$282]), + lastProps.hasOwnProperty(propKey$282) && + void 0 !== propKey$256 && + !nextProps.hasOwnProperty(propKey$282) && setPropOnCustomElement( domElement, tag, - propKey$277, + propKey$282, void 0, nextProps, - propKey$251 + propKey$256 ); for (defaultChecked in nextProps) - (propKey$251 = nextProps[defaultChecked]), + (propKey$256 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$251 === propKey || - (void 0 === propKey$251 && void 0 === propKey) || + propKey$256 === propKey || + (void 0 === propKey$256 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$251, + propKey$256, nextProps, propKey ); return; } } - for (var propKey$282 in lastProps) - (propKey$251 = lastProps[propKey$282]), - lastProps.hasOwnProperty(propKey$282) && - null != propKey$251 && - !nextProps.hasOwnProperty(propKey$282) && - setProp(domElement, tag, propKey$282, null, nextProps, propKey$251); + for (var propKey$287 in lastProps) + (propKey$256 = lastProps[propKey$287]), + lastProps.hasOwnProperty(propKey$287) && + null != propKey$256 && + !nextProps.hasOwnProperty(propKey$287) && + setProp(domElement, tag, propKey$287, null, nextProps, propKey$256); for (lastProp in nextProps) - (propKey$251 = nextProps[lastProp]), + (propKey$256 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$251 === propKey || - (null == propKey$251 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$251, nextProps, propKey); + propKey$256 === propKey || + (null == propKey$256 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$256, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16210,26 +16227,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$290 = getResourcesFromRoot( + var styles$295 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$291 = styles$290.get(type); - resource$291 || + resource$296 = styles$295.get(type); + resource$296 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$291 = { + (resource$296 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$290.set(type, resource$291), - (styles$290 = JSCompiler_inline_result.querySelector( + styles$295.set(type, resource$296), + (styles$295 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$290._p && - ((resource$291.instance = styles$290), - (resource$291.state.loading = 5)), + !styles$295._p && + ((resource$296.instance = styles$295), + (resource$296.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16242,16 +16259,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$290 || + styles$295 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$291.state + resource$296.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$291; + return resource$296; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16348,37 +16365,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$296 = hoistableRoot.querySelector( + var instance$301 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$296) + if (instance$301) return ( (resource.state.loading |= 4), - (resource.instance = instance$296), - markNodeAsHoistable(instance$296), - instance$296 + (resource.instance = instance$301), + markNodeAsHoistable(instance$301), + instance$301 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$296 = ( + instance$301 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$296); - var linkInstance = instance$296; + markNodeAsHoistable(instance$301); + var linkInstance = instance$301; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$296, "link", instance); + setInitialProperties(instance$301, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$296, props.precedence, hoistableRoot); - return (resource.instance = instance$296); + insertStylesheet(instance$301, props.precedence, hoistableRoot); + return (resource.instance = instance$301); case "script": - instance$296 = getScriptKey(props.src); + instance$301 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$296) + getScriptSelectorFromKey(instance$301) )) ) return ( @@ -16387,7 +16404,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$296))) + if ((styleProps = preloadPropsMap.get(instance$301))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17419,16 +17436,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1774 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1781 = React.version; if ( - "19.0.0-www-classic-13411e45-20241014" !== - isomorphicReactPackageVersion$jscomp$inline_1774 + "19.0.0-www-classic-6c4bbc78-20241015" !== + isomorphicReactPackageVersion$jscomp$inline_1781 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1774, - "19.0.0-www-classic-13411e45-20241014" + isomorphicReactPackageVersion$jscomp$inline_1781, + "19.0.0-www-classic-6c4bbc78-20241015" ) ); function flushSyncFromReconciler(fn) { @@ -17471,25 +17488,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2287 = { +var internals$jscomp$inline_2294 = { bundleType: 0, - version: "19.0.0-www-classic-13411e45-20241014", + version: "19.0.0-www-classic-6c4bbc78-20241015", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-13411e45-20241014" + reconcilerVersion: "19.0.0-www-classic-6c4bbc78-20241015" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2288 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2295 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2288.isDisabled && - hook$jscomp$inline_2288.supportsFiber + !hook$jscomp$inline_2295.isDisabled && + hook$jscomp$inline_2295.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2288.inject( - internals$jscomp$inline_2287 + (rendererID = hook$jscomp$inline_2295.inject( + internals$jscomp$inline_2294 )), - (injectedHook = hook$jscomp$inline_2288); + (injectedHook = hook$jscomp$inline_2295); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17563,11 +17580,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$317); + var instance = getPublicRootInstance(root$322); originalCallback.call(instance); }; } - var root$317 = createHydrationContainer( + var root$322 = createHydrationContainer( initialChildren, callback, container, @@ -17582,23 +17599,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$317; - container[internalContainerInstanceKey] = root$317.current; + container._reactRootContainer = root$322; + container[internalContainerInstanceKey] = root$322.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSyncWork$1(); - return root$317; + return root$322; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$318 = callback; + var originalCallback$323 = callback; callback = function () { - var instance = getPublicRootInstance(root$319); - originalCallback$318.call(instance); + var instance = getPublicRootInstance(root$324); + originalCallback$323.call(instance); }; } - var root$319 = createFiberRoot( + var root$324 = createFiberRoot( container, 0, !1, @@ -17612,14 +17629,14 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$319; - container[internalContainerInstanceKey] = root$319.current; + container._reactRootContainer = root$324; + container[internalContainerInstanceKey] = root$324.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); - updateContainerSync(initialChildren, root$319, parentComponent, callback); + updateContainerSync(initialChildren, root$324, parentComponent, callback); flushSyncWork$1(); - return root$319; + return root$324; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -17933,4 +17950,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-13411e45-20241014"; +exports.version = "19.0.0-www-classic-6c4bbc78-20241015"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index d7581b4369e81..5074b2a706371 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -607,6 +607,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1825,7 +1833,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$27, root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); root$27 = root$27.next; @@ -1900,39 +1909,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -8337,7 +8345,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$211) { + } catch (e$216) { JSCompiler_temp = null; break a; } @@ -10583,7 +10591,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -10610,179 +10618,179 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -10831,7 +10839,7 @@ function commitRootWhenReady( completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -10895,20 +10903,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$8 = 31 - clz32(lanes), lane = 1 << index$8; - didSkipSuspendedSiblings[index$8] = -1; + didAttemptEntireTree[index$8] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -10952,9 +10960,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11043,7 +11049,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11052,10 +11060,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11064,6 +11072,7 @@ function renderRootSync(root, lanes) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11072,24 +11081,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$197) { - handleThrow(root, thrownValue$197); + } catch (thrownValue$202) { + handleThrow(root, thrownValue$202); } while (1); lanes && root.shellSuspendCounter++; @@ -11097,11 +11119,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11115,12 +11137,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11204,8 +11224,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$199) { - handleThrow(root, thrownValue$199); + } catch (thrownValue$204) { + handleThrow(root, thrownValue$204); } while (1); resetContextDependencies(); @@ -11553,7 +11573,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$206 = rootWithPendingPassiveEffects, + var root$211 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11568,7 +11588,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$206, remainingLanes); + releaseRootPooledCache(root$211, remainingLanes); } } return !1; @@ -12793,19 +12813,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$367; + var JSCompiler_inline_result$jscomp$372; if (canUseDOM) { - var isSupported$jscomp$inline_1531 = "oninput" in document; - if (!isSupported$jscomp$inline_1531) { - var element$jscomp$inline_1532 = document.createElement("div"); - element$jscomp$inline_1532.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1531 = - "function" === typeof element$jscomp$inline_1532.oninput; + var isSupported$jscomp$inline_1538 = "oninput" in document; + if (!isSupported$jscomp$inline_1538) { + var element$jscomp$inline_1539 = document.createElement("div"); + element$jscomp$inline_1539.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1538 = + "function" === typeof element$jscomp$inline_1539.oninput; } - JSCompiler_inline_result$jscomp$367 = isSupported$jscomp$inline_1531; - } else JSCompiler_inline_result$jscomp$367 = !1; + JSCompiler_inline_result$jscomp$372 = isSupported$jscomp$inline_1538; + } else JSCompiler_inline_result$jscomp$372 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$367 && + JSCompiler_inline_result$jscomp$372 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13216,20 +13236,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1572 = 0; - i$jscomp$inline_1572 < simpleEventPluginEvents.length; - i$jscomp$inline_1572++ + var i$jscomp$inline_1579 = 0; + i$jscomp$inline_1579 < simpleEventPluginEvents.length; + i$jscomp$inline_1579++ ) { - var eventName$jscomp$inline_1573 = - simpleEventPluginEvents[i$jscomp$inline_1572], - domEventName$jscomp$inline_1574 = - eventName$jscomp$inline_1573.toLowerCase(), - capitalizedEvent$jscomp$inline_1575 = - eventName$jscomp$inline_1573[0].toUpperCase() + - eventName$jscomp$inline_1573.slice(1); + var eventName$jscomp$inline_1580 = + simpleEventPluginEvents[i$jscomp$inline_1579], + domEventName$jscomp$inline_1581 = + eventName$jscomp$inline_1580.toLowerCase(), + capitalizedEvent$jscomp$inline_1582 = + eventName$jscomp$inline_1580[0].toUpperCase() + + eventName$jscomp$inline_1580.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1574, - "on" + capitalizedEvent$jscomp$inline_1575 + domEventName$jscomp$inline_1581, + "on" + capitalizedEvent$jscomp$inline_1582 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14518,34 +14538,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( @@ -14681,14 +14701,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 @@ -14736,14 +14756,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": type = propKey; break; @@ -14772,7 +14792,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$242, + propKey$247, propKey, nextProps, lastProp @@ -14791,7 +14811,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]), @@ -14822,7 +14842,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$242 = type; + propKey$247 = type; break; case "defaultValue": defaultValue = type; @@ -14843,15 +14863,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]), @@ -14875,7 +14895,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$242 = name; + propKey$247 = name; break; case "defaultValue": propKey = name; @@ -14889,17 +14909,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; @@ -14907,33 +14927,33 @@ 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": 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 ); @@ -14954,24 +14974,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: @@ -14979,7 +14999,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$242, + propKey$247, nextProps, propKey ); @@ -14987,49 +15007,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; @@ -15607,26 +15627,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$281 = getResourcesFromRoot( + var styles$286 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$282 = styles$281.get(type); - resource$282 || + resource$287 = styles$286.get(type); + resource$287 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$282 = { + (resource$287 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$281.set(type, resource$282), - (styles$281 = JSCompiler_inline_result.querySelector( + styles$286.set(type, resource$287), + (styles$286 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$281._p && - ((resource$282.instance = styles$281), - (resource$282.state.loading = 5)), + !styles$286._p && + ((resource$287.instance = styles$286), + (resource$287.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15639,16 +15659,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$281 || + styles$286 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$282.state + resource$287.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$282; + return resource$287; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15745,37 +15765,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$287 = hoistableRoot.querySelector( + var instance$292 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$287) + if (instance$292) return ( (resource.state.loading |= 4), - (resource.instance = instance$287), - markNodeAsHoistable(instance$287), - instance$287 + (resource.instance = instance$292), + markNodeAsHoistable(instance$292), + instance$292 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$287 = ( + instance$292 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$287); - var linkInstance = instance$287; + markNodeAsHoistable(instance$292); + var linkInstance = instance$292; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$287, "link", instance); + setInitialProperties(instance$292, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$287, props.precedence, hoistableRoot); - return (resource.instance = instance$287); + insertStylesheet(instance$292, props.precedence, hoistableRoot); + return (resource.instance = instance$292); case "script": - instance$287 = getScriptKey(props.src); + instance$292 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$287) + getScriptSelectorFromKey(instance$292) )) ) return ( @@ -15784,7 +15804,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$287))) + if ((styleProps = preloadPropsMap.get(instance$292))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16787,16 +16807,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1745 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1752 = React.version; if ( - "19.0.0-www-modern-13411e45-20241014" !== - isomorphicReactPackageVersion$jscomp$inline_1745 + "19.0.0-www-modern-6c4bbc78-20241015" !== + isomorphicReactPackageVersion$jscomp$inline_1752 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1745, - "19.0.0-www-modern-13411e45-20241014" + isomorphicReactPackageVersion$jscomp$inline_1752, + "19.0.0-www-modern-6c4bbc78-20241015" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -16812,25 +16832,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2279 = { +var internals$jscomp$inline_2286 = { bundleType: 0, - version: "19.0.0-www-modern-13411e45-20241014", + version: "19.0.0-www-modern-6c4bbc78-20241015", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-13411e45-20241014" + reconcilerVersion: "19.0.0-www-modern-6c4bbc78-20241015" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2280 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2287 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2280.isDisabled && - hook$jscomp$inline_2280.supportsFiber + !hook$jscomp$inline_2287.isDisabled && + hook$jscomp$inline_2287.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2280.inject( - internals$jscomp$inline_2279 + (rendererID = hook$jscomp$inline_2287.inject( + internals$jscomp$inline_2286 )), - (injectedHook = hook$jscomp$inline_2280); + (injectedHook = hook$jscomp$inline_2287); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17181,4 +17201,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-13411e45-20241014"; +exports.version = "19.0.0-www-modern-6c4bbc78-20241015"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index 7bebc4c849fb5..4e772093b2b01 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -757,6 +757,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -2147,7 +2155,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$29, root$29 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$29, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$29, JSCompiler_inline_result)); root$29 = root$29.next; @@ -2222,39 +2231,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -9234,7 +9242,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$237) { + } catch (e$242) { JSCompiler_temp = null; break a; } @@ -11591,7 +11599,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -11620,7 +11628,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -11633,175 +11641,172 @@ function scheduleUpdateOnFiber(root, fiber, lane) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if ((disableLegacyMode || 0 !== root$jscomp$0.tag) && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now$1()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now$1()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11850,7 +11855,7 @@ function commitRootWhenReady( completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11914,20 +11919,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$8 = 31 - clz32(lanes), lane = 1 << index$8; - didSkipSuspendedSiblings[index$8] = -1; + didAttemptEntireTree[index$8] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11984,9 +11989,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -12105,7 +12108,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -12114,10 +12119,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -12135,32 +12140,46 @@ function renderRootSync(root, lanes) { } enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + memoizedUpdaters = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue, reason); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$221) { - handleThrow(root, thrownValue$221); + } catch (thrownValue$226) { + handleThrow(root, thrownValue$226); } while (1); lanes && root.shellSuspendCounter++; @@ -12168,12 +12187,12 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -12195,12 +12214,7 @@ function renderRootConcurrent(root, lanes) { workInProgressRootRenderTargetTime = now$1() + 500; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do try { @@ -12286,8 +12300,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$223) { - handleThrow(root, thrownValue$223); + } catch (thrownValue$228) { + handleThrow(root, thrownValue$228); } while (1); resetContextDependencies(); @@ -12468,18 +12482,18 @@ function completeUnitOfWork(unitOfWork) { ); return; } - var current$227 = completedWork.alternate; + var current$232 = completedWork.alternate; unitOfWork = completedWork.return; startProfilerTimer(completedWork); - current$227 = completeWork( - current$227, + current$232 = completeWork( + current$232, completedWork, entangledRenderLanes ); 0 !== (completedWork.mode & 2) && stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork); - if (null !== current$227) { - workInProgress = current$227; + if (null !== current$232) { + workInProgress = current$232; return; } completedWork = completedWork.sibling; @@ -12704,7 +12718,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$230 = rootWithPendingPassiveEffects, + var root$235 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12719,7 +12733,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$230, remainingLanes); + releaseRootPooledCache(root$235, remainingLanes); } } return !1; @@ -13551,9 +13565,9 @@ function attemptContinuousHydration(fiber) { function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$235 = 0; - 31 > index$235; - index$235++ + var map = new Map(), lane = 1, index$240 = 0; + 31 > index$240; + index$240++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -14099,19 +14113,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$397; + var JSCompiler_inline_result$jscomp$402; if (canUseDOM) { - var isSupported$jscomp$inline_1653 = "oninput" in document; - if (!isSupported$jscomp$inline_1653) { - var element$jscomp$inline_1654 = document.createElement("div"); - element$jscomp$inline_1654.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1653 = - "function" === typeof element$jscomp$inline_1654.oninput; + var isSupported$jscomp$inline_1660 = "oninput" in document; + if (!isSupported$jscomp$inline_1660) { + var element$jscomp$inline_1661 = document.createElement("div"); + element$jscomp$inline_1661.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1660 = + "function" === typeof element$jscomp$inline_1661.oninput; } - JSCompiler_inline_result$jscomp$397 = isSupported$jscomp$inline_1653; - } else JSCompiler_inline_result$jscomp$397 = !1; + JSCompiler_inline_result$jscomp$402 = isSupported$jscomp$inline_1660; + } else JSCompiler_inline_result$jscomp$402 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$397 && + JSCompiler_inline_result$jscomp$402 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14522,20 +14536,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1694 = 0; - i$jscomp$inline_1694 < simpleEventPluginEvents.length; - i$jscomp$inline_1694++ + var i$jscomp$inline_1701 = 0; + i$jscomp$inline_1701 < simpleEventPluginEvents.length; + i$jscomp$inline_1701++ ) { - var eventName$jscomp$inline_1695 = - simpleEventPluginEvents[i$jscomp$inline_1694], - domEventName$jscomp$inline_1696 = - eventName$jscomp$inline_1695.toLowerCase(), - capitalizedEvent$jscomp$inline_1697 = - eventName$jscomp$inline_1695[0].toUpperCase() + - eventName$jscomp$inline_1695.slice(1); + var eventName$jscomp$inline_1702 = + simpleEventPluginEvents[i$jscomp$inline_1701], + domEventName$jscomp$inline_1703 = + eventName$jscomp$inline_1702.toLowerCase(), + capitalizedEvent$jscomp$inline_1704 = + eventName$jscomp$inline_1702[0].toUpperCase() + + eventName$jscomp$inline_1702.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1696, - "on" + capitalizedEvent$jscomp$inline_1697 + domEventName$jscomp$inline_1703, + "on" + capitalizedEvent$jscomp$inline_1704 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15828,34 +15842,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$251 = props[hasSrc]; - if (null != propValue$251) + var propValue$256 = props[hasSrc]; + if (null != propValue$256) switch (hasSrc) { case "name": - hasSrcSet = propValue$251; + hasSrcSet = propValue$256; break; case "type": - propValue = propValue$251; + propValue = propValue$256; break; case "checked": - checked = propValue$251; + checked = propValue$256; break; case "defaultChecked": - defaultChecked = propValue$251; + defaultChecked = propValue$256; break; case "value": - propKey = propValue$251; + propKey = propValue$256; break; case "defaultValue": - defaultValue = propValue$251; + defaultValue = propValue$256; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$251) + if (null != propValue$256) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$251, props, null); + setProp(domElement, tag, hasSrc, propValue$256, props, null); } } initInput( @@ -15992,14 +16006,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$251 in props) - props.hasOwnProperty(propValue$251) && - ((hasSrc = props[propValue$251]), + for (propValue$256 in props) + props.hasOwnProperty(propValue$256) && + ((hasSrc = props[propValue$256]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$251, + propValue$256, hasSrc, props, void 0 @@ -16047,14 +16061,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$268 in nextProps) { - var propKey = nextProps[propKey$268]; - lastProp = lastProps[propKey$268]; + for (var propKey$273 in nextProps) { + var propKey = nextProps[propKey$273]; + lastProp = lastProps[propKey$273]; if ( - nextProps.hasOwnProperty(propKey$268) && + nextProps.hasOwnProperty(propKey$273) && (null != propKey || null != lastProp) ) - switch (propKey$268) { + switch (propKey$273) { case "type": type = propKey; break; @@ -16083,7 +16097,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$268, + propKey$273, propKey, nextProps, lastProp @@ -16102,7 +16116,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$268 = null; + propKey = value = defaultValue = propKey$273 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16133,7 +16147,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$268 = type; + propKey$273 = type; break; case "defaultValue": defaultValue = type; @@ -16154,15 +16168,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$268 - ? updateOptions(domElement, !!lastProps, propKey$268, !1) + null != propKey$273 + ? updateOptions(domElement, !!lastProps, propKey$273, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$268 = null; + propKey = propKey$273 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16186,7 +16200,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$268 = name; + propKey$273 = name; break; case "defaultValue": propKey = name; @@ -16200,17 +16214,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$268, propKey); + updateTextarea(domElement, propKey$273, propKey); return; case "option": - for (var propKey$284 in lastProps) + for (var propKey$289 in lastProps) if ( - ((propKey$268 = lastProps[propKey$284]), - lastProps.hasOwnProperty(propKey$284) && - null != propKey$268 && - !nextProps.hasOwnProperty(propKey$284)) + ((propKey$273 = lastProps[propKey$289]), + lastProps.hasOwnProperty(propKey$289) && + null != propKey$273 && + !nextProps.hasOwnProperty(propKey$289)) ) - switch (propKey$284) { + switch (propKey$289) { case "selected": domElement.selected = !1; break; @@ -16218,33 +16232,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$284, + propKey$289, null, nextProps, - propKey$268 + propKey$273 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$268 = nextProps[lastDefaultValue]), + ((propKey$273 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$268 !== propKey && - (null != propKey$268 || null != propKey)) + propKey$273 !== propKey && + (null != propKey$273 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$268 && - "function" !== typeof propKey$268 && - "symbol" !== typeof propKey$268; + propKey$273 && + "function" !== typeof propKey$273 && + "symbol" !== typeof propKey$273; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$268, + propKey$273, nextProps, propKey ); @@ -16265,24 +16279,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$289 in lastProps) - (propKey$268 = lastProps[propKey$289]), - lastProps.hasOwnProperty(propKey$289) && - null != propKey$268 && - !nextProps.hasOwnProperty(propKey$289) && - setProp(domElement, tag, propKey$289, null, nextProps, propKey$268); + for (var propKey$294 in lastProps) + (propKey$273 = lastProps[propKey$294]), + lastProps.hasOwnProperty(propKey$294) && + null != propKey$273 && + !nextProps.hasOwnProperty(propKey$294) && + setProp(domElement, tag, propKey$294, null, nextProps, propKey$273); for (checked in nextProps) if ( - ((propKey$268 = nextProps[checked]), + ((propKey$273 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$268 !== propKey && - (null != propKey$268 || null != propKey)) + propKey$273 !== propKey && + (null != propKey$273 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$268) + if (null != propKey$273) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16290,7 +16304,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$268, + propKey$273, nextProps, propKey ); @@ -16298,49 +16312,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$294 in lastProps) - (propKey$268 = lastProps[propKey$294]), - lastProps.hasOwnProperty(propKey$294) && - void 0 !== propKey$268 && - !nextProps.hasOwnProperty(propKey$294) && + for (var propKey$299 in lastProps) + (propKey$273 = lastProps[propKey$299]), + lastProps.hasOwnProperty(propKey$299) && + void 0 !== propKey$273 && + !nextProps.hasOwnProperty(propKey$299) && setPropOnCustomElement( domElement, tag, - propKey$294, + propKey$299, void 0, nextProps, - propKey$268 + propKey$273 ); for (defaultChecked in nextProps) - (propKey$268 = nextProps[defaultChecked]), + (propKey$273 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$268 === propKey || - (void 0 === propKey$268 && void 0 === propKey) || + propKey$273 === propKey || + (void 0 === propKey$273 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$268, + propKey$273, nextProps, propKey ); return; } } - for (var propKey$299 in lastProps) - (propKey$268 = lastProps[propKey$299]), - lastProps.hasOwnProperty(propKey$299) && - null != propKey$268 && - !nextProps.hasOwnProperty(propKey$299) && - setProp(domElement, tag, propKey$299, null, nextProps, propKey$268); + for (var propKey$304 in lastProps) + (propKey$273 = lastProps[propKey$304]), + lastProps.hasOwnProperty(propKey$304) && + null != propKey$273 && + !nextProps.hasOwnProperty(propKey$304) && + setProp(domElement, tag, propKey$304, null, nextProps, propKey$273); for (lastProp in nextProps) - (propKey$268 = nextProps[lastProp]), + (propKey$273 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$268 === propKey || - (null == propKey$268 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$268, nextProps, propKey); + propKey$273 === propKey || + (null == propKey$273 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$273, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16935,26 +16949,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$307 = getResourcesFromRoot( + var styles$312 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$308 = styles$307.get(type); - resource$308 || + resource$313 = styles$312.get(type); + resource$313 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$308 = { + (resource$313 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$307.set(type, resource$308), - (styles$307 = JSCompiler_inline_result.querySelector( + styles$312.set(type, resource$313), + (styles$312 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$307._p && - ((resource$308.instance = styles$307), - (resource$308.state.loading = 5)), + !styles$312._p && + ((resource$313.instance = styles$312), + (resource$313.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16967,16 +16981,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$307 || + styles$312 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$308.state + resource$313.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$308; + return resource$313; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -17073,37 +17087,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$313 = hoistableRoot.querySelector( + var instance$318 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$313) + if (instance$318) return ( (resource.state.loading |= 4), - (resource.instance = instance$313), - markNodeAsHoistable(instance$313), - instance$313 + (resource.instance = instance$318), + markNodeAsHoistable(instance$318), + instance$318 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$313 = ( + instance$318 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$313); - var linkInstance = instance$313; + markNodeAsHoistable(instance$318); + var linkInstance = instance$318; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$313, "link", instance); + setInitialProperties(instance$318, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$313, props.precedence, hoistableRoot); - return (resource.instance = instance$313); + insertStylesheet(instance$318, props.precedence, hoistableRoot); + return (resource.instance = instance$318); case "script": - instance$313 = getScriptKey(props.src); + instance$318 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$313) + getScriptSelectorFromKey(instance$318) )) ) return ( @@ -17112,7 +17126,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$313))) + if ((styleProps = preloadPropsMap.get(instance$318))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -18144,16 +18158,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1867 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1874 = React.version; if ( - "19.0.0-www-classic-13411e45-20241014" !== - isomorphicReactPackageVersion$jscomp$inline_1867 + "19.0.0-www-classic-6c4bbc78-20241015" !== + isomorphicReactPackageVersion$jscomp$inline_1874 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1867, - "19.0.0-www-classic-13411e45-20241014" + isomorphicReactPackageVersion$jscomp$inline_1874, + "19.0.0-www-classic-6c4bbc78-20241015" ) ); function flushSyncFromReconciler(fn) { @@ -18196,28 +18210,28 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_1874 = { +var internals$jscomp$inline_1881 = { bundleType: 0, - version: "19.0.0-www-classic-13411e45-20241014", + version: "19.0.0-www-classic-6c4bbc78-20241015", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-13411e45-20241014" + reconcilerVersion: "19.0.0-www-classic-6c4bbc78-20241015" }; enableSchedulingProfiler && - ((internals$jscomp$inline_1874.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_1874.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_1881.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_1881.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2338 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2345 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2338.isDisabled && - hook$jscomp$inline_2338.supportsFiber + !hook$jscomp$inline_2345.isDisabled && + hook$jscomp$inline_2345.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2338.inject( - internals$jscomp$inline_1874 + (rendererID = hook$jscomp$inline_2345.inject( + internals$jscomp$inline_1881 )), - (injectedHook = hook$jscomp$inline_2338); + (injectedHook = hook$jscomp$inline_2345); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18291,11 +18305,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$334); + var instance = getPublicRootInstance(root$339); originalCallback.call(instance); }; } - var root$334 = createHydrationContainer( + var root$339 = createHydrationContainer( initialChildren, callback, container, @@ -18310,23 +18324,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$334; - container[internalContainerInstanceKey] = root$334.current; + container._reactRootContainer = root$339; + container[internalContainerInstanceKey] = root$339.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSyncWork$1(); - return root$334; + return root$339; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$335 = callback; + var originalCallback$340 = callback; callback = function () { - var instance = getPublicRootInstance(root$336); - originalCallback$335.call(instance); + var instance = getPublicRootInstance(root$341); + originalCallback$340.call(instance); }; } - var root$336 = createFiberRoot( + var root$341 = createFiberRoot( container, 0, !1, @@ -18340,14 +18354,14 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$336; - container[internalContainerInstanceKey] = root$336.current; + container._reactRootContainer = root$341; + container[internalContainerInstanceKey] = root$341.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); - updateContainerSync(initialChildren, root$336, parentComponent, callback); + updateContainerSync(initialChildren, root$341, parentComponent, callback); flushSyncWork$1(); - return root$336; + return root$341; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -18661,7 +18675,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-13411e45-20241014"; +exports.version = "19.0.0-www-classic-6c4bbc78-20241015"; "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 17d7499ee2949..90a66a82db047 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -688,6 +688,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1990,7 +1998,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$29, root$29 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$29, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$29, JSCompiler_inline_result)); root$29 = root$29.next; @@ -2065,39 +2074,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -8780,7 +8788,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$228) { + } catch (e$233) { JSCompiler_temp = null; break a; } @@ -11116,7 +11124,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -11144,179 +11152,179 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now$1()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now$1()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11365,7 +11373,7 @@ function commitRootWhenReady( completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11429,20 +11437,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$8 = 31 - clz32(lanes), lane = 1 << index$8; - didSkipSuspendedSiblings[index$8] = -1; + didAttemptEntireTree[index$8] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11486,9 +11494,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11607,7 +11613,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11616,10 +11624,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11637,32 +11645,46 @@ function renderRootSync(root, lanes) { } enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + memoizedUpdaters = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; - throwAndUnwindWorkLoop(root, memoizedUpdaters, thrownValue, reason); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$212) { - handleThrow(root, thrownValue$212); + } catch (thrownValue$217) { + handleThrow(root, thrownValue$217); } while (1); lanes && root.shellSuspendCounter++; @@ -11670,12 +11692,12 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11697,12 +11719,7 @@ function renderRootConcurrent(root, lanes) { workInProgressRootRenderTargetTime = now$1() + 500; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do try { @@ -11788,8 +11805,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$214) { - handleThrow(root, thrownValue$214); + } catch (thrownValue$219) { + handleThrow(root, thrownValue$219); } while (1); resetContextDependencies(); @@ -11966,18 +11983,18 @@ function completeUnitOfWork(unitOfWork) { ); return; } - var current$218 = completedWork.alternate; + var current$223 = completedWork.alternate; unitOfWork = completedWork.return; startProfilerTimer(completedWork); - current$218 = completeWork( - current$218, + current$223 = completeWork( + current$223, completedWork, entangledRenderLanes ); 0 !== (completedWork.mode & 2) && stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork); - if (null !== current$218) { - workInProgress = current$218; + if (null !== current$223) { + workInProgress = current$223; return; } completedWork = completedWork.sibling; @@ -12200,7 +12217,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$221 = rootWithPendingPassiveEffects, + var root$226 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12215,7 +12232,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$221, remainingLanes); + releaseRootPooledCache(root$226, remainingLanes); } } return !1; @@ -12925,9 +12942,9 @@ function attemptContinuousHydration(fiber) { function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$226 = 0; - 31 > index$226; - index$226++ + var map = new Map(), lane = 1, index$231 = 0; + 31 > index$231; + index$231++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -13501,19 +13518,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$384; + var JSCompiler_inline_result$jscomp$389; if (canUseDOM) { - var isSupported$jscomp$inline_1624 = "oninput" in document; - if (!isSupported$jscomp$inline_1624) { - var element$jscomp$inline_1625 = document.createElement("div"); - element$jscomp$inline_1625.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1624 = - "function" === typeof element$jscomp$inline_1625.oninput; + var isSupported$jscomp$inline_1631 = "oninput" in document; + if (!isSupported$jscomp$inline_1631) { + var element$jscomp$inline_1632 = document.createElement("div"); + element$jscomp$inline_1632.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1631 = + "function" === typeof element$jscomp$inline_1632.oninput; } - JSCompiler_inline_result$jscomp$384 = isSupported$jscomp$inline_1624; - } else JSCompiler_inline_result$jscomp$384 = !1; + JSCompiler_inline_result$jscomp$389 = isSupported$jscomp$inline_1631; + } else JSCompiler_inline_result$jscomp$389 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$384 && + JSCompiler_inline_result$jscomp$389 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13924,20 +13941,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1665 = 0; - i$jscomp$inline_1665 < simpleEventPluginEvents.length; - i$jscomp$inline_1665++ + var i$jscomp$inline_1672 = 0; + i$jscomp$inline_1672 < simpleEventPluginEvents.length; + i$jscomp$inline_1672++ ) { - var eventName$jscomp$inline_1666 = - simpleEventPluginEvents[i$jscomp$inline_1665], - domEventName$jscomp$inline_1667 = - eventName$jscomp$inline_1666.toLowerCase(), - capitalizedEvent$jscomp$inline_1668 = - eventName$jscomp$inline_1666[0].toUpperCase() + - eventName$jscomp$inline_1666.slice(1); + var eventName$jscomp$inline_1673 = + simpleEventPluginEvents[i$jscomp$inline_1672], + domEventName$jscomp$inline_1674 = + eventName$jscomp$inline_1673.toLowerCase(), + capitalizedEvent$jscomp$inline_1675 = + eventName$jscomp$inline_1673[0].toUpperCase() + + eventName$jscomp$inline_1673.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1667, - "on" + capitalizedEvent$jscomp$inline_1668 + domEventName$jscomp$inline_1674, + "on" + capitalizedEvent$jscomp$inline_1675 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15226,34 +15243,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$242 = props[hasSrc]; - if (null != propValue$242) + var propValue$247 = props[hasSrc]; + if (null != propValue$247) switch (hasSrc) { case "name": - hasSrcSet = propValue$242; + hasSrcSet = propValue$247; break; case "type": - propKey = propValue$242; + propKey = propValue$247; break; case "checked": - checked = propValue$242; + checked = propValue$247; break; case "defaultChecked": - defaultChecked = propValue$242; + defaultChecked = propValue$247; break; case "value": - propValue = propValue$242; + propValue = propValue$247; break; case "defaultValue": - defaultValue = propValue$242; + defaultValue = propValue$247; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$242) + if (null != propValue$247) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$242, props, null); + setProp(domElement, tag, hasSrc, propValue$247, props, null); } } initInput( @@ -15389,14 +15406,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$242 in props) - props.hasOwnProperty(propValue$242) && - ((hasSrc = props[propValue$242]), + for (propValue$247 in props) + props.hasOwnProperty(propValue$247) && + ((hasSrc = props[propValue$247]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$242, + propValue$247, hasSrc, props, void 0 @@ -15444,14 +15461,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$259 in nextProps) { - var propKey = nextProps[propKey$259]; - lastProp = lastProps[propKey$259]; + for (var propKey$264 in nextProps) { + var propKey = nextProps[propKey$264]; + lastProp = lastProps[propKey$264]; if ( - nextProps.hasOwnProperty(propKey$259) && + nextProps.hasOwnProperty(propKey$264) && (null != propKey || null != lastProp) ) - switch (propKey$259) { + switch (propKey$264) { case "type": type = propKey; break; @@ -15480,7 +15497,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$259, + propKey$264, propKey, nextProps, lastProp @@ -15499,7 +15516,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$259 = null; + propKey = value = defaultValue = propKey$264 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15530,7 +15547,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$259 = type; + propKey$264 = type; break; case "defaultValue": defaultValue = type; @@ -15551,15 +15568,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$259 - ? updateOptions(domElement, !!lastProps, propKey$259, !1) + null != propKey$264 + ? updateOptions(domElement, !!lastProps, propKey$264, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$259 = null; + propKey = propKey$264 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15583,7 +15600,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$259 = name; + propKey$264 = name; break; case "defaultValue": propKey = name; @@ -15597,17 +15614,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$259, propKey); + updateTextarea(domElement, propKey$264, propKey); return; case "option": - for (var propKey$275 in lastProps) + for (var propKey$280 in lastProps) if ( - ((propKey$259 = lastProps[propKey$275]), - lastProps.hasOwnProperty(propKey$275) && - null != propKey$259 && - !nextProps.hasOwnProperty(propKey$275)) + ((propKey$264 = lastProps[propKey$280]), + lastProps.hasOwnProperty(propKey$280) && + null != propKey$264 && + !nextProps.hasOwnProperty(propKey$280)) ) - switch (propKey$275) { + switch (propKey$280) { case "selected": domElement.selected = !1; break; @@ -15615,33 +15632,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$275, + propKey$280, null, nextProps, - propKey$259 + propKey$264 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$259 = nextProps[lastDefaultValue]), + ((propKey$264 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$259 !== propKey && - (null != propKey$259 || null != propKey)) + propKey$264 !== propKey && + (null != propKey$264 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$259 && - "function" !== typeof propKey$259 && - "symbol" !== typeof propKey$259; + propKey$264 && + "function" !== typeof propKey$264 && + "symbol" !== typeof propKey$264; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$259, + propKey$264, nextProps, propKey ); @@ -15662,24 +15679,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$280 in lastProps) - (propKey$259 = lastProps[propKey$280]), - lastProps.hasOwnProperty(propKey$280) && - null != propKey$259 && - !nextProps.hasOwnProperty(propKey$280) && - setProp(domElement, tag, propKey$280, null, nextProps, propKey$259); + for (var propKey$285 in lastProps) + (propKey$264 = lastProps[propKey$285]), + lastProps.hasOwnProperty(propKey$285) && + null != propKey$264 && + !nextProps.hasOwnProperty(propKey$285) && + setProp(domElement, tag, propKey$285, null, nextProps, propKey$264); for (checked in nextProps) if ( - ((propKey$259 = nextProps[checked]), + ((propKey$264 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$259 !== propKey && - (null != propKey$259 || null != propKey)) + propKey$264 !== propKey && + (null != propKey$264 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$259) + if (null != propKey$264) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15687,7 +15704,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$259, + propKey$264, nextProps, propKey ); @@ -15695,49 +15712,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$285 in lastProps) - (propKey$259 = lastProps[propKey$285]), - lastProps.hasOwnProperty(propKey$285) && - void 0 !== propKey$259 && - !nextProps.hasOwnProperty(propKey$285) && + for (var propKey$290 in lastProps) + (propKey$264 = lastProps[propKey$290]), + lastProps.hasOwnProperty(propKey$290) && + void 0 !== propKey$264 && + !nextProps.hasOwnProperty(propKey$290) && setPropOnCustomElement( domElement, tag, - propKey$285, + propKey$290, void 0, nextProps, - propKey$259 + propKey$264 ); for (defaultChecked in nextProps) - (propKey$259 = nextProps[defaultChecked]), + (propKey$264 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$259 === propKey || - (void 0 === propKey$259 && void 0 === propKey) || + propKey$264 === propKey || + (void 0 === propKey$264 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$259, + propKey$264, nextProps, propKey ); return; } } - for (var propKey$290 in lastProps) - (propKey$259 = lastProps[propKey$290]), - lastProps.hasOwnProperty(propKey$290) && - null != propKey$259 && - !nextProps.hasOwnProperty(propKey$290) && - setProp(domElement, tag, propKey$290, null, nextProps, propKey$259); + for (var propKey$295 in lastProps) + (propKey$264 = lastProps[propKey$295]), + lastProps.hasOwnProperty(propKey$295) && + null != propKey$264 && + !nextProps.hasOwnProperty(propKey$295) && + setProp(domElement, tag, propKey$295, null, nextProps, propKey$264); for (lastProp in nextProps) - (propKey$259 = nextProps[lastProp]), + (propKey$264 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$259 === propKey || - (null == propKey$259 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$259, nextProps, propKey); + propKey$264 === propKey || + (null == propKey$264 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$264, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16315,26 +16332,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$298 = getResourcesFromRoot( + var styles$303 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$299 = styles$298.get(type); - resource$299 || + resource$304 = styles$303.get(type); + resource$304 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$299 = { + (resource$304 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$298.set(type, resource$299), - (styles$298 = JSCompiler_inline_result.querySelector( + styles$303.set(type, resource$304), + (styles$303 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$298._p && - ((resource$299.instance = styles$298), - (resource$299.state.loading = 5)), + !styles$303._p && + ((resource$304.instance = styles$303), + (resource$304.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16347,16 +16364,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$298 || + styles$303 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$299.state + resource$304.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$299; + return resource$304; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16453,37 +16470,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$304 = hoistableRoot.querySelector( + var instance$309 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$304) + if (instance$309) return ( (resource.state.loading |= 4), - (resource.instance = instance$304), - markNodeAsHoistable(instance$304), - instance$304 + (resource.instance = instance$309), + markNodeAsHoistable(instance$309), + instance$309 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$304 = ( + instance$309 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$304); - var linkInstance = instance$304; + markNodeAsHoistable(instance$309); + var linkInstance = instance$309; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$304, "link", instance); + setInitialProperties(instance$309, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$304, props.precedence, hoistableRoot); - return (resource.instance = instance$304); + insertStylesheet(instance$309, props.precedence, hoistableRoot); + return (resource.instance = instance$309); case "script": - instance$304 = getScriptKey(props.src); + instance$309 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$304) + getScriptSelectorFromKey(instance$309) )) ) return ( @@ -16492,7 +16509,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$304))) + if ((styleProps = preloadPropsMap.get(instance$309))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17495,16 +17512,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1838 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1845 = React.version; if ( - "19.0.0-www-modern-13411e45-20241014" !== - isomorphicReactPackageVersion$jscomp$inline_1838 + "19.0.0-www-modern-6c4bbc78-20241015" !== + isomorphicReactPackageVersion$jscomp$inline_1845 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1838, - "19.0.0-www-modern-13411e45-20241014" + isomorphicReactPackageVersion$jscomp$inline_1845, + "19.0.0-www-modern-6c4bbc78-20241015" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17520,28 +17537,28 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_1840 = { +var internals$jscomp$inline_1847 = { bundleType: 0, - version: "19.0.0-www-modern-13411e45-20241014", + version: "19.0.0-www-modern-6c4bbc78-20241015", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-13411e45-20241014" + reconcilerVersion: "19.0.0-www-modern-6c4bbc78-20241015" }; enableSchedulingProfiler && - ((internals$jscomp$inline_1840.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_1840.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_1847.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_1847.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2331 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2338 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2331.isDisabled && - hook$jscomp$inline_2331.supportsFiber + !hook$jscomp$inline_2338.isDisabled && + hook$jscomp$inline_2338.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2331.inject( - internals$jscomp$inline_1840 + (rendererID = hook$jscomp$inline_2338.inject( + internals$jscomp$inline_1847 )), - (injectedHook = hook$jscomp$inline_2331); + (injectedHook = hook$jscomp$inline_2338); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17892,7 +17909,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-13411e45-20241014"; +exports.version = "19.0.0-www-modern-6c4bbc78-20241015"; "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 ee50c5c936cda..211235a21f6e7 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -8987,5 +8987,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.0.0-www-classic-13411e45-20241014"; + exports.version = "19.0.0-www-classic-6c4bbc78-20241015"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index f240688aeefa7..f29347ae0a7a4 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -8805,5 +8805,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.0.0-www-modern-13411e45-20241014"; + exports.version = "19.0.0-www-modern-6c4bbc78-20241015"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 646ecdf6cff7e..0b84e6a5a50c7 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -5912,4 +5912,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.0.0-www-classic-13411e45-20241014"; +exports.version = "19.0.0-www-classic-6c4bbc78-20241015"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 39c2a775d199f..99d93f7aad207 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -5824,4 +5824,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.0.0-www-modern-13411e45-20241014"; +exports.version = "19.0.0-www-modern-6c4bbc78-20241015"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index c627f46c8c9cf..0a789f7c6d456 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -981,6 +981,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -3950,7 +3958,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -4027,45 +4036,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -9261,32 +9271,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2461; - var JSCompiler_object_inline_stack_2462 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2463; + var JSCompiler_object_inline_stack_2464 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2463 = !1; + var JSCompiler_object_inline_componentStack_2465 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2461 = didSuspend) || - (JSCompiler_object_inline_digest_2461 = + (JSCompiler_object_inline_digest_2463 = didSuspend) || + (JSCompiler_object_inline_digest_2463 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2461 && - ((JSCompiler_object_inline_componentStack_2463 = !0), + JSCompiler_object_inline_digest_2463 && + ((JSCompiler_object_inline_componentStack_2465 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2461 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2463 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2463 + JSCompiler_object_inline_componentStack_2465 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2460 = nextHydratableInstance; + var JSCompiler_object_inline_message_2462 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2460)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2462)) { c: { - var instance = JSCompiler_object_inline_message_2460; + var instance = JSCompiler_object_inline_message_2462; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9327,19 +9337,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2460 + JSCompiler_object_inline_message_2462 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2460 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2462 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2460 && - ((JSCompiler_object_inline_message_2460 = - JSCompiler_object_inline_message_2460.dehydrated), - null !== JSCompiler_object_inline_message_2460) + null !== JSCompiler_object_inline_message_2462 && + ((JSCompiler_object_inline_message_2462 = + JSCompiler_object_inline_message_2462.dehydrated), + null !== JSCompiler_object_inline_message_2462) ) return ( - JSCompiler_object_inline_message_2460.data === + JSCompiler_object_inline_message_2462.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9347,27 +9357,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2460 = - JSCompiler_object_inline_stack_2462.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2462.fallback; - if (JSCompiler_object_inline_componentStack_2463) + JSCompiler_object_inline_message_2462 = + JSCompiler_object_inline_stack_2464.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2464.fallback; + if (JSCompiler_object_inline_componentStack_2465) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2462 = + (JSCompiler_object_inline_stack_2464 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2460, + JSCompiler_object_inline_message_2462, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2463 = + (JSCompiler_object_inline_componentStack_2465 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2463.memoizedState = + (JSCompiler_object_inline_componentStack_2465.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2463.childLanes = + (JSCompiler_object_inline_componentStack_2465.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2461, + JSCompiler_object_inline_digest_2463, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9380,9 +9390,9 @@ __DEV__ && ? markerInstanceStack.current : null), (current = - JSCompiler_object_inline_componentStack_2463.updateQueue), + JSCompiler_object_inline_componentStack_2465.updateQueue), null === current - ? (JSCompiler_object_inline_componentStack_2463.updateQueue = + ? (JSCompiler_object_inline_componentStack_2465.updateQueue = { transitions: workInProgress, markerInstances: renderLanes, @@ -9390,46 +9400,46 @@ __DEV__ && }) : ((current.transitions = workInProgress), (current.markerInstances = renderLanes)))), - JSCompiler_object_inline_stack_2462 + JSCompiler_object_inline_stack_2464 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2462.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2464.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2462 = + (JSCompiler_object_inline_stack_2464 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2460, + JSCompiler_object_inline_message_2462, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2463 = + (JSCompiler_object_inline_componentStack_2465 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2463.memoizedState = + (JSCompiler_object_inline_componentStack_2465.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2463.childLanes = + (JSCompiler_object_inline_componentStack_2465.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2461, + JSCompiler_object_inline_digest_2463, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2462 + JSCompiler_object_inline_stack_2464 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2460 + JSCompiler_object_inline_message_2462 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2460 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2460) + ((JSCompiler_object_inline_message_2462 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2462) ) { if (didSuspend) workInProgress.flags & 256 @@ -9446,32 +9456,32 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2463 = - JSCompiler_object_inline_stack_2462.fallback), - (JSCompiler_object_inline_message_2460 = workInProgress.mode), - (JSCompiler_object_inline_stack_2462 = createFiberFromOffscreen( + (JSCompiler_object_inline_componentStack_2465 = + JSCompiler_object_inline_stack_2464.fallback), + (JSCompiler_object_inline_message_2462 = workInProgress.mode), + (JSCompiler_object_inline_stack_2464 = createFiberFromOffscreen( { mode: "visible", - children: JSCompiler_object_inline_stack_2462.children + children: JSCompiler_object_inline_stack_2464.children }, - JSCompiler_object_inline_message_2460, + JSCompiler_object_inline_message_2462, 0, null )), - (JSCompiler_object_inline_componentStack_2463 = + (JSCompiler_object_inline_componentStack_2465 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2463, - JSCompiler_object_inline_message_2460, + JSCompiler_object_inline_componentStack_2465, + JSCompiler_object_inline_message_2462, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2463.flags |= 2), - (JSCompiler_object_inline_stack_2462.return = workInProgress), - (JSCompiler_object_inline_componentStack_2463.return = + (JSCompiler_object_inline_componentStack_2465.flags |= 2), + (JSCompiler_object_inline_stack_2464.return = workInProgress), + (JSCompiler_object_inline_componentStack_2465.return = workInProgress), - (JSCompiler_object_inline_stack_2462.sibling = - JSCompiler_object_inline_componentStack_2463), - (workInProgress.child = JSCompiler_object_inline_stack_2462), + (JSCompiler_object_inline_stack_2464.sibling = + JSCompiler_object_inline_componentStack_2465), + (workInProgress.child = JSCompiler_object_inline_stack_2464), (disableLegacyMode || (workInProgress.mode & ConcurrentMode) !== NoMode) && reconcileChildFibers( @@ -9480,63 +9490,63 @@ __DEV__ && null, renderLanes ), - (JSCompiler_object_inline_stack_2462 = workInProgress.child), - (JSCompiler_object_inline_stack_2462.memoizedState = + (JSCompiler_object_inline_stack_2464 = workInProgress.child), + (JSCompiler_object_inline_stack_2464.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2462.childLanes = + (JSCompiler_object_inline_stack_2464.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2461, + JSCompiler_object_inline_digest_2463, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2463)); + JSCompiler_object_inline_componentStack_2465)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2460.data === + JSCompiler_object_inline_message_2462.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2461 = - JSCompiler_object_inline_message_2460.nextSibling && - JSCompiler_object_inline_message_2460.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2461) { - JSCompiler_temp = JSCompiler_object_inline_digest_2461.dgst; - var message = JSCompiler_object_inline_digest_2461.msg; - instance = JSCompiler_object_inline_digest_2461.stck; - var componentStack = JSCompiler_object_inline_digest_2461.cstck; + JSCompiler_object_inline_digest_2463 = + JSCompiler_object_inline_message_2462.nextSibling && + JSCompiler_object_inline_message_2462.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2463) { + JSCompiler_temp = JSCompiler_object_inline_digest_2463.dgst; + var message = JSCompiler_object_inline_digest_2463.msg; + instance = JSCompiler_object_inline_digest_2463.stck; + var componentStack = JSCompiler_object_inline_digest_2463.cstck; } - JSCompiler_object_inline_message_2460 = message; - JSCompiler_object_inline_digest_2461 = JSCompiler_temp; - JSCompiler_object_inline_stack_2462 = instance; - JSCompiler_object_inline_componentStack_2463 = componentStack; - JSCompiler_object_inline_message_2460 = - JSCompiler_object_inline_message_2460 - ? Error(JSCompiler_object_inline_message_2460) + JSCompiler_object_inline_message_2462 = message; + JSCompiler_object_inline_digest_2463 = JSCompiler_temp; + JSCompiler_object_inline_stack_2464 = instance; + JSCompiler_object_inline_componentStack_2465 = componentStack; + JSCompiler_object_inline_message_2462 = + JSCompiler_object_inline_message_2462 + ? Error(JSCompiler_object_inline_message_2462) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2460.stack = - JSCompiler_object_inline_stack_2462 || ""; - JSCompiler_object_inline_message_2460.digest = - JSCompiler_object_inline_digest_2461; - JSCompiler_object_inline_digest_2461 = - void 0 === JSCompiler_object_inline_componentStack_2463 + JSCompiler_object_inline_message_2462.stack = + JSCompiler_object_inline_stack_2464 || ""; + JSCompiler_object_inline_message_2462.digest = + JSCompiler_object_inline_digest_2463; + JSCompiler_object_inline_digest_2463 = + void 0 === JSCompiler_object_inline_componentStack_2465 ? null - : JSCompiler_object_inline_componentStack_2463; - "string" === typeof JSCompiler_object_inline_digest_2461 && + : JSCompiler_object_inline_componentStack_2465; + "string" === typeof JSCompiler_object_inline_digest_2463 && CapturedStacks.set( - JSCompiler_object_inline_message_2460, - JSCompiler_object_inline_digest_2461 + JSCompiler_object_inline_message_2462, + JSCompiler_object_inline_digest_2463 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2460, + value: JSCompiler_object_inline_message_2462, source: null, - stack: JSCompiler_object_inline_digest_2461 + stack: JSCompiler_object_inline_digest_2463 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9551,25 +9561,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2461 = + (JSCompiler_object_inline_digest_2463 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2461) + didReceiveUpdate || JSCompiler_object_inline_digest_2463) ) { - JSCompiler_object_inline_digest_2461 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2461) { - JSCompiler_object_inline_stack_2462 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2462 & 42)) - JSCompiler_object_inline_stack_2462 = 1; + JSCompiler_object_inline_digest_2463 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2463) { + JSCompiler_object_inline_stack_2464 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2464 & 42)) + JSCompiler_object_inline_stack_2464 = 1; else - switch (JSCompiler_object_inline_stack_2462) { + switch (JSCompiler_object_inline_stack_2464) { case 2: - JSCompiler_object_inline_stack_2462 = 1; + JSCompiler_object_inline_stack_2464 = 1; break; case 8: - JSCompiler_object_inline_stack_2462 = 4; + JSCompiler_object_inline_stack_2464 = 4; break; case 32: - JSCompiler_object_inline_stack_2462 = 16; + JSCompiler_object_inline_stack_2464 = 16; break; case 128: case 256: @@ -9590,40 +9600,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2462 = 64; + JSCompiler_object_inline_stack_2464 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2462 = 134217728; + JSCompiler_object_inline_stack_2464 = 134217728; break; default: - JSCompiler_object_inline_stack_2462 = 0; + JSCompiler_object_inline_stack_2464 = 0; } - JSCompiler_object_inline_stack_2462 = + JSCompiler_object_inline_stack_2464 = 0 !== - (JSCompiler_object_inline_stack_2462 & - (JSCompiler_object_inline_digest_2461.suspendedLanes | + (JSCompiler_object_inline_stack_2464 & + (JSCompiler_object_inline_digest_2463.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2462; + : JSCompiler_object_inline_stack_2464; if ( - 0 !== JSCompiler_object_inline_stack_2462 && - JSCompiler_object_inline_stack_2462 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2464 && + JSCompiler_object_inline_stack_2464 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2462), + ((prevState.retryLane = JSCompiler_object_inline_stack_2464), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2462 + JSCompiler_object_inline_stack_2464 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2461, + JSCompiler_object_inline_digest_2463, current, - JSCompiler_object_inline_stack_2462 + JSCompiler_object_inline_stack_2464 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2460.data === + JSCompiler_object_inline_message_2462.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9631,7 +9641,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2460.data === + JSCompiler_object_inline_message_2462.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9639,12 +9649,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2460._reactRetry = + (JSCompiler_object_inline_message_2462._reactRetry = workInProgress), (workInProgress = null)) : ((renderLanes = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2460.nextSibling + JSCompiler_object_inline_message_2462.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9662,73 +9672,73 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2462.children + JSCompiler_object_inline_stack_2464.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2463) + if (JSCompiler_object_inline_componentStack_2465) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2463 = - JSCompiler_object_inline_stack_2462.fallback), - (JSCompiler_object_inline_message_2460 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2465 = + JSCompiler_object_inline_stack_2464.fallback), + (JSCompiler_object_inline_message_2462 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), (componentStack = { mode: "hidden", - children: JSCompiler_object_inline_stack_2462.children + children: JSCompiler_object_inline_stack_2464.children }), disableLegacyMode || - (JSCompiler_object_inline_message_2460 & ConcurrentMode) !== NoMode || + (JSCompiler_object_inline_message_2462 & ConcurrentMode) !== NoMode || workInProgress.child === JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2462 = createWorkInProgress( + ? ((JSCompiler_object_inline_stack_2464 = createWorkInProgress( JSCompiler_temp, componentStack )), - (JSCompiler_object_inline_stack_2462.subtreeFlags = + (JSCompiler_object_inline_stack_2464.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280)) - : ((JSCompiler_object_inline_stack_2462 = workInProgress.child), - (JSCompiler_object_inline_stack_2462.childLanes = 0), - (JSCompiler_object_inline_stack_2462.pendingProps = + : ((JSCompiler_object_inline_stack_2464 = workInProgress.child), + (JSCompiler_object_inline_stack_2464.childLanes = 0), + (JSCompiler_object_inline_stack_2464.pendingProps = componentStack), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2462.actualDuration = -0), - (JSCompiler_object_inline_stack_2462.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2462.selfBaseDuration = + ((JSCompiler_object_inline_stack_2464.actualDuration = -0), + (JSCompiler_object_inline_stack_2464.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2464.selfBaseDuration = JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2462.treeBaseDuration = + (JSCompiler_object_inline_stack_2464.treeBaseDuration = JSCompiler_temp.treeBaseDuration)), (workInProgress.deletions = null)), null !== instance - ? (JSCompiler_object_inline_componentStack_2463 = + ? (JSCompiler_object_inline_componentStack_2465 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2463 + JSCompiler_object_inline_componentStack_2465 )) - : ((JSCompiler_object_inline_componentStack_2463 = + : ((JSCompiler_object_inline_componentStack_2465 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2463, - JSCompiler_object_inline_message_2460, + JSCompiler_object_inline_componentStack_2465, + JSCompiler_object_inline_message_2462, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2463.flags |= 2)), - (JSCompiler_object_inline_componentStack_2463.return = + (JSCompiler_object_inline_componentStack_2465.flags |= 2)), + (JSCompiler_object_inline_componentStack_2465.return = workInProgress), - (JSCompiler_object_inline_stack_2462.return = workInProgress), - (JSCompiler_object_inline_stack_2462.sibling = - JSCompiler_object_inline_componentStack_2463), - (workInProgress.child = JSCompiler_object_inline_stack_2462), - (JSCompiler_object_inline_stack_2462 = - JSCompiler_object_inline_componentStack_2463), - (JSCompiler_object_inline_componentStack_2463 = workInProgress.child), - (JSCompiler_object_inline_message_2460 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2460 - ? (JSCompiler_object_inline_message_2460 = + (JSCompiler_object_inline_stack_2464.return = workInProgress), + (JSCompiler_object_inline_stack_2464.sibling = + JSCompiler_object_inline_componentStack_2465), + (workInProgress.child = JSCompiler_object_inline_stack_2464), + (JSCompiler_object_inline_stack_2464 = + JSCompiler_object_inline_componentStack_2465), + (JSCompiler_object_inline_componentStack_2465 = workInProgress.child), + (JSCompiler_object_inline_message_2462 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2462 + ? (JSCompiler_object_inline_message_2462 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2460.cachePool), + JSCompiler_object_inline_message_2462.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9736,34 +9746,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2460 = { + (JSCompiler_object_inline_message_2462 = { baseLanes: - JSCompiler_object_inline_message_2460.baseLanes | renderLanes, + JSCompiler_object_inline_message_2462.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2463.memoizedState = - JSCompiler_object_inline_message_2460), + (JSCompiler_object_inline_componentStack_2465.memoizedState = + JSCompiler_object_inline_message_2462), enableTransitionTracing && - ((JSCompiler_object_inline_message_2460 = enableTransitionTracing + ((JSCompiler_object_inline_message_2462 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2460 && + null !== JSCompiler_object_inline_message_2462 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2463.updateQueue), + JSCompiler_object_inline_componentStack_2465.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2463.updateQueue = { - transitions: JSCompiler_object_inline_message_2460, + ? (JSCompiler_object_inline_componentStack_2465.updateQueue = { + transitions: JSCompiler_object_inline_message_2462, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2463.updateQueue = + ? (JSCompiler_object_inline_componentStack_2465.updateQueue = { - transitions: JSCompiler_object_inline_message_2460, + transitions: JSCompiler_object_inline_message_2462, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9771,41 +9781,41 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2460), + JSCompiler_object_inline_message_2462), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2463.childLanes = + (JSCompiler_object_inline_componentStack_2465.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2461, + JSCompiler_object_inline_digest_2463, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2462 + JSCompiler_object_inline_stack_2464 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2461 = current.child; - current = JSCompiler_object_inline_digest_2461.sibling; - JSCompiler_object_inline_digest_2461 = createWorkInProgress( - JSCompiler_object_inline_digest_2461, + JSCompiler_object_inline_digest_2463 = current.child; + current = JSCompiler_object_inline_digest_2463.sibling; + JSCompiler_object_inline_digest_2463 = createWorkInProgress( + JSCompiler_object_inline_digest_2463, { mode: "visible", - children: JSCompiler_object_inline_stack_2462.children + children: JSCompiler_object_inline_stack_2464.children } ); disableLegacyMode || (workInProgress.mode & ConcurrentMode) !== NoMode || - (JSCompiler_object_inline_digest_2461.lanes = renderLanes); - JSCompiler_object_inline_digest_2461.return = workInProgress; - JSCompiler_object_inline_digest_2461.sibling = null; + (JSCompiler_object_inline_digest_2463.lanes = renderLanes); + JSCompiler_object_inline_digest_2463.return = workInProgress; + JSCompiler_object_inline_digest_2463.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2461; + workInProgress.child = JSCompiler_object_inline_digest_2463; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2461; + return JSCompiler_object_inline_digest_2463; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = createFiberFromOffscreen( @@ -15800,7 +15810,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15859,7 +15869,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -15874,194 +15884,196 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root.tag) && - exitStatus === RootErrored - ) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if ( + (disableLegacyMode || 0 !== root.tag) && + exitStatus === RootErrored + ) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - renderStartTime, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - renderStartTime, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + !workInProgressRootDidSkipSuspendedSiblings + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -16110,7 +16122,12 @@ __DEV__ && completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -16177,20 +16194,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -16248,11 +16265,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -16374,7 +16387,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -16383,10 +16398,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -16408,37 +16423,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$38) { handleThrow(root, thrownValue$38); @@ -16449,16 +16473,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -16483,12 +16504,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -28115,11 +28134,11 @@ __DEV__ && : flushSyncErrorInBuildsThatSupportLegacyMode; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-classic-13411e45-20241014" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-6c4bbc78-20241015" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-www-classic-13411e45-20241014\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-6c4bbc78-20241015\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -28163,11 +28182,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-13411e45-20241014", + version: "19.0.0-www-classic-6c4bbc78-20241015", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-13411e45-20241014" + reconcilerVersion: "19.0.0-www-classic-6c4bbc78-20241015" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28986,5 +29005,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-13411e45-20241014"; + exports.version = "19.0.0-www-classic-6c4bbc78-20241015"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index d5859cb4a6f9e..6b977fc52643f 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -965,6 +965,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -3817,7 +3825,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -3894,45 +3903,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -8946,32 +8956,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2482; - var JSCompiler_object_inline_stack_2483 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2484; + var JSCompiler_object_inline_stack_2485 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2484 = !1; + var JSCompiler_object_inline_componentStack_2486 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2482 = didSuspend) || - (JSCompiler_object_inline_digest_2482 = + (JSCompiler_object_inline_digest_2484 = didSuspend) || + (JSCompiler_object_inline_digest_2484 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2482 && - ((JSCompiler_object_inline_componentStack_2484 = !0), + JSCompiler_object_inline_digest_2484 && + ((JSCompiler_object_inline_componentStack_2486 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2482 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2484 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2484 + JSCompiler_object_inline_componentStack_2486 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2481 = nextHydratableInstance; + var JSCompiler_object_inline_message_2483 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2481)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2483)) { c: { - var instance = JSCompiler_object_inline_message_2481; + var instance = JSCompiler_object_inline_message_2483; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9012,19 +9022,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2481 + JSCompiler_object_inline_message_2483 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2481 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2483 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2481 && - ((JSCompiler_object_inline_message_2481 = - JSCompiler_object_inline_message_2481.dehydrated), - null !== JSCompiler_object_inline_message_2481) + null !== JSCompiler_object_inline_message_2483 && + ((JSCompiler_object_inline_message_2483 = + JSCompiler_object_inline_message_2483.dehydrated), + null !== JSCompiler_object_inline_message_2483) ) return ( - JSCompiler_object_inline_message_2481.data === + JSCompiler_object_inline_message_2483.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9032,27 +9042,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2481 = - JSCompiler_object_inline_stack_2483.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2483.fallback; - if (JSCompiler_object_inline_componentStack_2484) + JSCompiler_object_inline_message_2483 = + JSCompiler_object_inline_stack_2485.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2485.fallback; + if (JSCompiler_object_inline_componentStack_2486) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2483 = + (JSCompiler_object_inline_stack_2485 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2481, + JSCompiler_object_inline_message_2483, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2484 = + (JSCompiler_object_inline_componentStack_2486 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2484.memoizedState = + (JSCompiler_object_inline_componentStack_2486.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2484.childLanes = + (JSCompiler_object_inline_componentStack_2486.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2484, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9065,9 +9075,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2484.updateQueue), + JSCompiler_object_inline_componentStack_2486.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2484.updateQueue = + ? (JSCompiler_object_inline_componentStack_2486.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9075,46 +9085,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2485 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2483.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2485.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2483 = + (JSCompiler_object_inline_stack_2485 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2481, + JSCompiler_object_inline_message_2483, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2484 = + (JSCompiler_object_inline_componentStack_2486 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2484.memoizedState = + (JSCompiler_object_inline_componentStack_2486.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2484.childLanes = + (JSCompiler_object_inline_componentStack_2486.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2484, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2485 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2481 + JSCompiler_object_inline_message_2483 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2481 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2481) + ((JSCompiler_object_inline_message_2483 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2483) ) { if (didSuspend) workInProgress.flags & 256 @@ -9131,94 +9141,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2484 = - JSCompiler_object_inline_stack_2483.fallback), - (JSCompiler_object_inline_message_2481 = workInProgress.mode), - (JSCompiler_object_inline_stack_2483 = + (JSCompiler_object_inline_componentStack_2486 = + JSCompiler_object_inline_stack_2485.fallback), + (JSCompiler_object_inline_message_2483 = workInProgress.mode), + (JSCompiler_object_inline_stack_2485 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2483.children + children: JSCompiler_object_inline_stack_2485.children }, - JSCompiler_object_inline_message_2481 + JSCompiler_object_inline_message_2483 )), - (JSCompiler_object_inline_componentStack_2484 = + (JSCompiler_object_inline_componentStack_2486 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2484, - JSCompiler_object_inline_message_2481, + JSCompiler_object_inline_componentStack_2486, + JSCompiler_object_inline_message_2483, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2484.flags |= 2), - (JSCompiler_object_inline_stack_2483.return = workInProgress), - (JSCompiler_object_inline_componentStack_2484.return = + (JSCompiler_object_inline_componentStack_2486.flags |= 2), + (JSCompiler_object_inline_stack_2485.return = workInProgress), + (JSCompiler_object_inline_componentStack_2486.return = workInProgress), - (JSCompiler_object_inline_stack_2483.sibling = - JSCompiler_object_inline_componentStack_2484), - (workInProgress.child = JSCompiler_object_inline_stack_2483), + (JSCompiler_object_inline_stack_2485.sibling = + JSCompiler_object_inline_componentStack_2486), + (workInProgress.child = JSCompiler_object_inline_stack_2485), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2483 = workInProgress.child), - (JSCompiler_object_inline_stack_2483.memoizedState = + (JSCompiler_object_inline_stack_2485 = workInProgress.child), + (JSCompiler_object_inline_stack_2485.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2483.childLanes = + (JSCompiler_object_inline_stack_2485.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2484, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2484)); + JSCompiler_object_inline_componentStack_2486)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2481.data === + JSCompiler_object_inline_message_2483.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2482 = - JSCompiler_object_inline_message_2481.nextSibling && - JSCompiler_object_inline_message_2481.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2482) { - JSCompiler_temp = JSCompiler_object_inline_digest_2482.dgst; - var message = JSCompiler_object_inline_digest_2482.msg; - instance = JSCompiler_object_inline_digest_2482.stck; - var componentStack = JSCompiler_object_inline_digest_2482.cstck; + JSCompiler_object_inline_digest_2484 = + JSCompiler_object_inline_message_2483.nextSibling && + JSCompiler_object_inline_message_2483.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2484) { + JSCompiler_temp = JSCompiler_object_inline_digest_2484.dgst; + var message = JSCompiler_object_inline_digest_2484.msg; + instance = JSCompiler_object_inline_digest_2484.stck; + var componentStack = JSCompiler_object_inline_digest_2484.cstck; } - JSCompiler_object_inline_message_2481 = message; - JSCompiler_object_inline_digest_2482 = JSCompiler_temp; - JSCompiler_object_inline_stack_2483 = instance; - JSCompiler_object_inline_componentStack_2484 = componentStack; - JSCompiler_object_inline_message_2481 = - JSCompiler_object_inline_message_2481 - ? Error(JSCompiler_object_inline_message_2481) + JSCompiler_object_inline_message_2483 = message; + JSCompiler_object_inline_digest_2484 = JSCompiler_temp; + JSCompiler_object_inline_stack_2485 = instance; + JSCompiler_object_inline_componentStack_2486 = componentStack; + JSCompiler_object_inline_message_2483 = + JSCompiler_object_inline_message_2483 + ? Error(JSCompiler_object_inline_message_2483) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2481.stack = - JSCompiler_object_inline_stack_2483 || ""; - JSCompiler_object_inline_message_2481.digest = - JSCompiler_object_inline_digest_2482; - JSCompiler_object_inline_digest_2482 = - void 0 === JSCompiler_object_inline_componentStack_2484 + JSCompiler_object_inline_message_2483.stack = + JSCompiler_object_inline_stack_2485 || ""; + JSCompiler_object_inline_message_2483.digest = + JSCompiler_object_inline_digest_2484; + JSCompiler_object_inline_digest_2484 = + void 0 === JSCompiler_object_inline_componentStack_2486 ? null - : JSCompiler_object_inline_componentStack_2484; - "string" === typeof JSCompiler_object_inline_digest_2482 && + : JSCompiler_object_inline_componentStack_2486; + "string" === typeof JSCompiler_object_inline_digest_2484 && CapturedStacks.set( - JSCompiler_object_inline_message_2481, - JSCompiler_object_inline_digest_2482 + JSCompiler_object_inline_message_2483, + JSCompiler_object_inline_digest_2484 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2481, + value: JSCompiler_object_inline_message_2483, source: null, - stack: JSCompiler_object_inline_digest_2482 + stack: JSCompiler_object_inline_digest_2484 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9233,25 +9243,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2482 = + (JSCompiler_object_inline_digest_2484 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2482) + didReceiveUpdate || JSCompiler_object_inline_digest_2484) ) { - JSCompiler_object_inline_digest_2482 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2482) { - JSCompiler_object_inline_stack_2483 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2483 & 42)) - JSCompiler_object_inline_stack_2483 = 1; + JSCompiler_object_inline_digest_2484 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2484) { + JSCompiler_object_inline_stack_2485 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2485 & 42)) + JSCompiler_object_inline_stack_2485 = 1; else - switch (JSCompiler_object_inline_stack_2483) { + switch (JSCompiler_object_inline_stack_2485) { case 2: - JSCompiler_object_inline_stack_2483 = 1; + JSCompiler_object_inline_stack_2485 = 1; break; case 8: - JSCompiler_object_inline_stack_2483 = 4; + JSCompiler_object_inline_stack_2485 = 4; break; case 32: - JSCompiler_object_inline_stack_2483 = 16; + JSCompiler_object_inline_stack_2485 = 16; break; case 128: case 256: @@ -9272,40 +9282,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2483 = 64; + JSCompiler_object_inline_stack_2485 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2483 = 134217728; + JSCompiler_object_inline_stack_2485 = 134217728; break; default: - JSCompiler_object_inline_stack_2483 = 0; + JSCompiler_object_inline_stack_2485 = 0; } - JSCompiler_object_inline_stack_2483 = + JSCompiler_object_inline_stack_2485 = 0 !== - (JSCompiler_object_inline_stack_2483 & - (JSCompiler_object_inline_digest_2482.suspendedLanes | + (JSCompiler_object_inline_stack_2485 & + (JSCompiler_object_inline_digest_2484.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2483; + : JSCompiler_object_inline_stack_2485; if ( - 0 !== JSCompiler_object_inline_stack_2483 && - JSCompiler_object_inline_stack_2483 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2485 && + JSCompiler_object_inline_stack_2485 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2483), + ((prevState.retryLane = JSCompiler_object_inline_stack_2485), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2485 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2484, current, - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2485 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2481.data === + JSCompiler_object_inline_message_2483.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9313,7 +9323,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2481.data === + JSCompiler_object_inline_message_2483.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9321,12 +9331,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2481._reactRetry = + (JSCompiler_object_inline_message_2483._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2481.nextSibling + JSCompiler_object_inline_message_2483.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9344,57 +9354,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2483.children + JSCompiler_object_inline_stack_2485.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2484) + if (JSCompiler_object_inline_componentStack_2486) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2484 = - JSCompiler_object_inline_stack_2483.fallback), - (JSCompiler_object_inline_message_2481 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2486 = + JSCompiler_object_inline_stack_2485.fallback), + (JSCompiler_object_inline_message_2483 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2483 = createWorkInProgress( + (JSCompiler_object_inline_stack_2485 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2483.children + children: JSCompiler_object_inline_stack_2485.children } )), - (JSCompiler_object_inline_stack_2483.subtreeFlags = + (JSCompiler_object_inline_stack_2485.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2484 = + ? (JSCompiler_object_inline_componentStack_2486 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2484 + JSCompiler_object_inline_componentStack_2486 )) - : ((JSCompiler_object_inline_componentStack_2484 = + : ((JSCompiler_object_inline_componentStack_2486 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2484, - JSCompiler_object_inline_message_2481, + JSCompiler_object_inline_componentStack_2486, + JSCompiler_object_inline_message_2483, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2484.flags |= 2)), - (JSCompiler_object_inline_componentStack_2484.return = + (JSCompiler_object_inline_componentStack_2486.flags |= 2)), + (JSCompiler_object_inline_componentStack_2486.return = workInProgress), - (JSCompiler_object_inline_stack_2483.return = workInProgress), - (JSCompiler_object_inline_stack_2483.sibling = - JSCompiler_object_inline_componentStack_2484), - (workInProgress.child = JSCompiler_object_inline_stack_2483), - (JSCompiler_object_inline_stack_2483 = - JSCompiler_object_inline_componentStack_2484), - (JSCompiler_object_inline_componentStack_2484 = workInProgress.child), - (JSCompiler_object_inline_message_2481 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2481 - ? (JSCompiler_object_inline_message_2481 = + (JSCompiler_object_inline_stack_2485.return = workInProgress), + (JSCompiler_object_inline_stack_2485.sibling = + JSCompiler_object_inline_componentStack_2486), + (workInProgress.child = JSCompiler_object_inline_stack_2485), + (JSCompiler_object_inline_stack_2485 = + JSCompiler_object_inline_componentStack_2486), + (JSCompiler_object_inline_componentStack_2486 = workInProgress.child), + (JSCompiler_object_inline_message_2483 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2483 + ? (JSCompiler_object_inline_message_2483 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2481.cachePool), + JSCompiler_object_inline_message_2483.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9402,34 +9412,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2481 = { + (JSCompiler_object_inline_message_2483 = { baseLanes: - JSCompiler_object_inline_message_2481.baseLanes | renderLanes, + JSCompiler_object_inline_message_2483.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2484.memoizedState = - JSCompiler_object_inline_message_2481), + (JSCompiler_object_inline_componentStack_2486.memoizedState = + JSCompiler_object_inline_message_2483), enableTransitionTracing && - ((JSCompiler_object_inline_message_2481 = enableTransitionTracing + ((JSCompiler_object_inline_message_2483 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2481 && + null !== JSCompiler_object_inline_message_2483 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2484.updateQueue), + JSCompiler_object_inline_componentStack_2486.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2484.updateQueue = { - transitions: JSCompiler_object_inline_message_2481, + ? (JSCompiler_object_inline_componentStack_2486.updateQueue = { + transitions: JSCompiler_object_inline_message_2483, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2484.updateQueue = + ? (JSCompiler_object_inline_componentStack_2486.updateQueue = { - transitions: JSCompiler_object_inline_message_2481, + transitions: JSCompiler_object_inline_message_2483, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9437,32 +9447,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2481), + JSCompiler_object_inline_message_2483), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2484.childLanes = + (JSCompiler_object_inline_componentStack_2486.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2484, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2485 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2483.children + children: JSCompiler_object_inline_stack_2485.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2482 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2482 + ((JSCompiler_object_inline_digest_2484 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2484 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2482.push(current)); + : JSCompiler_object_inline_digest_2484.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -15290,7 +15300,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15348,7 +15358,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -15356,191 +15366,193 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (exitStatus === RootErrored) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - renderStartTime, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - renderStartTime, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + !workInProgressRootDidSkipSuspendedSiblings ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + renderStartTime, + 0 + ), + exitStatus + ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + renderStartTime, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -15589,7 +15601,12 @@ __DEV__ && completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -15656,20 +15673,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -15713,11 +15730,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -15839,7 +15852,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -15848,10 +15863,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -15873,37 +15888,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$38) { handleThrow(root, thrownValue$38); @@ -15914,16 +15938,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -15948,12 +15969,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -27229,11 +27248,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-13411e45-20241014" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-6c4bbc78-20241015" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-www-modern-13411e45-20241014\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-6c4bbc78-20241015\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27276,11 +27295,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-13411e45-20241014", + version: "19.0.0-www-modern-6c4bbc78-20241015", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-13411e45-20241014" + reconcilerVersion: "19.0.0-www-modern-6c4bbc78-20241015" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28051,5 +28070,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-13411e45-20241014"; + exports.version = "19.0.0-www-modern-6c4bbc78-20241015"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 8877b777dcf08..e8bfa678c88ab 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -676,6 +676,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -2068,7 +2076,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$27, root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); root$27 = root$27.next; @@ -2143,39 +2152,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -8860,7 +8868,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$221) { + } catch (e$226) { JSCompiler_temp = null; break a; } @@ -11012,12 +11020,12 @@ function findFiberRootForHostRoot(hostRoot) { a: { hostRoot = [hostRoot]; for (maybeFiber = 0; maybeFiber < hostRoot.length; ) { - var current$290 = hostRoot[maybeFiber++]; - if (current$290[internalContainerInstanceKey]) { - hostRoot = getInstanceFromNode(current$290); + var current$295 = hostRoot[maybeFiber++]; + if (current$295[internalContainerInstanceKey]) { + hostRoot = getInstanceFromNode(current$295); break a; } - hostRoot.push.apply(hostRoot, current$290.children); + hostRoot.push.apply(hostRoot, current$295.children); } hostRoot = null; } @@ -11313,7 +11321,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -11341,7 +11349,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -11354,175 +11362,172 @@ function scheduleUpdateOnFiber(root, fiber, lane) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if ((disableLegacyMode || 0 !== root$jscomp$0.tag) && 2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11571,7 +11576,7 @@ function commitRootWhenReady( completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11635,20 +11640,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$8 = 31 - clz32(lanes), lane = 1 << index$8; - didSkipSuspendedSiblings[index$8] = -1; + didAttemptEntireTree[index$8] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11705,9 +11710,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11796,7 +11799,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11805,10 +11810,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11817,6 +11822,7 @@ function renderRootSync(root, lanes) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11825,24 +11831,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$207) { - handleThrow(root, thrownValue$207); + } catch (thrownValue$212) { + handleThrow(root, thrownValue$212); } while (1); lanes && root.shellSuspendCounter++; @@ -11850,11 +11869,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11868,12 +11887,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11957,8 +11974,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$209) { - handleThrow(root, thrownValue$209); + } catch (thrownValue$214) { + handleThrow(root, thrownValue$214); } while (1); resetContextDependencies(); @@ -12312,7 +12329,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$216 = rootWithPendingPassiveEffects, + var root$221 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12327,7 +12344,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$216, remainingLanes); + releaseRootPooledCache(root$221, remainingLanes); } } return !1; @@ -13646,19 +13663,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$383; + var JSCompiler_inline_result$jscomp$388; if (canUseDOM) { - var isSupported$jscomp$inline_1590 = "oninput" in document; - if (!isSupported$jscomp$inline_1590) { - var element$jscomp$inline_1591 = document.createElement("div"); - element$jscomp$inline_1591.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1590 = - "function" === typeof element$jscomp$inline_1591.oninput; + var isSupported$jscomp$inline_1597 = "oninput" in document; + if (!isSupported$jscomp$inline_1597) { + var element$jscomp$inline_1598 = document.createElement("div"); + element$jscomp$inline_1598.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1597 = + "function" === typeof element$jscomp$inline_1598.oninput; } - JSCompiler_inline_result$jscomp$383 = isSupported$jscomp$inline_1590; - } else JSCompiler_inline_result$jscomp$383 = !1; + JSCompiler_inline_result$jscomp$388 = isSupported$jscomp$inline_1597; + } else JSCompiler_inline_result$jscomp$388 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$383 && + JSCompiler_inline_result$jscomp$388 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14069,20 +14086,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1631 = 0; - i$jscomp$inline_1631 < simpleEventPluginEvents.length; - i$jscomp$inline_1631++ + var i$jscomp$inline_1638 = 0; + i$jscomp$inline_1638 < simpleEventPluginEvents.length; + i$jscomp$inline_1638++ ) { - var eventName$jscomp$inline_1632 = - simpleEventPluginEvents[i$jscomp$inline_1631], - domEventName$jscomp$inline_1633 = - eventName$jscomp$inline_1632.toLowerCase(), - capitalizedEvent$jscomp$inline_1634 = - eventName$jscomp$inline_1632[0].toUpperCase() + - eventName$jscomp$inline_1632.slice(1); + var eventName$jscomp$inline_1639 = + simpleEventPluginEvents[i$jscomp$inline_1638], + domEventName$jscomp$inline_1640 = + eventName$jscomp$inline_1639.toLowerCase(), + capitalizedEvent$jscomp$inline_1641 = + eventName$jscomp$inline_1639[0].toUpperCase() + + eventName$jscomp$inline_1639.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1633, - "on" + capitalizedEvent$jscomp$inline_1634 + domEventName$jscomp$inline_1640, + "on" + capitalizedEvent$jscomp$inline_1641 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15375,34 +15392,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$235 = props[hasSrc]; - if (null != propValue$235) + var propValue$240 = props[hasSrc]; + if (null != propValue$240) switch (hasSrc) { case "name": - hasSrcSet = propValue$235; + hasSrcSet = propValue$240; break; case "type": - propValue = propValue$235; + propValue = propValue$240; break; case "checked": - checked = propValue$235; + checked = propValue$240; break; case "defaultChecked": - defaultChecked = propValue$235; + defaultChecked = propValue$240; break; case "value": - propKey = propValue$235; + propKey = propValue$240; break; case "defaultValue": - defaultValue = propValue$235; + defaultValue = propValue$240; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$235) + if (null != propValue$240) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$235, props, null); + setProp(domElement, tag, hasSrc, propValue$240, props, null); } } initInput( @@ -15539,14 +15556,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$235 in props) - props.hasOwnProperty(propValue$235) && - ((hasSrc = props[propValue$235]), + for (propValue$240 in props) + props.hasOwnProperty(propValue$240) && + ((hasSrc = props[propValue$240]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$235, + propValue$240, hasSrc, props, void 0 @@ -15594,14 +15611,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$252 in nextProps) { - var propKey = nextProps[propKey$252]; - lastProp = lastProps[propKey$252]; + for (var propKey$257 in nextProps) { + var propKey = nextProps[propKey$257]; + lastProp = lastProps[propKey$257]; if ( - nextProps.hasOwnProperty(propKey$252) && + nextProps.hasOwnProperty(propKey$257) && (null != propKey || null != lastProp) ) - switch (propKey$252) { + switch (propKey$257) { case "type": type = propKey; break; @@ -15630,7 +15647,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$252, + propKey$257, propKey, nextProps, lastProp @@ -15649,7 +15666,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$252 = null; + propKey = value = defaultValue = propKey$257 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15680,7 +15697,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$252 = type; + propKey$257 = type; break; case "defaultValue": defaultValue = type; @@ -15701,15 +15718,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$252 - ? updateOptions(domElement, !!lastProps, propKey$252, !1) + null != propKey$257 + ? updateOptions(domElement, !!lastProps, propKey$257, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$252 = null; + propKey = propKey$257 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15733,7 +15750,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$252 = name; + propKey$257 = name; break; case "defaultValue": propKey = name; @@ -15747,17 +15764,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$252, propKey); + updateTextarea(domElement, propKey$257, propKey); return; case "option": - for (var propKey$268 in lastProps) + for (var propKey$273 in lastProps) if ( - ((propKey$252 = lastProps[propKey$268]), - lastProps.hasOwnProperty(propKey$268) && - null != propKey$252 && - !nextProps.hasOwnProperty(propKey$268)) + ((propKey$257 = lastProps[propKey$273]), + lastProps.hasOwnProperty(propKey$273) && + null != propKey$257 && + !nextProps.hasOwnProperty(propKey$273)) ) - switch (propKey$268) { + switch (propKey$273) { case "selected": domElement.selected = !1; break; @@ -15765,33 +15782,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$268, + propKey$273, null, nextProps, - propKey$252 + propKey$257 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$252 = nextProps[lastDefaultValue]), + ((propKey$257 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$252 !== propKey && - (null != propKey$252 || null != propKey)) + propKey$257 !== propKey && + (null != propKey$257 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$252 && - "function" !== typeof propKey$252 && - "symbol" !== typeof propKey$252; + propKey$257 && + "function" !== typeof propKey$257 && + "symbol" !== typeof propKey$257; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$252, + propKey$257, nextProps, propKey ); @@ -15812,24 +15829,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$273 in lastProps) - (propKey$252 = lastProps[propKey$273]), - lastProps.hasOwnProperty(propKey$273) && - null != propKey$252 && - !nextProps.hasOwnProperty(propKey$273) && - setProp(domElement, tag, propKey$273, null, nextProps, propKey$252); + for (var propKey$278 in lastProps) + (propKey$257 = lastProps[propKey$278]), + lastProps.hasOwnProperty(propKey$278) && + null != propKey$257 && + !nextProps.hasOwnProperty(propKey$278) && + setProp(domElement, tag, propKey$278, null, nextProps, propKey$257); for (checked in nextProps) if ( - ((propKey$252 = nextProps[checked]), + ((propKey$257 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$252 !== propKey && - (null != propKey$252 || null != propKey)) + propKey$257 !== propKey && + (null != propKey$257 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$252) + if (null != propKey$257) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15837,7 +15854,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$252, + propKey$257, nextProps, propKey ); @@ -15845,49 +15862,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$278 in lastProps) - (propKey$252 = lastProps[propKey$278]), - lastProps.hasOwnProperty(propKey$278) && - void 0 !== propKey$252 && - !nextProps.hasOwnProperty(propKey$278) && + for (var propKey$283 in lastProps) + (propKey$257 = lastProps[propKey$283]), + lastProps.hasOwnProperty(propKey$283) && + void 0 !== propKey$257 && + !nextProps.hasOwnProperty(propKey$283) && setPropOnCustomElement( domElement, tag, - propKey$278, + propKey$283, void 0, nextProps, - propKey$252 + propKey$257 ); for (defaultChecked in nextProps) - (propKey$252 = nextProps[defaultChecked]), + (propKey$257 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$252 === propKey || - (void 0 === propKey$252 && void 0 === propKey) || + propKey$257 === propKey || + (void 0 === propKey$257 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$252, + propKey$257, nextProps, propKey ); return; } } - for (var propKey$283 in lastProps) - (propKey$252 = lastProps[propKey$283]), - lastProps.hasOwnProperty(propKey$283) && - null != propKey$252 && - !nextProps.hasOwnProperty(propKey$283) && - setProp(domElement, tag, propKey$283, null, nextProps, propKey$252); + for (var propKey$288 in lastProps) + (propKey$257 = lastProps[propKey$288]), + lastProps.hasOwnProperty(propKey$288) && + null != propKey$257 && + !nextProps.hasOwnProperty(propKey$288) && + setProp(domElement, tag, propKey$288, null, nextProps, propKey$257); for (lastProp in nextProps) - (propKey$252 = nextProps[lastProp]), + (propKey$257 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$252 === propKey || - (null == propKey$252 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$252, nextProps, propKey); + propKey$257 === propKey || + (null == propKey$257 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$257, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16539,26 +16556,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$292 = getResourcesFromRoot( + var styles$297 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$293 = styles$292.get(type); - resource$293 || + resource$298 = styles$297.get(type); + resource$298 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$293 = { + (resource$298 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$292.set(type, resource$293), - (styles$292 = JSCompiler_inline_result.querySelector( + styles$297.set(type, resource$298), + (styles$297 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$292._p && - ((resource$293.instance = styles$292), - (resource$293.state.loading = 5)), + !styles$297._p && + ((resource$298.instance = styles$297), + (resource$298.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16571,16 +16588,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$292 || + styles$297 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$293.state + resource$298.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$293; + return resource$298; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16677,37 +16694,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$298 = hoistableRoot.querySelector( + var instance$303 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$298) + if (instance$303) return ( (resource.state.loading |= 4), - (resource.instance = instance$298), - markNodeAsHoistable(instance$298), - instance$298 + (resource.instance = instance$303), + markNodeAsHoistable(instance$303), + instance$303 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$298 = ( + instance$303 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$298); - var linkInstance = instance$298; + markNodeAsHoistable(instance$303); + var linkInstance = instance$303; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$298, "link", instance); + setInitialProperties(instance$303, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$298, props.precedence, hoistableRoot); - return (resource.instance = instance$298); + insertStylesheet(instance$303, props.precedence, hoistableRoot); + return (resource.instance = instance$303); case "script": - instance$298 = getScriptKey(props.src); + instance$303 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$298) + getScriptSelectorFromKey(instance$303) )) ) return ( @@ -16716,7 +16733,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$298))) + if ((styleProps = preloadPropsMap.get(instance$303))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17748,16 +17765,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1804 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1811 = React.version; if ( - "19.0.0-www-classic-13411e45-20241014" !== - isomorphicReactPackageVersion$jscomp$inline_1804 + "19.0.0-www-classic-6c4bbc78-20241015" !== + isomorphicReactPackageVersion$jscomp$inline_1811 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1804, - "19.0.0-www-classic-13411e45-20241014" + isomorphicReactPackageVersion$jscomp$inline_1811, + "19.0.0-www-classic-6c4bbc78-20241015" ) ); function flushSyncFromReconciler(fn) { @@ -17800,25 +17817,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2322 = { +var internals$jscomp$inline_2329 = { bundleType: 0, - version: "19.0.0-www-classic-13411e45-20241014", + version: "19.0.0-www-classic-6c4bbc78-20241015", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-13411e45-20241014" + reconcilerVersion: "19.0.0-www-classic-6c4bbc78-20241015" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2323 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2330 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2323.isDisabled && - hook$jscomp$inline_2323.supportsFiber + !hook$jscomp$inline_2330.isDisabled && + hook$jscomp$inline_2330.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2323.inject( - internals$jscomp$inline_2322 + (rendererID = hook$jscomp$inline_2330.inject( + internals$jscomp$inline_2329 )), - (injectedHook = hook$jscomp$inline_2323); + (injectedHook = hook$jscomp$inline_2330); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17892,11 +17909,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$319); + var instance = getPublicRootInstance(root$324); originalCallback.call(instance); }; } - var root$319 = createHydrationContainer( + var root$324 = createHydrationContainer( initialChildren, callback, container, @@ -17911,23 +17928,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$319; - container[internalContainerInstanceKey] = root$319.current; + container._reactRootContainer = root$324; + container[internalContainerInstanceKey] = root$324.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSyncWork$1(); - return root$319; + return root$324; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$320 = callback; + var originalCallback$325 = callback; callback = function () { - var instance = getPublicRootInstance(root$321); - originalCallback$320.call(instance); + var instance = getPublicRootInstance(root$326); + originalCallback$325.call(instance); }; } - var root$321 = createFiberRoot( + var root$326 = createFiberRoot( container, 0, !1, @@ -17941,14 +17958,14 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$321; - container[internalContainerInstanceKey] = root$321.current; + container._reactRootContainer = root$326; + container[internalContainerInstanceKey] = root$326.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); - updateContainerSync(initialChildren, root$321, parentComponent, callback); + updateContainerSync(initialChildren, root$326, parentComponent, callback); flushSyncWork$1(); - return root$321; + return root$326; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -18413,4 +18430,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-13411e45-20241014"; +exports.version = "19.0.0-www-classic-6c4bbc78-20241015"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index b54795c7be799..236f3a93ec72c 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -607,6 +607,14 @@ function getNextLanes(root, wipLanes) { ? wipLanes : nextLanes; } +function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); +} function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1911,7 +1919,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$27, root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); root$27 = root$27.next; @@ -1986,39 +1995,38 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -8423,7 +8431,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$212) { + } catch (e$217) { JSCompiler_temp = null; break a; } @@ -10556,12 +10564,12 @@ function findFiberRootForHostRoot(hostRoot) { a: { hostRoot = [hostRoot]; for (maybeFiber = 0; maybeFiber < hostRoot.length; ) { - var current$281 = hostRoot[maybeFiber++]; - if (current$281[internalContainerInstanceKey]) { - hostRoot = getInstanceFromNode(current$281); + var current$286 = hostRoot[maybeFiber++]; + if (current$286[internalContainerInstanceKey]) { + hostRoot = getInstanceFromNode(current$286); break a; } - hostRoot.push.apply(hostRoot, current$281.children); + hostRoot.push.apply(hostRoot, current$286.children); } hostRoot = null; } @@ -10855,7 +10863,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -10882,179 +10890,179 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; + } + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -11103,7 +11111,7 @@ function commitRootWhenReady( completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11167,20 +11175,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$8 = 31 - clz32(lanes), lane = 1 << index$8; - didSkipSuspendedSiblings[index$8] = -1; + didAttemptEntireTree[index$8] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11224,9 +11232,7 @@ function prepareFreshStack(root, lanes) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11315,7 +11321,9 @@ function pushAsyncDispatcher() { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -11324,10 +11332,10 @@ function renderDidSuspendDelayIfPossible() { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } -function renderRootSync(root, lanes) { +function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -11336,6 +11344,7 @@ function renderRootSync(root, lanes) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11344,24 +11353,37 @@ function renderRootSync(root, lanes) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$198) { - handleThrow(root, thrownValue$198); + } catch (thrownValue$203) { + handleThrow(root, thrownValue$203); } while (1); lanes && root.shellSuspendCounter++; @@ -11369,11 +11391,11 @@ function renderRootSync(root, lanes) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11387,12 +11409,10 @@ function renderRootConcurrent(root, lanes) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -11476,8 +11496,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$200) { - handleThrow(root, thrownValue$200); + } catch (thrownValue$205) { + handleThrow(root, thrownValue$205); } while (1); resetContextDependencies(); @@ -11825,7 +11845,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$207 = rootWithPendingPassiveEffects, + var root$212 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11840,7 +11860,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$207, remainingLanes); + releaseRootPooledCache(root$212, remainingLanes); } } return !1; @@ -13065,19 +13085,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$370; + var JSCompiler_inline_result$jscomp$375; if (canUseDOM) { - var isSupported$jscomp$inline_1561 = "oninput" in document; - if (!isSupported$jscomp$inline_1561) { - var element$jscomp$inline_1562 = document.createElement("div"); - element$jscomp$inline_1562.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1561 = - "function" === typeof element$jscomp$inline_1562.oninput; + var isSupported$jscomp$inline_1568 = "oninput" in document; + if (!isSupported$jscomp$inline_1568) { + var element$jscomp$inline_1569 = document.createElement("div"); + element$jscomp$inline_1569.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1568 = + "function" === typeof element$jscomp$inline_1569.oninput; } - JSCompiler_inline_result$jscomp$370 = isSupported$jscomp$inline_1561; - } else JSCompiler_inline_result$jscomp$370 = !1; + JSCompiler_inline_result$jscomp$375 = isSupported$jscomp$inline_1568; + } else JSCompiler_inline_result$jscomp$375 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$370 && + JSCompiler_inline_result$jscomp$375 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13488,20 +13508,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1602 = 0; - i$jscomp$inline_1602 < simpleEventPluginEvents.length; - i$jscomp$inline_1602++ + var i$jscomp$inline_1609 = 0; + i$jscomp$inline_1609 < simpleEventPluginEvents.length; + i$jscomp$inline_1609++ ) { - var eventName$jscomp$inline_1603 = - simpleEventPluginEvents[i$jscomp$inline_1602], - domEventName$jscomp$inline_1604 = - eventName$jscomp$inline_1603.toLowerCase(), - capitalizedEvent$jscomp$inline_1605 = - eventName$jscomp$inline_1603[0].toUpperCase() + - eventName$jscomp$inline_1603.slice(1); + var eventName$jscomp$inline_1610 = + simpleEventPluginEvents[i$jscomp$inline_1609], + domEventName$jscomp$inline_1611 = + eventName$jscomp$inline_1610.toLowerCase(), + capitalizedEvent$jscomp$inline_1612 = + eventName$jscomp$inline_1610[0].toUpperCase() + + eventName$jscomp$inline_1610.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1604, - "on" + capitalizedEvent$jscomp$inline_1605 + domEventName$jscomp$inline_1611, + "on" + capitalizedEvent$jscomp$inline_1612 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14790,34 +14810,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$226 = props[hasSrc]; - if (null != propValue$226) + var propValue$231 = props[hasSrc]; + if (null != propValue$231) switch (hasSrc) { case "name": - hasSrcSet = propValue$226; + hasSrcSet = propValue$231; break; case "type": - propKey = propValue$226; + propKey = propValue$231; break; case "checked": - checked = propValue$226; + checked = propValue$231; break; case "defaultChecked": - defaultChecked = propValue$226; + defaultChecked = propValue$231; break; case "value": - propValue = propValue$226; + propValue = propValue$231; break; case "defaultValue": - defaultValue = propValue$226; + defaultValue = propValue$231; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$226) + if (null != propValue$231) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$226, props, null); + setProp(domElement, tag, hasSrc, propValue$231, props, null); } } initInput( @@ -14953,14 +14973,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$226 in props) - props.hasOwnProperty(propValue$226) && - ((hasSrc = props[propValue$226]), + for (propValue$231 in props) + props.hasOwnProperty(propValue$231) && + ((hasSrc = props[propValue$231]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$226, + propValue$231, hasSrc, props, void 0 @@ -15008,14 +15028,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$243 in nextProps) { - var propKey = nextProps[propKey$243]; - lastProp = lastProps[propKey$243]; + for (var propKey$248 in nextProps) { + var propKey = nextProps[propKey$248]; + lastProp = lastProps[propKey$248]; if ( - nextProps.hasOwnProperty(propKey$243) && + nextProps.hasOwnProperty(propKey$248) && (null != propKey || null != lastProp) ) - switch (propKey$243) { + switch (propKey$248) { case "type": type = propKey; break; @@ -15044,7 +15064,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$243, + propKey$248, propKey, nextProps, lastProp @@ -15063,7 +15083,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$243 = null; + propKey = value = defaultValue = propKey$248 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15094,7 +15114,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$243 = type; + propKey$248 = type; break; case "defaultValue": defaultValue = type; @@ -15115,15 +15135,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$243 - ? updateOptions(domElement, !!lastProps, propKey$243, !1) + null != propKey$248 + ? updateOptions(domElement, !!lastProps, propKey$248, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$243 = null; + propKey = propKey$248 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15147,7 +15167,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$243 = name; + propKey$248 = name; break; case "defaultValue": propKey = name; @@ -15161,17 +15181,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$243, propKey); + updateTextarea(domElement, propKey$248, propKey); return; case "option": - for (var propKey$259 in lastProps) + for (var propKey$264 in lastProps) if ( - ((propKey$243 = lastProps[propKey$259]), - lastProps.hasOwnProperty(propKey$259) && - null != propKey$243 && - !nextProps.hasOwnProperty(propKey$259)) + ((propKey$248 = lastProps[propKey$264]), + lastProps.hasOwnProperty(propKey$264) && + null != propKey$248 && + !nextProps.hasOwnProperty(propKey$264)) ) - switch (propKey$259) { + switch (propKey$264) { case "selected": domElement.selected = !1; break; @@ -15179,33 +15199,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$259, + propKey$264, null, nextProps, - propKey$243 + propKey$248 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$243 = nextProps[lastDefaultValue]), + ((propKey$248 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$243 !== propKey && - (null != propKey$243 || null != propKey)) + propKey$248 !== propKey && + (null != propKey$248 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$243 && - "function" !== typeof propKey$243 && - "symbol" !== typeof propKey$243; + propKey$248 && + "function" !== typeof propKey$248 && + "symbol" !== typeof propKey$248; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$243, + propKey$248, nextProps, propKey ); @@ -15226,24 +15246,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$264 in lastProps) - (propKey$243 = lastProps[propKey$264]), - lastProps.hasOwnProperty(propKey$264) && - null != propKey$243 && - !nextProps.hasOwnProperty(propKey$264) && - setProp(domElement, tag, propKey$264, null, nextProps, propKey$243); + for (var propKey$269 in lastProps) + (propKey$248 = lastProps[propKey$269]), + lastProps.hasOwnProperty(propKey$269) && + null != propKey$248 && + !nextProps.hasOwnProperty(propKey$269) && + setProp(domElement, tag, propKey$269, null, nextProps, propKey$248); for (checked in nextProps) if ( - ((propKey$243 = nextProps[checked]), + ((propKey$248 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$243 !== propKey && - (null != propKey$243 || null != propKey)) + propKey$248 !== propKey && + (null != propKey$248 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$243) + if (null != propKey$248) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15251,7 +15271,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$243, + propKey$248, nextProps, propKey ); @@ -15259,49 +15279,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$269 in lastProps) - (propKey$243 = lastProps[propKey$269]), - lastProps.hasOwnProperty(propKey$269) && - void 0 !== propKey$243 && - !nextProps.hasOwnProperty(propKey$269) && + for (var propKey$274 in lastProps) + (propKey$248 = lastProps[propKey$274]), + lastProps.hasOwnProperty(propKey$274) && + void 0 !== propKey$248 && + !nextProps.hasOwnProperty(propKey$274) && setPropOnCustomElement( domElement, tag, - propKey$269, + propKey$274, void 0, nextProps, - propKey$243 + propKey$248 ); for (defaultChecked in nextProps) - (propKey$243 = nextProps[defaultChecked]), + (propKey$248 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$243 === propKey || - (void 0 === propKey$243 && void 0 === propKey) || + propKey$248 === propKey || + (void 0 === propKey$248 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$243, + propKey$248, nextProps, propKey ); return; } } - for (var propKey$274 in lastProps) - (propKey$243 = lastProps[propKey$274]), - lastProps.hasOwnProperty(propKey$274) && - null != propKey$243 && - !nextProps.hasOwnProperty(propKey$274) && - setProp(domElement, tag, propKey$274, null, nextProps, propKey$243); + for (var propKey$279 in lastProps) + (propKey$248 = lastProps[propKey$279]), + lastProps.hasOwnProperty(propKey$279) && + null != propKey$248 && + !nextProps.hasOwnProperty(propKey$279) && + setProp(domElement, tag, propKey$279, null, nextProps, propKey$248); for (lastProp in nextProps) - (propKey$243 = nextProps[lastProp]), + (propKey$248 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$243 === propKey || - (null == propKey$243 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$243, nextProps, propKey); + propKey$248 === propKey || + (null == propKey$248 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$248, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15936,26 +15956,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$283 = getResourcesFromRoot( + var styles$288 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$284 = styles$283.get(type); - resource$284 || + resource$289 = styles$288.get(type); + resource$289 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$284 = { + (resource$289 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$283.set(type, resource$284), - (styles$283 = JSCompiler_inline_result.querySelector( + styles$288.set(type, resource$289), + (styles$288 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$283._p && - ((resource$284.instance = styles$283), - (resource$284.state.loading = 5)), + !styles$288._p && + ((resource$289.instance = styles$288), + (resource$289.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15968,16 +15988,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$283 || + styles$288 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$284.state + resource$289.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$284; + return resource$289; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16074,37 +16094,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$289 = hoistableRoot.querySelector( + var instance$294 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$289) + if (instance$294) return ( (resource.state.loading |= 4), - (resource.instance = instance$289), - markNodeAsHoistable(instance$289), - instance$289 + (resource.instance = instance$294), + markNodeAsHoistable(instance$294), + instance$294 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$289 = ( + instance$294 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$289); - var linkInstance = instance$289; + markNodeAsHoistable(instance$294); + var linkInstance = instance$294; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$289, "link", instance); + setInitialProperties(instance$294, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$289, props.precedence, hoistableRoot); - return (resource.instance = instance$289); + insertStylesheet(instance$294, props.precedence, hoistableRoot); + return (resource.instance = instance$294); case "script": - instance$289 = getScriptKey(props.src); + instance$294 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$289) + getScriptSelectorFromKey(instance$294) )) ) return ( @@ -16113,7 +16133,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$289))) + if ((styleProps = preloadPropsMap.get(instance$294))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17116,16 +17136,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1775 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1782 = React.version; if ( - "19.0.0-www-modern-13411e45-20241014" !== - isomorphicReactPackageVersion$jscomp$inline_1775 + "19.0.0-www-modern-6c4bbc78-20241015" !== + isomorphicReactPackageVersion$jscomp$inline_1782 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1775, - "19.0.0-www-modern-13411e45-20241014" + isomorphicReactPackageVersion$jscomp$inline_1782, + "19.0.0-www-modern-6c4bbc78-20241015" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17141,25 +17161,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2314 = { +var internals$jscomp$inline_2321 = { bundleType: 0, - version: "19.0.0-www-modern-13411e45-20241014", + version: "19.0.0-www-modern-6c4bbc78-20241015", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-13411e45-20241014" + reconcilerVersion: "19.0.0-www-modern-6c4bbc78-20241015" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2315 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2322 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2315.isDisabled && - hook$jscomp$inline_2315.supportsFiber + !hook$jscomp$inline_2322.isDisabled && + hook$jscomp$inline_2322.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2315.inject( - internals$jscomp$inline_2314 + (rendererID = hook$jscomp$inline_2322.inject( + internals$jscomp$inline_2321 )), - (injectedHook = hook$jscomp$inline_2315); + (injectedHook = hook$jscomp$inline_2322); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17661,4 +17681,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-13411e45-20241014"; +exports.version = "19.0.0-www-modern-6c4bbc78-20241015"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index 9095584ba587d..a40b9d66aad66 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -959,6 +959,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -2279,7 +2287,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -2356,45 +2365,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -13949,7 +13959,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -14008,7 +14018,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -14023,195 +14033,197 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root.tag) && - exitStatus === RootErrored - ) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - supportsHydration && - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if ( + (disableLegacyMode || 0 !== root.tag) && + exitStatus === RootErrored + ) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + supportsHydration && + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - -0, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + -0, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + !workInProgressRootDidSkipSuspendedSiblings + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -14260,7 +14272,12 @@ __DEV__ && completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -14327,20 +14344,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -14384,11 +14401,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -14510,7 +14523,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -14519,10 +14534,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -14544,37 +14559,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$40) { handleThrow(root, thrownValue$40); @@ -14585,16 +14609,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -14619,12 +14640,10 @@ __DEV__ && resetRenderTimer(); prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -19228,7 +19247,7 @@ __DEV__ && rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-13411e45-20241014" + reconcilerVersion: "19.0.0-www-classic-6c4bbc78-20241015" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index f556c267a5b94..15ec1abb0736c 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -862,6 +862,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -2178,7 +2186,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -2255,45 +2264,46 @@ __DEV__ && (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && cancelCallback(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode$1) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode$1)) + : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + null !== pingedLanes && cancelCallback(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -13472,7 +13482,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -13530,7 +13540,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -13538,192 +13548,194 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (exitStatus === RootErrored) { - renderWasConcurrent = lanes; - if (root.errorRecoveryDisabledLanes & renderWasConcurrent) - var errorRetryLanes = 0; - else - (errorRetryLanes = root.pendingLanes & -536870913), - (errorRetryLanes = - 0 !== errorRetryLanes - ? errorRetryLanes - : errorRetryLanes & 536870912 - ? 536870912 - : 0); - if (0 !== errorRetryLanes) { - lanes = errorRetryLanes; - a: { - exitStatus = root; - var errorRetryLanes$jscomp$0 = errorRetryLanes; - errorRetryLanes = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - supportsHydration && - exitStatus.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack( - exitStatus, - errorRetryLanes$jscomp$0 - ).flags |= 256); - errorRetryLanes$jscomp$0 = renderRootSync( + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + (enableSiblingPrerendering && checkIfRootIsPrerendering(root, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root, lanes, 0, !1); + break; + } else if (exitStatus === RootDidNotComplete) + markRootSuspended( + root, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + renderWasConcurrent = lanes; + if (root.errorRecoveryDisabledLanes & renderWasConcurrent) + var errorRetryLanes = 0; + else + (errorRetryLanes = root.pendingLanes & -536870913), + (errorRetryLanes = + 0 !== errorRetryLanes + ? errorRetryLanes + : errorRetryLanes & 536870912 + ? 536870912 + : 0); + if (0 !== errorRetryLanes) { + lanes = errorRetryLanes; + a: { + exitStatus = root; + var errorRetryLanes$jscomp$0 = errorRetryLanes; + errorRetryLanes = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + supportsHydration && + exitStatus.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack( exitStatus, errorRetryLanes$jscomp$0 - ); - if (errorRetryLanes$jscomp$0 !== RootErrored) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - exitStatus.errorRecoveryDisabledLanes |= - renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + ).flags |= 256); + errorRetryLanes$jscomp$0 = renderRootSync( + exitStatus, + errorRetryLanes$jscomp$0, + !1 + ); + if (errorRetryLanes$jscomp$0 !== RootErrored) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + exitStatus.errorRecoveryDisabledLanes |= + renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = errorRetryLanes$jscomp$0; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = errorRetryLanes; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = errorRetryLanes$jscomp$0; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended( - root, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) - commitRoot( - renderWasConcurrent, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - IMMEDIATE_COMMIT, - -0, - 0 - ); - else { - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || exitStatus === RootSuspended) && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus + !workInProgressRootDidSkipSuspendedSiblings ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + IMMEDIATE_COMMIT, + -0, + 0 + ); + else { + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + !workInProgressRootDidSkipSuspendedSiblings ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus + ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -13772,7 +13784,12 @@ __DEV__ && completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -13839,20 +13856,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index = 31 - clz32(lanes), lane = 1 << index; - didSkipSuspendedSiblings[index] = -1; + didAttemptEntireTree[index] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -13896,11 +13913,7 @@ __DEV__ && workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = @@ -14022,7 +14035,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -14031,10 +14046,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -14056,37 +14071,46 @@ __DEV__ && enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); lanes = !1; + memoizedUpdaters = workInProgressRootExitStatus; a: do try { if ( workInProgressSuspendedReason !== NotSuspended && null !== workInProgress ) { - memoizedUpdaters = workInProgress; - var thrownValue = workInProgressThrownValue; + var unitOfWork = workInProgress, + thrownValue = workInProgressThrownValue; switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + memoizedUpdaters = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - throwAndUnwindWorkLoop( - root, - memoizedUpdaters, - thrownValue, - reason - ); + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + memoizedUpdaters = RootInProgress; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + memoizedUpdaters = workInProgressRootExitStatus; break; } catch (thrownValue$40) { handleThrow(root, thrownValue$40); @@ -14097,16 +14121,13 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); enableDebugTracing && enableDebugTracing && groupEnd(); enableSchedulingProfiler && markRenderStopped(); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return memoizedUpdaters; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -14131,12 +14152,10 @@ __DEV__ && workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS; prepareFreshStack(root, lanes); } else - workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + ); enableDebugTracing && logRenderStarted(lanes); enableSchedulingProfiler && markRenderStarted(lanes); a: do @@ -18619,7 +18638,7 @@ __DEV__ && rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-13411e45-20241014" + reconcilerVersion: "19.0.0-www-modern-6c4bbc78-20241015" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index cb83bf9755a52..5f750797d7893 100644 --- a/compiled/facebook-www/ReactReconciler-prod.classic.js +++ b/compiled/facebook-www/ReactReconciler-prod.classic.js @@ -667,6 +667,14 @@ module.exports = function ($$$config) { ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1137,7 +1145,8 @@ module.exports = function ($$$config) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -1212,39 +1221,40 @@ module.exports = function ($$$config) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && + null !== pingedLanes && + cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -9957,7 +9967,7 @@ module.exports = function ($$$config) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -9985,7 +9995,7 @@ module.exports = function ($$$config) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); 2 !== lane || @@ -9998,176 +10008,178 @@ module.exports = function ($$$config) { } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if ( - (disableLegacyMode || 0 !== root$jscomp$0.tag) && - 2 === exitStatus - ) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if ( + (disableLegacyMode || 0 !== root$jscomp$0.tag) && + 2 === exitStatus + ) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = + root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - supportsHydration && root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + supportsHydration && root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= + 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -10216,7 +10228,7 @@ module.exports = function ($$$config) { completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -10280,20 +10292,20 @@ module.exports = function ($$$config) { root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$7 = 31 - clz32(lanes), lane = 1 << index$7; - didSkipSuspendedSiblings[index$7] = -1; + didAttemptEntireTree[index$7] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -10337,9 +10349,7 @@ module.exports = function ($$$config) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -10428,7 +10438,9 @@ module.exports = function ($$$config) { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -10437,10 +10449,10 @@ module.exports = function ($$$config) { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -10449,6 +10461,7 @@ module.exports = function ($$$config) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -10457,24 +10470,37 @@ module.exports = function ($$$config) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$189) { - handleThrow(root, thrownValue$189); + } catch (thrownValue$194) { + handleThrow(root, thrownValue$194); } while (1); lanes && root.shellSuspendCounter++; @@ -10482,11 +10508,11 @@ module.exports = function ($$$config) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -10500,12 +10526,10 @@ module.exports = function ($$$config) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), resetRenderTimer(), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -10595,8 +10619,8 @@ module.exports = function ($$$config) { } workLoopConcurrent(); break; - } catch (thrownValue$191) { - handleThrow(root, thrownValue$191); + } catch (thrownValue$196) { + handleThrow(root, thrownValue$196); } while (1); resetContextDependencies(); @@ -12863,7 +12887,7 @@ module.exports = function ($$$config) { rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-13411e45-20241014" + reconcilerVersion: "19.0.0-www-classic-6c4bbc78-20241015" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js index ca8c3d2c81b2f..367104c901661 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -526,6 +526,14 @@ module.exports = function ($$$config) { ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -996,7 +1004,8 @@ module.exports = function ($$$config) { root, root === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, JSCompiler_inline_result)); root = root.next; @@ -1071,39 +1080,40 @@ module.exports = function ($$$config) { (root.callbackNode = null), (root.callbackPriority = 0) ); - if (0 !== (suspendedLanes & 3)) - return ( - null !== pingedLanes && - null !== pingedLanes && - cancelCallback$1(pingedLanes), - (root.callbackPriority = 2), - (root.callbackNode = null), - 2 - ); - currentTime = suspendedLanes & -suspendedLanes; - if (currentTime === root.callbackPriority) return currentTime; - null !== pingedLanes && cancelCallback$1(pingedLanes); - switch (lanesToEventPriority(suspendedLanes)) { - case 2: - suspendedLanes = ImmediatePriority; - break; - case 8: - suspendedLanes = UserBlockingPriority; - break; - case 32: - suspendedLanes = NormalPriority$1; - break; - case 268435456: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; + if ( + 0 === (suspendedLanes & 3) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root, suspendedLanes)) + ) { + currentTime = suspendedLanes & -suspendedLanes; + if (currentTime === root.callbackPriority) return currentTime; + null !== pingedLanes && cancelCallback$1(pingedLanes); + switch (lanesToEventPriority(suspendedLanes)) { + case 2: + case 8: + suspendedLanes = UserBlockingPriority; + break; + case 32: + suspendedLanes = NormalPriority$1; + break; + case 268435456: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; + } + null !== pingedLanes && + null !== pingedLanes && + cancelCallback$1(pingedLanes); + root.callbackPriority = 2; + root.callbackNode = null; + return 2; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { var originalCallbackNode = root.callbackNode; @@ -9522,7 +9532,7 @@ module.exports = function ($$$config) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -9549,180 +9559,182 @@ module.exports = function ($$$config) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } } function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var exitStatus = (forceSync = - !forceSync && - 0 === (lanes & 60) && - 0 === (lanes & root$jscomp$0.expiredLanes)) - ? renderRootConcurrent(root$jscomp$0, lanes) - : renderRootSync(root$jscomp$0, lanes); - if (0 !== exitStatus) { - var renderWasConcurrent = forceSync; - do { - if (6 === exitStatus) - markRootSuspended( - root$jscomp$0, - lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings - ); - else { - forceSync = root$jscomp$0.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root$jscomp$0, lanes); - renderWasConcurrent = !1; - continue; - } - if (2 === exitStatus) { - renderWasConcurrent = lanes; - if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) - var JSCompiler_inline_result = 0; - else + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root$jscomp$0.expiredLanes)) || + (enableSiblingPrerendering && + checkIfRootIsPrerendering(root$jscomp$0, lanes)), + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root$jscomp$0, lanes) + : renderRootSync(root$jscomp$0, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (0 === exitStatus) { + enableSiblingPrerendering && + workInProgressRootIsPrerendering && + !shouldTimeSlice && + markRootSuspended(root$jscomp$0, lanes, 0, !1); + break; + } else if (6 === exitStatus) + markRootSuspended( + root$jscomp$0, + lanes, + 0, + !workInProgressRootDidSkipSuspendedSiblings + ); + else { + forceSync = root$jscomp$0.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root$jscomp$0, lanes, !1); + continue; + } + if (2 === exitStatus) { + renderWasConcurrent = lanes; + if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent) + var JSCompiler_inline_result = 0; + else + (JSCompiler_inline_result = + root$jscomp$0.pendingLanes & -536870913), (JSCompiler_inline_result = - root$jscomp$0.pendingLanes & -536870913), - (JSCompiler_inline_result = - 0 !== JSCompiler_inline_result - ? JSCompiler_inline_result - : JSCompiler_inline_result & 536870912 - ? 536870912 - : 0); - if (0 !== JSCompiler_inline_result) { - lanes = JSCompiler_inline_result; - a: { - var root = root$jscomp$0; - exitStatus = workInProgressRootConcurrentErrors; - var wasRootDehydrated = - supportsHydration && root.current.memoizedState.isDehydrated; - wasRootDehydrated && - (prepareFreshStack(root, JSCompiler_inline_result).flags |= - 256); - JSCompiler_inline_result = renderRootSync( - root, - JSCompiler_inline_result - ); - if (2 !== JSCompiler_inline_result) { - if ( - workInProgressRootDidAttachPingListener && - !wasRootDehydrated - ) { - root.errorRecoveryDisabledLanes |= renderWasConcurrent; - workInProgressRootInterleavedUpdatedLanes |= - renderWasConcurrent; - exitStatus = 4; - break a; - } - renderWasConcurrent = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = exitStatus; - null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + 0 !== JSCompiler_inline_result + ? JSCompiler_inline_result + : JSCompiler_inline_result & 536870912 + ? 536870912 + : 0); + if (0 !== JSCompiler_inline_result) { + lanes = JSCompiler_inline_result; + a: { + var root = root$jscomp$0; + exitStatus = workInProgressRootConcurrentErrors; + var wasRootDehydrated = + supportsHydration && root.current.memoizedState.isDehydrated; + wasRootDehydrated && + (prepareFreshStack(root, JSCompiler_inline_result).flags |= + 256); + JSCompiler_inline_result = renderRootSync( + root, + JSCompiler_inline_result, + !1 + ); + if (2 !== JSCompiler_inline_result) { + if ( + workInProgressRootDidAttachPingListener && + !wasRootDehydrated + ) { + root.errorRecoveryDisabledLanes |= renderWasConcurrent; + workInProgressRootInterleavedUpdatedLanes |= + renderWasConcurrent; + exitStatus = 4; + break a; } - exitStatus = JSCompiler_inline_result; + renderWasConcurrent = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = exitStatus; + null !== renderWasConcurrent && + queueRecoverableErrors(renderWasConcurrent); } - renderWasConcurrent = !1; - if (2 !== exitStatus) continue; + exitStatus = JSCompiler_inline_result; } + if (2 !== exitStatus) continue; } - if (1 === exitStatus) { - prepareFreshStack(root$jscomp$0, 0); + } + if (1 === exitStatus) { + prepareFreshStack(root$jscomp$0, 0); + markRootSuspended(root$jscomp$0, lanes, 0, !0); + break; + } + a: { + shouldTimeSlice = root$jscomp$0; + renderWasConcurrent = exitStatus; + switch (renderWasConcurrent) { + case 0: + case 1: + throw Error(formatProdErrorMessage(345)); + case 4: + if ((lanes & 4194176) === lanes) { + markRootSuspended( + shouldTimeSlice, + lanes, + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings + ); + break a; + } + break; + case 2: + workInProgressRootRecoverableErrors = null; + break; + case 3: + case 5: + break; + default: + throw Error(formatProdErrorMessage(329)); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if ( + (lanes & 62914560) === lanes && + (alwaysThrottleRetries || 3 === renderWasConcurrent) && + ((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()), + 10 < renderWasConcurrent) + ) { markRootSuspended( - root$jscomp$0, + shouldTimeSlice, lanes, - 0, - workInProgressRootDidSkipSuspendedSiblings + workInProgressDeferredLane, + !workInProgressRootDidSkipSuspendedSiblings ); - break; - } - a: { - renderWasConcurrent = root$jscomp$0; - switch (exitStatus) { - case 0: - case 1: - throw Error(formatProdErrorMessage(345)); - case 4: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - break a; - } - break; - case 2: - workInProgressRootRecoverableErrors = null; - break; - case 3: - case 5: - break; - default: - throw Error(formatProdErrorMessage(329)); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if ( - (lanes & 62914560) === lanes && - (alwaysThrottleRetries || 3 === exitStatus) && - ((exitStatus = globalMostRecentFallbackTime + 300 - now()), - 10 < exitStatus) - ) { - markRootSuspended( - renderWasConcurrent, + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings - ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 2, - -0, - 0 - ), - exitStatus - ); - break a; - } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - 0, - -0, - 0 + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 2, + -0, + 0 + ), + renderWasConcurrent ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + 0, + -0, + 0 + ); } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root$jscomp$0); } function queueRecoverableErrors(errors) { @@ -9771,7 +9783,7 @@ module.exports = function ($$$config) { completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -9835,20 +9847,20 @@ module.exports = function ($$$config) { root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + didAttemptEntireTree = root.expirationTimes; for (var lanes = suspendedLanes; 0 < lanes; ) { var index$7 = 31 - clz32(lanes), lane = 1 << index$7; - didSkipSuspendedSiblings[index$7] = -1; + didAttemptEntireTree[index$7] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -9892,9 +9904,7 @@ module.exports = function ($$$config) { workInProgressSuspendedReason = 0; workInProgressThrownValue = null; workInProgressRootDidSkipSuspendedSiblings = !1; - workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & lanes); + workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes); workInProgressRootDidAttachPingListener = !1; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -9983,7 +9993,9 @@ module.exports = function ($$$config) { function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = 4; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -9992,10 +10004,10 @@ module.exports = function ($$$config) { workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= 2; var prevDispatcher = pushDispatcher(), @@ -10004,6 +10016,7 @@ module.exports = function ($$$config) { (workInProgressTransitions = getTransitionsForLanes(root, lanes)), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -10012,24 +10025,37 @@ module.exports = function ($$$config) { switch (workInProgressSuspendedReason) { case 8: resetWorkInProgressStack(); - workInProgressRootExitStatus = 6; + exitStatus = 6; break a; case 3: case 2: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case 6: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = 0; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + if ( + enableSiblingPrerendering && + shouldYieldForPrerendering && + workInProgressRootIsPrerendering + ) { + exitStatus = 0; + break a; + } + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = 0), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$180) { - handleThrow(root, thrownValue$180); + } catch (thrownValue$185) { + handleThrow(root, thrownValue$185); } while (1); lanes && root.shellSuspendCounter++; @@ -10037,11 +10063,11 @@ module.exports = function ($$$config) { executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -10055,12 +10081,10 @@ module.exports = function ($$$config) { ? ((workInProgressTransitions = getTransitionsForLanes(root, lanes)), (workInProgressRootRenderTargetTime = now() + 500), prepareFreshStack(root, lanes)) - : workInProgressRootIsPrerendering && - (workInProgressRootIsPrerendering = - 0 === - (root.pendingLanes & - ~(root.suspendedLanes & ~root.pingedLanes) & - lanes)); + : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering( + root, + lanes + )); a: do try { if (0 !== workInProgressSuspendedReason && null !== workInProgress) { @@ -10150,8 +10174,8 @@ module.exports = function ($$$config) { } workLoopConcurrent(); break; - } catch (thrownValue$182) { - handleThrow(root, thrownValue$182); + } catch (thrownValue$187) { + handleThrow(root, thrownValue$187); } while (1); resetContextDependencies(); @@ -12353,7 +12377,7 @@ module.exports = function ($$$config) { rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-13411e45-20241014" + reconcilerVersion: "19.0.0-www-modern-6c4bbc78-20241015" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index a569e2f568a7b..cbde5482c4725 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -830,6 +830,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1857,7 +1865,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -1942,8 +1951,6 @@ __DEV__ && else return currentTime; switch (lanesToEventPriority(suspendedLanes)) { case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; case ContinuousEventPriority: suspendedLanes = UserBlockingPriority; break; @@ -10770,187 +10777,187 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended(root, lanes, 0); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (exitStatus === RootErrored) { - var lanesThatJustErrored = lanes; - root.errorRecoveryDisabledLanes & lanesThatJustErrored - ? (renderWasConcurrent = 0) - : ((renderWasConcurrent = root.pendingLanes & -536870913), - (renderWasConcurrent = - 0 !== renderWasConcurrent - ? renderWasConcurrent - : renderWasConcurrent & 536870912 - ? 536870912 - : 0)); - if (0 !== renderWasConcurrent) { - lanes = renderWasConcurrent; - a: { - exitStatus = root; - var originallyAttemptedLanes = lanesThatJustErrored; - lanesThatJustErrored = workInProgressRootConcurrentErrors; - renderWasConcurrent = renderRootSync( - exitStatus, - renderWasConcurrent - ); - if (renderWasConcurrent !== RootErrored) { - if (workInProgressRootDidAttachPingListener) { - exitStatus.errorRecoveryDisabledLanes |= - originallyAttemptedLanes; - workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) break; + else if (exitStatus === RootDidNotComplete) + markRootSuspended(root, lanes, 0); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + var lanesThatJustErrored = lanes; + root.errorRecoveryDisabledLanes & lanesThatJustErrored + ? (renderWasConcurrent = 0) + : ((renderWasConcurrent = root.pendingLanes & -536870913), + (renderWasConcurrent = + 0 !== renderWasConcurrent + ? renderWasConcurrent + : renderWasConcurrent & 536870912 + ? 536870912 + : 0)); + if (0 !== renderWasConcurrent) { + lanes = renderWasConcurrent; + a: { + exitStatus = root; + var originallyAttemptedLanes = lanesThatJustErrored; + lanesThatJustErrored = workInProgressRootConcurrentErrors; + renderWasConcurrent = renderRootSync( + exitStatus, + renderWasConcurrent, + !1 + ); + if (renderWasConcurrent !== RootErrored) { + if (workInProgressRootDidAttachPingListener) { + exitStatus.errorRecoveryDisabledLanes |= + originallyAttemptedLanes; + workInProgressRootInterleavedUpdatedLanes |= + originallyAttemptedLanes; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = renderWasConcurrent; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = lanesThatJustErrored; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = renderWasConcurrent; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) { - lanes = renderWasConcurrent; - forceSync = workInProgressRootRecoverableErrors; - exitStatus = workInProgressTransitions; - renderWasConcurrent = - workInProgressRootDidIncludeRecursiveRenderUpdate; - lanesThatJustErrored = workInProgressDeferredLane; - originallyAttemptedLanes = - workInProgressRootInterleavedUpdatedLanes; - var suspendedRetryLanes = workInProgressSuspendedRetryLanes, - suspendedCommitReason = IMMEDIATE_COMMIT, - prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - lanes, - forceSync, - exitStatus, - renderWasConcurrent, - previousUpdateLanePriority, - lanesThatJustErrored, - originallyAttemptedLanes, - suspendedRetryLanes, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } else { - if ( - (lanes & 62914560) === lanes && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus - ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) { + lanes = shouldTimeSlice; + forceSync = workInProgressRootRecoverableErrors; + shouldTimeSlice = workInProgressTransitions; + exitStatus = workInProgressRootDidIncludeRecursiveRenderUpdate; + renderWasConcurrent = workInProgressDeferredLane; + lanesThatJustErrored = workInProgressRootInterleavedUpdatedLanes; + originallyAttemptedLanes = workInProgressSuspendedRetryLanes; + var suspendedCommitReason = IMMEDIATE_COMMIT, + prevTransition = ReactSharedInternals.T, + previousUpdateLanePriority = currentUpdatePriority; + try { + (currentUpdatePriority = DiscreteEventPriority), + (ReactSharedInternals.T = null), + commitRootImpl( + lanes, + forceSync, + shouldTimeSlice, + exitStatus, + previousUpdateLanePriority, + renderWasConcurrent, + lanesThatJustErrored, + originallyAttemptedLanes, + suspendedCommitReason, + -0, + 0 + ); + } finally { + (ReactSharedInternals.T = prevTransition), + (currentUpdatePriority = previousUpdateLanePriority); + } + } else { + if ( + (lanes & 62914560) === lanes && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + workInProgressDeferredLane + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -11111,8 +11118,9 @@ __DEV__ && workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11216,6 +11224,7 @@ __DEV__ && ) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if ( @@ -11227,21 +11236,26 @@ __DEV__ && switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + exitStatus = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; } catch (thrownValue$34) { handleThrow(root, thrownValue$34); @@ -11252,14 +11266,11 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11269,13 +11280,11 @@ __DEV__ && executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher(); - if ( - workInProgressRoot !== root || - workInProgressRootRenderLanes !== lanes - ) - (workInProgressTransitions = null), + workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes + ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS), - prepareFreshStack(root, lanes); + prepareFreshStack(root, lanes)) + : checkIfRootIsPrerendering(root, lanes); a: do try { if ( @@ -14919,11 +14928,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-13411e45-20241014", + version: "19.0.0-www-classic-6c4bbc78-20241015", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-13411e45-20241014" + reconcilerVersion: "19.0.0-www-classic-6c4bbc78-20241015" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15058,5 +15067,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.0.0-www-classic-13411e45-20241014"; + exports.version = "19.0.0-www-classic-6c4bbc78-20241015"; })(); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index 29061eeeac656..dbd26b633c56a 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -830,6 +830,14 @@ __DEV__ && ? wipLanes : nextLanes; } + function checkIfRootIsPrerendering(root, renderLanes) { + return ( + 0 === + (root.pendingLanes & + ~(root.suspendedLanes & ~root.pingedLanes) & + renderLanes) + ); + } function computeExpirationTime(lane, currentTime) { switch (lane) { case 1: @@ -1857,7 +1865,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -1942,8 +1951,6 @@ __DEV__ && else return currentTime; switch (lanesToEventPriority(suspendedLanes)) { case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; case ContinuousEventPriority: suspendedLanes = UserBlockingPriority; break; @@ -10770,187 +10777,187 @@ __DEV__ && function performWorkOnRoot(root, lanes, forceSync) { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var exitStatus = (forceSync = - !forceSync && 0 === (lanes & 60) && 0 === (lanes & root.expiredLanes)) - ? renderRootConcurrent(root, lanes) - : renderRootSync(root, lanes); - if (exitStatus !== RootInProgress) { - var renderWasConcurrent = forceSync; - do { - if (exitStatus === RootDidNotComplete) - markRootSuspended(root, lanes, 0); - else { - forceSync = root.current.alternate; - if ( - renderWasConcurrent && - !isRenderConsistentWithExternalStores(forceSync) - ) { - exitStatus = renderRootSync(root, lanes); - renderWasConcurrent = !1; - continue; - } - if (exitStatus === RootErrored) { - var lanesThatJustErrored = lanes; - root.errorRecoveryDisabledLanes & lanesThatJustErrored - ? (renderWasConcurrent = 0) - : ((renderWasConcurrent = root.pendingLanes & -536870913), - (renderWasConcurrent = - 0 !== renderWasConcurrent - ? renderWasConcurrent - : renderWasConcurrent & 536870912 - ? 536870912 - : 0)); - if (0 !== renderWasConcurrent) { - lanes = renderWasConcurrent; - a: { - exitStatus = root; - var originallyAttemptedLanes = lanesThatJustErrored; - lanesThatJustErrored = workInProgressRootConcurrentErrors; - renderWasConcurrent = renderRootSync( - exitStatus, - renderWasConcurrent - ); - if (renderWasConcurrent !== RootErrored) { - if (workInProgressRootDidAttachPingListener) { - exitStatus.errorRecoveryDisabledLanes |= - originallyAttemptedLanes; - workInProgressRootInterleavedUpdatedLanes |= - originallyAttemptedLanes; - exitStatus = RootSuspendedWithDelay; - break a; - } - exitStatus = workInProgressRootRecoverableErrors; - workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + var shouldTimeSlice = + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + !1, + exitStatus = shouldTimeSlice + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0); + do { + var renderWasConcurrent = shouldTimeSlice; + if (exitStatus === RootInProgress) break; + else if (exitStatus === RootDidNotComplete) + markRootSuspended(root, lanes, 0); + else { + forceSync = root.current.alternate; + if ( + renderWasConcurrent && + !isRenderConsistentWithExternalStores(forceSync) + ) { + exitStatus = renderRootSync(root, lanes, !1); + continue; + } + if (exitStatus === RootErrored) { + var lanesThatJustErrored = lanes; + root.errorRecoveryDisabledLanes & lanesThatJustErrored + ? (renderWasConcurrent = 0) + : ((renderWasConcurrent = root.pendingLanes & -536870913), + (renderWasConcurrent = + 0 !== renderWasConcurrent + ? renderWasConcurrent + : renderWasConcurrent & 536870912 + ? 536870912 + : 0)); + if (0 !== renderWasConcurrent) { + lanes = renderWasConcurrent; + a: { + exitStatus = root; + var originallyAttemptedLanes = lanesThatJustErrored; + lanesThatJustErrored = workInProgressRootConcurrentErrors; + renderWasConcurrent = renderRootSync( + exitStatus, + renderWasConcurrent, + !1 + ); + if (renderWasConcurrent !== RootErrored) { + if (workInProgressRootDidAttachPingListener) { + exitStatus.errorRecoveryDisabledLanes |= + originallyAttemptedLanes; + workInProgressRootInterleavedUpdatedLanes |= + originallyAttemptedLanes; + exitStatus = RootSuspendedWithDelay; + break a; } - exitStatus = renderWasConcurrent; + exitStatus = workInProgressRootRecoverableErrors; + workInProgressRootRecoverableErrors = lanesThatJustErrored; + null !== exitStatus && queueRecoverableErrors(exitStatus); } - renderWasConcurrent = !1; - if (exitStatus !== RootErrored) continue; + exitStatus = renderWasConcurrent; } + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); - break; - } - a: { - renderWasConcurrent = root; - switch (exitStatus) { - case RootInProgress: - case RootFatalErrored: - throw Error("Root did not complete. This is a bug in React."); - case RootSuspendedWithDelay: - if ((lanes & 4194176) === lanes) { - markRootSuspended( - renderWasConcurrent, - lanes, - workInProgressDeferredLane - ); - break a; - } - break; - case RootErrored: - workInProgressRootRecoverableErrors = null; - break; - case RootSuspended: - case RootCompleted: - break; - default: - throw Error("Unknown root exit status."); - } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) { - lanes = renderWasConcurrent; - forceSync = workInProgressRootRecoverableErrors; - exitStatus = workInProgressTransitions; - renderWasConcurrent = - workInProgressRootDidIncludeRecursiveRenderUpdate; - lanesThatJustErrored = workInProgressDeferredLane; - originallyAttemptedLanes = - workInProgressRootInterleavedUpdatedLanes; - var suspendedRetryLanes = workInProgressSuspendedRetryLanes, - suspendedCommitReason = IMMEDIATE_COMMIT, - prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - lanes, - forceSync, - exitStatus, - renderWasConcurrent, - previousUpdateLanePriority, - lanesThatJustErrored, - originallyAttemptedLanes, - suspendedRetryLanes, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } else { - if ( - (lanes & 62914560) === lanes && - ((exitStatus = - globalMostRecentFallbackTime + - FALLBACK_THROTTLE_MS - - now$1()), - 10 < exitStatus) - ) { + } + if (exitStatus === RootFatalErrored) { + prepareFreshStack(root, 0); + markRootSuspended(root, lanes, 0); + break; + } + a: { + shouldTimeSlice = root; + switch (exitStatus) { + case RootInProgress: + case RootFatalErrored: + throw Error("Root did not complete. This is a bug in React."); + case RootSuspendedWithDelay: + if ((lanes & 4194176) === lanes) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( - commitRootWhenReady.bind( - null, - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, - lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - THROTTLED_COMMIT, - -0, - 0 - ), - exitStatus - ); break a; } - commitRootWhenReady( - renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, + break; + case RootErrored: + workInProgressRootRecoverableErrors = null; + break; + case RootSuspended: + case RootCompleted: + break; + default: + throw Error("Unknown root exit status."); + } + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) { + lanes = shouldTimeSlice; + forceSync = workInProgressRootRecoverableErrors; + shouldTimeSlice = workInProgressTransitions; + exitStatus = workInProgressRootDidIncludeRecursiveRenderUpdate; + renderWasConcurrent = workInProgressDeferredLane; + lanesThatJustErrored = workInProgressRootInterleavedUpdatedLanes; + originallyAttemptedLanes = workInProgressSuspendedRetryLanes; + var suspendedCommitReason = IMMEDIATE_COMMIT, + prevTransition = ReactSharedInternals.T, + previousUpdateLanePriority = currentUpdatePriority; + try { + (currentUpdatePriority = DiscreteEventPriority), + (ReactSharedInternals.T = null), + commitRootImpl( + lanes, + forceSync, + shouldTimeSlice, + exitStatus, + previousUpdateLanePriority, + renderWasConcurrent, + lanesThatJustErrored, + originallyAttemptedLanes, + suspendedCommitReason, + -0, + 0 + ); + } finally { + (ReactSharedInternals.T = prevTransition), + (currentUpdatePriority = previousUpdateLanePriority); + } + } else { + if ( + (lanes & 62914560) === lanes && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( + shouldTimeSlice, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + workInProgressDeferredLane + ); + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( + commitRootWhenReady.bind( + null, + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + THROTTLED_COMMIT, + -0, + 0 + ), + exitStatus ); + break a; } + commitRootWhenReady( + shouldTimeSlice, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -11111,8 +11118,9 @@ __DEV__ && workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11216,6 +11224,7 @@ __DEV__ && ) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if ( @@ -11227,21 +11236,26 @@ __DEV__ && switch (workInProgressSuspendedReason) { case SuspendedOnHydration: resetWorkInProgressStack(); - workInProgressRootExitStatus = RootDidNotComplete; + exitStatus = RootDidNotComplete; break a; case SuspendedOnImmediate: case SuspendedOnData: - lanes || - null !== suspenseHandlerStackCursor.current || - (lanes = !0); - default: + case SuspendedOnDeprecatedThrowPromise: + null === suspenseHandlerStackCursor.current && (lanes = !0); var reason = workInProgressSuspendedReason; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); + break; + default: + (reason = workInProgressSuspendedReason), + (workInProgressSuspendedReason = NotSuspended), + (workInProgressThrownValue = null), + throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason); } } workLoopSync(); + exitStatus = workInProgressRootExitStatus; break; } catch (thrownValue$34) { handleThrow(root, thrownValue$34); @@ -11252,14 +11266,11 @@ __DEV__ && executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; - if (null !== workInProgress) - throw Error( - "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." - ); - workInProgressRoot = null; - workInProgressRootRenderLanes = 0; - finishQueueingConcurrentUpdates(); - return workInProgressRootExitStatus; + null === workInProgress && + ((workInProgressRoot = null), + (workInProgressRootRenderLanes = 0), + finishQueueingConcurrentUpdates()); + return exitStatus; } function workLoopSync() { for (; null !== workInProgress; ) performUnitOfWork(workInProgress); @@ -11269,13 +11280,11 @@ __DEV__ && executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher(); - if ( - workInProgressRoot !== root || - workInProgressRootRenderLanes !== lanes - ) - (workInProgressTransitions = null), + workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes + ? ((workInProgressTransitions = null), (workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS), - prepareFreshStack(root, lanes); + prepareFreshStack(root, lanes)) + : checkIfRootIsPrerendering(root, lanes); a: do try { if ( @@ -14919,11 +14928,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-13411e45-20241014", + version: "19.0.0-www-modern-6c4bbc78-20241015", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-13411e45-20241014" + reconcilerVersion: "19.0.0-www-modern-6c4bbc78-20241015" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15058,5 +15067,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.0.0-www-modern-13411e45-20241014"; + exports.version = "19.0.0-www-modern-6c4bbc78-20241015"; })(); diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC index 8464e1eb1564b..50b5bc1059433 100644 --- a/compiled/facebook-www/VERSION_CLASSIC +++ b/compiled/facebook-www/VERSION_CLASSIC @@ -1 +1 @@ -19.0.0-www-classic-13411e45-20241014 \ No newline at end of file +19.0.0-www-classic-6c4bbc78-20241015 \ No newline at end of file diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN index 764056ff3d55f..368ed0d301ea1 100644 --- a/compiled/facebook-www/VERSION_MODERN +++ b/compiled/facebook-www/VERSION_MODERN @@ -1 +1 @@ -19.0.0-www-modern-13411e45-20241014 \ No newline at end of file +19.0.0-www-modern-6c4bbc78-20241015 \ No newline at end of file