diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 6951dddb96e24..e91d0c760ed8f 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -d8b903f49edebdd9ed081ff0514c28fe130cd510 +c81312e3a78dcbf71ed98c8893abe6dbfeaef3f2 diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index 6951dddb96e24..e91d0c760ed8f 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -d8b903f49edebdd9ed081ff0514c28fe130cd510 +c81312e3a78dcbf71ed98c8893abe6dbfeaef3f2 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 38e41e4804e12..172a4787189af 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -1942,7 +1942,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.1.0-www-classic-d8b903f4-20250102"; + exports.version = "19.1.0-www-classic-c81312e3-20250102"; "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 a789404f7aff7..197fa16031e76 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -1942,7 +1942,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.1.0-www-modern-d8b903f4-20250102"; + exports.version = "19.1.0-www-modern-c81312e3-20250102"; "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 9df47ee171f71..13b217d180f64 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -630,4 +630,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-classic-d8b903f4-20250102"; +exports.version = "19.1.0-www-classic-c81312e3-20250102"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 8e4556d838099..9a71241198acc 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -630,4 +630,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-modern-d8b903f4-20250102"; +exports.version = "19.1.0-www-modern-c81312e3-20250102"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 9402d1eea40d9..1a81421c774cb 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -634,7 +634,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-classic-d8b903f4-20250102"; +exports.version = "19.1.0-www-classic-c81312e3-20250102"; "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 af64d265dfb94..1cd8af195d401 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -634,7 +634,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-modern-d8b903f4-20250102"; +exports.version = "19.1.0-www-modern-c81312e3-20250102"; "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 3a5aad01d916d..7ced881e9ee92 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -712,6 +712,18 @@ __DEV__ && null === memoizedState.dehydrated ); } + function doesFiberContain(parentFiber, childFiber) { + for ( + var parentFiberAlternate = parentFiber.alternate; + null !== childFiber; + + ) { + if (childFiber === parentFiber || childFiber === parentFiberAlternate) + return !0; + childFiber = childFiber.return; + } + return !1; + } function childrenAsString(children) { return children ? "string" === typeof children @@ -739,41 +751,6 @@ __DEV__ && } return hook.checkDCE ? !0 : !1; } - function onCommitRoot(root, eventPriority) { - if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) - try { - var didError = 128 === (root.current.flags & 128); - switch (eventPriority) { - case DiscreteEventPriority: - var schedulerPriority = ImmediatePriority; - break; - case ContinuousEventPriority: - schedulerPriority = UserBlockingPriority; - break; - case DefaultEventPriority: - schedulerPriority = NormalPriority$1; - break; - case IdleEventPriority: - schedulerPriority = IdlePriority; - break; - default: - schedulerPriority = NormalPriority$1; - } - injectedHook.onCommitFiberRoot( - rendererID, - root, - schedulerPriority, - didError - ); - } catch (err) { - hasLoggedError || - ((hasLoggedError = !0), - error$jscomp$0( - "React instrumentation encountered an error: %s", - err - )); - } - } function setIsStrictModeForDevtools(newIsStrictMode) { "function" === typeof log$1 && (unstable_setDisableYieldValue(newIsStrictMode), @@ -911,14 +888,13 @@ __DEV__ && ); } } - function getNextLanes(root, wipLanes) { + function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -928,29 +904,30 @@ __DEV__ && 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -2313,7 +2290,9 @@ __DEV__ && (nextLanes = workInProgressRootRenderLanes), (nextLanes = getNextLanes( root, - root === workInProgressRoot ? nextLanes : 0 + root === workInProgressRoot ? nextLanes : 0, + null !== root.cancelPendingCommit || + -1 !== root.timeoutHandle )), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root, nextLanes) || @@ -2376,7 +2355,8 @@ __DEV__ && suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); pingedLanes = root.callbackNode; if ( @@ -2441,7 +2421,10 @@ __DEV__ && workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot + ? workInProgressRootRenderLanes$jscomp$0 + : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -10194,35 +10177,67 @@ __DEV__ && ); } } - function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - child = fiber.child; - if (0 !== (fiber.subtreeFlags & 9236) && null !== child) - (child.return = fiber), (nextEffect = child); + function commitBeforeMutationEffects(root, firstChild) { + focusedInstanceHandle = null; + shouldFireAfterActiveInstanceBlur = !1; + for (nextEffect = firstChild; null !== nextEffect; ) { + root = nextEffect; + firstChild = root.deletions; + if (null !== firstChild) + for (var i = 0; i < firstChild.length; i++) + doesFiberContain(firstChild[i], focusedInstanceHandle) && + (shouldFireAfterActiveInstanceBlur = !0); + firstChild = root.child; + if (0 !== (root.subtreeFlags & 9236) && null !== firstChild) + (firstChild.return = root), (nextEffect = firstChild); else - a: for (; null !== nextEffect; ) { - child = fiber = nextEffect; - var current = child.alternate, - flags = child.flags; - switch (child.tag) { + for (; null !== nextEffect; ) { + firstChild = root = nextEffect; + i = firstChild.alternate; + var flags = firstChild.flags; + if ( + !shouldFireAfterActiveInstanceBlur && + null !== focusedInstanceHandle + ) { + var JSCompiler_temp; + if ((JSCompiler_temp = 13 === firstChild.tag)) + a: { + if ( + null !== i && + ((JSCompiler_temp = i.memoizedState), + null === JSCompiler_temp || + null !== JSCompiler_temp.dehydrated) + ) { + JSCompiler_temp = firstChild.memoizedState; + JSCompiler_temp = + null !== JSCompiler_temp && + null === JSCompiler_temp.dehydrated; + break a; + } + JSCompiler_temp = !1; + } + JSCompiler_temp && + doesFiberContain(firstChild, focusedInstanceHandle) && + (shouldFireAfterActiveInstanceBlur = !0); + } + switch (firstChild.tag) { case 0: if ( 0 !== (flags & 4) && - ((child = child.updateQueue), - (child = null !== child ? child.events : null), - null !== child) + ((firstChild = firstChild.updateQueue), + (firstChild = null !== firstChild ? firstChild.events : null), + null !== firstChild) ) - for (current = 0; current < child.length; current++) - (flags = child[current]), (flags.ref.impl = flags.nextImpl); + for (i = 0; i < firstChild.length; i++) + (flags = firstChild[i]), (flags.ref.impl = flags.nextImpl); break; case 11: case 15: break; case 1: 0 !== (flags & 1024) && - null !== current && - commitClassSnapshot(child, current); + null !== i && + commitClassSnapshot(firstChild, i); break; case 3: break; @@ -10239,15 +10254,16 @@ __DEV__ && "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." ); } - child = fiber.sibling; - if (null !== child) { - child.return = fiber.return; - nextEffect = child; - break a; + firstChild = root.sibling; + if (null !== firstChild) { + firstChild.return = root.return; + nextEffect = firstChild; + break; } - nextEffect = fiber.return; + nextEffect = root.return; } } + focusedInstanceHandle = null; } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -10891,12 +10907,6 @@ __DEV__ && } }); } - function commitMutationEffects(root, finishedWork, committedLanes) { - inProgressLanes = committedLanes; - inProgressRoot = root; - commitMutationEffectsOnFiber(finishedWork, root); - inProgressRoot = inProgressLanes = null; - } function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) { var deletions = parentFiber.deletions; if (null !== deletions) @@ -11257,12 +11267,6 @@ __DEV__ && } flags & 4096 && (finishedWork.flags &= -4097); } - function commitLayoutEffects(finishedWork, root, committedLanes) { - inProgressLanes = committedLanes; - inProgressRoot = root; - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); - inProgressRoot = inProgressLanes = null; - } function recursivelyTraverseLayoutEffects(root, parentFiber) { if (parentFiber.subtreeFlags & 8772) for (parentFiber = parentFiber.child; null !== parentFiber; ) @@ -12437,9 +12441,8 @@ __DEV__ && break; } a: { - renderWasConcurrent = root; - shouldTimeSlice = exitStatus; - switch (shouldTimeSlice) { + shouldTimeSlice = root; + switch (exitStatus) { case RootInProgress: case RootFatalErrored: throw Error("Root did not complete. This is a bug in React."); @@ -12447,7 +12450,7 @@ __DEV__ && if ((lanes & 4194176) !== lanes) break; case RootSuspendedAtTheShell: markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings @@ -12462,63 +12465,39 @@ __DEV__ && 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, - shouldTimeSlice, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } else { + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + forceSync, + lanes, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes + ); + else { if ( (lanes & 62914560) === lanes && - (alwaysThrottleRetries || shouldTimeSlice === RootSuspended) && - ((exitStatus = + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((renderWasConcurrent = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1()), - 10 < exitStatus) + 10 < renderWasConcurrent) ) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, - renderWasConcurrent, + shouldTimeSlice, forceSync, workInProgressRootRecoverableErrors, workInProgressTransitions, @@ -12528,17 +12507,17 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes, workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings, - shouldTimeSlice, + exitStatus, THROTTLED_COMMIT, -0, 0 ), - exitStatus + renderWasConcurrent ); break a; } commitRootWhenReady( - renderWasConcurrent, + shouldTimeSlice, forceSync, workInProgressRootRecoverableErrors, workInProgressTransitions, @@ -12548,7 +12527,7 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes, workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings, - shouldTimeSlice, + exitStatus, IMMEDIATE_COMMIT, -0, 0 @@ -12569,39 +12548,23 @@ __DEV__ && lanes, spawnedLane, updatedLanes, - suspendedRetryLanes, - didSkipSuspendedSiblings, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ) { - lanes = finishedWork.subtreeFlags; - (lanes & 8192 || 16785408 === (lanes & 16785408)) && + root.timeoutHandle = -1; + var subtreeFlags = finishedWork.subtreeFlags; + (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) && accumulateSuspenseyCommitOnFiber(finishedWork); - finishedWork = ReactSharedInternals.T; - lanes = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - lanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = finishedWork), - (currentUpdatePriority = lanes); - } + commitRoot( + root, + finishedWork, + lanes, + recoverableErrors, + transitions, + didIncludeRenderPhaseUpdate, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { @@ -12696,8 +12659,6 @@ __DEV__ && } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; -1 !== timeoutHandle && ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle)); @@ -13334,134 +13295,236 @@ __DEV__ && workInProgressRootExitStatus = RootSuspendedAtTheShell; workInProgress = null; } - function commitRootImpl( + function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - renderPriorityLevel, spawnedLane, updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); ReactStrictModeWarnings.flushLegacyContextWarning(); ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markCommitStarted && injectedProfilingHooks.markCommitStarted(lanes); if (null === finishedWork) - return enableSchedulingProfiler && markCommitStopped(), null; - 0 === lanes && - error$jscomp$0( - "root.finishedLanes should not be empty during a commit. This is a bug in React." + enableSchedulingProfiler && markCommitStopped(); + else { + 0 === lanes && + error$jscomp$0( + "finishedLanes should not be empty during a commit. This is a bug in React." + ); + if (finishedWork === root.current) + throw Error( + "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + ); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes ); - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) - throw Error( - "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + commitStartTime = now(); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + updatedLanes = executionContext; + executionContext |= CommitContext; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate ); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; - 0 !== (finishedWork.subtreeFlags & 10256) || - 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = currentUpdatePriority), - (currentUpdatePriority = DiscreteEventPriority), - (suspendedRetryLanes = executionContext), - (executionContext |= CommitContext), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - commitMutationEffects(root, finishedWork, lanes), - (root.current = finishedWork), + } + } + function flushMutationEffects(root, finishedWork, lanes) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { + (inProgressLanes = lanes), + (inProgressRoot = root), + commitMutationEffectsOnFiber(finishedWork, root), + (inProgressRoot = inProgressLanes = null); + } finally { + (executionContext = prevExecutionContext), + (currentUpdatePriority = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; + } + function flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), - enableSchedulingProfiler && + (inProgressLanes = lanes), + (inProgressRoot = root), + commitLayoutEffectOnFiber( + root, + finishedWork.alternate, + finishedWork + ), + (inProgressRoot = inProgressLanes = null), enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = suspendedRetryLanes), - (currentUpdatePriority = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = spawnedLane) - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + } finally { + (executionContext = prevExecutionContext), + (currentUpdatePriority = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); + (rootHasLayoutEffect = + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256)) + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : (releaseRootPooledCache(root, remainingLanes), + : (releaseRootPooledCache(root, root.pendingLanes), (nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); + previousPriority = root.pendingLanes; + 0 === previousPriority && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root); + rootHasLayoutEffect = lanesToEventPriority(lanes); + finishedWork = finishedWork.stateNode; + if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) + try { + var didError = 128 === (finishedWork.current.flags & 128); + switch (rootHasLayoutEffect) { + case DiscreteEventPriority: + var schedulerPriority = ImmediatePriority; + break; + case ContinuousEventPriority: + schedulerPriority = UserBlockingPriority; + break; + case DefaultEventPriority: + schedulerPriority = NormalPriority$1; + break; + case IdleEventPriority: + schedulerPriority = IdlePriority; + break; + default: + schedulerPriority = NormalPriority$1; + } + injectedHook.onCommitFiberRoot( + rendererID, + finishedWork, + schedulerPriority, + didError + ); + } catch (err) { + hasLoggedError || + ((hasLoggedError = !0), + error$jscomp$0( + "React instrumentation encountered an error: %s", + err + )); + } isDevToolsPresent && root.memoizedUpdaters.clear(); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - (spawnedLane = makeErrorInfo(remainingLanes.stack)), + if (null !== recoverableErrors) { + didError = ReactSharedInternals.T; + schedulerPriority = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + finishedWork = 0; + finishedWork < recoverableErrors.length; + finishedWork++ + ) { + var recoverableError = recoverableErrors[finishedWork], + errorInfo = makeErrorInfo(recoverableError.stack); runWithFiberInDEV( - remainingLanes.source, - renderPriorityLevel, - remainingLanes.value, - spawnedLane + recoverableError.source, + onRecoverableError, + recoverableError.value, + errorInfo ); + } + } finally { + (ReactSharedInternals.T = didError), + (currentUpdatePriority = schedulerPriority); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + previousPriority = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (previousPriority & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ @@ -13469,7 +13532,6 @@ __DEV__ && : (nestedUpdateCount = 0); flushSyncWorkAcrossRoots_impl(0, !1); enableSchedulingProfiler && markCommitStopped(); - return null; } function makeErrorInfo(componentStack) { componentStack = { componentStack: componentStack }; @@ -14416,11 +14478,7 @@ __DEV__ && ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = -1; this.callbackNode = this.next = @@ -14433,7 +14491,6 @@ __DEV__ && this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -16544,6 +16601,8 @@ __DEV__ && nextEffect = null, inProgressLanes = null, inProgressRoot = null, + focusedInstanceHandle = null, + shouldFireAfterActiveInstanceBlur = !1, hostParent = null, hostParentIsContainer = !1, suspenseyCommitFlag = 8192, @@ -16855,10 +16914,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-classic-d8b903f4-20250102", + version: "19.1.0-www-classic-c81312e3-20250102", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-classic-c81312e3-20250102" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -16892,7 +16951,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.1.0-www-classic-d8b903f4-20250102"; + exports.version = "19.1.0-www-classic-c81312e3-20250102"; "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 862233b98bf0e..70f4a53416fd9 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -698,6 +698,18 @@ __DEV__ && null === memoizedState.dehydrated ); } + function doesFiberContain(parentFiber, childFiber) { + for ( + var parentFiberAlternate = parentFiber.alternate; + null !== childFiber; + + ) { + if (childFiber === parentFiber || childFiber === parentFiberAlternate) + return !0; + childFiber = childFiber.return; + } + return !1; + } function childrenAsString(children) { return children ? "string" === typeof children @@ -725,41 +737,6 @@ __DEV__ && } return hook.checkDCE ? !0 : !1; } - function onCommitRoot(root, eventPriority) { - if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) - try { - var didError = 128 === (root.current.flags & 128); - switch (eventPriority) { - case DiscreteEventPriority: - var schedulerPriority = ImmediatePriority; - break; - case ContinuousEventPriority: - schedulerPriority = UserBlockingPriority; - break; - case DefaultEventPriority: - schedulerPriority = NormalPriority$1; - break; - case IdleEventPriority: - schedulerPriority = IdlePriority; - break; - default: - schedulerPriority = NormalPriority$1; - } - injectedHook.onCommitFiberRoot( - rendererID, - root, - schedulerPriority, - didError - ); - } catch (err) { - hasLoggedError || - ((hasLoggedError = !0), - error$jscomp$0( - "React instrumentation encountered an error: %s", - err - )); - } - } function setIsStrictModeForDevtools(newIsStrictMode) { "function" === typeof log$1 && (unstable_setDisableYieldValue(newIsStrictMode), @@ -897,14 +874,13 @@ __DEV__ && ); } } - function getNextLanes(root, wipLanes) { + function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -914,29 +890,30 @@ __DEV__ && 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -2205,7 +2182,9 @@ __DEV__ && (nextLanes = workInProgressRootRenderLanes), (nextLanes = getNextLanes( root, - root === workInProgressRoot ? nextLanes : 0 + root === workInProgressRoot ? nextLanes : 0, + null !== root.cancelPendingCommit || + -1 !== root.timeoutHandle )), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root, nextLanes) || @@ -2268,7 +2247,8 @@ __DEV__ && suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); pingedLanes = root.callbackNode; if ( @@ -2333,7 +2313,10 @@ __DEV__ && workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot + ? workInProgressRootRenderLanes$jscomp$0 + : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -9998,35 +9981,67 @@ __DEV__ && ); } } - function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - child = fiber.child; - if (0 !== (fiber.subtreeFlags & 9236) && null !== child) - (child.return = fiber), (nextEffect = child); + function commitBeforeMutationEffects(root, firstChild) { + focusedInstanceHandle = null; + shouldFireAfterActiveInstanceBlur = !1; + for (nextEffect = firstChild; null !== nextEffect; ) { + root = nextEffect; + firstChild = root.deletions; + if (null !== firstChild) + for (var i = 0; i < firstChild.length; i++) + doesFiberContain(firstChild[i], focusedInstanceHandle) && + (shouldFireAfterActiveInstanceBlur = !0); + firstChild = root.child; + if (0 !== (root.subtreeFlags & 9236) && null !== firstChild) + (firstChild.return = root), (nextEffect = firstChild); else - a: for (; null !== nextEffect; ) { - child = fiber = nextEffect; - var current = child.alternate, - flags = child.flags; - switch (child.tag) { + for (; null !== nextEffect; ) { + firstChild = root = nextEffect; + i = firstChild.alternate; + var flags = firstChild.flags; + if ( + !shouldFireAfterActiveInstanceBlur && + null !== focusedInstanceHandle + ) { + var JSCompiler_temp; + if ((JSCompiler_temp = 13 === firstChild.tag)) + a: { + if ( + null !== i && + ((JSCompiler_temp = i.memoizedState), + null === JSCompiler_temp || + null !== JSCompiler_temp.dehydrated) + ) { + JSCompiler_temp = firstChild.memoizedState; + JSCompiler_temp = + null !== JSCompiler_temp && + null === JSCompiler_temp.dehydrated; + break a; + } + JSCompiler_temp = !1; + } + JSCompiler_temp && + doesFiberContain(firstChild, focusedInstanceHandle) && + (shouldFireAfterActiveInstanceBlur = !0); + } + switch (firstChild.tag) { case 0: if ( 0 !== (flags & 4) && - ((child = child.updateQueue), - (child = null !== child ? child.events : null), - null !== child) + ((firstChild = firstChild.updateQueue), + (firstChild = null !== firstChild ? firstChild.events : null), + null !== firstChild) ) - for (current = 0; current < child.length; current++) - (flags = child[current]), (flags.ref.impl = flags.nextImpl); + for (i = 0; i < firstChild.length; i++) + (flags = firstChild[i]), (flags.ref.impl = flags.nextImpl); break; case 11: case 15: break; case 1: 0 !== (flags & 1024) && - null !== current && - commitClassSnapshot(child, current); + null !== i && + commitClassSnapshot(firstChild, i); break; case 3: break; @@ -10043,15 +10058,16 @@ __DEV__ && "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." ); } - child = fiber.sibling; - if (null !== child) { - child.return = fiber.return; - nextEffect = child; - break a; + firstChild = root.sibling; + if (null !== firstChild) { + firstChild.return = root.return; + nextEffect = firstChild; + break; } - nextEffect = fiber.return; + nextEffect = root.return; } } + focusedInstanceHandle = null; } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -10695,12 +10711,6 @@ __DEV__ && } }); } - function commitMutationEffects(root, finishedWork, committedLanes) { - inProgressLanes = committedLanes; - inProgressRoot = root; - commitMutationEffectsOnFiber(finishedWork, root); - inProgressRoot = inProgressLanes = null; - } function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) { var deletions = parentFiber.deletions; if (null !== deletions) @@ -11061,12 +11071,6 @@ __DEV__ && } flags & 4096 && (finishedWork.flags &= -4097); } - function commitLayoutEffects(finishedWork, root, committedLanes) { - inProgressLanes = committedLanes; - inProgressRoot = root; - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); - inProgressRoot = inProgressLanes = null; - } function recursivelyTraverseLayoutEffects(root, parentFiber) { if (parentFiber.subtreeFlags & 8772) for (parentFiber = parentFiber.child; null !== parentFiber; ) @@ -12241,9 +12245,8 @@ __DEV__ && break; } a: { - renderWasConcurrent = root; - shouldTimeSlice = exitStatus; - switch (shouldTimeSlice) { + shouldTimeSlice = root; + switch (exitStatus) { case RootInProgress: case RootFatalErrored: throw Error("Root did not complete. This is a bug in React."); @@ -12251,7 +12254,7 @@ __DEV__ && if ((lanes & 4194176) !== lanes) break; case RootSuspendedAtTheShell: markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings @@ -12266,63 +12269,39 @@ __DEV__ && 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, - shouldTimeSlice, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } else { + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + forceSync, + lanes, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes + ); + else { if ( (lanes & 62914560) === lanes && - (alwaysThrottleRetries || shouldTimeSlice === RootSuspended) && - ((exitStatus = + (alwaysThrottleRetries || exitStatus === RootSuspended) && + ((renderWasConcurrent = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1()), - 10 < exitStatus) + 10 < renderWasConcurrent) ) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, - renderWasConcurrent, + shouldTimeSlice, forceSync, workInProgressRootRecoverableErrors, workInProgressTransitions, @@ -12332,17 +12311,17 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes, workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings, - shouldTimeSlice, + exitStatus, THROTTLED_COMMIT, -0, 0 ), - exitStatus + renderWasConcurrent ); break a; } commitRootWhenReady( - renderWasConcurrent, + shouldTimeSlice, forceSync, workInProgressRootRecoverableErrors, workInProgressTransitions, @@ -12352,7 +12331,7 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes, workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings, - shouldTimeSlice, + exitStatus, IMMEDIATE_COMMIT, -0, 0 @@ -12373,39 +12352,23 @@ __DEV__ && lanes, spawnedLane, updatedLanes, - suspendedRetryLanes, - didSkipSuspendedSiblings, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ) { - lanes = finishedWork.subtreeFlags; - (lanes & 8192 || 16785408 === (lanes & 16785408)) && + root.timeoutHandle = -1; + var subtreeFlags = finishedWork.subtreeFlags; + (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) && accumulateSuspenseyCommitOnFiber(finishedWork); - finishedWork = ReactSharedInternals.T; - lanes = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - lanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = finishedWork), - (currentUpdatePriority = lanes); - } + commitRoot( + root, + finishedWork, + lanes, + recoverableErrors, + transitions, + didIncludeRenderPhaseUpdate, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { @@ -12500,8 +12463,6 @@ __DEV__ && } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; -1 !== timeoutHandle && ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle)); @@ -13134,134 +13095,236 @@ __DEV__ && workInProgressRootExitStatus = RootSuspendedAtTheShell; workInProgress = null; } - function commitRootImpl( + function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - renderPriorityLevel, spawnedLane, updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); ReactStrictModeWarnings.flushLegacyContextWarning(); ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markCommitStarted && injectedProfilingHooks.markCommitStarted(lanes); if (null === finishedWork) - return enableSchedulingProfiler && markCommitStopped(), null; - 0 === lanes && - error$jscomp$0( - "root.finishedLanes should not be empty during a commit. This is a bug in React." + enableSchedulingProfiler && markCommitStopped(); + else { + 0 === lanes && + error$jscomp$0( + "finishedLanes should not be empty during a commit. This is a bug in React." + ); + if (finishedWork === root.current) + throw Error( + "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + ); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes ); - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) - throw Error( - "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + commitStartTime = now(); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + updatedLanes = executionContext; + executionContext |= CommitContext; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate ); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; - 0 !== (finishedWork.subtreeFlags & 10256) || - 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = currentUpdatePriority), - (currentUpdatePriority = DiscreteEventPriority), - (suspendedRetryLanes = executionContext), - (executionContext |= CommitContext), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - commitMutationEffects(root, finishedWork, lanes), - (root.current = finishedWork), + } + } + function flushMutationEffects(root, finishedWork, lanes) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { + (inProgressLanes = lanes), + (inProgressRoot = root), + commitMutationEffectsOnFiber(finishedWork, root), + (inProgressRoot = inProgressLanes = null); + } finally { + (executionContext = prevExecutionContext), + (currentUpdatePriority = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; + } + function flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), - enableSchedulingProfiler && + (inProgressLanes = lanes), + (inProgressRoot = root), + commitLayoutEffectOnFiber( + root, + finishedWork.alternate, + finishedWork + ), + (inProgressRoot = inProgressLanes = null), enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = suspendedRetryLanes), - (currentUpdatePriority = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = spawnedLane) - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + } finally { + (executionContext = prevExecutionContext), + (currentUpdatePriority = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); + (rootHasLayoutEffect = + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256)) + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : (releaseRootPooledCache(root, remainingLanes), + : (releaseRootPooledCache(root, root.pendingLanes), (nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); + previousPriority = root.pendingLanes; + 0 === previousPriority && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root); + rootHasLayoutEffect = lanesToEventPriority(lanes); + finishedWork = finishedWork.stateNode; + if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) + try { + var didError = 128 === (finishedWork.current.flags & 128); + switch (rootHasLayoutEffect) { + case DiscreteEventPriority: + var schedulerPriority = ImmediatePriority; + break; + case ContinuousEventPriority: + schedulerPriority = UserBlockingPriority; + break; + case DefaultEventPriority: + schedulerPriority = NormalPriority$1; + break; + case IdleEventPriority: + schedulerPriority = IdlePriority; + break; + default: + schedulerPriority = NormalPriority$1; + } + injectedHook.onCommitFiberRoot( + rendererID, + finishedWork, + schedulerPriority, + didError + ); + } catch (err) { + hasLoggedError || + ((hasLoggedError = !0), + error$jscomp$0( + "React instrumentation encountered an error: %s", + err + )); + } isDevToolsPresent && root.memoizedUpdaters.clear(); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - (spawnedLane = makeErrorInfo(remainingLanes.stack)), + if (null !== recoverableErrors) { + didError = ReactSharedInternals.T; + schedulerPriority = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + finishedWork = 0; + finishedWork < recoverableErrors.length; + finishedWork++ + ) { + var recoverableError = recoverableErrors[finishedWork], + errorInfo = makeErrorInfo(recoverableError.stack); runWithFiberInDEV( - remainingLanes.source, - renderPriorityLevel, - remainingLanes.value, - spawnedLane + recoverableError.source, + onRecoverableError, + recoverableError.value, + errorInfo ); + } + } finally { + (ReactSharedInternals.T = didError), + (currentUpdatePriority = schedulerPriority); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + previousPriority = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (previousPriority & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ @@ -13269,7 +13332,6 @@ __DEV__ && : (nestedUpdateCount = 0); flushSyncWorkAcrossRoots_impl(0, !1); enableSchedulingProfiler && markCommitStopped(); - return null; } function makeErrorInfo(componentStack) { componentStack = { componentStack: componentStack }; @@ -14216,11 +14278,7 @@ __DEV__ && ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = -1; this.callbackNode = this.next = @@ -14233,7 +14291,6 @@ __DEV__ && this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -16307,6 +16364,8 @@ __DEV__ && nextEffect = null, inProgressLanes = null, inProgressRoot = null, + focusedInstanceHandle = null, + shouldFireAfterActiveInstanceBlur = !1, hostParent = null, hostParentIsContainer = !1, suspenseyCommitFlag = 8192, @@ -16618,10 +16677,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-modern-d8b903f4-20250102", + version: "19.1.0-www-modern-c81312e3-20250102", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-modern-c81312e3-20250102" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -16655,7 +16714,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.1.0-www-modern-d8b903f4-20250102"; + exports.version = "19.1.0-www-modern-c81312e3-20250102"; "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 3c098d27eb9f6..8640906c1ea88 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -449,6 +449,18 @@ function isFiberSuspenseAndTimedOut(fiber) { null === memoizedState.dehydrated ); } +function doesFiberContain(parentFiber, childFiber) { + for ( + var parentFiberAlternate = parentFiber.alternate; + null !== childFiber; + + ) { + if (childFiber === parentFiber || childFiber === parentFiberAlternate) + return !0; + childFiber = childFiber.return; + } + return !1; +} var isArrayImpl = Array.isArray, TYPES = { CLIPPING_RECTANGLE: "ClippingRectangle", @@ -486,17 +498,6 @@ var scheduleCallback$3 = Scheduler.unstable_scheduleCallback, unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue, rendererID = null, injectedHook = null; -function onCommitRoot(root) { - if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) - try { - injectedHook.onCommitFiberRoot( - rendererID, - root, - void 0, - 128 === (root.current.flags & 128) - ); - } catch (err) {} -} function setIsStrictModeForDevtools(newIsStrictMode) { "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode); if (injectedHook && "function" === typeof injectedHook.setStrictMode) @@ -566,14 +567,13 @@ function getHighestPriorityLanes(lanes) { return lanes; } } -function getNextLanes(root, wipLanes) { +function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -583,29 +583,29 @@ function getNextLanes(root, wipLanes) { 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -1371,7 +1371,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( root, - root === workInProgressRoot ? JSCompiler_inline_result : 0 + root === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || checkIfRootIsPrerendering(root, JSCompiler_inline_result) || @@ -1428,7 +1429,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); pingedLanes = root.callbackNode; if ( @@ -1485,7 +1487,8 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -7270,59 +7273,88 @@ function insertOrAppendPlacementNode(node, before, parent) { var offscreenSubtreeIsHidden = !1, offscreenSubtreeWasHidden = !1, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, - nextEffect = null; -function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - child = fiber.child; - if (0 !== (fiber.subtreeFlags & 9236) && null !== child) - (child.return = fiber), (nextEffect = child); + nextEffect = null, + focusedInstanceHandle = null, + shouldFireAfterActiveInstanceBlur = !1; +function commitBeforeMutationEffects(root, firstChild) { + focusedInstanceHandle = null; + shouldFireAfterActiveInstanceBlur = !1; + for (nextEffect = firstChild; null !== nextEffect; ) { + root = nextEffect; + firstChild = root.deletions; + if (null !== firstChild) + for (var i = 0; i < firstChild.length; i++) + doesFiberContain(firstChild[i], focusedInstanceHandle) && + (shouldFireAfterActiveInstanceBlur = !0); + firstChild = root.child; + if (0 !== (root.subtreeFlags & 9236) && null !== firstChild) + (firstChild.return = root), (nextEffect = firstChild); else - a: for (; null !== nextEffect; ) { - fiber = nextEffect; - child = void 0; - var finishedWork = fiber, - current = finishedWork.alternate, - flags = finishedWork.flags; - switch (finishedWork.tag) { + for (; null !== nextEffect; ) { + root = nextEffect; + firstChild = root.alternate; + i = root.flags; + if ( + !shouldFireAfterActiveInstanceBlur && + null !== focusedInstanceHandle + ) { + var JSCompiler_temp; + if ((JSCompiler_temp = 13 === root.tag)) + a: { + if ( + null !== firstChild && + ((JSCompiler_temp = firstChild.memoizedState), + null === JSCompiler_temp || null !== JSCompiler_temp.dehydrated) + ) { + JSCompiler_temp = root.memoizedState; + JSCompiler_temp = + null !== JSCompiler_temp && + null === JSCompiler_temp.dehydrated; + break a; + } + JSCompiler_temp = !1; + } + JSCompiler_temp && + doesFiberContain(root, focusedInstanceHandle) && + (shouldFireAfterActiveInstanceBlur = !0); + } + switch (root.tag) { case 0: if ( - 0 !== (flags & 4) && - ((child = finishedWork.updateQueue), - (child = null !== child ? child.events : null), - null !== child) + 0 !== (i & 4) && + ((firstChild = root.updateQueue), + (firstChild = null !== firstChild ? firstChild.events : null), + null !== firstChild) ) - for ( - finishedWork = 0; - finishedWork < child.length; - finishedWork++ - ) - (flags = child[finishedWork]), - (flags.ref.impl = flags.nextImpl); + for (i = 0; i < firstChild.length; i++) + (JSCompiler_temp = firstChild[i]), + (JSCompiler_temp.ref.impl = JSCompiler_temp.nextImpl); break; case 11: case 15: break; case 1: - if (0 !== (flags & 1024) && null !== current) { - flags = current.memoizedProps; - current = current.memoizedState; - var instance = finishedWork.stateNode; + if (0 !== (i & 1024) && null !== firstChild) { + i = void 0; + JSCompiler_temp = root; + var prevProps = firstChild.memoizedProps; + firstChild = firstChild.memoizedState; + var instance = JSCompiler_temp.stateNode; try { var resolvedPrevProps = resolveClassComponentProps( - finishedWork.type, - flags, - finishedWork.elementType === finishedWork.type + JSCompiler_temp.type, + prevProps, + JSCompiler_temp.elementType === JSCompiler_temp.type ); - child = instance.getSnapshotBeforeUpdate( + i = instance.getSnapshotBeforeUpdate( resolvedPrevProps, - current + firstChild ); - instance.__reactInternalSnapshotBeforeUpdate = child; + instance.__reactInternalSnapshotBeforeUpdate = i; } catch (error) { captureCommitPhaseError( - finishedWork, - finishedWork.return, + JSCompiler_temp, + JSCompiler_temp.return, error ); } @@ -7338,17 +7370,18 @@ function commitBeforeMutationEffects_begin() { case 17: break; default: - if (0 !== (flags & 1024)) throw Error(formatProdErrorMessage(163)); + if (0 !== (i & 1024)) throw Error(formatProdErrorMessage(163)); } - child = fiber.sibling; - if (null !== child) { - child.return = fiber.return; - nextEffect = child; - break a; + firstChild = root.sibling; + if (null !== firstChild) { + firstChild.return = root.return; + nextEffect = firstChild; + break; } - nextEffect = fiber.return; + nextEffect = root.return; } } + focusedInstanceHandle = null; } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -9227,8 +9260,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { default: throw Error(formatProdErrorMessage(329)); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === renderWasConcurrent) && @@ -9241,7 +9272,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -9273,12 +9304,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { lanes, workInProgressDeferredLane, workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - renderWasConcurrent, - 0, - -0, - 0 + workInProgressSuspendedRetryLanes ); } } @@ -9295,38 +9321,23 @@ function commitRootWhenReady( lanes, spawnedLane, updatedLanes, - suspendedRetryLanes, - didSkipSuspendedSiblings, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ) { - lanes = finishedWork.subtreeFlags; - (lanes & 8192 || 16785408 === (lanes & 16785408)) && + root.timeoutHandle = -1; + var subtreeFlags = finishedWork.subtreeFlags; + (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) && accumulateSuspenseyCommitOnFiber(finishedWork); - finishedWork = ReactSharedInternals.T; - lanes = currentUpdatePriority; - try { - (currentUpdatePriority = 2), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - lanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = finishedWork), (currentUpdatePriority = lanes); - } + commitRoot( + root, + finishedWork, + lanes, + recoverableErrors, + transitions, + didIncludeRenderPhaseUpdate, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { @@ -9418,8 +9429,6 @@ function resetWorkInProgressStack() { } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; -1 !== timeoutHandle && ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle)); @@ -9896,103 +9905,168 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) { workInProgressRootExitStatus = 6; workInProgress = null; } -function commitRootImpl( +function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - renderPriorityLevel, spawnedLane, updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; - if (null === finishedWork) return null; - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; + if (null !== finishedWork) { + if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = currentUpdatePriority; + currentUpdatePriority = 2; + updatedLanes = executionContext; + executionContext |= 4; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ); + } +} +function flushMutationEffects(root, finishedWork) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = currentUpdatePriority; + currentUpdatePriority = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitMutationEffectsOnFiber(finishedWork, root); + } finally { + (executionContext = prevExecutionContext), + (currentUpdatePriority = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; +} +function flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate +) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = currentUpdatePriority; + currentUpdatePriority = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + } finally { + (executionContext = prevExecutionContext), + (currentUpdatePriority = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = currentUpdatePriority), - (currentUpdatePriority = 2), - (suspendedRetryLanes = executionContext), - (executionContext |= 4), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - commitMutationEffectsOnFiber(finishedWork, root), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = suspendedRetryLanes), - (currentUpdatePriority = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - spawnedLane - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : releaseRootPooledCache(root, remainingLanes); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - renderPriorityLevel(remainingLanes.value, { - componentStack: remainingLanes.stack + : releaseRootPooledCache(root, root.pendingLanes); + rootHasLayoutEffect = root.pendingLanes; + 0 === rootHasLayoutEffect && (legacyErrorBoundariesThatAlreadyFailed = null); + lanesToEventPriority(lanes); + finishedWork = finishedWork.stateNode; + if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) + try { + injectedHook.onCommitFiberRoot( + rendererID, + finishedWork, + void 0, + 128 === (finishedWork.current.flags & 128) + ); + } catch (err) {} + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = currentUpdatePriority; + currentUpdatePriority = 2; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority]; + onRecoverableError(recoverableError.value, { + componentStack: recoverableError.stack }); + } + } finally { + (ReactSharedInternals.T = finishedWork), + (currentUpdatePriority = rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + rootHasLayoutEffect = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)) ? root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)) : (nestedUpdateCount = 0); flushSyncWorkAcrossRoots_impl(0, !1); - return null; } function releaseRootPooledCache(root, remainingLanes) { 0 === (root.pooledCacheLanes &= remainingLanes) && @@ -10513,11 +10587,7 @@ function FiberRootNode( ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = -1; this.callbackNode = this.next = @@ -10530,7 +10600,6 @@ function FiberRootNode( this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -10742,24 +10811,24 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1509 = { +var internals$jscomp$inline_1510 = { bundleType: 0, - version: "19.1.0-www-classic-d8b903f4-20250102", + version: "19.1.0-www-classic-c81312e3-20250102", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-classic-c81312e3-20250102" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1510 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1511 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1510.isDisabled && - hook$jscomp$inline_1510.supportsFiber + !hook$jscomp$inline_1511.isDisabled && + hook$jscomp$inline_1511.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1510.inject( - internals$jscomp$inline_1509 + (rendererID = hook$jscomp$inline_1511.inject( + internals$jscomp$inline_1510 )), - (injectedHook = hook$jscomp$inline_1510); + (injectedHook = hook$jscomp$inline_1511); } catch (err) {} } var Path = Mode$1.Path; @@ -10773,4 +10842,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.1.0-www-classic-d8b903f4-20250102"; +exports.version = "19.1.0-www-classic-c81312e3-20250102"; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index d8b777a1bdb34..44ddde247db1f 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -370,6 +370,18 @@ function isFiberSuspenseAndTimedOut(fiber) { null === memoizedState.dehydrated ); } +function doesFiberContain(parentFiber, childFiber) { + for ( + var parentFiberAlternate = parentFiber.alternate; + null !== childFiber; + + ) { + if (childFiber === parentFiber || childFiber === parentFiberAlternate) + return !0; + childFiber = childFiber.return; + } + return !1; +} var isArrayImpl = Array.isArray, TYPES = { CLIPPING_RECTANGLE: "ClippingRectangle", @@ -407,17 +419,6 @@ var scheduleCallback$3 = Scheduler.unstable_scheduleCallback, unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue, rendererID = null, injectedHook = null; -function onCommitRoot(root) { - if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) - try { - injectedHook.onCommitFiberRoot( - rendererID, - root, - void 0, - 128 === (root.current.flags & 128) - ); - } catch (err) {} -} function setIsStrictModeForDevtools(newIsStrictMode) { "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode); if (injectedHook && "function" === typeof injectedHook.setStrictMode) @@ -487,14 +488,13 @@ function getHighestPriorityLanes(lanes) { return lanes; } } -function getNextLanes(root, wipLanes) { +function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -504,29 +504,29 @@ function getNextLanes(root, wipLanes) { 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -1218,7 +1218,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( root, - root === workInProgressRoot ? JSCompiler_inline_result : 0 + root === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || checkIfRootIsPrerendering(root, JSCompiler_inline_result) || @@ -1275,7 +1276,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); pingedLanes = root.callbackNode; if ( @@ -1332,7 +1334,8 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -7030,59 +7033,88 @@ function insertOrAppendPlacementNode(node, before, parent) { var offscreenSubtreeIsHidden = !1, offscreenSubtreeWasHidden = !1, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, - nextEffect = null; -function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - child = fiber.child; - if (0 !== (fiber.subtreeFlags & 9236) && null !== child) - (child.return = fiber), (nextEffect = child); + nextEffect = null, + focusedInstanceHandle = null, + shouldFireAfterActiveInstanceBlur = !1; +function commitBeforeMutationEffects(root, firstChild) { + focusedInstanceHandle = null; + shouldFireAfterActiveInstanceBlur = !1; + for (nextEffect = firstChild; null !== nextEffect; ) { + root = nextEffect; + firstChild = root.deletions; + if (null !== firstChild) + for (var i = 0; i < firstChild.length; i++) + doesFiberContain(firstChild[i], focusedInstanceHandle) && + (shouldFireAfterActiveInstanceBlur = !0); + firstChild = root.child; + if (0 !== (root.subtreeFlags & 9236) && null !== firstChild) + (firstChild.return = root), (nextEffect = firstChild); else - a: for (; null !== nextEffect; ) { - fiber = nextEffect; - child = void 0; - var finishedWork = fiber, - current = finishedWork.alternate, - flags = finishedWork.flags; - switch (finishedWork.tag) { + for (; null !== nextEffect; ) { + root = nextEffect; + firstChild = root.alternate; + i = root.flags; + if ( + !shouldFireAfterActiveInstanceBlur && + null !== focusedInstanceHandle + ) { + var JSCompiler_temp; + if ((JSCompiler_temp = 13 === root.tag)) + a: { + if ( + null !== firstChild && + ((JSCompiler_temp = firstChild.memoizedState), + null === JSCompiler_temp || null !== JSCompiler_temp.dehydrated) + ) { + JSCompiler_temp = root.memoizedState; + JSCompiler_temp = + null !== JSCompiler_temp && + null === JSCompiler_temp.dehydrated; + break a; + } + JSCompiler_temp = !1; + } + JSCompiler_temp && + doesFiberContain(root, focusedInstanceHandle) && + (shouldFireAfterActiveInstanceBlur = !0); + } + switch (root.tag) { case 0: if ( - 0 !== (flags & 4) && - ((child = finishedWork.updateQueue), - (child = null !== child ? child.events : null), - null !== child) + 0 !== (i & 4) && + ((firstChild = root.updateQueue), + (firstChild = null !== firstChild ? firstChild.events : null), + null !== firstChild) ) - for ( - finishedWork = 0; - finishedWork < child.length; - finishedWork++ - ) - (flags = child[finishedWork]), - (flags.ref.impl = flags.nextImpl); + for (i = 0; i < firstChild.length; i++) + (JSCompiler_temp = firstChild[i]), + (JSCompiler_temp.ref.impl = JSCompiler_temp.nextImpl); break; case 11: case 15: break; case 1: - if (0 !== (flags & 1024) && null !== current) { - flags = current.memoizedProps; - current = current.memoizedState; - var instance = finishedWork.stateNode; + if (0 !== (i & 1024) && null !== firstChild) { + i = void 0; + JSCompiler_temp = root; + var prevProps = firstChild.memoizedProps; + firstChild = firstChild.memoizedState; + var instance = JSCompiler_temp.stateNode; try { var resolvedPrevProps = resolveClassComponentProps( - finishedWork.type, - flags, - finishedWork.elementType === finishedWork.type + JSCompiler_temp.type, + prevProps, + JSCompiler_temp.elementType === JSCompiler_temp.type ); - child = instance.getSnapshotBeforeUpdate( + i = instance.getSnapshotBeforeUpdate( resolvedPrevProps, - current + firstChild ); - instance.__reactInternalSnapshotBeforeUpdate = child; + instance.__reactInternalSnapshotBeforeUpdate = i; } catch (error) { captureCommitPhaseError( - finishedWork, - finishedWork.return, + JSCompiler_temp, + JSCompiler_temp.return, error ); } @@ -7098,17 +7130,18 @@ function commitBeforeMutationEffects_begin() { case 17: break; default: - if (0 !== (flags & 1024)) throw Error(formatProdErrorMessage(163)); + if (0 !== (i & 1024)) throw Error(formatProdErrorMessage(163)); } - child = fiber.sibling; - if (null !== child) { - child.return = fiber.return; - nextEffect = child; - break a; + firstChild = root.sibling; + if (null !== firstChild) { + firstChild.return = root.return; + nextEffect = firstChild; + break; } - nextEffect = fiber.return; + nextEffect = root.return; } } + focusedInstanceHandle = null; } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -8987,8 +9020,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { default: throw Error(formatProdErrorMessage(329)); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === renderWasConcurrent) && @@ -9001,7 +9032,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -9033,12 +9064,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { lanes, workInProgressDeferredLane, workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - renderWasConcurrent, - 0, - -0, - 0 + workInProgressSuspendedRetryLanes ); } } @@ -9055,38 +9081,23 @@ function commitRootWhenReady( lanes, spawnedLane, updatedLanes, - suspendedRetryLanes, - didSkipSuspendedSiblings, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ) { - lanes = finishedWork.subtreeFlags; - (lanes & 8192 || 16785408 === (lanes & 16785408)) && + root.timeoutHandle = -1; + var subtreeFlags = finishedWork.subtreeFlags; + (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) && accumulateSuspenseyCommitOnFiber(finishedWork); - finishedWork = ReactSharedInternals.T; - lanes = currentUpdatePriority; - try { - (currentUpdatePriority = 2), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - lanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = finishedWork), (currentUpdatePriority = lanes); - } + commitRoot( + root, + finishedWork, + lanes, + recoverableErrors, + transitions, + didIncludeRenderPhaseUpdate, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { @@ -9178,8 +9189,6 @@ function resetWorkInProgressStack() { } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; -1 !== timeoutHandle && ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle)); @@ -9652,103 +9661,168 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) { workInProgressRootExitStatus = 6; workInProgress = null; } -function commitRootImpl( +function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - renderPriorityLevel, spawnedLane, updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; - if (null === finishedWork) return null; - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; + if (null !== finishedWork) { + if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = currentUpdatePriority; + currentUpdatePriority = 2; + updatedLanes = executionContext; + executionContext |= 4; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ); + } +} +function flushMutationEffects(root, finishedWork) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = currentUpdatePriority; + currentUpdatePriority = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitMutationEffectsOnFiber(finishedWork, root); + } finally { + (executionContext = prevExecutionContext), + (currentUpdatePriority = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; +} +function flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate +) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = currentUpdatePriority; + currentUpdatePriority = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + } finally { + (executionContext = prevExecutionContext), + (currentUpdatePriority = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = currentUpdatePriority), - (currentUpdatePriority = 2), - (suspendedRetryLanes = executionContext), - (executionContext |= 4), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - commitMutationEffectsOnFiber(finishedWork, root), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = suspendedRetryLanes), - (currentUpdatePriority = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - spawnedLane - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : releaseRootPooledCache(root, remainingLanes); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - renderPriorityLevel(remainingLanes.value, { - componentStack: remainingLanes.stack + : releaseRootPooledCache(root, root.pendingLanes); + rootHasLayoutEffect = root.pendingLanes; + 0 === rootHasLayoutEffect && (legacyErrorBoundariesThatAlreadyFailed = null); + lanesToEventPriority(lanes); + finishedWork = finishedWork.stateNode; + if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) + try { + injectedHook.onCommitFiberRoot( + rendererID, + finishedWork, + void 0, + 128 === (finishedWork.current.flags & 128) + ); + } catch (err) {} + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = currentUpdatePriority; + currentUpdatePriority = 2; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority]; + onRecoverableError(recoverableError.value, { + componentStack: recoverableError.stack }); + } + } finally { + (ReactSharedInternals.T = finishedWork), + (currentUpdatePriority = rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + rootHasLayoutEffect = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)) ? root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)) : (nestedUpdateCount = 0); flushSyncWorkAcrossRoots_impl(0, !1); - return null; } function releaseRootPooledCache(root, remainingLanes) { 0 === (root.pooledCacheLanes &= remainingLanes) && @@ -10269,11 +10343,7 @@ function FiberRootNode( ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = -1; this.callbackNode = this.next = @@ -10286,7 +10356,6 @@ function FiberRootNode( this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -10458,24 +10527,24 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1488 = { +var internals$jscomp$inline_1489 = { bundleType: 0, - version: "19.1.0-www-modern-d8b903f4-20250102", + version: "19.1.0-www-modern-c81312e3-20250102", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-modern-c81312e3-20250102" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1489 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1490 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1489.isDisabled && - hook$jscomp$inline_1489.supportsFiber + !hook$jscomp$inline_1490.isDisabled && + hook$jscomp$inline_1490.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1489.inject( - internals$jscomp$inline_1488 + (rendererID = hook$jscomp$inline_1490.inject( + internals$jscomp$inline_1489 )), - (injectedHook = hook$jscomp$inline_1489); + (injectedHook = hook$jscomp$inline_1490); } catch (err) {} } var Path = Mode$1.Path; @@ -10489,4 +10558,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.1.0-www-modern-d8b903f4-20250102"; +exports.version = "19.1.0-www-modern-c81312e3-20250102"; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 8025ced6e01ee..84b8bc2a5ce5a 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -1007,14 +1007,13 @@ __DEV__ && ); } } - function getNextLanes(root, wipLanes) { + function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -1024,29 +1023,30 @@ __DEV__ && 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -4114,7 +4114,9 @@ __DEV__ && (nextLanes = workInProgressRootRenderLanes), (nextLanes = getNextLanes( root, - root === workInProgressRoot ? nextLanes : 0 + root === workInProgressRoot ? nextLanes : 0, + null !== root.cancelPendingCommit || + root.timeoutHandle !== noTimeout )), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root, nextLanes) || @@ -4183,7 +4185,8 @@ __DEV__ && suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); pingedLanes = root.callbackNode; if ( @@ -4248,7 +4251,10 @@ __DEV__ && workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot + ? workInProgressRootRenderLanes$jscomp$0 + : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -9533,32 +9539,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2490; - var JSCompiler_object_inline_stack_2491 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2519; + var JSCompiler_object_inline_stack_2520 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2492 = !1; + var JSCompiler_object_inline_componentStack_2521 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2490 = didSuspend) || - (JSCompiler_object_inline_digest_2490 = + (JSCompiler_object_inline_digest_2519 = didSuspend) || + (JSCompiler_object_inline_digest_2519 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2490 && - ((JSCompiler_object_inline_componentStack_2492 = !0), + JSCompiler_object_inline_digest_2519 && + ((JSCompiler_object_inline_componentStack_2521 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2490 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2519 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2492 + JSCompiler_object_inline_componentStack_2521 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2489 = nextHydratableInstance; + var JSCompiler_object_inline_message_2518 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2489)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2518)) { c: { - var instance = JSCompiler_object_inline_message_2489; + var instance = JSCompiler_object_inline_message_2518; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9600,46 +9606,46 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2489 + JSCompiler_object_inline_message_2518 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2489 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2518 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2489 && - ((JSCompiler_object_inline_message_2489 = - JSCompiler_object_inline_message_2489.dehydrated), - null !== JSCompiler_object_inline_message_2489) + null !== JSCompiler_object_inline_message_2518 && + ((JSCompiler_object_inline_message_2518 = + JSCompiler_object_inline_message_2518.dehydrated), + null !== JSCompiler_object_inline_message_2518) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2489) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2518) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2489 = - JSCompiler_object_inline_stack_2491.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2491.fallback; - if (JSCompiler_object_inline_componentStack_2492) + JSCompiler_object_inline_message_2518 = + JSCompiler_object_inline_stack_2520.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2520.fallback; + if (JSCompiler_object_inline_componentStack_2521) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2491 = + (JSCompiler_object_inline_stack_2520 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2489, + JSCompiler_object_inline_message_2518, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2492 = + (JSCompiler_object_inline_componentStack_2521 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2492.memoizedState = + (JSCompiler_object_inline_componentStack_2521.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2492.childLanes = + (JSCompiler_object_inline_componentStack_2521.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2490, + JSCompiler_object_inline_digest_2519, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9652,9 +9658,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2492.updateQueue), + JSCompiler_object_inline_componentStack_2521.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2492.updateQueue = + ? (JSCompiler_object_inline_componentStack_2521.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9662,46 +9668,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2491 + JSCompiler_object_inline_stack_2520 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2491.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2520.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2491 = + (JSCompiler_object_inline_stack_2520 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2489, + JSCompiler_object_inline_message_2518, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2492 = + (JSCompiler_object_inline_componentStack_2521 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2492.memoizedState = + (JSCompiler_object_inline_componentStack_2521.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2492.childLanes = + (JSCompiler_object_inline_componentStack_2521.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2490, + JSCompiler_object_inline_digest_2519, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2491 + JSCompiler_object_inline_stack_2520 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2489 + JSCompiler_object_inline_message_2518 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2489 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2489) + ((JSCompiler_object_inline_message_2518 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2518) ) { if (didSuspend) workInProgress.flags & 256 @@ -9718,94 +9724,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2492 = - JSCompiler_object_inline_stack_2491.fallback), - (JSCompiler_object_inline_message_2489 = workInProgress.mode), - (JSCompiler_object_inline_stack_2491 = + (JSCompiler_object_inline_componentStack_2521 = + JSCompiler_object_inline_stack_2520.fallback), + (JSCompiler_object_inline_message_2518 = workInProgress.mode), + (JSCompiler_object_inline_stack_2520 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2491.children + children: JSCompiler_object_inline_stack_2520.children }, - JSCompiler_object_inline_message_2489 + JSCompiler_object_inline_message_2518 )), - (JSCompiler_object_inline_componentStack_2492 = + (JSCompiler_object_inline_componentStack_2521 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2492, - JSCompiler_object_inline_message_2489, + JSCompiler_object_inline_componentStack_2521, + JSCompiler_object_inline_message_2518, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2492.flags |= 2), - (JSCompiler_object_inline_stack_2491.return = workInProgress), - (JSCompiler_object_inline_componentStack_2492.return = + (JSCompiler_object_inline_componentStack_2521.flags |= 2), + (JSCompiler_object_inline_stack_2520.return = workInProgress), + (JSCompiler_object_inline_componentStack_2521.return = workInProgress), - (JSCompiler_object_inline_stack_2491.sibling = - JSCompiler_object_inline_componentStack_2492), - (workInProgress.child = JSCompiler_object_inline_stack_2491), + (JSCompiler_object_inline_stack_2520.sibling = + JSCompiler_object_inline_componentStack_2521), + (workInProgress.child = JSCompiler_object_inline_stack_2520), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2491 = workInProgress.child), - (JSCompiler_object_inline_stack_2491.memoizedState = + (JSCompiler_object_inline_stack_2520 = workInProgress.child), + (JSCompiler_object_inline_stack_2520.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2491.childLanes = + (JSCompiler_object_inline_stack_2520.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2490, + JSCompiler_object_inline_digest_2519, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2492)); + JSCompiler_object_inline_componentStack_2521)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2489)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2518)) ) { - JSCompiler_object_inline_digest_2490 = - JSCompiler_object_inline_message_2489.nextSibling && - JSCompiler_object_inline_message_2489.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2490) { - JSCompiler_temp = JSCompiler_object_inline_digest_2490.dgst; - var message = JSCompiler_object_inline_digest_2490.msg; - instance = JSCompiler_object_inline_digest_2490.stck; - var componentStack = JSCompiler_object_inline_digest_2490.cstck; + JSCompiler_object_inline_digest_2519 = + JSCompiler_object_inline_message_2518.nextSibling && + JSCompiler_object_inline_message_2518.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2519) { + JSCompiler_temp = JSCompiler_object_inline_digest_2519.dgst; + var message = JSCompiler_object_inline_digest_2519.msg; + instance = JSCompiler_object_inline_digest_2519.stck; + var componentStack = JSCompiler_object_inline_digest_2519.cstck; } - JSCompiler_object_inline_message_2489 = message; - JSCompiler_object_inline_digest_2490 = JSCompiler_temp; - JSCompiler_object_inline_stack_2491 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2492 = + JSCompiler_object_inline_message_2518 = message; + JSCompiler_object_inline_digest_2519 = JSCompiler_temp; + JSCompiler_object_inline_stack_2520 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2521 = componentStack; - JSCompiler_object_inline_componentStack_2492 = - JSCompiler_object_inline_message_2489 - ? Error(JSCompiler_object_inline_message_2489) + JSCompiler_object_inline_componentStack_2521 = + JSCompiler_object_inline_message_2518 + ? Error(JSCompiler_object_inline_message_2518) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2492.stack = - JSCompiler_object_inline_stack_2491 || ""; - JSCompiler_object_inline_componentStack_2492.digest = - JSCompiler_object_inline_digest_2490; - JSCompiler_object_inline_digest_2490 = + JSCompiler_object_inline_componentStack_2521.stack = + JSCompiler_object_inline_stack_2520 || ""; + JSCompiler_object_inline_componentStack_2521.digest = + JSCompiler_object_inline_digest_2519; + JSCompiler_object_inline_digest_2519 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2491 = { - value: JSCompiler_object_inline_componentStack_2492, + JSCompiler_object_inline_stack_2520 = { + value: JSCompiler_object_inline_componentStack_2521, source: null, - stack: JSCompiler_object_inline_digest_2490 + stack: JSCompiler_object_inline_digest_2519 }; - "string" === typeof JSCompiler_object_inline_digest_2490 && + "string" === typeof JSCompiler_object_inline_digest_2519 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2492, - JSCompiler_object_inline_stack_2491 + JSCompiler_object_inline_componentStack_2521, + JSCompiler_object_inline_stack_2520 ); - queueHydrationError(JSCompiler_object_inline_stack_2491); + queueHydrationError(JSCompiler_object_inline_stack_2520); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9819,44 +9825,44 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2490 = + (JSCompiler_object_inline_digest_2519 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2490) + didReceiveUpdate || JSCompiler_object_inline_digest_2519) ) { - JSCompiler_object_inline_digest_2490 = workInProgressRoot; + JSCompiler_object_inline_digest_2519 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_digest_2490 && - ((JSCompiler_object_inline_stack_2491 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2491 = - 0 !== (JSCompiler_object_inline_stack_2491 & 42) + null !== JSCompiler_object_inline_digest_2519 && + ((JSCompiler_object_inline_stack_2520 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2520 = + 0 !== (JSCompiler_object_inline_stack_2520 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2491 + JSCompiler_object_inline_stack_2520 )), - (JSCompiler_object_inline_stack_2491 = + (JSCompiler_object_inline_stack_2520 = 0 !== - (JSCompiler_object_inline_stack_2491 & - (JSCompiler_object_inline_digest_2490.suspendedLanes | + (JSCompiler_object_inline_stack_2520 & + (JSCompiler_object_inline_digest_2519.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2491), - 0 !== JSCompiler_object_inline_stack_2491 && - JSCompiler_object_inline_stack_2491 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2520), + 0 !== JSCompiler_object_inline_stack_2520 && + JSCompiler_object_inline_stack_2520 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2491), + ((prevState.retryLane = JSCompiler_object_inline_stack_2520), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2491 + JSCompiler_object_inline_stack_2520 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2490, + JSCompiler_object_inline_digest_2519, current, - JSCompiler_object_inline_stack_2491 + JSCompiler_object_inline_stack_2520 ), SelectiveHydrationException) ); - JSCompiler_object_inline_message_2489.data === + JSCompiler_object_inline_message_2518.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9864,14 +9870,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2489.data === + JSCompiler_object_inline_message_2518.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2489.nextSibling + JSCompiler_object_inline_message_2518.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9889,57 +9895,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2491.children + JSCompiler_object_inline_stack_2520.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2492) + if (JSCompiler_object_inline_componentStack_2521) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2492 = - JSCompiler_object_inline_stack_2491.fallback), - (JSCompiler_object_inline_message_2489 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2521 = + JSCompiler_object_inline_stack_2520.fallback), + (JSCompiler_object_inline_message_2518 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2491 = createWorkInProgress( + (JSCompiler_object_inline_stack_2520 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2491.children + children: JSCompiler_object_inline_stack_2520.children } )), - (JSCompiler_object_inline_stack_2491.subtreeFlags = + (JSCompiler_object_inline_stack_2520.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2492 = + ? (JSCompiler_object_inline_componentStack_2521 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2492 + JSCompiler_object_inline_componentStack_2521 )) - : ((JSCompiler_object_inline_componentStack_2492 = + : ((JSCompiler_object_inline_componentStack_2521 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2492, - JSCompiler_object_inline_message_2489, + JSCompiler_object_inline_componentStack_2521, + JSCompiler_object_inline_message_2518, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2492.flags |= 2)), - (JSCompiler_object_inline_componentStack_2492.return = + (JSCompiler_object_inline_componentStack_2521.flags |= 2)), + (JSCompiler_object_inline_componentStack_2521.return = workInProgress), - (JSCompiler_object_inline_stack_2491.return = workInProgress), - (JSCompiler_object_inline_stack_2491.sibling = - JSCompiler_object_inline_componentStack_2492), - (workInProgress.child = JSCompiler_object_inline_stack_2491), - (JSCompiler_object_inline_stack_2491 = - JSCompiler_object_inline_componentStack_2492), - (JSCompiler_object_inline_componentStack_2492 = workInProgress.child), - (JSCompiler_object_inline_message_2489 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2489 - ? (JSCompiler_object_inline_message_2489 = + (JSCompiler_object_inline_stack_2520.return = workInProgress), + (JSCompiler_object_inline_stack_2520.sibling = + JSCompiler_object_inline_componentStack_2521), + (workInProgress.child = JSCompiler_object_inline_stack_2520), + (JSCompiler_object_inline_stack_2520 = + JSCompiler_object_inline_componentStack_2521), + (JSCompiler_object_inline_componentStack_2521 = workInProgress.child), + (JSCompiler_object_inline_message_2518 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2518 + ? (JSCompiler_object_inline_message_2518 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2489.cachePool), + JSCompiler_object_inline_message_2518.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9947,34 +9953,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2489 = { + (JSCompiler_object_inline_message_2518 = { baseLanes: - JSCompiler_object_inline_message_2489.baseLanes | renderLanes, + JSCompiler_object_inline_message_2518.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2492.memoizedState = - JSCompiler_object_inline_message_2489), + (JSCompiler_object_inline_componentStack_2521.memoizedState = + JSCompiler_object_inline_message_2518), enableTransitionTracing && - ((JSCompiler_object_inline_message_2489 = enableTransitionTracing + ((JSCompiler_object_inline_message_2518 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2489 && + null !== JSCompiler_object_inline_message_2518 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2492.updateQueue), + JSCompiler_object_inline_componentStack_2521.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2492.updateQueue = { - transitions: JSCompiler_object_inline_message_2489, + ? (JSCompiler_object_inline_componentStack_2521.updateQueue = { + transitions: JSCompiler_object_inline_message_2518, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2492.updateQueue = + ? (JSCompiler_object_inline_componentStack_2521.updateQueue = { - transitions: JSCompiler_object_inline_message_2489, + transitions: JSCompiler_object_inline_message_2518, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9982,32 +9988,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2489), + JSCompiler_object_inline_message_2518), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2492.childLanes = + (JSCompiler_object_inline_componentStack_2521.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2490, + JSCompiler_object_inline_digest_2519, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2491 + JSCompiler_object_inline_stack_2520 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2491.children + children: JSCompiler_object_inline_stack_2520.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2490 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2490 + ((JSCompiler_object_inline_digest_2519 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2519 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2490.push(current)); + : JSCompiler_object_inline_digest_2519.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -13816,12 +13822,6 @@ __DEV__ && } }); } - function commitMutationEffects(root, finishedWork, committedLanes) { - inProgressLanes = committedLanes; - inProgressRoot = root; - commitMutationEffectsOnFiber(finishedWork, root); - inProgressRoot = inProgressLanes = null; - } function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) { var deletions = parentFiber.deletions; if (null !== deletions) @@ -15646,21 +15646,17 @@ __DEV__ && default: throw Error("Unknown root exit status."); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if (null !== ReactSharedInternals.actQueue) commitRoot( shouldTimeSlice, + forceSync, + lanes, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane, workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - exitStatus, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + workInProgressSuspendedRetryLanes ); else { if ( @@ -15678,7 +15674,7 @@ __DEV__ && workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -15740,18 +15736,24 @@ __DEV__ && completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = noTimeout; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -15774,16 +15776,14 @@ __DEV__ && } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -15879,8 +15879,6 @@ __DEV__ && } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; timeoutHandle !== noTimeout && ((root.timeoutHandle = noTimeout), cancelTimeout(timeoutHandle)); @@ -16516,176 +16514,303 @@ __DEV__ && } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = Internals.p; - try { - (Internals.p = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (Internals.p = previousUpdateLanePriority); - } - } - function commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); ReactStrictModeWarnings.flushLegacyContextWarning(); ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markCommitStarted && injectedProfilingHooks.markCommitStarted(lanes); if (null === finishedWork) - return enableSchedulingProfiler && markCommitStopped(), null; - 0 === lanes && - error$jscomp$0( - "root.finishedLanes should not be empty during a commit. This is a bug in React." + enableSchedulingProfiler && markCommitStopped(); + else { + 0 === lanes && + error$jscomp$0( + "finishedLanes should not be empty during a commit. This is a bug in React." + ); + if (finishedWork === root.current) + throw Error( + "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + ); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes ); - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) - throw Error( - "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + commitStartTime = now(); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = Internals.p; + Internals.p = DiscreteEventPriority; + updatedLanes = executionContext; + executionContext |= CommitContext; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (Internals.p = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate ); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; - 0 !== (finishedWork.subtreeFlags & 10256) || - 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = Internals.p), - (Internals.p = DiscreteEventPriority), - (suspendedRetryLanes = executionContext), - (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffects(root, finishedWork, lanes), - shouldFireAfterActiveInstanceBlur && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), + } + } + function flushMutationEffects(root, finishedWork, lanes) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { + inProgressLanes = lanes; + inProgressRoot = root; + commitMutationEffectsOnFiber(finishedWork, root); + inProgressRoot = inProgressLanes = null; + if (shouldFireAfterActiveInstanceBlur) { + _enabled = !0; + var target = selectionInformation.focusedElem, + event = createEvent("afterblur", !1); + event.relatedTarget = target; + document.dispatchEvent(event); + _enabled = !1; + } + lanes = selectionInformation; + var curFocusedElem = getActiveElementDeep(root.containerInfo), + priorFocusedElem = lanes.focusedElem, + priorSelectionRange = lanes.selectionRange; + if ( + curFocusedElem !== priorFocusedElem && + priorFocusedElem && + priorFocusedElem.ownerDocument && + containsNode( + priorFocusedElem.ownerDocument.documentElement, + priorFocusedElem + ) + ) { + if ( + null !== priorSelectionRange && + hasSelectionCapabilities(priorFocusedElem) + ) { + var start = priorSelectionRange.start, + end = priorSelectionRange.end; + void 0 === end && (end = start); + if ("selectionStart" in priorFocusedElem) + (priorFocusedElem.selectionStart = start), + (priorFocusedElem.selectionEnd = Math.min( + end, + priorFocusedElem.value.length + )); + else { + var doc = priorFocusedElem.ownerDocument || document, + win = (doc && doc.defaultView) || window; + if (win.getSelection) { + var selection = win.getSelection(), + length = priorFocusedElem.textContent.length, + start$jscomp$0 = Math.min( + priorSelectionRange.start, + length + ), + end$jscomp$0 = + void 0 === priorSelectionRange.end + ? start$jscomp$0 + : Math.min(priorSelectionRange.end, length); + !selection.extend && + start$jscomp$0 > end$jscomp$0 && + ((curFocusedElem = end$jscomp$0), + (end$jscomp$0 = start$jscomp$0), + (start$jscomp$0 = curFocusedElem)); + var startMarker = getNodeForCharacterOffset( + priorFocusedElem, + start$jscomp$0 + ), + endMarker = getNodeForCharacterOffset( + priorFocusedElem, + end$jscomp$0 + ); + if ( + startMarker && + endMarker && + (1 !== selection.rangeCount || + selection.anchorNode !== startMarker.node || + selection.anchorOffset !== startMarker.offset || + selection.focusNode !== endMarker.node || + selection.focusOffset !== endMarker.offset) + ) { + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + start$jscomp$0 > end$jscomp$0 + ? (selection.addRange(range), + selection.extend(endMarker.node, endMarker.offset)) + : (range.setEnd(endMarker.node, endMarker.offset), + selection.addRange(range)); + } + } + } + } + doc = []; + for ( + selection = priorFocusedElem; + (selection = selection.parentNode); + + ) + 1 === selection.nodeType && + doc.push({ + element: selection, + left: selection.scrollLeft, + top: selection.scrollTop + }); + "function" === typeof priorFocusedElem.focus && + priorFocusedElem.focus(); + for ( + priorFocusedElem = 0; + priorFocusedElem < doc.length; + priorFocusedElem++ + ) { + var info = doc[priorFocusedElem]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; + } + function flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), - enableSchedulingProfiler && + commitLayoutEffects(finishedWork, root, lanes), enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = suspendedRetryLanes), - (Internals.p = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = spawnedLane) - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); + (rootHasLayoutEffect = + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256)) + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : (releaseRootPooledCache(root, remainingLanes), + : (releaseRootPooledCache(root, root.pendingLanes), (nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); + previousPriority = root.pendingLanes; + 0 === previousPriority && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot$1(finishedWork.stateNode, rootHasLayoutEffect); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - (spawnedLane = makeErrorInfo(remainingLanes.stack)), + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = Internals.p; + Internals.p = DiscreteEventPriority; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority], + errorInfo = makeErrorInfo(recoverableError.stack); runWithFiberInDEV( - remainingLanes.source, - renderPriorityLevel, - remainingLanes.value, - spawnedLane + recoverableError.source, + onRecoverableError, + recoverableError.value, + errorInfo ); + } + } finally { + (ReactSharedInternals.T = finishedWork), + (Internals.p = rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + previousPriority = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (previousPriority & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ @@ -16711,7 +16836,6 @@ __DEV__ && : (currentEndTime = endTime); }); } - return null; } function makeErrorInfo(componentStack) { componentStack = { componentStack: componentStack }; @@ -17659,11 +17783,7 @@ __DEV__ && ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = noTimeout; this.callbackNode = this.next = @@ -17676,7 +17796,6 @@ __DEV__ && this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -18353,100 +18472,6 @@ __DEV__ && "true" === elem.contentEditable) ); } - function restoreSelection(priorSelectionInformation, containerInfo) { - var curFocusedElem = getActiveElementDeep(containerInfo); - containerInfo = priorSelectionInformation.focusedElem; - var priorSelectionRange = priorSelectionInformation.selectionRange; - if ( - curFocusedElem !== containerInfo && - containerInfo && - containerInfo.ownerDocument && - containsNode(containerInfo.ownerDocument.documentElement, containerInfo) - ) { - if ( - null !== priorSelectionRange && - hasSelectionCapabilities(containerInfo) - ) - if ( - ((priorSelectionInformation = priorSelectionRange.start), - (curFocusedElem = priorSelectionRange.end), - void 0 === curFocusedElem && - (curFocusedElem = priorSelectionInformation), - "selectionStart" in containerInfo) - ) - (containerInfo.selectionStart = priorSelectionInformation), - (containerInfo.selectionEnd = Math.min( - curFocusedElem, - containerInfo.value.length - )); - else if ( - ((curFocusedElem = - ((priorSelectionInformation = - containerInfo.ownerDocument || document) && - priorSelectionInformation.defaultView) || - window), - curFocusedElem.getSelection) - ) { - curFocusedElem = curFocusedElem.getSelection(); - var length = containerInfo.textContent.length, - start = Math.min(priorSelectionRange.start, length); - priorSelectionRange = - void 0 === priorSelectionRange.end - ? start - : Math.min(priorSelectionRange.end, length); - !curFocusedElem.extend && - start > priorSelectionRange && - ((length = priorSelectionRange), - (priorSelectionRange = start), - (start = length)); - length = getNodeForCharacterOffset(containerInfo, start); - var endMarker = getNodeForCharacterOffset( - containerInfo, - priorSelectionRange - ); - length && - endMarker && - (1 !== curFocusedElem.rangeCount || - curFocusedElem.anchorNode !== length.node || - curFocusedElem.anchorOffset !== length.offset || - curFocusedElem.focusNode !== endMarker.node || - curFocusedElem.focusOffset !== endMarker.offset) && - ((priorSelectionInformation = - priorSelectionInformation.createRange()), - priorSelectionInformation.setStart(length.node, length.offset), - curFocusedElem.removeAllRanges(), - start > priorSelectionRange - ? (curFocusedElem.addRange(priorSelectionInformation), - curFocusedElem.extend(endMarker.node, endMarker.offset)) - : (priorSelectionInformation.setEnd( - endMarker.node, - endMarker.offset - ), - curFocusedElem.addRange(priorSelectionInformation))); - } - priorSelectionInformation = []; - for ( - curFocusedElem = containerInfo; - (curFocusedElem = curFocusedElem.parentNode); - - ) - 1 === curFocusedElem.nodeType && - priorSelectionInformation.push({ - element: curFocusedElem, - left: curFocusedElem.scrollLeft, - top: curFocusedElem.scrollTop - }); - "function" === typeof containerInfo.focus && containerInfo.focus(); - for ( - containerInfo = 0; - containerInfo < priorSelectionInformation.length; - containerInfo++ - ) - (curFocusedElem = priorSelectionInformation[containerInfo]), - (curFocusedElem.element.scrollLeft = curFocusedElem.left), - (curFocusedElem.element.scrollTop = curFocusedElem.top); - } - } function constructSelectEvent( dispatchQueue, nativeEvent, @@ -21742,11 +21767,6 @@ __DEV__ && event.initEvent(type, bubbles, !1); return event; } - function dispatchAfterDetachedBlur(target) { - var event = createEvent("afterblur", !1); - event.relatedTarget = target; - document.dispatchEvent(event); - } function removeChild(parentInstance, child) { parentInstance.removeChild(child); } @@ -27381,11 +27401,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.1.0-www-classic-d8b903f4-20250102" !== isomorphicReactPackageVersion) + if ("19.1.0-www-classic-c81312e3-20250102" !== 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.1.0-www-classic-d8b903f4-20250102\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.1.0-www-classic-c81312e3-20250102\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27428,10 +27448,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.1.0-www-classic-d8b903f4-20250102", + version: "19.1.0-www-classic-c81312e3-20250102", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-classic-c81312e3-20250102" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28029,7 +28049,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.1.0-www-classic-d8b903f4-20250102"; + exports.version = "19.1.0-www-classic-c81312e3-20250102"; "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 b7ade609296af..0da03aae46786 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -1007,14 +1007,13 @@ __DEV__ && ); } } - function getNextLanes(root, wipLanes) { + function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -1024,29 +1023,30 @@ __DEV__ && 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -4001,7 +4001,9 @@ __DEV__ && (nextLanes = workInProgressRootRenderLanes), (nextLanes = getNextLanes( root, - root === workInProgressRoot ? nextLanes : 0 + root === workInProgressRoot ? nextLanes : 0, + null !== root.cancelPendingCommit || + root.timeoutHandle !== noTimeout )), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root, nextLanes) || @@ -4070,7 +4072,8 @@ __DEV__ && suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); pingedLanes = root.callbackNode; if ( @@ -4135,7 +4138,10 @@ __DEV__ && workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot + ? workInProgressRootRenderLanes$jscomp$0 + : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -9345,32 +9351,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_2511; + var JSCompiler_object_inline_stack_2512 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2484 = !1; + var JSCompiler_object_inline_componentStack_2513 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2482 = didSuspend) || - (JSCompiler_object_inline_digest_2482 = + (JSCompiler_object_inline_digest_2511 = didSuspend) || + (JSCompiler_object_inline_digest_2511 = 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_2511 && + ((JSCompiler_object_inline_componentStack_2513 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2482 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2511 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2484 + JSCompiler_object_inline_componentStack_2513 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2481 = nextHydratableInstance; + var JSCompiler_object_inline_message_2510 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2481)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2510)) { c: { - var instance = JSCompiler_object_inline_message_2481; + var instance = JSCompiler_object_inline_message_2510; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9412,46 +9418,46 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2481 + JSCompiler_object_inline_message_2510 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2481 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2510 = 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_2510 && + ((JSCompiler_object_inline_message_2510 = + JSCompiler_object_inline_message_2510.dehydrated), + null !== JSCompiler_object_inline_message_2510) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2481) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2510) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); 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_2510 = + JSCompiler_object_inline_stack_2512.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2512.fallback; + if (JSCompiler_object_inline_componentStack_2513) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2483 = + (JSCompiler_object_inline_stack_2512 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2481, + JSCompiler_object_inline_message_2510, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2484 = + (JSCompiler_object_inline_componentStack_2513 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2484.memoizedState = + (JSCompiler_object_inline_componentStack_2513.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2484.childLanes = + (JSCompiler_object_inline_componentStack_2513.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2511, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9464,9 +9470,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2484.updateQueue), + JSCompiler_object_inline_componentStack_2513.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2484.updateQueue = + ? (JSCompiler_object_inline_componentStack_2513.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9474,46 +9480,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2512 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2483.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2512.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2483 = + (JSCompiler_object_inline_stack_2512 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2481, + JSCompiler_object_inline_message_2510, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2484 = + (JSCompiler_object_inline_componentStack_2513 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2484.memoizedState = + (JSCompiler_object_inline_componentStack_2513.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2484.childLanes = + (JSCompiler_object_inline_componentStack_2513.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2511, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2512 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2481 + JSCompiler_object_inline_message_2510 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2481 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2481) + ((JSCompiler_object_inline_message_2510 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2510) ) { if (didSuspend) workInProgress.flags & 256 @@ -9530,94 +9536,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_2513 = + JSCompiler_object_inline_stack_2512.fallback), + (JSCompiler_object_inline_message_2510 = workInProgress.mode), + (JSCompiler_object_inline_stack_2512 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2483.children + children: JSCompiler_object_inline_stack_2512.children }, - JSCompiler_object_inline_message_2481 + JSCompiler_object_inline_message_2510 )), - (JSCompiler_object_inline_componentStack_2484 = + (JSCompiler_object_inline_componentStack_2513 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2484, - JSCompiler_object_inline_message_2481, + JSCompiler_object_inline_componentStack_2513, + JSCompiler_object_inline_message_2510, 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_2513.flags |= 2), + (JSCompiler_object_inline_stack_2512.return = workInProgress), + (JSCompiler_object_inline_componentStack_2513.return = workInProgress), - (JSCompiler_object_inline_stack_2483.sibling = - JSCompiler_object_inline_componentStack_2484), - (workInProgress.child = JSCompiler_object_inline_stack_2483), + (JSCompiler_object_inline_stack_2512.sibling = + JSCompiler_object_inline_componentStack_2513), + (workInProgress.child = JSCompiler_object_inline_stack_2512), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2483 = workInProgress.child), - (JSCompiler_object_inline_stack_2483.memoizedState = + (JSCompiler_object_inline_stack_2512 = workInProgress.child), + (JSCompiler_object_inline_stack_2512.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2483.childLanes = + (JSCompiler_object_inline_stack_2512.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2511, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2484)); + JSCompiler_object_inline_componentStack_2513)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2481)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2510)) ) { - 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_2511 = + JSCompiler_object_inline_message_2510.nextSibling && + JSCompiler_object_inline_message_2510.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2511) { + JSCompiler_temp = JSCompiler_object_inline_digest_2511.dgst; + var message = JSCompiler_object_inline_digest_2511.msg; + instance = JSCompiler_object_inline_digest_2511.stck; + var componentStack = JSCompiler_object_inline_digest_2511.cstck; } - JSCompiler_object_inline_message_2481 = message; - JSCompiler_object_inline_digest_2482 = JSCompiler_temp; - JSCompiler_object_inline_stack_2483 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2484 = + JSCompiler_object_inline_message_2510 = message; + JSCompiler_object_inline_digest_2511 = JSCompiler_temp; + JSCompiler_object_inline_stack_2512 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2513 = componentStack; - JSCompiler_object_inline_componentStack_2484 = - JSCompiler_object_inline_message_2481 - ? Error(JSCompiler_object_inline_message_2481) + JSCompiler_object_inline_componentStack_2513 = + JSCompiler_object_inline_message_2510 + ? Error(JSCompiler_object_inline_message_2510) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2484.stack = - JSCompiler_object_inline_stack_2483 || ""; - JSCompiler_object_inline_componentStack_2484.digest = - JSCompiler_object_inline_digest_2482; - JSCompiler_object_inline_digest_2482 = + JSCompiler_object_inline_componentStack_2513.stack = + JSCompiler_object_inline_stack_2512 || ""; + JSCompiler_object_inline_componentStack_2513.digest = + JSCompiler_object_inline_digest_2511; + JSCompiler_object_inline_digest_2511 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2483 = { - value: JSCompiler_object_inline_componentStack_2484, + JSCompiler_object_inline_stack_2512 = { + value: JSCompiler_object_inline_componentStack_2513, source: null, - stack: JSCompiler_object_inline_digest_2482 + stack: JSCompiler_object_inline_digest_2511 }; - "string" === typeof JSCompiler_object_inline_digest_2482 && + "string" === typeof JSCompiler_object_inline_digest_2511 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2484, - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_componentStack_2513, + JSCompiler_object_inline_stack_2512 ); - queueHydrationError(JSCompiler_object_inline_stack_2483); + queueHydrationError(JSCompiler_object_inline_stack_2512); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9631,44 +9637,44 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2482 = + (JSCompiler_object_inline_digest_2511 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2482) + didReceiveUpdate || JSCompiler_object_inline_digest_2511) ) { - JSCompiler_object_inline_digest_2482 = workInProgressRoot; + JSCompiler_object_inline_digest_2511 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_digest_2482 && - ((JSCompiler_object_inline_stack_2483 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2483 = - 0 !== (JSCompiler_object_inline_stack_2483 & 42) + null !== JSCompiler_object_inline_digest_2511 && + ((JSCompiler_object_inline_stack_2512 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2512 = + 0 !== (JSCompiler_object_inline_stack_2512 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2512 )), - (JSCompiler_object_inline_stack_2483 = + (JSCompiler_object_inline_stack_2512 = 0 !== - (JSCompiler_object_inline_stack_2483 & - (JSCompiler_object_inline_digest_2482.suspendedLanes | + (JSCompiler_object_inline_stack_2512 & + (JSCompiler_object_inline_digest_2511.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2483), - 0 !== JSCompiler_object_inline_stack_2483 && - JSCompiler_object_inline_stack_2483 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2512), + 0 !== JSCompiler_object_inline_stack_2512 && + JSCompiler_object_inline_stack_2512 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2483), + ((prevState.retryLane = JSCompiler_object_inline_stack_2512), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2512 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2511, current, - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2512 ), SelectiveHydrationException) ); - JSCompiler_object_inline_message_2481.data === + JSCompiler_object_inline_message_2510.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9676,14 +9682,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2481.data === + JSCompiler_object_inline_message_2510.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2481.nextSibling + JSCompiler_object_inline_message_2510.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9701,57 +9707,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2483.children + JSCompiler_object_inline_stack_2512.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2484) + if (JSCompiler_object_inline_componentStack_2513) 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_2513 = + JSCompiler_object_inline_stack_2512.fallback), + (JSCompiler_object_inline_message_2510 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2483 = createWorkInProgress( + (JSCompiler_object_inline_stack_2512 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2483.children + children: JSCompiler_object_inline_stack_2512.children } )), - (JSCompiler_object_inline_stack_2483.subtreeFlags = + (JSCompiler_object_inline_stack_2512.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2484 = + ? (JSCompiler_object_inline_componentStack_2513 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2484 + JSCompiler_object_inline_componentStack_2513 )) - : ((JSCompiler_object_inline_componentStack_2484 = + : ((JSCompiler_object_inline_componentStack_2513 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2484, - JSCompiler_object_inline_message_2481, + JSCompiler_object_inline_componentStack_2513, + JSCompiler_object_inline_message_2510, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2484.flags |= 2)), - (JSCompiler_object_inline_componentStack_2484.return = + (JSCompiler_object_inline_componentStack_2513.flags |= 2)), + (JSCompiler_object_inline_componentStack_2513.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_2512.return = workInProgress), + (JSCompiler_object_inline_stack_2512.sibling = + JSCompiler_object_inline_componentStack_2513), + (workInProgress.child = JSCompiler_object_inline_stack_2512), + (JSCompiler_object_inline_stack_2512 = + JSCompiler_object_inline_componentStack_2513), + (JSCompiler_object_inline_componentStack_2513 = workInProgress.child), + (JSCompiler_object_inline_message_2510 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2510 + ? (JSCompiler_object_inline_message_2510 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2481.cachePool), + JSCompiler_object_inline_message_2510.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9759,34 +9765,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2481 = { + (JSCompiler_object_inline_message_2510 = { baseLanes: - JSCompiler_object_inline_message_2481.baseLanes | renderLanes, + JSCompiler_object_inline_message_2510.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2484.memoizedState = - JSCompiler_object_inline_message_2481), + (JSCompiler_object_inline_componentStack_2513.memoizedState = + JSCompiler_object_inline_message_2510), enableTransitionTracing && - ((JSCompiler_object_inline_message_2481 = enableTransitionTracing + ((JSCompiler_object_inline_message_2510 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2481 && + null !== JSCompiler_object_inline_message_2510 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2484.updateQueue), + JSCompiler_object_inline_componentStack_2513.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2484.updateQueue = { - transitions: JSCompiler_object_inline_message_2481, + ? (JSCompiler_object_inline_componentStack_2513.updateQueue = { + transitions: JSCompiler_object_inline_message_2510, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2484.updateQueue = + ? (JSCompiler_object_inline_componentStack_2513.updateQueue = { - transitions: JSCompiler_object_inline_message_2481, + transitions: JSCompiler_object_inline_message_2510, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9794,32 +9800,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2481), + JSCompiler_object_inline_message_2510), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2484.childLanes = + (JSCompiler_object_inline_componentStack_2513.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2482, + JSCompiler_object_inline_digest_2511, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2483 + JSCompiler_object_inline_stack_2512 ); 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_2512.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_2511 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2511 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2482.push(current)); + : JSCompiler_object_inline_digest_2511.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -13615,12 +13621,6 @@ __DEV__ && } }); } - function commitMutationEffects(root, finishedWork, committedLanes) { - inProgressLanes = committedLanes; - inProgressRoot = root; - commitMutationEffectsOnFiber(finishedWork, root); - inProgressRoot = inProgressLanes = null; - } function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) { var deletions = parentFiber.deletions; if (null !== deletions) @@ -15445,21 +15445,17 @@ __DEV__ && default: throw Error("Unknown root exit status."); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if (null !== ReactSharedInternals.actQueue) commitRoot( shouldTimeSlice, + forceSync, + lanes, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane, workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - exitStatus, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + workInProgressSuspendedRetryLanes ); else { if ( @@ -15477,7 +15473,7 @@ __DEV__ && workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -15539,18 +15535,24 @@ __DEV__ && completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = noTimeout; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -15573,16 +15575,14 @@ __DEV__ && } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -15678,8 +15678,6 @@ __DEV__ && } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; timeoutHandle !== noTimeout && ((root.timeoutHandle = noTimeout), cancelTimeout(timeoutHandle)); @@ -16311,176 +16309,303 @@ __DEV__ && } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = Internals.p; - try { - (Internals.p = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (Internals.p = previousUpdateLanePriority); - } - } - function commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); ReactStrictModeWarnings.flushLegacyContextWarning(); ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markCommitStarted && injectedProfilingHooks.markCommitStarted(lanes); if (null === finishedWork) - return enableSchedulingProfiler && markCommitStopped(), null; - 0 === lanes && - error$jscomp$0( - "root.finishedLanes should not be empty during a commit. This is a bug in React." + enableSchedulingProfiler && markCommitStopped(); + else { + 0 === lanes && + error$jscomp$0( + "finishedLanes should not be empty during a commit. This is a bug in React." + ); + if (finishedWork === root.current) + throw Error( + "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + ); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes ); - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) - throw Error( - "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + commitStartTime = now(); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = Internals.p; + Internals.p = DiscreteEventPriority; + updatedLanes = executionContext; + executionContext |= CommitContext; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (Internals.p = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate ); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; - 0 !== (finishedWork.subtreeFlags & 10256) || - 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = Internals.p), - (Internals.p = DiscreteEventPriority), - (suspendedRetryLanes = executionContext), - (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffects(root, finishedWork, lanes), - shouldFireAfterActiveInstanceBlur && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), + } + } + function flushMutationEffects(root, finishedWork, lanes) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { + inProgressLanes = lanes; + inProgressRoot = root; + commitMutationEffectsOnFiber(finishedWork, root); + inProgressRoot = inProgressLanes = null; + if (shouldFireAfterActiveInstanceBlur) { + _enabled = !0; + var target = selectionInformation.focusedElem, + event = createEvent("afterblur", !1); + event.relatedTarget = target; + document.dispatchEvent(event); + _enabled = !1; + } + lanes = selectionInformation; + var curFocusedElem = getActiveElementDeep(root.containerInfo), + priorFocusedElem = lanes.focusedElem, + priorSelectionRange = lanes.selectionRange; + if ( + curFocusedElem !== priorFocusedElem && + priorFocusedElem && + priorFocusedElem.ownerDocument && + containsNode( + priorFocusedElem.ownerDocument.documentElement, + priorFocusedElem + ) + ) { + if ( + null !== priorSelectionRange && + hasSelectionCapabilities(priorFocusedElem) + ) { + var start = priorSelectionRange.start, + end = priorSelectionRange.end; + void 0 === end && (end = start); + if ("selectionStart" in priorFocusedElem) + (priorFocusedElem.selectionStart = start), + (priorFocusedElem.selectionEnd = Math.min( + end, + priorFocusedElem.value.length + )); + else { + var doc = priorFocusedElem.ownerDocument || document, + win = (doc && doc.defaultView) || window; + if (win.getSelection) { + var selection = win.getSelection(), + length = priorFocusedElem.textContent.length, + start$jscomp$0 = Math.min( + priorSelectionRange.start, + length + ), + end$jscomp$0 = + void 0 === priorSelectionRange.end + ? start$jscomp$0 + : Math.min(priorSelectionRange.end, length); + !selection.extend && + start$jscomp$0 > end$jscomp$0 && + ((curFocusedElem = end$jscomp$0), + (end$jscomp$0 = start$jscomp$0), + (start$jscomp$0 = curFocusedElem)); + var startMarker = getNodeForCharacterOffset( + priorFocusedElem, + start$jscomp$0 + ), + endMarker = getNodeForCharacterOffset( + priorFocusedElem, + end$jscomp$0 + ); + if ( + startMarker && + endMarker && + (1 !== selection.rangeCount || + selection.anchorNode !== startMarker.node || + selection.anchorOffset !== startMarker.offset || + selection.focusNode !== endMarker.node || + selection.focusOffset !== endMarker.offset) + ) { + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + start$jscomp$0 > end$jscomp$0 + ? (selection.addRange(range), + selection.extend(endMarker.node, endMarker.offset)) + : (range.setEnd(endMarker.node, endMarker.offset), + selection.addRange(range)); + } + } + } + } + doc = []; + for ( + selection = priorFocusedElem; + (selection = selection.parentNode); + + ) + 1 === selection.nodeType && + doc.push({ + element: selection, + left: selection.scrollLeft, + top: selection.scrollTop + }); + "function" === typeof priorFocusedElem.focus && + priorFocusedElem.focus(); + for ( + priorFocusedElem = 0; + priorFocusedElem < doc.length; + priorFocusedElem++ + ) { + var info = doc[priorFocusedElem]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; + } + function flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), - enableSchedulingProfiler && + commitLayoutEffects(finishedWork, root, lanes), enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = suspendedRetryLanes), - (Internals.p = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = spawnedLane) - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); + (rootHasLayoutEffect = + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256)) + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : (releaseRootPooledCache(root, remainingLanes), + : (releaseRootPooledCache(root, root.pendingLanes), (nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); + previousPriority = root.pendingLanes; + 0 === previousPriority && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot$1(finishedWork.stateNode, rootHasLayoutEffect); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - (spawnedLane = makeErrorInfo(remainingLanes.stack)), + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = Internals.p; + Internals.p = DiscreteEventPriority; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority], + errorInfo = makeErrorInfo(recoverableError.stack); runWithFiberInDEV( - remainingLanes.source, - renderPriorityLevel, - remainingLanes.value, - spawnedLane + recoverableError.source, + onRecoverableError, + recoverableError.value, + errorInfo ); + } + } finally { + (ReactSharedInternals.T = finishedWork), + (Internals.p = rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + previousPriority = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (previousPriority & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ @@ -16506,7 +16631,6 @@ __DEV__ && : (currentEndTime = endTime); }); } - return null; } function makeErrorInfo(componentStack) { componentStack = { componentStack: componentStack }; @@ -17454,11 +17578,7 @@ __DEV__ && ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = noTimeout; this.callbackNode = this.next = @@ -17471,7 +17591,6 @@ __DEV__ && this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -18144,100 +18263,6 @@ __DEV__ && "true" === elem.contentEditable) ); } - function restoreSelection(priorSelectionInformation, containerInfo) { - var curFocusedElem = getActiveElementDeep(containerInfo); - containerInfo = priorSelectionInformation.focusedElem; - var priorSelectionRange = priorSelectionInformation.selectionRange; - if ( - curFocusedElem !== containerInfo && - containerInfo && - containerInfo.ownerDocument && - containsNode(containerInfo.ownerDocument.documentElement, containerInfo) - ) { - if ( - null !== priorSelectionRange && - hasSelectionCapabilities(containerInfo) - ) - if ( - ((priorSelectionInformation = priorSelectionRange.start), - (curFocusedElem = priorSelectionRange.end), - void 0 === curFocusedElem && - (curFocusedElem = priorSelectionInformation), - "selectionStart" in containerInfo) - ) - (containerInfo.selectionStart = priorSelectionInformation), - (containerInfo.selectionEnd = Math.min( - curFocusedElem, - containerInfo.value.length - )); - else if ( - ((curFocusedElem = - ((priorSelectionInformation = - containerInfo.ownerDocument || document) && - priorSelectionInformation.defaultView) || - window), - curFocusedElem.getSelection) - ) { - curFocusedElem = curFocusedElem.getSelection(); - var length = containerInfo.textContent.length, - start = Math.min(priorSelectionRange.start, length); - priorSelectionRange = - void 0 === priorSelectionRange.end - ? start - : Math.min(priorSelectionRange.end, length); - !curFocusedElem.extend && - start > priorSelectionRange && - ((length = priorSelectionRange), - (priorSelectionRange = start), - (start = length)); - length = getNodeForCharacterOffset(containerInfo, start); - var endMarker = getNodeForCharacterOffset( - containerInfo, - priorSelectionRange - ); - length && - endMarker && - (1 !== curFocusedElem.rangeCount || - curFocusedElem.anchorNode !== length.node || - curFocusedElem.anchorOffset !== length.offset || - curFocusedElem.focusNode !== endMarker.node || - curFocusedElem.focusOffset !== endMarker.offset) && - ((priorSelectionInformation = - priorSelectionInformation.createRange()), - priorSelectionInformation.setStart(length.node, length.offset), - curFocusedElem.removeAllRanges(), - start > priorSelectionRange - ? (curFocusedElem.addRange(priorSelectionInformation), - curFocusedElem.extend(endMarker.node, endMarker.offset)) - : (priorSelectionInformation.setEnd( - endMarker.node, - endMarker.offset - ), - curFocusedElem.addRange(priorSelectionInformation))); - } - priorSelectionInformation = []; - for ( - curFocusedElem = containerInfo; - (curFocusedElem = curFocusedElem.parentNode); - - ) - 1 === curFocusedElem.nodeType && - priorSelectionInformation.push({ - element: curFocusedElem, - left: curFocusedElem.scrollLeft, - top: curFocusedElem.scrollTop - }); - "function" === typeof containerInfo.focus && containerInfo.focus(); - for ( - containerInfo = 0; - containerInfo < priorSelectionInformation.length; - containerInfo++ - ) - (curFocusedElem = priorSelectionInformation[containerInfo]), - (curFocusedElem.element.scrollLeft = curFocusedElem.left), - (curFocusedElem.element.scrollTop = curFocusedElem.top); - } - } function constructSelectEvent( dispatchQueue, nativeEvent, @@ -21529,11 +21554,6 @@ __DEV__ && event.initEvent(type, bubbles, !1); return event; } - function dispatchAfterDetachedBlur(target) { - var event = createEvent("afterblur", !1); - event.relatedTarget = target; - document.dispatchEvent(event); - } function removeChild(parentInstance, child) { parentInstance.removeChild(child); } @@ -27160,11 +27180,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.1.0-www-modern-d8b903f4-20250102" !== isomorphicReactPackageVersion) + if ("19.1.0-www-modern-c81312e3-20250102" !== 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.1.0-www-modern-d8b903f4-20250102\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.1.0-www-modern-c81312e3-20250102\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27207,10 +27227,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.1.0-www-modern-d8b903f4-20250102", + version: "19.1.0-www-modern-c81312e3-20250102", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-modern-c81312e3-20250102" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27808,7 +27828,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.1.0-www-modern-d8b903f4-20250102"; + exports.version = "19.1.0-www-modern-c81312e3-20250102"; "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 e0fb7aa4ec3b5..69d1727727196 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -626,14 +626,13 @@ function getHighestPriorityLanes(lanes) { return lanes; } } -function getNextLanes(root, wipLanes) { +function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -643,29 +642,29 @@ function getNextLanes(root, wipLanes) { 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -2166,7 +2165,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( root$27, - root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$27 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$27.cancelPendingCommit || + -1 !== root$27.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || @@ -2232,7 +2233,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); pingedLanes = root.callbackNode; if ( @@ -2289,7 +2291,8 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -8691,105 +8694,192 @@ var offscreenSubtreeIsHidden = !1, nextEffect = null, focusedInstanceHandle = null, shouldFireAfterActiveInstanceBlur = !1; -function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - deletions = fiber.deletions; - if (null !== deletions) - for (var i = 0; i < deletions.length; i++) { - var deletion = deletions[i]; - doesFiberContain(deletion, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(deletion)); +function commitBeforeMutationEffects(root, firstChild) { + root = root.containerInfo; + eventsEnabled = _enabled; + root = getActiveElementDeep(root); + if (hasSelectionCapabilities(root)) { + if ("selectionStart" in root) + var JSCompiler_temp = { + start: root.selectionStart, + end: root.selectionEnd + }; + else + a: { + JSCompiler_temp = + ((JSCompiler_temp = root.ownerDocument) && + JSCompiler_temp.defaultView) || + window; + var selection = + JSCompiler_temp.getSelection && JSCompiler_temp.getSelection(); + if (selection && 0 !== selection.rangeCount) { + JSCompiler_temp = selection.anchorNode; + var anchorOffset = selection.anchorOffset, + focusNode = selection.focusNode; + selection = selection.focusOffset; + try { + JSCompiler_temp.nodeType, focusNode.nodeType; + } catch (e$202) { + JSCompiler_temp = null; + break a; + } + var length = 0, + start = -1, + end = -1, + indexWithinAnchor = 0, + indexWithinFocus = 0, + node = root, + parentNode = null; + b: for (;;) { + for (var next; ; ) { + node !== JSCompiler_temp || + (0 !== anchorOffset && 3 !== node.nodeType) || + (start = length + anchorOffset); + node !== focusNode || + (0 !== selection && 3 !== node.nodeType) || + (end = length + selection); + 3 === node.nodeType && (length += node.nodeValue.length); + if (null === (next = node.firstChild)) break; + parentNode = node; + node = next; + } + for (;;) { + if (node === root) break b; + parentNode === JSCompiler_temp && + ++indexWithinAnchor === anchorOffset && + (start = length); + parentNode === focusNode && + ++indexWithinFocus === selection && + (end = length); + if (null !== (next = node.nextSibling)) break; + node = parentNode; + parentNode = node.parentNode; + } + node = next; + } + JSCompiler_temp = + -1 === start || -1 === end ? null : { start: start, end: end }; + } else JSCompiler_temp = null; } - deletions = fiber.child; - if (0 !== (fiber.subtreeFlags & 9236) && null !== deletions) - (deletions.return = fiber), (nextEffect = deletions); + JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 }; + } else JSCompiler_temp = null; + selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp }; + root = null; + JSCompiler_temp = selectionInformation.focusedElem; + null !== JSCompiler_temp && + (root = getClosestInstanceFromNode(JSCompiler_temp)); + _enabled = !1; + focusedInstanceHandle = root; + shouldFireAfterActiveInstanceBlur = !1; + for (nextEffect = firstChild; null !== nextEffect; ) { + firstChild = nextEffect; + root = firstChild.deletions; + if (null !== root) + for ( + JSCompiler_temp = 0; + JSCompiler_temp < root.length; + JSCompiler_temp++ + ) + (anchorOffset = root[JSCompiler_temp]), + doesFiberContain(anchorOffset, focusedInstanceHandle) && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(anchorOffset)); + root = firstChild.child; + if (0 !== (firstChild.subtreeFlags & 9236) && null !== root) + (root.return = firstChild), (nextEffect = root); else - a: for (; null !== nextEffect; ) { - fiber = nextEffect; - deletions = void 0; - var JSCompiler_temp; - i = fiber; - deletion = i.alternate; - var flags = i.flags; + for (; null !== nextEffect; ) { + firstChild = nextEffect; + root = firstChild.alternate; + JSCompiler_temp = firstChild.flags; if ( - !shouldFireAfterActiveInstanceBlur && - null !== focusedInstanceHandle + (anchorOffset = + !shouldFireAfterActiveInstanceBlur && + null !== focusedInstanceHandle) ) { - if ((JSCompiler_temp = 13 === i.tag)) - b: { + if ((anchorOffset = 13 === firstChild.tag)) + a: { if ( - null !== deletion && - ((JSCompiler_temp = deletion.memoizedState), - null === JSCompiler_temp || null !== JSCompiler_temp.dehydrated) + null !== root && + ((anchorOffset = root.memoizedState), + null === anchorOffset || null !== anchorOffset.dehydrated) ) { - JSCompiler_temp = i.memoizedState; - JSCompiler_temp = - null !== JSCompiler_temp && - null === JSCompiler_temp.dehydrated; - break b; + anchorOffset = firstChild.memoizedState; + anchorOffset = + null !== anchorOffset && null === anchorOffset.dehydrated; + break a; } - JSCompiler_temp = !1; + anchorOffset = !1; } - JSCompiler_temp && - doesFiberContain(i, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(i)); + anchorOffset = + anchorOffset && doesFiberContain(firstChild, focusedInstanceHandle); } - switch (i.tag) { + anchorOffset && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(firstChild)); + switch (firstChild.tag) { case 0: if ( - 0 !== (flags & 4) && - ((deletions = i.updateQueue), - (deletions = null !== deletions ? deletions.events : null), - null !== deletions) + 0 !== (JSCompiler_temp & 4) && + ((root = firstChild.updateQueue), + (root = null !== root ? root.events : null), + null !== root) ) - for (i = 0; i < deletions.length; i++) - (deletion = deletions[i]), - (deletion.ref.impl = deletion.nextImpl); + for ( + JSCompiler_temp = 0; + JSCompiler_temp < root.length; + JSCompiler_temp++ + ) + (anchorOffset = root[JSCompiler_temp]), + (anchorOffset.ref.impl = anchorOffset.nextImpl); break; case 11: case 15: break; case 1: - if (0 !== (flags & 1024) && null !== deletion) { - flags = deletion.memoizedProps; - deletion = deletion.memoizedState; - JSCompiler_temp = i.stateNode; + if (0 !== (JSCompiler_temp & 1024) && null !== root) { + JSCompiler_temp = void 0; + anchorOffset = firstChild; + focusNode = root.memoizedProps; + root = root.memoizedState; + selection = anchorOffset.stateNode; try { var resolvedPrevProps = resolveClassComponentProps( - i.type, - flags, - i.elementType === i.type + anchorOffset.type, + focusNode, + anchorOffset.elementType === anchorOffset.type ); - deletions = JSCompiler_temp.getSnapshotBeforeUpdate( + JSCompiler_temp = selection.getSnapshotBeforeUpdate( resolvedPrevProps, - deletion + root ); - JSCompiler_temp.__reactInternalSnapshotBeforeUpdate = deletions; + selection.__reactInternalSnapshotBeforeUpdate = JSCompiler_temp; } catch (error) { - captureCommitPhaseError(i, i.return, error); + captureCommitPhaseError( + anchorOffset, + anchorOffset.return, + error + ); } } break; case 3: - if (0 !== (flags & 1024)) - b: if ( - ((deletions = i.stateNode.containerInfo), - (i = deletions.nodeType), - 9 === i) + if (0 !== (JSCompiler_temp & 1024)) + if ( + ((root = firstChild.stateNode.containerInfo), + (JSCompiler_temp = root.nodeType), + 9 === JSCompiler_temp) ) - clearContainerSparingly(deletions); - else if (1 === i) - switch (deletions.nodeName) { + clearContainerSparingly(root); + else if (1 === JSCompiler_temp) + switch (root.nodeName) { case "HEAD": case "HTML": case "BODY": - clearContainerSparingly(deletions); - break b; + clearContainerSparingly(root); + break; default: - deletions.textContent = ""; + root.textContent = ""; } break; case 5: @@ -8800,17 +8890,19 @@ function commitBeforeMutationEffects_begin() { case 17: break; default: - if (0 !== (flags & 1024)) throw Error(formatProdErrorMessage(163)); + if (0 !== (JSCompiler_temp & 1024)) + throw Error(formatProdErrorMessage(163)); } - deletions = fiber.sibling; - if (null !== deletions) { - deletions.return = fiber.return; - nextEffect = deletions; - break a; + root = firstChild.sibling; + if (null !== root) { + root.return = firstChild.return; + nextEffect = root; + break; } - nextEffect = fiber.return; + nextEffect = firstChild.return; } } + focusedInstanceHandle = null; } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -11046,8 +11138,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { default: throw Error(formatProdErrorMessage(329)); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === renderWasConcurrent) && @@ -11060,7 +11150,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -11121,18 +11211,24 @@ function commitRootWhenReady( completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = -1; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -11150,16 +11246,14 @@ function commitRootWhenReady( } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -11252,8 +11346,6 @@ function resetWorkInProgressStack() { } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; -1 !== timeoutHandle && ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle)); @@ -11728,142 +11820,253 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) { } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = Internals.p; - try { - (Internals.p = 2), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (Internals.p = previousUpdateLanePriority); + root.cancelPendingCommit = null; + do flushPassiveEffects(); + while (null !== rootWithPendingPassiveEffects); + if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); + if (null !== finishedWork) { + if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = Internals.p; + Internals.p = 2; + updatedLanes = executionContext; + executionContext |= 4; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (Internals.p = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ); } } -function commitRootImpl( +function flushMutationEffects(root, finishedWork) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitMutationEffectsOnFiber(finishedWork, root); + if (shouldFireAfterActiveInstanceBlur) { + _enabled = !0; + var target = selectionInformation.focusedElem, + event = createEvent("afterblur", !1); + event.relatedTarget = target; + document.dispatchEvent(event); + _enabled = !1; + } + target = selectionInformation; + var curFocusedElem = getActiveElementDeep(root.containerInfo), + priorFocusedElem = target.focusedElem, + priorSelectionRange = target.selectionRange; + if ( + curFocusedElem !== priorFocusedElem && + priorFocusedElem && + priorFocusedElem.ownerDocument && + containsNode( + priorFocusedElem.ownerDocument.documentElement, + priorFocusedElem + ) + ) { + if ( + null !== priorSelectionRange && + hasSelectionCapabilities(priorFocusedElem) + ) { + var start = priorSelectionRange.start, + end = priorSelectionRange.end; + void 0 === end && (end = start); + if ("selectionStart" in priorFocusedElem) + (priorFocusedElem.selectionStart = start), + (priorFocusedElem.selectionEnd = Math.min( + end, + priorFocusedElem.value.length + )); + else { + var doc = priorFocusedElem.ownerDocument || document, + win = (doc && doc.defaultView) || window; + if (win.getSelection) { + var selection = win.getSelection(), + length = priorFocusedElem.textContent.length, + start$jscomp$0 = Math.min(priorSelectionRange.start, length), + end$jscomp$0 = + void 0 === priorSelectionRange.end + ? start$jscomp$0 + : Math.min(priorSelectionRange.end, length); + !selection.extend && + start$jscomp$0 > end$jscomp$0 && + ((curFocusedElem = end$jscomp$0), + (end$jscomp$0 = start$jscomp$0), + (start$jscomp$0 = curFocusedElem)); + var startMarker = getNodeForCharacterOffset( + priorFocusedElem, + start$jscomp$0 + ), + endMarker = getNodeForCharacterOffset( + priorFocusedElem, + end$jscomp$0 + ); + if ( + startMarker && + endMarker && + (1 !== selection.rangeCount || + selection.anchorNode !== startMarker.node || + selection.anchorOffset !== startMarker.offset || + selection.focusNode !== endMarker.node || + selection.focusOffset !== endMarker.offset) + ) { + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + start$jscomp$0 > end$jscomp$0 + ? (selection.addRange(range), + selection.extend(endMarker.node, endMarker.offset)) + : (range.setEnd(endMarker.node, endMarker.offset), + selection.addRange(range)); + } + } + } + } + doc = []; + for (selection = priorFocusedElem; (selection = selection.parentNode); ) + 1 === selection.nodeType && + doc.push({ + element: selection, + left: selection.scrollLeft, + top: selection.scrollTop + }); + "function" === typeof priorFocusedElem.focus && + priorFocusedElem.focus(); + for ( + priorFocusedElem = 0; + priorFocusedElem < doc.length; + priorFocusedElem++ + ) { + var info = doc[priorFocusedElem]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; +} +function flushLayoutEffects( root, + finishedWork, + lanes, recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + didIncludeRenderPhaseUpdate ) { - do flushPassiveEffects(); - while (null !== rootWithPendingPassiveEffects); - if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; - if (null === finishedWork) return null; - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = Internals.p), - (Internals.p = 2), - (suspendedRetryLanes = executionContext), - (executionContext |= 4), - (focusedInstanceHandle = prepareForCommit(root.containerInfo)), - (shouldFireAfterActiveInstanceBlur = !1), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - (focusedInstanceHandle = null), - commitMutationEffectsOnFiber(finishedWork, root), - shouldFireAfterActiveInstanceBlur && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = suspendedRetryLanes), - (Internals.p = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - spawnedLane - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : releaseRootPooledCache(root, remainingLanes); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - renderPriorityLevel(remainingLanes.value, { - componentStack: remainingLanes.stack + : releaseRootPooledCache(root, root.pendingLanes); + rootHasLayoutEffect = root.pendingLanes; + 0 === rootHasLayoutEffect && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot(finishedWork.stateNode, rootHasLayoutEffect); + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = Internals.p; + Internals.p = 2; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority]; + onRecoverableError(recoverableError.value, { + componentStack: recoverableError.stack }); + } + } finally { + (ReactSharedInternals.T = finishedWork), + (Internals.p = rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + rootHasLayoutEffect = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)) ? root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)) @@ -11886,7 +12089,6 @@ function commitRootImpl( : (currentEndTime = endTime); }); } - return null; } function releaseRootPooledCache(root, remainingLanes) { 0 === (root.pooledCacheLanes &= remainingLanes) && @@ -11896,7 +12098,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$196 = rootWithPendingPassiveEffects, + var root$197 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11911,7 +12113,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$196, remainingLanes); + releaseRootPooledCache(root$197, remainingLanes); } } return !1; @@ -12416,11 +12618,7 @@ function FiberRootNode( ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = -1; this.callbackNode = this.next = @@ -12433,7 +12631,6 @@ function FiberRootNode( this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -13148,14 +13345,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$352; 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_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$352 = isSupported$jscomp$inline_1560; + JSCompiler_inline_result$jscomp$352 = isSupported$jscomp$inline_1568; } else JSCompiler_inline_result$jscomp$352 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$352 && @@ -13284,97 +13481,6 @@ function hasSelectionCapabilities(elem) { "true" === elem.contentEditable) ); } -function restoreSelection(priorSelectionInformation, containerInfo) { - var curFocusedElem = getActiveElementDeep(containerInfo); - containerInfo = priorSelectionInformation.focusedElem; - var priorSelectionRange = priorSelectionInformation.selectionRange; - if ( - curFocusedElem !== containerInfo && - containerInfo && - containerInfo.ownerDocument && - containsNode(containerInfo.ownerDocument.documentElement, containerInfo) - ) { - if (null !== priorSelectionRange && hasSelectionCapabilities(containerInfo)) - if ( - ((priorSelectionInformation = priorSelectionRange.start), - (curFocusedElem = priorSelectionRange.end), - void 0 === curFocusedElem && - (curFocusedElem = priorSelectionInformation), - "selectionStart" in containerInfo) - ) - (containerInfo.selectionStart = priorSelectionInformation), - (containerInfo.selectionEnd = Math.min( - curFocusedElem, - containerInfo.value.length - )); - else if ( - ((curFocusedElem = - ((priorSelectionInformation = - containerInfo.ownerDocument || document) && - priorSelectionInformation.defaultView) || - window), - curFocusedElem.getSelection) - ) { - curFocusedElem = curFocusedElem.getSelection(); - var length = containerInfo.textContent.length, - start = Math.min(priorSelectionRange.start, length); - priorSelectionRange = - void 0 === priorSelectionRange.end - ? start - : Math.min(priorSelectionRange.end, length); - !curFocusedElem.extend && - start > priorSelectionRange && - ((length = priorSelectionRange), - (priorSelectionRange = start), - (start = length)); - length = getNodeForCharacterOffset(containerInfo, start); - var endMarker = getNodeForCharacterOffset( - containerInfo, - priorSelectionRange - ); - length && - endMarker && - (1 !== curFocusedElem.rangeCount || - curFocusedElem.anchorNode !== length.node || - curFocusedElem.anchorOffset !== length.offset || - curFocusedElem.focusNode !== endMarker.node || - curFocusedElem.focusOffset !== endMarker.offset) && - ((priorSelectionInformation = - priorSelectionInformation.createRange()), - priorSelectionInformation.setStart(length.node, length.offset), - curFocusedElem.removeAllRanges(), - start > priorSelectionRange - ? (curFocusedElem.addRange(priorSelectionInformation), - curFocusedElem.extend(endMarker.node, endMarker.offset)) - : (priorSelectionInformation.setEnd( - endMarker.node, - endMarker.offset - ), - curFocusedElem.addRange(priorSelectionInformation))); - } - priorSelectionInformation = []; - for ( - curFocusedElem = containerInfo; - (curFocusedElem = curFocusedElem.parentNode); - - ) - 1 === curFocusedElem.nodeType && - priorSelectionInformation.push({ - element: curFocusedElem, - left: curFocusedElem.scrollLeft, - top: curFocusedElem.scrollTop - }); - "function" === typeof containerInfo.focus && containerInfo.focus(); - for ( - containerInfo = 0; - containerInfo < priorSelectionInformation.length; - containerInfo++ - ) - (curFocusedElem = priorSelectionInformation[containerInfo]), - (curFocusedElem.element.scrollLeft = curFocusedElem.left), - (curFocusedElem.element.scrollTop = curFocusedElem.top); - } -} var skipSelectionChangeEvent = canUseDOM && "documentMode" in document && 11 >= document.documentMode, activeElement = null, @@ -13569,20 +13675,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_1609 = 0; + i$jscomp$inline_1609 < simpleEventPluginEvents.length; + i$jscomp$inline_1609++ ) { - 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_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_1603, - "on" + capitalizedEvent$jscomp$inline_1604 + domEventName$jscomp$inline_1611, + "on" + capitalizedEvent$jscomp$inline_1612 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14875,34 +14981,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$215 = props[hasSrc]; - if (null != propValue$215) + var propValue$216 = props[hasSrc]; + if (null != propValue$216) switch (hasSrc) { case "name": - hasSrcSet = propValue$215; + hasSrcSet = propValue$216; break; case "type": - propValue = propValue$215; + propValue = propValue$216; break; case "checked": - checked = propValue$215; + checked = propValue$216; break; case "defaultChecked": - defaultChecked = propValue$215; + defaultChecked = propValue$216; break; case "value": - propKey = propValue$215; + propKey = propValue$216; break; case "defaultValue": - defaultValue = propValue$215; + defaultValue = propValue$216; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$215) + if (null != propValue$216) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$215, props, null); + setProp(domElement, tag, hasSrc, propValue$216, props, null); } } initInput( @@ -15039,14 +15145,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$215 in props) - props.hasOwnProperty(propValue$215) && - ((hasSrc = props[propValue$215]), + for (propValue$216 in props) + props.hasOwnProperty(propValue$216) && + ((hasSrc = props[propValue$216]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$215, + propValue$216, hasSrc, props, void 0 @@ -15094,14 +15200,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$232 in nextProps) { - var propKey = nextProps[propKey$232]; - lastProp = lastProps[propKey$232]; + for (var propKey$233 in nextProps) { + var propKey = nextProps[propKey$233]; + lastProp = lastProps[propKey$233]; if ( - nextProps.hasOwnProperty(propKey$232) && + nextProps.hasOwnProperty(propKey$233) && (null != propKey || null != lastProp) ) - switch (propKey$232) { + switch (propKey$233) { case "type": type = propKey; break; @@ -15130,7 +15236,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$232, + propKey$233, propKey, nextProps, lastProp @@ -15149,7 +15255,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$232 = null; + propKey = value = defaultValue = propKey$233 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15180,7 +15286,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$232 = type; + propKey$233 = type; break; case "defaultValue": defaultValue = type; @@ -15201,15 +15307,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$232 - ? updateOptions(domElement, !!lastProps, propKey$232, !1) + null != propKey$233 + ? updateOptions(domElement, !!lastProps, propKey$233, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$232 = null; + propKey = propKey$233 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15233,7 +15339,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$232 = name; + propKey$233 = name; break; case "defaultValue": propKey = name; @@ -15247,17 +15353,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$232, propKey); + updateTextarea(domElement, propKey$233, propKey); return; case "option": - for (var propKey$248 in lastProps) + for (var propKey$249 in lastProps) if ( - ((propKey$232 = lastProps[propKey$248]), - lastProps.hasOwnProperty(propKey$248) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$248)) + ((propKey$233 = lastProps[propKey$249]), + lastProps.hasOwnProperty(propKey$249) && + null != propKey$233 && + !nextProps.hasOwnProperty(propKey$249)) ) - switch (propKey$248) { + switch (propKey$249) { case "selected": domElement.selected = !1; break; @@ -15265,33 +15371,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$248, + propKey$249, null, nextProps, - propKey$232 + propKey$233 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$232 = nextProps[lastDefaultValue]), + ((propKey$233 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$232 !== propKey && - (null != propKey$232 || null != propKey)) + propKey$233 !== propKey && + (null != propKey$233 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$232 && - "function" !== typeof propKey$232 && - "symbol" !== typeof propKey$232; + propKey$233 && + "function" !== typeof propKey$233 && + "symbol" !== typeof propKey$233; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$232, + propKey$233, nextProps, propKey ); @@ -15312,24 +15418,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$253 in lastProps) - (propKey$232 = lastProps[propKey$253]), - lastProps.hasOwnProperty(propKey$253) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$253) && - setProp(domElement, tag, propKey$253, null, nextProps, propKey$232); + for (var propKey$254 in lastProps) + (propKey$233 = lastProps[propKey$254]), + lastProps.hasOwnProperty(propKey$254) && + null != propKey$233 && + !nextProps.hasOwnProperty(propKey$254) && + setProp(domElement, tag, propKey$254, null, nextProps, propKey$233); for (checked in nextProps) if ( - ((propKey$232 = nextProps[checked]), + ((propKey$233 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$232 !== propKey && - (null != propKey$232 || null != propKey)) + propKey$233 !== propKey && + (null != propKey$233 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$232) + if (null != propKey$233) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15337,7 +15443,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$232, + propKey$233, nextProps, propKey ); @@ -15345,49 +15451,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$258 in lastProps) - (propKey$232 = lastProps[propKey$258]), - lastProps.hasOwnProperty(propKey$258) && - void 0 !== propKey$232 && - !nextProps.hasOwnProperty(propKey$258) && + for (var propKey$259 in lastProps) + (propKey$233 = lastProps[propKey$259]), + lastProps.hasOwnProperty(propKey$259) && + void 0 !== propKey$233 && + !nextProps.hasOwnProperty(propKey$259) && setPropOnCustomElement( domElement, tag, - propKey$258, + propKey$259, void 0, nextProps, - propKey$232 + propKey$233 ); for (defaultChecked in nextProps) - (propKey$232 = nextProps[defaultChecked]), + (propKey$233 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$232 === propKey || - (void 0 === propKey$232 && void 0 === propKey) || + propKey$233 === propKey || + (void 0 === propKey$233 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$232, + propKey$233, nextProps, propKey ); return; } } - for (var propKey$263 in lastProps) - (propKey$232 = lastProps[propKey$263]), - lastProps.hasOwnProperty(propKey$263) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$263) && - setProp(domElement, tag, propKey$263, null, nextProps, propKey$232); + for (var propKey$264 in lastProps) + (propKey$233 = lastProps[propKey$264]), + lastProps.hasOwnProperty(propKey$264) && + null != propKey$233 && + !nextProps.hasOwnProperty(propKey$264) && + setProp(domElement, tag, propKey$264, null, nextProps, propKey$233); for (lastProp in nextProps) - (propKey$232 = nextProps[lastProp]), + (propKey$233 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$232 === propKey || - (null == propKey$232 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$232, nextProps, propKey); + propKey$233 === propKey || + (null == propKey$233 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$233, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15420,85 +15526,6 @@ function getChildHostContextProd(parentNamespace, type) { ? 0 : parentNamespace; } -function prepareForCommit(containerInfo) { - eventsEnabled = _enabled; - containerInfo = getActiveElementDeep(containerInfo); - if (hasSelectionCapabilities(containerInfo)) { - if ("selectionStart" in containerInfo) - var JSCompiler_temp = { - start: containerInfo.selectionStart, - end: containerInfo.selectionEnd - }; - else - a: { - JSCompiler_temp = - ((JSCompiler_temp = containerInfo.ownerDocument) && - JSCompiler_temp.defaultView) || - window; - var selection = - JSCompiler_temp.getSelection && JSCompiler_temp.getSelection(); - if (selection && 0 !== selection.rangeCount) { - JSCompiler_temp = selection.anchorNode; - var anchorOffset = selection.anchorOffset, - focusNode = selection.focusNode; - selection = selection.focusOffset; - try { - JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$201) { - JSCompiler_temp = null; - break a; - } - var length = 0, - start = -1, - end = -1, - indexWithinAnchor = 0, - indexWithinFocus = 0, - node = containerInfo, - parentNode = null; - b: for (;;) { - for (var next; ; ) { - node !== JSCompiler_temp || - (0 !== anchorOffset && 3 !== node.nodeType) || - (start = length + anchorOffset); - node !== focusNode || - (0 !== selection && 3 !== node.nodeType) || - (end = length + selection); - 3 === node.nodeType && (length += node.nodeValue.length); - if (null === (next = node.firstChild)) break; - parentNode = node; - node = next; - } - for (;;) { - if (node === containerInfo) break b; - parentNode === JSCompiler_temp && - ++indexWithinAnchor === anchorOffset && - (start = length); - parentNode === focusNode && - ++indexWithinFocus === selection && - (end = length); - if (null !== (next = node.nextSibling)) break; - node = parentNode; - parentNode = node.parentNode; - } - node = next; - } - JSCompiler_temp = - -1 === start || -1 === end ? null : { start: start, end: end }; - } else JSCompiler_temp = null; - } - JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 }; - } else JSCompiler_temp = null; - selectionInformation = { - focusedElem: containerInfo, - selectionRange: JSCompiler_temp - }; - containerInfo = null; - JSCompiler_temp = selectionInformation.focusedElem; - null !== JSCompiler_temp && - (containerInfo = getClosestInstanceFromNode(JSCompiler_temp)); - _enabled = !1; - return containerInfo; -} function beforeActiveInstanceBlur(internalInstanceHandle) { _enabled = !0; var target = selectionInformation.focusedElem, @@ -15562,11 +15589,6 @@ function createEvent(type, bubbles) { event.initEvent(type, bubbles, !1); return event; } -function dispatchAfterDetachedBlur(target) { - var event = createEvent("afterblur", !1); - event.relatedTarget = target; - document.dispatchEvent(event); -} function clearSuspenseBoundary(parentInstance, suspenseInstance) { var node = suspenseInstance, depth = 0; @@ -16063,26 +16085,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$271 = getResourcesFromRoot( + var styles$272 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$272 = styles$271.get(type); - resource$272 || + resource$273 = styles$272.get(type); + resource$273 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$272 = { + (resource$273 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$271.set(type, resource$272), - (styles$271 = JSCompiler_inline_result.querySelector( + styles$272.set(type, resource$273), + (styles$272 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$271._p && - ((resource$272.instance = styles$271), - (resource$272.state.loading = 5)), + !styles$272._p && + ((resource$273.instance = styles$272), + (resource$273.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16095,16 +16117,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$271 || + styles$272 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$272.state + resource$273.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$272; + return resource$273; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16201,37 +16223,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$277 = hoistableRoot.querySelector( + var instance$278 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$277) + if (instance$278) return ( (resource.state.loading |= 4), - (resource.instance = instance$277), - markNodeAsHoistable(instance$277), - instance$277 + (resource.instance = instance$278), + markNodeAsHoistable(instance$278), + instance$278 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$277 = ( + instance$278 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$277); - var linkInstance = instance$277; + markNodeAsHoistable(instance$278); + var linkInstance = instance$278; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$277, "link", instance); + setInitialProperties(instance$278, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$277, props.precedence, hoistableRoot); - return (resource.instance = instance$277); + insertStylesheet(instance$278, props.precedence, hoistableRoot); + return (resource.instance = instance$278); case "script": - instance$277 = getScriptKey(props.src); + instance$278 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$277) + getScriptSelectorFromKey(instance$278) )) ) return ( @@ -16240,7 +16262,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$277))) + if ((styleProps = preloadPropsMap.get(instance$278))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17244,16 +17266,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1777 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1782 = React.version; if ( - "19.1.0-www-classic-d8b903f4-20250102" !== - isomorphicReactPackageVersion$jscomp$inline_1777 + "19.1.0-www-classic-c81312e3-20250102" !== + isomorphicReactPackageVersion$jscomp$inline_1782 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1777, - "19.1.0-www-classic-d8b903f4-20250102" + isomorphicReactPackageVersion$jscomp$inline_1782, + "19.1.0-www-classic-c81312e3-20250102" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17269,24 +17291,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2318 = { +var internals$jscomp$inline_2317 = { bundleType: 0, - version: "19.1.0-www-classic-d8b903f4-20250102", + version: "19.1.0-www-classic-c81312e3-20250102", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-classic-c81312e3-20250102" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2319 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2318 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2319.isDisabled && - hook$jscomp$inline_2319.supportsFiber + !hook$jscomp$inline_2318.isDisabled && + hook$jscomp$inline_2318.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2319.inject( - internals$jscomp$inline_2318 + (rendererID = hook$jscomp$inline_2318.inject( + internals$jscomp$inline_2317 )), - (injectedHook = hook$jscomp$inline_2319); + (injectedHook = hook$jscomp$inline_2318); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17639,4 +17661,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-classic-d8b903f4-20250102"; +exports.version = "19.1.0-www-classic-c81312e3-20250102"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index ae0f22ca5807e..f248413e0961c 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -561,14 +561,13 @@ function getHighestPriorityLanes(lanes) { return lanes; } } -function getNextLanes(root, wipLanes) { +function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -578,29 +577,29 @@ function getNextLanes(root, wipLanes) { 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -2017,7 +2016,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( root$27, - root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$27 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$27.cancelPendingCommit || + -1 !== root$27.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || @@ -2083,7 +2084,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); pingedLanes = root.callbackNode; if ( @@ -2140,7 +2142,8 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -8442,105 +8445,192 @@ var offscreenSubtreeIsHidden = !1, nextEffect = null, focusedInstanceHandle = null, shouldFireAfterActiveInstanceBlur = !1; -function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - deletions = fiber.deletions; - if (null !== deletions) - for (var i = 0; i < deletions.length; i++) { - var deletion = deletions[i]; - doesFiberContain(deletion, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(deletion)); +function commitBeforeMutationEffects(root, firstChild) { + root = root.containerInfo; + eventsEnabled = _enabled; + root = getActiveElementDeep(root); + if (hasSelectionCapabilities(root)) { + if ("selectionStart" in root) + var JSCompiler_temp = { + start: root.selectionStart, + end: root.selectionEnd + }; + else + a: { + JSCompiler_temp = + ((JSCompiler_temp = root.ownerDocument) && + JSCompiler_temp.defaultView) || + window; + var selection = + JSCompiler_temp.getSelection && JSCompiler_temp.getSelection(); + if (selection && 0 !== selection.rangeCount) { + JSCompiler_temp = selection.anchorNode; + var anchorOffset = selection.anchorOffset, + focusNode = selection.focusNode; + selection = selection.focusOffset; + try { + JSCompiler_temp.nodeType, focusNode.nodeType; + } catch (e$202) { + JSCompiler_temp = null; + break a; + } + var length = 0, + start = -1, + end = -1, + indexWithinAnchor = 0, + indexWithinFocus = 0, + node = root, + parentNode = null; + b: for (;;) { + for (var next; ; ) { + node !== JSCompiler_temp || + (0 !== anchorOffset && 3 !== node.nodeType) || + (start = length + anchorOffset); + node !== focusNode || + (0 !== selection && 3 !== node.nodeType) || + (end = length + selection); + 3 === node.nodeType && (length += node.nodeValue.length); + if (null === (next = node.firstChild)) break; + parentNode = node; + node = next; + } + for (;;) { + if (node === root) break b; + parentNode === JSCompiler_temp && + ++indexWithinAnchor === anchorOffset && + (start = length); + parentNode === focusNode && + ++indexWithinFocus === selection && + (end = length); + if (null !== (next = node.nextSibling)) break; + node = parentNode; + parentNode = node.parentNode; + } + node = next; + } + JSCompiler_temp = + -1 === start || -1 === end ? null : { start: start, end: end }; + } else JSCompiler_temp = null; } - deletions = fiber.child; - if (0 !== (fiber.subtreeFlags & 9236) && null !== deletions) - (deletions.return = fiber), (nextEffect = deletions); + JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 }; + } else JSCompiler_temp = null; + selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp }; + root = null; + JSCompiler_temp = selectionInformation.focusedElem; + null !== JSCompiler_temp && + (root = getClosestInstanceFromNode(JSCompiler_temp)); + _enabled = !1; + focusedInstanceHandle = root; + shouldFireAfterActiveInstanceBlur = !1; + for (nextEffect = firstChild; null !== nextEffect; ) { + firstChild = nextEffect; + root = firstChild.deletions; + if (null !== root) + for ( + JSCompiler_temp = 0; + JSCompiler_temp < root.length; + JSCompiler_temp++ + ) + (anchorOffset = root[JSCompiler_temp]), + doesFiberContain(anchorOffset, focusedInstanceHandle) && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(anchorOffset)); + root = firstChild.child; + if (0 !== (firstChild.subtreeFlags & 9236) && null !== root) + (root.return = firstChild), (nextEffect = root); else - a: for (; null !== nextEffect; ) { - fiber = nextEffect; - deletions = void 0; - var JSCompiler_temp; - i = fiber; - deletion = i.alternate; - var flags = i.flags; + for (; null !== nextEffect; ) { + firstChild = nextEffect; + root = firstChild.alternate; + JSCompiler_temp = firstChild.flags; if ( - !shouldFireAfterActiveInstanceBlur && - null !== focusedInstanceHandle + (anchorOffset = + !shouldFireAfterActiveInstanceBlur && + null !== focusedInstanceHandle) ) { - if ((JSCompiler_temp = 13 === i.tag)) - b: { + if ((anchorOffset = 13 === firstChild.tag)) + a: { if ( - null !== deletion && - ((JSCompiler_temp = deletion.memoizedState), - null === JSCompiler_temp || null !== JSCompiler_temp.dehydrated) + null !== root && + ((anchorOffset = root.memoizedState), + null === anchorOffset || null !== anchorOffset.dehydrated) ) { - JSCompiler_temp = i.memoizedState; - JSCompiler_temp = - null !== JSCompiler_temp && - null === JSCompiler_temp.dehydrated; - break b; + anchorOffset = firstChild.memoizedState; + anchorOffset = + null !== anchorOffset && null === anchorOffset.dehydrated; + break a; } - JSCompiler_temp = !1; + anchorOffset = !1; } - JSCompiler_temp && - doesFiberContain(i, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(i)); + anchorOffset = + anchorOffset && doesFiberContain(firstChild, focusedInstanceHandle); } - switch (i.tag) { + anchorOffset && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(firstChild)); + switch (firstChild.tag) { case 0: if ( - 0 !== (flags & 4) && - ((deletions = i.updateQueue), - (deletions = null !== deletions ? deletions.events : null), - null !== deletions) + 0 !== (JSCompiler_temp & 4) && + ((root = firstChild.updateQueue), + (root = null !== root ? root.events : null), + null !== root) ) - for (i = 0; i < deletions.length; i++) - (deletion = deletions[i]), - (deletion.ref.impl = deletion.nextImpl); + for ( + JSCompiler_temp = 0; + JSCompiler_temp < root.length; + JSCompiler_temp++ + ) + (anchorOffset = root[JSCompiler_temp]), + (anchorOffset.ref.impl = anchorOffset.nextImpl); break; case 11: case 15: break; case 1: - if (0 !== (flags & 1024) && null !== deletion) { - flags = deletion.memoizedProps; - deletion = deletion.memoizedState; - JSCompiler_temp = i.stateNode; + if (0 !== (JSCompiler_temp & 1024) && null !== root) { + JSCompiler_temp = void 0; + anchorOffset = firstChild; + focusNode = root.memoizedProps; + root = root.memoizedState; + selection = anchorOffset.stateNode; try { var resolvedPrevProps = resolveClassComponentProps( - i.type, - flags, - i.elementType === i.type + anchorOffset.type, + focusNode, + anchorOffset.elementType === anchorOffset.type ); - deletions = JSCompiler_temp.getSnapshotBeforeUpdate( + JSCompiler_temp = selection.getSnapshotBeforeUpdate( resolvedPrevProps, - deletion + root ); - JSCompiler_temp.__reactInternalSnapshotBeforeUpdate = deletions; + selection.__reactInternalSnapshotBeforeUpdate = JSCompiler_temp; } catch (error) { - captureCommitPhaseError(i, i.return, error); + captureCommitPhaseError( + anchorOffset, + anchorOffset.return, + error + ); } } break; case 3: - if (0 !== (flags & 1024)) - b: if ( - ((deletions = i.stateNode.containerInfo), - (i = deletions.nodeType), - 9 === i) + if (0 !== (JSCompiler_temp & 1024)) + if ( + ((root = firstChild.stateNode.containerInfo), + (JSCompiler_temp = root.nodeType), + 9 === JSCompiler_temp) ) - clearContainerSparingly(deletions); - else if (1 === i) - switch (deletions.nodeName) { + clearContainerSparingly(root); + else if (1 === JSCompiler_temp) + switch (root.nodeName) { case "HEAD": case "HTML": case "BODY": - clearContainerSparingly(deletions); - break b; + clearContainerSparingly(root); + break; default: - deletions.textContent = ""; + root.textContent = ""; } break; case 5: @@ -8551,17 +8641,19 @@ function commitBeforeMutationEffects_begin() { case 17: break; default: - if (0 !== (flags & 1024)) throw Error(formatProdErrorMessage(163)); + if (0 !== (JSCompiler_temp & 1024)) + throw Error(formatProdErrorMessage(163)); } - deletions = fiber.sibling; - if (null !== deletions) { - deletions.return = fiber.return; - nextEffect = deletions; - break a; + root = firstChild.sibling; + if (null !== root) { + root.return = firstChild.return; + nextEffect = root; + break; } - nextEffect = fiber.return; + nextEffect = firstChild.return; } } + focusedInstanceHandle = null; } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -10797,8 +10889,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { default: throw Error(formatProdErrorMessage(329)); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === renderWasConcurrent) && @@ -10811,7 +10901,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -10872,18 +10962,24 @@ function commitRootWhenReady( completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = -1; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -10901,16 +10997,14 @@ function commitRootWhenReady( } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -11003,8 +11097,6 @@ function resetWorkInProgressStack() { } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; -1 !== timeoutHandle && ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle)); @@ -11475,142 +11567,253 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) { } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = Internals.p; - try { - (Internals.p = 2), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (Internals.p = previousUpdateLanePriority); + root.cancelPendingCommit = null; + do flushPassiveEffects(); + while (null !== rootWithPendingPassiveEffects); + if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); + if (null !== finishedWork) { + if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = Internals.p; + Internals.p = 2; + updatedLanes = executionContext; + executionContext |= 4; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (Internals.p = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ); } } -function commitRootImpl( +function flushMutationEffects(root, finishedWork) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitMutationEffectsOnFiber(finishedWork, root); + if (shouldFireAfterActiveInstanceBlur) { + _enabled = !0; + var target = selectionInformation.focusedElem, + event = createEvent("afterblur", !1); + event.relatedTarget = target; + document.dispatchEvent(event); + _enabled = !1; + } + target = selectionInformation; + var curFocusedElem = getActiveElementDeep(root.containerInfo), + priorFocusedElem = target.focusedElem, + priorSelectionRange = target.selectionRange; + if ( + curFocusedElem !== priorFocusedElem && + priorFocusedElem && + priorFocusedElem.ownerDocument && + containsNode( + priorFocusedElem.ownerDocument.documentElement, + priorFocusedElem + ) + ) { + if ( + null !== priorSelectionRange && + hasSelectionCapabilities(priorFocusedElem) + ) { + var start = priorSelectionRange.start, + end = priorSelectionRange.end; + void 0 === end && (end = start); + if ("selectionStart" in priorFocusedElem) + (priorFocusedElem.selectionStart = start), + (priorFocusedElem.selectionEnd = Math.min( + end, + priorFocusedElem.value.length + )); + else { + var doc = priorFocusedElem.ownerDocument || document, + win = (doc && doc.defaultView) || window; + if (win.getSelection) { + var selection = win.getSelection(), + length = priorFocusedElem.textContent.length, + start$jscomp$0 = Math.min(priorSelectionRange.start, length), + end$jscomp$0 = + void 0 === priorSelectionRange.end + ? start$jscomp$0 + : Math.min(priorSelectionRange.end, length); + !selection.extend && + start$jscomp$0 > end$jscomp$0 && + ((curFocusedElem = end$jscomp$0), + (end$jscomp$0 = start$jscomp$0), + (start$jscomp$0 = curFocusedElem)); + var startMarker = getNodeForCharacterOffset( + priorFocusedElem, + start$jscomp$0 + ), + endMarker = getNodeForCharacterOffset( + priorFocusedElem, + end$jscomp$0 + ); + if ( + startMarker && + endMarker && + (1 !== selection.rangeCount || + selection.anchorNode !== startMarker.node || + selection.anchorOffset !== startMarker.offset || + selection.focusNode !== endMarker.node || + selection.focusOffset !== endMarker.offset) + ) { + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + start$jscomp$0 > end$jscomp$0 + ? (selection.addRange(range), + selection.extend(endMarker.node, endMarker.offset)) + : (range.setEnd(endMarker.node, endMarker.offset), + selection.addRange(range)); + } + } + } + } + doc = []; + for (selection = priorFocusedElem; (selection = selection.parentNode); ) + 1 === selection.nodeType && + doc.push({ + element: selection, + left: selection.scrollLeft, + top: selection.scrollTop + }); + "function" === typeof priorFocusedElem.focus && + priorFocusedElem.focus(); + for ( + priorFocusedElem = 0; + priorFocusedElem < doc.length; + priorFocusedElem++ + ) { + var info = doc[priorFocusedElem]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; +} +function flushLayoutEffects( root, + finishedWork, + lanes, recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + didIncludeRenderPhaseUpdate ) { - do flushPassiveEffects(); - while (null !== rootWithPendingPassiveEffects); - if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; - if (null === finishedWork) return null; - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = Internals.p), - (Internals.p = 2), - (suspendedRetryLanes = executionContext), - (executionContext |= 4), - (focusedInstanceHandle = prepareForCommit(root.containerInfo)), - (shouldFireAfterActiveInstanceBlur = !1), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - (focusedInstanceHandle = null), - commitMutationEffectsOnFiber(finishedWork, root), - shouldFireAfterActiveInstanceBlur && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = suspendedRetryLanes), - (Internals.p = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - spawnedLane - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : releaseRootPooledCache(root, remainingLanes); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - renderPriorityLevel(remainingLanes.value, { - componentStack: remainingLanes.stack + : releaseRootPooledCache(root, root.pendingLanes); + rootHasLayoutEffect = root.pendingLanes; + 0 === rootHasLayoutEffect && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot(finishedWork.stateNode, rootHasLayoutEffect); + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = Internals.p; + Internals.p = 2; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority]; + onRecoverableError(recoverableError.value, { + componentStack: recoverableError.stack }); + } + } finally { + (ReactSharedInternals.T = finishedWork), + (Internals.p = rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + rootHasLayoutEffect = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)) ? root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)) @@ -11633,7 +11836,6 @@ function commitRootImpl( : (currentEndTime = endTime); }); } - return null; } function releaseRootPooledCache(root, remainingLanes) { 0 === (root.pooledCacheLanes &= remainingLanes) && @@ -11643,7 +11845,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$196 = rootWithPendingPassiveEffects, + var root$197 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11658,7 +11860,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$196, remainingLanes); + releaseRootPooledCache(root$197, remainingLanes); } } return !1; @@ -12163,11 +12365,7 @@ function FiberRootNode( ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = -1; this.callbackNode = this.next = @@ -12180,7 +12378,6 @@ function FiberRootNode( this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -12884,14 +13081,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$355; if (canUseDOM) { - var isSupported$jscomp$inline_1550 = "oninput" in document; - if (!isSupported$jscomp$inline_1550) { - var element$jscomp$inline_1551 = document.createElement("div"); - element$jscomp$inline_1551.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1550 = - "function" === typeof element$jscomp$inline_1551.oninput; + var isSupported$jscomp$inline_1558 = "oninput" in document; + if (!isSupported$jscomp$inline_1558) { + var element$jscomp$inline_1559 = document.createElement("div"); + element$jscomp$inline_1559.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1558 = + "function" === typeof element$jscomp$inline_1559.oninput; } - JSCompiler_inline_result$jscomp$355 = isSupported$jscomp$inline_1550; + JSCompiler_inline_result$jscomp$355 = isSupported$jscomp$inline_1558; } else JSCompiler_inline_result$jscomp$355 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$355 && @@ -13020,97 +13217,6 @@ function hasSelectionCapabilities(elem) { "true" === elem.contentEditable) ); } -function restoreSelection(priorSelectionInformation, containerInfo) { - var curFocusedElem = getActiveElementDeep(containerInfo); - containerInfo = priorSelectionInformation.focusedElem; - var priorSelectionRange = priorSelectionInformation.selectionRange; - if ( - curFocusedElem !== containerInfo && - containerInfo && - containerInfo.ownerDocument && - containsNode(containerInfo.ownerDocument.documentElement, containerInfo) - ) { - if (null !== priorSelectionRange && hasSelectionCapabilities(containerInfo)) - if ( - ((priorSelectionInformation = priorSelectionRange.start), - (curFocusedElem = priorSelectionRange.end), - void 0 === curFocusedElem && - (curFocusedElem = priorSelectionInformation), - "selectionStart" in containerInfo) - ) - (containerInfo.selectionStart = priorSelectionInformation), - (containerInfo.selectionEnd = Math.min( - curFocusedElem, - containerInfo.value.length - )); - else if ( - ((curFocusedElem = - ((priorSelectionInformation = - containerInfo.ownerDocument || document) && - priorSelectionInformation.defaultView) || - window), - curFocusedElem.getSelection) - ) { - curFocusedElem = curFocusedElem.getSelection(); - var length = containerInfo.textContent.length, - start = Math.min(priorSelectionRange.start, length); - priorSelectionRange = - void 0 === priorSelectionRange.end - ? start - : Math.min(priorSelectionRange.end, length); - !curFocusedElem.extend && - start > priorSelectionRange && - ((length = priorSelectionRange), - (priorSelectionRange = start), - (start = length)); - length = getNodeForCharacterOffset(containerInfo, start); - var endMarker = getNodeForCharacterOffset( - containerInfo, - priorSelectionRange - ); - length && - endMarker && - (1 !== curFocusedElem.rangeCount || - curFocusedElem.anchorNode !== length.node || - curFocusedElem.anchorOffset !== length.offset || - curFocusedElem.focusNode !== endMarker.node || - curFocusedElem.focusOffset !== endMarker.offset) && - ((priorSelectionInformation = - priorSelectionInformation.createRange()), - priorSelectionInformation.setStart(length.node, length.offset), - curFocusedElem.removeAllRanges(), - start > priorSelectionRange - ? (curFocusedElem.addRange(priorSelectionInformation), - curFocusedElem.extend(endMarker.node, endMarker.offset)) - : (priorSelectionInformation.setEnd( - endMarker.node, - endMarker.offset - ), - curFocusedElem.addRange(priorSelectionInformation))); - } - priorSelectionInformation = []; - for ( - curFocusedElem = containerInfo; - (curFocusedElem = curFocusedElem.parentNode); - - ) - 1 === curFocusedElem.nodeType && - priorSelectionInformation.push({ - element: curFocusedElem, - left: curFocusedElem.scrollLeft, - top: curFocusedElem.scrollTop - }); - "function" === typeof containerInfo.focus && containerInfo.focus(); - for ( - containerInfo = 0; - containerInfo < priorSelectionInformation.length; - containerInfo++ - ) - (curFocusedElem = priorSelectionInformation[containerInfo]), - (curFocusedElem.element.scrollLeft = curFocusedElem.left), - (curFocusedElem.element.scrollTop = curFocusedElem.top); - } -} var skipSelectionChangeEvent = canUseDOM && "documentMode" in document && 11 >= document.documentMode, activeElement = null, @@ -13305,20 +13411,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1591 = 0; - i$jscomp$inline_1591 < simpleEventPluginEvents.length; - i$jscomp$inline_1591++ + var i$jscomp$inline_1599 = 0; + i$jscomp$inline_1599 < simpleEventPluginEvents.length; + i$jscomp$inline_1599++ ) { - var eventName$jscomp$inline_1592 = - simpleEventPluginEvents[i$jscomp$inline_1591], - domEventName$jscomp$inline_1593 = - eventName$jscomp$inline_1592.toLowerCase(), - capitalizedEvent$jscomp$inline_1594 = - eventName$jscomp$inline_1592[0].toUpperCase() + - eventName$jscomp$inline_1592.slice(1); + var eventName$jscomp$inline_1600 = + simpleEventPluginEvents[i$jscomp$inline_1599], + domEventName$jscomp$inline_1601 = + eventName$jscomp$inline_1600.toLowerCase(), + capitalizedEvent$jscomp$inline_1602 = + eventName$jscomp$inline_1600[0].toUpperCase() + + eventName$jscomp$inline_1600.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1593, - "on" + capitalizedEvent$jscomp$inline_1594 + domEventName$jscomp$inline_1601, + "on" + capitalizedEvent$jscomp$inline_1602 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14607,34 +14713,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$215 = props[hasSrc]; - if (null != propValue$215) + var propValue$216 = props[hasSrc]; + if (null != propValue$216) switch (hasSrc) { case "name": - hasSrcSet = propValue$215; + hasSrcSet = propValue$216; break; case "type": - propKey = propValue$215; + propKey = propValue$216; break; case "checked": - checked = propValue$215; + checked = propValue$216; break; case "defaultChecked": - defaultChecked = propValue$215; + defaultChecked = propValue$216; break; case "value": - propValue = propValue$215; + propValue = propValue$216; break; case "defaultValue": - defaultValue = propValue$215; + defaultValue = propValue$216; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$215) + if (null != propValue$216) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$215, props, null); + setProp(domElement, tag, hasSrc, propValue$216, props, null); } } initInput( @@ -14770,14 +14876,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$215 in props) - props.hasOwnProperty(propValue$215) && - ((hasSrc = props[propValue$215]), + for (propValue$216 in props) + props.hasOwnProperty(propValue$216) && + ((hasSrc = props[propValue$216]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$215, + propValue$216, hasSrc, props, void 0 @@ -14825,14 +14931,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$232 in nextProps) { - var propKey = nextProps[propKey$232]; - lastProp = lastProps[propKey$232]; + for (var propKey$233 in nextProps) { + var propKey = nextProps[propKey$233]; + lastProp = lastProps[propKey$233]; if ( - nextProps.hasOwnProperty(propKey$232) && + nextProps.hasOwnProperty(propKey$233) && (null != propKey || null != lastProp) ) - switch (propKey$232) { + switch (propKey$233) { case "type": type = propKey; break; @@ -14861,7 +14967,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$232, + propKey$233, propKey, nextProps, lastProp @@ -14880,7 +14986,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$232 = null; + propKey = value = defaultValue = propKey$233 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14911,7 +15017,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$232 = type; + propKey$233 = type; break; case "defaultValue": defaultValue = type; @@ -14932,15 +15038,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$232 - ? updateOptions(domElement, !!lastProps, propKey$232, !1) + null != propKey$233 + ? updateOptions(domElement, !!lastProps, propKey$233, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$232 = null; + propKey = propKey$233 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -14964,7 +15070,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$232 = name; + propKey$233 = name; break; case "defaultValue": propKey = name; @@ -14978,17 +15084,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$232, propKey); + updateTextarea(domElement, propKey$233, propKey); return; case "option": - for (var propKey$248 in lastProps) + for (var propKey$249 in lastProps) if ( - ((propKey$232 = lastProps[propKey$248]), - lastProps.hasOwnProperty(propKey$248) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$248)) + ((propKey$233 = lastProps[propKey$249]), + lastProps.hasOwnProperty(propKey$249) && + null != propKey$233 && + !nextProps.hasOwnProperty(propKey$249)) ) - switch (propKey$248) { + switch (propKey$249) { case "selected": domElement.selected = !1; break; @@ -14996,33 +15102,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$248, + propKey$249, null, nextProps, - propKey$232 + propKey$233 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$232 = nextProps[lastDefaultValue]), + ((propKey$233 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$232 !== propKey && - (null != propKey$232 || null != propKey)) + propKey$233 !== propKey && + (null != propKey$233 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$232 && - "function" !== typeof propKey$232 && - "symbol" !== typeof propKey$232; + propKey$233 && + "function" !== typeof propKey$233 && + "symbol" !== typeof propKey$233; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$232, + propKey$233, nextProps, propKey ); @@ -15043,24 +15149,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$253 in lastProps) - (propKey$232 = lastProps[propKey$253]), - lastProps.hasOwnProperty(propKey$253) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$253) && - setProp(domElement, tag, propKey$253, null, nextProps, propKey$232); + for (var propKey$254 in lastProps) + (propKey$233 = lastProps[propKey$254]), + lastProps.hasOwnProperty(propKey$254) && + null != propKey$233 && + !nextProps.hasOwnProperty(propKey$254) && + setProp(domElement, tag, propKey$254, null, nextProps, propKey$233); for (checked in nextProps) if ( - ((propKey$232 = nextProps[checked]), + ((propKey$233 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$232 !== propKey && - (null != propKey$232 || null != propKey)) + propKey$233 !== propKey && + (null != propKey$233 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$232) + if (null != propKey$233) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15068,7 +15174,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$232, + propKey$233, nextProps, propKey ); @@ -15076,49 +15182,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$258 in lastProps) - (propKey$232 = lastProps[propKey$258]), - lastProps.hasOwnProperty(propKey$258) && - void 0 !== propKey$232 && - !nextProps.hasOwnProperty(propKey$258) && + for (var propKey$259 in lastProps) + (propKey$233 = lastProps[propKey$259]), + lastProps.hasOwnProperty(propKey$259) && + void 0 !== propKey$233 && + !nextProps.hasOwnProperty(propKey$259) && setPropOnCustomElement( domElement, tag, - propKey$258, + propKey$259, void 0, nextProps, - propKey$232 + propKey$233 ); for (defaultChecked in nextProps) - (propKey$232 = nextProps[defaultChecked]), + (propKey$233 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$232 === propKey || - (void 0 === propKey$232 && void 0 === propKey) || + propKey$233 === propKey || + (void 0 === propKey$233 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$232, + propKey$233, nextProps, propKey ); return; } } - for (var propKey$263 in lastProps) - (propKey$232 = lastProps[propKey$263]), - lastProps.hasOwnProperty(propKey$263) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$263) && - setProp(domElement, tag, propKey$263, null, nextProps, propKey$232); + for (var propKey$264 in lastProps) + (propKey$233 = lastProps[propKey$264]), + lastProps.hasOwnProperty(propKey$264) && + null != propKey$233 && + !nextProps.hasOwnProperty(propKey$264) && + setProp(domElement, tag, propKey$264, null, nextProps, propKey$233); for (lastProp in nextProps) - (propKey$232 = nextProps[lastProp]), + (propKey$233 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$232 === propKey || - (null == propKey$232 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$232, nextProps, propKey); + propKey$233 === propKey || + (null == propKey$233 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$233, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15151,85 +15257,6 @@ function getChildHostContextProd(parentNamespace, type) { ? 0 : parentNamespace; } -function prepareForCommit(containerInfo) { - eventsEnabled = _enabled; - containerInfo = getActiveElementDeep(containerInfo); - if (hasSelectionCapabilities(containerInfo)) { - if ("selectionStart" in containerInfo) - var JSCompiler_temp = { - start: containerInfo.selectionStart, - end: containerInfo.selectionEnd - }; - else - a: { - JSCompiler_temp = - ((JSCompiler_temp = containerInfo.ownerDocument) && - JSCompiler_temp.defaultView) || - window; - var selection = - JSCompiler_temp.getSelection && JSCompiler_temp.getSelection(); - if (selection && 0 !== selection.rangeCount) { - JSCompiler_temp = selection.anchorNode; - var anchorOffset = selection.anchorOffset, - focusNode = selection.focusNode; - selection = selection.focusOffset; - try { - JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$201) { - JSCompiler_temp = null; - break a; - } - var length = 0, - start = -1, - end = -1, - indexWithinAnchor = 0, - indexWithinFocus = 0, - node = containerInfo, - parentNode = null; - b: for (;;) { - for (var next; ; ) { - node !== JSCompiler_temp || - (0 !== anchorOffset && 3 !== node.nodeType) || - (start = length + anchorOffset); - node !== focusNode || - (0 !== selection && 3 !== node.nodeType) || - (end = length + selection); - 3 === node.nodeType && (length += node.nodeValue.length); - if (null === (next = node.firstChild)) break; - parentNode = node; - node = next; - } - for (;;) { - if (node === containerInfo) break b; - parentNode === JSCompiler_temp && - ++indexWithinAnchor === anchorOffset && - (start = length); - parentNode === focusNode && - ++indexWithinFocus === selection && - (end = length); - if (null !== (next = node.nextSibling)) break; - node = parentNode; - parentNode = node.parentNode; - } - node = next; - } - JSCompiler_temp = - -1 === start || -1 === end ? null : { start: start, end: end }; - } else JSCompiler_temp = null; - } - JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 }; - } else JSCompiler_temp = null; - selectionInformation = { - focusedElem: containerInfo, - selectionRange: JSCompiler_temp - }; - containerInfo = null; - JSCompiler_temp = selectionInformation.focusedElem; - null !== JSCompiler_temp && - (containerInfo = getClosestInstanceFromNode(JSCompiler_temp)); - _enabled = !1; - return containerInfo; -} function beforeActiveInstanceBlur(internalInstanceHandle) { _enabled = !0; var target = selectionInformation.focusedElem, @@ -15293,11 +15320,6 @@ function createEvent(type, bubbles) { event.initEvent(type, bubbles, !1); return event; } -function dispatchAfterDetachedBlur(target) { - var event = createEvent("afterblur", !1); - event.relatedTarget = target; - document.dispatchEvent(event); -} function clearSuspenseBoundary(parentInstance, suspenseInstance) { var node = suspenseInstance, depth = 0; @@ -15794,26 +15816,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$271 = getResourcesFromRoot( + var styles$272 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$272 = styles$271.get(type); - resource$272 || + resource$273 = styles$272.get(type); + resource$273 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$272 = { + (resource$273 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$271.set(type, resource$272), - (styles$271 = JSCompiler_inline_result.querySelector( + styles$272.set(type, resource$273), + (styles$272 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$271._p && - ((resource$272.instance = styles$271), - (resource$272.state.loading = 5)), + !styles$272._p && + ((resource$273.instance = styles$272), + (resource$273.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15826,16 +15848,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$271 || + styles$272 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$272.state + resource$273.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$272; + return resource$273; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15932,37 +15954,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$277 = hoistableRoot.querySelector( + var instance$278 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$277) + if (instance$278) return ( (resource.state.loading |= 4), - (resource.instance = instance$277), - markNodeAsHoistable(instance$277), - instance$277 + (resource.instance = instance$278), + markNodeAsHoistable(instance$278), + instance$278 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$277 = ( + instance$278 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$277); - var linkInstance = instance$277; + markNodeAsHoistable(instance$278); + var linkInstance = instance$278; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$277, "link", instance); + setInitialProperties(instance$278, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$277, props.precedence, hoistableRoot); - return (resource.instance = instance$277); + insertStylesheet(instance$278, props.precedence, hoistableRoot); + return (resource.instance = instance$278); case "script": - instance$277 = getScriptKey(props.src); + instance$278 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$277) + getScriptSelectorFromKey(instance$278) )) ) return ( @@ -15971,7 +15993,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$277))) + if ((styleProps = preloadPropsMap.get(instance$278))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16975,16 +16997,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1767 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1772 = React.version; if ( - "19.1.0-www-modern-d8b903f4-20250102" !== - isomorphicReactPackageVersion$jscomp$inline_1767 + "19.1.0-www-modern-c81312e3-20250102" !== + isomorphicReactPackageVersion$jscomp$inline_1772 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1767, - "19.1.0-www-modern-d8b903f4-20250102" + isomorphicReactPackageVersion$jscomp$inline_1772, + "19.1.0-www-modern-c81312e3-20250102" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17000,24 +17022,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2300 = { +var internals$jscomp$inline_2299 = { bundleType: 0, - version: "19.1.0-www-modern-d8b903f4-20250102", + version: "19.1.0-www-modern-c81312e3-20250102", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-modern-c81312e3-20250102" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2301 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2300 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2301.isDisabled && - hook$jscomp$inline_2301.supportsFiber + !hook$jscomp$inline_2300.isDisabled && + hook$jscomp$inline_2300.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2301.inject( - internals$jscomp$inline_2300 + (rendererID = hook$jscomp$inline_2300.inject( + internals$jscomp$inline_2299 )), - (injectedHook = hook$jscomp$inline_2301); + (injectedHook = hook$jscomp$inline_2300); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17370,4 +17392,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-modern-d8b903f4-20250102"; +exports.version = "19.1.0-www-modern-c81312e3-20250102"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index 499aa83411f82..ab48c5d7accec 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -707,14 +707,13 @@ function getHighestPriorityLanes(lanes) { return lanes; } } -function getNextLanes(root, wipLanes) { +function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -724,29 +723,29 @@ function getNextLanes(root, wipLanes) { 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -2331,7 +2330,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( root$29, - root$29 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$29 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$29.cancelPendingCommit || + -1 !== root$29.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || checkIfRootIsPrerendering(root$29, JSCompiler_inline_result) || @@ -2397,7 +2398,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); pingedLanes = root.callbackNode; if ( @@ -2455,7 +2457,8 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -9133,105 +9136,192 @@ var offscreenSubtreeIsHidden = !1, inProgressRoot = null, focusedInstanceHandle = null, shouldFireAfterActiveInstanceBlur = !1; -function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - deletions = fiber.deletions; - if (null !== deletions) - for (var i = 0; i < deletions.length; i++) { - var deletion = deletions[i]; - doesFiberContain(deletion, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(deletion)); +function commitBeforeMutationEffects(root, firstChild) { + root = root.containerInfo; + eventsEnabled = _enabled; + root = getActiveElementDeep(root); + if (hasSelectionCapabilities(root)) { + if ("selectionStart" in root) + var JSCompiler_temp = { + start: root.selectionStart, + end: root.selectionEnd + }; + else + a: { + JSCompiler_temp = + ((JSCompiler_temp = root.ownerDocument) && + JSCompiler_temp.defaultView) || + window; + var selection = + JSCompiler_temp.getSelection && JSCompiler_temp.getSelection(); + if (selection && 0 !== selection.rangeCount) { + JSCompiler_temp = selection.anchorNode; + var anchorOffset = selection.anchorOffset, + focusNode = selection.focusNode; + selection = selection.focusOffset; + try { + JSCompiler_temp.nodeType, focusNode.nodeType; + } catch (e$219) { + JSCompiler_temp = null; + break a; + } + var length = 0, + start = -1, + end = -1, + indexWithinAnchor = 0, + indexWithinFocus = 0, + node = root, + parentNode = null; + b: for (;;) { + for (var next; ; ) { + node !== JSCompiler_temp || + (0 !== anchorOffset && 3 !== node.nodeType) || + (start = length + anchorOffset); + node !== focusNode || + (0 !== selection && 3 !== node.nodeType) || + (end = length + selection); + 3 === node.nodeType && (length += node.nodeValue.length); + if (null === (next = node.firstChild)) break; + parentNode = node; + node = next; + } + for (;;) { + if (node === root) break b; + parentNode === JSCompiler_temp && + ++indexWithinAnchor === anchorOffset && + (start = length); + parentNode === focusNode && + ++indexWithinFocus === selection && + (end = length); + if (null !== (next = node.nextSibling)) break; + node = parentNode; + parentNode = node.parentNode; + } + node = next; + } + JSCompiler_temp = + -1 === start || -1 === end ? null : { start: start, end: end }; + } else JSCompiler_temp = null; } - deletions = fiber.child; - if (0 !== (fiber.subtreeFlags & 9236) && null !== deletions) - (deletions.return = fiber), (nextEffect = deletions); + JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 }; + } else JSCompiler_temp = null; + selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp }; + root = null; + JSCompiler_temp = selectionInformation.focusedElem; + null !== JSCompiler_temp && + (root = getClosestInstanceFromNode(JSCompiler_temp)); + _enabled = !1; + focusedInstanceHandle = root; + shouldFireAfterActiveInstanceBlur = !1; + for (nextEffect = firstChild; null !== nextEffect; ) { + firstChild = nextEffect; + root = firstChild.deletions; + if (null !== root) + for ( + JSCompiler_temp = 0; + JSCompiler_temp < root.length; + JSCompiler_temp++ + ) + (anchorOffset = root[JSCompiler_temp]), + doesFiberContain(anchorOffset, focusedInstanceHandle) && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(anchorOffset)); + root = firstChild.child; + if (0 !== (firstChild.subtreeFlags & 9236) && null !== root) + (root.return = firstChild), (nextEffect = root); else - a: for (; null !== nextEffect; ) { - fiber = nextEffect; - deletions = void 0; - var JSCompiler_temp; - i = fiber; - deletion = i.alternate; - var flags = i.flags; + for (; null !== nextEffect; ) { + firstChild = nextEffect; + root = firstChild.alternate; + JSCompiler_temp = firstChild.flags; if ( - !shouldFireAfterActiveInstanceBlur && - null !== focusedInstanceHandle + (anchorOffset = + !shouldFireAfterActiveInstanceBlur && + null !== focusedInstanceHandle) ) { - if ((JSCompiler_temp = 13 === i.tag)) - b: { + if ((anchorOffset = 13 === firstChild.tag)) + a: { if ( - null !== deletion && - ((JSCompiler_temp = deletion.memoizedState), - null === JSCompiler_temp || null !== JSCompiler_temp.dehydrated) + null !== root && + ((anchorOffset = root.memoizedState), + null === anchorOffset || null !== anchorOffset.dehydrated) ) { - JSCompiler_temp = i.memoizedState; - JSCompiler_temp = - null !== JSCompiler_temp && - null === JSCompiler_temp.dehydrated; - break b; + anchorOffset = firstChild.memoizedState; + anchorOffset = + null !== anchorOffset && null === anchorOffset.dehydrated; + break a; } - JSCompiler_temp = !1; + anchorOffset = !1; } - JSCompiler_temp && - doesFiberContain(i, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(i)); + anchorOffset = + anchorOffset && doesFiberContain(firstChild, focusedInstanceHandle); } - switch (i.tag) { + anchorOffset && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(firstChild)); + switch (firstChild.tag) { case 0: if ( - 0 !== (flags & 4) && - ((deletions = i.updateQueue), - (deletions = null !== deletions ? deletions.events : null), - null !== deletions) + 0 !== (JSCompiler_temp & 4) && + ((root = firstChild.updateQueue), + (root = null !== root ? root.events : null), + null !== root) ) - for (i = 0; i < deletions.length; i++) - (deletion = deletions[i]), - (deletion.ref.impl = deletion.nextImpl); + for ( + JSCompiler_temp = 0; + JSCompiler_temp < root.length; + JSCompiler_temp++ + ) + (anchorOffset = root[JSCompiler_temp]), + (anchorOffset.ref.impl = anchorOffset.nextImpl); break; case 11: case 15: break; case 1: - if (0 !== (flags & 1024) && null !== deletion) { - flags = deletion.memoizedProps; - deletion = deletion.memoizedState; - JSCompiler_temp = i.stateNode; + if (0 !== (JSCompiler_temp & 1024) && null !== root) { + JSCompiler_temp = void 0; + anchorOffset = firstChild; + focusNode = root.memoizedProps; + root = root.memoizedState; + selection = anchorOffset.stateNode; try { var resolvedPrevProps = resolveClassComponentProps( - i.type, - flags, - i.elementType === i.type + anchorOffset.type, + focusNode, + anchorOffset.elementType === anchorOffset.type ); - deletions = JSCompiler_temp.getSnapshotBeforeUpdate( + JSCompiler_temp = selection.getSnapshotBeforeUpdate( resolvedPrevProps, - deletion + root ); - JSCompiler_temp.__reactInternalSnapshotBeforeUpdate = deletions; + selection.__reactInternalSnapshotBeforeUpdate = JSCompiler_temp; } catch (error) { - captureCommitPhaseError(i, i.return, error); + captureCommitPhaseError( + anchorOffset, + anchorOffset.return, + error + ); } } break; case 3: - if (0 !== (flags & 1024)) - b: if ( - ((deletions = i.stateNode.containerInfo), - (i = deletions.nodeType), - 9 === i) + if (0 !== (JSCompiler_temp & 1024)) + if ( + ((root = firstChild.stateNode.containerInfo), + (JSCompiler_temp = root.nodeType), + 9 === JSCompiler_temp) ) - clearContainerSparingly(deletions); - else if (1 === i) - switch (deletions.nodeName) { + clearContainerSparingly(root); + else if (1 === JSCompiler_temp) + switch (root.nodeName) { case "HEAD": case "HTML": case "BODY": - clearContainerSparingly(deletions); - break b; + clearContainerSparingly(root); + break; default: - deletions.textContent = ""; + root.textContent = ""; } break; case 5: @@ -9242,17 +9332,19 @@ function commitBeforeMutationEffects_begin() { case 17: break; default: - if (0 !== (flags & 1024)) throw Error(formatProdErrorMessage(163)); + if (0 !== (JSCompiler_temp & 1024)) + throw Error(formatProdErrorMessage(163)); } - deletions = fiber.sibling; - if (null !== deletions) { - deletions.return = fiber.return; - nextEffect = deletions; - break a; + root = firstChild.sibling; + if (null !== root) { + root.return = firstChild.return; + nextEffect = root; + break; } - nextEffect = fiber.return; + nextEffect = firstChild.return; } } + focusedInstanceHandle = null; } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -9891,12 +9983,6 @@ function attachSuspenseRetryListeners(finishedWork, wakeables) { } }); } -function commitMutationEffects(root, finishedWork, committedLanes) { - inProgressLanes = committedLanes; - inProgressRoot = root; - commitMutationEffectsOnFiber(finishedWork, root); - inProgressRoot = inProgressLanes = null; -} function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) { var deletions = parentFiber.deletions; if (null !== deletions) @@ -11579,8 +11665,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { default: throw Error(formatProdErrorMessage(329)); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === renderWasConcurrent) && @@ -11593,7 +11677,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -11654,18 +11738,24 @@ function commitRootWhenReady( completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = -1; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -11683,16 +11773,14 @@ function commitRootWhenReady( } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -11785,8 +11873,6 @@ function resetWorkInProgressStack() { } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; -1 !== timeoutHandle && ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle)); @@ -12336,160 +12422,275 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) { } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime -) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = Internals.p; - try { - (Internals.p = 2), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (Internals.p = previousUpdateLanePriority); - } -} -function commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markCommitStarted && injectedProfilingHooks.markCommitStarted(lanes); - if (null === finishedWork) - return enableSchedulingProfiler && markCommitStopped(), null; - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; - 0 !== (finishedWork.subtreeFlags & 10256) || - 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = Internals.p), - (Internals.p = 2), - (suspendedRetryLanes = executionContext), - (executionContext |= 4), - (focusedInstanceHandle = prepareForCommit(root.containerInfo)), - (shouldFireAfterActiveInstanceBlur = !1), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - (focusedInstanceHandle = null), - commitMutationEffects(root, finishedWork, lanes), - shouldFireAfterActiveInstanceBlur && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), + if (null === finishedWork) enableSchedulingProfiler && markCommitStopped(); + else { + if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + commitStartTime = now(); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = Internals.p; + Internals.p = 2; + updatedLanes = executionContext; + executionContext |= 4; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (Internals.p = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ); + } +} +function flushMutationEffects(root, finishedWork, lanes) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + inProgressLanes = lanes; + inProgressRoot = root; + commitMutationEffectsOnFiber(finishedWork, root); + inProgressRoot = inProgressLanes = null; + if (shouldFireAfterActiveInstanceBlur) { + _enabled = !0; + var target = selectionInformation.focusedElem, + event = createEvent("afterblur", !1); + event.relatedTarget = target; + document.dispatchEvent(event); + _enabled = !1; + } + lanes = selectionInformation; + var curFocusedElem = getActiveElementDeep(root.containerInfo), + priorFocusedElem = lanes.focusedElem, + priorSelectionRange = lanes.selectionRange; + if ( + curFocusedElem !== priorFocusedElem && + priorFocusedElem && + priorFocusedElem.ownerDocument && + containsNode( + priorFocusedElem.ownerDocument.documentElement, + priorFocusedElem + ) + ) { + if ( + null !== priorSelectionRange && + hasSelectionCapabilities(priorFocusedElem) + ) { + var start = priorSelectionRange.start, + end = priorSelectionRange.end; + void 0 === end && (end = start); + if ("selectionStart" in priorFocusedElem) + (priorFocusedElem.selectionStart = start), + (priorFocusedElem.selectionEnd = Math.min( + end, + priorFocusedElem.value.length + )); + else { + var doc = priorFocusedElem.ownerDocument || document, + win = (doc && doc.defaultView) || window; + if (win.getSelection) { + var selection = win.getSelection(), + length = priorFocusedElem.textContent.length, + start$jscomp$0 = Math.min(priorSelectionRange.start, length), + end$jscomp$0 = + void 0 === priorSelectionRange.end + ? start$jscomp$0 + : Math.min(priorSelectionRange.end, length); + !selection.extend && + start$jscomp$0 > end$jscomp$0 && + ((curFocusedElem = end$jscomp$0), + (end$jscomp$0 = start$jscomp$0), + (start$jscomp$0 = curFocusedElem)); + var startMarker = getNodeForCharacterOffset( + priorFocusedElem, + start$jscomp$0 + ), + endMarker = getNodeForCharacterOffset( + priorFocusedElem, + end$jscomp$0 + ); + if ( + startMarker && + endMarker && + (1 !== selection.rangeCount || + selection.anchorNode !== startMarker.node || + selection.anchorOffset !== startMarker.offset || + selection.focusNode !== endMarker.node || + selection.focusOffset !== endMarker.offset) + ) { + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + start$jscomp$0 > end$jscomp$0 + ? (selection.addRange(range), + selection.extend(endMarker.node, endMarker.offset)) + : (range.setEnd(endMarker.node, endMarker.offset), + selection.addRange(range)); + } + } + } + } + doc = []; + for (selection = priorFocusedElem; (selection = selection.parentNode); ) + 1 === selection.nodeType && + doc.push({ + element: selection, + left: selection.scrollLeft, + top: selection.scrollTop + }); + "function" === typeof priorFocusedElem.focus && + priorFocusedElem.focus(); + for ( + priorFocusedElem = 0; + priorFocusedElem < doc.length; + priorFocusedElem++ + ) { + var info = doc[priorFocusedElem]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; +} +function flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate +) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), - enableSchedulingProfiler && + commitLayoutEffects(finishedWork, root, lanes), enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = suspendedRetryLanes), - (Internals.p = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - spawnedLane - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : releaseRootPooledCache(root, remainingLanes); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); + : releaseRootPooledCache(root, root.pendingLanes); + rootHasLayoutEffect = root.pendingLanes; + 0 === rootHasLayoutEffect && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot(finishedWork.stateNode, rootHasLayoutEffect); isDevToolsPresent && root.memoizedUpdaters.clear(); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - renderPriorityLevel(remainingLanes.value, { - componentStack: remainingLanes.stack + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = Internals.p; + Internals.p = 2; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority]; + onRecoverableError(recoverableError.value, { + componentStack: recoverableError.stack }); + } + } finally { + (ReactSharedInternals.T = finishedWork), + (Internals.p = rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + rootHasLayoutEffect = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ @@ -12514,7 +12715,6 @@ function commitRootImpl( : (currentEndTime = endTime); }); } - return null; } function releaseRootPooledCache(root, remainingLanes) { 0 === (root.pooledCacheLanes &= remainingLanes) && @@ -12524,7 +12724,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$211 = rootWithPendingPassiveEffects, + var root$212 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12539,7 +12739,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$211, remainingLanes); + releaseRootPooledCache(root$212, remainingLanes); } } return !1; @@ -13080,11 +13280,7 @@ function FiberRootNode( ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = -1; this.callbackNode = this.next = @@ -13097,7 +13293,6 @@ function FiberRootNode( this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -13282,9 +13477,9 @@ function attemptContinuousHydration(fiber) { function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$216 = 0; - 31 > index$216; - index$216++ + var map = new Map(), lane = 1, index$217 = 0; + 31 > index$217; + index$217++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -13837,14 +14032,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$369; 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_1665 = "oninput" in document; + if (!isSupported$jscomp$inline_1665) { + var element$jscomp$inline_1666 = document.createElement("div"); + element$jscomp$inline_1666.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1665 = + "function" === typeof element$jscomp$inline_1666.oninput; } - JSCompiler_inline_result$jscomp$369 = isSupported$jscomp$inline_1653; + JSCompiler_inline_result$jscomp$369 = isSupported$jscomp$inline_1665; } else JSCompiler_inline_result$jscomp$369 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$369 && @@ -13973,97 +14168,6 @@ function hasSelectionCapabilities(elem) { "true" === elem.contentEditable) ); } -function restoreSelection(priorSelectionInformation, containerInfo) { - var curFocusedElem = getActiveElementDeep(containerInfo); - containerInfo = priorSelectionInformation.focusedElem; - var priorSelectionRange = priorSelectionInformation.selectionRange; - if ( - curFocusedElem !== containerInfo && - containerInfo && - containerInfo.ownerDocument && - containsNode(containerInfo.ownerDocument.documentElement, containerInfo) - ) { - if (null !== priorSelectionRange && hasSelectionCapabilities(containerInfo)) - if ( - ((priorSelectionInformation = priorSelectionRange.start), - (curFocusedElem = priorSelectionRange.end), - void 0 === curFocusedElem && - (curFocusedElem = priorSelectionInformation), - "selectionStart" in containerInfo) - ) - (containerInfo.selectionStart = priorSelectionInformation), - (containerInfo.selectionEnd = Math.min( - curFocusedElem, - containerInfo.value.length - )); - else if ( - ((curFocusedElem = - ((priorSelectionInformation = - containerInfo.ownerDocument || document) && - priorSelectionInformation.defaultView) || - window), - curFocusedElem.getSelection) - ) { - curFocusedElem = curFocusedElem.getSelection(); - var length = containerInfo.textContent.length, - start = Math.min(priorSelectionRange.start, length); - priorSelectionRange = - void 0 === priorSelectionRange.end - ? start - : Math.min(priorSelectionRange.end, length); - !curFocusedElem.extend && - start > priorSelectionRange && - ((length = priorSelectionRange), - (priorSelectionRange = start), - (start = length)); - length = getNodeForCharacterOffset(containerInfo, start); - var endMarker = getNodeForCharacterOffset( - containerInfo, - priorSelectionRange - ); - length && - endMarker && - (1 !== curFocusedElem.rangeCount || - curFocusedElem.anchorNode !== length.node || - curFocusedElem.anchorOffset !== length.offset || - curFocusedElem.focusNode !== endMarker.node || - curFocusedElem.focusOffset !== endMarker.offset) && - ((priorSelectionInformation = - priorSelectionInformation.createRange()), - priorSelectionInformation.setStart(length.node, length.offset), - curFocusedElem.removeAllRanges(), - start > priorSelectionRange - ? (curFocusedElem.addRange(priorSelectionInformation), - curFocusedElem.extend(endMarker.node, endMarker.offset)) - : (priorSelectionInformation.setEnd( - endMarker.node, - endMarker.offset - ), - curFocusedElem.addRange(priorSelectionInformation))); - } - priorSelectionInformation = []; - for ( - curFocusedElem = containerInfo; - (curFocusedElem = curFocusedElem.parentNode); - - ) - 1 === curFocusedElem.nodeType && - priorSelectionInformation.push({ - element: curFocusedElem, - left: curFocusedElem.scrollLeft, - top: curFocusedElem.scrollTop - }); - "function" === typeof containerInfo.focus && containerInfo.focus(); - for ( - containerInfo = 0; - containerInfo < priorSelectionInformation.length; - containerInfo++ - ) - (curFocusedElem = priorSelectionInformation[containerInfo]), - (curFocusedElem.element.scrollLeft = curFocusedElem.left), - (curFocusedElem.element.scrollTop = curFocusedElem.top); - } -} var skipSelectionChangeEvent = canUseDOM && "documentMode" in document && 11 >= document.documentMode, activeElement = null, @@ -14258,20 +14362,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_1706 = 0; + i$jscomp$inline_1706 < simpleEventPluginEvents.length; + i$jscomp$inline_1706++ ) { - 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_1707 = + simpleEventPluginEvents[i$jscomp$inline_1706], + domEventName$jscomp$inline_1708 = + eventName$jscomp$inline_1707.toLowerCase(), + capitalizedEvent$jscomp$inline_1709 = + eventName$jscomp$inline_1707[0].toUpperCase() + + eventName$jscomp$inline_1707.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1696, - "on" + capitalizedEvent$jscomp$inline_1697 + domEventName$jscomp$inline_1708, + "on" + capitalizedEvent$jscomp$inline_1709 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15564,34 +15668,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$232 = props[hasSrc]; - if (null != propValue$232) + var propValue$233 = props[hasSrc]; + if (null != propValue$233) switch (hasSrc) { case "name": - hasSrcSet = propValue$232; + hasSrcSet = propValue$233; break; case "type": - propValue = propValue$232; + propValue = propValue$233; break; case "checked": - checked = propValue$232; + checked = propValue$233; break; case "defaultChecked": - defaultChecked = propValue$232; + defaultChecked = propValue$233; break; case "value": - propKey = propValue$232; + propKey = propValue$233; break; case "defaultValue": - defaultValue = propValue$232; + defaultValue = propValue$233; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$232) + if (null != propValue$233) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$232, props, null); + setProp(domElement, tag, hasSrc, propValue$233, props, null); } } initInput( @@ -15728,14 +15832,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$232 in props) - props.hasOwnProperty(propValue$232) && - ((hasSrc = props[propValue$232]), + for (propValue$233 in props) + props.hasOwnProperty(propValue$233) && + ((hasSrc = props[propValue$233]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$232, + propValue$233, hasSrc, props, void 0 @@ -15783,14 +15887,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$249 in nextProps) { - var propKey = nextProps[propKey$249]; - lastProp = lastProps[propKey$249]; + for (var propKey$250 in nextProps) { + var propKey = nextProps[propKey$250]; + lastProp = lastProps[propKey$250]; if ( - nextProps.hasOwnProperty(propKey$249) && + nextProps.hasOwnProperty(propKey$250) && (null != propKey || null != lastProp) ) - switch (propKey$249) { + switch (propKey$250) { case "type": type = propKey; break; @@ -15819,7 +15923,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$249, + propKey$250, propKey, nextProps, lastProp @@ -15838,7 +15942,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$249 = null; + propKey = value = defaultValue = propKey$250 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15869,7 +15973,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$249 = type; + propKey$250 = type; break; case "defaultValue": defaultValue = type; @@ -15890,15 +15994,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$249 - ? updateOptions(domElement, !!lastProps, propKey$249, !1) + null != propKey$250 + ? updateOptions(domElement, !!lastProps, propKey$250, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$249 = null; + propKey = propKey$250 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15922,7 +16026,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$249 = name; + propKey$250 = name; break; case "defaultValue": propKey = name; @@ -15936,17 +16040,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$249, propKey); + updateTextarea(domElement, propKey$250, propKey); return; case "option": - for (var propKey$265 in lastProps) + for (var propKey$266 in lastProps) if ( - ((propKey$249 = lastProps[propKey$265]), - lastProps.hasOwnProperty(propKey$265) && - null != propKey$249 && - !nextProps.hasOwnProperty(propKey$265)) + ((propKey$250 = lastProps[propKey$266]), + lastProps.hasOwnProperty(propKey$266) && + null != propKey$250 && + !nextProps.hasOwnProperty(propKey$266)) ) - switch (propKey$265) { + switch (propKey$266) { case "selected": domElement.selected = !1; break; @@ -15954,33 +16058,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$265, + propKey$266, null, nextProps, - propKey$249 + propKey$250 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$249 = nextProps[lastDefaultValue]), + ((propKey$250 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$249 !== propKey && - (null != propKey$249 || null != propKey)) + propKey$250 !== propKey && + (null != propKey$250 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$249 && - "function" !== typeof propKey$249 && - "symbol" !== typeof propKey$249; + propKey$250 && + "function" !== typeof propKey$250 && + "symbol" !== typeof propKey$250; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$249, + propKey$250, nextProps, propKey ); @@ -16001,24 +16105,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$270 in lastProps) - (propKey$249 = lastProps[propKey$270]), - lastProps.hasOwnProperty(propKey$270) && - null != propKey$249 && - !nextProps.hasOwnProperty(propKey$270) && - setProp(domElement, tag, propKey$270, null, nextProps, propKey$249); + for (var propKey$271 in lastProps) + (propKey$250 = lastProps[propKey$271]), + lastProps.hasOwnProperty(propKey$271) && + null != propKey$250 && + !nextProps.hasOwnProperty(propKey$271) && + setProp(domElement, tag, propKey$271, null, nextProps, propKey$250); for (checked in nextProps) if ( - ((propKey$249 = nextProps[checked]), + ((propKey$250 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$249 !== propKey && - (null != propKey$249 || null != propKey)) + propKey$250 !== propKey && + (null != propKey$250 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$249) + if (null != propKey$250) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16026,7 +16130,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$249, + propKey$250, nextProps, propKey ); @@ -16034,49 +16138,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$275 in lastProps) - (propKey$249 = lastProps[propKey$275]), - lastProps.hasOwnProperty(propKey$275) && - void 0 !== propKey$249 && - !nextProps.hasOwnProperty(propKey$275) && + for (var propKey$276 in lastProps) + (propKey$250 = lastProps[propKey$276]), + lastProps.hasOwnProperty(propKey$276) && + void 0 !== propKey$250 && + !nextProps.hasOwnProperty(propKey$276) && setPropOnCustomElement( domElement, tag, - propKey$275, + propKey$276, void 0, nextProps, - propKey$249 + propKey$250 ); for (defaultChecked in nextProps) - (propKey$249 = nextProps[defaultChecked]), + (propKey$250 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$249 === propKey || - (void 0 === propKey$249 && void 0 === propKey) || + propKey$250 === propKey || + (void 0 === propKey$250 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$249, + propKey$250, nextProps, propKey ); return; } } - for (var propKey$280 in lastProps) - (propKey$249 = lastProps[propKey$280]), - lastProps.hasOwnProperty(propKey$280) && - null != propKey$249 && - !nextProps.hasOwnProperty(propKey$280) && - setProp(domElement, tag, propKey$280, null, nextProps, propKey$249); + for (var propKey$281 in lastProps) + (propKey$250 = lastProps[propKey$281]), + lastProps.hasOwnProperty(propKey$281) && + null != propKey$250 && + !nextProps.hasOwnProperty(propKey$281) && + setProp(domElement, tag, propKey$281, null, nextProps, propKey$250); for (lastProp in nextProps) - (propKey$249 = nextProps[lastProp]), + (propKey$250 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$249 === propKey || - (null == propKey$249 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$249, nextProps, propKey); + propKey$250 === propKey || + (null == propKey$250 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$250, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16109,85 +16213,6 @@ function getChildHostContextProd(parentNamespace, type) { ? 0 : parentNamespace; } -function prepareForCommit(containerInfo) { - eventsEnabled = _enabled; - containerInfo = getActiveElementDeep(containerInfo); - if (hasSelectionCapabilities(containerInfo)) { - if ("selectionStart" in containerInfo) - var JSCompiler_temp = { - start: containerInfo.selectionStart, - end: containerInfo.selectionEnd - }; - else - a: { - JSCompiler_temp = - ((JSCompiler_temp = containerInfo.ownerDocument) && - JSCompiler_temp.defaultView) || - window; - var selection = - JSCompiler_temp.getSelection && JSCompiler_temp.getSelection(); - if (selection && 0 !== selection.rangeCount) { - JSCompiler_temp = selection.anchorNode; - var anchorOffset = selection.anchorOffset, - focusNode = selection.focusNode; - selection = selection.focusOffset; - try { - JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$218) { - JSCompiler_temp = null; - break a; - } - var length = 0, - start = -1, - end = -1, - indexWithinAnchor = 0, - indexWithinFocus = 0, - node = containerInfo, - parentNode = null; - b: for (;;) { - for (var next; ; ) { - node !== JSCompiler_temp || - (0 !== anchorOffset && 3 !== node.nodeType) || - (start = length + anchorOffset); - node !== focusNode || - (0 !== selection && 3 !== node.nodeType) || - (end = length + selection); - 3 === node.nodeType && (length += node.nodeValue.length); - if (null === (next = node.firstChild)) break; - parentNode = node; - node = next; - } - for (;;) { - if (node === containerInfo) break b; - parentNode === JSCompiler_temp && - ++indexWithinAnchor === anchorOffset && - (start = length); - parentNode === focusNode && - ++indexWithinFocus === selection && - (end = length); - if (null !== (next = node.nextSibling)) break; - node = parentNode; - parentNode = node.parentNode; - } - node = next; - } - JSCompiler_temp = - -1 === start || -1 === end ? null : { start: start, end: end }; - } else JSCompiler_temp = null; - } - JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 }; - } else JSCompiler_temp = null; - selectionInformation = { - focusedElem: containerInfo, - selectionRange: JSCompiler_temp - }; - containerInfo = null; - JSCompiler_temp = selectionInformation.focusedElem; - null !== JSCompiler_temp && - (containerInfo = getClosestInstanceFromNode(JSCompiler_temp)); - _enabled = !1; - return containerInfo; -} function beforeActiveInstanceBlur(internalInstanceHandle) { _enabled = !0; var target = selectionInformation.focusedElem, @@ -16251,11 +16276,6 @@ function createEvent(type, bubbles) { event.initEvent(type, bubbles, !1); return event; } -function dispatchAfterDetachedBlur(target) { - var event = createEvent("afterblur", !1); - event.relatedTarget = target; - document.dispatchEvent(event); -} function clearSuspenseBoundary(parentInstance, suspenseInstance) { var node = suspenseInstance, depth = 0; @@ -16752,26 +16772,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$288 = getResourcesFromRoot( + var styles$289 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$289 = styles$288.get(type); - resource$289 || + resource$290 = styles$289.get(type); + resource$290 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$289 = { + (resource$290 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$288.set(type, resource$289), - (styles$288 = JSCompiler_inline_result.querySelector( + styles$289.set(type, resource$290), + (styles$289 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$288._p && - ((resource$289.instance = styles$288), - (resource$289.state.loading = 5)), + !styles$289._p && + ((resource$290.instance = styles$289), + (resource$290.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16784,16 +16804,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$288 || + styles$289 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$289.state + resource$290.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$289; + return resource$290; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16890,37 +16910,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$294 = hoistableRoot.querySelector( + var instance$295 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$294) + if (instance$295) return ( (resource.state.loading |= 4), - (resource.instance = instance$294), - markNodeAsHoistable(instance$294), - instance$294 + (resource.instance = instance$295), + markNodeAsHoistable(instance$295), + instance$295 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$294 = ( + instance$295 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$294); - var linkInstance = instance$294; + markNodeAsHoistable(instance$295); + var linkInstance = instance$295; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$294, "link", instance); + setInitialProperties(instance$295, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$294, props.precedence, hoistableRoot); - return (resource.instance = instance$294); + insertStylesheet(instance$295, props.precedence, hoistableRoot); + return (resource.instance = instance$295); case "script": - instance$294 = getScriptKey(props.src); + instance$295 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$294) + getScriptSelectorFromKey(instance$295) )) ) return ( @@ -16929,7 +16949,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$294))) + if ((styleProps = preloadPropsMap.get(instance$295))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17933,16 +17953,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1870 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1879 = React.version; if ( - "19.1.0-www-classic-d8b903f4-20250102" !== - isomorphicReactPackageVersion$jscomp$inline_1870 + "19.1.0-www-classic-c81312e3-20250102" !== + isomorphicReactPackageVersion$jscomp$inline_1879 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1870, - "19.1.0-www-classic-d8b903f4-20250102" + isomorphicReactPackageVersion$jscomp$inline_1879, + "19.1.0-www-classic-c81312e3-20250102" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17958,27 +17978,27 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_1872 = { +var internals$jscomp$inline_1881 = { bundleType: 0, - version: "19.1.0-www-classic-d8b903f4-20250102", + version: "19.1.0-www-classic-c81312e3-20250102", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-classic-c81312e3-20250102" }; enableSchedulingProfiler && - ((internals$jscomp$inline_1872.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_1872.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_2370 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2371 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2370.isDisabled && - hook$jscomp$inline_2370.supportsFiber + !hook$jscomp$inline_2371.isDisabled && + hook$jscomp$inline_2371.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2370.inject( - internals$jscomp$inline_1872 + (rendererID = hook$jscomp$inline_2371.inject( + internals$jscomp$inline_1881 )), - (injectedHook = hook$jscomp$inline_2370); + (injectedHook = hook$jscomp$inline_2371); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18331,7 +18351,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-classic-d8b903f4-20250102"; +exports.version = "19.1.0-www-classic-c81312e3-20250102"; "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 48b56b46d55f3..2d7b09bdb224d 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -642,14 +642,13 @@ function getHighestPriorityLanes(lanes) { return lanes; } } -function getNextLanes(root, wipLanes) { +function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -659,29 +658,29 @@ function getNextLanes(root, wipLanes) { 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -2182,7 +2181,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( root$29, - root$29 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$29 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$29.cancelPendingCommit || + -1 !== root$29.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || checkIfRootIsPrerendering(root$29, JSCompiler_inline_result) || @@ -2248,7 +2249,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); pingedLanes = root.callbackNode; if ( @@ -2306,7 +2308,8 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -8883,105 +8886,192 @@ var offscreenSubtreeIsHidden = !1, inProgressRoot = null, focusedInstanceHandle = null, shouldFireAfterActiveInstanceBlur = !1; -function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - deletions = fiber.deletions; - if (null !== deletions) - for (var i = 0; i < deletions.length; i++) { - var deletion = deletions[i]; - doesFiberContain(deletion, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(deletion)); +function commitBeforeMutationEffects(root, firstChild) { + root = root.containerInfo; + eventsEnabled = _enabled; + root = getActiveElementDeep(root); + if (hasSelectionCapabilities(root)) { + if ("selectionStart" in root) + var JSCompiler_temp = { + start: root.selectionStart, + end: root.selectionEnd + }; + else + a: { + JSCompiler_temp = + ((JSCompiler_temp = root.ownerDocument) && + JSCompiler_temp.defaultView) || + window; + var selection = + JSCompiler_temp.getSelection && JSCompiler_temp.getSelection(); + if (selection && 0 !== selection.rangeCount) { + JSCompiler_temp = selection.anchorNode; + var anchorOffset = selection.anchorOffset, + focusNode = selection.focusNode; + selection = selection.focusOffset; + try { + JSCompiler_temp.nodeType, focusNode.nodeType; + } catch (e$219) { + JSCompiler_temp = null; + break a; + } + var length = 0, + start = -1, + end = -1, + indexWithinAnchor = 0, + indexWithinFocus = 0, + node = root, + parentNode = null; + b: for (;;) { + for (var next; ; ) { + node !== JSCompiler_temp || + (0 !== anchorOffset && 3 !== node.nodeType) || + (start = length + anchorOffset); + node !== focusNode || + (0 !== selection && 3 !== node.nodeType) || + (end = length + selection); + 3 === node.nodeType && (length += node.nodeValue.length); + if (null === (next = node.firstChild)) break; + parentNode = node; + node = next; + } + for (;;) { + if (node === root) break b; + parentNode === JSCompiler_temp && + ++indexWithinAnchor === anchorOffset && + (start = length); + parentNode === focusNode && + ++indexWithinFocus === selection && + (end = length); + if (null !== (next = node.nextSibling)) break; + node = parentNode; + parentNode = node.parentNode; + } + node = next; + } + JSCompiler_temp = + -1 === start || -1 === end ? null : { start: start, end: end }; + } else JSCompiler_temp = null; } - deletions = fiber.child; - if (0 !== (fiber.subtreeFlags & 9236) && null !== deletions) - (deletions.return = fiber), (nextEffect = deletions); + JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 }; + } else JSCompiler_temp = null; + selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp }; + root = null; + JSCompiler_temp = selectionInformation.focusedElem; + null !== JSCompiler_temp && + (root = getClosestInstanceFromNode(JSCompiler_temp)); + _enabled = !1; + focusedInstanceHandle = root; + shouldFireAfterActiveInstanceBlur = !1; + for (nextEffect = firstChild; null !== nextEffect; ) { + firstChild = nextEffect; + root = firstChild.deletions; + if (null !== root) + for ( + JSCompiler_temp = 0; + JSCompiler_temp < root.length; + JSCompiler_temp++ + ) + (anchorOffset = root[JSCompiler_temp]), + doesFiberContain(anchorOffset, focusedInstanceHandle) && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(anchorOffset)); + root = firstChild.child; + if (0 !== (firstChild.subtreeFlags & 9236) && null !== root) + (root.return = firstChild), (nextEffect = root); else - a: for (; null !== nextEffect; ) { - fiber = nextEffect; - deletions = void 0; - var JSCompiler_temp; - i = fiber; - deletion = i.alternate; - var flags = i.flags; + for (; null !== nextEffect; ) { + firstChild = nextEffect; + root = firstChild.alternate; + JSCompiler_temp = firstChild.flags; if ( - !shouldFireAfterActiveInstanceBlur && - null !== focusedInstanceHandle + (anchorOffset = + !shouldFireAfterActiveInstanceBlur && + null !== focusedInstanceHandle) ) { - if ((JSCompiler_temp = 13 === i.tag)) - b: { + if ((anchorOffset = 13 === firstChild.tag)) + a: { if ( - null !== deletion && - ((JSCompiler_temp = deletion.memoizedState), - null === JSCompiler_temp || null !== JSCompiler_temp.dehydrated) + null !== root && + ((anchorOffset = root.memoizedState), + null === anchorOffset || null !== anchorOffset.dehydrated) ) { - JSCompiler_temp = i.memoizedState; - JSCompiler_temp = - null !== JSCompiler_temp && - null === JSCompiler_temp.dehydrated; - break b; + anchorOffset = firstChild.memoizedState; + anchorOffset = + null !== anchorOffset && null === anchorOffset.dehydrated; + break a; } - JSCompiler_temp = !1; + anchorOffset = !1; } - JSCompiler_temp && - doesFiberContain(i, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(i)); + anchorOffset = + anchorOffset && doesFiberContain(firstChild, focusedInstanceHandle); } - switch (i.tag) { + anchorOffset && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(firstChild)); + switch (firstChild.tag) { case 0: if ( - 0 !== (flags & 4) && - ((deletions = i.updateQueue), - (deletions = null !== deletions ? deletions.events : null), - null !== deletions) + 0 !== (JSCompiler_temp & 4) && + ((root = firstChild.updateQueue), + (root = null !== root ? root.events : null), + null !== root) ) - for (i = 0; i < deletions.length; i++) - (deletion = deletions[i]), - (deletion.ref.impl = deletion.nextImpl); + for ( + JSCompiler_temp = 0; + JSCompiler_temp < root.length; + JSCompiler_temp++ + ) + (anchorOffset = root[JSCompiler_temp]), + (anchorOffset.ref.impl = anchorOffset.nextImpl); break; case 11: case 15: break; case 1: - if (0 !== (flags & 1024) && null !== deletion) { - flags = deletion.memoizedProps; - deletion = deletion.memoizedState; - JSCompiler_temp = i.stateNode; + if (0 !== (JSCompiler_temp & 1024) && null !== root) { + JSCompiler_temp = void 0; + anchorOffset = firstChild; + focusNode = root.memoizedProps; + root = root.memoizedState; + selection = anchorOffset.stateNode; try { var resolvedPrevProps = resolveClassComponentProps( - i.type, - flags, - i.elementType === i.type + anchorOffset.type, + focusNode, + anchorOffset.elementType === anchorOffset.type ); - deletions = JSCompiler_temp.getSnapshotBeforeUpdate( + JSCompiler_temp = selection.getSnapshotBeforeUpdate( resolvedPrevProps, - deletion + root ); - JSCompiler_temp.__reactInternalSnapshotBeforeUpdate = deletions; + selection.__reactInternalSnapshotBeforeUpdate = JSCompiler_temp; } catch (error) { - captureCommitPhaseError(i, i.return, error); + captureCommitPhaseError( + anchorOffset, + anchorOffset.return, + error + ); } } break; case 3: - if (0 !== (flags & 1024)) - b: if ( - ((deletions = i.stateNode.containerInfo), - (i = deletions.nodeType), - 9 === i) + if (0 !== (JSCompiler_temp & 1024)) + if ( + ((root = firstChild.stateNode.containerInfo), + (JSCompiler_temp = root.nodeType), + 9 === JSCompiler_temp) ) - clearContainerSparingly(deletions); - else if (1 === i) - switch (deletions.nodeName) { + clearContainerSparingly(root); + else if (1 === JSCompiler_temp) + switch (root.nodeName) { case "HEAD": case "HTML": case "BODY": - clearContainerSparingly(deletions); - break b; + clearContainerSparingly(root); + break; default: - deletions.textContent = ""; + root.textContent = ""; } break; case 5: @@ -8992,17 +9082,19 @@ function commitBeforeMutationEffects_begin() { case 17: break; default: - if (0 !== (flags & 1024)) throw Error(formatProdErrorMessage(163)); + if (0 !== (JSCompiler_temp & 1024)) + throw Error(formatProdErrorMessage(163)); } - deletions = fiber.sibling; - if (null !== deletions) { - deletions.return = fiber.return; - nextEffect = deletions; - break a; + root = firstChild.sibling; + if (null !== root) { + root.return = firstChild.return; + nextEffect = root; + break; } - nextEffect = fiber.return; + nextEffect = firstChild.return; } } + focusedInstanceHandle = null; } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -9641,12 +9733,6 @@ function attachSuspenseRetryListeners(finishedWork, wakeables) { } }); } -function commitMutationEffects(root, finishedWork, committedLanes) { - inProgressLanes = committedLanes; - inProgressRoot = root; - commitMutationEffectsOnFiber(finishedWork, root); - inProgressRoot = inProgressLanes = null; -} function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) { var deletions = parentFiber.deletions; if (null !== deletions) @@ -11329,8 +11415,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { default: throw Error(formatProdErrorMessage(329)); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === renderWasConcurrent) && @@ -11343,7 +11427,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -11404,18 +11488,24 @@ function commitRootWhenReady( completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = -1; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -11433,16 +11523,14 @@ function commitRootWhenReady( } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -11535,8 +11623,6 @@ function resetWorkInProgressStack() { } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; -1 !== timeoutHandle && ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle)); @@ -12082,160 +12168,275 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) { } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime -) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = Internals.p; - try { - (Internals.p = 2), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (Internals.p = previousUpdateLanePriority); - } -} -function commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markCommitStarted && injectedProfilingHooks.markCommitStarted(lanes); - if (null === finishedWork) - return enableSchedulingProfiler && markCommitStopped(), null; - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; - 0 !== (finishedWork.subtreeFlags & 10256) || - 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = Internals.p), - (Internals.p = 2), - (suspendedRetryLanes = executionContext), - (executionContext |= 4), - (focusedInstanceHandle = prepareForCommit(root.containerInfo)), - (shouldFireAfterActiveInstanceBlur = !1), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - (focusedInstanceHandle = null), - commitMutationEffects(root, finishedWork, lanes), - shouldFireAfterActiveInstanceBlur && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), + if (null === finishedWork) enableSchedulingProfiler && markCommitStopped(); + else { + if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + commitStartTime = now(); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = Internals.p; + Internals.p = 2; + updatedLanes = executionContext; + executionContext |= 4; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (Internals.p = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ); + } +} +function flushMutationEffects(root, finishedWork, lanes) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + inProgressLanes = lanes; + inProgressRoot = root; + commitMutationEffectsOnFiber(finishedWork, root); + inProgressRoot = inProgressLanes = null; + if (shouldFireAfterActiveInstanceBlur) { + _enabled = !0; + var target = selectionInformation.focusedElem, + event = createEvent("afterblur", !1); + event.relatedTarget = target; + document.dispatchEvent(event); + _enabled = !1; + } + lanes = selectionInformation; + var curFocusedElem = getActiveElementDeep(root.containerInfo), + priorFocusedElem = lanes.focusedElem, + priorSelectionRange = lanes.selectionRange; + if ( + curFocusedElem !== priorFocusedElem && + priorFocusedElem && + priorFocusedElem.ownerDocument && + containsNode( + priorFocusedElem.ownerDocument.documentElement, + priorFocusedElem + ) + ) { + if ( + null !== priorSelectionRange && + hasSelectionCapabilities(priorFocusedElem) + ) { + var start = priorSelectionRange.start, + end = priorSelectionRange.end; + void 0 === end && (end = start); + if ("selectionStart" in priorFocusedElem) + (priorFocusedElem.selectionStart = start), + (priorFocusedElem.selectionEnd = Math.min( + end, + priorFocusedElem.value.length + )); + else { + var doc = priorFocusedElem.ownerDocument || document, + win = (doc && doc.defaultView) || window; + if (win.getSelection) { + var selection = win.getSelection(), + length = priorFocusedElem.textContent.length, + start$jscomp$0 = Math.min(priorSelectionRange.start, length), + end$jscomp$0 = + void 0 === priorSelectionRange.end + ? start$jscomp$0 + : Math.min(priorSelectionRange.end, length); + !selection.extend && + start$jscomp$0 > end$jscomp$0 && + ((curFocusedElem = end$jscomp$0), + (end$jscomp$0 = start$jscomp$0), + (start$jscomp$0 = curFocusedElem)); + var startMarker = getNodeForCharacterOffset( + priorFocusedElem, + start$jscomp$0 + ), + endMarker = getNodeForCharacterOffset( + priorFocusedElem, + end$jscomp$0 + ); + if ( + startMarker && + endMarker && + (1 !== selection.rangeCount || + selection.anchorNode !== startMarker.node || + selection.anchorOffset !== startMarker.offset || + selection.focusNode !== endMarker.node || + selection.focusOffset !== endMarker.offset) + ) { + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + start$jscomp$0 > end$jscomp$0 + ? (selection.addRange(range), + selection.extend(endMarker.node, endMarker.offset)) + : (range.setEnd(endMarker.node, endMarker.offset), + selection.addRange(range)); + } + } + } + } + doc = []; + for (selection = priorFocusedElem; (selection = selection.parentNode); ) + 1 === selection.nodeType && + doc.push({ + element: selection, + left: selection.scrollLeft, + top: selection.scrollTop + }); + "function" === typeof priorFocusedElem.focus && + priorFocusedElem.focus(); + for ( + priorFocusedElem = 0; + priorFocusedElem < doc.length; + priorFocusedElem++ + ) { + var info = doc[priorFocusedElem]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; +} +function flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate +) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), - enableSchedulingProfiler && + commitLayoutEffects(finishedWork, root, lanes), enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = suspendedRetryLanes), - (Internals.p = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - spawnedLane - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : releaseRootPooledCache(root, remainingLanes); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); + : releaseRootPooledCache(root, root.pendingLanes); + rootHasLayoutEffect = root.pendingLanes; + 0 === rootHasLayoutEffect && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot(finishedWork.stateNode, rootHasLayoutEffect); isDevToolsPresent && root.memoizedUpdaters.clear(); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - renderPriorityLevel(remainingLanes.value, { - componentStack: remainingLanes.stack + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = Internals.p; + Internals.p = 2; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority]; + onRecoverableError(recoverableError.value, { + componentStack: recoverableError.stack }); + } + } finally { + (ReactSharedInternals.T = finishedWork), + (Internals.p = rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + rootHasLayoutEffect = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ @@ -12260,7 +12461,6 @@ function commitRootImpl( : (currentEndTime = endTime); }); } - return null; } function releaseRootPooledCache(root, remainingLanes) { 0 === (root.pooledCacheLanes &= remainingLanes) && @@ -12270,7 +12470,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$211 = rootWithPendingPassiveEffects, + var root$212 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12285,7 +12485,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$211, remainingLanes); + releaseRootPooledCache(root$212, remainingLanes); } } return !1; @@ -12826,11 +13026,7 @@ function FiberRootNode( ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = -1; this.callbackNode = this.next = @@ -12843,7 +13039,6 @@ function FiberRootNode( this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -12989,9 +13184,9 @@ function attemptContinuousHydration(fiber) { function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$216 = 0; - 31 > index$216; - index$216++ + var map = new Map(), lane = 1, index$217 = 0; + 31 > index$217; + index$217++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -13572,14 +13767,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$372; if (canUseDOM) { - var isSupported$jscomp$inline_1643 = "oninput" in document; - if (!isSupported$jscomp$inline_1643) { - var element$jscomp$inline_1644 = document.createElement("div"); - element$jscomp$inline_1644.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1643 = - "function" === typeof element$jscomp$inline_1644.oninput; + var isSupported$jscomp$inline_1655 = "oninput" in document; + if (!isSupported$jscomp$inline_1655) { + var element$jscomp$inline_1656 = document.createElement("div"); + element$jscomp$inline_1656.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1655 = + "function" === typeof element$jscomp$inline_1656.oninput; } - JSCompiler_inline_result$jscomp$372 = isSupported$jscomp$inline_1643; + JSCompiler_inline_result$jscomp$372 = isSupported$jscomp$inline_1655; } else JSCompiler_inline_result$jscomp$372 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$372 && @@ -13708,97 +13903,6 @@ function hasSelectionCapabilities(elem) { "true" === elem.contentEditable) ); } -function restoreSelection(priorSelectionInformation, containerInfo) { - var curFocusedElem = getActiveElementDeep(containerInfo); - containerInfo = priorSelectionInformation.focusedElem; - var priorSelectionRange = priorSelectionInformation.selectionRange; - if ( - curFocusedElem !== containerInfo && - containerInfo && - containerInfo.ownerDocument && - containsNode(containerInfo.ownerDocument.documentElement, containerInfo) - ) { - if (null !== priorSelectionRange && hasSelectionCapabilities(containerInfo)) - if ( - ((priorSelectionInformation = priorSelectionRange.start), - (curFocusedElem = priorSelectionRange.end), - void 0 === curFocusedElem && - (curFocusedElem = priorSelectionInformation), - "selectionStart" in containerInfo) - ) - (containerInfo.selectionStart = priorSelectionInformation), - (containerInfo.selectionEnd = Math.min( - curFocusedElem, - containerInfo.value.length - )); - else if ( - ((curFocusedElem = - ((priorSelectionInformation = - containerInfo.ownerDocument || document) && - priorSelectionInformation.defaultView) || - window), - curFocusedElem.getSelection) - ) { - curFocusedElem = curFocusedElem.getSelection(); - var length = containerInfo.textContent.length, - start = Math.min(priorSelectionRange.start, length); - priorSelectionRange = - void 0 === priorSelectionRange.end - ? start - : Math.min(priorSelectionRange.end, length); - !curFocusedElem.extend && - start > priorSelectionRange && - ((length = priorSelectionRange), - (priorSelectionRange = start), - (start = length)); - length = getNodeForCharacterOffset(containerInfo, start); - var endMarker = getNodeForCharacterOffset( - containerInfo, - priorSelectionRange - ); - length && - endMarker && - (1 !== curFocusedElem.rangeCount || - curFocusedElem.anchorNode !== length.node || - curFocusedElem.anchorOffset !== length.offset || - curFocusedElem.focusNode !== endMarker.node || - curFocusedElem.focusOffset !== endMarker.offset) && - ((priorSelectionInformation = - priorSelectionInformation.createRange()), - priorSelectionInformation.setStart(length.node, length.offset), - curFocusedElem.removeAllRanges(), - start > priorSelectionRange - ? (curFocusedElem.addRange(priorSelectionInformation), - curFocusedElem.extend(endMarker.node, endMarker.offset)) - : (priorSelectionInformation.setEnd( - endMarker.node, - endMarker.offset - ), - curFocusedElem.addRange(priorSelectionInformation))); - } - priorSelectionInformation = []; - for ( - curFocusedElem = containerInfo; - (curFocusedElem = curFocusedElem.parentNode); - - ) - 1 === curFocusedElem.nodeType && - priorSelectionInformation.push({ - element: curFocusedElem, - left: curFocusedElem.scrollLeft, - top: curFocusedElem.scrollTop - }); - "function" === typeof containerInfo.focus && containerInfo.focus(); - for ( - containerInfo = 0; - containerInfo < priorSelectionInformation.length; - containerInfo++ - ) - (curFocusedElem = priorSelectionInformation[containerInfo]), - (curFocusedElem.element.scrollLeft = curFocusedElem.left), - (curFocusedElem.element.scrollTop = curFocusedElem.top); - } -} var skipSelectionChangeEvent = canUseDOM && "documentMode" in document && 11 >= document.documentMode, activeElement = null, @@ -13993,20 +14097,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1684 = 0; - i$jscomp$inline_1684 < simpleEventPluginEvents.length; - i$jscomp$inline_1684++ + var i$jscomp$inline_1696 = 0; + i$jscomp$inline_1696 < simpleEventPluginEvents.length; + i$jscomp$inline_1696++ ) { - var eventName$jscomp$inline_1685 = - simpleEventPluginEvents[i$jscomp$inline_1684], - domEventName$jscomp$inline_1686 = - eventName$jscomp$inline_1685.toLowerCase(), - capitalizedEvent$jscomp$inline_1687 = - eventName$jscomp$inline_1685[0].toUpperCase() + - eventName$jscomp$inline_1685.slice(1); + var eventName$jscomp$inline_1697 = + simpleEventPluginEvents[i$jscomp$inline_1696], + domEventName$jscomp$inline_1698 = + eventName$jscomp$inline_1697.toLowerCase(), + capitalizedEvent$jscomp$inline_1699 = + eventName$jscomp$inline_1697[0].toUpperCase() + + eventName$jscomp$inline_1697.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1686, - "on" + capitalizedEvent$jscomp$inline_1687 + domEventName$jscomp$inline_1698, + "on" + capitalizedEvent$jscomp$inline_1699 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15295,34 +15399,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$232 = props[hasSrc]; - if (null != propValue$232) + var propValue$233 = props[hasSrc]; + if (null != propValue$233) switch (hasSrc) { case "name": - hasSrcSet = propValue$232; + hasSrcSet = propValue$233; break; case "type": - propKey = propValue$232; + propKey = propValue$233; break; case "checked": - checked = propValue$232; + checked = propValue$233; break; case "defaultChecked": - defaultChecked = propValue$232; + defaultChecked = propValue$233; break; case "value": - propValue = propValue$232; + propValue = propValue$233; break; case "defaultValue": - defaultValue = propValue$232; + defaultValue = propValue$233; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$232) + if (null != propValue$233) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$232, props, null); + setProp(domElement, tag, hasSrc, propValue$233, props, null); } } initInput( @@ -15458,14 +15562,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$232 in props) - props.hasOwnProperty(propValue$232) && - ((hasSrc = props[propValue$232]), + for (propValue$233 in props) + props.hasOwnProperty(propValue$233) && + ((hasSrc = props[propValue$233]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$232, + propValue$233, hasSrc, props, void 0 @@ -15513,14 +15617,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$249 in nextProps) { - var propKey = nextProps[propKey$249]; - lastProp = lastProps[propKey$249]; + for (var propKey$250 in nextProps) { + var propKey = nextProps[propKey$250]; + lastProp = lastProps[propKey$250]; if ( - nextProps.hasOwnProperty(propKey$249) && + nextProps.hasOwnProperty(propKey$250) && (null != propKey || null != lastProp) ) - switch (propKey$249) { + switch (propKey$250) { case "type": type = propKey; break; @@ -15549,7 +15653,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$249, + propKey$250, propKey, nextProps, lastProp @@ -15568,7 +15672,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$249 = null; + propKey = value = defaultValue = propKey$250 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15599,7 +15703,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$249 = type; + propKey$250 = type; break; case "defaultValue": defaultValue = type; @@ -15620,15 +15724,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$249 - ? updateOptions(domElement, !!lastProps, propKey$249, !1) + null != propKey$250 + ? updateOptions(domElement, !!lastProps, propKey$250, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$249 = null; + propKey = propKey$250 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15652,7 +15756,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$249 = name; + propKey$250 = name; break; case "defaultValue": propKey = name; @@ -15666,17 +15770,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$249, propKey); + updateTextarea(domElement, propKey$250, propKey); return; case "option": - for (var propKey$265 in lastProps) + for (var propKey$266 in lastProps) if ( - ((propKey$249 = lastProps[propKey$265]), - lastProps.hasOwnProperty(propKey$265) && - null != propKey$249 && - !nextProps.hasOwnProperty(propKey$265)) + ((propKey$250 = lastProps[propKey$266]), + lastProps.hasOwnProperty(propKey$266) && + null != propKey$250 && + !nextProps.hasOwnProperty(propKey$266)) ) - switch (propKey$265) { + switch (propKey$266) { case "selected": domElement.selected = !1; break; @@ -15684,33 +15788,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$265, + propKey$266, null, nextProps, - propKey$249 + propKey$250 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$249 = nextProps[lastDefaultValue]), + ((propKey$250 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$249 !== propKey && - (null != propKey$249 || null != propKey)) + propKey$250 !== propKey && + (null != propKey$250 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$249 && - "function" !== typeof propKey$249 && - "symbol" !== typeof propKey$249; + propKey$250 && + "function" !== typeof propKey$250 && + "symbol" !== typeof propKey$250; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$249, + propKey$250, nextProps, propKey ); @@ -15731,24 +15835,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$270 in lastProps) - (propKey$249 = lastProps[propKey$270]), - lastProps.hasOwnProperty(propKey$270) && - null != propKey$249 && - !nextProps.hasOwnProperty(propKey$270) && - setProp(domElement, tag, propKey$270, null, nextProps, propKey$249); + for (var propKey$271 in lastProps) + (propKey$250 = lastProps[propKey$271]), + lastProps.hasOwnProperty(propKey$271) && + null != propKey$250 && + !nextProps.hasOwnProperty(propKey$271) && + setProp(domElement, tag, propKey$271, null, nextProps, propKey$250); for (checked in nextProps) if ( - ((propKey$249 = nextProps[checked]), + ((propKey$250 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$249 !== propKey && - (null != propKey$249 || null != propKey)) + propKey$250 !== propKey && + (null != propKey$250 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$249) + if (null != propKey$250) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15756,7 +15860,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$249, + propKey$250, nextProps, propKey ); @@ -15764,49 +15868,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$275 in lastProps) - (propKey$249 = lastProps[propKey$275]), - lastProps.hasOwnProperty(propKey$275) && - void 0 !== propKey$249 && - !nextProps.hasOwnProperty(propKey$275) && + for (var propKey$276 in lastProps) + (propKey$250 = lastProps[propKey$276]), + lastProps.hasOwnProperty(propKey$276) && + void 0 !== propKey$250 && + !nextProps.hasOwnProperty(propKey$276) && setPropOnCustomElement( domElement, tag, - propKey$275, + propKey$276, void 0, nextProps, - propKey$249 + propKey$250 ); for (defaultChecked in nextProps) - (propKey$249 = nextProps[defaultChecked]), + (propKey$250 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$249 === propKey || - (void 0 === propKey$249 && void 0 === propKey) || + propKey$250 === propKey || + (void 0 === propKey$250 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$249, + propKey$250, nextProps, propKey ); return; } } - for (var propKey$280 in lastProps) - (propKey$249 = lastProps[propKey$280]), - lastProps.hasOwnProperty(propKey$280) && - null != propKey$249 && - !nextProps.hasOwnProperty(propKey$280) && - setProp(domElement, tag, propKey$280, null, nextProps, propKey$249); + for (var propKey$281 in lastProps) + (propKey$250 = lastProps[propKey$281]), + lastProps.hasOwnProperty(propKey$281) && + null != propKey$250 && + !nextProps.hasOwnProperty(propKey$281) && + setProp(domElement, tag, propKey$281, null, nextProps, propKey$250); for (lastProp in nextProps) - (propKey$249 = nextProps[lastProp]), + (propKey$250 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$249 === propKey || - (null == propKey$249 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$249, nextProps, propKey); + propKey$250 === propKey || + (null == propKey$250 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$250, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15839,85 +15943,6 @@ function getChildHostContextProd(parentNamespace, type) { ? 0 : parentNamespace; } -function prepareForCommit(containerInfo) { - eventsEnabled = _enabled; - containerInfo = getActiveElementDeep(containerInfo); - if (hasSelectionCapabilities(containerInfo)) { - if ("selectionStart" in containerInfo) - var JSCompiler_temp = { - start: containerInfo.selectionStart, - end: containerInfo.selectionEnd - }; - else - a: { - JSCompiler_temp = - ((JSCompiler_temp = containerInfo.ownerDocument) && - JSCompiler_temp.defaultView) || - window; - var selection = - JSCompiler_temp.getSelection && JSCompiler_temp.getSelection(); - if (selection && 0 !== selection.rangeCount) { - JSCompiler_temp = selection.anchorNode; - var anchorOffset = selection.anchorOffset, - focusNode = selection.focusNode; - selection = selection.focusOffset; - try { - JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$218) { - JSCompiler_temp = null; - break a; - } - var length = 0, - start = -1, - end = -1, - indexWithinAnchor = 0, - indexWithinFocus = 0, - node = containerInfo, - parentNode = null; - b: for (;;) { - for (var next; ; ) { - node !== JSCompiler_temp || - (0 !== anchorOffset && 3 !== node.nodeType) || - (start = length + anchorOffset); - node !== focusNode || - (0 !== selection && 3 !== node.nodeType) || - (end = length + selection); - 3 === node.nodeType && (length += node.nodeValue.length); - if (null === (next = node.firstChild)) break; - parentNode = node; - node = next; - } - for (;;) { - if (node === containerInfo) break b; - parentNode === JSCompiler_temp && - ++indexWithinAnchor === anchorOffset && - (start = length); - parentNode === focusNode && - ++indexWithinFocus === selection && - (end = length); - if (null !== (next = node.nextSibling)) break; - node = parentNode; - parentNode = node.parentNode; - } - node = next; - } - JSCompiler_temp = - -1 === start || -1 === end ? null : { start: start, end: end }; - } else JSCompiler_temp = null; - } - JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 }; - } else JSCompiler_temp = null; - selectionInformation = { - focusedElem: containerInfo, - selectionRange: JSCompiler_temp - }; - containerInfo = null; - JSCompiler_temp = selectionInformation.focusedElem; - null !== JSCompiler_temp && - (containerInfo = getClosestInstanceFromNode(JSCompiler_temp)); - _enabled = !1; - return containerInfo; -} function beforeActiveInstanceBlur(internalInstanceHandle) { _enabled = !0; var target = selectionInformation.focusedElem, @@ -15981,11 +16006,6 @@ function createEvent(type, bubbles) { event.initEvent(type, bubbles, !1); return event; } -function dispatchAfterDetachedBlur(target) { - var event = createEvent("afterblur", !1); - event.relatedTarget = target; - document.dispatchEvent(event); -} function clearSuspenseBoundary(parentInstance, suspenseInstance) { var node = suspenseInstance, depth = 0; @@ -16482,26 +16502,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$288 = getResourcesFromRoot( + var styles$289 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$289 = styles$288.get(type); - resource$289 || + resource$290 = styles$289.get(type); + resource$290 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$289 = { + (resource$290 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$288.set(type, resource$289), - (styles$288 = JSCompiler_inline_result.querySelector( + styles$289.set(type, resource$290), + (styles$289 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$288._p && - ((resource$289.instance = styles$288), - (resource$289.state.loading = 5)), + !styles$289._p && + ((resource$290.instance = styles$289), + (resource$290.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16514,16 +16534,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$288 || + styles$289 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$289.state + resource$290.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$289; + return resource$290; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16620,37 +16640,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$294 = hoistableRoot.querySelector( + var instance$295 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$294) + if (instance$295) return ( (resource.state.loading |= 4), - (resource.instance = instance$294), - markNodeAsHoistable(instance$294), - instance$294 + (resource.instance = instance$295), + markNodeAsHoistable(instance$295), + instance$295 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$294 = ( + instance$295 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$294); - var linkInstance = instance$294; + markNodeAsHoistable(instance$295); + var linkInstance = instance$295; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$294, "link", instance); + setInitialProperties(instance$295, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$294, props.precedence, hoistableRoot); - return (resource.instance = instance$294); + insertStylesheet(instance$295, props.precedence, hoistableRoot); + return (resource.instance = instance$295); case "script": - instance$294 = getScriptKey(props.src); + instance$295 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$294) + getScriptSelectorFromKey(instance$295) )) ) return ( @@ -16659,7 +16679,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$294))) + if ((styleProps = preloadPropsMap.get(instance$295))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17663,16 +17683,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1860 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1869 = React.version; if ( - "19.1.0-www-modern-d8b903f4-20250102" !== - isomorphicReactPackageVersion$jscomp$inline_1860 + "19.1.0-www-modern-c81312e3-20250102" !== + isomorphicReactPackageVersion$jscomp$inline_1869 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1860, - "19.1.0-www-modern-d8b903f4-20250102" + isomorphicReactPackageVersion$jscomp$inline_1869, + "19.1.0-www-modern-c81312e3-20250102" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17688,27 +17708,27 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_1862 = { +var internals$jscomp$inline_1871 = { bundleType: 0, - version: "19.1.0-www-modern-d8b903f4-20250102", + version: "19.1.0-www-modern-c81312e3-20250102", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-modern-c81312e3-20250102" }; enableSchedulingProfiler && - ((internals$jscomp$inline_1862.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_1862.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_1871.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_1871.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2352 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2353 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2352.isDisabled && - hook$jscomp$inline_2352.supportsFiber + !hook$jscomp$inline_2353.isDisabled && + hook$jscomp$inline_2353.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2352.inject( - internals$jscomp$inline_1862 + (rendererID = hook$jscomp$inline_2353.inject( + internals$jscomp$inline_1871 )), - (injectedHook = hook$jscomp$inline_2352); + (injectedHook = hook$jscomp$inline_2353); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18061,7 +18081,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-modern-d8b903f4-20250102"; +exports.version = "19.1.0-www-modern-c81312e3-20250102"; "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 7414dc44447db..fa6503a73d9c5 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -9150,5 +9150,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.1.0-www-classic-d8b903f4-20250102"; + exports.version = "19.1.0-www-classic-c81312e3-20250102"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 89f29e205cfc6..065a47f178ce0 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -8976,5 +8976,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.1.0-www-modern-d8b903f4-20250102"; + exports.version = "19.1.0-www-modern-c81312e3-20250102"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index ce38ee5a0058e..a68a3fe16c66d 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -5898,4 +5898,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.1.0-www-classic-d8b903f4-20250102"; +exports.version = "19.1.0-www-classic-c81312e3-20250102"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 7cb3974ea944c..13f64bcba0de6 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -5810,4 +5810,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.1.0-www-modern-d8b903f4-20250102"; +exports.version = "19.1.0-www-modern-c81312e3-20250102"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index 4c0faa830663f..074b0efc68607 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -1007,14 +1007,13 @@ __DEV__ && ); } } - function getNextLanes(root, wipLanes) { + function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -1024,29 +1023,30 @@ __DEV__ && 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -4155,7 +4155,9 @@ __DEV__ && (nextLanes = workInProgressRootRenderLanes), (nextLanes = getNextLanes( root, - root === workInProgressRoot ? nextLanes : 0 + root === workInProgressRoot ? nextLanes : 0, + null !== root.cancelPendingCommit || + root.timeoutHandle !== noTimeout )), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root, nextLanes) || @@ -4224,7 +4226,8 @@ __DEV__ && suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); pingedLanes = root.callbackNode; if ( @@ -4289,7 +4292,10 @@ __DEV__ && workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot + ? workInProgressRootRenderLanes$jscomp$0 + : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -9574,32 +9580,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2524; - var JSCompiler_object_inline_stack_2525 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2553; + var JSCompiler_object_inline_stack_2554 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2526 = !1; + var JSCompiler_object_inline_componentStack_2555 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2524 = didSuspend) || - (JSCompiler_object_inline_digest_2524 = + (JSCompiler_object_inline_digest_2553 = didSuspend) || + (JSCompiler_object_inline_digest_2553 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2524 && - ((JSCompiler_object_inline_componentStack_2526 = !0), + JSCompiler_object_inline_digest_2553 && + ((JSCompiler_object_inline_componentStack_2555 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2524 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2553 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2526 + JSCompiler_object_inline_componentStack_2555 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2523 = nextHydratableInstance; + var JSCompiler_object_inline_message_2552 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2523)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2552)) { c: { - var instance = JSCompiler_object_inline_message_2523; + var instance = JSCompiler_object_inline_message_2552; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9641,46 +9647,46 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2523 + JSCompiler_object_inline_message_2552 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2523 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2552 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2523 && - ((JSCompiler_object_inline_message_2523 = - JSCompiler_object_inline_message_2523.dehydrated), - null !== JSCompiler_object_inline_message_2523) + null !== JSCompiler_object_inline_message_2552 && + ((JSCompiler_object_inline_message_2552 = + JSCompiler_object_inline_message_2552.dehydrated), + null !== JSCompiler_object_inline_message_2552) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2523) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2552) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2523 = - JSCompiler_object_inline_stack_2525.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2525.fallback; - if (JSCompiler_object_inline_componentStack_2526) + JSCompiler_object_inline_message_2552 = + JSCompiler_object_inline_stack_2554.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2554.fallback; + if (JSCompiler_object_inline_componentStack_2555) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2525 = + (JSCompiler_object_inline_stack_2554 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2523, + JSCompiler_object_inline_message_2552, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2526 = + (JSCompiler_object_inline_componentStack_2555 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2526.memoizedState = + (JSCompiler_object_inline_componentStack_2555.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2526.childLanes = + (JSCompiler_object_inline_componentStack_2555.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2524, + JSCompiler_object_inline_digest_2553, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9693,9 +9699,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2526.updateQueue), + JSCompiler_object_inline_componentStack_2555.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2526.updateQueue = + ? (JSCompiler_object_inline_componentStack_2555.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9703,46 +9709,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2525 + JSCompiler_object_inline_stack_2554 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2525.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2554.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2525 = + (JSCompiler_object_inline_stack_2554 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2523, + JSCompiler_object_inline_message_2552, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2526 = + (JSCompiler_object_inline_componentStack_2555 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2526.memoizedState = + (JSCompiler_object_inline_componentStack_2555.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2526.childLanes = + (JSCompiler_object_inline_componentStack_2555.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2524, + JSCompiler_object_inline_digest_2553, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2525 + JSCompiler_object_inline_stack_2554 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2523 + JSCompiler_object_inline_message_2552 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2523 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2523) + ((JSCompiler_object_inline_message_2552 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2552) ) { if (didSuspend) workInProgress.flags & 256 @@ -9759,94 +9765,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2526 = - JSCompiler_object_inline_stack_2525.fallback), - (JSCompiler_object_inline_message_2523 = workInProgress.mode), - (JSCompiler_object_inline_stack_2525 = + (JSCompiler_object_inline_componentStack_2555 = + JSCompiler_object_inline_stack_2554.fallback), + (JSCompiler_object_inline_message_2552 = workInProgress.mode), + (JSCompiler_object_inline_stack_2554 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2525.children + children: JSCompiler_object_inline_stack_2554.children }, - JSCompiler_object_inline_message_2523 + JSCompiler_object_inline_message_2552 )), - (JSCompiler_object_inline_componentStack_2526 = + (JSCompiler_object_inline_componentStack_2555 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2526, - JSCompiler_object_inline_message_2523, + JSCompiler_object_inline_componentStack_2555, + JSCompiler_object_inline_message_2552, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2526.flags |= 2), - (JSCompiler_object_inline_stack_2525.return = workInProgress), - (JSCompiler_object_inline_componentStack_2526.return = + (JSCompiler_object_inline_componentStack_2555.flags |= 2), + (JSCompiler_object_inline_stack_2554.return = workInProgress), + (JSCompiler_object_inline_componentStack_2555.return = workInProgress), - (JSCompiler_object_inline_stack_2525.sibling = - JSCompiler_object_inline_componentStack_2526), - (workInProgress.child = JSCompiler_object_inline_stack_2525), + (JSCompiler_object_inline_stack_2554.sibling = + JSCompiler_object_inline_componentStack_2555), + (workInProgress.child = JSCompiler_object_inline_stack_2554), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2525 = workInProgress.child), - (JSCompiler_object_inline_stack_2525.memoizedState = + (JSCompiler_object_inline_stack_2554 = workInProgress.child), + (JSCompiler_object_inline_stack_2554.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2525.childLanes = + (JSCompiler_object_inline_stack_2554.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2524, + JSCompiler_object_inline_digest_2553, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2526)); + JSCompiler_object_inline_componentStack_2555)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2523)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2552)) ) { - JSCompiler_object_inline_digest_2524 = - JSCompiler_object_inline_message_2523.nextSibling && - JSCompiler_object_inline_message_2523.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2524) { - JSCompiler_temp = JSCompiler_object_inline_digest_2524.dgst; - var message = JSCompiler_object_inline_digest_2524.msg; - instance = JSCompiler_object_inline_digest_2524.stck; - var componentStack = JSCompiler_object_inline_digest_2524.cstck; + JSCompiler_object_inline_digest_2553 = + JSCompiler_object_inline_message_2552.nextSibling && + JSCompiler_object_inline_message_2552.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2553) { + JSCompiler_temp = JSCompiler_object_inline_digest_2553.dgst; + var message = JSCompiler_object_inline_digest_2553.msg; + instance = JSCompiler_object_inline_digest_2553.stck; + var componentStack = JSCompiler_object_inline_digest_2553.cstck; } - JSCompiler_object_inline_message_2523 = message; - JSCompiler_object_inline_digest_2524 = JSCompiler_temp; - JSCompiler_object_inline_stack_2525 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2526 = + JSCompiler_object_inline_message_2552 = message; + JSCompiler_object_inline_digest_2553 = JSCompiler_temp; + JSCompiler_object_inline_stack_2554 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2555 = componentStack; - JSCompiler_object_inline_componentStack_2526 = - JSCompiler_object_inline_message_2523 - ? Error(JSCompiler_object_inline_message_2523) + JSCompiler_object_inline_componentStack_2555 = + JSCompiler_object_inline_message_2552 + ? Error(JSCompiler_object_inline_message_2552) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2526.stack = - JSCompiler_object_inline_stack_2525 || ""; - JSCompiler_object_inline_componentStack_2526.digest = - JSCompiler_object_inline_digest_2524; - JSCompiler_object_inline_digest_2524 = + JSCompiler_object_inline_componentStack_2555.stack = + JSCompiler_object_inline_stack_2554 || ""; + JSCompiler_object_inline_componentStack_2555.digest = + JSCompiler_object_inline_digest_2553; + JSCompiler_object_inline_digest_2553 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2525 = { - value: JSCompiler_object_inline_componentStack_2526, + JSCompiler_object_inline_stack_2554 = { + value: JSCompiler_object_inline_componentStack_2555, source: null, - stack: JSCompiler_object_inline_digest_2524 + stack: JSCompiler_object_inline_digest_2553 }; - "string" === typeof JSCompiler_object_inline_digest_2524 && + "string" === typeof JSCompiler_object_inline_digest_2553 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2526, - JSCompiler_object_inline_stack_2525 + JSCompiler_object_inline_componentStack_2555, + JSCompiler_object_inline_stack_2554 ); - queueHydrationError(JSCompiler_object_inline_stack_2525); + queueHydrationError(JSCompiler_object_inline_stack_2554); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9860,44 +9866,44 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2524 = + (JSCompiler_object_inline_digest_2553 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2524) + didReceiveUpdate || JSCompiler_object_inline_digest_2553) ) { - JSCompiler_object_inline_digest_2524 = workInProgressRoot; + JSCompiler_object_inline_digest_2553 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_digest_2524 && - ((JSCompiler_object_inline_stack_2525 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2525 = - 0 !== (JSCompiler_object_inline_stack_2525 & 42) + null !== JSCompiler_object_inline_digest_2553 && + ((JSCompiler_object_inline_stack_2554 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2554 = + 0 !== (JSCompiler_object_inline_stack_2554 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2525 + JSCompiler_object_inline_stack_2554 )), - (JSCompiler_object_inline_stack_2525 = + (JSCompiler_object_inline_stack_2554 = 0 !== - (JSCompiler_object_inline_stack_2525 & - (JSCompiler_object_inline_digest_2524.suspendedLanes | + (JSCompiler_object_inline_stack_2554 & + (JSCompiler_object_inline_digest_2553.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2525), - 0 !== JSCompiler_object_inline_stack_2525 && - JSCompiler_object_inline_stack_2525 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2554), + 0 !== JSCompiler_object_inline_stack_2554 && + JSCompiler_object_inline_stack_2554 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2525), + ((prevState.retryLane = JSCompiler_object_inline_stack_2554), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2525 + JSCompiler_object_inline_stack_2554 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2524, + JSCompiler_object_inline_digest_2553, current, - JSCompiler_object_inline_stack_2525 + JSCompiler_object_inline_stack_2554 ), SelectiveHydrationException) ); - JSCompiler_object_inline_message_2523.data === + JSCompiler_object_inline_message_2552.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9905,14 +9911,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2523.data === + JSCompiler_object_inline_message_2552.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2523.nextSibling + JSCompiler_object_inline_message_2552.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9930,57 +9936,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2525.children + JSCompiler_object_inline_stack_2554.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2526) + if (JSCompiler_object_inline_componentStack_2555) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2526 = - JSCompiler_object_inline_stack_2525.fallback), - (JSCompiler_object_inline_message_2523 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2555 = + JSCompiler_object_inline_stack_2554.fallback), + (JSCompiler_object_inline_message_2552 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2525 = createWorkInProgress( + (JSCompiler_object_inline_stack_2554 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2525.children + children: JSCompiler_object_inline_stack_2554.children } )), - (JSCompiler_object_inline_stack_2525.subtreeFlags = + (JSCompiler_object_inline_stack_2554.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2526 = + ? (JSCompiler_object_inline_componentStack_2555 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2526 + JSCompiler_object_inline_componentStack_2555 )) - : ((JSCompiler_object_inline_componentStack_2526 = + : ((JSCompiler_object_inline_componentStack_2555 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2526, - JSCompiler_object_inline_message_2523, + JSCompiler_object_inline_componentStack_2555, + JSCompiler_object_inline_message_2552, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2526.flags |= 2)), - (JSCompiler_object_inline_componentStack_2526.return = + (JSCompiler_object_inline_componentStack_2555.flags |= 2)), + (JSCompiler_object_inline_componentStack_2555.return = workInProgress), - (JSCompiler_object_inline_stack_2525.return = workInProgress), - (JSCompiler_object_inline_stack_2525.sibling = - JSCompiler_object_inline_componentStack_2526), - (workInProgress.child = JSCompiler_object_inline_stack_2525), - (JSCompiler_object_inline_stack_2525 = - JSCompiler_object_inline_componentStack_2526), - (JSCompiler_object_inline_componentStack_2526 = workInProgress.child), - (JSCompiler_object_inline_message_2523 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2523 - ? (JSCompiler_object_inline_message_2523 = + (JSCompiler_object_inline_stack_2554.return = workInProgress), + (JSCompiler_object_inline_stack_2554.sibling = + JSCompiler_object_inline_componentStack_2555), + (workInProgress.child = JSCompiler_object_inline_stack_2554), + (JSCompiler_object_inline_stack_2554 = + JSCompiler_object_inline_componentStack_2555), + (JSCompiler_object_inline_componentStack_2555 = workInProgress.child), + (JSCompiler_object_inline_message_2552 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2552 + ? (JSCompiler_object_inline_message_2552 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2523.cachePool), + JSCompiler_object_inline_message_2552.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9988,34 +9994,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2523 = { + (JSCompiler_object_inline_message_2552 = { baseLanes: - JSCompiler_object_inline_message_2523.baseLanes | renderLanes, + JSCompiler_object_inline_message_2552.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2526.memoizedState = - JSCompiler_object_inline_message_2523), + (JSCompiler_object_inline_componentStack_2555.memoizedState = + JSCompiler_object_inline_message_2552), enableTransitionTracing && - ((JSCompiler_object_inline_message_2523 = enableTransitionTracing + ((JSCompiler_object_inline_message_2552 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2523 && + null !== JSCompiler_object_inline_message_2552 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2526.updateQueue), + JSCompiler_object_inline_componentStack_2555.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2526.updateQueue = { - transitions: JSCompiler_object_inline_message_2523, + ? (JSCompiler_object_inline_componentStack_2555.updateQueue = { + transitions: JSCompiler_object_inline_message_2552, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2526.updateQueue = + ? (JSCompiler_object_inline_componentStack_2555.updateQueue = { - transitions: JSCompiler_object_inline_message_2523, + transitions: JSCompiler_object_inline_message_2552, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -10023,32 +10029,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2523), + JSCompiler_object_inline_message_2552), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2526.childLanes = + (JSCompiler_object_inline_componentStack_2555.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2524, + JSCompiler_object_inline_digest_2553, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2525 + JSCompiler_object_inline_stack_2554 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2525.children + children: JSCompiler_object_inline_stack_2554.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2524 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2524 + ((JSCompiler_object_inline_digest_2553 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2553 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2524.push(current)); + : JSCompiler_object_inline_digest_2553.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -13857,12 +13863,6 @@ __DEV__ && } }); } - function commitMutationEffects(root, finishedWork, committedLanes) { - inProgressLanes = committedLanes; - inProgressRoot = root; - commitMutationEffectsOnFiber(finishedWork, root); - inProgressRoot = inProgressLanes = null; - } function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) { var deletions = parentFiber.deletions; if (null !== deletions) @@ -15869,21 +15869,17 @@ __DEV__ && default: throw Error("Unknown root exit status."); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if (null !== ReactSharedInternals.actQueue) commitRoot( shouldTimeSlice, + forceSync, + lanes, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane, workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - exitStatus, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + workInProgressSuspendedRetryLanes ); else { if ( @@ -15901,7 +15897,7 @@ __DEV__ && workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -15963,18 +15959,24 @@ __DEV__ && completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = noTimeout; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -15997,16 +15999,14 @@ __DEV__ && } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -16102,8 +16102,6 @@ __DEV__ && } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; timeoutHandle !== noTimeout && ((root.timeoutHandle = noTimeout), cancelTimeout(timeoutHandle)); @@ -16739,176 +16737,303 @@ __DEV__ && } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = Internals.p; - try { - (Internals.p = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (Internals.p = previousUpdateLanePriority); - } - } - function commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); ReactStrictModeWarnings.flushLegacyContextWarning(); ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markCommitStarted && injectedProfilingHooks.markCommitStarted(lanes); if (null === finishedWork) - return enableSchedulingProfiler && markCommitStopped(), null; - 0 === lanes && - error$jscomp$0( - "root.finishedLanes should not be empty during a commit. This is a bug in React." + enableSchedulingProfiler && markCommitStopped(); + else { + 0 === lanes && + error$jscomp$0( + "finishedLanes should not be empty during a commit. This is a bug in React." + ); + if (finishedWork === root.current) + throw Error( + "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + ); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes ); - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) - throw Error( - "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + commitStartTime = now(); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = Internals.p; + Internals.p = DiscreteEventPriority; + updatedLanes = executionContext; + executionContext |= CommitContext; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (Internals.p = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate ); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; - 0 !== (finishedWork.subtreeFlags & 10256) || - 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = Internals.p), - (Internals.p = DiscreteEventPriority), - (suspendedRetryLanes = executionContext), - (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffects(root, finishedWork, lanes), - shouldFireAfterActiveInstanceBlur && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), + } + } + function flushMutationEffects(root, finishedWork, lanes) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { + inProgressLanes = lanes; + inProgressRoot = root; + commitMutationEffectsOnFiber(finishedWork, root); + inProgressRoot = inProgressLanes = null; + if (shouldFireAfterActiveInstanceBlur) { + _enabled = !0; + var target = selectionInformation.focusedElem, + event = createEvent("afterblur", !1); + event.relatedTarget = target; + document.dispatchEvent(event); + _enabled = !1; + } + lanes = selectionInformation; + var curFocusedElem = getActiveElementDeep(root.containerInfo), + priorFocusedElem = lanes.focusedElem, + priorSelectionRange = lanes.selectionRange; + if ( + curFocusedElem !== priorFocusedElem && + priorFocusedElem && + priorFocusedElem.ownerDocument && + containsNode( + priorFocusedElem.ownerDocument.documentElement, + priorFocusedElem + ) + ) { + if ( + null !== priorSelectionRange && + hasSelectionCapabilities(priorFocusedElem) + ) { + var start = priorSelectionRange.start, + end = priorSelectionRange.end; + void 0 === end && (end = start); + if ("selectionStart" in priorFocusedElem) + (priorFocusedElem.selectionStart = start), + (priorFocusedElem.selectionEnd = Math.min( + end, + priorFocusedElem.value.length + )); + else { + var doc = priorFocusedElem.ownerDocument || document, + win = (doc && doc.defaultView) || window; + if (win.getSelection) { + var selection = win.getSelection(), + length = priorFocusedElem.textContent.length, + start$jscomp$0 = Math.min( + priorSelectionRange.start, + length + ), + end$jscomp$0 = + void 0 === priorSelectionRange.end + ? start$jscomp$0 + : Math.min(priorSelectionRange.end, length); + !selection.extend && + start$jscomp$0 > end$jscomp$0 && + ((curFocusedElem = end$jscomp$0), + (end$jscomp$0 = start$jscomp$0), + (start$jscomp$0 = curFocusedElem)); + var startMarker = getNodeForCharacterOffset( + priorFocusedElem, + start$jscomp$0 + ), + endMarker = getNodeForCharacterOffset( + priorFocusedElem, + end$jscomp$0 + ); + if ( + startMarker && + endMarker && + (1 !== selection.rangeCount || + selection.anchorNode !== startMarker.node || + selection.anchorOffset !== startMarker.offset || + selection.focusNode !== endMarker.node || + selection.focusOffset !== endMarker.offset) + ) { + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + start$jscomp$0 > end$jscomp$0 + ? (selection.addRange(range), + selection.extend(endMarker.node, endMarker.offset)) + : (range.setEnd(endMarker.node, endMarker.offset), + selection.addRange(range)); + } + } + } + } + doc = []; + for ( + selection = priorFocusedElem; + (selection = selection.parentNode); + + ) + 1 === selection.nodeType && + doc.push({ + element: selection, + left: selection.scrollLeft, + top: selection.scrollTop + }); + "function" === typeof priorFocusedElem.focus && + priorFocusedElem.focus(); + for ( + priorFocusedElem = 0; + priorFocusedElem < doc.length; + priorFocusedElem++ + ) { + var info = doc[priorFocusedElem]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; + } + function flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), - enableSchedulingProfiler && + commitLayoutEffects(finishedWork, root, lanes), enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = suspendedRetryLanes), - (Internals.p = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = spawnedLane) - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); + (rootHasLayoutEffect = + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256)) + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : (releaseRootPooledCache(root, remainingLanes), + : (releaseRootPooledCache(root, root.pendingLanes), (nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); + previousPriority = root.pendingLanes; + 0 === previousPriority && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot$1(finishedWork.stateNode, rootHasLayoutEffect); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - (spawnedLane = makeErrorInfo(remainingLanes.stack)), + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = Internals.p; + Internals.p = DiscreteEventPriority; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority], + errorInfo = makeErrorInfo(recoverableError.stack); runWithFiberInDEV( - remainingLanes.source, - renderPriorityLevel, - remainingLanes.value, - spawnedLane + recoverableError.source, + onRecoverableError, + recoverableError.value, + errorInfo ); + } + } finally { + (ReactSharedInternals.T = finishedWork), + (Internals.p = rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + previousPriority = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (previousPriority & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ @@ -16934,7 +17059,6 @@ __DEV__ && : (currentEndTime = endTime); }); } - return null; } function makeErrorInfo(componentStack) { componentStack = { componentStack: componentStack }; @@ -17882,11 +18006,7 @@ __DEV__ && ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = noTimeout; this.callbackNode = this.next = @@ -17899,7 +18019,6 @@ __DEV__ && this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -18576,100 +18695,6 @@ __DEV__ && "true" === elem.contentEditable) ); } - function restoreSelection(priorSelectionInformation, containerInfo) { - var curFocusedElem = getActiveElementDeep(containerInfo); - containerInfo = priorSelectionInformation.focusedElem; - var priorSelectionRange = priorSelectionInformation.selectionRange; - if ( - curFocusedElem !== containerInfo && - containerInfo && - containerInfo.ownerDocument && - containsNode(containerInfo.ownerDocument.documentElement, containerInfo) - ) { - if ( - null !== priorSelectionRange && - hasSelectionCapabilities(containerInfo) - ) - if ( - ((priorSelectionInformation = priorSelectionRange.start), - (curFocusedElem = priorSelectionRange.end), - void 0 === curFocusedElem && - (curFocusedElem = priorSelectionInformation), - "selectionStart" in containerInfo) - ) - (containerInfo.selectionStart = priorSelectionInformation), - (containerInfo.selectionEnd = Math.min( - curFocusedElem, - containerInfo.value.length - )); - else if ( - ((curFocusedElem = - ((priorSelectionInformation = - containerInfo.ownerDocument || document) && - priorSelectionInformation.defaultView) || - window), - curFocusedElem.getSelection) - ) { - curFocusedElem = curFocusedElem.getSelection(); - var length = containerInfo.textContent.length, - start = Math.min(priorSelectionRange.start, length); - priorSelectionRange = - void 0 === priorSelectionRange.end - ? start - : Math.min(priorSelectionRange.end, length); - !curFocusedElem.extend && - start > priorSelectionRange && - ((length = priorSelectionRange), - (priorSelectionRange = start), - (start = length)); - length = getNodeForCharacterOffset(containerInfo, start); - var endMarker = getNodeForCharacterOffset( - containerInfo, - priorSelectionRange - ); - length && - endMarker && - (1 !== curFocusedElem.rangeCount || - curFocusedElem.anchorNode !== length.node || - curFocusedElem.anchorOffset !== length.offset || - curFocusedElem.focusNode !== endMarker.node || - curFocusedElem.focusOffset !== endMarker.offset) && - ((priorSelectionInformation = - priorSelectionInformation.createRange()), - priorSelectionInformation.setStart(length.node, length.offset), - curFocusedElem.removeAllRanges(), - start > priorSelectionRange - ? (curFocusedElem.addRange(priorSelectionInformation), - curFocusedElem.extend(endMarker.node, endMarker.offset)) - : (priorSelectionInformation.setEnd( - endMarker.node, - endMarker.offset - ), - curFocusedElem.addRange(priorSelectionInformation))); - } - priorSelectionInformation = []; - for ( - curFocusedElem = containerInfo; - (curFocusedElem = curFocusedElem.parentNode); - - ) - 1 === curFocusedElem.nodeType && - priorSelectionInformation.push({ - element: curFocusedElem, - left: curFocusedElem.scrollLeft, - top: curFocusedElem.scrollTop - }); - "function" === typeof containerInfo.focus && containerInfo.focus(); - for ( - containerInfo = 0; - containerInfo < priorSelectionInformation.length; - containerInfo++ - ) - (curFocusedElem = priorSelectionInformation[containerInfo]), - (curFocusedElem.element.scrollLeft = curFocusedElem.left), - (curFocusedElem.element.scrollTop = curFocusedElem.top); - } - } function constructSelectEvent( dispatchQueue, nativeEvent, @@ -21965,11 +21990,6 @@ __DEV__ && event.initEvent(type, bubbles, !1); return event; } - function dispatchAfterDetachedBlur(target) { - var event = createEvent("afterblur", !1); - event.relatedTarget = target; - document.dispatchEvent(event); - } function removeChild(parentInstance, child) { parentInstance.removeChild(child); } @@ -27715,11 +27735,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.1.0-www-classic-d8b903f4-20250102" !== isomorphicReactPackageVersion) + if ("19.1.0-www-classic-c81312e3-20250102" !== 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.1.0-www-classic-d8b903f4-20250102\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.1.0-www-classic-c81312e3-20250102\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27762,10 +27782,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.1.0-www-classic-d8b903f4-20250102", + version: "19.1.0-www-classic-c81312e3-20250102", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-classic-c81312e3-20250102" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28529,5 +28549,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.1.0-www-classic-d8b903f4-20250102"; + exports.version = "19.1.0-www-classic-c81312e3-20250102"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 3e81a181a7fd8..626f11d42bb3f 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -1007,14 +1007,13 @@ __DEV__ && ); } } - function getNextLanes(root, wipLanes) { + function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -1024,29 +1023,30 @@ __DEV__ && 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -4042,7 +4042,9 @@ __DEV__ && (nextLanes = workInProgressRootRenderLanes), (nextLanes = getNextLanes( root, - root === workInProgressRoot ? nextLanes : 0 + root === workInProgressRoot ? nextLanes : 0, + null !== root.cancelPendingCommit || + root.timeoutHandle !== noTimeout )), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root, nextLanes) || @@ -4111,7 +4113,8 @@ __DEV__ && suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); pingedLanes = root.callbackNode; if ( @@ -4176,7 +4179,10 @@ __DEV__ && workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot + ? workInProgressRootRenderLanes$jscomp$0 + : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -9386,32 +9392,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2516; - var JSCompiler_object_inline_stack_2517 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2545; + var JSCompiler_object_inline_stack_2546 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2518 = !1; + var JSCompiler_object_inline_componentStack_2547 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2516 = didSuspend) || - (JSCompiler_object_inline_digest_2516 = + (JSCompiler_object_inline_digest_2545 = didSuspend) || + (JSCompiler_object_inline_digest_2545 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2516 && - ((JSCompiler_object_inline_componentStack_2518 = !0), + JSCompiler_object_inline_digest_2545 && + ((JSCompiler_object_inline_componentStack_2547 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2516 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2545 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2518 + JSCompiler_object_inline_componentStack_2547 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2515 = nextHydratableInstance; + var JSCompiler_object_inline_message_2544 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2515)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2544)) { c: { - var instance = JSCompiler_object_inline_message_2515; + var instance = JSCompiler_object_inline_message_2544; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9453,46 +9459,46 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2515 + JSCompiler_object_inline_message_2544 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2515 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2544 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2515 && - ((JSCompiler_object_inline_message_2515 = - JSCompiler_object_inline_message_2515.dehydrated), - null !== JSCompiler_object_inline_message_2515) + null !== JSCompiler_object_inline_message_2544 && + ((JSCompiler_object_inline_message_2544 = + JSCompiler_object_inline_message_2544.dehydrated), + null !== JSCompiler_object_inline_message_2544) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2515) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2544) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2515 = - JSCompiler_object_inline_stack_2517.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2517.fallback; - if (JSCompiler_object_inline_componentStack_2518) + JSCompiler_object_inline_message_2544 = + JSCompiler_object_inline_stack_2546.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2546.fallback; + if (JSCompiler_object_inline_componentStack_2547) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2517 = + (JSCompiler_object_inline_stack_2546 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2515, + JSCompiler_object_inline_message_2544, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2518 = + (JSCompiler_object_inline_componentStack_2547 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2518.memoizedState = + (JSCompiler_object_inline_componentStack_2547.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2518.childLanes = + (JSCompiler_object_inline_componentStack_2547.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2516, + JSCompiler_object_inline_digest_2545, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9505,9 +9511,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2518.updateQueue), + JSCompiler_object_inline_componentStack_2547.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2518.updateQueue = + ? (JSCompiler_object_inline_componentStack_2547.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9515,46 +9521,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2517 + JSCompiler_object_inline_stack_2546 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2517.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2546.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2517 = + (JSCompiler_object_inline_stack_2546 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2515, + JSCompiler_object_inline_message_2544, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2518 = + (JSCompiler_object_inline_componentStack_2547 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2518.memoizedState = + (JSCompiler_object_inline_componentStack_2547.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2518.childLanes = + (JSCompiler_object_inline_componentStack_2547.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2516, + JSCompiler_object_inline_digest_2545, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2517 + JSCompiler_object_inline_stack_2546 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2515 + JSCompiler_object_inline_message_2544 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2515 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2515) + ((JSCompiler_object_inline_message_2544 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2544) ) { if (didSuspend) workInProgress.flags & 256 @@ -9571,94 +9577,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2518 = - JSCompiler_object_inline_stack_2517.fallback), - (JSCompiler_object_inline_message_2515 = workInProgress.mode), - (JSCompiler_object_inline_stack_2517 = + (JSCompiler_object_inline_componentStack_2547 = + JSCompiler_object_inline_stack_2546.fallback), + (JSCompiler_object_inline_message_2544 = workInProgress.mode), + (JSCompiler_object_inline_stack_2546 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2517.children + children: JSCompiler_object_inline_stack_2546.children }, - JSCompiler_object_inline_message_2515 + JSCompiler_object_inline_message_2544 )), - (JSCompiler_object_inline_componentStack_2518 = + (JSCompiler_object_inline_componentStack_2547 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2518, - JSCompiler_object_inline_message_2515, + JSCompiler_object_inline_componentStack_2547, + JSCompiler_object_inline_message_2544, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2518.flags |= 2), - (JSCompiler_object_inline_stack_2517.return = workInProgress), - (JSCompiler_object_inline_componentStack_2518.return = + (JSCompiler_object_inline_componentStack_2547.flags |= 2), + (JSCompiler_object_inline_stack_2546.return = workInProgress), + (JSCompiler_object_inline_componentStack_2547.return = workInProgress), - (JSCompiler_object_inline_stack_2517.sibling = - JSCompiler_object_inline_componentStack_2518), - (workInProgress.child = JSCompiler_object_inline_stack_2517), + (JSCompiler_object_inline_stack_2546.sibling = + JSCompiler_object_inline_componentStack_2547), + (workInProgress.child = JSCompiler_object_inline_stack_2546), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2517 = workInProgress.child), - (JSCompiler_object_inline_stack_2517.memoizedState = + (JSCompiler_object_inline_stack_2546 = workInProgress.child), + (JSCompiler_object_inline_stack_2546.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2517.childLanes = + (JSCompiler_object_inline_stack_2546.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2516, + JSCompiler_object_inline_digest_2545, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2518)); + JSCompiler_object_inline_componentStack_2547)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2515)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2544)) ) { - JSCompiler_object_inline_digest_2516 = - JSCompiler_object_inline_message_2515.nextSibling && - JSCompiler_object_inline_message_2515.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2516) { - JSCompiler_temp = JSCompiler_object_inline_digest_2516.dgst; - var message = JSCompiler_object_inline_digest_2516.msg; - instance = JSCompiler_object_inline_digest_2516.stck; - var componentStack = JSCompiler_object_inline_digest_2516.cstck; + JSCompiler_object_inline_digest_2545 = + JSCompiler_object_inline_message_2544.nextSibling && + JSCompiler_object_inline_message_2544.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2545) { + JSCompiler_temp = JSCompiler_object_inline_digest_2545.dgst; + var message = JSCompiler_object_inline_digest_2545.msg; + instance = JSCompiler_object_inline_digest_2545.stck; + var componentStack = JSCompiler_object_inline_digest_2545.cstck; } - JSCompiler_object_inline_message_2515 = message; - JSCompiler_object_inline_digest_2516 = JSCompiler_temp; - JSCompiler_object_inline_stack_2517 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2518 = + JSCompiler_object_inline_message_2544 = message; + JSCompiler_object_inline_digest_2545 = JSCompiler_temp; + JSCompiler_object_inline_stack_2546 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2547 = componentStack; - JSCompiler_object_inline_componentStack_2518 = - JSCompiler_object_inline_message_2515 - ? Error(JSCompiler_object_inline_message_2515) + JSCompiler_object_inline_componentStack_2547 = + JSCompiler_object_inline_message_2544 + ? Error(JSCompiler_object_inline_message_2544) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2518.stack = - JSCompiler_object_inline_stack_2517 || ""; - JSCompiler_object_inline_componentStack_2518.digest = - JSCompiler_object_inline_digest_2516; - JSCompiler_object_inline_digest_2516 = + JSCompiler_object_inline_componentStack_2547.stack = + JSCompiler_object_inline_stack_2546 || ""; + JSCompiler_object_inline_componentStack_2547.digest = + JSCompiler_object_inline_digest_2545; + JSCompiler_object_inline_digest_2545 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2517 = { - value: JSCompiler_object_inline_componentStack_2518, + JSCompiler_object_inline_stack_2546 = { + value: JSCompiler_object_inline_componentStack_2547, source: null, - stack: JSCompiler_object_inline_digest_2516 + stack: JSCompiler_object_inline_digest_2545 }; - "string" === typeof JSCompiler_object_inline_digest_2516 && + "string" === typeof JSCompiler_object_inline_digest_2545 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2518, - JSCompiler_object_inline_stack_2517 + JSCompiler_object_inline_componentStack_2547, + JSCompiler_object_inline_stack_2546 ); - queueHydrationError(JSCompiler_object_inline_stack_2517); + queueHydrationError(JSCompiler_object_inline_stack_2546); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9672,44 +9678,44 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2516 = + (JSCompiler_object_inline_digest_2545 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2516) + didReceiveUpdate || JSCompiler_object_inline_digest_2545) ) { - JSCompiler_object_inline_digest_2516 = workInProgressRoot; + JSCompiler_object_inline_digest_2545 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_digest_2516 && - ((JSCompiler_object_inline_stack_2517 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2517 = - 0 !== (JSCompiler_object_inline_stack_2517 & 42) + null !== JSCompiler_object_inline_digest_2545 && + ((JSCompiler_object_inline_stack_2546 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2546 = + 0 !== (JSCompiler_object_inline_stack_2546 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2517 + JSCompiler_object_inline_stack_2546 )), - (JSCompiler_object_inline_stack_2517 = + (JSCompiler_object_inline_stack_2546 = 0 !== - (JSCompiler_object_inline_stack_2517 & - (JSCompiler_object_inline_digest_2516.suspendedLanes | + (JSCompiler_object_inline_stack_2546 & + (JSCompiler_object_inline_digest_2545.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2517), - 0 !== JSCompiler_object_inline_stack_2517 && - JSCompiler_object_inline_stack_2517 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2546), + 0 !== JSCompiler_object_inline_stack_2546 && + JSCompiler_object_inline_stack_2546 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2517), + ((prevState.retryLane = JSCompiler_object_inline_stack_2546), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2517 + JSCompiler_object_inline_stack_2546 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2516, + JSCompiler_object_inline_digest_2545, current, - JSCompiler_object_inline_stack_2517 + JSCompiler_object_inline_stack_2546 ), SelectiveHydrationException) ); - JSCompiler_object_inline_message_2515.data === + JSCompiler_object_inline_message_2544.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9717,14 +9723,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2515.data === + JSCompiler_object_inline_message_2544.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2515.nextSibling + JSCompiler_object_inline_message_2544.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9742,57 +9748,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2517.children + JSCompiler_object_inline_stack_2546.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2518) + if (JSCompiler_object_inline_componentStack_2547) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2518 = - JSCompiler_object_inline_stack_2517.fallback), - (JSCompiler_object_inline_message_2515 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2547 = + JSCompiler_object_inline_stack_2546.fallback), + (JSCompiler_object_inline_message_2544 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2517 = createWorkInProgress( + (JSCompiler_object_inline_stack_2546 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2517.children + children: JSCompiler_object_inline_stack_2546.children } )), - (JSCompiler_object_inline_stack_2517.subtreeFlags = + (JSCompiler_object_inline_stack_2546.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2518 = + ? (JSCompiler_object_inline_componentStack_2547 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2518 + JSCompiler_object_inline_componentStack_2547 )) - : ((JSCompiler_object_inline_componentStack_2518 = + : ((JSCompiler_object_inline_componentStack_2547 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2518, - JSCompiler_object_inline_message_2515, + JSCompiler_object_inline_componentStack_2547, + JSCompiler_object_inline_message_2544, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2518.flags |= 2)), - (JSCompiler_object_inline_componentStack_2518.return = + (JSCompiler_object_inline_componentStack_2547.flags |= 2)), + (JSCompiler_object_inline_componentStack_2547.return = workInProgress), - (JSCompiler_object_inline_stack_2517.return = workInProgress), - (JSCompiler_object_inline_stack_2517.sibling = - JSCompiler_object_inline_componentStack_2518), - (workInProgress.child = JSCompiler_object_inline_stack_2517), - (JSCompiler_object_inline_stack_2517 = - JSCompiler_object_inline_componentStack_2518), - (JSCompiler_object_inline_componentStack_2518 = workInProgress.child), - (JSCompiler_object_inline_message_2515 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2515 - ? (JSCompiler_object_inline_message_2515 = + (JSCompiler_object_inline_stack_2546.return = workInProgress), + (JSCompiler_object_inline_stack_2546.sibling = + JSCompiler_object_inline_componentStack_2547), + (workInProgress.child = JSCompiler_object_inline_stack_2546), + (JSCompiler_object_inline_stack_2546 = + JSCompiler_object_inline_componentStack_2547), + (JSCompiler_object_inline_componentStack_2547 = workInProgress.child), + (JSCompiler_object_inline_message_2544 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2544 + ? (JSCompiler_object_inline_message_2544 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2515.cachePool), + JSCompiler_object_inline_message_2544.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9800,34 +9806,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2515 = { + (JSCompiler_object_inline_message_2544 = { baseLanes: - JSCompiler_object_inline_message_2515.baseLanes | renderLanes, + JSCompiler_object_inline_message_2544.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2518.memoizedState = - JSCompiler_object_inline_message_2515), + (JSCompiler_object_inline_componentStack_2547.memoizedState = + JSCompiler_object_inline_message_2544), enableTransitionTracing && - ((JSCompiler_object_inline_message_2515 = enableTransitionTracing + ((JSCompiler_object_inline_message_2544 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2515 && + null !== JSCompiler_object_inline_message_2544 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2518.updateQueue), + JSCompiler_object_inline_componentStack_2547.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2518.updateQueue = { - transitions: JSCompiler_object_inline_message_2515, + ? (JSCompiler_object_inline_componentStack_2547.updateQueue = { + transitions: JSCompiler_object_inline_message_2544, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2518.updateQueue = + ? (JSCompiler_object_inline_componentStack_2547.updateQueue = { - transitions: JSCompiler_object_inline_message_2515, + transitions: JSCompiler_object_inline_message_2544, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9835,32 +9841,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2515), + JSCompiler_object_inline_message_2544), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2518.childLanes = + (JSCompiler_object_inline_componentStack_2547.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2516, + JSCompiler_object_inline_digest_2545, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2517 + JSCompiler_object_inline_stack_2546 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2517.children + children: JSCompiler_object_inline_stack_2546.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2516 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2516 + ((JSCompiler_object_inline_digest_2545 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2545 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2516.push(current)); + : JSCompiler_object_inline_digest_2545.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -13656,12 +13662,6 @@ __DEV__ && } }); } - function commitMutationEffects(root, finishedWork, committedLanes) { - inProgressLanes = committedLanes; - inProgressRoot = root; - commitMutationEffectsOnFiber(finishedWork, root); - inProgressRoot = inProgressLanes = null; - } function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) { var deletions = parentFiber.deletions; if (null !== deletions) @@ -15668,21 +15668,17 @@ __DEV__ && default: throw Error("Unknown root exit status."); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if (null !== ReactSharedInternals.actQueue) commitRoot( shouldTimeSlice, + forceSync, + lanes, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane, workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - exitStatus, - IMMEDIATE_COMMIT, - renderStartTime, - 0 + workInProgressSuspendedRetryLanes ); else { if ( @@ -15700,7 +15696,7 @@ __DEV__ && workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -15762,18 +15758,24 @@ __DEV__ && completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = noTimeout; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -15796,16 +15798,14 @@ __DEV__ && } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -15901,8 +15901,6 @@ __DEV__ && } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; timeoutHandle !== noTimeout && ((root.timeoutHandle = noTimeout), cancelTimeout(timeoutHandle)); @@ -16534,176 +16532,303 @@ __DEV__ && } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = Internals.p; - try { - (Internals.p = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (Internals.p = previousUpdateLanePriority); - } - } - function commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); ReactStrictModeWarnings.flushLegacyContextWarning(); ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markCommitStarted && injectedProfilingHooks.markCommitStarted(lanes); if (null === finishedWork) - return enableSchedulingProfiler && markCommitStopped(), null; - 0 === lanes && - error$jscomp$0( - "root.finishedLanes should not be empty during a commit. This is a bug in React." + enableSchedulingProfiler && markCommitStopped(); + else { + 0 === lanes && + error$jscomp$0( + "finishedLanes should not be empty during a commit. This is a bug in React." + ); + if (finishedWork === root.current) + throw Error( + "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + ); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes ); - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) - throw Error( - "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + commitStartTime = now(); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = Internals.p; + Internals.p = DiscreteEventPriority; + updatedLanes = executionContext; + executionContext |= CommitContext; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (Internals.p = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate ); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; - 0 !== (finishedWork.subtreeFlags & 10256) || - 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = Internals.p), - (Internals.p = DiscreteEventPriority), - (suspendedRetryLanes = executionContext), - (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffects(root, finishedWork, lanes), - shouldFireAfterActiveInstanceBlur && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), + } + } + function flushMutationEffects(root, finishedWork, lanes) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { + inProgressLanes = lanes; + inProgressRoot = root; + commitMutationEffectsOnFiber(finishedWork, root); + inProgressRoot = inProgressLanes = null; + if (shouldFireAfterActiveInstanceBlur) { + _enabled = !0; + var target = selectionInformation.focusedElem, + event = createEvent("afterblur", !1); + event.relatedTarget = target; + document.dispatchEvent(event); + _enabled = !1; + } + lanes = selectionInformation; + var curFocusedElem = getActiveElementDeep(root.containerInfo), + priorFocusedElem = lanes.focusedElem, + priorSelectionRange = lanes.selectionRange; + if ( + curFocusedElem !== priorFocusedElem && + priorFocusedElem && + priorFocusedElem.ownerDocument && + containsNode( + priorFocusedElem.ownerDocument.documentElement, + priorFocusedElem + ) + ) { + if ( + null !== priorSelectionRange && + hasSelectionCapabilities(priorFocusedElem) + ) { + var start = priorSelectionRange.start, + end = priorSelectionRange.end; + void 0 === end && (end = start); + if ("selectionStart" in priorFocusedElem) + (priorFocusedElem.selectionStart = start), + (priorFocusedElem.selectionEnd = Math.min( + end, + priorFocusedElem.value.length + )); + else { + var doc = priorFocusedElem.ownerDocument || document, + win = (doc && doc.defaultView) || window; + if (win.getSelection) { + var selection = win.getSelection(), + length = priorFocusedElem.textContent.length, + start$jscomp$0 = Math.min( + priorSelectionRange.start, + length + ), + end$jscomp$0 = + void 0 === priorSelectionRange.end + ? start$jscomp$0 + : Math.min(priorSelectionRange.end, length); + !selection.extend && + start$jscomp$0 > end$jscomp$0 && + ((curFocusedElem = end$jscomp$0), + (end$jscomp$0 = start$jscomp$0), + (start$jscomp$0 = curFocusedElem)); + var startMarker = getNodeForCharacterOffset( + priorFocusedElem, + start$jscomp$0 + ), + endMarker = getNodeForCharacterOffset( + priorFocusedElem, + end$jscomp$0 + ); + if ( + startMarker && + endMarker && + (1 !== selection.rangeCount || + selection.anchorNode !== startMarker.node || + selection.anchorOffset !== startMarker.offset || + selection.focusNode !== endMarker.node || + selection.focusOffset !== endMarker.offset) + ) { + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + start$jscomp$0 > end$jscomp$0 + ? (selection.addRange(range), + selection.extend(endMarker.node, endMarker.offset)) + : (range.setEnd(endMarker.node, endMarker.offset), + selection.addRange(range)); + } + } + } + } + doc = []; + for ( + selection = priorFocusedElem; + (selection = selection.parentNode); + + ) + 1 === selection.nodeType && + doc.push({ + element: selection, + left: selection.scrollLeft, + top: selection.scrollTop + }); + "function" === typeof priorFocusedElem.focus && + priorFocusedElem.focus(); + for ( + priorFocusedElem = 0; + priorFocusedElem < doc.length; + priorFocusedElem++ + ) { + var info = doc[priorFocusedElem]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; + } + function flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), - enableSchedulingProfiler && + commitLayoutEffects(finishedWork, root, lanes), enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = suspendedRetryLanes), - (Internals.p = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = spawnedLane) - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); + (rootHasLayoutEffect = + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256)) + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : (releaseRootPooledCache(root, remainingLanes), + : (releaseRootPooledCache(root, root.pendingLanes), (nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); + previousPriority = root.pendingLanes; + 0 === previousPriority && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot$1(finishedWork.stateNode, rootHasLayoutEffect); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - (spawnedLane = makeErrorInfo(remainingLanes.stack)), + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = Internals.p; + Internals.p = DiscreteEventPriority; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority], + errorInfo = makeErrorInfo(recoverableError.stack); runWithFiberInDEV( - remainingLanes.source, - renderPriorityLevel, - remainingLanes.value, - spawnedLane + recoverableError.source, + onRecoverableError, + recoverableError.value, + errorInfo ); + } + } finally { + (ReactSharedInternals.T = finishedWork), + (Internals.p = rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + previousPriority = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (previousPriority & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ @@ -16729,7 +16854,6 @@ __DEV__ && : (currentEndTime = endTime); }); } - return null; } function makeErrorInfo(componentStack) { componentStack = { componentStack: componentStack }; @@ -17677,11 +17801,7 @@ __DEV__ && ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = noTimeout; this.callbackNode = this.next = @@ -17694,7 +17814,6 @@ __DEV__ && this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -18367,100 +18486,6 @@ __DEV__ && "true" === elem.contentEditable) ); } - function restoreSelection(priorSelectionInformation, containerInfo) { - var curFocusedElem = getActiveElementDeep(containerInfo); - containerInfo = priorSelectionInformation.focusedElem; - var priorSelectionRange = priorSelectionInformation.selectionRange; - if ( - curFocusedElem !== containerInfo && - containerInfo && - containerInfo.ownerDocument && - containsNode(containerInfo.ownerDocument.documentElement, containerInfo) - ) { - if ( - null !== priorSelectionRange && - hasSelectionCapabilities(containerInfo) - ) - if ( - ((priorSelectionInformation = priorSelectionRange.start), - (curFocusedElem = priorSelectionRange.end), - void 0 === curFocusedElem && - (curFocusedElem = priorSelectionInformation), - "selectionStart" in containerInfo) - ) - (containerInfo.selectionStart = priorSelectionInformation), - (containerInfo.selectionEnd = Math.min( - curFocusedElem, - containerInfo.value.length - )); - else if ( - ((curFocusedElem = - ((priorSelectionInformation = - containerInfo.ownerDocument || document) && - priorSelectionInformation.defaultView) || - window), - curFocusedElem.getSelection) - ) { - curFocusedElem = curFocusedElem.getSelection(); - var length = containerInfo.textContent.length, - start = Math.min(priorSelectionRange.start, length); - priorSelectionRange = - void 0 === priorSelectionRange.end - ? start - : Math.min(priorSelectionRange.end, length); - !curFocusedElem.extend && - start > priorSelectionRange && - ((length = priorSelectionRange), - (priorSelectionRange = start), - (start = length)); - length = getNodeForCharacterOffset(containerInfo, start); - var endMarker = getNodeForCharacterOffset( - containerInfo, - priorSelectionRange - ); - length && - endMarker && - (1 !== curFocusedElem.rangeCount || - curFocusedElem.anchorNode !== length.node || - curFocusedElem.anchorOffset !== length.offset || - curFocusedElem.focusNode !== endMarker.node || - curFocusedElem.focusOffset !== endMarker.offset) && - ((priorSelectionInformation = - priorSelectionInformation.createRange()), - priorSelectionInformation.setStart(length.node, length.offset), - curFocusedElem.removeAllRanges(), - start > priorSelectionRange - ? (curFocusedElem.addRange(priorSelectionInformation), - curFocusedElem.extend(endMarker.node, endMarker.offset)) - : (priorSelectionInformation.setEnd( - endMarker.node, - endMarker.offset - ), - curFocusedElem.addRange(priorSelectionInformation))); - } - priorSelectionInformation = []; - for ( - curFocusedElem = containerInfo; - (curFocusedElem = curFocusedElem.parentNode); - - ) - 1 === curFocusedElem.nodeType && - priorSelectionInformation.push({ - element: curFocusedElem, - left: curFocusedElem.scrollLeft, - top: curFocusedElem.scrollTop - }); - "function" === typeof containerInfo.focus && containerInfo.focus(); - for ( - containerInfo = 0; - containerInfo < priorSelectionInformation.length; - containerInfo++ - ) - (curFocusedElem = priorSelectionInformation[containerInfo]), - (curFocusedElem.element.scrollLeft = curFocusedElem.left), - (curFocusedElem.element.scrollTop = curFocusedElem.top); - } - } function constructSelectEvent( dispatchQueue, nativeEvent, @@ -21752,11 +21777,6 @@ __DEV__ && event.initEvent(type, bubbles, !1); return event; } - function dispatchAfterDetachedBlur(target) { - var event = createEvent("afterblur", !1); - event.relatedTarget = target; - document.dispatchEvent(event); - } function removeChild(parentInstance, child) { parentInstance.removeChild(child); } @@ -27494,11 +27514,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.1.0-www-modern-d8b903f4-20250102" !== isomorphicReactPackageVersion) + if ("19.1.0-www-modern-c81312e3-20250102" !== 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.1.0-www-modern-d8b903f4-20250102\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.1.0-www-modern-c81312e3-20250102\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27541,10 +27561,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.1.0-www-modern-d8b903f4-20250102", + version: "19.1.0-www-modern-c81312e3-20250102", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-modern-c81312e3-20250102" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28308,5 +28328,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.1.0-www-modern-d8b903f4-20250102"; + exports.version = "19.1.0-www-modern-c81312e3-20250102"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 0ff0af9bee134..e1586b92da0df 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -626,14 +626,13 @@ function getHighestPriorityLanes(lanes) { return lanes; } } -function getNextLanes(root, wipLanes) { +function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -643,29 +642,29 @@ function getNextLanes(root, wipLanes) { 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -2252,7 +2251,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( root$27, - root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$27 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$27.cancelPendingCommit || + -1 !== root$27.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || @@ -2318,7 +2319,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); pingedLanes = root.callbackNode; if ( @@ -2375,7 +2377,8 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -8777,105 +8780,192 @@ var offscreenSubtreeIsHidden = !1, nextEffect = null, focusedInstanceHandle = null, shouldFireAfterActiveInstanceBlur = !1; -function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - deletions = fiber.deletions; - if (null !== deletions) - for (var i = 0; i < deletions.length; i++) { - var deletion = deletions[i]; - doesFiberContain(deletion, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(deletion)); +function commitBeforeMutationEffects(root, firstChild) { + root = root.containerInfo; + eventsEnabled = _enabled; + root = getActiveElementDeep(root); + if (hasSelectionCapabilities(root)) { + if ("selectionStart" in root) + var JSCompiler_temp = { + start: root.selectionStart, + end: root.selectionEnd + }; + else + a: { + JSCompiler_temp = + ((JSCompiler_temp = root.ownerDocument) && + JSCompiler_temp.defaultView) || + window; + var selection = + JSCompiler_temp.getSelection && JSCompiler_temp.getSelection(); + if (selection && 0 !== selection.rangeCount) { + JSCompiler_temp = selection.anchorNode; + var anchorOffset = selection.anchorOffset, + focusNode = selection.focusNode; + selection = selection.focusOffset; + try { + JSCompiler_temp.nodeType, focusNode.nodeType; + } catch (e$203) { + JSCompiler_temp = null; + break a; + } + var length = 0, + start = -1, + end = -1, + indexWithinAnchor = 0, + indexWithinFocus = 0, + node = root, + parentNode = null; + b: for (;;) { + for (var next; ; ) { + node !== JSCompiler_temp || + (0 !== anchorOffset && 3 !== node.nodeType) || + (start = length + anchorOffset); + node !== focusNode || + (0 !== selection && 3 !== node.nodeType) || + (end = length + selection); + 3 === node.nodeType && (length += node.nodeValue.length); + if (null === (next = node.firstChild)) break; + parentNode = node; + node = next; + } + for (;;) { + if (node === root) break b; + parentNode === JSCompiler_temp && + ++indexWithinAnchor === anchorOffset && + (start = length); + parentNode === focusNode && + ++indexWithinFocus === selection && + (end = length); + if (null !== (next = node.nextSibling)) break; + node = parentNode; + parentNode = node.parentNode; + } + node = next; + } + JSCompiler_temp = + -1 === start || -1 === end ? null : { start: start, end: end }; + } else JSCompiler_temp = null; } - deletions = fiber.child; - if (0 !== (fiber.subtreeFlags & 9236) && null !== deletions) - (deletions.return = fiber), (nextEffect = deletions); + JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 }; + } else JSCompiler_temp = null; + selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp }; + root = null; + JSCompiler_temp = selectionInformation.focusedElem; + null !== JSCompiler_temp && + (root = getClosestInstanceFromNode(JSCompiler_temp)); + _enabled = !1; + focusedInstanceHandle = root; + shouldFireAfterActiveInstanceBlur = !1; + for (nextEffect = firstChild; null !== nextEffect; ) { + firstChild = nextEffect; + root = firstChild.deletions; + if (null !== root) + for ( + JSCompiler_temp = 0; + JSCompiler_temp < root.length; + JSCompiler_temp++ + ) + (anchorOffset = root[JSCompiler_temp]), + doesFiberContain(anchorOffset, focusedInstanceHandle) && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(anchorOffset)); + root = firstChild.child; + if (0 !== (firstChild.subtreeFlags & 9236) && null !== root) + (root.return = firstChild), (nextEffect = root); else - a: for (; null !== nextEffect; ) { - fiber = nextEffect; - deletions = void 0; - var JSCompiler_temp; - i = fiber; - deletion = i.alternate; - var flags = i.flags; + for (; null !== nextEffect; ) { + firstChild = nextEffect; + root = firstChild.alternate; + JSCompiler_temp = firstChild.flags; if ( - !shouldFireAfterActiveInstanceBlur && - null !== focusedInstanceHandle + (anchorOffset = + !shouldFireAfterActiveInstanceBlur && + null !== focusedInstanceHandle) ) { - if ((JSCompiler_temp = 13 === i.tag)) - b: { + if ((anchorOffset = 13 === firstChild.tag)) + a: { if ( - null !== deletion && - ((JSCompiler_temp = deletion.memoizedState), - null === JSCompiler_temp || null !== JSCompiler_temp.dehydrated) + null !== root && + ((anchorOffset = root.memoizedState), + null === anchorOffset || null !== anchorOffset.dehydrated) ) { - JSCompiler_temp = i.memoizedState; - JSCompiler_temp = - null !== JSCompiler_temp && - null === JSCompiler_temp.dehydrated; - break b; + anchorOffset = firstChild.memoizedState; + anchorOffset = + null !== anchorOffset && null === anchorOffset.dehydrated; + break a; } - JSCompiler_temp = !1; + anchorOffset = !1; } - JSCompiler_temp && - doesFiberContain(i, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(i)); + anchorOffset = + anchorOffset && doesFiberContain(firstChild, focusedInstanceHandle); } - switch (i.tag) { + anchorOffset && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(firstChild)); + switch (firstChild.tag) { case 0: if ( - 0 !== (flags & 4) && - ((deletions = i.updateQueue), - (deletions = null !== deletions ? deletions.events : null), - null !== deletions) + 0 !== (JSCompiler_temp & 4) && + ((root = firstChild.updateQueue), + (root = null !== root ? root.events : null), + null !== root) ) - for (i = 0; i < deletions.length; i++) - (deletion = deletions[i]), - (deletion.ref.impl = deletion.nextImpl); + for ( + JSCompiler_temp = 0; + JSCompiler_temp < root.length; + JSCompiler_temp++ + ) + (anchorOffset = root[JSCompiler_temp]), + (anchorOffset.ref.impl = anchorOffset.nextImpl); break; case 11: case 15: break; case 1: - if (0 !== (flags & 1024) && null !== deletion) { - flags = deletion.memoizedProps; - deletion = deletion.memoizedState; - JSCompiler_temp = i.stateNode; + if (0 !== (JSCompiler_temp & 1024) && null !== root) { + JSCompiler_temp = void 0; + anchorOffset = firstChild; + focusNode = root.memoizedProps; + root = root.memoizedState; + selection = anchorOffset.stateNode; try { var resolvedPrevProps = resolveClassComponentProps( - i.type, - flags, - i.elementType === i.type + anchorOffset.type, + focusNode, + anchorOffset.elementType === anchorOffset.type ); - deletions = JSCompiler_temp.getSnapshotBeforeUpdate( + JSCompiler_temp = selection.getSnapshotBeforeUpdate( resolvedPrevProps, - deletion + root ); - JSCompiler_temp.__reactInternalSnapshotBeforeUpdate = deletions; + selection.__reactInternalSnapshotBeforeUpdate = JSCompiler_temp; } catch (error) { - captureCommitPhaseError(i, i.return, error); + captureCommitPhaseError( + anchorOffset, + anchorOffset.return, + error + ); } } break; case 3: - if (0 !== (flags & 1024)) - b: if ( - ((deletions = i.stateNode.containerInfo), - (i = deletions.nodeType), - 9 === i) + if (0 !== (JSCompiler_temp & 1024)) + if ( + ((root = firstChild.stateNode.containerInfo), + (JSCompiler_temp = root.nodeType), + 9 === JSCompiler_temp) ) - clearContainerSparingly(deletions); - else if (1 === i) - switch (deletions.nodeName) { + clearContainerSparingly(root); + else if (1 === JSCompiler_temp) + switch (root.nodeName) { case "HEAD": case "HTML": case "BODY": - clearContainerSparingly(deletions); - break b; + clearContainerSparingly(root); + break; default: - deletions.textContent = ""; + root.textContent = ""; } break; case 5: @@ -8886,17 +8976,19 @@ function commitBeforeMutationEffects_begin() { case 17: break; default: - if (0 !== (flags & 1024)) throw Error(formatProdErrorMessage(163)); + if (0 !== (JSCompiler_temp & 1024)) + throw Error(formatProdErrorMessage(163)); } - deletions = fiber.sibling; - if (null !== deletions) { - deletions.return = fiber.return; - nextEffect = deletions; - break a; + root = firstChild.sibling; + if (null !== root) { + root.return = firstChild.return; + nextEffect = root; + break; } - nextEffect = fiber.return; + nextEffect = firstChild.return; } } + focusedInstanceHandle = null; } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -11318,8 +11410,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { default: throw Error(formatProdErrorMessage(329)); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === renderWasConcurrent) && @@ -11332,7 +11422,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -11393,18 +11483,24 @@ function commitRootWhenReady( completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = -1; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -11422,16 +11518,14 @@ function commitRootWhenReady( } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -11524,8 +11618,6 @@ function resetWorkInProgressStack() { } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; -1 !== timeoutHandle && ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle)); @@ -12000,142 +12092,253 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) { } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = Internals.p; - try { - (Internals.p = 2), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (Internals.p = previousUpdateLanePriority); + root.cancelPendingCommit = null; + do flushPassiveEffects(); + while (null !== rootWithPendingPassiveEffects); + if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); + if (null !== finishedWork) { + if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = Internals.p; + Internals.p = 2; + updatedLanes = executionContext; + executionContext |= 4; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (Internals.p = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ); } } -function commitRootImpl( +function flushMutationEffects(root, finishedWork) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitMutationEffectsOnFiber(finishedWork, root); + if (shouldFireAfterActiveInstanceBlur) { + _enabled = !0; + var target = selectionInformation.focusedElem, + event = createEvent("afterblur", !1); + event.relatedTarget = target; + document.dispatchEvent(event); + _enabled = !1; + } + target = selectionInformation; + var curFocusedElem = getActiveElementDeep(root.containerInfo), + priorFocusedElem = target.focusedElem, + priorSelectionRange = target.selectionRange; + if ( + curFocusedElem !== priorFocusedElem && + priorFocusedElem && + priorFocusedElem.ownerDocument && + containsNode( + priorFocusedElem.ownerDocument.documentElement, + priorFocusedElem + ) + ) { + if ( + null !== priorSelectionRange && + hasSelectionCapabilities(priorFocusedElem) + ) { + var start = priorSelectionRange.start, + end = priorSelectionRange.end; + void 0 === end && (end = start); + if ("selectionStart" in priorFocusedElem) + (priorFocusedElem.selectionStart = start), + (priorFocusedElem.selectionEnd = Math.min( + end, + priorFocusedElem.value.length + )); + else { + var doc = priorFocusedElem.ownerDocument || document, + win = (doc && doc.defaultView) || window; + if (win.getSelection) { + var selection = win.getSelection(), + length = priorFocusedElem.textContent.length, + start$jscomp$0 = Math.min(priorSelectionRange.start, length), + end$jscomp$0 = + void 0 === priorSelectionRange.end + ? start$jscomp$0 + : Math.min(priorSelectionRange.end, length); + !selection.extend && + start$jscomp$0 > end$jscomp$0 && + ((curFocusedElem = end$jscomp$0), + (end$jscomp$0 = start$jscomp$0), + (start$jscomp$0 = curFocusedElem)); + var startMarker = getNodeForCharacterOffset( + priorFocusedElem, + start$jscomp$0 + ), + endMarker = getNodeForCharacterOffset( + priorFocusedElem, + end$jscomp$0 + ); + if ( + startMarker && + endMarker && + (1 !== selection.rangeCount || + selection.anchorNode !== startMarker.node || + selection.anchorOffset !== startMarker.offset || + selection.focusNode !== endMarker.node || + selection.focusOffset !== endMarker.offset) + ) { + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + start$jscomp$0 > end$jscomp$0 + ? (selection.addRange(range), + selection.extend(endMarker.node, endMarker.offset)) + : (range.setEnd(endMarker.node, endMarker.offset), + selection.addRange(range)); + } + } + } + } + doc = []; + for (selection = priorFocusedElem; (selection = selection.parentNode); ) + 1 === selection.nodeType && + doc.push({ + element: selection, + left: selection.scrollLeft, + top: selection.scrollTop + }); + "function" === typeof priorFocusedElem.focus && + priorFocusedElem.focus(); + for ( + priorFocusedElem = 0; + priorFocusedElem < doc.length; + priorFocusedElem++ + ) { + var info = doc[priorFocusedElem]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; +} +function flushLayoutEffects( root, + finishedWork, + lanes, recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + didIncludeRenderPhaseUpdate ) { - do flushPassiveEffects(); - while (null !== rootWithPendingPassiveEffects); - if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; - if (null === finishedWork) return null; - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = Internals.p), - (Internals.p = 2), - (suspendedRetryLanes = executionContext), - (executionContext |= 4), - (focusedInstanceHandle = prepareForCommit(root.containerInfo)), - (shouldFireAfterActiveInstanceBlur = !1), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - (focusedInstanceHandle = null), - commitMutationEffectsOnFiber(finishedWork, root), - shouldFireAfterActiveInstanceBlur && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = suspendedRetryLanes), - (Internals.p = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - spawnedLane - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : releaseRootPooledCache(root, remainingLanes); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - renderPriorityLevel(remainingLanes.value, { - componentStack: remainingLanes.stack + : releaseRootPooledCache(root, root.pendingLanes); + rootHasLayoutEffect = root.pendingLanes; + 0 === rootHasLayoutEffect && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot(finishedWork.stateNode, rootHasLayoutEffect); + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = Internals.p; + Internals.p = 2; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority]; + onRecoverableError(recoverableError.value, { + componentStack: recoverableError.stack }); + } + } finally { + (ReactSharedInternals.T = finishedWork), + (Internals.p = rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + rootHasLayoutEffect = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)) ? root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)) @@ -12158,7 +12361,6 @@ function commitRootImpl( : (currentEndTime = endTime); }); } - return null; } function releaseRootPooledCache(root, remainingLanes) { 0 === (root.pooledCacheLanes &= remainingLanes) && @@ -12168,7 +12370,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$197 = rootWithPendingPassiveEffects, + var root$198 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12183,7 +12385,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$197, remainingLanes); + releaseRootPooledCache(root$198, remainingLanes); } } return !1; @@ -12688,11 +12890,7 @@ function FiberRootNode( ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = -1; this.callbackNode = this.next = @@ -12705,7 +12903,6 @@ function FiberRootNode( this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -13420,14 +13617,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$354; if (canUseDOM) { - var isSupported$jscomp$inline_1589 = "oninput" in document; - if (!isSupported$jscomp$inline_1589) { - var element$jscomp$inline_1590 = document.createElement("div"); - element$jscomp$inline_1590.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1589 = - "function" === typeof element$jscomp$inline_1590.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$354 = isSupported$jscomp$inline_1589; + JSCompiler_inline_result$jscomp$354 = isSupported$jscomp$inline_1597; } else JSCompiler_inline_result$jscomp$354 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$354 && @@ -13556,97 +13753,6 @@ function hasSelectionCapabilities(elem) { "true" === elem.contentEditable) ); } -function restoreSelection(priorSelectionInformation, containerInfo) { - var curFocusedElem = getActiveElementDeep(containerInfo); - containerInfo = priorSelectionInformation.focusedElem; - var priorSelectionRange = priorSelectionInformation.selectionRange; - if ( - curFocusedElem !== containerInfo && - containerInfo && - containerInfo.ownerDocument && - containsNode(containerInfo.ownerDocument.documentElement, containerInfo) - ) { - if (null !== priorSelectionRange && hasSelectionCapabilities(containerInfo)) - if ( - ((priorSelectionInformation = priorSelectionRange.start), - (curFocusedElem = priorSelectionRange.end), - void 0 === curFocusedElem && - (curFocusedElem = priorSelectionInformation), - "selectionStart" in containerInfo) - ) - (containerInfo.selectionStart = priorSelectionInformation), - (containerInfo.selectionEnd = Math.min( - curFocusedElem, - containerInfo.value.length - )); - else if ( - ((curFocusedElem = - ((priorSelectionInformation = - containerInfo.ownerDocument || document) && - priorSelectionInformation.defaultView) || - window), - curFocusedElem.getSelection) - ) { - curFocusedElem = curFocusedElem.getSelection(); - var length = containerInfo.textContent.length, - start = Math.min(priorSelectionRange.start, length); - priorSelectionRange = - void 0 === priorSelectionRange.end - ? start - : Math.min(priorSelectionRange.end, length); - !curFocusedElem.extend && - start > priorSelectionRange && - ((length = priorSelectionRange), - (priorSelectionRange = start), - (start = length)); - length = getNodeForCharacterOffset(containerInfo, start); - var endMarker = getNodeForCharacterOffset( - containerInfo, - priorSelectionRange - ); - length && - endMarker && - (1 !== curFocusedElem.rangeCount || - curFocusedElem.anchorNode !== length.node || - curFocusedElem.anchorOffset !== length.offset || - curFocusedElem.focusNode !== endMarker.node || - curFocusedElem.focusOffset !== endMarker.offset) && - ((priorSelectionInformation = - priorSelectionInformation.createRange()), - priorSelectionInformation.setStart(length.node, length.offset), - curFocusedElem.removeAllRanges(), - start > priorSelectionRange - ? (curFocusedElem.addRange(priorSelectionInformation), - curFocusedElem.extend(endMarker.node, endMarker.offset)) - : (priorSelectionInformation.setEnd( - endMarker.node, - endMarker.offset - ), - curFocusedElem.addRange(priorSelectionInformation))); - } - priorSelectionInformation = []; - for ( - curFocusedElem = containerInfo; - (curFocusedElem = curFocusedElem.parentNode); - - ) - 1 === curFocusedElem.nodeType && - priorSelectionInformation.push({ - element: curFocusedElem, - left: curFocusedElem.scrollLeft, - top: curFocusedElem.scrollTop - }); - "function" === typeof containerInfo.focus && containerInfo.focus(); - for ( - containerInfo = 0; - containerInfo < priorSelectionInformation.length; - containerInfo++ - ) - (curFocusedElem = priorSelectionInformation[containerInfo]), - (curFocusedElem.element.scrollLeft = curFocusedElem.left), - (curFocusedElem.element.scrollTop = curFocusedElem.top); - } -} var skipSelectionChangeEvent = canUseDOM && "documentMode" in document && 11 >= document.documentMode, activeElement = null, @@ -13841,20 +13947,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1630 = 0; - i$jscomp$inline_1630 < simpleEventPluginEvents.length; - i$jscomp$inline_1630++ + var i$jscomp$inline_1638 = 0; + i$jscomp$inline_1638 < simpleEventPluginEvents.length; + i$jscomp$inline_1638++ ) { - var eventName$jscomp$inline_1631 = - simpleEventPluginEvents[i$jscomp$inline_1630], - domEventName$jscomp$inline_1632 = - eventName$jscomp$inline_1631.toLowerCase(), - capitalizedEvent$jscomp$inline_1633 = - eventName$jscomp$inline_1631[0].toUpperCase() + - eventName$jscomp$inline_1631.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_1632, - "on" + capitalizedEvent$jscomp$inline_1633 + domEventName$jscomp$inline_1640, + "on" + capitalizedEvent$jscomp$inline_1641 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15147,34 +15253,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$216 = props[hasSrc]; - if (null != propValue$216) + var propValue$217 = props[hasSrc]; + if (null != propValue$217) switch (hasSrc) { case "name": - hasSrcSet = propValue$216; + hasSrcSet = propValue$217; break; case "type": - propValue = propValue$216; + propValue = propValue$217; break; case "checked": - checked = propValue$216; + checked = propValue$217; break; case "defaultChecked": - defaultChecked = propValue$216; + defaultChecked = propValue$217; break; case "value": - propKey = propValue$216; + propKey = propValue$217; break; case "defaultValue": - defaultValue = propValue$216; + defaultValue = propValue$217; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$216) + if (null != propValue$217) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$216, props, null); + setProp(domElement, tag, hasSrc, propValue$217, props, null); } } initInput( @@ -15311,14 +15417,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$216 in props) - props.hasOwnProperty(propValue$216) && - ((hasSrc = props[propValue$216]), + for (propValue$217 in props) + props.hasOwnProperty(propValue$217) && + ((hasSrc = props[propValue$217]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$216, + propValue$217, hasSrc, props, void 0 @@ -15366,14 +15472,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$233 in nextProps) { - var propKey = nextProps[propKey$233]; - lastProp = lastProps[propKey$233]; + for (var propKey$234 in nextProps) { + var propKey = nextProps[propKey$234]; + lastProp = lastProps[propKey$234]; if ( - nextProps.hasOwnProperty(propKey$233) && + nextProps.hasOwnProperty(propKey$234) && (null != propKey || null != lastProp) ) - switch (propKey$233) { + switch (propKey$234) { case "type": type = propKey; break; @@ -15402,7 +15508,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$233, + propKey$234, propKey, nextProps, lastProp @@ -15421,7 +15527,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$233 = null; + propKey = value = defaultValue = propKey$234 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15452,7 +15558,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$233 = type; + propKey$234 = type; break; case "defaultValue": defaultValue = type; @@ -15473,15 +15579,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$233 - ? updateOptions(domElement, !!lastProps, propKey$233, !1) + null != propKey$234 + ? updateOptions(domElement, !!lastProps, propKey$234, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$233 = null; + propKey = propKey$234 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15505,7 +15611,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$233 = name; + propKey$234 = name; break; case "defaultValue": propKey = name; @@ -15519,17 +15625,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$233, propKey); + updateTextarea(domElement, propKey$234, propKey); return; case "option": - for (var propKey$249 in lastProps) + for (var propKey$250 in lastProps) if ( - ((propKey$233 = lastProps[propKey$249]), - lastProps.hasOwnProperty(propKey$249) && - null != propKey$233 && - !nextProps.hasOwnProperty(propKey$249)) + ((propKey$234 = lastProps[propKey$250]), + lastProps.hasOwnProperty(propKey$250) && + null != propKey$234 && + !nextProps.hasOwnProperty(propKey$250)) ) - switch (propKey$249) { + switch (propKey$250) { case "selected": domElement.selected = !1; break; @@ -15537,33 +15643,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$249, + propKey$250, null, nextProps, - propKey$233 + propKey$234 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$233 = nextProps[lastDefaultValue]), + ((propKey$234 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$233 !== propKey && - (null != propKey$233 || null != propKey)) + propKey$234 !== propKey && + (null != propKey$234 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$233 && - "function" !== typeof propKey$233 && - "symbol" !== typeof propKey$233; + propKey$234 && + "function" !== typeof propKey$234 && + "symbol" !== typeof propKey$234; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$233, + propKey$234, nextProps, propKey ); @@ -15584,24 +15690,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$254 in lastProps) - (propKey$233 = lastProps[propKey$254]), - lastProps.hasOwnProperty(propKey$254) && - null != propKey$233 && - !nextProps.hasOwnProperty(propKey$254) && - setProp(domElement, tag, propKey$254, null, nextProps, propKey$233); + for (var propKey$255 in lastProps) + (propKey$234 = lastProps[propKey$255]), + lastProps.hasOwnProperty(propKey$255) && + null != propKey$234 && + !nextProps.hasOwnProperty(propKey$255) && + setProp(domElement, tag, propKey$255, null, nextProps, propKey$234); for (checked in nextProps) if ( - ((propKey$233 = nextProps[checked]), + ((propKey$234 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$233 !== propKey && - (null != propKey$233 || null != propKey)) + propKey$234 !== propKey && + (null != propKey$234 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$233) + if (null != propKey$234) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15609,7 +15715,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$233, + propKey$234, nextProps, propKey ); @@ -15617,49 +15723,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$259 in lastProps) - (propKey$233 = lastProps[propKey$259]), - lastProps.hasOwnProperty(propKey$259) && - void 0 !== propKey$233 && - !nextProps.hasOwnProperty(propKey$259) && + for (var propKey$260 in lastProps) + (propKey$234 = lastProps[propKey$260]), + lastProps.hasOwnProperty(propKey$260) && + void 0 !== propKey$234 && + !nextProps.hasOwnProperty(propKey$260) && setPropOnCustomElement( domElement, tag, - propKey$259, + propKey$260, void 0, nextProps, - propKey$233 + propKey$234 ); for (defaultChecked in nextProps) - (propKey$233 = nextProps[defaultChecked]), + (propKey$234 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$233 === propKey || - (void 0 === propKey$233 && void 0 === propKey) || + propKey$234 === propKey || + (void 0 === propKey$234 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$233, + propKey$234, nextProps, propKey ); return; } } - for (var propKey$264 in lastProps) - (propKey$233 = lastProps[propKey$264]), - lastProps.hasOwnProperty(propKey$264) && - null != propKey$233 && - !nextProps.hasOwnProperty(propKey$264) && - setProp(domElement, tag, propKey$264, null, nextProps, propKey$233); + for (var propKey$265 in lastProps) + (propKey$234 = lastProps[propKey$265]), + lastProps.hasOwnProperty(propKey$265) && + null != propKey$234 && + !nextProps.hasOwnProperty(propKey$265) && + setProp(domElement, tag, propKey$265, null, nextProps, propKey$234); for (lastProp in nextProps) - (propKey$233 = nextProps[lastProp]), + (propKey$234 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$233 === propKey || - (null == propKey$233 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$233, nextProps, propKey); + propKey$234 === propKey || + (null == propKey$234 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$234, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15692,85 +15798,6 @@ function getChildHostContextProd(parentNamespace, type) { ? 0 : parentNamespace; } -function prepareForCommit(containerInfo) { - eventsEnabled = _enabled; - containerInfo = getActiveElementDeep(containerInfo); - if (hasSelectionCapabilities(containerInfo)) { - if ("selectionStart" in containerInfo) - var JSCompiler_temp = { - start: containerInfo.selectionStart, - end: containerInfo.selectionEnd - }; - else - a: { - JSCompiler_temp = - ((JSCompiler_temp = containerInfo.ownerDocument) && - JSCompiler_temp.defaultView) || - window; - var selection = - JSCompiler_temp.getSelection && JSCompiler_temp.getSelection(); - if (selection && 0 !== selection.rangeCount) { - JSCompiler_temp = selection.anchorNode; - var anchorOffset = selection.anchorOffset, - focusNode = selection.focusNode; - selection = selection.focusOffset; - try { - JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$202) { - JSCompiler_temp = null; - break a; - } - var length = 0, - start = -1, - end = -1, - indexWithinAnchor = 0, - indexWithinFocus = 0, - node = containerInfo, - parentNode = null; - b: for (;;) { - for (var next; ; ) { - node !== JSCompiler_temp || - (0 !== anchorOffset && 3 !== node.nodeType) || - (start = length + anchorOffset); - node !== focusNode || - (0 !== selection && 3 !== node.nodeType) || - (end = length + selection); - 3 === node.nodeType && (length += node.nodeValue.length); - if (null === (next = node.firstChild)) break; - parentNode = node; - node = next; - } - for (;;) { - if (node === containerInfo) break b; - parentNode === JSCompiler_temp && - ++indexWithinAnchor === anchorOffset && - (start = length); - parentNode === focusNode && - ++indexWithinFocus === selection && - (end = length); - if (null !== (next = node.nextSibling)) break; - node = parentNode; - parentNode = node.parentNode; - } - node = next; - } - JSCompiler_temp = - -1 === start || -1 === end ? null : { start: start, end: end }; - } else JSCompiler_temp = null; - } - JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 }; - } else JSCompiler_temp = null; - selectionInformation = { - focusedElem: containerInfo, - selectionRange: JSCompiler_temp - }; - containerInfo = null; - JSCompiler_temp = selectionInformation.focusedElem; - null !== JSCompiler_temp && - (containerInfo = getClosestInstanceFromNode(JSCompiler_temp)); - _enabled = !1; - return containerInfo; -} function beforeActiveInstanceBlur(internalInstanceHandle) { _enabled = !0; var target = selectionInformation.focusedElem, @@ -15834,11 +15861,6 @@ function createEvent(type, bubbles) { event.initEvent(type, bubbles, !1); return event; } -function dispatchAfterDetachedBlur(target) { - var event = createEvent("afterblur", !1); - event.relatedTarget = target; - document.dispatchEvent(event); -} function clearSuspenseBoundary(parentInstance, suspenseInstance) { var node = suspenseInstance, depth = 0; @@ -16392,26 +16414,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$272 = getResourcesFromRoot( + var styles$273 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$273 = styles$272.get(type); - resource$273 || + resource$274 = styles$273.get(type); + resource$274 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$273 = { + (resource$274 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$272.set(type, resource$273), - (styles$272 = JSCompiler_inline_result.querySelector( + styles$273.set(type, resource$274), + (styles$273 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$272._p && - ((resource$273.instance = styles$272), - (resource$273.state.loading = 5)), + !styles$273._p && + ((resource$274.instance = styles$273), + (resource$274.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16424,16 +16446,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$272 || + styles$273 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$273.state + resource$274.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$273; + return resource$274; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16530,37 +16552,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$278 = hoistableRoot.querySelector( + var instance$279 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$278) + if (instance$279) return ( (resource.state.loading |= 4), - (resource.instance = instance$278), - markNodeAsHoistable(instance$278), - instance$278 + (resource.instance = instance$279), + markNodeAsHoistable(instance$279), + instance$279 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$278 = ( + instance$279 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$278); - var linkInstance = instance$278; + markNodeAsHoistable(instance$279); + var linkInstance = instance$279; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$278, "link", instance); + setInitialProperties(instance$279, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$278, props.precedence, hoistableRoot); - return (resource.instance = instance$278); + insertStylesheet(instance$279, props.precedence, hoistableRoot); + return (resource.instance = instance$279); case "script": - instance$278 = getScriptKey(props.src); + instance$279 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$278) + getScriptSelectorFromKey(instance$279) )) ) return ( @@ -16569,7 +16591,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$278))) + if ((styleProps = preloadPropsMap.get(instance$279))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17573,16 +17595,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1806 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1811 = React.version; if ( - "19.1.0-www-classic-d8b903f4-20250102" !== - isomorphicReactPackageVersion$jscomp$inline_1806 + "19.1.0-www-classic-c81312e3-20250102" !== + isomorphicReactPackageVersion$jscomp$inline_1811 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1806, - "19.1.0-www-classic-d8b903f4-20250102" + isomorphicReactPackageVersion$jscomp$inline_1811, + "19.1.0-www-classic-c81312e3-20250102" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17598,24 +17620,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2352 = { +var internals$jscomp$inline_2351 = { bundleType: 0, - version: "19.1.0-www-classic-d8b903f4-20250102", + version: "19.1.0-www-classic-c81312e3-20250102", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-classic-c81312e3-20250102" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2353 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2352 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2353.isDisabled && - hook$jscomp$inline_2353.supportsFiber + !hook$jscomp$inline_2352.isDisabled && + hook$jscomp$inline_2352.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2353.inject( - internals$jscomp$inline_2352 + (rendererID = hook$jscomp$inline_2352.inject( + internals$jscomp$inline_2351 )), - (injectedHook = hook$jscomp$inline_2353); + (injectedHook = hook$jscomp$inline_2352); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18119,4 +18141,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-classic-d8b903f4-20250102"; +exports.version = "19.1.0-www-classic-c81312e3-20250102"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 40a175c836a3a..d23677e4f0b71 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -561,14 +561,13 @@ function getHighestPriorityLanes(lanes) { return lanes; } } -function getNextLanes(root, wipLanes) { +function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -578,29 +577,29 @@ function getNextLanes(root, wipLanes) { 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -2103,7 +2102,9 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( root$27, - root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$27 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$27.cancelPendingCommit || + -1 !== root$27.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || @@ -2169,7 +2170,8 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); pingedLanes = root.callbackNode; if ( @@ -2226,7 +2228,8 @@ function performWorkOnRootViaSchedulerTask(root, didTimeout) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -8528,105 +8531,192 @@ var offscreenSubtreeIsHidden = !1, nextEffect = null, focusedInstanceHandle = null, shouldFireAfterActiveInstanceBlur = !1; -function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - deletions = fiber.deletions; - if (null !== deletions) - for (var i = 0; i < deletions.length; i++) { - var deletion = deletions[i]; - doesFiberContain(deletion, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(deletion)); +function commitBeforeMutationEffects(root, firstChild) { + root = root.containerInfo; + eventsEnabled = _enabled; + root = getActiveElementDeep(root); + if (hasSelectionCapabilities(root)) { + if ("selectionStart" in root) + var JSCompiler_temp = { + start: root.selectionStart, + end: root.selectionEnd + }; + else + a: { + JSCompiler_temp = + ((JSCompiler_temp = root.ownerDocument) && + JSCompiler_temp.defaultView) || + window; + var selection = + JSCompiler_temp.getSelection && JSCompiler_temp.getSelection(); + if (selection && 0 !== selection.rangeCount) { + JSCompiler_temp = selection.anchorNode; + var anchorOffset = selection.anchorOffset, + focusNode = selection.focusNode; + selection = selection.focusOffset; + try { + JSCompiler_temp.nodeType, focusNode.nodeType; + } catch (e$203) { + JSCompiler_temp = null; + break a; + } + var length = 0, + start = -1, + end = -1, + indexWithinAnchor = 0, + indexWithinFocus = 0, + node = root, + parentNode = null; + b: for (;;) { + for (var next; ; ) { + node !== JSCompiler_temp || + (0 !== anchorOffset && 3 !== node.nodeType) || + (start = length + anchorOffset); + node !== focusNode || + (0 !== selection && 3 !== node.nodeType) || + (end = length + selection); + 3 === node.nodeType && (length += node.nodeValue.length); + if (null === (next = node.firstChild)) break; + parentNode = node; + node = next; + } + for (;;) { + if (node === root) break b; + parentNode === JSCompiler_temp && + ++indexWithinAnchor === anchorOffset && + (start = length); + parentNode === focusNode && + ++indexWithinFocus === selection && + (end = length); + if (null !== (next = node.nextSibling)) break; + node = parentNode; + parentNode = node.parentNode; + } + node = next; + } + JSCompiler_temp = + -1 === start || -1 === end ? null : { start: start, end: end }; + } else JSCompiler_temp = null; } - deletions = fiber.child; - if (0 !== (fiber.subtreeFlags & 9236) && null !== deletions) - (deletions.return = fiber), (nextEffect = deletions); + JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 }; + } else JSCompiler_temp = null; + selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp }; + root = null; + JSCompiler_temp = selectionInformation.focusedElem; + null !== JSCompiler_temp && + (root = getClosestInstanceFromNode(JSCompiler_temp)); + _enabled = !1; + focusedInstanceHandle = root; + shouldFireAfterActiveInstanceBlur = !1; + for (nextEffect = firstChild; null !== nextEffect; ) { + firstChild = nextEffect; + root = firstChild.deletions; + if (null !== root) + for ( + JSCompiler_temp = 0; + JSCompiler_temp < root.length; + JSCompiler_temp++ + ) + (anchorOffset = root[JSCompiler_temp]), + doesFiberContain(anchorOffset, focusedInstanceHandle) && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(anchorOffset)); + root = firstChild.child; + if (0 !== (firstChild.subtreeFlags & 9236) && null !== root) + (root.return = firstChild), (nextEffect = root); else - a: for (; null !== nextEffect; ) { - fiber = nextEffect; - deletions = void 0; - var JSCompiler_temp; - i = fiber; - deletion = i.alternate; - var flags = i.flags; + for (; null !== nextEffect; ) { + firstChild = nextEffect; + root = firstChild.alternate; + JSCompiler_temp = firstChild.flags; if ( - !shouldFireAfterActiveInstanceBlur && - null !== focusedInstanceHandle + (anchorOffset = + !shouldFireAfterActiveInstanceBlur && + null !== focusedInstanceHandle) ) { - if ((JSCompiler_temp = 13 === i.tag)) - b: { + if ((anchorOffset = 13 === firstChild.tag)) + a: { if ( - null !== deletion && - ((JSCompiler_temp = deletion.memoizedState), - null === JSCompiler_temp || null !== JSCompiler_temp.dehydrated) + null !== root && + ((anchorOffset = root.memoizedState), + null === anchorOffset || null !== anchorOffset.dehydrated) ) { - JSCompiler_temp = i.memoizedState; - JSCompiler_temp = - null !== JSCompiler_temp && - null === JSCompiler_temp.dehydrated; - break b; + anchorOffset = firstChild.memoizedState; + anchorOffset = + null !== anchorOffset && null === anchorOffset.dehydrated; + break a; } - JSCompiler_temp = !1; + anchorOffset = !1; } - JSCompiler_temp && - doesFiberContain(i, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(i)); + anchorOffset = + anchorOffset && doesFiberContain(firstChild, focusedInstanceHandle); } - switch (i.tag) { + anchorOffset && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(firstChild)); + switch (firstChild.tag) { case 0: if ( - 0 !== (flags & 4) && - ((deletions = i.updateQueue), - (deletions = null !== deletions ? deletions.events : null), - null !== deletions) + 0 !== (JSCompiler_temp & 4) && + ((root = firstChild.updateQueue), + (root = null !== root ? root.events : null), + null !== root) ) - for (i = 0; i < deletions.length; i++) - (deletion = deletions[i]), - (deletion.ref.impl = deletion.nextImpl); + for ( + JSCompiler_temp = 0; + JSCompiler_temp < root.length; + JSCompiler_temp++ + ) + (anchorOffset = root[JSCompiler_temp]), + (anchorOffset.ref.impl = anchorOffset.nextImpl); break; case 11: case 15: break; case 1: - if (0 !== (flags & 1024) && null !== deletion) { - flags = deletion.memoizedProps; - deletion = deletion.memoizedState; - JSCompiler_temp = i.stateNode; + if (0 !== (JSCompiler_temp & 1024) && null !== root) { + JSCompiler_temp = void 0; + anchorOffset = firstChild; + focusNode = root.memoizedProps; + root = root.memoizedState; + selection = anchorOffset.stateNode; try { var resolvedPrevProps = resolveClassComponentProps( - i.type, - flags, - i.elementType === i.type + anchorOffset.type, + focusNode, + anchorOffset.elementType === anchorOffset.type ); - deletions = JSCompiler_temp.getSnapshotBeforeUpdate( + JSCompiler_temp = selection.getSnapshotBeforeUpdate( resolvedPrevProps, - deletion + root ); - JSCompiler_temp.__reactInternalSnapshotBeforeUpdate = deletions; + selection.__reactInternalSnapshotBeforeUpdate = JSCompiler_temp; } catch (error) { - captureCommitPhaseError(i, i.return, error); + captureCommitPhaseError( + anchorOffset, + anchorOffset.return, + error + ); } } break; case 3: - if (0 !== (flags & 1024)) - b: if ( - ((deletions = i.stateNode.containerInfo), - (i = deletions.nodeType), - 9 === i) + if (0 !== (JSCompiler_temp & 1024)) + if ( + ((root = firstChild.stateNode.containerInfo), + (JSCompiler_temp = root.nodeType), + 9 === JSCompiler_temp) ) - clearContainerSparingly(deletions); - else if (1 === i) - switch (deletions.nodeName) { + clearContainerSparingly(root); + else if (1 === JSCompiler_temp) + switch (root.nodeName) { case "HEAD": case "HTML": case "BODY": - clearContainerSparingly(deletions); - break b; + clearContainerSparingly(root); + break; default: - deletions.textContent = ""; + root.textContent = ""; } break; case 5: @@ -8637,17 +8727,19 @@ function commitBeforeMutationEffects_begin() { case 17: break; default: - if (0 !== (flags & 1024)) throw Error(formatProdErrorMessage(163)); + if (0 !== (JSCompiler_temp & 1024)) + throw Error(formatProdErrorMessage(163)); } - deletions = fiber.sibling; - if (null !== deletions) { - deletions.return = fiber.return; - nextEffect = deletions; - break a; + root = firstChild.sibling; + if (null !== root) { + root.return = firstChild.return; + nextEffect = root; + break; } - nextEffect = fiber.return; + nextEffect = firstChild.return; } } + focusedInstanceHandle = null; } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -11069,8 +11161,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { default: throw Error(formatProdErrorMessage(329)); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === renderWasConcurrent) && @@ -11083,7 +11173,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -11144,18 +11234,24 @@ function commitRootWhenReady( completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = -1; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( ((suspendedState = { stylesheets: null, count: 0, unsuspend: noop }), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -11173,16 +11269,14 @@ function commitRootWhenReady( } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -11275,8 +11369,6 @@ function resetWorkInProgressStack() { } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; -1 !== timeoutHandle && ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle)); @@ -11747,142 +11839,253 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) { } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = Internals.p; - try { - (Internals.p = 2), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (Internals.p = previousUpdateLanePriority); + root.cancelPendingCommit = null; + do flushPassiveEffects(); + while (null !== rootWithPendingPassiveEffects); + if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); + if (null !== finishedWork) { + if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = Internals.p; + Internals.p = 2; + updatedLanes = executionContext; + executionContext |= 4; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (Internals.p = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ); } } -function commitRootImpl( +function flushMutationEffects(root, finishedWork) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitMutationEffectsOnFiber(finishedWork, root); + if (shouldFireAfterActiveInstanceBlur) { + _enabled = !0; + var target = selectionInformation.focusedElem, + event = createEvent("afterblur", !1); + event.relatedTarget = target; + document.dispatchEvent(event); + _enabled = !1; + } + target = selectionInformation; + var curFocusedElem = getActiveElementDeep(root.containerInfo), + priorFocusedElem = target.focusedElem, + priorSelectionRange = target.selectionRange; + if ( + curFocusedElem !== priorFocusedElem && + priorFocusedElem && + priorFocusedElem.ownerDocument && + containsNode( + priorFocusedElem.ownerDocument.documentElement, + priorFocusedElem + ) + ) { + if ( + null !== priorSelectionRange && + hasSelectionCapabilities(priorFocusedElem) + ) { + var start = priorSelectionRange.start, + end = priorSelectionRange.end; + void 0 === end && (end = start); + if ("selectionStart" in priorFocusedElem) + (priorFocusedElem.selectionStart = start), + (priorFocusedElem.selectionEnd = Math.min( + end, + priorFocusedElem.value.length + )); + else { + var doc = priorFocusedElem.ownerDocument || document, + win = (doc && doc.defaultView) || window; + if (win.getSelection) { + var selection = win.getSelection(), + length = priorFocusedElem.textContent.length, + start$jscomp$0 = Math.min(priorSelectionRange.start, length), + end$jscomp$0 = + void 0 === priorSelectionRange.end + ? start$jscomp$0 + : Math.min(priorSelectionRange.end, length); + !selection.extend && + start$jscomp$0 > end$jscomp$0 && + ((curFocusedElem = end$jscomp$0), + (end$jscomp$0 = start$jscomp$0), + (start$jscomp$0 = curFocusedElem)); + var startMarker = getNodeForCharacterOffset( + priorFocusedElem, + start$jscomp$0 + ), + endMarker = getNodeForCharacterOffset( + priorFocusedElem, + end$jscomp$0 + ); + if ( + startMarker && + endMarker && + (1 !== selection.rangeCount || + selection.anchorNode !== startMarker.node || + selection.anchorOffset !== startMarker.offset || + selection.focusNode !== endMarker.node || + selection.focusOffset !== endMarker.offset) + ) { + var range = doc.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + start$jscomp$0 > end$jscomp$0 + ? (selection.addRange(range), + selection.extend(endMarker.node, endMarker.offset)) + : (range.setEnd(endMarker.node, endMarker.offset), + selection.addRange(range)); + } + } + } + } + doc = []; + for (selection = priorFocusedElem; (selection = selection.parentNode); ) + 1 === selection.nodeType && + doc.push({ + element: selection, + left: selection.scrollLeft, + top: selection.scrollTop + }); + "function" === typeof priorFocusedElem.focus && + priorFocusedElem.focus(); + for ( + priorFocusedElem = 0; + priorFocusedElem < doc.length; + priorFocusedElem++ + ) { + var info = doc[priorFocusedElem]; + info.element.scrollLeft = info.left; + info.element.scrollTop = info.top; + } + } + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; +} +function flushLayoutEffects( root, + finishedWork, + lanes, recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + didIncludeRenderPhaseUpdate ) { - do flushPassiveEffects(); - while (null !== rootWithPendingPassiveEffects); - if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; - if (null === finishedWork) return null; - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = Internals.p; + Internals.p = 2; + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + } finally { + (executionContext = prevExecutionContext), + (Internals.p = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = Internals.p), - (Internals.p = 2), - (suspendedRetryLanes = executionContext), - (executionContext |= 4), - (focusedInstanceHandle = prepareForCommit(root.containerInfo)), - (shouldFireAfterActiveInstanceBlur = !1), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - (focusedInstanceHandle = null), - commitMutationEffectsOnFiber(finishedWork, root), - shouldFireAfterActiveInstanceBlur && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = suspendedRetryLanes), - (Internals.p = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - spawnedLane - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : releaseRootPooledCache(root, remainingLanes); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - renderPriorityLevel(remainingLanes.value, { - componentStack: remainingLanes.stack + : releaseRootPooledCache(root, root.pendingLanes); + rootHasLayoutEffect = root.pendingLanes; + 0 === rootHasLayoutEffect && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot(finishedWork.stateNode, rootHasLayoutEffect); + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = Internals.p; + Internals.p = 2; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority]; + onRecoverableError(recoverableError.value, { + componentStack: recoverableError.stack }); + } + } finally { + (ReactSharedInternals.T = finishedWork), + (Internals.p = rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + rootHasLayoutEffect = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)) ? root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)) @@ -11905,7 +12108,6 @@ function commitRootImpl( : (currentEndTime = endTime); }); } - return null; } function releaseRootPooledCache(root, remainingLanes) { 0 === (root.pooledCacheLanes &= remainingLanes) && @@ -11915,7 +12117,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$197 = rootWithPendingPassiveEffects, + var root$198 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11930,7 +12132,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$197, remainingLanes); + releaseRootPooledCache(root$198, remainingLanes); } } return !1; @@ -12435,11 +12637,7 @@ function FiberRootNode( ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = -1; this.callbackNode = this.next = @@ -12452,7 +12650,6 @@ function FiberRootNode( this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -13156,14 +13353,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$357; if (canUseDOM) { - var isSupported$jscomp$inline_1579 = "oninput" in document; - if (!isSupported$jscomp$inline_1579) { - var element$jscomp$inline_1580 = document.createElement("div"); - element$jscomp$inline_1580.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1579 = - "function" === typeof element$jscomp$inline_1580.oninput; + var isSupported$jscomp$inline_1587 = "oninput" in document; + if (!isSupported$jscomp$inline_1587) { + var element$jscomp$inline_1588 = document.createElement("div"); + element$jscomp$inline_1588.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1587 = + "function" === typeof element$jscomp$inline_1588.oninput; } - JSCompiler_inline_result$jscomp$357 = isSupported$jscomp$inline_1579; + JSCompiler_inline_result$jscomp$357 = isSupported$jscomp$inline_1587; } else JSCompiler_inline_result$jscomp$357 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$357 && @@ -13292,97 +13489,6 @@ function hasSelectionCapabilities(elem) { "true" === elem.contentEditable) ); } -function restoreSelection(priorSelectionInformation, containerInfo) { - var curFocusedElem = getActiveElementDeep(containerInfo); - containerInfo = priorSelectionInformation.focusedElem; - var priorSelectionRange = priorSelectionInformation.selectionRange; - if ( - curFocusedElem !== containerInfo && - containerInfo && - containerInfo.ownerDocument && - containsNode(containerInfo.ownerDocument.documentElement, containerInfo) - ) { - if (null !== priorSelectionRange && hasSelectionCapabilities(containerInfo)) - if ( - ((priorSelectionInformation = priorSelectionRange.start), - (curFocusedElem = priorSelectionRange.end), - void 0 === curFocusedElem && - (curFocusedElem = priorSelectionInformation), - "selectionStart" in containerInfo) - ) - (containerInfo.selectionStart = priorSelectionInformation), - (containerInfo.selectionEnd = Math.min( - curFocusedElem, - containerInfo.value.length - )); - else if ( - ((curFocusedElem = - ((priorSelectionInformation = - containerInfo.ownerDocument || document) && - priorSelectionInformation.defaultView) || - window), - curFocusedElem.getSelection) - ) { - curFocusedElem = curFocusedElem.getSelection(); - var length = containerInfo.textContent.length, - start = Math.min(priorSelectionRange.start, length); - priorSelectionRange = - void 0 === priorSelectionRange.end - ? start - : Math.min(priorSelectionRange.end, length); - !curFocusedElem.extend && - start > priorSelectionRange && - ((length = priorSelectionRange), - (priorSelectionRange = start), - (start = length)); - length = getNodeForCharacterOffset(containerInfo, start); - var endMarker = getNodeForCharacterOffset( - containerInfo, - priorSelectionRange - ); - length && - endMarker && - (1 !== curFocusedElem.rangeCount || - curFocusedElem.anchorNode !== length.node || - curFocusedElem.anchorOffset !== length.offset || - curFocusedElem.focusNode !== endMarker.node || - curFocusedElem.focusOffset !== endMarker.offset) && - ((priorSelectionInformation = - priorSelectionInformation.createRange()), - priorSelectionInformation.setStart(length.node, length.offset), - curFocusedElem.removeAllRanges(), - start > priorSelectionRange - ? (curFocusedElem.addRange(priorSelectionInformation), - curFocusedElem.extend(endMarker.node, endMarker.offset)) - : (priorSelectionInformation.setEnd( - endMarker.node, - endMarker.offset - ), - curFocusedElem.addRange(priorSelectionInformation))); - } - priorSelectionInformation = []; - for ( - curFocusedElem = containerInfo; - (curFocusedElem = curFocusedElem.parentNode); - - ) - 1 === curFocusedElem.nodeType && - priorSelectionInformation.push({ - element: curFocusedElem, - left: curFocusedElem.scrollLeft, - top: curFocusedElem.scrollTop - }); - "function" === typeof containerInfo.focus && containerInfo.focus(); - for ( - containerInfo = 0; - containerInfo < priorSelectionInformation.length; - containerInfo++ - ) - (curFocusedElem = priorSelectionInformation[containerInfo]), - (curFocusedElem.element.scrollLeft = curFocusedElem.left), - (curFocusedElem.element.scrollTop = curFocusedElem.top); - } -} var skipSelectionChangeEvent = canUseDOM && "documentMode" in document && 11 >= document.documentMode, activeElement = null, @@ -13577,20 +13683,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1620 = 0; - i$jscomp$inline_1620 < simpleEventPluginEvents.length; - i$jscomp$inline_1620++ + var i$jscomp$inline_1628 = 0; + i$jscomp$inline_1628 < simpleEventPluginEvents.length; + i$jscomp$inline_1628++ ) { - var eventName$jscomp$inline_1621 = - simpleEventPluginEvents[i$jscomp$inline_1620], - domEventName$jscomp$inline_1622 = - eventName$jscomp$inline_1621.toLowerCase(), - capitalizedEvent$jscomp$inline_1623 = - eventName$jscomp$inline_1621[0].toUpperCase() + - eventName$jscomp$inline_1621.slice(1); + var eventName$jscomp$inline_1629 = + simpleEventPluginEvents[i$jscomp$inline_1628], + domEventName$jscomp$inline_1630 = + eventName$jscomp$inline_1629.toLowerCase(), + capitalizedEvent$jscomp$inline_1631 = + eventName$jscomp$inline_1629[0].toUpperCase() + + eventName$jscomp$inline_1629.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1622, - "on" + capitalizedEvent$jscomp$inline_1623 + domEventName$jscomp$inline_1630, + "on" + capitalizedEvent$jscomp$inline_1631 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14879,34 +14985,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$216 = props[hasSrc]; - if (null != propValue$216) + var propValue$217 = props[hasSrc]; + if (null != propValue$217) switch (hasSrc) { case "name": - hasSrcSet = propValue$216; + hasSrcSet = propValue$217; break; case "type": - propKey = propValue$216; + propKey = propValue$217; break; case "checked": - checked = propValue$216; + checked = propValue$217; break; case "defaultChecked": - defaultChecked = propValue$216; + defaultChecked = propValue$217; break; case "value": - propValue = propValue$216; + propValue = propValue$217; break; case "defaultValue": - defaultValue = propValue$216; + defaultValue = propValue$217; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$216) + if (null != propValue$217) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$216, props, null); + setProp(domElement, tag, hasSrc, propValue$217, props, null); } } initInput( @@ -15042,14 +15148,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$216 in props) - props.hasOwnProperty(propValue$216) && - ((hasSrc = props[propValue$216]), + for (propValue$217 in props) + props.hasOwnProperty(propValue$217) && + ((hasSrc = props[propValue$217]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$216, + propValue$217, hasSrc, props, void 0 @@ -15097,14 +15203,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$233 in nextProps) { - var propKey = nextProps[propKey$233]; - lastProp = lastProps[propKey$233]; + for (var propKey$234 in nextProps) { + var propKey = nextProps[propKey$234]; + lastProp = lastProps[propKey$234]; if ( - nextProps.hasOwnProperty(propKey$233) && + nextProps.hasOwnProperty(propKey$234) && (null != propKey || null != lastProp) ) - switch (propKey$233) { + switch (propKey$234) { case "type": type = propKey; break; @@ -15133,7 +15239,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$233, + propKey$234, propKey, nextProps, lastProp @@ -15152,7 +15258,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$233 = null; + propKey = value = defaultValue = propKey$234 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15183,7 +15289,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$233 = type; + propKey$234 = type; break; case "defaultValue": defaultValue = type; @@ -15204,15 +15310,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$233 - ? updateOptions(domElement, !!lastProps, propKey$233, !1) + null != propKey$234 + ? updateOptions(domElement, !!lastProps, propKey$234, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$233 = null; + propKey = propKey$234 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15236,7 +15342,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$233 = name; + propKey$234 = name; break; case "defaultValue": propKey = name; @@ -15250,17 +15356,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$233, propKey); + updateTextarea(domElement, propKey$234, propKey); return; case "option": - for (var propKey$249 in lastProps) + for (var propKey$250 in lastProps) if ( - ((propKey$233 = lastProps[propKey$249]), - lastProps.hasOwnProperty(propKey$249) && - null != propKey$233 && - !nextProps.hasOwnProperty(propKey$249)) + ((propKey$234 = lastProps[propKey$250]), + lastProps.hasOwnProperty(propKey$250) && + null != propKey$234 && + !nextProps.hasOwnProperty(propKey$250)) ) - switch (propKey$249) { + switch (propKey$250) { case "selected": domElement.selected = !1; break; @@ -15268,33 +15374,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$249, + propKey$250, null, nextProps, - propKey$233 + propKey$234 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$233 = nextProps[lastDefaultValue]), + ((propKey$234 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$233 !== propKey && - (null != propKey$233 || null != propKey)) + propKey$234 !== propKey && + (null != propKey$234 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$233 && - "function" !== typeof propKey$233 && - "symbol" !== typeof propKey$233; + propKey$234 && + "function" !== typeof propKey$234 && + "symbol" !== typeof propKey$234; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$233, + propKey$234, nextProps, propKey ); @@ -15315,24 +15421,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$254 in lastProps) - (propKey$233 = lastProps[propKey$254]), - lastProps.hasOwnProperty(propKey$254) && - null != propKey$233 && - !nextProps.hasOwnProperty(propKey$254) && - setProp(domElement, tag, propKey$254, null, nextProps, propKey$233); + for (var propKey$255 in lastProps) + (propKey$234 = lastProps[propKey$255]), + lastProps.hasOwnProperty(propKey$255) && + null != propKey$234 && + !nextProps.hasOwnProperty(propKey$255) && + setProp(domElement, tag, propKey$255, null, nextProps, propKey$234); for (checked in nextProps) if ( - ((propKey$233 = nextProps[checked]), + ((propKey$234 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$233 !== propKey && - (null != propKey$233 || null != propKey)) + propKey$234 !== propKey && + (null != propKey$234 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$233) + if (null != propKey$234) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15340,7 +15446,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$233, + propKey$234, nextProps, propKey ); @@ -15348,49 +15454,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$259 in lastProps) - (propKey$233 = lastProps[propKey$259]), - lastProps.hasOwnProperty(propKey$259) && - void 0 !== propKey$233 && - !nextProps.hasOwnProperty(propKey$259) && + for (var propKey$260 in lastProps) + (propKey$234 = lastProps[propKey$260]), + lastProps.hasOwnProperty(propKey$260) && + void 0 !== propKey$234 && + !nextProps.hasOwnProperty(propKey$260) && setPropOnCustomElement( domElement, tag, - propKey$259, + propKey$260, void 0, nextProps, - propKey$233 + propKey$234 ); for (defaultChecked in nextProps) - (propKey$233 = nextProps[defaultChecked]), + (propKey$234 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$233 === propKey || - (void 0 === propKey$233 && void 0 === propKey) || + propKey$234 === propKey || + (void 0 === propKey$234 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$233, + propKey$234, nextProps, propKey ); return; } } - for (var propKey$264 in lastProps) - (propKey$233 = lastProps[propKey$264]), - lastProps.hasOwnProperty(propKey$264) && - null != propKey$233 && - !nextProps.hasOwnProperty(propKey$264) && - setProp(domElement, tag, propKey$264, null, nextProps, propKey$233); + for (var propKey$265 in lastProps) + (propKey$234 = lastProps[propKey$265]), + lastProps.hasOwnProperty(propKey$265) && + null != propKey$234 && + !nextProps.hasOwnProperty(propKey$265) && + setProp(domElement, tag, propKey$265, null, nextProps, propKey$234); for (lastProp in nextProps) - (propKey$233 = nextProps[lastProp]), + (propKey$234 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$233 === propKey || - (null == propKey$233 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$233, nextProps, propKey); + propKey$234 === propKey || + (null == propKey$234 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$234, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15423,85 +15529,6 @@ function getChildHostContextProd(parentNamespace, type) { ? 0 : parentNamespace; } -function prepareForCommit(containerInfo) { - eventsEnabled = _enabled; - containerInfo = getActiveElementDeep(containerInfo); - if (hasSelectionCapabilities(containerInfo)) { - if ("selectionStart" in containerInfo) - var JSCompiler_temp = { - start: containerInfo.selectionStart, - end: containerInfo.selectionEnd - }; - else - a: { - JSCompiler_temp = - ((JSCompiler_temp = containerInfo.ownerDocument) && - JSCompiler_temp.defaultView) || - window; - var selection = - JSCompiler_temp.getSelection && JSCompiler_temp.getSelection(); - if (selection && 0 !== selection.rangeCount) { - JSCompiler_temp = selection.anchorNode; - var anchorOffset = selection.anchorOffset, - focusNode = selection.focusNode; - selection = selection.focusOffset; - try { - JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$202) { - JSCompiler_temp = null; - break a; - } - var length = 0, - start = -1, - end = -1, - indexWithinAnchor = 0, - indexWithinFocus = 0, - node = containerInfo, - parentNode = null; - b: for (;;) { - for (var next; ; ) { - node !== JSCompiler_temp || - (0 !== anchorOffset && 3 !== node.nodeType) || - (start = length + anchorOffset); - node !== focusNode || - (0 !== selection && 3 !== node.nodeType) || - (end = length + selection); - 3 === node.nodeType && (length += node.nodeValue.length); - if (null === (next = node.firstChild)) break; - parentNode = node; - node = next; - } - for (;;) { - if (node === containerInfo) break b; - parentNode === JSCompiler_temp && - ++indexWithinAnchor === anchorOffset && - (start = length); - parentNode === focusNode && - ++indexWithinFocus === selection && - (end = length); - if (null !== (next = node.nextSibling)) break; - node = parentNode; - parentNode = node.parentNode; - } - node = next; - } - JSCompiler_temp = - -1 === start || -1 === end ? null : { start: start, end: end }; - } else JSCompiler_temp = null; - } - JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 }; - } else JSCompiler_temp = null; - selectionInformation = { - focusedElem: containerInfo, - selectionRange: JSCompiler_temp - }; - containerInfo = null; - JSCompiler_temp = selectionInformation.focusedElem; - null !== JSCompiler_temp && - (containerInfo = getClosestInstanceFromNode(JSCompiler_temp)); - _enabled = !1; - return containerInfo; -} function beforeActiveInstanceBlur(internalInstanceHandle) { _enabled = !0; var target = selectionInformation.focusedElem, @@ -15565,11 +15592,6 @@ function createEvent(type, bubbles) { event.initEvent(type, bubbles, !1); return event; } -function dispatchAfterDetachedBlur(target) { - var event = createEvent("afterblur", !1); - event.relatedTarget = target; - document.dispatchEvent(event); -} function clearSuspenseBoundary(parentInstance, suspenseInstance) { var node = suspenseInstance, depth = 0; @@ -16123,26 +16145,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$272 = getResourcesFromRoot( + var styles$273 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$273 = styles$272.get(type); - resource$273 || + resource$274 = styles$273.get(type); + resource$274 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$273 = { + (resource$274 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$272.set(type, resource$273), - (styles$272 = JSCompiler_inline_result.querySelector( + styles$273.set(type, resource$274), + (styles$273 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$272._p && - ((resource$273.instance = styles$272), - (resource$273.state.loading = 5)), + !styles$273._p && + ((resource$274.instance = styles$273), + (resource$274.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16155,16 +16177,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$272 || + styles$273 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$273.state + resource$274.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$273; + return resource$274; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16261,37 +16283,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$278 = hoistableRoot.querySelector( + var instance$279 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$278) + if (instance$279) return ( (resource.state.loading |= 4), - (resource.instance = instance$278), - markNodeAsHoistable(instance$278), - instance$278 + (resource.instance = instance$279), + markNodeAsHoistable(instance$279), + instance$279 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$278 = ( + instance$279 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$278); - var linkInstance = instance$278; + markNodeAsHoistable(instance$279); + var linkInstance = instance$279; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$278, "link", instance); + setInitialProperties(instance$279, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$278, props.precedence, hoistableRoot); - return (resource.instance = instance$278); + insertStylesheet(instance$279, props.precedence, hoistableRoot); + return (resource.instance = instance$279); case "script": - instance$278 = getScriptKey(props.src); + instance$279 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$278) + getScriptSelectorFromKey(instance$279) )) ) return ( @@ -16300,7 +16322,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$278))) + if ((styleProps = preloadPropsMap.get(instance$279))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17304,16 +17326,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1796 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1801 = React.version; if ( - "19.1.0-www-modern-d8b903f4-20250102" !== - isomorphicReactPackageVersion$jscomp$inline_1796 + "19.1.0-www-modern-c81312e3-20250102" !== + isomorphicReactPackageVersion$jscomp$inline_1801 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1796, - "19.1.0-www-modern-d8b903f4-20250102" + isomorphicReactPackageVersion$jscomp$inline_1801, + "19.1.0-www-modern-c81312e3-20250102" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17329,24 +17351,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2334 = { +var internals$jscomp$inline_2333 = { bundleType: 0, - version: "19.1.0-www-modern-d8b903f4-20250102", + version: "19.1.0-www-modern-c81312e3-20250102", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-modern-c81312e3-20250102" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2335 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2334 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2335.isDisabled && - hook$jscomp$inline_2335.supportsFiber + !hook$jscomp$inline_2334.isDisabled && + hook$jscomp$inline_2334.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2335.inject( - internals$jscomp$inline_2334 + (rendererID = hook$jscomp$inline_2334.inject( + internals$jscomp$inline_2333 )), - (injectedHook = hook$jscomp$inline_2335); + (injectedHook = hook$jscomp$inline_2334); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17850,4 +17872,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-modern-d8b903f4-20250102"; +exports.version = "19.1.0-www-modern-c81312e3-20250102"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index f3031d4199376..f0ec9d52b9315 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -998,14 +998,13 @@ __DEV__ && ); } } - function getNextLanes(root, wipLanes) { + function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -1015,29 +1014,30 @@ __DEV__ && 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -2501,7 +2501,9 @@ __DEV__ && (nextLanes = workInProgressRootRenderLanes), (nextLanes = getNextLanes( root, - root === workInProgressRoot ? nextLanes : 0 + root === workInProgressRoot ? nextLanes : 0, + null !== root.cancelPendingCommit || + root.timeoutHandle !== noTimeout )), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root, nextLanes) || @@ -2570,7 +2572,8 @@ __DEV__ && suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); pingedLanes = root.callbackNode; if ( @@ -2635,7 +2638,10 @@ __DEV__ && workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot + ? workInProgressRootRenderLanes$jscomp$0 + : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -12091,12 +12097,6 @@ __DEV__ && } }); } - function commitMutationEffects(root, finishedWork, committedLanes) { - inProgressLanes = committedLanes; - inProgressRoot = root; - commitMutationEffectsOnFiber(finishedWork, root); - inProgressRoot = inProgressLanes = null; - } function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) { var deletions = parentFiber.deletions; if (null !== deletions) @@ -14004,21 +14004,17 @@ __DEV__ && default: throw Error("Unknown root exit status."); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if (null !== ReactSharedInternals.actQueue) commitRoot( shouldTimeSlice, + forceSync, + lanes, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane, workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - exitStatus, - IMMEDIATE_COMMIT, - -0, - 0 + workInProgressSuspendedRetryLanes ); else { if ( @@ -14036,7 +14032,7 @@ __DEV__ && workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -14098,18 +14094,24 @@ __DEV__ && completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = noTimeout; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( (startSuspendingCommit(), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -14132,16 +14134,14 @@ __DEV__ && } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -14237,8 +14237,6 @@ __DEV__ && } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; timeoutHandle !== noTimeout && ((root.timeoutHandle = noTimeout), cancelTimeout(timeoutHandle)); @@ -14880,171 +14878,197 @@ __DEV__ && } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = getCurrentUpdatePriority(); - try { - setCurrentUpdatePriority(2), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - setCurrentUpdatePriority(previousUpdateLanePriority); - } - } - function commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); ReactStrictModeWarnings.flushLegacyContextWarning(); ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markCommitStarted && injectedProfilingHooks.markCommitStarted(lanes); if (null === finishedWork) - return enableSchedulingProfiler && markCommitStopped(), null; - 0 === lanes && - error$jscomp$0( - "root.finishedLanes should not be empty during a commit. This is a bug in React." + enableSchedulingProfiler && markCommitStopped(); + else { + 0 === lanes && + error$jscomp$0( + "finishedLanes should not be empty during a commit. This is a bug in React." + ); + if (finishedWork === root.current) + throw Error( + "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + ); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes ); - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) - throw Error( - "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + commitStartTime = now(); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + updatedLanes = executionContext; + executionContext |= CommitContext; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + setCurrentUpdatePriority(spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate ); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; - 0 !== (finishedWork.subtreeFlags & 10256) || - 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = getCurrentUpdatePriority()), - setCurrentUpdatePriority(2), - (suspendedRetryLanes = executionContext), - (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffects(root, finishedWork, lanes), - shouldFireAfterActiveInstanceBlur && afterActiveInstanceBlur(), - resetAfterCommit(root.containerInfo), - (root.current = finishedWork), + } + } + function flushMutationEffects(root, finishedWork, lanes) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { + (inProgressLanes = lanes), + (inProgressRoot = root), + commitMutationEffectsOnFiber(finishedWork, root), + (inProgressRoot = inProgressLanes = null), + shouldFireAfterActiveInstanceBlur && afterActiveInstanceBlur(), + resetAfterCommit(root.containerInfo); + } finally { + (executionContext = prevExecutionContext), + setCurrentUpdatePriority(previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; + } + function flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), - enableSchedulingProfiler && + commitLayoutEffects(finishedWork, root, lanes), enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = suspendedRetryLanes), - setCurrentUpdatePriority(updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = spawnedLane) - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + } finally { + (executionContext = prevExecutionContext), + setCurrentUpdatePriority(previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); + (rootHasLayoutEffect = + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256)) + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : (releaseRootPooledCache(root, remainingLanes), + : (releaseRootPooledCache(root, root.pendingLanes), (nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); + previousPriority = root.pendingLanes; + 0 === previousPriority && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot$1(finishedWork.stateNode, rootHasLayoutEffect); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - (spawnedLane = makeErrorInfo(remainingLanes.stack)), + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority], + errorInfo = makeErrorInfo(recoverableError.stack); runWithFiberInDEV( - remainingLanes.source, - renderPriorityLevel, - remainingLanes.value, - spawnedLane + recoverableError.source, + onRecoverableError, + recoverableError.value, + errorInfo ); + } + } finally { + (ReactSharedInternals.T = finishedWork), + setCurrentUpdatePriority(rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + previousPriority = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (previousPriority & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ @@ -15070,7 +15094,6 @@ __DEV__ && : (currentEndTime = endTime); }); } - return null; } function makeErrorInfo(componentStack) { componentStack = { componentStack: componentStack }; @@ -16031,11 +16054,7 @@ __DEV__ && ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = noTimeout; this.callbackNode = this.next = @@ -16048,7 +16067,6 @@ __DEV__ && this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -19059,7 +19077,7 @@ __DEV__ && version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-classic-c81312e3-20250102" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index bdb8467cd26d1..357e0af330f5f 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -904,14 +904,13 @@ __DEV__ && ); } } - function getNextLanes(root, wipLanes) { + function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -921,29 +920,30 @@ __DEV__ && 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -2407,7 +2407,9 @@ __DEV__ && (nextLanes = workInProgressRootRenderLanes), (nextLanes = getNextLanes( root, - root === workInProgressRoot ? nextLanes : 0 + root === workInProgressRoot ? nextLanes : 0, + null !== root.cancelPendingCommit || + root.timeoutHandle !== noTimeout )), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root, nextLanes) || @@ -2476,7 +2478,8 @@ __DEV__ && suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); pingedLanes = root.callbackNode; if ( @@ -2541,7 +2544,10 @@ __DEV__ && workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot + ? workInProgressRootRenderLanes$jscomp$0 + : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -11909,12 +11915,6 @@ __DEV__ && } }); } - function commitMutationEffects(root, finishedWork, committedLanes) { - inProgressLanes = committedLanes; - inProgressRoot = root; - commitMutationEffectsOnFiber(finishedWork, root); - inProgressRoot = inProgressLanes = null; - } function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) { var deletions = parentFiber.deletions; if (null !== deletions) @@ -13822,21 +13822,17 @@ __DEV__ && default: throw Error("Unknown root exit status."); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if (null !== ReactSharedInternals.actQueue) commitRoot( shouldTimeSlice, + forceSync, + lanes, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane, workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - exitStatus, - IMMEDIATE_COMMIT, - -0, - 0 + workInProgressSuspendedRetryLanes ); else { if ( @@ -13854,7 +13850,7 @@ __DEV__ && workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -13916,18 +13912,24 @@ __DEV__ && completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = noTimeout; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( (startSuspendingCommit(), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -13950,16 +13952,14 @@ __DEV__ && } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -14055,8 +14055,6 @@ __DEV__ && } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; timeoutHandle !== noTimeout && ((root.timeoutHandle = noTimeout), cancelTimeout(timeoutHandle)); @@ -14694,171 +14692,197 @@ __DEV__ && } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = getCurrentUpdatePriority(); - try { - setCurrentUpdatePriority(2), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - setCurrentUpdatePriority(previousUpdateLanePriority); - } - } - function commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); ReactStrictModeWarnings.flushLegacyContextWarning(); ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markCommitStarted && injectedProfilingHooks.markCommitStarted(lanes); if (null === finishedWork) - return enableSchedulingProfiler && markCommitStopped(), null; - 0 === lanes && - error$jscomp$0( - "root.finishedLanes should not be empty during a commit. This is a bug in React." + enableSchedulingProfiler && markCommitStopped(); + else { + 0 === lanes && + error$jscomp$0( + "finishedLanes should not be empty during a commit. This is a bug in React." + ); + if (finishedWork === root.current) + throw Error( + "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + ); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes ); - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) - throw Error( - "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + commitStartTime = now(); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + updatedLanes = executionContext; + executionContext |= CommitContext; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + setCurrentUpdatePriority(spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate ); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; - 0 !== (finishedWork.subtreeFlags & 10256) || - 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = getCurrentUpdatePriority()), - setCurrentUpdatePriority(2), - (suspendedRetryLanes = executionContext), - (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffects(root, finishedWork, lanes), - shouldFireAfterActiveInstanceBlur && afterActiveInstanceBlur(), - resetAfterCommit(root.containerInfo), - (root.current = finishedWork), + } + } + function flushMutationEffects(root, finishedWork, lanes) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { + (inProgressLanes = lanes), + (inProgressRoot = root), + commitMutationEffectsOnFiber(finishedWork, root), + (inProgressRoot = inProgressLanes = null), + shouldFireAfterActiveInstanceBlur && afterActiveInstanceBlur(), + resetAfterCommit(root.containerInfo); + } finally { + (executionContext = prevExecutionContext), + setCurrentUpdatePriority(previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; + } + function flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { enableSchedulingProfiler && enableSchedulingProfiler && null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), - enableSchedulingProfiler && + commitLayoutEffects(finishedWork, root, lanes), enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = suspendedRetryLanes), - setCurrentUpdatePriority(updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = spawnedLane) - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + } finally { + (executionContext = prevExecutionContext), + setCurrentUpdatePriority(previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); + (rootHasLayoutEffect = + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256)) + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : (releaseRootPooledCache(root, remainingLanes), + : (releaseRootPooledCache(root, root.pendingLanes), (nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); + previousPriority = root.pendingLanes; + 0 === previousPriority && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot$1(finishedWork.stateNode, rootHasLayoutEffect); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - (spawnedLane = makeErrorInfo(remainingLanes.stack)), + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority], + errorInfo = makeErrorInfo(recoverableError.stack); runWithFiberInDEV( - remainingLanes.source, - renderPriorityLevel, - remainingLanes.value, - spawnedLane + recoverableError.source, + onRecoverableError, + recoverableError.value, + errorInfo ); + } + } finally { + (ReactSharedInternals.T = finishedWork), + setCurrentUpdatePriority(rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + previousPriority = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (previousPriority & 42)) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ @@ -14884,7 +14908,6 @@ __DEV__ && : (currentEndTime = endTime); }); } - return null; } function makeErrorInfo(componentStack) { componentStack = { componentStack: componentStack }; @@ -15845,11 +15868,7 @@ __DEV__ && ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = noTimeout; this.callbackNode = this.next = @@ -15862,7 +15881,6 @@ __DEV__ && this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -18833,7 +18851,7 @@ __DEV__ && version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-modern-c81312e3-20250102" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index f078560bc145c..3a91a23aefaa9 100644 --- a/compiled/facebook-www/ReactReconciler-prod.classic.js +++ b/compiled/facebook-www/ReactReconciler-prod.classic.js @@ -615,14 +615,13 @@ module.exports = function ($$$config) { return lanes; } } - function getNextLanes(root, wipLanes) { + function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -632,29 +631,29 @@ module.exports = function ($$$config) { 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -1311,7 +1310,9 @@ module.exports = function ($$$config) { (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( root, - root === workInProgressRoot ? JSCompiler_inline_result : 0 + root === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root.cancelPendingCommit || + root.timeoutHandle !== noTimeout )), 0 === (JSCompiler_inline_result & 3) || checkIfRootIsPrerendering(root, JSCompiler_inline_result) || @@ -1377,7 +1378,8 @@ module.exports = function ($$$config) { suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); pingedLanes = root.callbackNode; if ( @@ -1436,7 +1438,8 @@ module.exports = function ($$$config) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -7655,94 +7658,93 @@ module.exports = function ($$$config) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } - function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - deletions = fiber.deletions; - if (null !== deletions) - for (var i = 0; i < deletions.length; i++) { - var deletion = deletions[i]; + function commitBeforeMutationEffects(root, firstChild) { + focusedInstanceHandle = prepareForCommit(root.containerInfo); + shouldFireAfterActiveInstanceBlur = !1; + for (nextEffect = firstChild; null !== nextEffect; ) { + root = nextEffect; + firstChild = root.deletions; + if (null !== firstChild) + for (var i = 0; i < firstChild.length; i++) { + var deletion = firstChild[i]; doesFiberContain(deletion, focusedInstanceHandle) && ((shouldFireAfterActiveInstanceBlur = !0), beforeActiveInstanceBlur(deletion)); } - deletions = fiber.child; - if (0 !== (fiber.subtreeFlags & 9236) && null !== deletions) - (deletions.return = fiber), (nextEffect = deletions); + firstChild = root.child; + if (0 !== (root.subtreeFlags & 9236) && null !== firstChild) + (firstChild.return = root), (nextEffect = firstChild); else - a: for (; null !== nextEffect; ) { - fiber = nextEffect; - deletions = void 0; - var JSCompiler_temp; - i = fiber; - deletion = i.alternate; - var flags = i.flags; + for (; null !== nextEffect; ) { + root = nextEffect; + firstChild = root.alternate; + i = root.flags; if ( - !shouldFireAfterActiveInstanceBlur && - null !== focusedInstanceHandle + (deletion = + !shouldFireAfterActiveInstanceBlur && + null !== focusedInstanceHandle) ) { - if ((JSCompiler_temp = 13 === i.tag)) - b: { + if ((deletion = 13 === root.tag)) + a: { if ( - null !== deletion && - ((JSCompiler_temp = deletion.memoizedState), - null === JSCompiler_temp || - null !== JSCompiler_temp.dehydrated) + null !== firstChild && + ((deletion = firstChild.memoizedState), + null === deletion || null !== deletion.dehydrated) ) { - JSCompiler_temp = i.memoizedState; - JSCompiler_temp = - null !== JSCompiler_temp && - null === JSCompiler_temp.dehydrated; - break b; + deletion = root.memoizedState; + deletion = null !== deletion && null === deletion.dehydrated; + break a; } - JSCompiler_temp = !1; + deletion = !1; } - JSCompiler_temp && - doesFiberContain(i, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(i)); + deletion = + deletion && doesFiberContain(root, focusedInstanceHandle); } - switch (i.tag) { + deletion && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(root)); + switch (root.tag) { case 0: if ( - 0 !== (flags & 4) && - ((deletions = i.updateQueue), - (deletions = null !== deletions ? deletions.events : null), - null !== deletions) + 0 !== (i & 4) && + ((firstChild = root.updateQueue), + (firstChild = null !== firstChild ? firstChild.events : null), + null !== firstChild) ) - for (i = 0; i < deletions.length; i++) - (deletion = deletions[i]), + for (i = 0; i < firstChild.length; i++) + (deletion = firstChild[i]), (deletion.ref.impl = deletion.nextImpl); break; case 11: case 15: break; case 1: - if (0 !== (flags & 1024) && null !== deletion) { - flags = deletion.memoizedProps; - deletion = deletion.memoizedState; - JSCompiler_temp = i.stateNode; + if (0 !== (i & 1024) && null !== firstChild) { + i = void 0; + deletion = root; + var prevProps = firstChild.memoizedProps; + firstChild = firstChild.memoizedState; + var instance = deletion.stateNode; try { var resolvedPrevProps = resolveClassComponentProps( - i.type, - flags, - i.elementType === i.type + deletion.type, + prevProps, + deletion.elementType === deletion.type ); - deletions = JSCompiler_temp.getSnapshotBeforeUpdate( + i = instance.getSnapshotBeforeUpdate( resolvedPrevProps, - deletion + firstChild ); - JSCompiler_temp.__reactInternalSnapshotBeforeUpdate = - deletions; + instance.__reactInternalSnapshotBeforeUpdate = i; } catch (error) { - captureCommitPhaseError(i, i.return, error); + captureCommitPhaseError(deletion, deletion.return, error); } } break; case 3: - 0 !== (flags & 1024) && + 0 !== (i & 1024) && supportsMutation && - clearContainer(i.stateNode.containerInfo); + clearContainer(root.stateNode.containerInfo); break; case 5: case 26: @@ -7752,18 +7754,18 @@ module.exports = function ($$$config) { case 17: break; default: - if (0 !== (flags & 1024)) - throw Error(formatProdErrorMessage(163)); + if (0 !== (i & 1024)) throw Error(formatProdErrorMessage(163)); } - deletions = fiber.sibling; - if (null !== deletions) { - deletions.return = fiber.return; - nextEffect = deletions; - break a; + firstChild = root.sibling; + if (null !== firstChild) { + firstChild.return = root.return; + nextEffect = firstChild; + break; } - nextEffect = fiber.return; + nextEffect = root.return; } } + focusedInstanceHandle = null; } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -10075,8 +10077,6 @@ module.exports = function ($$$config) { default: throw Error(formatProdErrorMessage(329)); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === renderWasConcurrent) && @@ -10089,7 +10089,7 @@ module.exports = function ($$$config) { workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -10150,18 +10150,24 @@ module.exports = function ($$$config) { completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = noTimeout; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( (startSuspendingCommit(), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -10179,16 +10185,14 @@ module.exports = function ($$$config) { } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -10281,8 +10285,6 @@ module.exports = function ($$$config) { } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; timeoutHandle !== noTimeout && ((root.timeoutHandle = noTimeout), cancelTimeout(timeoutHandle)); @@ -10775,137 +10777,156 @@ module.exports = function ($$$config) { } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = getCurrentUpdatePriority(); - try { - setCurrentUpdatePriority(2), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - setCurrentUpdatePriority(previousUpdateLanePriority); + root.cancelPendingCommit = null; + do flushPassiveEffects(); + while (null !== rootWithPendingPassiveEffects); + if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); + if (null !== finishedWork) { + if (finishedWork === root.current) + throw Error(formatProdErrorMessage(177)); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + updatedLanes = executionContext; + executionContext |= 4; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + setCurrentUpdatePriority(spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ); + } + } + function flushMutationEffects(root, finishedWork) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitMutationEffectsOnFiber(finishedWork, root), + shouldFireAfterActiveInstanceBlur && afterActiveInstanceBlur(), + resetAfterCommit(root.containerInfo); + } finally { + (executionContext = prevExecutionContext), + setCurrentUpdatePriority(previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } } + root.current = finishedWork; } - function commitRootImpl( + function flushLayoutEffects( root, + finishedWork, + lanes, recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + didIncludeRenderPhaseUpdate ) { - do flushPassiveEffects(); - while (null !== rootWithPendingPassiveEffects); - if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; - if (null === finishedWork) return null; - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + } finally { + (executionContext = prevExecutionContext), + setCurrentUpdatePriority(previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = getCurrentUpdatePriority()), - setCurrentUpdatePriority(2), - (suspendedRetryLanes = executionContext), - (executionContext |= 4), - (focusedInstanceHandle = prepareForCommit(root.containerInfo)), - (shouldFireAfterActiveInstanceBlur = !1), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - (focusedInstanceHandle = null), - commitMutationEffectsOnFiber(finishedWork, root), - shouldFireAfterActiveInstanceBlur && afterActiveInstanceBlur(), - resetAfterCommit(root.containerInfo), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = suspendedRetryLanes), - setCurrentUpdatePriority(updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - spawnedLane - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : releaseRootPooledCache(root, remainingLanes); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - renderPriorityLevel(remainingLanes.value, { - componentStack: remainingLanes.stack + : releaseRootPooledCache(root, root.pendingLanes); + rootHasLayoutEffect = root.pendingLanes; + 0 === rootHasLayoutEffect && + (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot(finishedWork.stateNode, rootHasLayoutEffect); + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority]; + onRecoverableError(recoverableError.value, { + componentStack: recoverableError.stack }); + } + } finally { + (ReactSharedInternals.T = finishedWork), + setCurrentUpdatePriority(rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + rootHasLayoutEffect = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)) ? root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)) @@ -10929,7 +10950,6 @@ module.exports = function ($$$config) { : (currentEndTime = endTime); }); } - return null; } function releaseRootPooledCache(root, remainingLanes) { 0 === (root.pooledCacheLanes &= remainingLanes) && @@ -11483,11 +11503,7 @@ module.exports = function ($$$config) { ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = noTimeout; this.callbackNode = this.next = @@ -11500,7 +11516,6 @@ module.exports = function ($$$config) { this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -12821,7 +12836,7 @@ module.exports = function ($$$config) { version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-classic-c81312e3-20250102" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js index f5571dafb288e..620a04dcc11b2 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -481,14 +481,13 @@ module.exports = function ($$$config) { return lanes; } } - function getNextLanes(root, wipLanes) { + function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -498,29 +497,29 @@ module.exports = function ($$$config) { 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + !rootHasPendingCommit && + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) : enableSiblingPrerendering && - !root && - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + !rootHasPendingCommit && + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -1177,7 +1176,9 @@ module.exports = function ($$$config) { (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( root, - root === workInProgressRoot ? JSCompiler_inline_result : 0 + root === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root.cancelPendingCommit || + root.timeoutHandle !== noTimeout )), 0 === (JSCompiler_inline_result & 3) || checkIfRootIsPrerendering(root, JSCompiler_inline_result) || @@ -1243,7 +1244,8 @@ module.exports = function ($$$config) { suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); pingedLanes = root.callbackNode; if ( @@ -1302,7 +1304,8 @@ module.exports = function ($$$config) { var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0, + null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -7417,94 +7420,93 @@ module.exports = function ($$$config) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } - function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - deletions = fiber.deletions; - if (null !== deletions) - for (var i = 0; i < deletions.length; i++) { - var deletion = deletions[i]; + function commitBeforeMutationEffects(root, firstChild) { + focusedInstanceHandle = prepareForCommit(root.containerInfo); + shouldFireAfterActiveInstanceBlur = !1; + for (nextEffect = firstChild; null !== nextEffect; ) { + root = nextEffect; + firstChild = root.deletions; + if (null !== firstChild) + for (var i = 0; i < firstChild.length; i++) { + var deletion = firstChild[i]; doesFiberContain(deletion, focusedInstanceHandle) && ((shouldFireAfterActiveInstanceBlur = !0), beforeActiveInstanceBlur(deletion)); } - deletions = fiber.child; - if (0 !== (fiber.subtreeFlags & 9236) && null !== deletions) - (deletions.return = fiber), (nextEffect = deletions); + firstChild = root.child; + if (0 !== (root.subtreeFlags & 9236) && null !== firstChild) + (firstChild.return = root), (nextEffect = firstChild); else - a: for (; null !== nextEffect; ) { - fiber = nextEffect; - deletions = void 0; - var JSCompiler_temp; - i = fiber; - deletion = i.alternate; - var flags = i.flags; + for (; null !== nextEffect; ) { + root = nextEffect; + firstChild = root.alternate; + i = root.flags; if ( - !shouldFireAfterActiveInstanceBlur && - null !== focusedInstanceHandle + (deletion = + !shouldFireAfterActiveInstanceBlur && + null !== focusedInstanceHandle) ) { - if ((JSCompiler_temp = 13 === i.tag)) - b: { + if ((deletion = 13 === root.tag)) + a: { if ( - null !== deletion && - ((JSCompiler_temp = deletion.memoizedState), - null === JSCompiler_temp || - null !== JSCompiler_temp.dehydrated) + null !== firstChild && + ((deletion = firstChild.memoizedState), + null === deletion || null !== deletion.dehydrated) ) { - JSCompiler_temp = i.memoizedState; - JSCompiler_temp = - null !== JSCompiler_temp && - null === JSCompiler_temp.dehydrated; - break b; + deletion = root.memoizedState; + deletion = null !== deletion && null === deletion.dehydrated; + break a; } - JSCompiler_temp = !1; + deletion = !1; } - JSCompiler_temp && - doesFiberContain(i, focusedInstanceHandle) && - ((shouldFireAfterActiveInstanceBlur = !0), - beforeActiveInstanceBlur(i)); + deletion = + deletion && doesFiberContain(root, focusedInstanceHandle); } - switch (i.tag) { + deletion && + ((shouldFireAfterActiveInstanceBlur = !0), + beforeActiveInstanceBlur(root)); + switch (root.tag) { case 0: if ( - 0 !== (flags & 4) && - ((deletions = i.updateQueue), - (deletions = null !== deletions ? deletions.events : null), - null !== deletions) + 0 !== (i & 4) && + ((firstChild = root.updateQueue), + (firstChild = null !== firstChild ? firstChild.events : null), + null !== firstChild) ) - for (i = 0; i < deletions.length; i++) - (deletion = deletions[i]), + for (i = 0; i < firstChild.length; i++) + (deletion = firstChild[i]), (deletion.ref.impl = deletion.nextImpl); break; case 11: case 15: break; case 1: - if (0 !== (flags & 1024) && null !== deletion) { - flags = deletion.memoizedProps; - deletion = deletion.memoizedState; - JSCompiler_temp = i.stateNode; + if (0 !== (i & 1024) && null !== firstChild) { + i = void 0; + deletion = root; + var prevProps = firstChild.memoizedProps; + firstChild = firstChild.memoizedState; + var instance = deletion.stateNode; try { var resolvedPrevProps = resolveClassComponentProps( - i.type, - flags, - i.elementType === i.type + deletion.type, + prevProps, + deletion.elementType === deletion.type ); - deletions = JSCompiler_temp.getSnapshotBeforeUpdate( + i = instance.getSnapshotBeforeUpdate( resolvedPrevProps, - deletion + firstChild ); - JSCompiler_temp.__reactInternalSnapshotBeforeUpdate = - deletions; + instance.__reactInternalSnapshotBeforeUpdate = i; } catch (error) { - captureCommitPhaseError(i, i.return, error); + captureCommitPhaseError(deletion, deletion.return, error); } } break; case 3: - 0 !== (flags & 1024) && + 0 !== (i & 1024) && supportsMutation && - clearContainer(i.stateNode.containerInfo); + clearContainer(root.stateNode.containerInfo); break; case 5: case 26: @@ -7514,18 +7516,18 @@ module.exports = function ($$$config) { case 17: break; default: - if (0 !== (flags & 1024)) - throw Error(formatProdErrorMessage(163)); + if (0 !== (i & 1024)) throw Error(formatProdErrorMessage(163)); } - deletions = fiber.sibling; - if (null !== deletions) { - deletions.return = fiber.return; - nextEffect = deletions; - break a; + firstChild = root.sibling; + if (null !== firstChild) { + firstChild.return = root.return; + nextEffect = firstChild; + break; } - nextEffect = fiber.return; + nextEffect = root.return; } } + focusedInstanceHandle = null; } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -9837,8 +9839,6 @@ module.exports = function ($$$config) { default: throw Error(formatProdErrorMessage(329)); } - shouldTimeSlice.finishedWork = forceSync; - shouldTimeSlice.finishedLanes = lanes; if ( (lanes & 62914560) === lanes && (alwaysThrottleRetries || 3 === renderWasConcurrent) && @@ -9851,7 +9851,7 @@ module.exports = function ($$$config) { workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, @@ -9912,18 +9912,24 @@ module.exports = function ($$$config) { completedRenderStartTime, completedRenderEndTime ) { - var subtreeFlags = finishedWork.subtreeFlags; - if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) + root.timeoutHandle = noTimeout; + suspendedCommitReason = finishedWork.subtreeFlags; + if ( + suspendedCommitReason & 8192 || + 16785408 === (suspendedCommitReason & 16785408) + ) if ( (startSuspendingCommit(), accumulateSuspenseyCommitOnFiber(finishedWork), - (finishedWork = waitForCommitToBeReady()), - null !== finishedWork) + (suspendedCommitReason = waitForCommitToBeReady()), + null !== suspendedCommitReason) ) { - root.cancelPendingCommit = finishedWork( + root.cancelPendingCommit = suspendedCommitReason( commitRoot.bind( null, root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, @@ -9941,16 +9947,14 @@ module.exports = function ($$$config) { } commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ); } function isRenderConsistentWithExternalStores(finishedWork) { @@ -10043,8 +10047,6 @@ module.exports = function ($$$config) { } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; timeoutHandle !== noTimeout && ((root.timeoutHandle = noTimeout), cancelTimeout(timeoutHandle)); @@ -10533,137 +10535,156 @@ module.exports = function ($$$config) { } function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ) { - var prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = getCurrentUpdatePriority(); - try { - setCurrentUpdatePriority(2), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - previousUpdateLanePriority, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = prevTransition), - setCurrentUpdatePriority(previousUpdateLanePriority); + root.cancelPendingCommit = null; + do flushPassiveEffects(); + while (null !== rootWithPendingPassiveEffects); + if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); + if (null !== finishedWork) { + if (finishedWork === root.current) + throw Error(formatProdErrorMessage(177)); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes; + remainingLanes |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + remainingLanes, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); + didIncludeCommitPhaseUpdate = !1; + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + updatedLanes = executionContext; + executionContext |= 4; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + setCurrentUpdatePriority(spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects( + root, + finishedWork, + lanes, + recoverableErrors, + didIncludeRenderPhaseUpdate + ); + } + } + function flushMutationEffects(root, finishedWork) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitMutationEffectsOnFiber(finishedWork, root), + shouldFireAfterActiveInstanceBlur && afterActiveInstanceBlur(), + resetAfterCommit(root.containerInfo); + } finally { + (executionContext = prevExecutionContext), + setCurrentUpdatePriority(previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } } + root.current = finishedWork; } - function commitRootImpl( + function flushLayoutEffects( root, + finishedWork, + lanes, recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - renderPriorityLevel, - spawnedLane, - updatedLanes, - suspendedRetryLanes + didIncludeRenderPhaseUpdate ) { - do flushPassiveEffects(); - while (null !== rootWithPendingPassiveEffects); - if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); - var finishedWork = root.finishedWork, - lanes = root.finishedLanes; - if (null === finishedWork) return null; - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - lanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - didIncludeCommitPhaseUpdate = !1; - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + var prevExecutionContext = executionContext; + executionContext |= 4; + try { + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + } finally { + (executionContext = prevExecutionContext), + setCurrentUpdatePriority(previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = getCurrentUpdatePriority()), - setCurrentUpdatePriority(2), - (suspendedRetryLanes = executionContext), - (executionContext |= 4), - (focusedInstanceHandle = prepareForCommit(root.containerInfo)), - (shouldFireAfterActiveInstanceBlur = !1), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - (focusedInstanceHandle = null), - commitMutationEffectsOnFiber(finishedWork, root), - shouldFireAfterActiveInstanceBlur && afterActiveInstanceBlur(), - resetAfterCommit(root.containerInfo), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = suspendedRetryLanes), - setCurrentUpdatePriority(updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - spawnedLane - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), + ? ((rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) - : releaseRootPooledCache(root, remainingLanes); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - renderPriorityLevel(remainingLanes.value, { - componentStack: remainingLanes.stack + : releaseRootPooledCache(root, root.pendingLanes); + rootHasLayoutEffect = root.pendingLanes; + 0 === rootHasLayoutEffect && + (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect = lanesToEventPriority(lanes); + onCommitRoot(finishedWork.stateNode, rootHasLayoutEffect); + if (null !== recoverableErrors) { + finishedWork = ReactSharedInternals.T; + rootHasLayoutEffect = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + previousPriority = 0; + previousPriority < recoverableErrors.length; + previousPriority++ + ) { + var recoverableError = recoverableErrors[previousPriority]; + onRecoverableError(recoverableError.value, { + componentStack: recoverableError.stack }); + } + } finally { + (ReactSharedInternals.T = finishedWork), + setCurrentUpdatePriority(rootHasLayoutEffect); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; + rootHasLayoutEffect = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || - (0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42)) + (0 !== (lanes & 4194218) && 0 !== (rootHasLayoutEffect & 42)) ? root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root)) @@ -10687,7 +10708,6 @@ module.exports = function ($$$config) { : (currentEndTime = endTime); }); } - return null; } function releaseRootPooledCache(root, remainingLanes) { 0 === (root.pooledCacheLanes &= remainingLanes) && @@ -11241,11 +11261,7 @@ module.exports = function ($$$config) { ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = noTimeout; this.callbackNode = this.next = @@ -11258,7 +11274,6 @@ module.exports = function ($$$config) { this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -12540,7 +12555,7 @@ module.exports = function ($$$config) { version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-modern-c81312e3-20250102" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index 1c0951af54e97..f3e6bfac49874 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -13,7 +13,7 @@ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1097() { + function JSCompiler_object_inline_createNodeMock_1116() { return null; } function findHook(fiber, id) { @@ -702,41 +702,6 @@ __DEV__ && } return hook.checkDCE ? !0 : !1; } - function onCommitRoot(root, eventPriority) { - if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) - try { - var didError = 128 === (root.current.flags & 128); - switch (eventPriority) { - case DiscreteEventPriority: - var schedulerPriority = ImmediatePriority; - break; - case ContinuousEventPriority: - schedulerPriority = UserBlockingPriority; - break; - case DefaultEventPriority: - schedulerPriority = NormalPriority$1; - break; - case IdleEventPriority: - schedulerPriority = IdlePriority; - break; - default: - schedulerPriority = NormalPriority$1; - } - injectedHook.onCommitFiberRoot( - rendererID, - root, - schedulerPriority, - didError - ); - } catch (err) { - hasLoggedError || - ((hasLoggedError = !0), - error$jscomp$0( - "React instrumentation encountered an error: %s", - err - )); - } - } function setIsStrictModeForDevtools(newIsStrictMode) { "function" === typeof log$1 && (unstable_setDisableYieldValue(newIsStrictMode), @@ -815,14 +780,13 @@ __DEV__ && ); } } - function getNextLanes(root, wipLanes) { + function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -831,28 +795,29 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + : rootHasPendingCommit || + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : rootHasPendingCommit || + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -2049,7 +2014,9 @@ __DEV__ && (nextLanes = workInProgressRootRenderLanes), (nextLanes = getNextLanes( root, - root === workInProgressRoot ? nextLanes : 0 + root === workInProgressRoot ? nextLanes : 0, + null !== root.cancelPendingCommit || + -1 !== root.timeoutHandle )), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root, nextLanes) || @@ -2109,7 +2076,8 @@ __DEV__ && suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); pingedLanes = root.callbackNode; if ( @@ -2173,7 +2141,10 @@ __DEV__ && workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot + ? workInProgressRootRenderLanes$jscomp$0 + : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -9120,18 +9091,20 @@ __DEV__ && ); } } - function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - child = fiber.child; - if (0 !== (fiber.subtreeFlags & 1024) && null !== child) - (child.return = fiber), (nextEffect = child); + function commitBeforeMutationEffects(root, firstChild) { + for (nextEffect = firstChild; null !== nextEffect; ) + if ( + ((root = nextEffect), + (firstChild = root.child), + 0 !== (root.subtreeFlags & 1024) && null !== firstChild) + ) + (firstChild.return = root), (nextEffect = firstChild); else - a: for (; null !== nextEffect; ) { - child = fiber = nextEffect; - var current = child.alternate, - flags = child.flags; - switch (child.tag) { + for (; null !== nextEffect; ) { + firstChild = root = nextEffect; + var current = firstChild.alternate, + flags = firstChild.flags; + switch (firstChild.tag) { case 0: break; case 11: @@ -9140,11 +9113,11 @@ __DEV__ && case 1: 0 !== (flags & 1024) && null !== current && - commitClassSnapshot(child, current); + commitClassSnapshot(firstChild, current); break; case 3: 0 !== (flags & 1024) && - child.stateNode.containerInfo.children.splice(0); + firstChild.stateNode.containerInfo.children.splice(0); break; case 5: case 26: @@ -9159,15 +9132,14 @@ __DEV__ && "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." ); } - child = fiber.sibling; - if (null !== child) { - child.return = fiber.return; - nextEffect = child; - break a; + firstChild = root.sibling; + if (null !== firstChild) { + firstChild.return = root.return; + nextEffect = firstChild; + break; } - nextEffect = fiber.return; + nextEffect = root.return; } - } } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -10856,9 +10828,8 @@ __DEV__ && break; } a: { - renderWasConcurrent = root; - shouldTimeSlice = exitStatus; - switch (shouldTimeSlice) { + shouldTimeSlice = root; + switch (exitStatus) { case RootInProgress: case RootFatalErrored: throw Error("Root did not complete. This is a bug in React."); @@ -10866,7 +10837,7 @@ __DEV__ && if ((lanes & 4194176) !== lanes) break; case RootSuspendedAtTheShell: markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings @@ -10881,62 +10852,38 @@ __DEV__ && 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, - shouldTimeSlice, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } else { + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + forceSync, + lanes, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes + ); + else { if ( (lanes & 62914560) === lanes && - ((exitStatus = + ((renderWasConcurrent = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1()), - 10 < exitStatus) + 10 < renderWasConcurrent) ) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, - renderWasConcurrent, + shouldTimeSlice, forceSync, workInProgressRootRecoverableErrors, workInProgressTransitions, @@ -10946,17 +10893,17 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes, workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings, - shouldTimeSlice, + exitStatus, THROTTLED_COMMIT, -0, 0 ), - exitStatus + renderWasConcurrent ); break a; } commitRootWhenReady( - renderWasConcurrent, + shouldTimeSlice, forceSync, workInProgressRootRecoverableErrors, workInProgressTransitions, @@ -10966,7 +10913,7 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes, workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings, - shouldTimeSlice, + exitStatus, IMMEDIATE_COMMIT, -0, 0 @@ -10987,39 +10934,23 @@ __DEV__ && lanes, spawnedLane, updatedLanes, - suspendedRetryLanes, - didSkipSuspendedSiblings, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ) { - lanes = finishedWork.subtreeFlags; - (lanes & 8192 || 16785408 === (lanes & 16785408)) && + root.timeoutHandle = -1; + var subtreeFlags = finishedWork.subtreeFlags; + (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) && accumulateSuspenseyCommitOnFiber(finishedWork); - finishedWork = ReactSharedInternals.T; - lanes = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - lanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = finishedWork), - (currentUpdatePriority = lanes); - } + commitRoot( + root, + finishedWork, + lanes, + recoverableErrors, + transitions, + didIncludeRenderPhaseUpdate, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { @@ -11119,8 +11050,6 @@ __DEV__ && } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; -1 !== timeoutHandle && ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle)); @@ -11645,120 +11574,199 @@ __DEV__ && workInProgressRootExitStatus = RootSuspendedAtTheShell; workInProgress = null; } - function commitRootImpl( + function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - renderPriorityLevel, spawnedLane, updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); ReactStrictModeWarnings.flushLegacyContextWarning(); ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var finishedWork = root.finishedWork; - didIncludeRenderPhaseUpdate = root.finishedLanes; - if (null === finishedWork) return null; - 0 === didIncludeRenderPhaseUpdate && - error$jscomp$0( - "root.finishedLanes should not be empty during a commit. This is a bug in React." - ); - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) - throw Error( - "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + if (null !== finishedWork) { + 0 === lanes && + error$jscomp$0( + "finishedLanes should not be empty during a commit. This is a bug in React." + ); + if (finishedWork === root.current) + throw Error( + "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + ); + didIncludeRenderPhaseUpdate = + finishedWork.lanes | finishedWork.childLanes; + didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + didIncludeRenderPhaseUpdate, + spawnedLane, + updatedLanes, + suspendedRetryLanes ); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - didIncludeRenderPhaseUpdate, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; - 0 !== (finishedWork.subtreeFlags & 10256) || - 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = currentUpdatePriority), - (currentUpdatePriority = DiscreteEventPriority), - (suspendedRetryLanes = executionContext), - (executionContext |= CommitContext), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - commitMutationEffectsOnFiber(finishedWork, root), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = suspendedRetryLanes), - (currentUpdatePriority = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = spawnedLane) - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), - (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate)) - : (releaseRootPooledCache(root, remainingLanes), + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = + didIncludeRenderPhaseUpdate), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + commitStartTime = now(); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + updatedLanes = executionContext; + executionContext |= CommitContext; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects(root, finishedWork, lanes, recoverableErrors); + } + } + function flushMutationEffects(root, finishedWork) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { + commitMutationEffectsOnFiber(finishedWork, root); + } finally { + (executionContext = prevExecutionContext), + (currentUpdatePriority = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; + } + function flushLayoutEffects(root, finishedWork, lanes, recoverableErrors) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + } finally { + (executionContext = prevExecutionContext), + (currentUpdatePriority = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); + (rootHasLayoutEffect = + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256)) + ? ((rootWithPendingPassiveEffects = root), + (pendingPassiveEffectsLanes = lanes)) + : (releaseRootPooledCache(root, root.pendingLanes), (nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - (spawnedLane = makeErrorInfo(remainingLanes.stack)), + previousPriority = root.pendingLanes; + 0 === previousPriority && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root); + rootHasLayoutEffect = lanesToEventPriority(lanes); + finishedWork = finishedWork.stateNode; + if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) + try { + var didError = 128 === (finishedWork.current.flags & 128); + switch (rootHasLayoutEffect) { + case DiscreteEventPriority: + var schedulerPriority = ImmediatePriority; + break; + case ContinuousEventPriority: + schedulerPriority = UserBlockingPriority; + break; + case DefaultEventPriority: + schedulerPriority = NormalPriority$1; + break; + case IdleEventPriority: + schedulerPriority = IdlePriority; + break; + default: + schedulerPriority = NormalPriority$1; + } + injectedHook.onCommitFiberRoot( + rendererID, + finishedWork, + schedulerPriority, + didError + ); + } catch (err) { + hasLoggedError || + ((hasLoggedError = !0), + error$jscomp$0( + "React instrumentation encountered an error: %s", + err + )); + } + if (null !== recoverableErrors) { + didError = ReactSharedInternals.T; + schedulerPriority = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + finishedWork = 0; + finishedWork < recoverableErrors.length; + finishedWork++ + ) { + var recoverableError = recoverableErrors[finishedWork], + errorInfo = makeErrorInfo(recoverableError.stack); runWithFiberInDEV( - remainingLanes.source, - renderPriorityLevel, - remainingLanes.value, - spawnedLane + recoverableError.source, + onRecoverableError, + recoverableError.value, + errorInfo ); + } + } finally { + (ReactSharedInternals.T = didError), + (currentUpdatePriority = schedulerPriority); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; - 0 !== (didIncludeRenderPhaseUpdate & 4194218) && - 0 !== (remainingLanes & 42) + previousPriority = root.pendingLanes; + 0 !== (lanes & 4194218) && 0 !== (previousPriority & 42) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))) : (nestedUpdateCount = 0); flushSyncWorkAcrossRoots_impl(0, !1); - return null; } function makeErrorInfo(componentStack) { componentStack = { componentStack: componentStack }; @@ -12582,11 +12590,7 @@ __DEV__ && ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = -1; this.callbackNode = this.next = @@ -12599,7 +12603,6 @@ __DEV__ && this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -14959,10 +14962,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-classic-d8b903f4-20250102", + version: "19.1.0-www-classic-c81312e3-20250102", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-classic-c81312e3-20250102" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -14982,7 +14985,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1097, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1116, isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT, isConcurrent = isConcurrentOnly, isStrictMode = !1; @@ -15097,5 +15100,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.1.0-www-classic-d8b903f4-20250102"; + exports.version = "19.1.0-www-classic-c81312e3-20250102"; })(); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index 0169cdafcaf0f..ffe3ca6f055d6 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -13,7 +13,7 @@ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1097() { + function JSCompiler_object_inline_createNodeMock_1116() { return null; } function findHook(fiber, id) { @@ -702,41 +702,6 @@ __DEV__ && } return hook.checkDCE ? !0 : !1; } - function onCommitRoot(root, eventPriority) { - if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) - try { - var didError = 128 === (root.current.flags & 128); - switch (eventPriority) { - case DiscreteEventPriority: - var schedulerPriority = ImmediatePriority; - break; - case ContinuousEventPriority: - schedulerPriority = UserBlockingPriority; - break; - case DefaultEventPriority: - schedulerPriority = NormalPriority$1; - break; - case IdleEventPriority: - schedulerPriority = IdlePriority; - break; - default: - schedulerPriority = NormalPriority$1; - } - injectedHook.onCommitFiberRoot( - rendererID, - root, - schedulerPriority, - didError - ); - } catch (err) { - hasLoggedError || - ((hasLoggedError = !0), - error$jscomp$0( - "React instrumentation encountered an error: %s", - err - )); - } - } function setIsStrictModeForDevtools(newIsStrictMode) { "function" === typeof log$1 && (unstable_setDisableYieldValue(newIsStrictMode), @@ -815,14 +780,13 @@ __DEV__ && ); } } - function getNextLanes(root, wipLanes) { + function getNextLanes(root, wipLanes, rootHasPendingCommit) { var pendingLanes = root.pendingLanes; if (0 === pendingLanes) return 0; var nextLanes = 0, suspendedLanes = root.suspendedLanes, - pingedLanes = root.pingedLanes, - warmLanes = root.warmLanes; - root = 0 !== root.finishedLanes; + pingedLanes = root.pingedLanes; + root = root.warmLanes; var nonIdlePendingLanes = pendingLanes & 134217727; 0 !== nonIdlePendingLanes ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), @@ -831,28 +795,29 @@ __DEV__ && : ((pingedLanes &= nonIdlePendingLanes), 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = nonIdlePendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes))))) + : rootHasPendingCommit || + ((rootHasPendingCommit = nonIdlePendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = + getHighestPriorityLanes(rootHasPendingCommit))))) : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes ? (nextLanes = getHighestPriorityLanes(pingedLanes)) - : root || - ((warmLanes = pendingLanes & ~warmLanes), - 0 !== warmLanes && - (nextLanes = getHighestPriorityLanes(warmLanes)))); + : rootHasPendingCommit || + ((rootHasPendingCommit = pendingLanes & ~root), + 0 !== rootHasPendingCommit && + (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && ((suspendedLanes = nextLanes & -nextLanes), - (warmLanes = wipLanes & -wipLanes), - suspendedLanes >= warmLanes || - (32 === suspendedLanes && 0 !== (warmLanes & 4194176))) + (rootHasPendingCommit = wipLanes & -wipLanes), + suspendedLanes >= rootHasPendingCommit || + (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194176))) ? wipLanes : nextLanes; } @@ -2049,7 +2014,9 @@ __DEV__ && (nextLanes = workInProgressRootRenderLanes), (nextLanes = getNextLanes( root, - root === workInProgressRoot ? nextLanes : 0 + root === workInProgressRoot ? nextLanes : 0, + null !== root.cancelPendingCommit || + -1 !== root.timeoutHandle )), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root, nextLanes) || @@ -2109,7 +2076,8 @@ __DEV__ && suspendedLanes = workInProgressRootRenderLanes; suspendedLanes = getNextLanes( root, - root === currentTime ? suspendedLanes : 0 + root === currentTime ? suspendedLanes : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); pingedLanes = root.callbackNode; if ( @@ -2173,7 +2141,10 @@ __DEV__ && workInProgressRootRenderLanes; workInProgressRootRenderLanes$jscomp$0 = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0 + root === workInProgressRoot + ? workInProgressRootRenderLanes$jscomp$0 + : 0, + null !== root.cancelPendingCommit || -1 !== root.timeoutHandle ); if (0 === workInProgressRootRenderLanes$jscomp$0) return null; performWorkOnRoot( @@ -9120,18 +9091,20 @@ __DEV__ && ); } } - function commitBeforeMutationEffects_begin() { - for (; null !== nextEffect; ) { - var fiber = nextEffect, - child = fiber.child; - if (0 !== (fiber.subtreeFlags & 1024) && null !== child) - (child.return = fiber), (nextEffect = child); + function commitBeforeMutationEffects(root, firstChild) { + for (nextEffect = firstChild; null !== nextEffect; ) + if ( + ((root = nextEffect), + (firstChild = root.child), + 0 !== (root.subtreeFlags & 1024) && null !== firstChild) + ) + (firstChild.return = root), (nextEffect = firstChild); else - a: for (; null !== nextEffect; ) { - child = fiber = nextEffect; - var current = child.alternate, - flags = child.flags; - switch (child.tag) { + for (; null !== nextEffect; ) { + firstChild = root = nextEffect; + var current = firstChild.alternate, + flags = firstChild.flags; + switch (firstChild.tag) { case 0: break; case 11: @@ -9140,11 +9113,11 @@ __DEV__ && case 1: 0 !== (flags & 1024) && null !== current && - commitClassSnapshot(child, current); + commitClassSnapshot(firstChild, current); break; case 3: 0 !== (flags & 1024) && - child.stateNode.containerInfo.children.splice(0); + firstChild.stateNode.containerInfo.children.splice(0); break; case 5: case 26: @@ -9159,15 +9132,14 @@ __DEV__ && "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." ); } - child = fiber.sibling; - if (null !== child) { - child.return = fiber.return; - nextEffect = child; - break a; + firstChild = root.sibling; + if (null !== firstChild) { + firstChild.return = root.return; + nextEffect = firstChild; + break; } - nextEffect = fiber.return; + nextEffect = root.return; } - } } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; @@ -10856,9 +10828,8 @@ __DEV__ && break; } a: { - renderWasConcurrent = root; - shouldTimeSlice = exitStatus; - switch (shouldTimeSlice) { + shouldTimeSlice = root; + switch (exitStatus) { case RootInProgress: case RootFatalErrored: throw Error("Root did not complete. This is a bug in React."); @@ -10866,7 +10837,7 @@ __DEV__ && if ((lanes & 4194176) !== lanes) break; case RootSuspendedAtTheShell: markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings @@ -10881,62 +10852,38 @@ __DEV__ && 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, - shouldTimeSlice, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } else { + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + forceSync, + lanes, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes + ); + else { if ( (lanes & 62914560) === lanes && - ((exitStatus = + ((renderWasConcurrent = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1()), - 10 < exitStatus) + 10 < renderWasConcurrent) ) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( + if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, - renderWasConcurrent, + shouldTimeSlice, forceSync, workInProgressRootRecoverableErrors, workInProgressTransitions, @@ -10946,17 +10893,17 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes, workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings, - shouldTimeSlice, + exitStatus, THROTTLED_COMMIT, -0, 0 ), - exitStatus + renderWasConcurrent ); break a; } commitRootWhenReady( - renderWasConcurrent, + shouldTimeSlice, forceSync, workInProgressRootRecoverableErrors, workInProgressTransitions, @@ -10966,7 +10913,7 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes, workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings, - shouldTimeSlice, + exitStatus, IMMEDIATE_COMMIT, -0, 0 @@ -10987,39 +10934,23 @@ __DEV__ && lanes, spawnedLane, updatedLanes, - suspendedRetryLanes, - didSkipSuspendedSiblings, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime + suspendedRetryLanes ) { - lanes = finishedWork.subtreeFlags; - (lanes & 8192 || 16785408 === (lanes & 16785408)) && + root.timeoutHandle = -1; + var subtreeFlags = finishedWork.subtreeFlags; + (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) && accumulateSuspenseyCommitOnFiber(finishedWork); - finishedWork = ReactSharedInternals.T; - lanes = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - lanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = finishedWork), - (currentUpdatePriority = lanes); - } + commitRoot( + root, + finishedWork, + lanes, + recoverableErrors, + transitions, + didIncludeRenderPhaseUpdate, + spawnedLane, + updatedLanes, + suspendedRetryLanes + ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { @@ -11119,8 +11050,6 @@ __DEV__ && } } function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = 0; var timeoutHandle = root.timeoutHandle; -1 !== timeoutHandle && ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle)); @@ -11645,120 +11574,199 @@ __DEV__ && workInProgressRootExitStatus = RootSuspendedAtTheShell; workInProgress = null; } - function commitRootImpl( + function commitRoot( root, + finishedWork, + lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - renderPriorityLevel, spawnedLane, updatedLanes, suspendedRetryLanes ) { + root.cancelPendingCommit = null; do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); ReactStrictModeWarnings.flushLegacyContextWarning(); ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) throw Error("Should not already be working."); - var finishedWork = root.finishedWork; - didIncludeRenderPhaseUpdate = root.finishedLanes; - if (null === finishedWork) return null; - 0 === didIncludeRenderPhaseUpdate && - error$jscomp$0( - "root.finishedLanes should not be empty during a commit. This is a bug in React." - ); - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) - throw Error( - "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + if (null !== finishedWork) { + 0 === lanes && + error$jscomp$0( + "finishedLanes should not be empty during a commit. This is a bug in React." + ); + if (finishedWork === root.current) + throw Error( + "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + ); + didIncludeRenderPhaseUpdate = + finishedWork.lanes | finishedWork.childLanes; + didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes; + markRootFinished( + root, + lanes, + didIncludeRenderPhaseUpdate, + spawnedLane, + updatedLanes, + suspendedRetryLanes ); - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - didIncludeRenderPhaseUpdate, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - spawnedLane = !1; - 0 !== (finishedWork.subtreeFlags & 10256) || - 0 !== (finishedWork.flags & 10256) - ? ((spawnedLane = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - (root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })) - : ((root.callbackNode = null), - (root.callbackPriority = 0), - (root.cancelPendingCommit = null)); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (updatedLanes = currentUpdatePriority), - (currentUpdatePriority = DiscreteEventPriority), - (suspendedRetryLanes = executionContext), - (executionContext |= CommitContext), - (nextEffect = finishedWork), - commitBeforeMutationEffects_begin(), - commitMutationEffectsOnFiber(finishedWork, root), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = suspendedRetryLanes), - (currentUpdatePriority = updatedLanes), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = spawnedLane) - ? ((spawnedLane = !1), - (rootWithPendingPassiveEffects = root), - (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate)) - : (releaseRootPooledCache(root, remainingLanes), + root === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((pendingPassiveEffectsRemainingLanes = + didIncludeRenderPhaseUpdate), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), (root.callbackPriority = 0)); + commitStartTime = now(); + transitions = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + spawnedLane = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + updatedLanes = executionContext; + executionContext |= CommitContext; + try { + commitBeforeMutationEffects(root, finishedWork); + } finally { + (executionContext = updatedLanes), + (currentUpdatePriority = spawnedLane), + (ReactSharedInternals.T = transitions); + } + } + flushMutationEffects(root, finishedWork, lanes); + flushLayoutEffects(root, finishedWork, lanes, recoverableErrors); + } + } + function flushMutationEffects(root, finishedWork) { + var rootMutationHasEffect = 0 !== (finishedWork.flags & 13878); + if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) { + rootMutationHasEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { + commitMutationEffectsOnFiber(finishedWork, root); + } finally { + (executionContext = prevExecutionContext), + (currentUpdatePriority = previousPriority), + (ReactSharedInternals.T = rootMutationHasEffect); + } + } + root.current = finishedWork; + } + function flushLayoutEffects(root, finishedWork, lanes, recoverableErrors) { + var rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772); + if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) { + rootHasLayoutEffect = ReactSharedInternals.T; + ReactSharedInternals.T = null; + var previousPriority = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + var prevExecutionContext = executionContext; + executionContext |= CommitContext; + try { + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + } finally { + (executionContext = prevExecutionContext), + (currentUpdatePriority = previousPriority), + (ReactSharedInternals.T = rootHasLayoutEffect); + } + } + requestPaint(); + (rootHasLayoutEffect = + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256)) + ? ((rootWithPendingPassiveEffects = root), + (pendingPassiveEffectsLanes = lanes)) + : (releaseRootPooledCache(root, root.pendingLanes), (nestedPassiveUpdateCount = 0), (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - (spawnedLane = makeErrorInfo(remainingLanes.stack)), + previousPriority = root.pendingLanes; + 0 === previousPriority && (legacyErrorBoundariesThatAlreadyFailed = null); + rootHasLayoutEffect || commitDoubleInvokeEffectsInDEV(root); + rootHasLayoutEffect = lanesToEventPriority(lanes); + finishedWork = finishedWork.stateNode; + if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) + try { + var didError = 128 === (finishedWork.current.flags & 128); + switch (rootHasLayoutEffect) { + case DiscreteEventPriority: + var schedulerPriority = ImmediatePriority; + break; + case ContinuousEventPriority: + schedulerPriority = UserBlockingPriority; + break; + case DefaultEventPriority: + schedulerPriority = NormalPriority$1; + break; + case IdleEventPriority: + schedulerPriority = IdlePriority; + break; + default: + schedulerPriority = NormalPriority$1; + } + injectedHook.onCommitFiberRoot( + rendererID, + finishedWork, + schedulerPriority, + didError + ); + } catch (err) { + hasLoggedError || + ((hasLoggedError = !0), + error$jscomp$0( + "React instrumentation encountered an error: %s", + err + )); + } + if (null !== recoverableErrors) { + didError = ReactSharedInternals.T; + schedulerPriority = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + ReactSharedInternals.T = null; + try { + var onRecoverableError = root.onRecoverableError; + for ( + finishedWork = 0; + finishedWork < recoverableErrors.length; + finishedWork++ + ) { + var recoverableError = recoverableErrors[finishedWork], + errorInfo = makeErrorInfo(recoverableError.stack); runWithFiberInDEV( - remainingLanes.source, - renderPriorityLevel, - remainingLanes.value, - spawnedLane + recoverableError.source, + onRecoverableError, + recoverableError.value, + errorInfo ); + } + } finally { + (ReactSharedInternals.T = didError), + (currentUpdatePriority = schedulerPriority); + } + } 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); ensureRootIsScheduled(root); - remainingLanes = root.pendingLanes; - 0 !== (didIncludeRenderPhaseUpdate & 4194218) && - 0 !== (remainingLanes & 42) + previousPriority = root.pendingLanes; + 0 !== (lanes & 4194218) && 0 !== (previousPriority & 42) ? ((nestedUpdateScheduled = !0), root === rootWithNestedUpdates ? nestedUpdateCount++ : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))) : (nestedUpdateCount = 0); flushSyncWorkAcrossRoots_impl(0, !1); - return null; } function makeErrorInfo(componentStack) { componentStack = { componentStack: componentStack }; @@ -12582,11 +12590,7 @@ __DEV__ && ) { this.tag = 1; this.containerInfo = containerInfo; - this.finishedWork = - this.pingCache = - this.current = - this.pendingChildren = - null; + this.pingCache = this.current = this.pendingChildren = null; this.timeoutHandle = -1; this.callbackNode = this.next = @@ -12599,7 +12603,6 @@ __DEV__ && this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = - this.finishedLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = @@ -14959,10 +14962,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-modern-d8b903f4-20250102", + version: "19.1.0-www-modern-c81312e3-20250102", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d8b903f4-20250102" + reconcilerVersion: "19.1.0-www-modern-c81312e3-20250102" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -14982,7 +14985,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1097, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1116, isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT, isConcurrent = isConcurrentOnly, isStrictMode = !1; @@ -15097,5 +15100,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.1.0-www-modern-d8b903f4-20250102"; + exports.version = "19.1.0-www-modern-c81312e3-20250102"; })(); diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC index 205a2d3818a91..bd41e8672fa3c 100644 --- a/compiled/facebook-www/VERSION_CLASSIC +++ b/compiled/facebook-www/VERSION_CLASSIC @@ -1 +1 @@ -19.1.0-www-classic-d8b903f4-20250102 \ No newline at end of file +19.1.0-www-classic-c81312e3-20250102 \ No newline at end of file diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN index 749edafd81eca..8f6db67d32ffc 100644 --- a/compiled/facebook-www/VERSION_MODERN +++ b/compiled/facebook-www/VERSION_MODERN @@ -1 +1 @@ -19.1.0-www-modern-d8b903f4-20250102 \ No newline at end of file +19.1.0-www-modern-c81312e3-20250102 \ No newline at end of file diff --git a/compiled/facebook-www/__test_utils__/ReactAllWarnings.js b/compiled/facebook-www/__test_utils__/ReactAllWarnings.js index 5d5b294caf548..4e2d45505f05c 100644 --- a/compiled/facebook-www/__test_utils__/ReactAllWarnings.js +++ b/compiled/facebook-www/__test_utils__/ReactAllWarnings.js @@ -368,6 +368,7 @@ export default [ "dispatchCommand was called with a ref that isn't a native component. Use React.forwardRef to get access to the underlying native component", "does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().", "does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().", + "finishedLanes should not be empty during a commit. This is a bug in React.", "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.", "forwardRef render functions accept exactly two parameters: props and ref. %s", "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?", @@ -385,7 +386,6 @@ export default [ "react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer", "ref.measureLayout must be called with a node handle or a ref to a native component.", "requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.", - "root.finishedLanes should not be empty during a commit. This is a bug in React.", "sendAccessibilityEvent was called with a ref that isn't a native component. Use React.forwardRef to get access to the underlying native component", "unmountComponentAtNode was removed in React 19. Use root.unmount() instead.", "unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",