diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index cdbc6011dca43..3625608166840 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -96cdeaf89bfde7551b4ffe4d685da169b780f2f7 +a8f971b7a669a9a6321b9f3cea820f68b2e4ac6e diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index cdbc6011dca43..3625608166840 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -96cdeaf89bfde7551b4ffe4d685da169b780f2f7 +a8f971b7a669a9a6321b9f3cea820f68b2e4ac6e diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 0434d0686c57f..5eec47893438b 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-www-classic-96cdeaf89-20230224"; +var ReactVersion = "18.3.0-www-classic-a8f971b7a-20230224"; // ATTENTION // When adding new symbols to this file, diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index 855e61e11fa05..e591d194c7899 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-www-modern-96cdeaf89-20230224"; +var ReactVersion = "18.3.0-www-modern-a8f971b7a-20230224"; // ATTENTION // When adding new symbols to this file, diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index 7a7d2edab97f8..5d102fd7f2ac7 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -646,4 +646,4 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-classic-96cdeaf89-20230224"; +exports.version = "18.3.0-www-classic-a8f971b7a-20230224"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 7e6aaf5142cca..b6578fdbcd424 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -638,4 +638,4 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-modern-96cdeaf89-20230224"; +exports.version = "18.3.0-www-modern-a8f971b7a-20230224"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 51b870eb2e95d..ca744dd9eb4af 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -657,7 +657,7 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-classic-96cdeaf89-20230224"; +exports.version = "18.3.0-www-classic-a8f971b7a-20230224"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index 53699c5a0cf10..631e26316cbed 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -649,7 +649,7 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-www-modern-96cdeaf89-20230224"; +exports.version = "18.3.0-www-modern-a8f971b7a-20230224"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index d6d0de9646300..37be80473c67d 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -69,7 +69,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = "18.3.0-www-classic-96cdeaf89-20230224"; +var ReactVersion = "18.3.0-www-classic-a8f971b7a-20230224"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -7625,7 +7625,6 @@ function replaySuspendedComponentWithHooks( // only get reset when the component either completes (finishRenderingHooks) // or unwinds (resetHooksOnUnwind). { - hookTypesDev = current !== null ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; // Used for hot reloading: ignorePreviousDependencies = @@ -7657,8 +7656,14 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var children; do { - didScheduleRenderPhaseUpdateDuringThisPass = false; + if (didScheduleRenderPhaseUpdateDuringThisPass) { + // It's possible that a use() value depended on a state that was updated in + // this rerender, so we need to watch for different thenables this time. + thenableState = null; + } + thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = false; if (numberOfReRenders >= RE_RENDER_LIMIT) { throw new Error( @@ -7783,8 +7788,7 @@ function updateWorkInProgressHook() { // This function is used both for updates and for re-renders triggered by a // render phase update. It assumes there is either a current hook we can // clone, or a work-in-progress hook from a previous render pass that we can - // use as a base. When we reach the end of the base list, we must switch to - // the dispatcher used for mounts. + // use as a base. var nextCurrentHook; if (currentHook === null) { @@ -7820,14 +7824,10 @@ function updateWorkInProgressHook() { if (currentFiber === null) { // This is the initial render. This branch is reached when the component // suspends, resumes, then renders an additional hook. - var _newHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - nextCurrentHook = _newHook; + // Should never be reached because we should switch to the mount dispatcher first. + throw new Error( + "Update hook called on initial render. This is likely a bug in React. Please file an issue." + ); } else { // This is an update. We should always have a current hook. throw new Error("Rendered more hooks than during the previous render."); @@ -7883,7 +7883,24 @@ function use(usable) { thenableState = createThenableState(); } - return trackUsedThenable(thenableState, thenable, index); + var result = trackUsedThenable(thenableState, thenable, index); + + if ( + currentlyRenderingFiber$1.alternate === null && + (workInProgressHook === null + ? currentlyRenderingFiber$1.memoizedState === null + : workInProgressHook.next === null) + ) { + // Initial render, and either this is the first time the component is + // called, or there were no Hooks called after this use() the previous + // time (perhaps because it threw). Subsequent Hook calls should use the + // mount dispatcher. + { + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + } + } + + return result; } else if ( usable.$$typeof === REACT_CONTEXT_TYPE || usable.$$typeof === REACT_SERVER_CONTEXT_TYPE @@ -8829,7 +8846,7 @@ function mountEffectImpl(fiberFlags, hookFlags, create, deps) { function updateEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var destroy = undefined; + var destroy = undefined; // currentHook is null when rerendering after a render phase state update. if (currentHook !== null) { var prevEffect = currentHook.memoizedState; @@ -9047,13 +9064,11 @@ function updateCallback(callback, deps) { var nextDeps = deps === undefined ? null : deps; var prevState = hook.memoizedState; - if (prevState !== null) { - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -9077,16 +9092,13 @@ function mountMemo(nextCreate, deps) { function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var prevState = hook.memoizedState; + var prevState = hook.memoizedState; // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (prevState !== null) { - // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 1167daf09b8cc..a9a5dd50fc4eb 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -69,7 +69,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = "18.3.0-www-modern-96cdeaf89-20230224"; +var ReactVersion = "18.3.0-www-modern-a8f971b7a-20230224"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -7381,7 +7381,6 @@ function replaySuspendedComponentWithHooks( // only get reset when the component either completes (finishRenderingHooks) // or unwinds (resetHooksOnUnwind). { - hookTypesDev = current !== null ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; // Used for hot reloading: ignorePreviousDependencies = @@ -7413,8 +7412,14 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var children; do { - didScheduleRenderPhaseUpdateDuringThisPass = false; + if (didScheduleRenderPhaseUpdateDuringThisPass) { + // It's possible that a use() value depended on a state that was updated in + // this rerender, so we need to watch for different thenables this time. + thenableState = null; + } + thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = false; if (numberOfReRenders >= RE_RENDER_LIMIT) { throw new Error( @@ -7539,8 +7544,7 @@ function updateWorkInProgressHook() { // This function is used both for updates and for re-renders triggered by a // render phase update. It assumes there is either a current hook we can // clone, or a work-in-progress hook from a previous render pass that we can - // use as a base. When we reach the end of the base list, we must switch to - // the dispatcher used for mounts. + // use as a base. var nextCurrentHook; if (currentHook === null) { @@ -7576,14 +7580,10 @@ function updateWorkInProgressHook() { if (currentFiber === null) { // This is the initial render. This branch is reached when the component // suspends, resumes, then renders an additional hook. - var _newHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - nextCurrentHook = _newHook; + // Should never be reached because we should switch to the mount dispatcher first. + throw new Error( + "Update hook called on initial render. This is likely a bug in React. Please file an issue." + ); } else { // This is an update. We should always have a current hook. throw new Error("Rendered more hooks than during the previous render."); @@ -7639,7 +7639,24 @@ function use(usable) { thenableState = createThenableState(); } - return trackUsedThenable(thenableState, thenable, index); + var result = trackUsedThenable(thenableState, thenable, index); + + if ( + currentlyRenderingFiber$1.alternate === null && + (workInProgressHook === null + ? currentlyRenderingFiber$1.memoizedState === null + : workInProgressHook.next === null) + ) { + // Initial render, and either this is the first time the component is + // called, or there were no Hooks called after this use() the previous + // time (perhaps because it threw). Subsequent Hook calls should use the + // mount dispatcher. + { + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + } + } + + return result; } else if ( usable.$$typeof === REACT_CONTEXT_TYPE || usable.$$typeof === REACT_SERVER_CONTEXT_TYPE @@ -8585,7 +8602,7 @@ function mountEffectImpl(fiberFlags, hookFlags, create, deps) { function updateEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var destroy = undefined; + var destroy = undefined; // currentHook is null when rerendering after a render phase state update. if (currentHook !== null) { var prevEffect = currentHook.memoizedState; @@ -8803,13 +8820,11 @@ function updateCallback(callback, deps) { var nextDeps = deps === undefined ? null : deps; var prevState = hook.memoizedState; - if (prevState !== null) { - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -8833,16 +8848,13 @@ function mountMemo(nextCreate, deps) { function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var prevState = hook.memoizedState; + var prevState = hook.memoizedState; // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (prevState !== null) { - // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index d6ccfd512b5c0..ad0098d32254c 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -2261,8 +2261,9 @@ function finishRenderingHooks(current) { function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var numberOfReRenders = 0; do { - didScheduleRenderPhaseUpdateDuringThisPass = !1; + didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null); thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = !1; if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301)); numberOfReRenders += 1; workInProgressHook = currentHook = null; @@ -2319,16 +2320,11 @@ function updateWorkInProgressHook() { (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { - if (null === nextCurrentHook) + if (null === nextCurrentHook) { if (null === currentlyRenderingFiber$1.alternate) - nextCurrentHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - else throw Error(formatProdErrorMessage(310)); + throw Error(formatProdErrorMessage(467)); + throw Error(formatProdErrorMessage(310)); + } currentHook = nextCurrentHook; nextCurrentHook = { memoizedState: currentHook.memoizedState, @@ -2351,10 +2347,16 @@ createFunctionComponentUpdateQueue = function () { function use(usable) { if (null !== usable && "object" === typeof usable) { if ("function" === typeof usable.then) { - var index$29 = thenableIndexCounter; + var index$28 = thenableIndexCounter; thenableIndexCounter += 1; null === thenableState && (thenableState = []); - return trackUsedThenable(thenableState, usable, index$29); + usable = trackUsedThenable(thenableState, usable, index$28); + null === currentlyRenderingFiber$1.alternate && + (null === workInProgressHook + ? null === currentlyRenderingFiber$1.memoizedState + : null === workInProgressHook.next) && + (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + return usable; } if ( usable.$$typeof === REACT_CONTEXT_TYPE || @@ -2778,11 +2780,7 @@ function updateCallback(callback, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; hook.memoizedState = [callback, deps]; return callback; @@ -2791,11 +2789,7 @@ function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; shouldDoubleInvokeUserFnsInHooksDEV && nextCreate(); nextCreate = nextCreate(); @@ -5189,14 +5183,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$73 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$73 = lastTailNode), + for (var lastTailNode$72 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$72 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$73 + null === lastTailNode$72 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$73.sibling = null); + : (lastTailNode$72.sibling = null); } } function bubbleProperties(completedWork) { @@ -5206,19 +5200,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$74 = completedWork.child; null !== child$74; ) - (newChildLanes |= child$74.lanes | child$74.childLanes), - (subtreeFlags |= child$74.subtreeFlags & 14680064), - (subtreeFlags |= child$74.flags & 14680064), - (child$74.return = completedWork), - (child$74 = child$74.sibling); + for (var child$73 = completedWork.child; null !== child$73; ) + (newChildLanes |= child$73.lanes | child$73.childLanes), + (subtreeFlags |= child$73.subtreeFlags & 14680064), + (subtreeFlags |= child$73.flags & 14680064), + (child$73.return = completedWork), + (child$73 = child$73.sibling); else - for (child$74 = completedWork.child; null !== child$74; ) - (newChildLanes |= child$74.lanes | child$74.childLanes), - (subtreeFlags |= child$74.subtreeFlags), - (subtreeFlags |= child$74.flags), - (child$74.return = completedWork), - (child$74 = child$74.sibling); + for (child$73 = completedWork.child; null !== child$73; ) + (newChildLanes |= child$73.lanes | child$73.childLanes), + (subtreeFlags |= child$73.subtreeFlags), + (subtreeFlags |= child$73.flags), + (child$73.return = completedWork), + (child$73 = child$73.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -5397,11 +5391,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$78 = null; + var cache$77 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$78 = newProps.memoizedState.cachePool.pool); - cache$78 !== instance && (newProps.flags |= 2048); + (cache$77 = newProps.memoizedState.cachePool.pool); + cache$77 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -5431,8 +5425,8 @@ function completeWork(current, workInProgress, renderLanes) { instance = workInProgress.memoizedState; if (null === instance) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$78 = instance.rendering; - if (null === cache$78) + cache$77 = instance.rendering; + if (null === cache$77) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -5440,11 +5434,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$78 = findFirstSuspended(current); - if (null !== cache$78) { + cache$77 = findFirstSuspended(current); + if (null !== cache$77) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$78.updateQueue; + current = cache$77.updateQueue; null !== current && ((workInProgress.updateQueue = current), (workInProgress.flags |= 4)); @@ -5470,7 +5464,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$78)), null !== current)) { + if (((current = findFirstSuspended(cache$77)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -5481,7 +5475,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$78.alternate) + !cache$77.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -5493,13 +5487,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 8388608)); instance.isBackwards - ? ((cache$78.sibling = workInProgress.child), - (workInProgress.child = cache$78)) + ? ((cache$77.sibling = workInProgress.child), + (workInProgress.child = cache$77)) : ((current = instance.last), null !== current - ? (current.sibling = cache$78) - : (workInProgress.child = cache$78), - (instance.last = cache$78)); + ? (current.sibling = cache$77) + : (workInProgress.child = cache$77), + (instance.last = cache$77)); } if (null !== instance.tail) return ( @@ -5757,8 +5751,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$94) { - captureCommitPhaseError(current, nearestMountedAncestor, error$94); + } catch (error$93) { + captureCommitPhaseError(current, nearestMountedAncestor, error$93); } else ref.current = null; } @@ -5957,11 +5951,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$95) { + } catch (error$94) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$95 + error$94 ); } } @@ -6548,8 +6542,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$103) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$103); + } catch (error$102) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$102); } } break; @@ -6585,11 +6579,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null !== updatePayload) try { flags._applyProps(flags, newProps, current); - } catch (error$106) { + } catch (error$105) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$106 + error$105 ); } } @@ -6626,8 +6620,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== wakeables && suspenseCallback(new Set(wakeables)); } } - } catch (error$108) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$108); + } catch (error$107) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$107); } flags = finishedWork.updateQueue; null !== flags && @@ -6767,12 +6761,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$98 = JSCompiler_inline_result.stateNode.containerInfo, - before$99 = getHostSibling(finishedWork); + var parent$97 = JSCompiler_inline_result.stateNode.containerInfo, + before$98 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$99, - parent$98 + before$98, + parent$97 ); break; default: @@ -7233,9 +7227,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$117 = finishedWork.stateNode; + var instance$116 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$117._visibility & 4 + ? instance$116._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -7248,7 +7242,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$117._visibility |= 4), + : ((instance$116._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -7256,7 +7250,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$117._visibility |= 4), + : ((instance$116._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -7269,7 +7263,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$117 + instance$116 ); break; case 24: @@ -7825,16 +7819,16 @@ function performConcurrentWorkOnRoot(root, didTimeout) { didTimeout = renderRootSync(root, lanes); if (2 === didTimeout) { errorRetryLanes = lanes; - var errorRetryLanes$126 = getLanesToRetrySynchronouslyOnError( + var errorRetryLanes$125 = getLanesToRetrySynchronouslyOnError( root, errorRetryLanes ); - 0 !== errorRetryLanes$126 && - ((lanes = errorRetryLanes$126), + 0 !== errorRetryLanes$125 && + ((lanes = errorRetryLanes$125), (didTimeout = recoverFromConcurrentError( root, errorRetryLanes, - errorRetryLanes$126 + errorRetryLanes$125 ))); } if (1 === didTimeout) @@ -7888,11 +7882,11 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if ((lanes & 8388480) === lanes) break; didTimeout = root.eventTimes; for (originallyAttemptedLanes = -1; 0 < lanes; ) - (errorRetryLanes$126 = 31 - clz32(lanes)), - (errorRetryLanes = 1 << errorRetryLanes$126), - (errorRetryLanes$126 = didTimeout[errorRetryLanes$126]), - errorRetryLanes$126 > originallyAttemptedLanes && - (originallyAttemptedLanes = errorRetryLanes$126), + (errorRetryLanes$125 = 31 - clz32(lanes)), + (errorRetryLanes = 1 << errorRetryLanes$125), + (errorRetryLanes$125 = didTimeout[errorRetryLanes$125]), + errorRetryLanes$125 > originallyAttemptedLanes && + (originallyAttemptedLanes = errorRetryLanes$125), (lanes &= ~errorRetryLanes); lanes = originallyAttemptedLanes; lanes = now() - lanes; @@ -8190,8 +8184,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$129) { - handleThrow(root, thrownValue$129); + } catch (thrownValue$128) { + handleThrow(root, thrownValue$128); } while (1); resetContextDependencies(); @@ -8266,8 +8260,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$131) { - handleThrow(root, thrownValue$131); + } catch (thrownValue$130) { + handleThrow(root, thrownValue$130); } while (1); resetContextDependencies(); @@ -8425,10 +8419,10 @@ function unwindSuspendedUnitOfWork(unitOfWork, thrownValue) { }; suspenseBoundary.updateQueue = newOffscreenQueue; } else { - var wakeables$35 = offscreenQueue.wakeables; - null === wakeables$35 + var wakeables$34 = offscreenQueue.wakeables; + null === wakeables$34 ? (offscreenQueue.wakeables = new Set([wakeable])) - : wakeables$35.add(wakeable); + : wakeables$34.add(wakeable); } break; } @@ -9781,19 +9775,19 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component), - devToolsConfig$jscomp$inline_1128 = { + devToolsConfig$jscomp$inline_1127 = { findFiberByHostInstance: function () { return null; }, bundleType: 0, - version: "18.3.0-www-classic-96cdeaf89-20230224", + version: "18.3.0-www-classic-a8f971b7a-20230224", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1301 = { - bundleType: devToolsConfig$jscomp$inline_1128.bundleType, - version: devToolsConfig$jscomp$inline_1128.version, - rendererPackageName: devToolsConfig$jscomp$inline_1128.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1128.rendererConfig, +var internals$jscomp$inline_1300 = { + bundleType: devToolsConfig$jscomp$inline_1127.bundleType, + version: devToolsConfig$jscomp$inline_1127.version, + rendererPackageName: devToolsConfig$jscomp$inline_1127.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1127.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9810,26 +9804,26 @@ var internals$jscomp$inline_1301 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1128.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1127.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-96cdeaf89-20230224" + reconcilerVersion: "18.3.0-next-a8f971b7a-20230224" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1302 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1301 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1302.isDisabled && - hook$jscomp$inline_1302.supportsFiber + !hook$jscomp$inline_1301.isDisabled && + hook$jscomp$inline_1301.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1302.inject( - internals$jscomp$inline_1301 + (rendererID = hook$jscomp$inline_1301.inject( + internals$jscomp$inline_1300 )), - (injectedHook = hook$jscomp$inline_1302); + (injectedHook = hook$jscomp$inline_1301); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index d78702630de49..339e9dac87396 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -2067,8 +2067,9 @@ function finishRenderingHooks(current) { function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var numberOfReRenders = 0; do { - didScheduleRenderPhaseUpdateDuringThisPass = !1; + didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null); thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = !1; if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301)); numberOfReRenders += 1; workInProgressHook = currentHook = null; @@ -2125,16 +2126,11 @@ function updateWorkInProgressHook() { (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { - if (null === nextCurrentHook) + if (null === nextCurrentHook) { if (null === currentlyRenderingFiber$1.alternate) - nextCurrentHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - else throw Error(formatProdErrorMessage(310)); + throw Error(formatProdErrorMessage(467)); + throw Error(formatProdErrorMessage(310)); + } currentHook = nextCurrentHook; nextCurrentHook = { memoizedState: currentHook.memoizedState, @@ -2157,10 +2153,16 @@ createFunctionComponentUpdateQueue = function () { function use(usable) { if (null !== usable && "object" === typeof usable) { if ("function" === typeof usable.then) { - var index$29 = thenableIndexCounter; + var index$28 = thenableIndexCounter; thenableIndexCounter += 1; null === thenableState && (thenableState = []); - return trackUsedThenable(thenableState, usable, index$29); + usable = trackUsedThenable(thenableState, usable, index$28); + null === currentlyRenderingFiber$1.alternate && + (null === workInProgressHook + ? null === currentlyRenderingFiber$1.memoizedState + : null === workInProgressHook.next) && + (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + return usable; } if ( usable.$$typeof === REACT_CONTEXT_TYPE || @@ -2584,11 +2586,7 @@ function updateCallback(callback, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; hook.memoizedState = [callback, deps]; return callback; @@ -2597,11 +2595,7 @@ function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; shouldDoubleInvokeUserFnsInHooksDEV && nextCreate(); nextCreate = nextCreate(); @@ -4940,14 +4934,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$73 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$73 = lastTailNode), + for (var lastTailNode$72 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$72 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$73 + null === lastTailNode$72 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$73.sibling = null); + : (lastTailNode$72.sibling = null); } } function bubbleProperties(completedWork) { @@ -4957,19 +4951,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$74 = completedWork.child; null !== child$74; ) - (newChildLanes |= child$74.lanes | child$74.childLanes), - (subtreeFlags |= child$74.subtreeFlags & 14680064), - (subtreeFlags |= child$74.flags & 14680064), - (child$74.return = completedWork), - (child$74 = child$74.sibling); + for (var child$73 = completedWork.child; null !== child$73; ) + (newChildLanes |= child$73.lanes | child$73.childLanes), + (subtreeFlags |= child$73.subtreeFlags & 14680064), + (subtreeFlags |= child$73.flags & 14680064), + (child$73.return = completedWork), + (child$73 = child$73.sibling); else - for (child$74 = completedWork.child; null !== child$74; ) - (newChildLanes |= child$74.lanes | child$74.childLanes), - (subtreeFlags |= child$74.subtreeFlags), - (subtreeFlags |= child$74.flags), - (child$74.return = completedWork), - (child$74 = child$74.sibling); + for (child$73 = completedWork.child; null !== child$73; ) + (newChildLanes |= child$73.lanes | child$73.childLanes), + (subtreeFlags |= child$73.subtreeFlags), + (subtreeFlags |= child$73.flags), + (child$73.return = completedWork), + (child$73 = child$73.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -5142,11 +5136,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$78 = null; + var cache$77 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$78 = newProps.memoizedState.cachePool.pool); - cache$78 !== instance && (newProps.flags |= 2048); + (cache$77 = newProps.memoizedState.cachePool.pool); + cache$77 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -5172,8 +5166,8 @@ function completeWork(current, workInProgress, renderLanes) { instance = workInProgress.memoizedState; if (null === instance) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$78 = instance.rendering; - if (null === cache$78) + cache$77 = instance.rendering; + if (null === cache$77) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -5181,11 +5175,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$78 = findFirstSuspended(current); - if (null !== cache$78) { + cache$77 = findFirstSuspended(current); + if (null !== cache$77) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$78.updateQueue; + current = cache$77.updateQueue; null !== current && ((workInProgress.updateQueue = current), (workInProgress.flags |= 4)); @@ -5211,7 +5205,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$78)), null !== current)) { + if (((current = findFirstSuspended(cache$77)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -5222,7 +5216,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$78.alternate) + !cache$77.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -5234,13 +5228,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 8388608)); instance.isBackwards - ? ((cache$78.sibling = workInProgress.child), - (workInProgress.child = cache$78)) + ? ((cache$77.sibling = workInProgress.child), + (workInProgress.child = cache$77)) : ((current = instance.last), null !== current - ? (current.sibling = cache$78) - : (workInProgress.child = cache$78), - (instance.last = cache$78)); + ? (current.sibling = cache$77) + : (workInProgress.child = cache$77), + (instance.last = cache$77)); } if (null !== instance.tail) return ( @@ -5489,8 +5483,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$93) { - captureCommitPhaseError(current, nearestMountedAncestor, error$93); + } catch (error$92) { + captureCommitPhaseError(current, nearestMountedAncestor, error$92); } else ref.current = null; } @@ -5689,11 +5683,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$94) { + } catch (error$93) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$94 + error$93 ); } } @@ -6280,8 +6274,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$102) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$102); + } catch (error$101) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$101); } } break; @@ -6317,11 +6311,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null !== updatePayload) try { flags._applyProps(flags, newProps, current); - } catch (error$105) { + } catch (error$104) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$105 + error$104 ); } } @@ -6358,8 +6352,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== wakeables && suspenseCallback(new Set(wakeables)); } } - } catch (error$107) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$107); + } catch (error$106) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$106); } flags = finishedWork.updateQueue; null !== flags && @@ -6499,12 +6493,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$97 = JSCompiler_inline_result.stateNode.containerInfo, - before$98 = getHostSibling(finishedWork); + var parent$96 = JSCompiler_inline_result.stateNode.containerInfo, + before$97 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$98, - parent$97 + before$97, + parent$96 ); break; default: @@ -6965,9 +6959,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$116 = finishedWork.stateNode; + var instance$115 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$116._visibility & 4 + ? instance$115._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -6980,7 +6974,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$116._visibility |= 4), + : ((instance$115._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -6988,7 +6982,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$116._visibility |= 4), + : ((instance$115._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -7001,7 +6995,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$116 + instance$115 ); break; case 24: @@ -7557,16 +7551,16 @@ function performConcurrentWorkOnRoot(root, didTimeout) { didTimeout = renderRootSync(root, lanes); if (2 === didTimeout) { errorRetryLanes = lanes; - var errorRetryLanes$125 = getLanesToRetrySynchronouslyOnError( + var errorRetryLanes$124 = getLanesToRetrySynchronouslyOnError( root, errorRetryLanes ); - 0 !== errorRetryLanes$125 && - ((lanes = errorRetryLanes$125), + 0 !== errorRetryLanes$124 && + ((lanes = errorRetryLanes$124), (didTimeout = recoverFromConcurrentError( root, errorRetryLanes, - errorRetryLanes$125 + errorRetryLanes$124 ))); } if (1 === didTimeout) @@ -7620,11 +7614,11 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if ((lanes & 8388480) === lanes) break; didTimeout = root.eventTimes; for (originallyAttemptedLanes = -1; 0 < lanes; ) - (errorRetryLanes$125 = 31 - clz32(lanes)), - (errorRetryLanes = 1 << errorRetryLanes$125), - (errorRetryLanes$125 = didTimeout[errorRetryLanes$125]), - errorRetryLanes$125 > originallyAttemptedLanes && - (originallyAttemptedLanes = errorRetryLanes$125), + (errorRetryLanes$124 = 31 - clz32(lanes)), + (errorRetryLanes = 1 << errorRetryLanes$124), + (errorRetryLanes$124 = didTimeout[errorRetryLanes$124]), + errorRetryLanes$124 > originallyAttemptedLanes && + (originallyAttemptedLanes = errorRetryLanes$124), (lanes &= ~errorRetryLanes); lanes = originallyAttemptedLanes; lanes = now() - lanes; @@ -7922,8 +7916,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$128) { - handleThrow(root, thrownValue$128); + } catch (thrownValue$127) { + handleThrow(root, thrownValue$127); } while (1); resetContextDependencies(); @@ -7998,8 +7992,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$130) { - handleThrow(root, thrownValue$130); + } catch (thrownValue$129) { + handleThrow(root, thrownValue$129); } while (1); resetContextDependencies(); @@ -8157,10 +8151,10 @@ function unwindSuspendedUnitOfWork(unitOfWork, thrownValue) { }; suspenseBoundary.updateQueue = newOffscreenQueue; } else { - var wakeables$35 = offscreenQueue.wakeables; - null === wakeables$35 + var wakeables$34 = offscreenQueue.wakeables; + null === wakeables$34 ? (offscreenQueue.wakeables = new Set([wakeable])) - : wakeables$35.add(wakeable); + : wakeables$34.add(wakeable); } break; } @@ -9446,19 +9440,19 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component), - devToolsConfig$jscomp$inline_1108 = { + devToolsConfig$jscomp$inline_1107 = { findFiberByHostInstance: function () { return null; }, bundleType: 0, - version: "18.3.0-www-modern-96cdeaf89-20230224", + version: "18.3.0-www-modern-a8f971b7a-20230224", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1281 = { - bundleType: devToolsConfig$jscomp$inline_1108.bundleType, - version: devToolsConfig$jscomp$inline_1108.version, - rendererPackageName: devToolsConfig$jscomp$inline_1108.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1108.rendererConfig, +var internals$jscomp$inline_1280 = { + bundleType: devToolsConfig$jscomp$inline_1107.bundleType, + version: devToolsConfig$jscomp$inline_1107.version, + rendererPackageName: devToolsConfig$jscomp$inline_1107.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1107.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9475,26 +9469,26 @@ var internals$jscomp$inline_1281 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1108.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1107.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-96cdeaf89-20230224" + reconcilerVersion: "18.3.0-next-a8f971b7a-20230224" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1282 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1281 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1282.isDisabled && - hook$jscomp$inline_1282.supportsFiber + !hook$jscomp$inline_1281.isDisabled && + hook$jscomp$inline_1281.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1282.inject( - internals$jscomp$inline_1281 + (rendererID = hook$jscomp$inline_1281.inject( + internals$jscomp$inline_1280 )), - (injectedHook = hook$jscomp$inline_1282); + (injectedHook = hook$jscomp$inline_1281); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 5721e1a461295..84adbe0f054fd 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -21194,7 +21194,6 @@ function replaySuspendedComponentWithHooks( // only get reset when the component either completes (finishRenderingHooks) // or unwinds (resetHooksOnUnwind). { - hookTypesDev = current !== null ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; // Used for hot reloading: ignorePreviousDependencies = @@ -21226,8 +21225,14 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var children; do { - didScheduleRenderPhaseUpdateDuringThisPass = false; + if (didScheduleRenderPhaseUpdateDuringThisPass) { + // It's possible that a use() value depended on a state that was updated in + // this rerender, so we need to watch for different thenables this time. + thenableState = null; + } + thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = false; if (numberOfReRenders >= RE_RENDER_LIMIT) { throw new Error( @@ -21362,8 +21367,7 @@ function updateWorkInProgressHook() { // This function is used both for updates and for re-renders triggered by a // render phase update. It assumes there is either a current hook we can // clone, or a work-in-progress hook from a previous render pass that we can - // use as a base. When we reach the end of the base list, we must switch to - // the dispatcher used for mounts. + // use as a base. var nextCurrentHook; if (currentHook === null) { @@ -21399,14 +21403,10 @@ function updateWorkInProgressHook() { if (currentFiber === null) { // This is the initial render. This branch is reached when the component // suspends, resumes, then renders an additional hook. - var _newHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - nextCurrentHook = _newHook; + // Should never be reached because we should switch to the mount dispatcher first. + throw new Error( + "Update hook called on initial render. This is likely a bug in React. Please file an issue." + ); } else { // This is an update. We should always have a current hook. throw new Error("Rendered more hooks than during the previous render."); @@ -21462,7 +21462,24 @@ function use(usable) { thenableState = createThenableState(); } - return trackUsedThenable(thenableState, thenable, index); + var result = trackUsedThenable(thenableState, thenable, index); + + if ( + currentlyRenderingFiber$1.alternate === null && + (workInProgressHook === null + ? currentlyRenderingFiber$1.memoizedState === null + : workInProgressHook.next === null) + ) { + // Initial render, and either this is the first time the component is + // called, or there were no Hooks called after this use() the previous + // time (perhaps because it threw). Subsequent Hook calls should use the + // mount dispatcher. + { + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + } + } + + return result; } else if ( usable.$$typeof === REACT_CONTEXT_TYPE || usable.$$typeof === REACT_SERVER_CONTEXT_TYPE @@ -22430,7 +22447,7 @@ function mountEffectImpl(fiberFlags, hookFlags, create, deps) { function updateEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var destroy = undefined; + var destroy = undefined; // currentHook is null when rerendering after a render phase state update. if (currentHook !== null) { var prevEffect = currentHook.memoizedState; @@ -22648,13 +22665,11 @@ function updateCallback(callback, deps) { var nextDeps = deps === undefined ? null : deps; var prevState = hook.memoizedState; - if (prevState !== null) { - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -22678,16 +22693,13 @@ function mountMemo(nextCreate, deps) { function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var prevState = hook.memoizedState; + var prevState = hook.memoizedState; // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (prevState !== null) { - // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -41990,7 +42002,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-96cdeaf89-20230224"; +var ReactVersion = "18.3.0-www-classic-a8f971b7a-20230224"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index 6c4552666a443..023d93d385a56 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -20894,7 +20894,6 @@ function replaySuspendedComponentWithHooks( // only get reset when the component either completes (finishRenderingHooks) // or unwinds (resetHooksOnUnwind). { - hookTypesDev = current !== null ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; // Used for hot reloading: ignorePreviousDependencies = @@ -20926,8 +20925,14 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var children; do { - didScheduleRenderPhaseUpdateDuringThisPass = false; + if (didScheduleRenderPhaseUpdateDuringThisPass) { + // It's possible that a use() value depended on a state that was updated in + // this rerender, so we need to watch for different thenables this time. + thenableState = null; + } + thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = false; if (numberOfReRenders >= RE_RENDER_LIMIT) { throw new Error( @@ -21062,8 +21067,7 @@ function updateWorkInProgressHook() { // This function is used both for updates and for re-renders triggered by a // render phase update. It assumes there is either a current hook we can // clone, or a work-in-progress hook from a previous render pass that we can - // use as a base. When we reach the end of the base list, we must switch to - // the dispatcher used for mounts. + // use as a base. var nextCurrentHook; if (currentHook === null) { @@ -21099,14 +21103,10 @@ function updateWorkInProgressHook() { if (currentFiber === null) { // This is the initial render. This branch is reached when the component // suspends, resumes, then renders an additional hook. - var _newHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - nextCurrentHook = _newHook; + // Should never be reached because we should switch to the mount dispatcher first. + throw new Error( + "Update hook called on initial render. This is likely a bug in React. Please file an issue." + ); } else { // This is an update. We should always have a current hook. throw new Error("Rendered more hooks than during the previous render."); @@ -21162,7 +21162,24 @@ function use(usable) { thenableState = createThenableState(); } - return trackUsedThenable(thenableState, thenable, index); + var result = trackUsedThenable(thenableState, thenable, index); + + if ( + currentlyRenderingFiber$1.alternate === null && + (workInProgressHook === null + ? currentlyRenderingFiber$1.memoizedState === null + : workInProgressHook.next === null) + ) { + // Initial render, and either this is the first time the component is + // called, or there were no Hooks called after this use() the previous + // time (perhaps because it threw). Subsequent Hook calls should use the + // mount dispatcher. + { + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + } + } + + return result; } else if ( usable.$$typeof === REACT_CONTEXT_TYPE || usable.$$typeof === REACT_SERVER_CONTEXT_TYPE @@ -22130,7 +22147,7 @@ function mountEffectImpl(fiberFlags, hookFlags, create, deps) { function updateEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var destroy = undefined; + var destroy = undefined; // currentHook is null when rerendering after a render phase state update. if (currentHook !== null) { var prevEffect = currentHook.memoizedState; @@ -22348,13 +22365,11 @@ function updateCallback(callback, deps) { var nextDeps = deps === undefined ? null : deps; var prevState = hook.memoizedState; - if (prevState !== null) { - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -22378,16 +22393,13 @@ function mountMemo(nextCreate, deps) { function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var prevState = hook.memoizedState; + var prevState = hook.memoizedState; // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (prevState !== null) { - // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -41594,7 +41606,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-96cdeaf89-20230224"; +var ReactVersion = "18.3.0-www-modern-a8f971b7a-20230224"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index 2c0cc1a3e7149..84a9714ea0d90 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -3330,19 +3330,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$248; + var JSCompiler_inline_result$jscomp$247; if (canUseDOM) { - var isSupported$jscomp$inline_474 = "oninput" in document; - if (!isSupported$jscomp$inline_474) { - var element$jscomp$inline_475 = document.createElement("div"); - element$jscomp$inline_475.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_474 = - "function" === typeof element$jscomp$inline_475.oninput; + var isSupported$jscomp$inline_473 = "oninput" in document; + if (!isSupported$jscomp$inline_473) { + var element$jscomp$inline_474 = document.createElement("div"); + element$jscomp$inline_474.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_473 = + "function" === typeof element$jscomp$inline_474.oninput; } - JSCompiler_inline_result$jscomp$248 = isSupported$jscomp$inline_474; - } else JSCompiler_inline_result$jscomp$248 = !1; + JSCompiler_inline_result$jscomp$247 = isSupported$jscomp$inline_473; + } else JSCompiler_inline_result$jscomp$247 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$248 && + JSCompiler_inline_result$jscomp$247 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -3506,19 +3506,19 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_487 = 0; - i$jscomp$inline_487 < simpleEventPluginEvents.length; - i$jscomp$inline_487++ + var i$jscomp$inline_486 = 0; + i$jscomp$inline_486 < simpleEventPluginEvents.length; + i$jscomp$inline_486++ ) { - var eventName$jscomp$inline_488 = - simpleEventPluginEvents[i$jscomp$inline_487], - domEventName$jscomp$inline_489 = eventName$jscomp$inline_488.toLowerCase(), - capitalizedEvent$jscomp$inline_490 = - eventName$jscomp$inline_488[0].toUpperCase() + - eventName$jscomp$inline_488.slice(1); + var eventName$jscomp$inline_487 = + simpleEventPluginEvents[i$jscomp$inline_486], + domEventName$jscomp$inline_488 = eventName$jscomp$inline_487.toLowerCase(), + capitalizedEvent$jscomp$inline_489 = + eventName$jscomp$inline_487[0].toUpperCase() + + eventName$jscomp$inline_487.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_489, - "on" + capitalizedEvent$jscomp$inline_490 + domEventName$jscomp$inline_488, + "on" + capitalizedEvent$jscomp$inline_489 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -6659,8 +6659,9 @@ function finishRenderingHooks(current) { function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var numberOfReRenders = 0; do { - didScheduleRenderPhaseUpdateDuringThisPass = !1; + didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null); thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = !1; if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301)); numberOfReRenders += 1; workInProgressHook = currentHook = null; @@ -6722,16 +6723,11 @@ function updateWorkInProgressHook() { (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { - if (null === nextCurrentHook) + if (null === nextCurrentHook) { if (null === currentlyRenderingFiber$1.alternate) - nextCurrentHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - else throw Error(formatProdErrorMessage(310)); + throw Error(formatProdErrorMessage(467)); + throw Error(formatProdErrorMessage(310)); + } currentHook = nextCurrentHook; nextCurrentHook = { memoizedState: currentHook.memoizedState, @@ -6754,10 +6750,16 @@ createFunctionComponentUpdateQueue = function () { function use(usable) { if (null !== usable && "object" === typeof usable) { if ("function" === typeof usable.then) { - var index$77 = thenableIndexCounter; + var index$76 = thenableIndexCounter; thenableIndexCounter += 1; null === thenableState && (thenableState = []); - return trackUsedThenable(thenableState, usable, index$77); + usable = trackUsedThenable(thenableState, usable, index$76); + null === currentlyRenderingFiber$1.alternate && + (null === workInProgressHook + ? null === currentlyRenderingFiber$1.memoizedState + : null === workInProgressHook.next) && + (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + return usable; } if ( usable.$$typeof === REACT_CONTEXT_TYPE || @@ -7181,11 +7183,7 @@ function updateCallback(callback, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; hook.memoizedState = [callback, deps]; return callback; @@ -7194,11 +7192,7 @@ function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; shouldDoubleInvokeUserFnsInHooksDEV && nextCreate(); nextCreate = nextCreate(); @@ -7250,16 +7244,16 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$83 = enqueueUpdate(provider, fiber, lane); - if (null !== root$83) { + var root$82 = enqueueUpdate(provider, fiber, lane); + if (null !== root$82) { var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root$83, provider, lane, eventTime); - entangleTransitions(root$83, provider, lane); + scheduleUpdateOnFiber(root$82, provider, lane, eventTime); + entangleTransitions(root$82, provider, lane); } provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$83 && + null !== root$82 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -7466,15 +7460,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$79 = workInProgressRoot; - if (null === root$79) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$79, renderLanes$1) || + var root$78 = workInProgressRoot; + if (null === root$78) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$78, renderLanes$1) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$79 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$79; - mountEffect(subscribeToStore.bind(null, fiber, root$79, subscribe), [ + root$78 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$78; + mountEffect(subscribeToStore.bind(null, fiber, root$78, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -7483,7 +7477,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$79, + root$78, getServerSnapshot, getSnapshot ), @@ -7802,9 +7796,9 @@ function logCapturedError(boundary, errorInfo) { errorBoundary: null !== boundary && 1 === boundary.tag ? boundary.stateNode : null }) && console.error(errorInfo.value); - } catch (e$88) { + } catch (e$87) { setTimeout(function () { - throw e$88; + throw e$87; }); } } @@ -7982,10 +7976,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$94 = workInProgress.stateNode; + root$93 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$94.incompleteTransitions.has(transition)) { + if (!root$93.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -7993,11 +7987,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$94.incompleteTransitions.set(transition, markerInstance); + root$93.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$94.incompleteTransitions.forEach(function (markerInstance) { + root$93.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -8668,14 +8662,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } JSCompiler_temp = current.memoizedState; if (null !== JSCompiler_temp) { - var dehydrated$101 = JSCompiler_temp.dehydrated; - if (null !== dehydrated$101) + var dehydrated$100 = JSCompiler_temp.dehydrated; + if (null !== dehydrated$100) return updateDehydratedSuspenseComponent( current, workInProgress, didSuspend, nextProps, - dehydrated$101, + dehydrated$100, JSCompiler_temp, renderLanes ); @@ -8685,7 +8679,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { showFallback = nextProps.fallback; didSuspend = workInProgress.mode; JSCompiler_temp = current.child; - dehydrated$101 = JSCompiler_temp.sibling; + dehydrated$100 = JSCompiler_temp.sibling; var primaryChildProps = { mode: "hidden", children: nextProps.children }; 0 === (didSuspend & 1) && workInProgress.child !== JSCompiler_temp ? ((nextProps = workInProgress.child), @@ -8694,8 +8688,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.deletions = null)) : ((nextProps = createWorkInProgress(JSCompiler_temp, primaryChildProps)), (nextProps.subtreeFlags = JSCompiler_temp.subtreeFlags & 14680064)); - null !== dehydrated$101 - ? (showFallback = createWorkInProgress(dehydrated$101, showFallback)) + null !== dehydrated$100 + ? (showFallback = createWorkInProgress(dehydrated$100, showFallback)) : ((showFallback = createFiberFromFragment( showFallback, didSuspend, @@ -8714,10 +8708,10 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = didSuspend.cachePool), null !== JSCompiler_temp - ? ((dehydrated$101 = CacheContext._currentValue), + ? ((dehydrated$100 = CacheContext._currentValue), (JSCompiler_temp = - JSCompiler_temp.parent !== dehydrated$101 - ? { parent: dehydrated$101, pool: dehydrated$101 } + JSCompiler_temp.parent !== dehydrated$100 + ? { parent: dehydrated$100, pool: dehydrated$100 } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), (didSuspend = { @@ -8731,23 +8725,23 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), - (dehydrated$101 = showFallback.updateQueue), + (dehydrated$100 = showFallback.updateQueue), (primaryChildProps = current.updateQueue), - null === dehydrated$101 + null === dehydrated$100 ? (showFallback.updateQueue = { transitions: didSuspend, markerInstances: JSCompiler_temp, wakeables: null }) - : dehydrated$101 === primaryChildProps + : dehydrated$100 === primaryChildProps ? (showFallback.updateQueue = { transitions: didSuspend, markerInstances: JSCompiler_temp, wakeables: null !== primaryChildProps ? primaryChildProps.wakeables : null }) - : ((dehydrated$101.transitions = didSuspend), - (dehydrated$101.markerInstances = JSCompiler_temp)))); + : ((dehydrated$100.transitions = didSuspend), + (dehydrated$100.markerInstances = JSCompiler_temp)))); showFallback.childLanes = current.childLanes & ~renderLanes; workInProgress.memoizedState = SUSPENDED_MARKER; return nextProps; @@ -9834,14 +9828,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$132 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$132 = lastTailNode), + for (var lastTailNode$131 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$131 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$132 + null === lastTailNode$131 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$132.sibling = null); + : (lastTailNode$131.sibling = null); } } function bubbleProperties(completedWork) { @@ -9851,19 +9845,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$133 = completedWork.child; null !== child$133; ) - (newChildLanes |= child$133.lanes | child$133.childLanes), - (subtreeFlags |= child$133.subtreeFlags & 14680064), - (subtreeFlags |= child$133.flags & 14680064), - (child$133.return = completedWork), - (child$133 = child$133.sibling); + for (var child$132 = completedWork.child; null !== child$132; ) + (newChildLanes |= child$132.lanes | child$132.childLanes), + (subtreeFlags |= child$132.subtreeFlags & 14680064), + (subtreeFlags |= child$132.flags & 14680064), + (child$132.return = completedWork), + (child$132 = child$132.sibling); else - for (child$133 = completedWork.child; null !== child$133; ) - (newChildLanes |= child$133.lanes | child$133.childLanes), - (subtreeFlags |= child$133.subtreeFlags), - (subtreeFlags |= child$133.flags), - (child$133.return = completedWork), - (child$133 = child$133.sibling); + for (child$132 = completedWork.child; null !== child$132; ) + (newChildLanes |= child$132.lanes | child$132.childLanes), + (subtreeFlags |= child$132.subtreeFlags), + (subtreeFlags |= child$132.flags), + (child$132.return = completedWork), + (child$132 = child$132.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -10122,11 +10116,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$143 = null; + var cache$142 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$143 = newProps.memoizedState.cachePool.pool); - cache$143 !== type && (newProps.flags |= 2048); + (cache$142 = newProps.memoizedState.cachePool.pool); + cache$142 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -10162,8 +10156,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$143 = type.rendering; - if (null === cache$143) + cache$142 = type.rendering; + if (null === cache$142) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -10171,11 +10165,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$143 = findFirstSuspended(current); - if (null !== cache$143) { + cache$142 = findFirstSuspended(current); + if (null !== cache$142) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$143.updateQueue; + current = cache$142.updateQueue; null !== current && ((workInProgress.updateQueue = current), (workInProgress.flags |= 4)); @@ -10201,7 +10195,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$143)), null !== current)) { + if (((current = findFirstSuspended(cache$142)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -10212,7 +10206,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$143.alternate && + !cache$142.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -10225,13 +10219,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 8388608)); type.isBackwards - ? ((cache$143.sibling = workInProgress.child), - (workInProgress.child = cache$143)) + ? ((cache$142.sibling = workInProgress.child), + (workInProgress.child = cache$142)) : ((current = type.last), null !== current - ? (current.sibling = cache$143) - : (workInProgress.child = cache$143), - (type.last = cache$143)); + ? (current.sibling = cache$142) + : (workInProgress.child = cache$142), + (type.last = cache$142)); } if (null !== type.tail) return ( @@ -10488,8 +10482,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$159) { - captureCommitPhaseError(current, nearestMountedAncestor, error$159); + } catch (error$158) { + captureCommitPhaseError(current, nearestMountedAncestor, error$158); } else ref.current = null; } @@ -10796,11 +10790,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$161) { + } catch (error$160) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$161 + error$160 ); } } @@ -11474,8 +11468,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$174) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$174); + } catch (error$173) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$173); } } break; @@ -11667,11 +11661,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { attributeName ), (propValue[internalPropsKey] = attributeName); - } catch (error$175) { + } catch (error$174) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$175 + error$174 ); } break; @@ -11707,8 +11701,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { propName = finishedWork.stateNode; try { setTextContent(propName, ""); - } catch (error$176) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$176); + } catch (error$175) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$175); } } if ( @@ -11725,8 +11719,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, root, current, propName), (flags[internalPropsKey] = propName); - } catch (error$179) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$179); + } catch (error$178) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$178); } break; case 6: @@ -11739,8 +11733,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$180) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$180); + } catch (error$179) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$179); } } break; @@ -11753,8 +11747,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$181) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$181); + } catch (error$180) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$180); } break; case 4: @@ -11784,8 +11778,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== wakeables && suspenseCallback(new Set(wakeables)); } } - } catch (error$183) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$183); + } catch (error$182) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$182); } current = finishedWork.updateQueue; null !== current && @@ -11863,11 +11857,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = propName ? "" : root.memoizedProps; - } catch (error$164) { + } catch (error$163) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$164 + error$163 ); } } else if ( @@ -11942,21 +11936,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$165 = JSCompiler_inline_result.stateNode; + var parent$164 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$165, ""), + (setTextContent(parent$164, ""), (JSCompiler_inline_result.flags &= -33)); - var before$166 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$166, parent$165); + var before$165 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$165, parent$164); break; case 3: case 4: - var parent$167 = JSCompiler_inline_result.stateNode.containerInfo, - before$168 = getHostSibling(finishedWork); + var parent$166 = JSCompiler_inline_result.stateNode.containerInfo, + before$167 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$168, - parent$167 + before$167, + parent$166 ); break; default: @@ -12426,9 +12420,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$193 = finishedWork.stateNode; + var instance$192 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$193._visibility & 4 + ? instance$192._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12441,7 +12435,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$193._visibility |= 4), + : ((instance$192._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12449,7 +12443,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$193._visibility |= 4), + : ((instance$192._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12462,7 +12456,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$193 + instance$192 ); break; case 24: @@ -13014,16 +13008,16 @@ function performConcurrentWorkOnRoot(root, didTimeout) { didTimeout = renderRootSync(root, lanes); if (2 === didTimeout) { errorRetryLanes = lanes; - var errorRetryLanes$202 = getLanesToRetrySynchronouslyOnError( + var errorRetryLanes$201 = getLanesToRetrySynchronouslyOnError( root, errorRetryLanes ); - 0 !== errorRetryLanes$202 && - ((lanes = errorRetryLanes$202), + 0 !== errorRetryLanes$201 && + ((lanes = errorRetryLanes$201), (didTimeout = recoverFromConcurrentError( root, errorRetryLanes, - errorRetryLanes$202 + errorRetryLanes$201 ))); } if (1 === didTimeout) @@ -13077,11 +13071,11 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if ((lanes & 8388480) === lanes) break; didTimeout = root.eventTimes; for (originallyAttemptedLanes = -1; 0 < lanes; ) - (errorRetryLanes$202 = 31 - clz32(lanes)), - (errorRetryLanes = 1 << errorRetryLanes$202), - (errorRetryLanes$202 = didTimeout[errorRetryLanes$202]), - errorRetryLanes$202 > originallyAttemptedLanes && - (originallyAttemptedLanes = errorRetryLanes$202), + (errorRetryLanes$201 = 31 - clz32(lanes)), + (errorRetryLanes = 1 << errorRetryLanes$201), + (errorRetryLanes$201 = didTimeout[errorRetryLanes$201]), + errorRetryLanes$201 > originallyAttemptedLanes && + (originallyAttemptedLanes = errorRetryLanes$201), (lanes &= ~errorRetryLanes); lanes = originallyAttemptedLanes; lanes = now() - lanes; @@ -13417,8 +13411,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$205) { - handleThrow(root, thrownValue$205); + } catch (thrownValue$204) { + handleThrow(root, thrownValue$204); } while (1); resetContextDependencies(); @@ -13495,8 +13489,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$207) { - handleThrow(root, thrownValue$207); + } catch (thrownValue$206) { + handleThrow(root, thrownValue$206); } while (1); resetContextDependencies(); @@ -13644,10 +13638,10 @@ function unwindSuspendedUnitOfWork(unitOfWork, thrownValue) { }; suspenseBoundary.updateQueue = newOffscreenQueue; } else { - var wakeables$89 = offscreenQueue.wakeables; - null === wakeables$89 + var wakeables$88 = offscreenQueue.wakeables; + null === wakeables$88 ? (offscreenQueue.wakeables = new Set([wakeable])) - : wakeables$89.add(wakeable); + : wakeables$88.add(wakeable); } break; } @@ -13827,12 +13821,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$210 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$209 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$210 && + shouldFireAfterActiveInstanceBlur$209 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -13911,7 +13905,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$211 = rootWithPendingPassiveEffects, + var root$210 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -13927,7 +13921,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig.transition = prevTransition), - releaseRootPooledCache(root$211, remainingLanes); + releaseRootPooledCache(root$210, remainingLanes); } } return !1; @@ -15251,11 +15245,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$214); + var instance = getPublicRootInstance(root$213); originalCallback.call(instance); }; } - var root$214 = createHydrationContainer( + var root$213 = createHydrationContainer( initialChildren, callback, container, @@ -15267,23 +15261,23 @@ function legacyCreateRootFromDOMContainer( noopOnRecoverableError, null ); - container._reactRootContainer = root$214; - container[internalContainerInstanceKey] = root$214.current; + container._reactRootContainer = root$213; + container[internalContainerInstanceKey] = root$213.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$214; + return root$213; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$215 = callback; + var originalCallback$214 = callback; callback = function () { - var instance = getPublicRootInstance(root$216); - originalCallback$215.call(instance); + var instance = getPublicRootInstance(root$215); + originalCallback$214.call(instance); }; } - var root$216 = createFiberRoot( + var root$215 = createFiberRoot( container, 0, !1, @@ -15295,15 +15289,15 @@ function legacyCreateRootFromDOMContainer( noopOnRecoverableError, null ); - container._reactRootContainer = root$216; - container[internalContainerInstanceKey] = root$216.current; + container._reactRootContainer = root$215; + container[internalContainerInstanceKey] = root$215.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$216, parentComponent, callback); + updateContainer(initialChildren, root$215, parentComponent, callback); }); - return root$216; + return root$215; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -15357,12 +15351,12 @@ function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { _attemptSynchronousHydration = function (fiber) { switch (fiber.tag) { case 3: - var root$213 = fiber.stateNode; - if (root$213.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$213.pendingLanes); + var root$212 = fiber.stateNode; + if (root$212.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$212.pendingLanes); 0 !== lanes && - (markRootEntangled(root$213, lanes | 2), - ensureRootIsScheduled(root$213, now()), + (markRootEntangled(root$212, lanes | 2), + ensureRootIsScheduled(root$212, now()), 0 === (executionContext & 6) && (resetRenderTimer(), flushSyncCallbacks())); } @@ -15452,17 +15446,17 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates ]; -var devToolsConfig$jscomp$inline_1742 = { +var devToolsConfig$jscomp$inline_1741 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-96cdeaf89-20230224", + version: "18.3.0-www-classic-a8f971b7a-20230224", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2109 = { - bundleType: devToolsConfig$jscomp$inline_1742.bundleType, - version: devToolsConfig$jscomp$inline_1742.version, - rendererPackageName: devToolsConfig$jscomp$inline_1742.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1742.rendererConfig, +var internals$jscomp$inline_2108 = { + bundleType: devToolsConfig$jscomp$inline_1741.bundleType, + version: devToolsConfig$jscomp$inline_1741.version, + rendererPackageName: devToolsConfig$jscomp$inline_1741.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1741.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -15478,26 +15472,26 @@ var internals$jscomp$inline_2109 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1742.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1741.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-96cdeaf89-20230224" + reconcilerVersion: "18.3.0-next-a8f971b7a-20230224" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2110 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2109 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2110.isDisabled && - hook$jscomp$inline_2110.supportsFiber + !hook$jscomp$inline_2109.isDisabled && + hook$jscomp$inline_2109.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2110.inject( - internals$jscomp$inline_2109 + (rendererID = hook$jscomp$inline_2109.inject( + internals$jscomp$inline_2108 )), - (injectedHook = hook$jscomp$inline_2110); + (injectedHook = hook$jscomp$inline_2109); } catch (err) {} } assign(Internals, { @@ -15733,4 +15727,4 @@ exports.unstable_renderSubtreeIntoContainer = function ( ); }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-96cdeaf89-20230224"; +exports.version = "18.3.0-next-a8f971b7a-20230224"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index a77cbdd49b53a..23be9a65e6f74 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -2834,19 +2834,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$232; + var JSCompiler_inline_result$jscomp$231; if (canUseDOM) { - var isSupported$jscomp$inline_387 = "oninput" in document; - if (!isSupported$jscomp$inline_387) { - var element$jscomp$inline_388 = document.createElement("div"); - element$jscomp$inline_388.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_387 = - "function" === typeof element$jscomp$inline_388.oninput; + var isSupported$jscomp$inline_386 = "oninput" in document; + if (!isSupported$jscomp$inline_386) { + var element$jscomp$inline_387 = document.createElement("div"); + element$jscomp$inline_387.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_386 = + "function" === typeof element$jscomp$inline_387.oninput; } - JSCompiler_inline_result$jscomp$232 = isSupported$jscomp$inline_387; - } else JSCompiler_inline_result$jscomp$232 = !1; + JSCompiler_inline_result$jscomp$231 = isSupported$jscomp$inline_386; + } else JSCompiler_inline_result$jscomp$231 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$232 && + JSCompiler_inline_result$jscomp$231 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -3181,19 +3181,19 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_428 = 0; - i$jscomp$inline_428 < simpleEventPluginEvents.length; - i$jscomp$inline_428++ + var i$jscomp$inline_427 = 0; + i$jscomp$inline_427 < simpleEventPluginEvents.length; + i$jscomp$inline_427++ ) { - var eventName$jscomp$inline_429 = - simpleEventPluginEvents[i$jscomp$inline_428], - domEventName$jscomp$inline_430 = eventName$jscomp$inline_429.toLowerCase(), - capitalizedEvent$jscomp$inline_431 = - eventName$jscomp$inline_429[0].toUpperCase() + - eventName$jscomp$inline_429.slice(1); + var eventName$jscomp$inline_428 = + simpleEventPluginEvents[i$jscomp$inline_427], + domEventName$jscomp$inline_429 = eventName$jscomp$inline_428.toLowerCase(), + capitalizedEvent$jscomp$inline_430 = + eventName$jscomp$inline_428[0].toUpperCase() + + eventName$jscomp$inline_428.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_430, - "on" + capitalizedEvent$jscomp$inline_431 + domEventName$jscomp$inline_429, + "on" + capitalizedEvent$jscomp$inline_430 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -6465,8 +6465,9 @@ function finishRenderingHooks(current) { function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var numberOfReRenders = 0; do { - didScheduleRenderPhaseUpdateDuringThisPass = !1; + didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null); thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = !1; if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301)); numberOfReRenders += 1; workInProgressHook = currentHook = null; @@ -6528,16 +6529,11 @@ function updateWorkInProgressHook() { (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { - if (null === nextCurrentHook) + if (null === nextCurrentHook) { if (null === currentlyRenderingFiber$1.alternate) - nextCurrentHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - else throw Error(formatProdErrorMessage(310)); + throw Error(formatProdErrorMessage(467)); + throw Error(formatProdErrorMessage(310)); + } currentHook = nextCurrentHook; nextCurrentHook = { memoizedState: currentHook.memoizedState, @@ -6560,10 +6556,16 @@ createFunctionComponentUpdateQueue = function () { function use(usable) { if (null !== usable && "object" === typeof usable) { if ("function" === typeof usable.then) { - var index$78 = thenableIndexCounter; + var index$77 = thenableIndexCounter; thenableIndexCounter += 1; null === thenableState && (thenableState = []); - return trackUsedThenable(thenableState, usable, index$78); + usable = trackUsedThenable(thenableState, usable, index$77); + null === currentlyRenderingFiber$1.alternate && + (null === workInProgressHook + ? null === currentlyRenderingFiber$1.memoizedState + : null === workInProgressHook.next) && + (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + return usable; } if ( usable.$$typeof === REACT_CONTEXT_TYPE || @@ -6987,11 +6989,7 @@ function updateCallback(callback, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; hook.memoizedState = [callback, deps]; return callback; @@ -7000,11 +6998,7 @@ function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; shouldDoubleInvokeUserFnsInHooksDEV && nextCreate(); nextCreate = nextCreate(); @@ -7056,16 +7050,16 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$84 = enqueueUpdate(provider, fiber, lane); - if (null !== root$84) { + var root$83 = enqueueUpdate(provider, fiber, lane); + if (null !== root$83) { var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root$84, provider, lane, eventTime); - entangleTransitions(root$84, provider, lane); + scheduleUpdateOnFiber(root$83, provider, lane, eventTime); + entangleTransitions(root$83, provider, lane); } provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$84 && + null !== root$83 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -7272,15 +7266,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$80 = workInProgressRoot; - if (null === root$80) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$80, renderLanes$1) || + var root$79 = workInProgressRoot; + if (null === root$79) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$79, renderLanes$1) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$80 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$80; - mountEffect(subscribeToStore.bind(null, fiber, root$80, subscribe), [ + root$79 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$79; + mountEffect(subscribeToStore.bind(null, fiber, root$79, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -7289,7 +7283,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$80, + root$79, getServerSnapshot, getSnapshot ), @@ -7593,9 +7587,9 @@ function logCapturedError(boundary, errorInfo) { errorBoundary: null !== boundary && 1 === boundary.tag ? boundary.stateNode : null }) && console.error(errorInfo.value); - } catch (e$89) { + } catch (e$88) { setTimeout(function () { - throw e$89; + throw e$88; }); } } @@ -7773,10 +7767,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$95 = workInProgress.stateNode; + root$94 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$95.incompleteTransitions.has(transition)) { + if (!root$94.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -7784,11 +7778,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$95.incompleteTransitions.set(transition, markerInstance); + root$94.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$95.incompleteTransitions.forEach(function (markerInstance) { + root$94.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -8423,14 +8417,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } JSCompiler_temp = current.memoizedState; if (null !== JSCompiler_temp) { - var dehydrated$102 = JSCompiler_temp.dehydrated; - if (null !== dehydrated$102) + var dehydrated$101 = JSCompiler_temp.dehydrated; + if (null !== dehydrated$101) return updateDehydratedSuspenseComponent( current, workInProgress, didSuspend, nextProps, - dehydrated$102, + dehydrated$101, JSCompiler_temp, renderLanes ); @@ -8440,7 +8434,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { showFallback = nextProps.fallback; didSuspend = workInProgress.mode; JSCompiler_temp = current.child; - dehydrated$102 = JSCompiler_temp.sibling; + dehydrated$101 = JSCompiler_temp.sibling; var primaryChildProps = { mode: "hidden", children: nextProps.children }; 0 === (didSuspend & 1) && workInProgress.child !== JSCompiler_temp ? ((nextProps = workInProgress.child), @@ -8449,8 +8443,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.deletions = null)) : ((nextProps = createWorkInProgress(JSCompiler_temp, primaryChildProps)), (nextProps.subtreeFlags = JSCompiler_temp.subtreeFlags & 14680064)); - null !== dehydrated$102 - ? (showFallback = createWorkInProgress(dehydrated$102, showFallback)) + null !== dehydrated$101 + ? (showFallback = createWorkInProgress(dehydrated$101, showFallback)) : ((showFallback = createFiberFromFragment( showFallback, didSuspend, @@ -8469,10 +8463,10 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = didSuspend.cachePool), null !== JSCompiler_temp - ? ((dehydrated$102 = CacheContext._currentValue), + ? ((dehydrated$101 = CacheContext._currentValue), (JSCompiler_temp = - JSCompiler_temp.parent !== dehydrated$102 - ? { parent: dehydrated$102, pool: dehydrated$102 } + JSCompiler_temp.parent !== dehydrated$101 + ? { parent: dehydrated$101, pool: dehydrated$101 } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), (didSuspend = { @@ -8486,23 +8480,23 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), - (dehydrated$102 = showFallback.updateQueue), + (dehydrated$101 = showFallback.updateQueue), (primaryChildProps = current.updateQueue), - null === dehydrated$102 + null === dehydrated$101 ? (showFallback.updateQueue = { transitions: didSuspend, markerInstances: JSCompiler_temp, wakeables: null }) - : dehydrated$102 === primaryChildProps + : dehydrated$101 === primaryChildProps ? (showFallback.updateQueue = { transitions: didSuspend, markerInstances: JSCompiler_temp, wakeables: null !== primaryChildProps ? primaryChildProps.wakeables : null }) - : ((dehydrated$102.transitions = didSuspend), - (dehydrated$102.markerInstances = JSCompiler_temp)))); + : ((dehydrated$101.transitions = didSuspend), + (dehydrated$101.markerInstances = JSCompiler_temp)))); showFallback.childLanes = current.childLanes & ~renderLanes; workInProgress.memoizedState = SUSPENDED_MARKER; return nextProps; @@ -9585,14 +9579,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$133 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$133 = lastTailNode), + for (var lastTailNode$132 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$132 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$133 + null === lastTailNode$132 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$133.sibling = null); + : (lastTailNode$132.sibling = null); } } function bubbleProperties(completedWork) { @@ -9602,19 +9596,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$134 = completedWork.child; null !== child$134; ) - (newChildLanes |= child$134.lanes | child$134.childLanes), - (subtreeFlags |= child$134.subtreeFlags & 14680064), - (subtreeFlags |= child$134.flags & 14680064), - (child$134.return = completedWork), - (child$134 = child$134.sibling); + for (var child$133 = completedWork.child; null !== child$133; ) + (newChildLanes |= child$133.lanes | child$133.childLanes), + (subtreeFlags |= child$133.subtreeFlags & 14680064), + (subtreeFlags |= child$133.flags & 14680064), + (child$133.return = completedWork), + (child$133 = child$133.sibling); else - for (child$134 = completedWork.child; null !== child$134; ) - (newChildLanes |= child$134.lanes | child$134.childLanes), - (subtreeFlags |= child$134.subtreeFlags), - (subtreeFlags |= child$134.flags), - (child$134.return = completedWork), - (child$134 = child$134.sibling); + for (child$133 = completedWork.child; null !== child$133; ) + (newChildLanes |= child$133.lanes | child$133.childLanes), + (subtreeFlags |= child$133.subtreeFlags), + (subtreeFlags |= child$133.flags), + (child$133.return = completedWork), + (child$133 = child$133.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -9867,11 +9861,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$144 = null; + var cache$143 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$144 = newProps.memoizedState.cachePool.pool); - cache$144 !== type && (newProps.flags |= 2048); + (cache$143 = newProps.memoizedState.cachePool.pool); + cache$143 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -9903,8 +9897,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$144 = type.rendering; - if (null === cache$144) + cache$143 = type.rendering; + if (null === cache$143) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -9912,11 +9906,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$144 = findFirstSuspended(current); - if (null !== cache$144) { + cache$143 = findFirstSuspended(current); + if (null !== cache$143) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$144.updateQueue; + current = cache$143.updateQueue; null !== current && ((workInProgress.updateQueue = current), (workInProgress.flags |= 4)); @@ -9942,7 +9936,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$144)), null !== current)) { + if (((current = findFirstSuspended(cache$143)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -9953,7 +9947,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$144.alternate && + !cache$143.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -9966,13 +9960,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 8388608)); type.isBackwards - ? ((cache$144.sibling = workInProgress.child), - (workInProgress.child = cache$144)) + ? ((cache$143.sibling = workInProgress.child), + (workInProgress.child = cache$143)) : ((current = type.last), null !== current - ? (current.sibling = cache$144) - : (workInProgress.child = cache$144), - (type.last = cache$144)); + ? (current.sibling = cache$143) + : (workInProgress.child = cache$143), + (type.last = cache$143)); } if (null !== type.tail) return ( @@ -10220,8 +10214,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$159) { - captureCommitPhaseError(current, nearestMountedAncestor, error$159); + } catch (error$158) { + captureCommitPhaseError(current, nearestMountedAncestor, error$158); } else ref.current = null; } @@ -10541,11 +10535,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$161) { + } catch (error$160) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$161 + error$160 ); } } @@ -11219,8 +11213,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$174) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$174); + } catch (error$173) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$173); } } break; @@ -11412,11 +11406,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { attributeName ), (propValue[internalPropsKey] = attributeName); - } catch (error$175) { + } catch (error$174) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$175 + error$174 ); } break; @@ -11452,8 +11446,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { propName = finishedWork.stateNode; try { setTextContent(propName, ""); - } catch (error$176) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$176); + } catch (error$175) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$175); } } if ( @@ -11470,8 +11464,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, root, current, propName), (flags[internalPropsKey] = propName); - } catch (error$179) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$179); + } catch (error$178) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$178); } break; case 6: @@ -11484,8 +11478,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$180) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$180); + } catch (error$179) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$179); } } break; @@ -11498,8 +11492,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$181) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$181); + } catch (error$180) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$180); } break; case 4: @@ -11529,8 +11523,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== wakeables && suspenseCallback(new Set(wakeables)); } } - } catch (error$183) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$183); + } catch (error$182) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$182); } current = finishedWork.updateQueue; null !== current && @@ -11608,11 +11602,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = propName ? "" : root.memoizedProps; - } catch (error$164) { + } catch (error$163) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$164 + error$163 ); } } else if ( @@ -11687,21 +11681,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$165 = JSCompiler_inline_result.stateNode; + var parent$164 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$165, ""), + (setTextContent(parent$164, ""), (JSCompiler_inline_result.flags &= -33)); - var before$166 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$166, parent$165); + var before$165 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$165, parent$164); break; case 3: case 4: - var parent$167 = JSCompiler_inline_result.stateNode.containerInfo, - before$168 = getHostSibling(finishedWork); + var parent$166 = JSCompiler_inline_result.stateNode.containerInfo, + before$167 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$168, - parent$167 + before$167, + parent$166 ); break; default: @@ -12171,9 +12165,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$193 = finishedWork.stateNode; + var instance$192 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$193._visibility & 4 + ? instance$192._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12186,7 +12180,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$193._visibility |= 4), + : ((instance$192._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12194,7 +12188,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$193._visibility |= 4), + : ((instance$192._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12207,7 +12201,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$193 + instance$192 ); break; case 24: @@ -12759,16 +12753,16 @@ function performConcurrentWorkOnRoot(root, didTimeout) { didTimeout = renderRootSync(root, lanes); if (2 === didTimeout) { errorRetryLanes = lanes; - var errorRetryLanes$202 = getLanesToRetrySynchronouslyOnError( + var errorRetryLanes$201 = getLanesToRetrySynchronouslyOnError( root, errorRetryLanes ); - 0 !== errorRetryLanes$202 && - ((lanes = errorRetryLanes$202), + 0 !== errorRetryLanes$201 && + ((lanes = errorRetryLanes$201), (didTimeout = recoverFromConcurrentError( root, errorRetryLanes, - errorRetryLanes$202 + errorRetryLanes$201 ))); } if (1 === didTimeout) @@ -12822,11 +12816,11 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if ((lanes & 8388480) === lanes) break; didTimeout = root.eventTimes; for (originallyAttemptedLanes = -1; 0 < lanes; ) - (errorRetryLanes$202 = 31 - clz32(lanes)), - (errorRetryLanes = 1 << errorRetryLanes$202), - (errorRetryLanes$202 = didTimeout[errorRetryLanes$202]), - errorRetryLanes$202 > originallyAttemptedLanes && - (originallyAttemptedLanes = errorRetryLanes$202), + (errorRetryLanes$201 = 31 - clz32(lanes)), + (errorRetryLanes = 1 << errorRetryLanes$201), + (errorRetryLanes$201 = didTimeout[errorRetryLanes$201]), + errorRetryLanes$201 > originallyAttemptedLanes && + (originallyAttemptedLanes = errorRetryLanes$201), (lanes &= ~errorRetryLanes); lanes = originallyAttemptedLanes; lanes = now() - lanes; @@ -13162,8 +13156,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$205) { - handleThrow(root, thrownValue$205); + } catch (thrownValue$204) { + handleThrow(root, thrownValue$204); } while (1); resetContextDependencies(); @@ -13240,8 +13234,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$207) { - handleThrow(root, thrownValue$207); + } catch (thrownValue$206) { + handleThrow(root, thrownValue$206); } while (1); resetContextDependencies(); @@ -13389,10 +13383,10 @@ function unwindSuspendedUnitOfWork(unitOfWork, thrownValue) { }; suspenseBoundary.updateQueue = newOffscreenQueue; } else { - var wakeables$90 = offscreenQueue.wakeables; - null === wakeables$90 + var wakeables$89 = offscreenQueue.wakeables; + null === wakeables$89 ? (offscreenQueue.wakeables = new Set([wakeable])) - : wakeables$90.add(wakeable); + : wakeables$89.add(wakeable); } break; } @@ -13572,12 +13566,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$210 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$209 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$210 && + shouldFireAfterActiveInstanceBlur$209 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -13656,7 +13650,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$211 = rootWithPendingPassiveEffects, + var root$210 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -13672,7 +13666,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig.transition = prevTransition), - releaseRootPooledCache(root$211, remainingLanes); + releaseRootPooledCache(root$210, remainingLanes); } } return !1; @@ -14886,12 +14880,12 @@ function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { _attemptSynchronousHydration = function (fiber) { switch (fiber.tag) { case 3: - var root$213 = fiber.stateNode; - if (root$213.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$213.pendingLanes); + var root$212 = fiber.stateNode; + if (root$212.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$212.pendingLanes); 0 !== lanes && - (markRootEntangled(root$213, lanes | 2), - ensureRootIsScheduled(root$213, now()), + (markRootEntangled(root$212, lanes | 2), + ensureRootIsScheduled(root$212, now()), 0 === (executionContext & 6) && (resetRenderTimer(), flushSyncCallbacks())); } @@ -14981,17 +14975,17 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates ]; -var devToolsConfig$jscomp$inline_1701 = { +var devToolsConfig$jscomp$inline_1700 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-96cdeaf89-20230224", + version: "18.3.0-www-modern-a8f971b7a-20230224", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2073 = { - bundleType: devToolsConfig$jscomp$inline_1701.bundleType, - version: devToolsConfig$jscomp$inline_1701.version, - rendererPackageName: devToolsConfig$jscomp$inline_1701.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1701.rendererConfig, +var internals$jscomp$inline_2072 = { + bundleType: devToolsConfig$jscomp$inline_1700.bundleType, + version: devToolsConfig$jscomp$inline_1700.version, + rendererPackageName: devToolsConfig$jscomp$inline_1700.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1700.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -15008,26 +15002,26 @@ var internals$jscomp$inline_2073 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1701.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1700.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-96cdeaf89-20230224" + reconcilerVersion: "18.3.0-next-a8f971b7a-20230224" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2074 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2073 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2074.isDisabled && - hook$jscomp$inline_2074.supportsFiber + !hook$jscomp$inline_2073.isDisabled && + hook$jscomp$inline_2073.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2074.inject( - internals$jscomp$inline_2073 + (rendererID = hook$jscomp$inline_2073.inject( + internals$jscomp$inline_2072 )), - (injectedHook = hook$jscomp$inline_2074); + (injectedHook = hook$jscomp$inline_2073); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; @@ -15192,4 +15186,4 @@ exports.unstable_flushControlled = function (fn) { } }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-96cdeaf89-20230224"; +exports.version = "18.3.0-next-a8f971b7a-20230224"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index 9d65da88a2f90..5c3df37fceae3 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -3478,19 +3478,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$269; + var JSCompiler_inline_result$jscomp$268; if (canUseDOM) { - var isSupported$jscomp$inline_495 = "oninput" in document; - if (!isSupported$jscomp$inline_495) { - var element$jscomp$inline_496 = document.createElement("div"); - element$jscomp$inline_496.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_495 = - "function" === typeof element$jscomp$inline_496.oninput; + var isSupported$jscomp$inline_494 = "oninput" in document; + if (!isSupported$jscomp$inline_494) { + var element$jscomp$inline_495 = document.createElement("div"); + element$jscomp$inline_495.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_494 = + "function" === typeof element$jscomp$inline_495.oninput; } - JSCompiler_inline_result$jscomp$269 = isSupported$jscomp$inline_495; - } else JSCompiler_inline_result$jscomp$269 = !1; + JSCompiler_inline_result$jscomp$268 = isSupported$jscomp$inline_494; + } else JSCompiler_inline_result$jscomp$268 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$269 && + JSCompiler_inline_result$jscomp$268 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -3654,19 +3654,19 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_508 = 0; - i$jscomp$inline_508 < simpleEventPluginEvents.length; - i$jscomp$inline_508++ + var i$jscomp$inline_507 = 0; + i$jscomp$inline_507 < simpleEventPluginEvents.length; + i$jscomp$inline_507++ ) { - var eventName$jscomp$inline_509 = - simpleEventPluginEvents[i$jscomp$inline_508], - domEventName$jscomp$inline_510 = eventName$jscomp$inline_509.toLowerCase(), - capitalizedEvent$jscomp$inline_511 = - eventName$jscomp$inline_509[0].toUpperCase() + - eventName$jscomp$inline_509.slice(1); + var eventName$jscomp$inline_508 = + simpleEventPluginEvents[i$jscomp$inline_507], + domEventName$jscomp$inline_509 = eventName$jscomp$inline_508.toLowerCase(), + capitalizedEvent$jscomp$inline_510 = + eventName$jscomp$inline_508[0].toUpperCase() + + eventName$jscomp$inline_508.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_510, - "on" + capitalizedEvent$jscomp$inline_511 + domEventName$jscomp$inline_509, + "on" + capitalizedEvent$jscomp$inline_510 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -6807,8 +6807,9 @@ function finishRenderingHooks(current) { function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var numberOfReRenders = 0; do { - didScheduleRenderPhaseUpdateDuringThisPass = !1; + didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null); thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = !1; if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301)); numberOfReRenders += 1; workInProgressHook = currentHook = null; @@ -6870,16 +6871,11 @@ function updateWorkInProgressHook() { (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { - if (null === nextCurrentHook) + if (null === nextCurrentHook) { if (null === currentlyRenderingFiber$1.alternate) - nextCurrentHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - else throw Error(formatProdErrorMessage(310)); + throw Error(formatProdErrorMessage(467)); + throw Error(formatProdErrorMessage(310)); + } currentHook = nextCurrentHook; nextCurrentHook = { memoizedState: currentHook.memoizedState, @@ -6902,10 +6898,16 @@ createFunctionComponentUpdateQueue = function () { function use(usable) { if (null !== usable && "object" === typeof usable) { if ("function" === typeof usable.then) { - var index$80 = thenableIndexCounter; + var index$79 = thenableIndexCounter; thenableIndexCounter += 1; null === thenableState && (thenableState = []); - return trackUsedThenable(thenableState, usable, index$80); + usable = trackUsedThenable(thenableState, usable, index$79); + null === currentlyRenderingFiber$1.alternate && + (null === workInProgressHook + ? null === currentlyRenderingFiber$1.memoizedState + : null === workInProgressHook.next) && + (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + return usable; } if ( usable.$$typeof === REACT_CONTEXT_TYPE || @@ -7329,11 +7331,7 @@ function updateCallback(callback, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; hook.memoizedState = [callback, deps]; return callback; @@ -7342,11 +7340,7 @@ function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; shouldDoubleInvokeUserFnsInHooksDEV && nextCreate(); nextCreate = nextCreate(); @@ -7398,16 +7392,16 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$86 = enqueueUpdate(provider, fiber, lane); - if (null !== root$86) { + var root$85 = enqueueUpdate(provider, fiber, lane); + if (null !== root$85) { var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root$86, provider, lane, eventTime); - entangleTransitions(root$86, provider, lane); + scheduleUpdateOnFiber(root$85, provider, lane, eventTime); + entangleTransitions(root$85, provider, lane); } provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$86 && + null !== root$85 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -7616,15 +7610,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$82 = workInProgressRoot; - if (null === root$82) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$82, renderLanes$1) || + var root$81 = workInProgressRoot; + if (null === root$81) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$81, renderLanes$1) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$82 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$82; - mountEffect(subscribeToStore.bind(null, fiber, root$82, subscribe), [ + root$81 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$81; + mountEffect(subscribeToStore.bind(null, fiber, root$81, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -7633,7 +7627,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$82, + root$81, getServerSnapshot, getSnapshot ), @@ -8021,9 +8015,9 @@ function logCapturedError(boundary, errorInfo) { errorBoundary: null !== boundary && 1 === boundary.tag ? boundary.stateNode : null }) && console.error(errorInfo.value); - } catch (e$93) { + } catch (e$92) { setTimeout(function () { - throw e$93; + throw e$92; }); } } @@ -8201,10 +8195,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$99 = workInProgress.stateNode; + root$98 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$99.incompleteTransitions.has(transition)) { + if (!root$98.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -8212,11 +8206,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$99.incompleteTransitions.set(transition, markerInstance); + root$98.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$99.incompleteTransitions.forEach(function (markerInstance) { + root$98.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -8900,14 +8894,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } JSCompiler_temp = current.memoizedState; if (null !== JSCompiler_temp) { - var dehydrated$106 = JSCompiler_temp.dehydrated; - if (null !== dehydrated$106) + var dehydrated$105 = JSCompiler_temp.dehydrated; + if (null !== dehydrated$105) return updateDehydratedSuspenseComponent( current, workInProgress, didSuspend, nextProps, - dehydrated$106, + dehydrated$105, JSCompiler_temp, renderLanes ); @@ -8917,7 +8911,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { showFallback = nextProps.fallback; didSuspend = workInProgress.mode; JSCompiler_temp = current.child; - dehydrated$106 = JSCompiler_temp.sibling; + dehydrated$105 = JSCompiler_temp.sibling; var primaryChildProps = { mode: "hidden", children: nextProps.children }; 0 === (didSuspend & 1) && workInProgress.child !== JSCompiler_temp ? ((nextProps = workInProgress.child), @@ -8931,8 +8925,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.deletions = null)) : ((nextProps = createWorkInProgress(JSCompiler_temp, primaryChildProps)), (nextProps.subtreeFlags = JSCompiler_temp.subtreeFlags & 14680064)); - null !== dehydrated$106 - ? (showFallback = createWorkInProgress(dehydrated$106, showFallback)) + null !== dehydrated$105 + ? (showFallback = createWorkInProgress(dehydrated$105, showFallback)) : ((showFallback = createFiberFromFragment( showFallback, didSuspend, @@ -8951,10 +8945,10 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = didSuspend.cachePool), null !== JSCompiler_temp - ? ((dehydrated$106 = CacheContext._currentValue), + ? ((dehydrated$105 = CacheContext._currentValue), (JSCompiler_temp = - JSCompiler_temp.parent !== dehydrated$106 - ? { parent: dehydrated$106, pool: dehydrated$106 } + JSCompiler_temp.parent !== dehydrated$105 + ? { parent: dehydrated$105, pool: dehydrated$105 } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), (didSuspend = { @@ -8968,23 +8962,23 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), - (dehydrated$106 = showFallback.updateQueue), + (dehydrated$105 = showFallback.updateQueue), (primaryChildProps = current.updateQueue), - null === dehydrated$106 + null === dehydrated$105 ? (showFallback.updateQueue = { transitions: didSuspend, markerInstances: JSCompiler_temp, wakeables: null }) - : dehydrated$106 === primaryChildProps + : dehydrated$105 === primaryChildProps ? (showFallback.updateQueue = { transitions: didSuspend, markerInstances: JSCompiler_temp, wakeables: null !== primaryChildProps ? primaryChildProps.wakeables : null }) - : ((dehydrated$106.transitions = didSuspend), - (dehydrated$106.markerInstances = JSCompiler_temp)))); + : ((dehydrated$105.transitions = didSuspend), + (dehydrated$105.markerInstances = JSCompiler_temp)))); showFallback.childLanes = current.childLanes & ~renderLanes; workInProgress.memoizedState = SUSPENDED_MARKER; return nextProps; @@ -10084,14 +10078,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$138 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$138 = lastTailNode), + for (var lastTailNode$137 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$137 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$138 + null === lastTailNode$137 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$138.sibling = null); + : (lastTailNode$137.sibling = null); } } function bubbleProperties(completedWork) { @@ -10103,53 +10097,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$140 = completedWork.selfBaseDuration, - child$141 = completedWork.child; - null !== child$141; + var treeBaseDuration$139 = completedWork.selfBaseDuration, + child$140 = completedWork.child; + null !== child$140; ) - (newChildLanes |= child$141.lanes | child$141.childLanes), - (subtreeFlags |= child$141.subtreeFlags & 14680064), - (subtreeFlags |= child$141.flags & 14680064), - (treeBaseDuration$140 += child$141.treeBaseDuration), - (child$141 = child$141.sibling); - completedWork.treeBaseDuration = treeBaseDuration$140; + (newChildLanes |= child$140.lanes | child$140.childLanes), + (subtreeFlags |= child$140.subtreeFlags & 14680064), + (subtreeFlags |= child$140.flags & 14680064), + (treeBaseDuration$139 += child$140.treeBaseDuration), + (child$140 = child$140.sibling); + completedWork.treeBaseDuration = treeBaseDuration$139; } else for ( - treeBaseDuration$140 = completedWork.child; - null !== treeBaseDuration$140; + treeBaseDuration$139 = completedWork.child; + null !== treeBaseDuration$139; ) (newChildLanes |= - treeBaseDuration$140.lanes | treeBaseDuration$140.childLanes), - (subtreeFlags |= treeBaseDuration$140.subtreeFlags & 14680064), - (subtreeFlags |= treeBaseDuration$140.flags & 14680064), - (treeBaseDuration$140.return = completedWork), - (treeBaseDuration$140 = treeBaseDuration$140.sibling); + treeBaseDuration$139.lanes | treeBaseDuration$139.childLanes), + (subtreeFlags |= treeBaseDuration$139.subtreeFlags & 14680064), + (subtreeFlags |= treeBaseDuration$139.flags & 14680064), + (treeBaseDuration$139.return = completedWork), + (treeBaseDuration$139 = treeBaseDuration$139.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$140 = completedWork.actualDuration; - child$141 = completedWork.selfBaseDuration; + treeBaseDuration$139 = completedWork.actualDuration; + child$140 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$140 += child.actualDuration), - (child$141 += child.treeBaseDuration), + (treeBaseDuration$139 += child.actualDuration), + (child$140 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$140; - completedWork.treeBaseDuration = child$141; + completedWork.actualDuration = treeBaseDuration$139; + completedWork.treeBaseDuration = child$140; } else for ( - treeBaseDuration$140 = completedWork.child; - null !== treeBaseDuration$140; + treeBaseDuration$139 = completedWork.child; + null !== treeBaseDuration$139; ) (newChildLanes |= - treeBaseDuration$140.lanes | treeBaseDuration$140.childLanes), - (subtreeFlags |= treeBaseDuration$140.subtreeFlags), - (subtreeFlags |= treeBaseDuration$140.flags), - (treeBaseDuration$140.return = completedWork), - (treeBaseDuration$140 = treeBaseDuration$140.sibling); + treeBaseDuration$139.lanes | treeBaseDuration$139.childLanes), + (subtreeFlags |= treeBaseDuration$139.subtreeFlags), + (subtreeFlags |= treeBaseDuration$139.flags), + (treeBaseDuration$139.return = completedWork), + (treeBaseDuration$139 = treeBaseDuration$139.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -10424,11 +10418,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$154 = null; + var cache$153 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$154 = newProps.memoizedState.cachePool.pool); - cache$154 !== type && (newProps.flags |= 2048); + (cache$153 = newProps.memoizedState.cachePool.pool); + cache$153 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -10469,8 +10463,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$154 = type.rendering; - if (null === cache$154) + cache$153 = type.rendering; + if (null === cache$153) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -10478,11 +10472,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$154 = findFirstSuspended(current); - if (null !== cache$154) { + cache$153 = findFirstSuspended(current); + if (null !== cache$153) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$154.updateQueue; + current = cache$153.updateQueue; null !== current && ((workInProgress.updateQueue = current), (workInProgress.flags |= 4)); @@ -10508,7 +10502,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$154)), null !== current)) { + if (((current = findFirstSuspended(cache$153)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -10519,7 +10513,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$154.alternate && + !cache$153.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -10532,13 +10526,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 8388608)); type.isBackwards - ? ((cache$154.sibling = workInProgress.child), - (workInProgress.child = cache$154)) + ? ((cache$153.sibling = workInProgress.child), + (workInProgress.child = cache$153)) : ((current = type.last), null !== current - ? (current.sibling = cache$154) - : (workInProgress.child = cache$154), - (type.last = cache$154)); + ? (current.sibling = cache$153) + : (workInProgress.child = cache$153), + (type.last = cache$153)); } if (null !== type.tail) return ( @@ -10838,8 +10832,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$170) { - captureCommitPhaseError(current, nearestMountedAncestor, error$170); + } catch (error$169) { + captureCommitPhaseError(current, nearestMountedAncestor, error$169); } else ref.current = null; } @@ -11137,11 +11131,11 @@ function commitPassiveEffectDurations(finishedRoot, finishedWork) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id; _finishedWork$memoize = _finishedWork$memoize.onPostCommit; - var commitTime$172 = commitTime, + var commitTime$171 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof _finishedWork$memoize && - _finishedWork$memoize(id, phase, finishedRoot, commitTime$172); + _finishedWork$memoize(id, phase, finishedRoot, commitTime$171); finishedWork = finishedWork.return; a: for (; null !== finishedWork; ) { switch (finishedWork.tag) { @@ -11168,8 +11162,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$174) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$174); + } catch (error$173) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$173); } } function commitClassCallbacks(finishedWork) { @@ -11268,11 +11262,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$175) { + } catch (error$174) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$175 + error$174 ); } else { @@ -11289,11 +11283,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$176) { + } catch (error$175) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$176 + error$175 ); } recordLayoutEffectDuration(finishedWork); @@ -11304,11 +11298,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$177) { + } catch (error$176) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$177 + error$176 ); } } @@ -12007,22 +12001,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$192) { + } catch (error$191) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$192 + error$191 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$193) { + } catch (error$192) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$193 + error$192 ); } } @@ -12215,11 +12209,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { attributeName ), (propValue[internalPropsKey] = attributeName); - } catch (error$194) { + } catch (error$193) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$194 + error$193 ); } break; @@ -12255,8 +12249,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { propName = finishedWork.stateNode; try { setTextContent(propName, ""); - } catch (error$195) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$195); + } catch (error$194) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$194); } } if ( @@ -12273,8 +12267,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, root, current, propName), (flags[internalPropsKey] = propName); - } catch (error$198) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$198); + } catch (error$197) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$197); } break; case 6: @@ -12287,8 +12281,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$199) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$199); + } catch (error$198) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$198); } } break; @@ -12301,8 +12295,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$200) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$200); + } catch (error$199) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$199); } break; case 4: @@ -12332,8 +12326,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== wakeables && suspenseCallback(new Set(wakeables)); } } - } catch (error$202) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$202); + } catch (error$201) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$201); } current = finishedWork.updateQueue; null !== current && @@ -12411,11 +12405,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = propName ? "" : root.memoizedProps; - } catch (error$182) { + } catch (error$181) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$182 + error$181 ); } } else if ( @@ -12490,21 +12484,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$183 = JSCompiler_inline_result.stateNode; + var parent$182 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$183, ""), + (setTextContent(parent$182, ""), (JSCompiler_inline_result.flags &= -33)); - var before$184 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$184, parent$183); + var before$183 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$183, parent$182); break; case 3: case 4: - var parent$185 = JSCompiler_inline_result.stateNode.containerInfo, - before$186 = getHostSibling(finishedWork); + var parent$184 = JSCompiler_inline_result.stateNode.containerInfo, + before$185 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$186, - parent$185 + before$185, + parent$184 ); break; default: @@ -12696,8 +12690,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$208) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$208); + } catch (error$207) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$207); } } function commitOffscreenPassiveMountEffects(current, finishedWork, instance) { @@ -12996,9 +12990,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$213 = finishedWork.stateNode; + var instance$212 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$213._visibility & 4 + ? instance$212._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -13011,7 +13005,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$213._visibility |= 4), + : ((instance$212._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -13019,7 +13013,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$213._visibility |= 4), + : ((instance$212._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -13032,7 +13026,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$213 + instance$212 ); break; case 24: @@ -13622,16 +13616,16 @@ function performConcurrentWorkOnRoot(root, didTimeout) { didTimeout = renderRootSync(root, lanes); if (2 === didTimeout) { errorRetryLanes = lanes; - var errorRetryLanes$222 = getLanesToRetrySynchronouslyOnError( + var errorRetryLanes$221 = getLanesToRetrySynchronouslyOnError( root, errorRetryLanes ); - 0 !== errorRetryLanes$222 && - ((lanes = errorRetryLanes$222), + 0 !== errorRetryLanes$221 && + ((lanes = errorRetryLanes$221), (didTimeout = recoverFromConcurrentError( root, errorRetryLanes, - errorRetryLanes$222 + errorRetryLanes$221 ))); } if (1 === didTimeout) @@ -13685,11 +13679,11 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if ((lanes & 8388480) === lanes) break; didTimeout = root.eventTimes; for (originallyAttemptedLanes = -1; 0 < lanes; ) - (errorRetryLanes$222 = 31 - clz32(lanes)), - (errorRetryLanes = 1 << errorRetryLanes$222), - (errorRetryLanes$222 = didTimeout[errorRetryLanes$222]), - errorRetryLanes$222 > originallyAttemptedLanes && - (originallyAttemptedLanes = errorRetryLanes$222), + (errorRetryLanes$221 = 31 - clz32(lanes)), + (errorRetryLanes = 1 << errorRetryLanes$221), + (errorRetryLanes$221 = didTimeout[errorRetryLanes$221]), + errorRetryLanes$221 > originallyAttemptedLanes && + (originallyAttemptedLanes = errorRetryLanes$221), (lanes &= ~errorRetryLanes); lanes = originallyAttemptedLanes; lanes = now$1() - lanes; @@ -14058,8 +14052,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$225) { - handleThrow(root, thrownValue$225); + } catch (thrownValue$224) { + handleThrow(root, thrownValue$224); } while (1); resetContextDependencies(); @@ -14147,8 +14141,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$227) { - handleThrow(root, thrownValue$227); + } catch (thrownValue$226) { + handleThrow(root, thrownValue$226); } while (1); resetContextDependencies(); @@ -14316,10 +14310,10 @@ function unwindSuspendedUnitOfWork(unitOfWork, thrownValue) { }; suspenseBoundary.updateQueue = newOffscreenQueue; } else { - var wakeables$94 = offscreenQueue.wakeables; - null === wakeables$94 + var wakeables$93 = offscreenQueue.wakeables; + null === wakeables$93 ? (offscreenQueue.wakeables = new Set([wakeable])) - : wakeables$94.add(wakeable); + : wakeables$93.add(wakeable); } break; } @@ -14516,7 +14510,7 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$230 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$229 = commitBeforeMutationEffects( root, finishedWork ); @@ -14524,7 +14518,7 @@ function commitRootImpl( enableProfilerNestedUpdateScheduledHook && (rootCommittingMutationOrLayoutEffects = root); commitMutationEffects(root, finishedWork, lanes); - shouldFireAfterActiveInstanceBlur$230 && + shouldFireAfterActiveInstanceBlur$229 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -14618,7 +14612,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$231 = rootWithPendingPassiveEffects, + var root$230 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -14634,7 +14628,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig.transition = prevTransition), - releaseRootPooledCache(root$231, remainingLanes); + releaseRootPooledCache(root$230, remainingLanes); } } return !1; @@ -16021,11 +16015,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$235); + var instance = getPublicRootInstance(root$234); originalCallback.call(instance); }; } - var root$235 = createHydrationContainer( + var root$234 = createHydrationContainer( initialChildren, callback, container, @@ -16037,23 +16031,23 @@ function legacyCreateRootFromDOMContainer( noopOnRecoverableError, null ); - container._reactRootContainer = root$235; - container[internalContainerInstanceKey] = root$235.current; + container._reactRootContainer = root$234; + container[internalContainerInstanceKey] = root$234.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$235; + return root$234; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$236 = callback; + var originalCallback$235 = callback; callback = function () { - var instance = getPublicRootInstance(root$237); - originalCallback$236.call(instance); + var instance = getPublicRootInstance(root$236); + originalCallback$235.call(instance); }; } - var root$237 = createFiberRoot( + var root$236 = createFiberRoot( container, 0, !1, @@ -16065,15 +16059,15 @@ function legacyCreateRootFromDOMContainer( noopOnRecoverableError, null ); - container._reactRootContainer = root$237; - container[internalContainerInstanceKey] = root$237.current; + container._reactRootContainer = root$236; + container[internalContainerInstanceKey] = root$236.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$237, parentComponent, callback); + updateContainer(initialChildren, root$236, parentComponent, callback); }); - return root$237; + return root$236; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -16127,12 +16121,12 @@ function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { _attemptSynchronousHydration = function (fiber) { switch (fiber.tag) { case 3: - var root$234 = fiber.stateNode; - if (root$234.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$234.pendingLanes); + var root$233 = fiber.stateNode; + if (root$233.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$233.pendingLanes); 0 !== lanes && - (markRootEntangled(root$234, lanes | 2), - ensureRootIsScheduled(root$234, now$1()), + (markRootEntangled(root$233, lanes | 2), + ensureRootIsScheduled(root$233, now$1()), 0 === (executionContext & 6) && (resetRenderTimer(), flushSyncCallbacks())); } @@ -16222,10 +16216,10 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates ]; -var devToolsConfig$jscomp$inline_1822 = { +var devToolsConfig$jscomp$inline_1821 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-96cdeaf89-20230224", + version: "18.3.0-www-classic-a8f971b7a-20230224", rendererPackageName: "react-dom" }; (function (internals) { @@ -16243,10 +16237,10 @@ var devToolsConfig$jscomp$inline_1822 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1822.bundleType, - version: devToolsConfig$jscomp$inline_1822.version, - rendererPackageName: devToolsConfig$jscomp$inline_1822.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1822.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1821.bundleType, + version: devToolsConfig$jscomp$inline_1821.version, + rendererPackageName: devToolsConfig$jscomp$inline_1821.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1821.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -16262,14 +16256,14 @@ var devToolsConfig$jscomp$inline_1822 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1822.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1821.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-96cdeaf89-20230224" + reconcilerVersion: "18.3.0-next-a8f971b7a-20230224" }); assign(Internals, { ReactBrowserEventEmitter: { @@ -16504,7 +16498,7 @@ exports.unstable_renderSubtreeIntoContainer = function ( ); }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-96cdeaf89-20230224"; +exports.version = "18.3.0-next-a8f971b7a-20230224"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index a75f3474228a7..423232042c060 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -2978,19 +2978,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$253; + var JSCompiler_inline_result$jscomp$252; if (canUseDOM) { - var isSupported$jscomp$inline_408 = "oninput" in document; - if (!isSupported$jscomp$inline_408) { - var element$jscomp$inline_409 = document.createElement("div"); - element$jscomp$inline_409.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_408 = - "function" === typeof element$jscomp$inline_409.oninput; - } - JSCompiler_inline_result$jscomp$253 = isSupported$jscomp$inline_408; - } else JSCompiler_inline_result$jscomp$253 = !1; + var isSupported$jscomp$inline_407 = "oninput" in document; + if (!isSupported$jscomp$inline_407) { + var element$jscomp$inline_408 = document.createElement("div"); + element$jscomp$inline_408.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_407 = + "function" === typeof element$jscomp$inline_408.oninput; + } + JSCompiler_inline_result$jscomp$252 = isSupported$jscomp$inline_407; + } else JSCompiler_inline_result$jscomp$252 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$253 && + JSCompiler_inline_result$jscomp$252 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -3325,19 +3325,19 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_449 = 0; - i$jscomp$inline_449 < simpleEventPluginEvents.length; - i$jscomp$inline_449++ + var i$jscomp$inline_448 = 0; + i$jscomp$inline_448 < simpleEventPluginEvents.length; + i$jscomp$inline_448++ ) { - var eventName$jscomp$inline_450 = - simpleEventPluginEvents[i$jscomp$inline_449], - domEventName$jscomp$inline_451 = eventName$jscomp$inline_450.toLowerCase(), - capitalizedEvent$jscomp$inline_452 = - eventName$jscomp$inline_450[0].toUpperCase() + - eventName$jscomp$inline_450.slice(1); + var eventName$jscomp$inline_449 = + simpleEventPluginEvents[i$jscomp$inline_448], + domEventName$jscomp$inline_450 = eventName$jscomp$inline_449.toLowerCase(), + capitalizedEvent$jscomp$inline_451 = + eventName$jscomp$inline_449[0].toUpperCase() + + eventName$jscomp$inline_449.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_451, - "on" + capitalizedEvent$jscomp$inline_452 + domEventName$jscomp$inline_450, + "on" + capitalizedEvent$jscomp$inline_451 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -6609,8 +6609,9 @@ function finishRenderingHooks(current) { function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var numberOfReRenders = 0; do { - didScheduleRenderPhaseUpdateDuringThisPass = !1; + didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null); thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = !1; if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301)); numberOfReRenders += 1; workInProgressHook = currentHook = null; @@ -6672,16 +6673,11 @@ function updateWorkInProgressHook() { (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { - if (null === nextCurrentHook) + if (null === nextCurrentHook) { if (null === currentlyRenderingFiber$1.alternate) - nextCurrentHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - else throw Error(formatProdErrorMessage(310)); + throw Error(formatProdErrorMessage(467)); + throw Error(formatProdErrorMessage(310)); + } currentHook = nextCurrentHook; nextCurrentHook = { memoizedState: currentHook.memoizedState, @@ -6704,10 +6700,16 @@ createFunctionComponentUpdateQueue = function () { function use(usable) { if (null !== usable && "object" === typeof usable) { if ("function" === typeof usable.then) { - var index$81 = thenableIndexCounter; + var index$80 = thenableIndexCounter; thenableIndexCounter += 1; null === thenableState && (thenableState = []); - return trackUsedThenable(thenableState, usable, index$81); + usable = trackUsedThenable(thenableState, usable, index$80); + null === currentlyRenderingFiber$1.alternate && + (null === workInProgressHook + ? null === currentlyRenderingFiber$1.memoizedState + : null === workInProgressHook.next) && + (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + return usable; } if ( usable.$$typeof === REACT_CONTEXT_TYPE || @@ -7131,11 +7133,7 @@ function updateCallback(callback, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; hook.memoizedState = [callback, deps]; return callback; @@ -7144,11 +7142,7 @@ function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; shouldDoubleInvokeUserFnsInHooksDEV && nextCreate(); nextCreate = nextCreate(); @@ -7200,16 +7194,16 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$87 = enqueueUpdate(provider, fiber, lane); - if (null !== root$87) { + var root$86 = enqueueUpdate(provider, fiber, lane); + if (null !== root$86) { var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root$87, provider, lane, eventTime); - entangleTransitions(root$87, provider, lane); + scheduleUpdateOnFiber(root$86, provider, lane, eventTime); + entangleTransitions(root$86, provider, lane); } provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$87 && + null !== root$86 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -7418,15 +7412,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$83 = workInProgressRoot; - if (null === root$83) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$83, renderLanes$1) || + var root$82 = workInProgressRoot; + if (null === root$82) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$82, renderLanes$1) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$83 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$83; - mountEffect(subscribeToStore.bind(null, fiber, root$83, subscribe), [ + root$82 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$82; + mountEffect(subscribeToStore.bind(null, fiber, root$82, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -7435,7 +7429,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$83, + root$82, getServerSnapshot, getSnapshot ), @@ -7808,9 +7802,9 @@ function logCapturedError(boundary, errorInfo) { errorBoundary: null !== boundary && 1 === boundary.tag ? boundary.stateNode : null }) && console.error(errorInfo.value); - } catch (e$94) { + } catch (e$93) { setTimeout(function () { - throw e$94; + throw e$93; }); } } @@ -7988,10 +7982,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$100 = workInProgress.stateNode; + root$99 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$100.incompleteTransitions.has(transition)) { + if (!root$99.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -7999,11 +7993,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$100.incompleteTransitions.set(transition, markerInstance); + root$99.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$100.incompleteTransitions.forEach(function (markerInstance) { + root$99.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -8645,14 +8639,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } JSCompiler_temp = current.memoizedState; if (null !== JSCompiler_temp) { - var dehydrated$107 = JSCompiler_temp.dehydrated; - if (null !== dehydrated$107) + var dehydrated$106 = JSCompiler_temp.dehydrated; + if (null !== dehydrated$106) return updateDehydratedSuspenseComponent( current, workInProgress, didSuspend, nextProps, - dehydrated$107, + dehydrated$106, JSCompiler_temp, renderLanes ); @@ -8662,7 +8656,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { showFallback = nextProps.fallback; didSuspend = workInProgress.mode; JSCompiler_temp = current.child; - dehydrated$107 = JSCompiler_temp.sibling; + dehydrated$106 = JSCompiler_temp.sibling; var primaryChildProps = { mode: "hidden", children: nextProps.children }; 0 === (didSuspend & 1) && workInProgress.child !== JSCompiler_temp ? ((nextProps = workInProgress.child), @@ -8676,8 +8670,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.deletions = null)) : ((nextProps = createWorkInProgress(JSCompiler_temp, primaryChildProps)), (nextProps.subtreeFlags = JSCompiler_temp.subtreeFlags & 14680064)); - null !== dehydrated$107 - ? (showFallback = createWorkInProgress(dehydrated$107, showFallback)) + null !== dehydrated$106 + ? (showFallback = createWorkInProgress(dehydrated$106, showFallback)) : ((showFallback = createFiberFromFragment( showFallback, didSuspend, @@ -8696,10 +8690,10 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = didSuspend.cachePool), null !== JSCompiler_temp - ? ((dehydrated$107 = CacheContext._currentValue), + ? ((dehydrated$106 = CacheContext._currentValue), (JSCompiler_temp = - JSCompiler_temp.parent !== dehydrated$107 - ? { parent: dehydrated$107, pool: dehydrated$107 } + JSCompiler_temp.parent !== dehydrated$106 + ? { parent: dehydrated$106, pool: dehydrated$106 } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), (didSuspend = { @@ -8713,23 +8707,23 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), - (dehydrated$107 = showFallback.updateQueue), + (dehydrated$106 = showFallback.updateQueue), (primaryChildProps = current.updateQueue), - null === dehydrated$107 + null === dehydrated$106 ? (showFallback.updateQueue = { transitions: didSuspend, markerInstances: JSCompiler_temp, wakeables: null }) - : dehydrated$107 === primaryChildProps + : dehydrated$106 === primaryChildProps ? (showFallback.updateQueue = { transitions: didSuspend, markerInstances: JSCompiler_temp, wakeables: null !== primaryChildProps ? primaryChildProps.wakeables : null }) - : ((dehydrated$107.transitions = didSuspend), - (dehydrated$107.markerInstances = JSCompiler_temp)))); + : ((dehydrated$106.transitions = didSuspend), + (dehydrated$106.markerInstances = JSCompiler_temp)))); showFallback.childLanes = current.childLanes & ~renderLanes; workInProgress.memoizedState = SUSPENDED_MARKER; return nextProps; @@ -9825,14 +9819,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$139 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$139 = lastTailNode), + for (var lastTailNode$138 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$138 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$139 + null === lastTailNode$138 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$139.sibling = null); + : (lastTailNode$138.sibling = null); } } function bubbleProperties(completedWork) { @@ -9844,53 +9838,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$141 = completedWork.selfBaseDuration, - child$142 = completedWork.child; - null !== child$142; + var treeBaseDuration$140 = completedWork.selfBaseDuration, + child$141 = completedWork.child; + null !== child$141; ) - (newChildLanes |= child$142.lanes | child$142.childLanes), - (subtreeFlags |= child$142.subtreeFlags & 14680064), - (subtreeFlags |= child$142.flags & 14680064), - (treeBaseDuration$141 += child$142.treeBaseDuration), - (child$142 = child$142.sibling); - completedWork.treeBaseDuration = treeBaseDuration$141; + (newChildLanes |= child$141.lanes | child$141.childLanes), + (subtreeFlags |= child$141.subtreeFlags & 14680064), + (subtreeFlags |= child$141.flags & 14680064), + (treeBaseDuration$140 += child$141.treeBaseDuration), + (child$141 = child$141.sibling); + completedWork.treeBaseDuration = treeBaseDuration$140; } else for ( - treeBaseDuration$141 = completedWork.child; - null !== treeBaseDuration$141; + treeBaseDuration$140 = completedWork.child; + null !== treeBaseDuration$140; ) (newChildLanes |= - treeBaseDuration$141.lanes | treeBaseDuration$141.childLanes), - (subtreeFlags |= treeBaseDuration$141.subtreeFlags & 14680064), - (subtreeFlags |= treeBaseDuration$141.flags & 14680064), - (treeBaseDuration$141.return = completedWork), - (treeBaseDuration$141 = treeBaseDuration$141.sibling); + treeBaseDuration$140.lanes | treeBaseDuration$140.childLanes), + (subtreeFlags |= treeBaseDuration$140.subtreeFlags & 14680064), + (subtreeFlags |= treeBaseDuration$140.flags & 14680064), + (treeBaseDuration$140.return = completedWork), + (treeBaseDuration$140 = treeBaseDuration$140.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$141 = completedWork.actualDuration; - child$142 = completedWork.selfBaseDuration; + treeBaseDuration$140 = completedWork.actualDuration; + child$141 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$141 += child.actualDuration), - (child$142 += child.treeBaseDuration), + (treeBaseDuration$140 += child.actualDuration), + (child$141 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$141; - completedWork.treeBaseDuration = child$142; + completedWork.actualDuration = treeBaseDuration$140; + completedWork.treeBaseDuration = child$141; } else for ( - treeBaseDuration$141 = completedWork.child; - null !== treeBaseDuration$141; + treeBaseDuration$140 = completedWork.child; + null !== treeBaseDuration$140; ) (newChildLanes |= - treeBaseDuration$141.lanes | treeBaseDuration$141.childLanes), - (subtreeFlags |= treeBaseDuration$141.subtreeFlags), - (subtreeFlags |= treeBaseDuration$141.flags), - (treeBaseDuration$141.return = completedWork), - (treeBaseDuration$141 = treeBaseDuration$141.sibling); + treeBaseDuration$140.lanes | treeBaseDuration$140.childLanes), + (subtreeFlags |= treeBaseDuration$140.subtreeFlags), + (subtreeFlags |= treeBaseDuration$140.flags), + (treeBaseDuration$140.return = completedWork), + (treeBaseDuration$140 = treeBaseDuration$140.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -10159,11 +10153,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$155 = null; + var cache$154 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$155 = newProps.memoizedState.cachePool.pool); - cache$155 !== type && (newProps.flags |= 2048); + (cache$154 = newProps.memoizedState.cachePool.pool); + cache$154 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -10200,8 +10194,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$155 = type.rendering; - if (null === cache$155) + cache$154 = type.rendering; + if (null === cache$154) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -10209,11 +10203,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$155 = findFirstSuspended(current); - if (null !== cache$155) { + cache$154 = findFirstSuspended(current); + if (null !== cache$154) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$155.updateQueue; + current = cache$154.updateQueue; null !== current && ((workInProgress.updateQueue = current), (workInProgress.flags |= 4)); @@ -10239,7 +10233,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$155)), null !== current)) { + if (((current = findFirstSuspended(cache$154)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -10250,7 +10244,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$155.alternate && + !cache$154.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -10263,13 +10257,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 8388608)); type.isBackwards - ? ((cache$155.sibling = workInProgress.child), - (workInProgress.child = cache$155)) + ? ((cache$154.sibling = workInProgress.child), + (workInProgress.child = cache$154)) : ((current = type.last), null !== current - ? (current.sibling = cache$155) - : (workInProgress.child = cache$155), - (type.last = cache$155)); + ? (current.sibling = cache$154) + : (workInProgress.child = cache$154), + (type.last = cache$154)); } if (null !== type.tail) return ( @@ -10560,8 +10554,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$170) { - captureCommitPhaseError(current, nearestMountedAncestor, error$170); + } catch (error$169) { + captureCommitPhaseError(current, nearestMountedAncestor, error$169); } else ref.current = null; } @@ -10872,11 +10866,11 @@ function commitPassiveEffectDurations(finishedRoot, finishedWork) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id; _finishedWork$memoize = _finishedWork$memoize.onPostCommit; - var commitTime$172 = commitTime, + var commitTime$171 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof _finishedWork$memoize && - _finishedWork$memoize(id, phase, finishedRoot, commitTime$172); + _finishedWork$memoize(id, phase, finishedRoot, commitTime$171); finishedWork = finishedWork.return; a: for (; null !== finishedWork; ) { switch (finishedWork.tag) { @@ -10903,8 +10897,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$174) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$174); + } catch (error$173) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$173); } } function commitClassCallbacks(finishedWork) { @@ -11003,11 +10997,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$175) { + } catch (error$174) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$175 + error$174 ); } else { @@ -11024,11 +11018,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$176) { + } catch (error$175) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$176 + error$175 ); } recordLayoutEffectDuration(finishedWork); @@ -11039,11 +11033,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$177) { + } catch (error$176) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$177 + error$176 ); } } @@ -11742,22 +11736,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$192) { + } catch (error$191) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$192 + error$191 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$193) { + } catch (error$192) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$193 + error$192 ); } } @@ -11950,11 +11944,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { attributeName ), (propValue[internalPropsKey] = attributeName); - } catch (error$194) { + } catch (error$193) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$194 + error$193 ); } break; @@ -11990,8 +11984,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { propName = finishedWork.stateNode; try { setTextContent(propName, ""); - } catch (error$195) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$195); + } catch (error$194) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$194); } } if ( @@ -12008,8 +12002,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, root, current, propName), (flags[internalPropsKey] = propName); - } catch (error$198) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$198); + } catch (error$197) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$197); } break; case 6: @@ -12022,8 +12016,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$199) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$199); + } catch (error$198) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$198); } } break; @@ -12036,8 +12030,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$200) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$200); + } catch (error$199) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$199); } break; case 4: @@ -12067,8 +12061,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== wakeables && suspenseCallback(new Set(wakeables)); } } - } catch (error$202) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$202); + } catch (error$201) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$201); } current = finishedWork.updateQueue; null !== current && @@ -12146,11 +12140,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = propName ? "" : root.memoizedProps; - } catch (error$182) { + } catch (error$181) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$182 + error$181 ); } } else if ( @@ -12225,21 +12219,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$183 = JSCompiler_inline_result.stateNode; + var parent$182 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$183, ""), + (setTextContent(parent$182, ""), (JSCompiler_inline_result.flags &= -33)); - var before$184 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$184, parent$183); + var before$183 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$183, parent$182); break; case 3: case 4: - var parent$185 = JSCompiler_inline_result.stateNode.containerInfo, - before$186 = getHostSibling(finishedWork); + var parent$184 = JSCompiler_inline_result.stateNode.containerInfo, + before$185 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$186, - parent$185 + before$185, + parent$184 ); break; default: @@ -12431,8 +12425,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$208) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$208); + } catch (error$207) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$207); } } function commitOffscreenPassiveMountEffects(current, finishedWork, instance) { @@ -12731,9 +12725,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$213 = finishedWork.stateNode; + var instance$212 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$213._visibility & 4 + ? instance$212._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12746,7 +12740,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$213._visibility |= 4), + : ((instance$212._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12754,7 +12748,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$213._visibility |= 4), + : ((instance$212._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12767,7 +12761,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$213 + instance$212 ); break; case 24: @@ -13357,16 +13351,16 @@ function performConcurrentWorkOnRoot(root, didTimeout) { didTimeout = renderRootSync(root, lanes); if (2 === didTimeout) { errorRetryLanes = lanes; - var errorRetryLanes$222 = getLanesToRetrySynchronouslyOnError( + var errorRetryLanes$221 = getLanesToRetrySynchronouslyOnError( root, errorRetryLanes ); - 0 !== errorRetryLanes$222 && - ((lanes = errorRetryLanes$222), + 0 !== errorRetryLanes$221 && + ((lanes = errorRetryLanes$221), (didTimeout = recoverFromConcurrentError( root, errorRetryLanes, - errorRetryLanes$222 + errorRetryLanes$221 ))); } if (1 === didTimeout) @@ -13420,11 +13414,11 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if ((lanes & 8388480) === lanes) break; didTimeout = root.eventTimes; for (originallyAttemptedLanes = -1; 0 < lanes; ) - (errorRetryLanes$222 = 31 - clz32(lanes)), - (errorRetryLanes = 1 << errorRetryLanes$222), - (errorRetryLanes$222 = didTimeout[errorRetryLanes$222]), - errorRetryLanes$222 > originallyAttemptedLanes && - (originallyAttemptedLanes = errorRetryLanes$222), + (errorRetryLanes$221 = 31 - clz32(lanes)), + (errorRetryLanes = 1 << errorRetryLanes$221), + (errorRetryLanes$221 = didTimeout[errorRetryLanes$221]), + errorRetryLanes$221 > originallyAttemptedLanes && + (originallyAttemptedLanes = errorRetryLanes$221), (lanes &= ~errorRetryLanes); lanes = originallyAttemptedLanes; lanes = now$1() - lanes; @@ -13793,8 +13787,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$225) { - handleThrow(root, thrownValue$225); + } catch (thrownValue$224) { + handleThrow(root, thrownValue$224); } while (1); resetContextDependencies(); @@ -13882,8 +13876,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$227) { - handleThrow(root, thrownValue$227); + } catch (thrownValue$226) { + handleThrow(root, thrownValue$226); } while (1); resetContextDependencies(); @@ -14051,10 +14045,10 @@ function unwindSuspendedUnitOfWork(unitOfWork, thrownValue) { }; suspenseBoundary.updateQueue = newOffscreenQueue; } else { - var wakeables$95 = offscreenQueue.wakeables; - null === wakeables$95 + var wakeables$94 = offscreenQueue.wakeables; + null === wakeables$94 ? (offscreenQueue.wakeables = new Set([wakeable])) - : wakeables$95.add(wakeable); + : wakeables$94.add(wakeable); } break; } @@ -14251,7 +14245,7 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$230 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$229 = commitBeforeMutationEffects( root, finishedWork ); @@ -14259,7 +14253,7 @@ function commitRootImpl( enableProfilerNestedUpdateScheduledHook && (rootCommittingMutationOrLayoutEffects = root); commitMutationEffects(root, finishedWork, lanes); - shouldFireAfterActiveInstanceBlur$230 && + shouldFireAfterActiveInstanceBlur$229 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -14353,7 +14347,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$231 = rootWithPendingPassiveEffects, + var root$230 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -14369,7 +14363,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig.transition = prevTransition), - releaseRootPooledCache(root$231, remainingLanes); + releaseRootPooledCache(root$230, remainingLanes); } } return !1; @@ -15646,12 +15640,12 @@ function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { _attemptSynchronousHydration = function (fiber) { switch (fiber.tag) { case 3: - var root$234 = fiber.stateNode; - if (root$234.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$234.pendingLanes); + var root$233 = fiber.stateNode; + if (root$233.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$233.pendingLanes); 0 !== lanes && - (markRootEntangled(root$234, lanes | 2), - ensureRootIsScheduled(root$234, now$1()), + (markRootEntangled(root$233, lanes | 2), + ensureRootIsScheduled(root$233, now$1()), 0 === (executionContext & 6) && (resetRenderTimer(), flushSyncCallbacks())); } @@ -15741,10 +15735,10 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates ]; -var devToolsConfig$jscomp$inline_1781 = { +var devToolsConfig$jscomp$inline_1780 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-96cdeaf89-20230224", + version: "18.3.0-www-modern-a8f971b7a-20230224", rendererPackageName: "react-dom" }; (function (internals) { @@ -15762,10 +15756,10 @@ var devToolsConfig$jscomp$inline_1781 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1781.bundleType, - version: devToolsConfig$jscomp$inline_1781.version, - rendererPackageName: devToolsConfig$jscomp$inline_1781.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1781.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1780.bundleType, + version: devToolsConfig$jscomp$inline_1780.version, + rendererPackageName: devToolsConfig$jscomp$inline_1780.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1780.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -15782,14 +15776,14 @@ var devToolsConfig$jscomp$inline_1781 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1781.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1780.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-96cdeaf89-20230224" + reconcilerVersion: "18.3.0-next-a8f971b7a-20230224" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; exports.createPortal = function (children, container) { @@ -15953,7 +15947,7 @@ exports.unstable_flushControlled = function (fn) { } }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-96cdeaf89-20230224"; +exports.version = "18.3.0-next-a8f971b7a-20230224"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index 3bc4f70c2988a..db558051db08f 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); -var ReactVersion = "18.3.0-www-classic-96cdeaf89-20230224"; +var ReactVersion = "18.3.0-www-classic-a8f971b7a-20230224"; // This refers to a WWW module. var warningWWW = require("warning"); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 090569c8bcd37..ece06c49151fd 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); -var ReactVersion = "18.3.0-www-modern-96cdeaf89-20230224"; +var ReactVersion = "18.3.0-www-modern-a8f971b7a-20230224"; // This refers to a WWW module. var warningWWW = require("warning"); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index dda64010e4a9e..dd5ab5eb2e99d 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -3670,4 +3670,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 = "18.3.0-www-classic-96cdeaf89-20230224"; +exports.version = "18.3.0-www-classic-a8f971b7a-20230224"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index f7cddb32aec55..0d143a8758479 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -3568,4 +3568,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 = "18.3.0-www-modern-96cdeaf89-20230224"; +exports.version = "18.3.0-www-modern-a8f971b7a-20230224"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index 0e229012b6fda..39939e88d1463 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -13201,7 +13201,6 @@ function replaySuspendedComponentWithHooks( // only get reset when the component either completes (finishRenderingHooks) // or unwinds (resetHooksOnUnwind). { - hookTypesDev = current !== null ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; // Used for hot reloading: ignorePreviousDependencies = @@ -13233,8 +13232,14 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var children; do { - didScheduleRenderPhaseUpdateDuringThisPass = false; + if (didScheduleRenderPhaseUpdateDuringThisPass) { + // It's possible that a use() value depended on a state that was updated in + // this rerender, so we need to watch for different thenables this time. + thenableState = null; + } + thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = false; if (numberOfReRenders >= RE_RENDER_LIMIT) { throw new Error( @@ -13369,8 +13374,7 @@ function updateWorkInProgressHook() { // This function is used both for updates and for re-renders triggered by a // render phase update. It assumes there is either a current hook we can // clone, or a work-in-progress hook from a previous render pass that we can - // use as a base. When we reach the end of the base list, we must switch to - // the dispatcher used for mounts. + // use as a base. var nextCurrentHook; if (currentHook === null) { @@ -13406,14 +13410,10 @@ function updateWorkInProgressHook() { if (currentFiber === null) { // This is the initial render. This branch is reached when the component // suspends, resumes, then renders an additional hook. - var _newHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - nextCurrentHook = _newHook; + // Should never be reached because we should switch to the mount dispatcher first. + throw new Error( + "Update hook called on initial render. This is likely a bug in React. Please file an issue." + ); } else { // This is an update. We should always have a current hook. throw new Error("Rendered more hooks than during the previous render."); @@ -13468,7 +13468,24 @@ function use(usable) { thenableState = createThenableState(); } - return trackUsedThenable(thenableState, thenable, index); + var result = trackUsedThenable(thenableState, thenable, index); + + if ( + currentlyRenderingFiber$1.alternate === null && + (workInProgressHook === null + ? currentlyRenderingFiber$1.memoizedState === null + : workInProgressHook.next === null) + ) { + // Initial render, and either this is the first time the component is + // called, or there were no Hooks called after this use() the previous + // time (perhaps because it threw). Subsequent Hook calls should use the + // mount dispatcher. + { + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + } + } + + return result; } else if ( usable.$$typeof === REACT_CONTEXT_TYPE || usable.$$typeof === REACT_SERVER_CONTEXT_TYPE @@ -14293,7 +14310,7 @@ function mountEffectImpl(fiberFlags, hookFlags, create, deps) { function updateEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var destroy = undefined; + var destroy = undefined; // currentHook is null when rerendering after a render phase state update. if (currentHook !== null) { var prevEffect = currentHook.memoizedState; @@ -14455,13 +14472,11 @@ function updateCallback(callback, deps) { var nextDeps = deps === undefined ? null : deps; var prevState = hook.memoizedState; - if (prevState !== null) { - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -14485,16 +14500,13 @@ function mountMemo(nextCreate, deps) { function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var prevState = hook.memoizedState; + var prevState = hook.memoizedState; // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (prevState !== null) { - // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -31227,7 +31239,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-96cdeaf89-20230224"; +var ReactVersion = "18.3.0-www-classic-a8f971b7a-20230224"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 4fd560a96105c..919d4f61e7b3e 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -19804,7 +19804,6 @@ function replaySuspendedComponentWithHooks( // only get reset when the component either completes (finishRenderingHooks) // or unwinds (resetHooksOnUnwind). { - hookTypesDev = current !== null ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; // Used for hot reloading: ignorePreviousDependencies = @@ -19836,8 +19835,14 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var children; do { - didScheduleRenderPhaseUpdateDuringThisPass = false; + if (didScheduleRenderPhaseUpdateDuringThisPass) { + // It's possible that a use() value depended on a state that was updated in + // this rerender, so we need to watch for different thenables this time. + thenableState = null; + } + thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = false; if (numberOfReRenders >= RE_RENDER_LIMIT) { throw new Error( @@ -19972,8 +19977,7 @@ function updateWorkInProgressHook() { // This function is used both for updates and for re-renders triggered by a // render phase update. It assumes there is either a current hook we can // clone, or a work-in-progress hook from a previous render pass that we can - // use as a base. When we reach the end of the base list, we must switch to - // the dispatcher used for mounts. + // use as a base. var nextCurrentHook; if (currentHook === null) { @@ -20009,14 +20013,10 @@ function updateWorkInProgressHook() { if (currentFiber === null) { // This is the initial render. This branch is reached when the component // suspends, resumes, then renders an additional hook. - var _newHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - nextCurrentHook = _newHook; + // Should never be reached because we should switch to the mount dispatcher first. + throw new Error( + "Update hook called on initial render. This is likely a bug in React. Please file an issue." + ); } else { // This is an update. We should always have a current hook. throw new Error("Rendered more hooks than during the previous render."); @@ -20071,7 +20071,24 @@ function use(usable) { thenableState = createThenableState(); } - return trackUsedThenable(thenableState, thenable, index); + var result = trackUsedThenable(thenableState, thenable, index); + + if ( + currentlyRenderingFiber$1.alternate === null && + (workInProgressHook === null + ? currentlyRenderingFiber$1.memoizedState === null + : workInProgressHook.next === null) + ) { + // Initial render, and either this is the first time the component is + // called, or there were no Hooks called after this use() the previous + // time (perhaps because it threw). Subsequent Hook calls should use the + // mount dispatcher. + { + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + } + } + + return result; } else if ( usable.$$typeof === REACT_CONTEXT_TYPE || usable.$$typeof === REACT_SERVER_CONTEXT_TYPE @@ -20896,7 +20913,7 @@ function mountEffectImpl(fiberFlags, hookFlags, create, deps) { function updateEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var destroy = undefined; + var destroy = undefined; // currentHook is null when rerendering after a render phase state update. if (currentHook !== null) { var prevEffect = currentHook.memoizedState; @@ -21058,13 +21075,11 @@ function updateCallback(callback, deps) { var nextDeps = deps === undefined ? null : deps; var prevState = hook.memoizedState; - if (prevState !== null) { - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -21088,16 +21103,13 @@ function mountMemo(nextCreate, deps) { function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var prevState = hook.memoizedState; + var prevState = hook.memoizedState; // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (prevState !== null) { - // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -37618,7 +37630,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-96cdeaf89-20230224"; +var ReactVersion = "18.3.0-www-modern-a8f971b7a-20230224"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index d1fe06985f190..5e23b1fdb28ae 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -3629,8 +3629,9 @@ function finishRenderingHooks() { function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var numberOfReRenders = 0; do { - didScheduleRenderPhaseUpdateDuringThisPass = !1; + didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null); thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = !1; if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301)); numberOfReRenders += 1; workInProgressHook = currentHook = null; @@ -3692,16 +3693,11 @@ function updateWorkInProgressHook() { (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { - if (null === nextCurrentHook) + if (null === nextCurrentHook) { if (null === currentlyRenderingFiber$1.alternate) - nextCurrentHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - else throw Error(formatProdErrorMessage(310)); + throw Error(formatProdErrorMessage(467)); + throw Error(formatProdErrorMessage(310)); + } currentHook = nextCurrentHook; nextCurrentHook = { memoizedState: currentHook.memoizedState, @@ -3724,10 +3720,16 @@ createFunctionComponentUpdateQueue = function () { function use(usable) { if (null !== usable && "object" === typeof usable) { if ("function" === typeof usable.then) { - var index$41 = thenableIndexCounter; + var index$40 = thenableIndexCounter; thenableIndexCounter += 1; null === thenableState && (thenableState = []); - return trackUsedThenable(thenableState, usable, index$41); + usable = trackUsedThenable(thenableState, usable, index$40); + null === currentlyRenderingFiber$1.alternate && + (null === workInProgressHook + ? null === currentlyRenderingFiber$1.memoizedState + : null === workInProgressHook.next) && + (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + return usable; } if ( usable.$$typeof === REACT_CONTEXT_TYPE || @@ -4095,11 +4097,7 @@ function updateCallback(callback, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; hook.memoizedState = [callback, deps]; return callback; @@ -4108,11 +4106,7 @@ function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; shouldDoubleInvokeUserFnsInHooksDEV && nextCreate(); nextCreate = nextCreate(); @@ -4159,16 +4153,16 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$46 = enqueueUpdate(provider, fiber, lane); - if (null !== root$46) { + var root$45 = enqueueUpdate(provider, fiber, lane); + if (null !== root$45) { var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root$46, provider, lane, eventTime); - entangleTransitions(root$46, provider, lane); + scheduleUpdateOnFiber(root$45, provider, lane, eventTime); + entangleTransitions(root$45, provider, lane); } provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$46 && + null !== root$45 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4368,15 +4362,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$43 = workInProgressRoot; - if (null === root$43) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$43, renderLanes$1) || + var root$42 = workInProgressRoot; + if (null === root$42) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$42, renderLanes$1) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$43 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$43; - mountEffect(subscribeToStore.bind(null, fiber, root$43, subscribe), [ + root$42 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$42; + mountEffect(subscribeToStore.bind(null, fiber, root$42, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4385,7 +4379,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$43, + root$42, getServerSnapshot, getSnapshot ), @@ -5373,14 +5367,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } JSCompiler_temp = current.memoizedState; if (null !== JSCompiler_temp) { - var dehydrated$62 = JSCompiler_temp.dehydrated; - if (null !== dehydrated$62) + var dehydrated$61 = JSCompiler_temp.dehydrated; + if (null !== dehydrated$61) return updateDehydratedSuspenseComponent( current, workInProgress, didSuspend, nextProps, - dehydrated$62, + dehydrated$61, JSCompiler_temp, renderLanes ); @@ -5390,7 +5384,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { showFallback = nextProps.fallback; didSuspend = workInProgress.mode; JSCompiler_temp = current.child; - dehydrated$62 = JSCompiler_temp.sibling; + dehydrated$61 = JSCompiler_temp.sibling; var primaryChildProps = { mode: "hidden", children: nextProps.children }; 0 === (didSuspend & 1) && workInProgress.child !== JSCompiler_temp ? ((nextProps = workInProgress.child), @@ -5399,8 +5393,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.deletions = null)) : ((nextProps = createWorkInProgress(JSCompiler_temp, primaryChildProps)), (nextProps.subtreeFlags = JSCompiler_temp.subtreeFlags & 14680064)); - null !== dehydrated$62 - ? (showFallback = createWorkInProgress(dehydrated$62, showFallback)) + null !== dehydrated$61 + ? (showFallback = createWorkInProgress(dehydrated$61, showFallback)) : ((showFallback = createFiberFromFragment( showFallback, didSuspend, @@ -5419,10 +5413,10 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = didSuspend.cachePool), null !== JSCompiler_temp - ? ((dehydrated$62 = CacheContext._currentValue), + ? ((dehydrated$61 = CacheContext._currentValue), (JSCompiler_temp = - JSCompiler_temp.parent !== dehydrated$62 - ? { parent: dehydrated$62, pool: dehydrated$62 } + JSCompiler_temp.parent !== dehydrated$61 + ? { parent: dehydrated$61, pool: dehydrated$61 } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), (didSuspend = { @@ -6331,14 +6325,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$87 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$87 = lastTailNode), + for (var lastTailNode$86 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$86 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$87 + null === lastTailNode$86 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$87.sibling = null); + : (lastTailNode$86.sibling = null); } } function bubbleProperties(completedWork) { @@ -6348,19 +6342,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$88 = completedWork.child; null !== child$88; ) - (newChildLanes |= child$88.lanes | child$88.childLanes), - (subtreeFlags |= child$88.subtreeFlags & 14680064), - (subtreeFlags |= child$88.flags & 14680064), - (child$88.return = completedWork), - (child$88 = child$88.sibling); + for (var child$87 = completedWork.child; null !== child$87; ) + (newChildLanes |= child$87.lanes | child$87.childLanes), + (subtreeFlags |= child$87.subtreeFlags & 14680064), + (subtreeFlags |= child$87.flags & 14680064), + (child$87.return = completedWork), + (child$87 = child$87.sibling); else - for (child$88 = completedWork.child; null !== child$88; ) - (newChildLanes |= child$88.lanes | child$88.childLanes), - (subtreeFlags |= child$88.subtreeFlags), - (subtreeFlags |= child$88.flags), - (child$88.return = completedWork), - (child$88 = child$88.sibling); + for (child$87 = completedWork.child; null !== child$87; ) + (newChildLanes |= child$87.lanes | child$87.childLanes), + (subtreeFlags |= child$87.subtreeFlags), + (subtreeFlags |= child$87.flags), + (child$87.return = completedWork), + (child$87 = child$87.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6613,11 +6607,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$98 = null; + var cache$97 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$98 = newProps.memoizedState.cachePool.pool); - cache$98 !== type && (newProps.flags |= 2048); + (cache$97 = newProps.memoizedState.cachePool.pool); + cache$97 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -6653,8 +6647,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$98 = type.rendering; - if (null === cache$98) + cache$97 = type.rendering; + if (null === cache$97) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -6662,11 +6656,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$98 = findFirstSuspended(current); - if (null !== cache$98) { + cache$97 = findFirstSuspended(current); + if (null !== cache$97) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$98.updateQueue; + current = cache$97.updateQueue; null !== current && ((workInProgress.updateQueue = current), (workInProgress.flags |= 4)); @@ -6692,7 +6686,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$98)), null !== current)) { + if (((current = findFirstSuspended(cache$97)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6703,7 +6697,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$98.alternate && + !cache$97.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -6716,13 +6710,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 8388608)); type.isBackwards - ? ((cache$98.sibling = workInProgress.child), - (workInProgress.child = cache$98)) + ? ((cache$97.sibling = workInProgress.child), + (workInProgress.child = cache$97)) : ((current = type.last), null !== current - ? (current.sibling = cache$98) - : (workInProgress.child = cache$98), - (type.last = cache$98)); + ? (current.sibling = cache$97) + : (workInProgress.child = cache$97), + (type.last = cache$97)); } if (null !== type.tail) return ( @@ -6991,8 +6985,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$112) { - captureCommitPhaseError(current, nearestMountedAncestor, error$112); + } catch (error$111) { + captureCommitPhaseError(current, nearestMountedAncestor, error$111); } else ref.current = null; } @@ -7282,11 +7276,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$114) { + } catch (error$113) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$114 + error$113 ); } } @@ -7756,8 +7750,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$126) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$126); + } catch (error$125) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$125); } } break; @@ -7949,11 +7943,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { attributeName ), (propValue[internalPropsKey] = attributeName); - } catch (error$127) { + } catch (error$126) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$127 + error$126 ); } break; @@ -7989,8 +7983,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { propName = finishedWork.stateNode; try { setTextContent(propName, ""); - } catch (error$128) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$128); + } catch (error$127) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$127); } } if ( @@ -8007,8 +8001,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, root, current, propName), (flags[internalPropsKey] = propName); - } catch (error$131) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$131); + } catch (error$130) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$130); } break; case 6: @@ -8021,8 +8015,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$132) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$132); + } catch (error$131) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$131); } } break; @@ -8035,8 +8029,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$133) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$133); + } catch (error$132) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$132); } break; case 4: @@ -8066,8 +8060,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== wakeables && suspenseCallback(new Set(wakeables)); } } - } catch (error$135) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$135); + } catch (error$134) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$134); } current = finishedWork.updateQueue; null !== current && @@ -8145,11 +8139,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = propName ? "" : root.memoizedProps; - } catch (error$116) { + } catch (error$115) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$116 + error$115 ); } } else if ( @@ -8224,21 +8218,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$117 = JSCompiler_inline_result.stateNode; + var parent$116 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$117, ""), + (setTextContent(parent$116, ""), (JSCompiler_inline_result.flags &= -33)); - var before$118 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$118, parent$117); + var before$117 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$117, parent$116); break; case 3: case 4: - var parent$119 = JSCompiler_inline_result.stateNode.containerInfo, - before$120 = getHostSibling(finishedWork); + var parent$118 = JSCompiler_inline_result.stateNode.containerInfo, + before$119 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$120, - parent$119 + before$119, + parent$118 ); break; default: @@ -9186,16 +9180,16 @@ function performConcurrentWorkOnRoot(root, didTimeout) { didTimeout = renderRootSync(root, lanes); if (2 === didTimeout) { errorRetryLanes = lanes; - var errorRetryLanes$147 = getLanesToRetrySynchronouslyOnError( + var errorRetryLanes$146 = getLanesToRetrySynchronouslyOnError( root, errorRetryLanes ); - 0 !== errorRetryLanes$147 && - ((lanes = errorRetryLanes$147), + 0 !== errorRetryLanes$146 && + ((lanes = errorRetryLanes$146), (didTimeout = recoverFromConcurrentError( root, errorRetryLanes, - errorRetryLanes$147 + errorRetryLanes$146 ))); } if (1 === didTimeout) @@ -9249,11 +9243,11 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if ((lanes & 8388480) === lanes) break; didTimeout = root.eventTimes; for (originallyAttemptedLanes = -1; 0 < lanes; ) - (errorRetryLanes$147 = 31 - clz32(lanes)), - (errorRetryLanes = 1 << errorRetryLanes$147), - (errorRetryLanes$147 = didTimeout[errorRetryLanes$147]), - errorRetryLanes$147 > originallyAttemptedLanes && - (originallyAttemptedLanes = errorRetryLanes$147), + (errorRetryLanes$146 = 31 - clz32(lanes)), + (errorRetryLanes = 1 << errorRetryLanes$146), + (errorRetryLanes$146 = didTimeout[errorRetryLanes$146]), + errorRetryLanes$146 > originallyAttemptedLanes && + (originallyAttemptedLanes = errorRetryLanes$146), (lanes &= ~errorRetryLanes); lanes = originallyAttemptedLanes; lanes = now() - lanes; @@ -9588,8 +9582,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$150) { - handleThrow(root, thrownValue$150); + } catch (thrownValue$149) { + handleThrow(root, thrownValue$149); } while (1); resetContextDependencies(); @@ -9666,8 +9660,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$152) { - handleThrow(root, thrownValue$152); + } catch (thrownValue$151) { + handleThrow(root, thrownValue$151); } while (1); resetContextDependencies(); @@ -9805,10 +9799,10 @@ function unwindSuspendedUnitOfWork(unitOfWork, thrownValue) { }; suspenseBoundary.updateQueue = newOffscreenQueue; } else { - var wakeables$51 = offscreenQueue.wakeables; - null === wakeables$51 + var wakeables$50 = offscreenQueue.wakeables; + null === wakeables$50 ? (offscreenQueue.wakeables = new Set([wakeable])) - : wakeables$51.add(wakeable); + : wakeables$50.add(wakeable); } break; } @@ -9984,12 +9978,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$155 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$154 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$155 && + shouldFireAfterActiveInstanceBlur$154 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -10051,7 +10045,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$156 = rootWithPendingPassiveEffects, + var root$155 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -10091,7 +10085,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = renderPriority), - releaseRootPooledCache(root$156, remainingLanes); + releaseRootPooledCache(root$155, remainingLanes); } } return !1; @@ -11286,11 +11280,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$159); + var instance = getPublicRootInstance(root$158); originalCallback.call(instance); }; } - var root$159 = createHydrationContainer( + var root$158 = createHydrationContainer( initialChildren, callback, container, @@ -11301,23 +11295,23 @@ function legacyCreateRootFromDOMContainer( "", noopOnRecoverableError ); - container._reactRootContainer = root$159; - container[internalContainerInstanceKey] = root$159.current; + container._reactRootContainer = root$158; + container[internalContainerInstanceKey] = root$158.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$159; + return root$158; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$160 = callback; + var originalCallback$159 = callback; callback = function () { - var instance = getPublicRootInstance(root$161); - originalCallback$160.call(instance); + var instance = getPublicRootInstance(root$160); + originalCallback$159.call(instance); }; } - var root$161 = createFiberRoot( + var root$160 = createFiberRoot( container, 0, !1, @@ -11328,15 +11322,15 @@ function legacyCreateRootFromDOMContainer( "", noopOnRecoverableError ); - container._reactRootContainer = root$161; - container[internalContainerInstanceKey] = root$161.current; + container._reactRootContainer = root$160; + container[internalContainerInstanceKey] = root$160.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$161, parentComponent, callback); + updateContainer(initialChildren, root$160, parentComponent, callback); }); - return root$161; + return root$160; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -11439,12 +11433,12 @@ function batchedUpdates(fn, a, b) { _attemptSynchronousHydration = function (fiber) { switch (fiber.tag) { case 3: - var root$158 = fiber.stateNode; - if (root$158.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$158.pendingLanes); + var root$157 = fiber.stateNode; + if (root$157.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$157.pendingLanes); 0 !== lanes && - (markRootEntangled(root$158, lanes | 2), - ensureRootIsScheduled(root$158, now()), + (markRootEntangled(root$157, lanes | 2), + ensureRootIsScheduled(root$157, now()), 0 === (executionContext & 6) && (resetRenderTimer(), flushSyncCallbacks())); } @@ -11524,17 +11518,17 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1536 = { +var devToolsConfig$jscomp$inline_1535 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-96cdeaf89-20230224", + version: "18.3.0-www-classic-a8f971b7a-20230224", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2059 = { - bundleType: devToolsConfig$jscomp$inline_1536.bundleType, - version: devToolsConfig$jscomp$inline_1536.version, - rendererPackageName: devToolsConfig$jscomp$inline_1536.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1536.rendererConfig, +var internals$jscomp$inline_2058 = { + bundleType: devToolsConfig$jscomp$inline_1535.bundleType, + version: devToolsConfig$jscomp$inline_1535.version, + rendererPackageName: devToolsConfig$jscomp$inline_1535.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1535.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -11550,26 +11544,26 @@ var internals$jscomp$inline_2059 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1536.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1535.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-96cdeaf89-20230224" + reconcilerVersion: "18.3.0-next-a8f971b7a-20230224" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2060 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2059 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2060.isDisabled && - hook$jscomp$inline_2060.supportsFiber + !hook$jscomp$inline_2059.isDisabled && + hook$jscomp$inline_2059.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2060.inject( - internals$jscomp$inline_2059 + (rendererID = hook$jscomp$inline_2059.inject( + internals$jscomp$inline_2058 )), - (injectedHook = hook$jscomp$inline_2060); + (injectedHook = hook$jscomp$inline_2059); } catch (err) {} } var Dispatcher = Internals.Dispatcher, @@ -11653,12 +11647,12 @@ function preinit(href, options) { switch (as) { case "style": as = getResourcesFromRoot(resourceRoot).hoistableStyles; - var key$163 = getStyleKey(href), + var key$162 = getStyleKey(href), precedence = options.precedence || "default", - resource = as.get(key$163); + resource = as.get(key$162); if (resource) break; resource = resourceRoot.querySelector( - getStylesheetSelectorFromKey(key$163) + getStylesheetSelectorFromKey(key$162) ); resource || ((href = { @@ -11667,7 +11661,7 @@ function preinit(href, options) { "data-precedence": precedence, crossOrigin: options.crossOrigin }), - (options = preloadPropsMap.get(key$163)) && + (options = preloadPropsMap.get(key$162)) && adoptPreloadPropsForStylesheet(href, options), (resource = createElement( "link", @@ -11679,15 +11673,15 @@ function preinit(href, options) { setInitialProperties(resource, "link", href), insertStylesheet(resource, precedence, resourceRoot)); resource = { type: "stylesheet", instance: resource, count: 1 }; - as.set(key$163, resource); + as.set(key$162, resource); break; case "script": (as = getResourcesFromRoot(resourceRoot).hoistableScripts), - (key$163 = getScriptKey(href)), - (precedence = as.get(key$163)), + (key$162 = getScriptKey(href)), + (precedence = as.get(key$162)), precedence || ((precedence = resourceRoot.querySelector( - "script[async]" + key$163 + "script[async]" + key$162 )), precedence || ((href = { @@ -11696,7 +11690,7 @@ function preinit(href, options) { crossOrigin: options.crossOrigin, integrity: options.integrity }), - (options = preloadPropsMap.get(key$163)) && + (options = preloadPropsMap.get(key$162)) && adoptPreloadPropsForScript(href, options), (precedence = createElement( "script", @@ -11710,13 +11704,13 @@ function preinit(href, options) { precedence )), (precedence = { type: "script", instance: precedence, count: 1 }), - as.set(key$163, precedence)); + as.set(key$162, precedence)); } else if ("style" === as || "script" === as) if ((resourceRoot = getDocumentForPreloads())) { - key$163 = escapeSelectorAttributeValueInsideDoubleQuotes(href); - precedence = key$163 = - 'link[rel="preload"][as="' + as + '"][href="' + key$163 + '"]'; + key$162 = escapeSelectorAttributeValueInsideDoubleQuotes(href); + precedence = key$162 = + 'link[rel="preload"][as="' + as + '"][href="' + key$162 + '"]'; switch (as) { case "style": precedence = getStyleKey(href); @@ -11733,7 +11727,7 @@ function preinit(href, options) { integrity: options.integrity }), preloadPropsMap.set(precedence, href), - null === resourceRoot.querySelector(key$163) && + null === resourceRoot.querySelector(key$162) && ((options = createElement( "link", href, @@ -11770,14 +11764,14 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.href && "string" === typeof pendingProps.precedence ) { - var key$169 = getStyleKey(pendingProps.href), - styles$170 = getResourcesFromRoot(currentProps).hoistableStyles; - type = styles$170.get(key$169); + var key$168 = getStyleKey(pendingProps.href), + styles$169 = getResourcesFromRoot(currentProps).hoistableStyles; + type = styles$169.get(key$168); type || ((currentProps = currentProps.ownerDocument || currentProps), (type = { type: "stylesheet", instance: null, count: 0 }), - styles$170.set(key$169, type), - preloadPropsMap.has(key$169) || + styles$169.set(key$168, type), + preloadPropsMap.has(key$168) || ((pendingProps = { rel: "preload", as: "style", @@ -11788,21 +11782,21 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }), - preloadPropsMap.set(key$169, pendingProps), - currentProps.querySelector(getStylesheetSelectorFromKey(key$169)) || + preloadPropsMap.set(key$168, pendingProps), + currentProps.querySelector(getStylesheetSelectorFromKey(key$168)) || null !== currentProps.querySelector( - 'link[rel="preload"][as="style"][' + key$169 + "]" + 'link[rel="preload"][as="style"][' + key$168 + "]" ) || - ((key$169 = createElement( + ((key$168 = createElement( "link", pendingProps, currentProps, "http://www.w3.org/1999/xhtml" )), - setInitialProperties(key$169, "link", pendingProps), - (key$169[internalResourceMarker] = !0), - currentProps.head.appendChild(key$169)))); + setInitialProperties(key$168, "link", pendingProps), + (key$168[internalResourceMarker] = !0), + currentProps.head.appendChild(key$168)))); return type; } return null; @@ -11855,24 +11849,24 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = key); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$176 = hoistableRoot.querySelector( + var instance$175 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$176) return (resource.instance = instance$176); + if (instance$175) return (resource.instance = instance$175); key = assign({}, props, { "data-precedence": props.precedence, precedence: null }); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(key, styleProps); - instance$176 = createElement( + instance$175 = createElement( "link", key, hoistableRoot, "http://www.w3.org/1999/xhtml" ); - instance$176[internalResourceMarker] = !0; - var linkInstance = instance$176; + instance$175[internalResourceMarker] = !0; + var linkInstance = instance$175; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; @@ -11884,33 +11878,33 @@ function acquireResource(hoistableRoot, resource, props) { return (linkInstance._p.s = "e"); } ); - setInitialProperties(instance$176, "link", key); - insertStylesheet(instance$176, props.precedence, hoistableRoot); - return (resource.instance = instance$176); + setInitialProperties(instance$175, "link", key); + insertStylesheet(instance$175, props.precedence, hoistableRoot); + return (resource.instance = instance$175); case "script": styleProps = getScriptKey(props.src); if ( - (instance$176 = hoistableRoot.querySelector( + (instance$175 = hoistableRoot.querySelector( "script[async]" + styleProps )) ) - return (resource.instance = instance$176); + return (resource.instance = instance$175); key = props; if ((styleProps = preloadPropsMap.get(styleProps))) (key = assign({}, props)), adoptPreloadPropsForScript(key, styleProps); - instance$176 = createElement( + instance$175 = createElement( "script", key, hoistableRoot, "http://www.w3.org/1999/xhtml" ); - instance$176[internalResourceMarker] = !0; - setInitialProperties(instance$176, "link", key); + instance$175[internalResourceMarker] = !0; + setInitialProperties(instance$175, "link", key); (hoistableRoot.ownerDocument || hoistableRoot).head.appendChild( - instance$176 + instance$175 ); - return (resource.instance = instance$176); + return (resource.instance = instance$175); case "void": return null; default: @@ -12861,19 +12855,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$285; + var JSCompiler_inline_result$jscomp$284; if (canUseDOM) { - var isSupported$jscomp$inline_1608 = "oninput" in document; - if (!isSupported$jscomp$inline_1608) { - var element$jscomp$inline_1609 = document.createElement("div"); - element$jscomp$inline_1609.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1608 = - "function" === typeof element$jscomp$inline_1609.oninput; + var isSupported$jscomp$inline_1607 = "oninput" in document; + if (!isSupported$jscomp$inline_1607) { + var element$jscomp$inline_1608 = document.createElement("div"); + element$jscomp$inline_1608.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1607 = + "function" === typeof element$jscomp$inline_1608.oninput; } - JSCompiler_inline_result$jscomp$285 = isSupported$jscomp$inline_1608; - } else JSCompiler_inline_result$jscomp$285 = !1; + JSCompiler_inline_result$jscomp$284 = isSupported$jscomp$inline_1607; + } else JSCompiler_inline_result$jscomp$284 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$285 && + JSCompiler_inline_result$jscomp$284 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13011,20 +13005,20 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_1621 = 0; - i$jscomp$inline_1621 < simpleEventPluginEvents.length; - i$jscomp$inline_1621++ + var i$jscomp$inline_1620 = 0; + i$jscomp$inline_1620 < simpleEventPluginEvents.length; + i$jscomp$inline_1620++ ) { - var eventName$jscomp$inline_1622 = - simpleEventPluginEvents[i$jscomp$inline_1621], - domEventName$jscomp$inline_1623 = - eventName$jscomp$inline_1622.toLowerCase(), - capitalizedEvent$jscomp$inline_1624 = - eventName$jscomp$inline_1622[0].toUpperCase() + - eventName$jscomp$inline_1622.slice(1); + 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); registerSimpleEvent( - domEventName$jscomp$inline_1623, - "on" + capitalizedEvent$jscomp$inline_1624 + domEventName$jscomp$inline_1622, + "on" + capitalizedEvent$jscomp$inline_1623 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14735,4 +14729,4 @@ exports.unstable_renderSubtreeIntoContainer = function ( ); }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-96cdeaf89-20230224"; +exports.version = "18.3.0-next-a8f971b7a-20230224"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 91caf8edaaa7b..c5cfe699be1ab 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -2650,19 +2650,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$210; + var JSCompiler_inline_result$jscomp$209; if (canUseDOM) { - var isSupported$jscomp$inline_355 = "oninput" in document; - if (!isSupported$jscomp$inline_355) { - var element$jscomp$inline_356 = document.createElement("div"); - element$jscomp$inline_356.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_355 = - "function" === typeof element$jscomp$inline_356.oninput; + var isSupported$jscomp$inline_354 = "oninput" in document; + if (!isSupported$jscomp$inline_354) { + var element$jscomp$inline_355 = document.createElement("div"); + element$jscomp$inline_355.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_354 = + "function" === typeof element$jscomp$inline_355.oninput; } - JSCompiler_inline_result$jscomp$210 = isSupported$jscomp$inline_355; - } else JSCompiler_inline_result$jscomp$210 = !1; + JSCompiler_inline_result$jscomp$209 = isSupported$jscomp$inline_354; + } else JSCompiler_inline_result$jscomp$209 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$210 && + JSCompiler_inline_result$jscomp$209 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -2997,19 +2997,19 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_396 = 0; - i$jscomp$inline_396 < simpleEventPluginEvents.length; - i$jscomp$inline_396++ + var i$jscomp$inline_395 = 0; + i$jscomp$inline_395 < simpleEventPluginEvents.length; + i$jscomp$inline_395++ ) { - var eventName$jscomp$inline_397 = - simpleEventPluginEvents[i$jscomp$inline_396], - domEventName$jscomp$inline_398 = eventName$jscomp$inline_397.toLowerCase(), - capitalizedEvent$jscomp$inline_399 = - eventName$jscomp$inline_397[0].toUpperCase() + - eventName$jscomp$inline_397.slice(1); + var eventName$jscomp$inline_396 = + simpleEventPluginEvents[i$jscomp$inline_395], + domEventName$jscomp$inline_397 = eventName$jscomp$inline_396.toLowerCase(), + capitalizedEvent$jscomp$inline_398 = + eventName$jscomp$inline_396[0].toUpperCase() + + eventName$jscomp$inline_396.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_398, - "on" + capitalizedEvent$jscomp$inline_399 + domEventName$jscomp$inline_397, + "on" + capitalizedEvent$jscomp$inline_398 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -6296,8 +6296,9 @@ function finishRenderingHooks() { function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var numberOfReRenders = 0; do { - didScheduleRenderPhaseUpdateDuringThisPass = !1; + didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null); thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = !1; if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301)); numberOfReRenders += 1; workInProgressHook = currentHook = null; @@ -6359,16 +6360,11 @@ function updateWorkInProgressHook() { (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { - if (null === nextCurrentHook) + if (null === nextCurrentHook) { if (null === currentlyRenderingFiber$1.alternate) - nextCurrentHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - else throw Error(formatProdErrorMessage(310)); + throw Error(formatProdErrorMessage(467)); + throw Error(formatProdErrorMessage(310)); + } currentHook = nextCurrentHook; nextCurrentHook = { memoizedState: currentHook.memoizedState, @@ -6391,10 +6387,16 @@ createFunctionComponentUpdateQueue = function () { function use(usable) { if (null !== usable && "object" === typeof usable) { if ("function" === typeof usable.then) { - var index$74 = thenableIndexCounter; + var index$73 = thenableIndexCounter; thenableIndexCounter += 1; null === thenableState && (thenableState = []); - return trackUsedThenable(thenableState, usable, index$74); + usable = trackUsedThenable(thenableState, usable, index$73); + null === currentlyRenderingFiber$1.alternate && + (null === workInProgressHook + ? null === currentlyRenderingFiber$1.memoizedState + : null === workInProgressHook.next) && + (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + return usable; } if ( usable.$$typeof === REACT_CONTEXT_TYPE || @@ -6762,11 +6764,7 @@ function updateCallback(callback, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; hook.memoizedState = [callback, deps]; return callback; @@ -6775,11 +6773,7 @@ function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); deps = void 0 === deps ? null : deps; var prevState = hook.memoizedState; - if ( - null !== prevState && - null !== deps && - areHookInputsEqual(deps, prevState[1]) - ) + if (null !== deps && areHookInputsEqual(deps, prevState[1])) return prevState[0]; shouldDoubleInvokeUserFnsInHooksDEV && nextCreate(); nextCreate = nextCreate(); @@ -6826,16 +6820,16 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$79 = enqueueUpdate(provider, fiber, lane); - if (null !== root$79) { + var root$78 = enqueueUpdate(provider, fiber, lane); + if (null !== root$78) { var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root$79, provider, lane, eventTime); - entangleTransitions(root$79, provider, lane); + scheduleUpdateOnFiber(root$78, provider, lane, eventTime); + entangleTransitions(root$78, provider, lane); } provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$79 && + null !== root$78 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -7035,15 +7029,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$76 = workInProgressRoot; - if (null === root$76) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$76, renderLanes$1) || + var root$75 = workInProgressRoot; + if (null === root$75) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$75, renderLanes$1) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$76 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$76; - mountEffect(subscribeToStore.bind(null, fiber, root$76, subscribe), [ + root$75 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$75; + mountEffect(subscribeToStore.bind(null, fiber, root$75, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -7052,7 +7046,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$76, + root$75, getServerSnapshot, getSnapshot ), @@ -7342,9 +7336,9 @@ function logCapturedError(boundary, errorInfo) { errorBoundary: null !== boundary && 1 === boundary.tag ? boundary.stateNode : null }) && console.error(errorInfo.value); - } catch (e$84) { + } catch (e$83) { setTimeout(function () { - throw e$84; + throw e$83; }); } } @@ -7989,14 +7983,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } JSCompiler_temp = current.memoizedState; if (null !== JSCompiler_temp) { - var dehydrated$96 = JSCompiler_temp.dehydrated; - if (null !== dehydrated$96) + var dehydrated$95 = JSCompiler_temp.dehydrated; + if (null !== dehydrated$95) return updateDehydratedSuspenseComponent( current, workInProgress, didSuspend, nextProps, - dehydrated$96, + dehydrated$95, JSCompiler_temp, renderLanes ); @@ -8006,7 +8000,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { showFallback = nextProps.fallback; didSuspend = workInProgress.mode; JSCompiler_temp = current.child; - dehydrated$96 = JSCompiler_temp.sibling; + dehydrated$95 = JSCompiler_temp.sibling; var primaryChildProps = { mode: "hidden", children: nextProps.children }; 0 === (didSuspend & 1) && workInProgress.child !== JSCompiler_temp ? ((nextProps = workInProgress.child), @@ -8015,8 +8009,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.deletions = null)) : ((nextProps = createWorkInProgress(JSCompiler_temp, primaryChildProps)), (nextProps.subtreeFlags = JSCompiler_temp.subtreeFlags & 14680064)); - null !== dehydrated$96 - ? (showFallback = createWorkInProgress(dehydrated$96, showFallback)) + null !== dehydrated$95 + ? (showFallback = createWorkInProgress(dehydrated$95, showFallback)) : ((showFallback = createFiberFromFragment( showFallback, didSuspend, @@ -8035,10 +8029,10 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { ? (didSuspend = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = didSuspend.cachePool), null !== JSCompiler_temp - ? ((dehydrated$96 = CacheContext._currentValue), + ? ((dehydrated$95 = CacheContext._currentValue), (JSCompiler_temp = - JSCompiler_temp.parent !== dehydrated$96 - ? { parent: dehydrated$96, pool: dehydrated$96 } + JSCompiler_temp.parent !== dehydrated$95 + ? { parent: dehydrated$95, pool: dehydrated$95 } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), (didSuspend = { @@ -8948,14 +8942,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$121 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$121 = lastTailNode), + for (var lastTailNode$120 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$120 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$121 + null === lastTailNode$120 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$121.sibling = null); + : (lastTailNode$120.sibling = null); } } function bubbleProperties(completedWork) { @@ -8965,19 +8959,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$122 = completedWork.child; null !== child$122; ) - (newChildLanes |= child$122.lanes | child$122.childLanes), - (subtreeFlags |= child$122.subtreeFlags & 14680064), - (subtreeFlags |= child$122.flags & 14680064), - (child$122.return = completedWork), - (child$122 = child$122.sibling); + for (var child$121 = completedWork.child; null !== child$121; ) + (newChildLanes |= child$121.lanes | child$121.childLanes), + (subtreeFlags |= child$121.subtreeFlags & 14680064), + (subtreeFlags |= child$121.flags & 14680064), + (child$121.return = completedWork), + (child$121 = child$121.sibling); else - for (child$122 = completedWork.child; null !== child$122; ) - (newChildLanes |= child$122.lanes | child$122.childLanes), - (subtreeFlags |= child$122.subtreeFlags), - (subtreeFlags |= child$122.flags), - (child$122.return = completedWork), - (child$122 = child$122.sibling); + for (child$121 = completedWork.child; null !== child$121; ) + (newChildLanes |= child$121.lanes | child$121.childLanes), + (subtreeFlags |= child$121.subtreeFlags), + (subtreeFlags |= child$121.flags), + (child$121.return = completedWork), + (child$121 = child$121.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -9224,11 +9218,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$132 = null; + var cache$131 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$132 = newProps.memoizedState.cachePool.pool); - cache$132 !== type && (newProps.flags |= 2048); + (cache$131 = newProps.memoizedState.cachePool.pool); + cache$131 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -9260,8 +9254,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$132 = type.rendering; - if (null === cache$132) + cache$131 = type.rendering; + if (null === cache$131) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -9269,11 +9263,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$132 = findFirstSuspended(current); - if (null !== cache$132) { + cache$131 = findFirstSuspended(current); + if (null !== cache$131) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$132.updateQueue; + current = cache$131.updateQueue; null !== current && ((workInProgress.updateQueue = current), (workInProgress.flags |= 4)); @@ -9299,7 +9293,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$132)), null !== current)) { + if (((current = findFirstSuspended(cache$131)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -9310,7 +9304,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$132.alternate && + !cache$131.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -9323,13 +9317,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 8388608)); type.isBackwards - ? ((cache$132.sibling = workInProgress.child), - (workInProgress.child = cache$132)) + ? ((cache$131.sibling = workInProgress.child), + (workInProgress.child = cache$131)) : ((current = type.last), null !== current - ? (current.sibling = cache$132) - : (workInProgress.child = cache$132), - (type.last = cache$132)); + ? (current.sibling = cache$131) + : (workInProgress.child = cache$131), + (type.last = cache$131)); } if (null !== type.tail) return ( @@ -9547,8 +9541,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$145) { - captureCommitPhaseError(current, nearestMountedAncestor, error$145); + } catch (error$144) { + captureCommitPhaseError(current, nearestMountedAncestor, error$144); } else ref.current = null; } @@ -9858,11 +9852,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$147) { + } catch (error$146) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$147 + error$146 ); } } @@ -10332,8 +10326,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$159) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$159); + } catch (error$158) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$158); } } break; @@ -10525,11 +10519,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { attributeName ), (propValue[internalPropsKey] = attributeName); - } catch (error$160) { + } catch (error$159) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$160 + error$159 ); } break; @@ -10565,8 +10559,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { propName = finishedWork.stateNode; try { setTextContent(propName, ""); - } catch (error$161) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$161); + } catch (error$160) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$160); } } if ( @@ -10583,8 +10577,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, root, current, propName), (flags[internalPropsKey] = propName); - } catch (error$164) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$164); + } catch (error$163) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$163); } break; case 6: @@ -10597,8 +10591,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$165) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$165); + } catch (error$164) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$164); } } break; @@ -10611,8 +10605,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$166) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$166); + } catch (error$165) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$165); } break; case 4: @@ -10642,8 +10636,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== wakeables && suspenseCallback(new Set(wakeables)); } } - } catch (error$168) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$168); + } catch (error$167) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$167); } current = finishedWork.updateQueue; null !== current && @@ -10721,11 +10715,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = propName ? "" : root.memoizedProps; - } catch (error$149) { + } catch (error$148) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$149 + error$148 ); } } else if ( @@ -10800,21 +10794,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$150 = JSCompiler_inline_result.stateNode; + var parent$149 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$150, ""), + (setTextContent(parent$149, ""), (JSCompiler_inline_result.flags &= -33)); - var before$151 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$151, parent$150); + var before$150 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$150, parent$149); break; case 3: case 4: - var parent$152 = JSCompiler_inline_result.stateNode.containerInfo, - before$153 = getHostSibling(finishedWork); + var parent$151 = JSCompiler_inline_result.stateNode.containerInfo, + before$152 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$153, - parent$152 + before$152, + parent$151 ); break; default: @@ -11762,16 +11756,16 @@ function performConcurrentWorkOnRoot(root, didTimeout) { didTimeout = renderRootSync(root, lanes); if (2 === didTimeout) { errorRetryLanes = lanes; - var errorRetryLanes$180 = getLanesToRetrySynchronouslyOnError( + var errorRetryLanes$179 = getLanesToRetrySynchronouslyOnError( root, errorRetryLanes ); - 0 !== errorRetryLanes$180 && - ((lanes = errorRetryLanes$180), + 0 !== errorRetryLanes$179 && + ((lanes = errorRetryLanes$179), (didTimeout = recoverFromConcurrentError( root, errorRetryLanes, - errorRetryLanes$180 + errorRetryLanes$179 ))); } if (1 === didTimeout) @@ -11825,11 +11819,11 @@ function performConcurrentWorkOnRoot(root, didTimeout) { if ((lanes & 8388480) === lanes) break; didTimeout = root.eventTimes; for (originallyAttemptedLanes = -1; 0 < lanes; ) - (errorRetryLanes$180 = 31 - clz32(lanes)), - (errorRetryLanes = 1 << errorRetryLanes$180), - (errorRetryLanes$180 = didTimeout[errorRetryLanes$180]), - errorRetryLanes$180 > originallyAttemptedLanes && - (originallyAttemptedLanes = errorRetryLanes$180), + (errorRetryLanes$179 = 31 - clz32(lanes)), + (errorRetryLanes = 1 << errorRetryLanes$179), + (errorRetryLanes$179 = didTimeout[errorRetryLanes$179]), + errorRetryLanes$179 > originallyAttemptedLanes && + (originallyAttemptedLanes = errorRetryLanes$179), (lanes &= ~errorRetryLanes); lanes = originallyAttemptedLanes; lanes = now() - lanes; @@ -12164,8 +12158,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$183) { - handleThrow(root, thrownValue$183); + } catch (thrownValue$182) { + handleThrow(root, thrownValue$182); } while (1); resetContextDependencies(); @@ -12242,8 +12236,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$185) { - handleThrow(root, thrownValue$185); + } catch (thrownValue$184) { + handleThrow(root, thrownValue$184); } while (1); resetContextDependencies(); @@ -12381,10 +12375,10 @@ function unwindSuspendedUnitOfWork(unitOfWork, thrownValue) { }; suspenseBoundary.updateQueue = newOffscreenQueue; } else { - var wakeables$85 = offscreenQueue.wakeables; - null === wakeables$85 + var wakeables$84 = offscreenQueue.wakeables; + null === wakeables$84 ? (offscreenQueue.wakeables = new Set([wakeable])) - : wakeables$85.add(wakeable); + : wakeables$84.add(wakeable); } break; } @@ -12560,12 +12554,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$188 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$187 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$188 && + shouldFireAfterActiveInstanceBlur$187 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -12627,7 +12621,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$189 = rootWithPendingPassiveEffects, + var root$188 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12667,7 +12661,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig.transition = renderPriority), - releaseRootPooledCache(root$189, remainingLanes); + releaseRootPooledCache(root$188, remainingLanes); } } return !1; @@ -13754,12 +13748,12 @@ function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { _attemptSynchronousHydration = function (fiber) { switch (fiber.tag) { case 3: - var root$191 = fiber.stateNode; - if (root$191.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$191.pendingLanes); + var root$190 = fiber.stateNode; + if (root$190.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$190.pendingLanes); 0 !== lanes && - (markRootEntangled(root$191, lanes | 2), - ensureRootIsScheduled(root$191, now()), + (markRootEntangled(root$190, lanes | 2), + ensureRootIsScheduled(root$190, now()), 0 === (executionContext & 6) && (resetRenderTimer(), flushSyncCallbacks())); } @@ -13839,17 +13833,17 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates ]; -var devToolsConfig$jscomp$inline_1653 = { +var devToolsConfig$jscomp$inline_1652 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-96cdeaf89-20230224", + version: "18.3.0-www-modern-a8f971b7a-20230224", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2033 = { - bundleType: devToolsConfig$jscomp$inline_1653.bundleType, - version: devToolsConfig$jscomp$inline_1653.version, - rendererPackageName: devToolsConfig$jscomp$inline_1653.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1653.rendererConfig, +var internals$jscomp$inline_2032 = { + bundleType: devToolsConfig$jscomp$inline_1652.bundleType, + version: devToolsConfig$jscomp$inline_1652.version, + rendererPackageName: devToolsConfig$jscomp$inline_1652.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1652.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -13866,26 +13860,26 @@ var internals$jscomp$inline_2033 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1653.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1652.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-96cdeaf89-20230224" + reconcilerVersion: "18.3.0-next-a8f971b7a-20230224" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2034 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2033 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2034.isDisabled && - hook$jscomp$inline_2034.supportsFiber + !hook$jscomp$inline_2033.isDisabled && + hook$jscomp$inline_2033.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2034.inject( - internals$jscomp$inline_2033 + (rendererID = hook$jscomp$inline_2033.inject( + internals$jscomp$inline_2032 )), - (injectedHook = hook$jscomp$inline_2034); + (injectedHook = hook$jscomp$inline_2033); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; @@ -14193,4 +14187,4 @@ exports.unstable_flushControlled = function (fn) { } }; exports.unstable_runWithPriority = runWithPriority; -exports.version = "18.3.0-next-96cdeaf89-20230224"; +exports.version = "18.3.0-next-a8f971b7a-20230224"; diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index d533e5ca00b72..dfcd3104b5ff9 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -6554,7 +6554,6 @@ function replaySuspendedComponentWithHooks( // only get reset when the component either completes (finishRenderingHooks) // or unwinds (resetHooksOnUnwind). { - hookTypesDev = current !== null ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; // Used for hot reloading: ignorePreviousDependencies = @@ -6586,8 +6585,14 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var children; do { - didScheduleRenderPhaseUpdateDuringThisPass = false; + if (didScheduleRenderPhaseUpdateDuringThisPass) { + // It's possible that a use() value depended on a state that was updated in + // this rerender, so we need to watch for different thenables this time. + thenableState = null; + } + thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = false; if (numberOfReRenders >= RE_RENDER_LIMIT) { throw new Error( @@ -6712,8 +6717,7 @@ function updateWorkInProgressHook() { // This function is used both for updates and for re-renders triggered by a // render phase update. It assumes there is either a current hook we can // clone, or a work-in-progress hook from a previous render pass that we can - // use as a base. When we reach the end of the base list, we must switch to - // the dispatcher used for mounts. + // use as a base. var nextCurrentHook; if (currentHook === null) { @@ -6749,14 +6753,10 @@ function updateWorkInProgressHook() { if (currentFiber === null) { // This is the initial render. This branch is reached when the component // suspends, resumes, then renders an additional hook. - var _newHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - nextCurrentHook = _newHook; + // Should never be reached because we should switch to the mount dispatcher first. + throw new Error( + "Update hook called on initial render. This is likely a bug in React. Please file an issue." + ); } else { // This is an update. We should always have a current hook. throw new Error("Rendered more hooks than during the previous render."); @@ -6811,7 +6811,24 @@ function use(usable) { thenableState = createThenableState(); } - return trackUsedThenable(thenableState, thenable, index); + var result = trackUsedThenable(thenableState, thenable, index); + + if ( + currentlyRenderingFiber$1.alternate === null && + (workInProgressHook === null + ? currentlyRenderingFiber$1.memoizedState === null + : workInProgressHook.next === null) + ) { + // Initial render, and either this is the first time the component is + // called, or there were no Hooks called after this use() the previous + // time (perhaps because it threw). Subsequent Hook calls should use the + // mount dispatcher. + { + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + } + } + + return result; } else if ( usable.$$typeof === REACT_CONTEXT_TYPE || usable.$$typeof === REACT_SERVER_CONTEXT_TYPE @@ -7614,7 +7631,7 @@ function mountEffectImpl(fiberFlags, hookFlags, create, deps) { function updateEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var destroy = undefined; + var destroy = undefined; // currentHook is null when rerendering after a render phase state update. if (currentHook !== null) { var prevEffect = currentHook.memoizedState; @@ -7776,13 +7793,11 @@ function updateCallback(callback, deps) { var nextDeps = deps === undefined ? null : deps; var prevState = hook.memoizedState; - if (prevState !== null) { - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -7806,16 +7821,13 @@ function mountMemo(nextCreate, deps) { function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var prevState = hook.memoizedState; + var prevState = hook.memoizedState; // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (prevState !== null) { - // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -23743,7 +23755,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-96cdeaf89-20230224"; +var ReactVersion = "18.3.0-www-classic-a8f971b7a-20230224"; // Might add PROFILE later. diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index e19d23c6a6814..060b04e4cefda 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -6554,7 +6554,6 @@ function replaySuspendedComponentWithHooks( // only get reset when the component either completes (finishRenderingHooks) // or unwinds (resetHooksOnUnwind). { - hookTypesDev = current !== null ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; // Used for hot reloading: ignorePreviousDependencies = @@ -6586,8 +6585,14 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { var children; do { - didScheduleRenderPhaseUpdateDuringThisPass = false; + if (didScheduleRenderPhaseUpdateDuringThisPass) { + // It's possible that a use() value depended on a state that was updated in + // this rerender, so we need to watch for different thenables this time. + thenableState = null; + } + thenableIndexCounter = 0; + didScheduleRenderPhaseUpdateDuringThisPass = false; if (numberOfReRenders >= RE_RENDER_LIMIT) { throw new Error( @@ -6712,8 +6717,7 @@ function updateWorkInProgressHook() { // This function is used both for updates and for re-renders triggered by a // render phase update. It assumes there is either a current hook we can // clone, or a work-in-progress hook from a previous render pass that we can - // use as a base. When we reach the end of the base list, we must switch to - // the dispatcher used for mounts. + // use as a base. var nextCurrentHook; if (currentHook === null) { @@ -6749,14 +6753,10 @@ function updateWorkInProgressHook() { if (currentFiber === null) { // This is the initial render. This branch is reached when the component // suspends, resumes, then renders an additional hook. - var _newHook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - nextCurrentHook = _newHook; + // Should never be reached because we should switch to the mount dispatcher first. + throw new Error( + "Update hook called on initial render. This is likely a bug in React. Please file an issue." + ); } else { // This is an update. We should always have a current hook. throw new Error("Rendered more hooks than during the previous render."); @@ -6811,7 +6811,24 @@ function use(usable) { thenableState = createThenableState(); } - return trackUsedThenable(thenableState, thenable, index); + var result = trackUsedThenable(thenableState, thenable, index); + + if ( + currentlyRenderingFiber$1.alternate === null && + (workInProgressHook === null + ? currentlyRenderingFiber$1.memoizedState === null + : workInProgressHook.next === null) + ) { + // Initial render, and either this is the first time the component is + // called, or there were no Hooks called after this use() the previous + // time (perhaps because it threw). Subsequent Hook calls should use the + // mount dispatcher. + { + ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + } + } + + return result; } else if ( usable.$$typeof === REACT_CONTEXT_TYPE || usable.$$typeof === REACT_SERVER_CONTEXT_TYPE @@ -7614,7 +7631,7 @@ function mountEffectImpl(fiberFlags, hookFlags, create, deps) { function updateEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var destroy = undefined; + var destroy = undefined; // currentHook is null when rerendering after a render phase state update. if (currentHook !== null) { var prevEffect = currentHook.memoizedState; @@ -7776,13 +7793,11 @@ function updateCallback(callback, deps) { var nextDeps = deps === undefined ? null : deps; var prevState = hook.memoizedState; - if (prevState !== null) { - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -7806,16 +7821,13 @@ function mountMemo(nextCreate, deps) { function updateMemo(nextCreate, deps) { var hook = updateWorkInProgressHook(); var nextDeps = deps === undefined ? null : deps; - var prevState = hook.memoizedState; + var prevState = hook.memoizedState; // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (prevState !== null) { - // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (nextDeps !== null) { - var prevDeps = prevState[1]; + if (nextDeps !== null) { + var prevDeps = prevState[1]; - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } + if (areHookInputsEqual(nextDeps, prevDeps)) { + return prevState[0]; } } @@ -23743,7 +23755,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-96cdeaf89-20230224"; +var ReactVersion = "18.3.0-www-modern-a8f971b7a-20230224"; // Might add PROFILE later.