From b2fb6f550318b6bc51171821da0e0d84172ae9fe Mon Sep 17 00:00:00 2001 From: jackpope Date: Thu, 26 Sep 2024 10:04:13 -0700 Subject: [PATCH] Turn on lazy context propagation for RN and RTR (#31076) Following https://github.com/facebook/react/pull/30935 let's turn this on across the board so we can clean up experiments in RN. DiffTrain build for [60b1420f18e9473230f23f88fdc7b89fea3dbbfd](https://github.com/facebook/react/commit/60b1420f18e9473230f23f88fdc7b89fea3dbbfd) --- compiled-rn/VERSION_NATIVE_FB | 2 +- .../react/react-dom/cjs/ReactDOM-dev.js | 4 +- .../react/react-dom/cjs/ReactDOM-prod.js | 4 +- .../react/react-dom/cjs/ReactDOM-profiling.js | 4 +- .../react/react-dom/cjs/ReactDOMClient-dev.js | 767 +++++++--------- .../react-dom/cjs/ReactDOMClient-prod.js | 786 +++++++--------- .../react-dom/cjs/ReactDOMClient-profiling.js | 838 ++++++++---------- .../react-dom/cjs/ReactDOMProfiling-dev.js | 767 +++++++--------- .../react-dom/cjs/ReactDOMProfiling-prod.js | 786 +++++++--------- .../cjs/ReactDOMProfiling-profiling.js | 838 ++++++++---------- .../cjs/ReactTestRenderer-dev.js | 405 +++++---- .../cjs/ReactTestRenderer-prod.js | 510 ++++++----- .../cjs/ReactTestRenderer-profiling.js | 562 +++++++----- .../vendor/react/react/cjs/React-dev.js | 5 +- .../vendor/react/react/cjs/React-prod.js | 5 +- .../vendor/react/react/cjs/React-profiling.js | 5 +- .../Libraries/Renderer/REVISION | 2 +- .../implementations/ReactFabric-dev.fb.js | 425 ++++----- .../implementations/ReactFabric-prod.fb.js | 507 ++++------- .../ReactFabric-profiling.fb.js | 563 +++++------- .../ReactNativeRenderer-dev.fb.js | 429 ++++----- .../ReactNativeRenderer-prod.fb.js | 519 +++++------ .../ReactNativeRenderer-profiling.fb.js | 575 +++++------- 23 files changed, 4094 insertions(+), 5214 deletions(-) diff --git a/compiled-rn/VERSION_NATIVE_FB b/compiled-rn/VERSION_NATIVE_FB index fbfac55212363..fb660bed24d9e 100644 --- a/compiled-rn/VERSION_NATIVE_FB +++ b/compiled-rn/VERSION_NATIVE_FB @@ -1 +1 @@ -19.0.0-native-fb-d66fa02a-20240926 \ No newline at end of file +19.0.0-native-fb-60b1420f-20240926 \ No newline at end of file diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js index 61990b28fcdd5..2c141c72abbf9 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -420,5 +420,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-native-fb-d66fa02a-20240926"; + exports.version = "19.0.0-native-fb-60b1420f-20240926"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js index bd2a40ea296ac..bfdf90e222c9d 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<868c2c45377609fdc75a190d68337a3e>> + * @generated SignedSource<<13226f6d1a4dc1aa517e83ce54f2bd03>> */ "use strict"; @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-native-fb-d66fa02a-20240926"; +exports.version = "19.0.0-native-fb-60b1420f-20240926"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js index bd2a40ea296ac..bfdf90e222c9d 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<868c2c45377609fdc75a190d68337a3e>> + * @generated SignedSource<<13226f6d1a4dc1aa517e83ce54f2bd03>> */ "use strict"; @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-native-fb-d66fa02a-20240926"; +exports.version = "19.0.0-native-fb-60b1420f-20240926"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js index 3218eedce22a9..8cfdd52312a18 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<98ff6e44e31c0a99c44b8c8b36e4c12b>> + * @generated SignedSource<<8e698666cf72e4f2ab8c97250d1c4737>> */ /* @@ -4824,7 +4824,7 @@ __DEV__ && if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -4905,7 +4905,7 @@ __DEV__ && return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -5002,7 +5002,7 @@ __DEV__ && existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -5487,7 +5487,7 @@ __DEV__ && return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -5940,9 +5940,8 @@ __DEV__ && throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." ); - enableLazyContextPropagation && - null !== current && - !didReceiveUpdate && + null === current || + didReceiveUpdate || ((current = current.dependencies), null !== current && checkIfContextChanged(current) && @@ -8019,16 +8018,14 @@ __DEV__ && "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); currentSourceFiber = sourceFiber.tag; (sourceFiber.mode & ConcurrentMode) !== NoMode || (0 !== currentSourceFiber && @@ -8251,7 +8248,7 @@ __DEV__ && for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); nextProps = renderWithHooks( current, @@ -8458,8 +8455,7 @@ __DEV__ && null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(workInProgress); pushOffscreenSuspenseHandler(workInProgress); - enableLazyContextPropagation && - null !== current && + null !== current && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } @@ -8517,7 +8513,7 @@ __DEV__ && ? previousContext : contextStackCursor.current; componentName = getMaskedContext(workInProgress, componentName); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); Component = renderWithHooks( current, @@ -8547,7 +8543,7 @@ __DEV__ && secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); hookTypesUpdateIndexDev = -1; ignorePreviousDependencies = @@ -8611,7 +8607,7 @@ __DEV__ && isContextProvider(Component) ? ((_instance = !0), pushContextProvider(workInProgress)) : (_instance = !1); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -8738,8 +8734,7 @@ __DEV__ && unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && @@ -8761,8 +8756,7 @@ __DEV__ && newState, oldContext ) || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || @@ -8954,32 +8948,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2324; - var JSCompiler_object_inline_stack_2325 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2312; + var JSCompiler_object_inline_stack_2313 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2326 = !1; + var JSCompiler_object_inline_componentStack_2314 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2324 = didSuspend) || - (JSCompiler_object_inline_digest_2324 = + (JSCompiler_object_inline_digest_2312 = didSuspend) || + (JSCompiler_object_inline_digest_2312 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2324 && - ((JSCompiler_object_inline_componentStack_2326 = !0), + JSCompiler_object_inline_digest_2312 && + ((JSCompiler_object_inline_componentStack_2314 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2324 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2312 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2326 + JSCompiler_object_inline_componentStack_2314 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2323 = nextHydratableInstance; + var JSCompiler_object_inline_message_2311 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2323)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2311)) { c: { - var instance = JSCompiler_object_inline_message_2323; + var instance = JSCompiler_object_inline_message_2311; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -9020,19 +9014,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2323 + JSCompiler_object_inline_message_2311 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2323 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2311 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2323 && - ((JSCompiler_object_inline_message_2323 = - JSCompiler_object_inline_message_2323.dehydrated), - null !== JSCompiler_object_inline_message_2323) + null !== JSCompiler_object_inline_message_2311 && + ((JSCompiler_object_inline_message_2311 = + JSCompiler_object_inline_message_2311.dehydrated), + null !== JSCompiler_object_inline_message_2311) ) return ( - JSCompiler_object_inline_message_2323.data === + JSCompiler_object_inline_message_2311.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9040,70 +9034,70 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2323 = - JSCompiler_object_inline_stack_2325.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2325.fallback; - if (JSCompiler_object_inline_componentStack_2326) + JSCompiler_object_inline_message_2311 = + JSCompiler_object_inline_stack_2313.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2313.fallback; + if (JSCompiler_object_inline_componentStack_2314) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2325 = + (JSCompiler_object_inline_stack_2313 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2323, + JSCompiler_object_inline_message_2311, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2326 = + (JSCompiler_object_inline_componentStack_2314 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2326.memoizedState = + (JSCompiler_object_inline_componentStack_2314.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2326.childLanes = + (JSCompiler_object_inline_componentStack_2314.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2324, + JSCompiler_object_inline_digest_2312, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2325 + JSCompiler_object_inline_stack_2313 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2325.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2313.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2325 = + (JSCompiler_object_inline_stack_2313 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2323, + JSCompiler_object_inline_message_2311, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2326 = + (JSCompiler_object_inline_componentStack_2314 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2326.memoizedState = + (JSCompiler_object_inline_componentStack_2314.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2326.childLanes = + (JSCompiler_object_inline_componentStack_2314.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2324, + JSCompiler_object_inline_digest_2312, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2325 + JSCompiler_object_inline_stack_2313 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2323 + JSCompiler_object_inline_message_2311 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2323 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2323) + ((JSCompiler_object_inline_message_2311 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2311) ) { if (didSuspend) workInProgress.flags & 256 @@ -9120,32 +9114,32 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2326 = - JSCompiler_object_inline_stack_2325.fallback), - (JSCompiler_object_inline_message_2323 = workInProgress.mode), - (JSCompiler_object_inline_stack_2325 = createFiberFromOffscreen( + (JSCompiler_object_inline_componentStack_2314 = + JSCompiler_object_inline_stack_2313.fallback), + (JSCompiler_object_inline_message_2311 = workInProgress.mode), + (JSCompiler_object_inline_stack_2313 = createFiberFromOffscreen( { mode: "visible", - children: JSCompiler_object_inline_stack_2325.children + children: JSCompiler_object_inline_stack_2313.children }, - JSCompiler_object_inline_message_2323, + JSCompiler_object_inline_message_2311, 0, null )), - (JSCompiler_object_inline_componentStack_2326 = + (JSCompiler_object_inline_componentStack_2314 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2326, - JSCompiler_object_inline_message_2323, + JSCompiler_object_inline_componentStack_2314, + JSCompiler_object_inline_message_2311, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2326.flags |= 2), - (JSCompiler_object_inline_stack_2325.return = workInProgress), - (JSCompiler_object_inline_componentStack_2326.return = + (JSCompiler_object_inline_componentStack_2314.flags |= 2), + (JSCompiler_object_inline_stack_2313.return = workInProgress), + (JSCompiler_object_inline_componentStack_2314.return = workInProgress), - (JSCompiler_object_inline_stack_2325.sibling = - JSCompiler_object_inline_componentStack_2326), - (workInProgress.child = JSCompiler_object_inline_stack_2325), + (JSCompiler_object_inline_stack_2313.sibling = + JSCompiler_object_inline_componentStack_2314), + (workInProgress.child = JSCompiler_object_inline_stack_2313), (workInProgress.mode & ConcurrentMode) !== NoMode && reconcileChildFibers( workInProgress, @@ -9153,63 +9147,63 @@ __DEV__ && null, renderLanes ), - (JSCompiler_object_inline_stack_2325 = workInProgress.child), - (JSCompiler_object_inline_stack_2325.memoizedState = + (JSCompiler_object_inline_stack_2313 = workInProgress.child), + (JSCompiler_object_inline_stack_2313.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2325.childLanes = + (JSCompiler_object_inline_stack_2313.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2324, + JSCompiler_object_inline_digest_2312, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2326)); + JSCompiler_object_inline_componentStack_2314)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2323.data === + JSCompiler_object_inline_message_2311.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2324 = - JSCompiler_object_inline_message_2323.nextSibling && - JSCompiler_object_inline_message_2323.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2324) { - JSCompiler_temp = JSCompiler_object_inline_digest_2324.dgst; - var message = JSCompiler_object_inline_digest_2324.msg; - instance = JSCompiler_object_inline_digest_2324.stck; - var componentStack = JSCompiler_object_inline_digest_2324.cstck; + JSCompiler_object_inline_digest_2312 = + JSCompiler_object_inline_message_2311.nextSibling && + JSCompiler_object_inline_message_2311.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2312) { + JSCompiler_temp = JSCompiler_object_inline_digest_2312.dgst; + var message = JSCompiler_object_inline_digest_2312.msg; + instance = JSCompiler_object_inline_digest_2312.stck; + var componentStack = JSCompiler_object_inline_digest_2312.cstck; } - JSCompiler_object_inline_message_2323 = message; - JSCompiler_object_inline_digest_2324 = JSCompiler_temp; - JSCompiler_object_inline_stack_2325 = instance; - JSCompiler_object_inline_componentStack_2326 = componentStack; - JSCompiler_object_inline_message_2323 = - JSCompiler_object_inline_message_2323 - ? Error(JSCompiler_object_inline_message_2323) + JSCompiler_object_inline_message_2311 = message; + JSCompiler_object_inline_digest_2312 = JSCompiler_temp; + JSCompiler_object_inline_stack_2313 = instance; + JSCompiler_object_inline_componentStack_2314 = componentStack; + JSCompiler_object_inline_message_2311 = + JSCompiler_object_inline_message_2311 + ? Error(JSCompiler_object_inline_message_2311) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2323.stack = - JSCompiler_object_inline_stack_2325 || ""; - JSCompiler_object_inline_message_2323.digest = - JSCompiler_object_inline_digest_2324; - JSCompiler_object_inline_digest_2324 = - void 0 === JSCompiler_object_inline_componentStack_2326 + JSCompiler_object_inline_message_2311.stack = + JSCompiler_object_inline_stack_2313 || ""; + JSCompiler_object_inline_message_2311.digest = + JSCompiler_object_inline_digest_2312; + JSCompiler_object_inline_digest_2312 = + void 0 === JSCompiler_object_inline_componentStack_2314 ? null - : JSCompiler_object_inline_componentStack_2326; - "string" === typeof JSCompiler_object_inline_digest_2324 && + : JSCompiler_object_inline_componentStack_2314; + "string" === typeof JSCompiler_object_inline_digest_2312 && CapturedStacks.set( - JSCompiler_object_inline_message_2323, - JSCompiler_object_inline_digest_2324 + JSCompiler_object_inline_message_2311, + JSCompiler_object_inline_digest_2312 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2323, + value: JSCompiler_object_inline_message_2311, source: null, - stack: JSCompiler_object_inline_digest_2324 + stack: JSCompiler_object_inline_digest_2312 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9217,33 +9211,32 @@ __DEV__ && renderLanes ); } else if ( - (enableLazyContextPropagation && - !didReceiveUpdate && + (didReceiveUpdate || propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (JSCompiler_object_inline_digest_2324 = + (JSCompiler_object_inline_digest_2312 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2324) + didReceiveUpdate || JSCompiler_object_inline_digest_2312) ) { - JSCompiler_object_inline_digest_2324 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2324) { - JSCompiler_object_inline_stack_2325 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2325 & 42)) - JSCompiler_object_inline_stack_2325 = 1; + JSCompiler_object_inline_digest_2312 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2312) { + JSCompiler_object_inline_stack_2313 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2313 & 42)) + JSCompiler_object_inline_stack_2313 = 1; else - switch (JSCompiler_object_inline_stack_2325) { + switch (JSCompiler_object_inline_stack_2313) { case 2: - JSCompiler_object_inline_stack_2325 = 1; + JSCompiler_object_inline_stack_2313 = 1; break; case 8: - JSCompiler_object_inline_stack_2325 = 4; + JSCompiler_object_inline_stack_2313 = 4; break; case 32: - JSCompiler_object_inline_stack_2325 = 16; + JSCompiler_object_inline_stack_2313 = 16; break; case 128: case 256: @@ -9264,40 +9257,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2325 = 64; + JSCompiler_object_inline_stack_2313 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2325 = 134217728; + JSCompiler_object_inline_stack_2313 = 134217728; break; default: - JSCompiler_object_inline_stack_2325 = 0; + JSCompiler_object_inline_stack_2313 = 0; } - JSCompiler_object_inline_stack_2325 = + JSCompiler_object_inline_stack_2313 = 0 !== - (JSCompiler_object_inline_stack_2325 & - (JSCompiler_object_inline_digest_2324.suspendedLanes | + (JSCompiler_object_inline_stack_2313 & + (JSCompiler_object_inline_digest_2312.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2325; + : JSCompiler_object_inline_stack_2313; if ( - 0 !== JSCompiler_object_inline_stack_2325 && - JSCompiler_object_inline_stack_2325 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2313 && + JSCompiler_object_inline_stack_2313 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2325), + ((prevState.retryLane = JSCompiler_object_inline_stack_2313), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2325 + JSCompiler_object_inline_stack_2313 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2324, + JSCompiler_object_inline_digest_2312, current, - JSCompiler_object_inline_stack_2325 + JSCompiler_object_inline_stack_2313 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2323.data === + JSCompiler_object_inline_message_2311.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9305,7 +9298,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2323.data === + JSCompiler_object_inline_message_2311.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9313,12 +9306,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2323._reactRetry = + (JSCompiler_object_inline_message_2311._reactRetry = workInProgress), (workInProgress = null)) : ((renderLanes = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2323.nextSibling + JSCompiler_object_inline_message_2311.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9336,72 +9329,72 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2325.children + JSCompiler_object_inline_stack_2313.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2326) + if (JSCompiler_object_inline_componentStack_2314) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2326 = - JSCompiler_object_inline_stack_2325.fallback), - (JSCompiler_object_inline_message_2323 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2314 = + JSCompiler_object_inline_stack_2313.fallback), + (JSCompiler_object_inline_message_2311 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), (componentStack = { mode: "hidden", - children: JSCompiler_object_inline_stack_2325.children + children: JSCompiler_object_inline_stack_2313.children }), - (JSCompiler_object_inline_message_2323 & ConcurrentMode) === NoMode && + (JSCompiler_object_inline_message_2311 & ConcurrentMode) === NoMode && workInProgress.child !== JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2325 = workInProgress.child), - (JSCompiler_object_inline_stack_2325.childLanes = 0), - (JSCompiler_object_inline_stack_2325.pendingProps = + ? ((JSCompiler_object_inline_stack_2313 = workInProgress.child), + (JSCompiler_object_inline_stack_2313.childLanes = 0), + (JSCompiler_object_inline_stack_2313.pendingProps = componentStack), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2325.actualDuration = -0), - (JSCompiler_object_inline_stack_2325.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2325.selfBaseDuration = + ((JSCompiler_object_inline_stack_2313.actualDuration = -0), + (JSCompiler_object_inline_stack_2313.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2313.selfBaseDuration = JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2325.treeBaseDuration = + (JSCompiler_object_inline_stack_2313.treeBaseDuration = JSCompiler_temp.treeBaseDuration)), (workInProgress.deletions = null)) - : ((JSCompiler_object_inline_stack_2325 = createWorkInProgress( + : ((JSCompiler_object_inline_stack_2313 = createWorkInProgress( JSCompiler_temp, componentStack )), - (JSCompiler_object_inline_stack_2325.subtreeFlags = + (JSCompiler_object_inline_stack_2313.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280)), null !== instance - ? (JSCompiler_object_inline_componentStack_2326 = + ? (JSCompiler_object_inline_componentStack_2314 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2326 + JSCompiler_object_inline_componentStack_2314 )) - : ((JSCompiler_object_inline_componentStack_2326 = + : ((JSCompiler_object_inline_componentStack_2314 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2326, - JSCompiler_object_inline_message_2323, + JSCompiler_object_inline_componentStack_2314, + JSCompiler_object_inline_message_2311, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2326.flags |= 2)), - (JSCompiler_object_inline_componentStack_2326.return = + (JSCompiler_object_inline_componentStack_2314.flags |= 2)), + (JSCompiler_object_inline_componentStack_2314.return = workInProgress), - (JSCompiler_object_inline_stack_2325.return = workInProgress), - (JSCompiler_object_inline_stack_2325.sibling = - JSCompiler_object_inline_componentStack_2326), - (workInProgress.child = JSCompiler_object_inline_stack_2325), - (JSCompiler_object_inline_stack_2325 = - JSCompiler_object_inline_componentStack_2326), - (JSCompiler_object_inline_componentStack_2326 = workInProgress.child), - (JSCompiler_object_inline_message_2323 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2323 - ? (JSCompiler_object_inline_message_2323 = + (JSCompiler_object_inline_stack_2313.return = workInProgress), + (JSCompiler_object_inline_stack_2313.sibling = + JSCompiler_object_inline_componentStack_2314), + (workInProgress.child = JSCompiler_object_inline_stack_2313), + (JSCompiler_object_inline_stack_2313 = + JSCompiler_object_inline_componentStack_2314), + (JSCompiler_object_inline_componentStack_2314 = workInProgress.child), + (JSCompiler_object_inline_message_2311 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2311 + ? (JSCompiler_object_inline_message_2311 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2323.cachePool), + JSCompiler_object_inline_message_2311.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9409,45 +9402,45 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2323 = { + (JSCompiler_object_inline_message_2311 = { baseLanes: - JSCompiler_object_inline_message_2323.baseLanes | renderLanes, + JSCompiler_object_inline_message_2311.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2326.memoizedState = - JSCompiler_object_inline_message_2323), - (JSCompiler_object_inline_componentStack_2326.childLanes = + (JSCompiler_object_inline_componentStack_2314.memoizedState = + JSCompiler_object_inline_message_2311), + (JSCompiler_object_inline_componentStack_2314.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2324, + JSCompiler_object_inline_digest_2312, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2325 + JSCompiler_object_inline_stack_2313 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2324 = current.child; - current = JSCompiler_object_inline_digest_2324.sibling; - JSCompiler_object_inline_digest_2324 = createWorkInProgress( - JSCompiler_object_inline_digest_2324, + JSCompiler_object_inline_digest_2312 = current.child; + current = JSCompiler_object_inline_digest_2312.sibling; + JSCompiler_object_inline_digest_2312 = createWorkInProgress( + JSCompiler_object_inline_digest_2312, { mode: "visible", - children: JSCompiler_object_inline_stack_2325.children + children: JSCompiler_object_inline_stack_2313.children } ); (workInProgress.mode & ConcurrentMode) === NoMode && - (JSCompiler_object_inline_digest_2324.lanes = renderLanes); - JSCompiler_object_inline_digest_2324.return = workInProgress; - JSCompiler_object_inline_digest_2324.sibling = null; + (JSCompiler_object_inline_digest_2312.lanes = renderLanes); + JSCompiler_object_inline_digest_2312.return = workInProgress; + JSCompiler_object_inline_digest_2312.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2324; + workInProgress.child = JSCompiler_object_inline_digest_2312; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2324; + return JSCompiler_object_inline_digest_2312; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = createFiberFromOffscreen( @@ -9744,7 +9737,7 @@ __DEV__ && profilerStartTime = -1; workInProgressRootSkippedLanes |= workInProgress.lanes; if (0 === (renderLanes & workInProgress.childLanes)) - if (enableLazyContextPropagation && null !== current) { + if (null !== current) { if ( (propagateParentContextChanges( current, @@ -9772,12 +9765,9 @@ __DEV__ && return workInProgress.child; } function checkScheduledUpdateOrContext(current, renderLanes) { - return 0 !== (current.lanes & renderLanes) || - (enableLazyContextPropagation && - ((current = current.dependencies), - null !== current && checkIfContextChanged(current))) - ? !0 - : !1; + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; } function attemptEarlyBailoutIfNoScheduledUpdate( current, @@ -9851,8 +9841,7 @@ __DEV__ && case 19: var didSuspendBefore = 0 !== (current.flags & 128); stateNode = 0 !== (renderLanes & workInProgress.childLanes); - enableLazyContextPropagation && - !stateNode && + stateNode || (propagateParentContextChanges( current, workInProgress, @@ -10084,7 +10073,12 @@ __DEV__ && nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); nextProps !== prevSibling.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); nextProps = nextState.element; if (prevSibling.isDehydrated) @@ -10304,16 +10298,7 @@ __DEV__ && null, renderLanes )), - (HostTransitionContext._currentValue = prevSibling), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== prevSibling && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), + (HostTransitionContext._currentValue = prevSibling)), markRef(current, workInProgress), reconcileChildren( current, @@ -10421,46 +10406,25 @@ __DEV__ && workInProgress.child ); case 10: - a: { - returnFiber = workInProgress.type; - prevSibling = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextState = prevSibling.value; + return ( + (returnFiber = workInProgress.type), + (prevSibling = workInProgress.pendingProps), + (nextProps = prevSibling.value), "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), error$jscomp$0( "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" - )); - pushProvider(workInProgress, returnFiber, nextState); - if (!enableLazyContextPropagation && null !== nextProps) - if (objectIs(nextProps.value, nextState)) { - if ( - nextProps.children === prevSibling.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange( - workInProgress, - returnFiber, - renderLanes - ); + )), + pushProvider(workInProgress, returnFiber, nextProps), reconcileChildren( current, workInProgress, prevSibling.children, renderLanes - ); - workInProgress = workInProgress.child; - } - return workInProgress; + ), + workInProgress.child + ); case 9: return ( (prevSibling = workInProgress.type._context), @@ -10469,7 +10433,7 @@ __DEV__ && error$jscomp$0( "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." ), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (prevSibling = readContext(prevSibling)), markComponentRenderStarted(workInProgress), (returnFiber = callComponentInDEV( @@ -10515,7 +10479,7 @@ __DEV__ && isContextProvider(returnFiber) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, returnFiber, prevSibling), mountClassInstance( workInProgress, @@ -10559,7 +10523,7 @@ __DEV__ && return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (returnFiber = readContext(CacheContext)), null === current ? ((prevSibling = peekCacheFromPool()), @@ -10597,10 +10561,11 @@ __DEV__ && : ((returnFiber = nextProps.cache), pushProvider(workInProgress, CacheContext, returnFiber), returnFiber !== prevSibling.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -10666,147 +10631,69 @@ __DEV__ && "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." ); } - function propagateContextChange(workInProgress, context, renderLanes) { - if (enableLazyContextPropagation) - propagateContextChanges(workInProgress, [context], renderLanes, !0); - else if (!enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = ForceUpdate; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } - } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); scheduleContextWorkOnParentPath( - fiber.return, + list.return, renderLanes, workInProgress ); - list.lanes |= renderLanes; - break; + forcePropagateEntireTree || (nextFiber = null); + break a; } - dependency = dependency.next; - } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." ); - nextFiber = fiber.sibling; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - if (enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; } - fiber = nextFiber; - } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } function propagateParentContextChanges( @@ -10815,56 +10702,49 @@ __DEV__ && renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error( - "Should have a current fiber. This is a bug in React." - ); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error( - "Should have a current fiber. This is a bug in React." - ); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); + ? current.push(context) + : (current = [context])); } - parent = parent.return; + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } function checkIfContextChanged(currentDependencies) { - if (!enableLazyContextPropagation) return !1; for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; @@ -10881,17 +10761,11 @@ __DEV__ && } return !1; } - function prepareToReadContext(workInProgress, renderLanes) { + function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - (enableLazyContextPropagation - ? (workInProgress.firstContext = null) - : null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && - (didReceiveUpdate = !0), - (workInProgress.firstContext = null))); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { isDisallowedContextReadInDEV && @@ -10900,9 +10774,8 @@ __DEV__ && ); return readContextForConsumer(currentlyRenderingFiber, context); } - function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -10922,7 +10795,7 @@ __DEV__ && firstContext: context, _debugThenableState: null }; - enableLazyContextPropagation && (consumer.flags |= 524288); + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -21840,8 +21713,6 @@ __DEV__ && enableObjectFiber = dynamicFlagsUntyped.enableObjectFiber, enablePersistedModeClonedFlag = dynamicFlagsUntyped.enablePersistedModeClonedFlag, - enableLazyContextPropagation = - dynamicFlagsUntyped.enableLazyContextPropagation, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE, @@ -25472,11 +25343,11 @@ __DEV__ && }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-native-fb-d66fa02a-20240926" !== isomorphicReactPackageVersion) + if ("19.0.0-native-fb-60b1420f-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-native-fb-d66fa02a-20240926\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-native-fb-60b1420f-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -25513,11 +25384,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926" + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -25661,5 +25532,5 @@ __DEV__ && listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.0.0-native-fb-d66fa02a-20240926"; + exports.version = "19.0.0-native-fb-60b1420f-20240926"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js index 7bee0a9494313..998ee26ee4110 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ /* @@ -39,8 +39,6 @@ var alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries, enableObjectFiber = dynamicFlagsUntyped.enableObjectFiber, enablePersistedModeClonedFlag = dynamicFlagsUntyped.enablePersistedModeClonedFlag, - enableLazyContextPropagation = - dynamicFlagsUntyped.enableLazyContextPropagation, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering; function isValidContainer(node) { return !( @@ -2066,19 +2064,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$295; + var JSCompiler_inline_result$jscomp$294; if (canUseDOM) { - var isSupported$jscomp$inline_428 = "oninput" in document; - if (!isSupported$jscomp$inline_428) { - var element$jscomp$inline_429 = document.createElement("div"); - element$jscomp$inline_429.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_428 = - "function" === typeof element$jscomp$inline_429.oninput; + var isSupported$jscomp$inline_427 = "oninput" in document; + if (!isSupported$jscomp$inline_427) { + var element$jscomp$inline_428 = document.createElement("div"); + element$jscomp$inline_428.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_427 = + "function" === typeof element$jscomp$inline_428.oninput; } - JSCompiler_inline_result$jscomp$295 = isSupported$jscomp$inline_428; - } else JSCompiler_inline_result$jscomp$295 = !1; + JSCompiler_inline_result$jscomp$294 = isSupported$jscomp$inline_427; + } else JSCompiler_inline_result$jscomp$294 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$295 && + JSCompiler_inline_result$jscomp$294 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -3084,7 +3082,7 @@ function createChildReconciler(shouldTrackSideEffects) { if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3133,7 +3131,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3203,7 +3201,7 @@ function createChildReconciler(shouldTrackSideEffects) { existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3535,7 +3533,7 @@ function createChildReconciler(shouldTrackSideEffects) { return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3857,9 +3855,8 @@ function finishRenderingHooks(current) { thenableIndexCounter = 0; thenableState = null; if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300)); - enableLazyContextPropagation && - null !== current && - !didReceiveUpdate && + null === current || + didReceiveUpdate || ((current = current.dependencies), null !== current && checkIfContextChanged(current) && @@ -5502,16 +5499,14 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); currentSourceFiber = sourceFiber.tag; 0 !== (sourceFiber.mode & 1) || (0 !== currentSourceFiber && @@ -5707,7 +5702,7 @@ function updateForwardRef( for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); nextProps = renderWithHooks( current, workInProgress, @@ -5893,8 +5888,7 @@ function deferHiddenOffscreenComponent( null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(); pushOffscreenSuspenseHandler(workInProgress); - enableLazyContextPropagation && - null !== current && + null !== current && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } @@ -5922,7 +5916,7 @@ function updateFunctionComponent( ? previousContext : contextStackCursor.current; context = getMaskedContext(workInProgress, context); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); Component = renderWithHooks( current, workInProgress, @@ -5950,7 +5944,7 @@ function replayFunctionComponent( secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); workInProgress.updateQueue = null; nextProps = renderWithHooksAgain( workInProgress, @@ -5981,7 +5975,7 @@ function updateClassComponent( var hasContext = !0; pushContextProvider(workInProgress); } else hasContext = !1; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -6102,8 +6096,7 @@ function updateClassComponent( unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && @@ -6125,8 +6118,7 @@ function updateClassComponent( newState, oldContext ) || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || @@ -6447,8 +6439,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes ); } else if ( - (enableLazyContextPropagation && - !didReceiveUpdate && + (didReceiveUpdate || propagateParentContextChanges(current, workInProgress, renderLanes, !1), (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), didReceiveUpdate || JSCompiler_temp) @@ -6805,7 +6796,7 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { null !== current && (workInProgress.dependencies = current.dependencies); workInProgressRootSkippedLanes |= workInProgress.lanes; if (0 === (renderLanes & workInProgress.childLanes)) - if (enableLazyContextPropagation && null !== current) { + if (null !== current) { if ( (propagateParentContextChanges( current, @@ -6833,12 +6824,9 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { return workInProgress.child; } function checkScheduledUpdateOrContext(current, renderLanes) { - return 0 !== (current.lanes & renderLanes) || - (enableLazyContextPropagation && - ((current = current.dependencies), - null !== current && checkIfContextChanged(current))) - ? !0 - : !1; + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; } function attemptEarlyBailoutIfNoScheduledUpdate( current, @@ -6893,8 +6881,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 19: var didSuspendBefore = 0 !== (current.flags & 128); state = 0 !== (renderLanes & workInProgress.childLanes); - enableLazyContextPropagation && - !state && + state || (propagateParentContextChanges( current, workInProgress, @@ -7052,7 +7039,12 @@ function beginWork(current, workInProgress, renderLanes) { nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); nextProps !== init.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); nextProps = nextState.element; if (init.isDehydrated) @@ -7217,16 +7209,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = init), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== init && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))); + (HostTransitionContext._currentValue = init)); markRef(current, workInProgress); reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; @@ -7310,36 +7293,22 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - a: { - elementType = workInProgress.type; - init = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextState = init.value; - pushProvider(workInProgress, elementType, nextState); - if (!enableLazyContextPropagation && null !== nextProps) - if (objectIs(nextProps.value, nextState)) { - if ( - nextProps.children === init.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); - workInProgress = workInProgress.child; - } - return workInProgress; + return ( + (elementType = workInProgress.pendingProps), + pushProvider(workInProgress, workInProgress.type, elementType.value), + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ), + workInProgress.child + ); case 9: return ( (init = workInProgress.type._context), (elementType = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (init = readContext(init)), (elementType = elementType(init)), (workInProgress.flags |= 1), @@ -7374,7 +7343,7 @@ function beginWork(current, workInProgress, renderLanes) { isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, elementType, init), mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( @@ -7409,7 +7378,7 @@ function beginWork(current, workInProgress, renderLanes) { return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), @@ -7443,10 +7412,11 @@ function beginWork(current, workInProgress, renderLanes) { : ((elementType = nextProps.cache), pushProvider(workInProgress, CacheContext, elementType), elementType !== init.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -7492,133 +7462,62 @@ function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { parent = parent.return; } } -function propagateContextChange(workInProgress, context, renderLanes) { - if (enableLazyContextPropagation) - propagateContextChanges(workInProgress, [context], renderLanes, !0); - else if (!enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = 2; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } - } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - fiber.return, - renderLanes, - workInProgress - ); - list.lanes |= renderLanes; - break; - } - dependency = dependency.next; - } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = fiber.sibling; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } -} function propagateContextChanges( workInProgress, contexts, renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; } - nextFiber = nextFiber.return; + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; } - fiber = nextFiber; - } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } function propagateParentContextChanges( @@ -7627,48 +7526,45 @@ function propagateParentContextChanges( renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); } - parent = parent.return; + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } function checkIfContextChanged(currentDependencies) { - if (!enableLazyContextPropagation) return !1; for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; @@ -7685,23 +7581,17 @@ function checkIfContextChanged(currentDependencies) { } return !1; } -function prepareToReadContext(workInProgress, renderLanes) { +function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - (enableLazyContextPropagation - ? (workInProgress.firstContext = null) - : null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0), - (workInProgress.firstContext = null))); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { return readContextForConsumer(currentlyRenderingFiber, context); } -function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -7714,7 +7604,7 @@ function readContextForConsumer(consumer, context) { if (null === consumer) throw Error(formatProdErrorMessage(308)); lastContextDependency = context; consumer.dependencies = { lanes: 0, firstContext: context }; - enableLazyContextPropagation && (consumer.flags |= 524288); + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -8087,8 +7977,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$123) { - captureCommitPhaseError(current, nearestMountedAncestor, error$123); + } catch (error$122) { + captureCommitPhaseError(current, nearestMountedAncestor, error$122); } else ref.current = null; } @@ -8384,11 +8274,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$122) { + } catch (error$121) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$122 + error$121 ); } } @@ -8547,7 +8437,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$130 = hostParentIsContainer; + var prevHostParentIsContainer$129 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -8555,7 +8445,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$130; + hostParentIsContainer = prevHostParentIsContainer$129; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9229,21 +9119,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$124 = JSCompiler_inline_result.stateNode; + var parent$123 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$124, ""), + (setTextContent(parent$123, ""), (JSCompiler_inline_result.flags &= -33)); - var before$125 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$125, parent$124); + var before$124 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$124, parent$123); break; case 3: case 4: - var parent$126 = JSCompiler_inline_result.stateNode.containerInfo, - before$127 = getHostSibling(finishedWork); + var parent$125 = JSCompiler_inline_result.stateNode.containerInfo, + before$126 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$127, - parent$126 + before$126, + parent$125 ); break; default: @@ -10210,14 +10100,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$142 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$142 = lastTailNode), + for (var lastTailNode$141 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$141 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$142 + null === lastTailNode$141 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$142.sibling = null); + : (lastTailNode$141.sibling = null); } } function bubbleProperties(completedWork) { @@ -10227,19 +10117,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$143 = completedWork.child; null !== child$143; ) - (newChildLanes |= child$143.lanes | child$143.childLanes), - (subtreeFlags |= child$143.subtreeFlags & 31457280), - (subtreeFlags |= child$143.flags & 31457280), - (child$143.return = completedWork), - (child$143 = child$143.sibling); + for (var child$142 = completedWork.child; null !== child$142; ) + (newChildLanes |= child$142.lanes | child$142.childLanes), + (subtreeFlags |= child$142.subtreeFlags & 31457280), + (subtreeFlags |= child$142.flags & 31457280), + (child$142.return = completedWork), + (child$142 = child$142.sibling); else - for (child$143 = completedWork.child; null !== child$143; ) - (newChildLanes |= child$143.lanes | child$143.childLanes), - (subtreeFlags |= child$143.subtreeFlags), - (subtreeFlags |= child$143.flags), - (child$143.return = completedWork), - (child$143 = child$143.sibling); + for (child$142 = completedWork.child; null !== child$142; ) + (newChildLanes |= child$142.lanes | child$142.childLanes), + (subtreeFlags |= child$142.subtreeFlags), + (subtreeFlags |= child$142.flags), + (child$142.return = completedWork), + (child$142 = child$142.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -10523,11 +10413,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 && renderLanes && @@ -10561,8 +10451,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 ( @@ -10570,11 +10460,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; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -10599,7 +10489,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), @@ -10609,7 +10499,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; @@ -10622,13 +10512,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); 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 ( @@ -11372,8 +11262,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$176) { - handleThrow(root, thrownValue$176); + } catch (thrownValue$175) { + handleThrow(root, thrownValue$175); } while (1); lanes && root.shellSuspendCounter++; @@ -11486,8 +11376,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$178) { - handleThrow(root, thrownValue$178); + } catch (thrownValue$177) { + handleThrow(root, thrownValue$177); } while (1); resetContextDependencies(); @@ -11808,7 +11698,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$182 = rootWithPendingPassiveEffects, + var root$181 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11847,7 +11737,7 @@ function flushPassiveEffects() { } finally { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$182, remainingLanes); + releaseRootPooledCache(root$181, remainingLanes); } } return !1; @@ -12007,14 +11897,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$184 = firstScheduledRoot; null !== root$184; ) { - if (!onlyLegacy || 0 === root$184.tag) + for (var root$183 = firstScheduledRoot; null !== root$183; ) { + if (!onlyLegacy || 0 === root$183.tag) if (0 !== syncTransitionLanes) { - var pendingLanes = root$184.pendingLanes; + var pendingLanes = root$183.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$184.suspendedLanes, - pingedLanes = root$184.pingedLanes; + var suspendedLanes = root$183.suspendedLanes, + pingedLanes = root$183.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12028,18 +11918,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$184, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$183, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$184, - root$184 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$183, + root$183 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$184, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$183, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$184, JSCompiler_inline_result)); - root$184 = root$184.next; + performSyncWorkOnRoot(root$183, JSCompiler_inline_result)); + root$183 = root$183.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -12268,20 +12158,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1465 = 0; - i$jscomp$inline_1465 < simpleEventPluginEvents.length; - i$jscomp$inline_1465++ + var i$jscomp$inline_1442 = 0; + i$jscomp$inline_1442 < simpleEventPluginEvents.length; + i$jscomp$inline_1442++ ) { - var eventName$jscomp$inline_1466 = - simpleEventPluginEvents[i$jscomp$inline_1465], - domEventName$jscomp$inline_1467 = - eventName$jscomp$inline_1466.toLowerCase(), - capitalizedEvent$jscomp$inline_1468 = - eventName$jscomp$inline_1466[0].toUpperCase() + - eventName$jscomp$inline_1466.slice(1); + var eventName$jscomp$inline_1443 = + simpleEventPluginEvents[i$jscomp$inline_1442], + domEventName$jscomp$inline_1444 = + eventName$jscomp$inline_1443.toLowerCase(), + capitalizedEvent$jscomp$inline_1445 = + eventName$jscomp$inline_1443[0].toUpperCase() + + eventName$jscomp$inline_1443.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1467, - "on" + capitalizedEvent$jscomp$inline_1468 + domEventName$jscomp$inline_1444, + "on" + capitalizedEvent$jscomp$inline_1445 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -13464,34 +13354,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$198 = props[hasSrc]; - if (null != propValue$198) + var propValue$197 = props[hasSrc]; + if (null != propValue$197) switch (hasSrc) { case "name": - hasSrcSet = propValue$198; + hasSrcSet = propValue$197; break; case "type": - propValue = propValue$198; + propValue = propValue$197; break; case "checked": - checked = propValue$198; + checked = propValue$197; break; case "defaultChecked": - defaultChecked = propValue$198; + defaultChecked = propValue$197; break; case "value": - propKey = propValue$198; + propKey = propValue$197; break; case "defaultValue": - defaultValue = propValue$198; + defaultValue = propValue$197; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$198) + if (null != propValue$197) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$198, props, null); + setProp(domElement, tag, hasSrc, propValue$197, props, null); } } initInput( @@ -13628,14 +13518,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$198 in props) - props.hasOwnProperty(propValue$198) && - ((hasSrc = props[propValue$198]), + for (propValue$197 in props) + props.hasOwnProperty(propValue$197) && + ((hasSrc = props[propValue$197]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$198, + propValue$197, hasSrc, props, void 0 @@ -13683,14 +13573,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$215 in nextProps) { - var propKey = nextProps[propKey$215]; - lastProp = lastProps[propKey$215]; + for (var propKey$214 in nextProps) { + var propKey = nextProps[propKey$214]; + lastProp = lastProps[propKey$214]; if ( - nextProps.hasOwnProperty(propKey$215) && + nextProps.hasOwnProperty(propKey$214) && (null != propKey || null != lastProp) ) - switch (propKey$215) { + switch (propKey$214) { case "type": type = propKey; break; @@ -13719,7 +13609,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$215, + propKey$214, propKey, nextProps, lastProp @@ -13738,7 +13628,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$215 = null; + propKey = value = defaultValue = propKey$214 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -13769,7 +13659,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$215 = type; + propKey$214 = type; break; case "defaultValue": defaultValue = type; @@ -13790,15 +13680,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$215 - ? updateOptions(domElement, !!lastProps, propKey$215, !1) + null != propKey$214 + ? updateOptions(domElement, !!lastProps, propKey$214, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$215 = null; + propKey = propKey$214 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -13822,7 +13712,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$215 = name; + propKey$214 = name; break; case "defaultValue": propKey = name; @@ -13836,17 +13726,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$215, propKey); + updateTextarea(domElement, propKey$214, propKey); return; case "option": - for (var propKey$231 in lastProps) + for (var propKey$230 in lastProps) if ( - ((propKey$215 = lastProps[propKey$231]), - lastProps.hasOwnProperty(propKey$231) && - null != propKey$215 && - !nextProps.hasOwnProperty(propKey$231)) + ((propKey$214 = lastProps[propKey$230]), + lastProps.hasOwnProperty(propKey$230) && + null != propKey$214 && + !nextProps.hasOwnProperty(propKey$230)) ) - switch (propKey$231) { + switch (propKey$230) { case "selected": domElement.selected = !1; break; @@ -13854,33 +13744,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$231, + propKey$230, null, nextProps, - propKey$215 + propKey$214 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$215 = nextProps[lastDefaultValue]), + ((propKey$214 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$215 !== propKey && - (null != propKey$215 || null != propKey)) + propKey$214 !== propKey && + (null != propKey$214 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$215 && - "function" !== typeof propKey$215 && - "symbol" !== typeof propKey$215; + propKey$214 && + "function" !== typeof propKey$214 && + "symbol" !== typeof propKey$214; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$215, + propKey$214, nextProps, propKey ); @@ -13901,24 +13791,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$236 in lastProps) - (propKey$215 = lastProps[propKey$236]), - lastProps.hasOwnProperty(propKey$236) && - null != propKey$215 && - !nextProps.hasOwnProperty(propKey$236) && - setProp(domElement, tag, propKey$236, null, nextProps, propKey$215); + for (var propKey$235 in lastProps) + (propKey$214 = lastProps[propKey$235]), + lastProps.hasOwnProperty(propKey$235) && + null != propKey$214 && + !nextProps.hasOwnProperty(propKey$235) && + setProp(domElement, tag, propKey$235, null, nextProps, propKey$214); for (checked in nextProps) if ( - ((propKey$215 = nextProps[checked]), + ((propKey$214 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$215 !== propKey && - (null != propKey$215 || null != propKey)) + propKey$214 !== propKey && + (null != propKey$214 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$215) + if (null != propKey$214) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -13926,7 +13816,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$215, + propKey$214, nextProps, propKey ); @@ -13934,49 +13824,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$241 in lastProps) - (propKey$215 = lastProps[propKey$241]), - lastProps.hasOwnProperty(propKey$241) && - void 0 !== propKey$215 && - !nextProps.hasOwnProperty(propKey$241) && + for (var propKey$240 in lastProps) + (propKey$214 = lastProps[propKey$240]), + lastProps.hasOwnProperty(propKey$240) && + void 0 !== propKey$214 && + !nextProps.hasOwnProperty(propKey$240) && setPropOnCustomElement( domElement, tag, - propKey$241, + propKey$240, void 0, nextProps, - propKey$215 + propKey$214 ); for (defaultChecked in nextProps) - (propKey$215 = nextProps[defaultChecked]), + (propKey$214 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$215 === propKey || - (void 0 === propKey$215 && void 0 === propKey) || + propKey$214 === propKey || + (void 0 === propKey$214 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$215, + propKey$214, nextProps, propKey ); return; } } - for (var propKey$246 in lastProps) - (propKey$215 = lastProps[propKey$246]), - lastProps.hasOwnProperty(propKey$246) && - null != propKey$215 && - !nextProps.hasOwnProperty(propKey$246) && - setProp(domElement, tag, propKey$246, null, nextProps, propKey$215); + for (var propKey$245 in lastProps) + (propKey$214 = lastProps[propKey$245]), + lastProps.hasOwnProperty(propKey$245) && + null != propKey$214 && + !nextProps.hasOwnProperty(propKey$245) && + setProp(domElement, tag, propKey$245, null, nextProps, propKey$214); for (lastProp in nextProps) - (propKey$215 = nextProps[lastProp]), + (propKey$214 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$215 === propKey || - (null == propKey$215 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$215, nextProps, propKey); + propKey$214 === propKey || + (null == propKey$214 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$214, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -14516,26 +14406,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$254 = getResourcesFromRoot( + var styles$253 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$255 = styles$254.get(type); - resource$255 || + resource$254 = styles$253.get(type); + resource$254 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$255 = { + (resource$254 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$254.set(type, resource$255), - (styles$254 = JSCompiler_inline_result.querySelector( + styles$253.set(type, resource$254), + (styles$253 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$254._p && - ((resource$255.instance = styles$254), - (resource$255.state.loading = 5)), + !styles$253._p && + ((resource$254.instance = styles$253), + (resource$254.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -14548,16 +14438,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$254 || + styles$253 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$255.state + resource$254.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$255; + return resource$254; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -14654,37 +14544,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$260 = hoistableRoot.querySelector( + var instance$259 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$260) + if (instance$259) return ( (resource.state.loading |= 4), - (resource.instance = instance$260), - markNodeAsHoistable(instance$260), - instance$260 + (resource.instance = instance$259), + markNodeAsHoistable(instance$259), + instance$259 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$260 = ( + instance$259 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$260); - var linkInstance = instance$260; + markNodeAsHoistable(instance$259); + var linkInstance = instance$259; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$260, "link", instance); + setInitialProperties(instance$259, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$260, props.precedence, hoistableRoot); - return (resource.instance = instance$260); + insertStylesheet(instance$259, props.precedence, hoistableRoot); + return (resource.instance = instance$259); case "script": - instance$260 = getScriptKey(props.src); + instance$259 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$260) + getScriptSelectorFromKey(instance$259) )) ) return ( @@ -14693,7 +14583,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$260))) + if ((styleProps = preloadPropsMap.get(instance$259))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -15751,16 +15641,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1708 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1685 = React.version; if ( - "19.0.0-native-fb-d66fa02a-20240926" !== - isomorphicReactPackageVersion$jscomp$inline_1708 + "19.0.0-native-fb-60b1420f-20240926" !== + isomorphicReactPackageVersion$jscomp$inline_1685 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1708, - "19.0.0-native-fb-d66fa02a-20240926" + isomorphicReactPackageVersion$jscomp$inline_1685, + "19.0.0-native-fb-60b1420f-20240926" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15780,25 +15670,25 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2151 = { +var internals$jscomp$inline_2138 = { bundleType: 0, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926" + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2152 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2139 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2152.isDisabled && - hook$jscomp$inline_2152.supportsFiber + !hook$jscomp$inline_2139.isDisabled && + hook$jscomp$inline_2139.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2152.inject( - internals$jscomp$inline_2151 + (rendererID = hook$jscomp$inline_2139.inject( + internals$jscomp$inline_2138 )), - (injectedHook = hook$jscomp$inline_2152); + (injectedHook = hook$jscomp$inline_2139); } catch (err) {} } exports.createRoot = function (container, options) { @@ -15890,4 +15780,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.0.0-native-fb-d66fa02a-20240926"; +exports.version = "19.0.0-native-fb-60b1420f-20240926"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js index 0eb454629d090..bcbf5721a2d06 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<7ce56cadd95efb065db34a90177a79eb>> + * @generated SignedSource<<4f12d0be0372b66d3b31fd211611e032>> */ /* @@ -39,8 +39,6 @@ var alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries, enableObjectFiber = dynamicFlagsUntyped.enableObjectFiber, enablePersistedModeClonedFlag = dynamicFlagsUntyped.enablePersistedModeClonedFlag, - enableLazyContextPropagation = - dynamicFlagsUntyped.enableLazyContextPropagation, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering; function isValidContainer(node) { return !( @@ -2161,19 +2159,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$311; + var JSCompiler_inline_result$jscomp$310; if (canUseDOM) { - var isSupported$jscomp$inline_444 = "oninput" in document; - if (!isSupported$jscomp$inline_444) { - var element$jscomp$inline_445 = document.createElement("div"); - element$jscomp$inline_445.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_444 = - "function" === typeof element$jscomp$inline_445.oninput; + var isSupported$jscomp$inline_443 = "oninput" in document; + if (!isSupported$jscomp$inline_443) { + var element$jscomp$inline_444 = document.createElement("div"); + element$jscomp$inline_444.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_443 = + "function" === typeof element$jscomp$inline_444.oninput; } - JSCompiler_inline_result$jscomp$311 = isSupported$jscomp$inline_444; - } else JSCompiler_inline_result$jscomp$311 = !1; + JSCompiler_inline_result$jscomp$310 = isSupported$jscomp$inline_443; + } else JSCompiler_inline_result$jscomp$310 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$311 && + JSCompiler_inline_result$jscomp$310 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -3233,7 +3231,7 @@ function createChildReconciler(shouldTrackSideEffects) { if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3282,7 +3280,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3352,7 +3350,7 @@ function createChildReconciler(shouldTrackSideEffects) { existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3684,7 +3682,7 @@ function createChildReconciler(shouldTrackSideEffects) { return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -4006,9 +4004,8 @@ function finishRenderingHooks(current) { thenableIndexCounter = 0; thenableState = null; if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300)); - enableLazyContextPropagation && - null !== current && - !didReceiveUpdate && + null === current || + didReceiveUpdate || ((current = current.dependencies), null !== current && checkIfContextChanged(current) && @@ -5660,16 +5657,14 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); currentSourceFiber = sourceFiber.tag; 0 !== (sourceFiber.mode & 1) || (0 !== currentSourceFiber && @@ -5865,7 +5860,7 @@ function updateForwardRef( for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); nextProps = renderWithHooks( current, @@ -6053,8 +6048,7 @@ function deferHiddenOffscreenComponent( null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(); pushOffscreenSuspenseHandler(workInProgress); - enableLazyContextPropagation && - null !== current && + null !== current && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } @@ -6082,7 +6076,7 @@ function updateFunctionComponent( ? previousContext : contextStackCursor.current; context = getMaskedContext(workInProgress, context); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); Component = renderWithHooks( current, @@ -6112,7 +6106,7 @@ function replayFunctionComponent( secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); workInProgress.updateQueue = null; nextProps = renderWithHooksAgain( @@ -6145,7 +6139,7 @@ function updateClassComponent( var hasContext = !0; pushContextProvider(workInProgress); } else hasContext = !1; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -6266,8 +6260,7 @@ function updateClassComponent( unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && @@ -6289,8 +6282,7 @@ function updateClassComponent( newState, oldContext ) || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || @@ -6618,8 +6610,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes ); } else if ( - (enableLazyContextPropagation && - !didReceiveUpdate && + (didReceiveUpdate || propagateParentContextChanges(current, workInProgress, renderLanes, !1), (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), didReceiveUpdate || JSCompiler_temp) @@ -6989,7 +6980,7 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { profilerStartTime = -1; workInProgressRootSkippedLanes |= workInProgress.lanes; if (0 === (renderLanes & workInProgress.childLanes)) - if (enableLazyContextPropagation && null !== current) { + if (null !== current) { if ( (propagateParentContextChanges( current, @@ -7017,12 +7008,9 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { return workInProgress.child; } function checkScheduledUpdateOrContext(current, renderLanes) { - return 0 !== (current.lanes & renderLanes) || - (enableLazyContextPropagation && - ((current = current.dependencies), - null !== current && checkIfContextChanged(current))) - ? !0 - : !1; + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; } function attemptEarlyBailoutIfNoScheduledUpdate( current, @@ -7085,8 +7073,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 19: var didSuspendBefore = 0 !== (current.flags & 128); stateNode = 0 !== (renderLanes & workInProgress.childLanes); - enableLazyContextPropagation && - !stateNode && + stateNode || (propagateParentContextChanges( current, workInProgress, @@ -7244,7 +7231,12 @@ function beginWork(current, workInProgress, renderLanes) { nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); nextProps !== init.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); nextProps = nextState.element; if (init.isDehydrated) @@ -7409,16 +7401,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = init), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== init && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))); + (HostTransitionContext._currentValue = init)); markRef(current, workInProgress); reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; @@ -7507,36 +7490,22 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - a: { - elementType = workInProgress.type; - init = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextState = init.value; - pushProvider(workInProgress, elementType, nextState); - if (!enableLazyContextPropagation && null !== nextProps) - if (objectIs(nextProps.value, nextState)) { - if ( - nextProps.children === init.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); - workInProgress = workInProgress.child; - } - return workInProgress; + return ( + (elementType = workInProgress.pendingProps), + pushProvider(workInProgress, workInProgress.type, elementType.value), + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ), + workInProgress.child + ); case 9: return ( (init = workInProgress.type._context), (elementType = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (init = readContext(init)), markComponentRenderStarted(workInProgress), (elementType = elementType(init)), @@ -7573,7 +7542,7 @@ function beginWork(current, workInProgress, renderLanes) { isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, elementType, init), mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( @@ -7608,7 +7577,7 @@ function beginWork(current, workInProgress, renderLanes) { return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), @@ -7642,10 +7611,11 @@ function beginWork(current, workInProgress, renderLanes) { : ((elementType = nextProps.cache), pushProvider(workInProgress, CacheContext, elementType), elementType !== init.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -7691,133 +7661,62 @@ function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { parent = parent.return; } } -function propagateContextChange(workInProgress, context, renderLanes) { - if (enableLazyContextPropagation) - propagateContextChanges(workInProgress, [context], renderLanes, !0); - else if (!enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = 2; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } - } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - fiber.return, - renderLanes, - workInProgress - ); - list.lanes |= renderLanes; - break; - } - dependency = dependency.next; - } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = fiber.sibling; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } -} function propagateContextChanges( workInProgress, contexts, renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; } - nextFiber = nextFiber.return; + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; } - fiber = nextFiber; - } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } function propagateParentContextChanges( @@ -7826,48 +7725,45 @@ function propagateParentContextChanges( renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); } - parent = parent.return; + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } function checkIfContextChanged(currentDependencies) { - if (!enableLazyContextPropagation) return !1; for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; @@ -7884,23 +7780,17 @@ function checkIfContextChanged(currentDependencies) { } return !1; } -function prepareToReadContext(workInProgress, renderLanes) { +function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - (enableLazyContextPropagation - ? (workInProgress.firstContext = null) - : null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0), - (workInProgress.firstContext = null))); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { return readContextForConsumer(currentlyRenderingFiber, context); } -function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -7913,7 +7803,7 @@ function readContextForConsumer(consumer, context) { if (null === consumer) throw Error(formatProdErrorMessage(308)); lastContextDependency = context; consumer.dependencies = { lanes: 0, firstContext: context }; - enableLazyContextPropagation && (consumer.flags |= 524288); + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -8355,8 +8245,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$128) { - captureCommitPhaseError(current, nearestMountedAncestor, error$128); + } catch (error$127) { + captureCommitPhaseError(current, nearestMountedAncestor, error$127); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -8416,8 +8306,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$129) { - captureCommitPhaseError(current, nearestMountedAncestor, error$129); + } catch (error$128) { + captureCommitPhaseError(current, nearestMountedAncestor, error$128); } else ref.current = null; } @@ -8742,11 +8632,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$125) { + } catch (error$124) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$125 + error$124 ); } else { @@ -8763,11 +8653,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$126) { + } catch (error$125) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$126 + error$125 ); } recordEffectDuration(); @@ -8778,11 +8668,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$127) { + } catch (error$126) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$127 + error$126 ); } } @@ -8954,7 +8844,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$137 = hostParentIsContainer; + var prevHostParentIsContainer$136 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -8962,7 +8852,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$137; + hostParentIsContainer = prevHostParentIsContainer$136; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9649,21 +9539,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$130 = JSCompiler_inline_result.stateNode; + var parent$129 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$130, ""), + (setTextContent(parent$129, ""), (JSCompiler_inline_result.flags &= -33)); - var before$131 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$131, parent$130); + var before$130 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$130, parent$129); break; case 3: case 4: - var parent$132 = JSCompiler_inline_result.stateNode.containerInfo, - before$133 = getHostSibling(finishedWork); + var parent$131 = JSCompiler_inline_result.stateNode.containerInfo, + before$132 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$133, - parent$132 + before$132, + parent$131 ); break; default: @@ -10681,14 +10571,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$152 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$152 = lastTailNode), + for (var lastTailNode$151 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$151 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$152 + null === lastTailNode$151 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$152.sibling = null); + : (lastTailNode$151.sibling = null); } } function bubbleProperties(completedWork) { @@ -10700,53 +10590,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$154 = completedWork.selfBaseDuration, - child$155 = completedWork.child; - null !== child$155; + var treeBaseDuration$153 = completedWork.selfBaseDuration, + child$154 = completedWork.child; + null !== child$154; ) - (newChildLanes |= child$155.lanes | child$155.childLanes), - (subtreeFlags |= child$155.subtreeFlags & 31457280), - (subtreeFlags |= child$155.flags & 31457280), - (treeBaseDuration$154 += child$155.treeBaseDuration), - (child$155 = child$155.sibling); - completedWork.treeBaseDuration = treeBaseDuration$154; + (newChildLanes |= child$154.lanes | child$154.childLanes), + (subtreeFlags |= child$154.subtreeFlags & 31457280), + (subtreeFlags |= child$154.flags & 31457280), + (treeBaseDuration$153 += child$154.treeBaseDuration), + (child$154 = child$154.sibling); + completedWork.treeBaseDuration = treeBaseDuration$153; } else for ( - treeBaseDuration$154 = completedWork.child; - null !== treeBaseDuration$154; + treeBaseDuration$153 = completedWork.child; + null !== treeBaseDuration$153; ) (newChildLanes |= - treeBaseDuration$154.lanes | treeBaseDuration$154.childLanes), - (subtreeFlags |= treeBaseDuration$154.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$154.flags & 31457280), - (treeBaseDuration$154.return = completedWork), - (treeBaseDuration$154 = treeBaseDuration$154.sibling); + treeBaseDuration$153.lanes | treeBaseDuration$153.childLanes), + (subtreeFlags |= treeBaseDuration$153.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$153.flags & 31457280), + (treeBaseDuration$153.return = completedWork), + (treeBaseDuration$153 = treeBaseDuration$153.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$154 = completedWork.actualDuration; - child$155 = completedWork.selfBaseDuration; + treeBaseDuration$153 = completedWork.actualDuration; + child$154 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$154 += child.actualDuration), - (child$155 += child.treeBaseDuration), + (treeBaseDuration$153 += child.actualDuration), + (child$154 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$154; - completedWork.treeBaseDuration = child$155; + completedWork.actualDuration = treeBaseDuration$153; + completedWork.treeBaseDuration = child$154; } else for ( - treeBaseDuration$154 = completedWork.child; - null !== treeBaseDuration$154; + treeBaseDuration$153 = completedWork.child; + null !== treeBaseDuration$153; ) (newChildLanes |= - treeBaseDuration$154.lanes | treeBaseDuration$154.childLanes), - (subtreeFlags |= treeBaseDuration$154.subtreeFlags), - (subtreeFlags |= treeBaseDuration$154.flags), - (treeBaseDuration$154.return = completedWork), - (treeBaseDuration$154 = treeBaseDuration$154.sibling); + treeBaseDuration$153.lanes | treeBaseDuration$153.childLanes), + (subtreeFlags |= treeBaseDuration$153.subtreeFlags), + (subtreeFlags |= treeBaseDuration$153.flags), + (treeBaseDuration$153.return = completedWork), + (treeBaseDuration$153 = treeBaseDuration$153.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -11046,11 +10936,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$170 = null; + var cache$169 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$170 = newProps.memoizedState.cachePool.pool); - cache$170 !== type && (newProps.flags |= 2048); + (cache$169 = newProps.memoizedState.cachePool.pool); + cache$169 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -11089,8 +10979,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$170 = type.rendering; - if (null === cache$170) + cache$169 = type.rendering; + if (null === cache$169) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -11098,11 +10988,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$170 = findFirstSuspended(current); - if (null !== cache$170) { + cache$169 = findFirstSuspended(current); + if (null !== cache$169) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$170.updateQueue; + current = cache$169.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -11127,7 +11017,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$170)), null !== current)) { + if (((current = findFirstSuspended(cache$169)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -11137,7 +11027,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$170.alternate && + !cache$169.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -11150,13 +11040,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$170.sibling = workInProgress.child), - (workInProgress.child = cache$170)) + ? ((cache$169.sibling = workInProgress.child), + (workInProgress.child = cache$169)) : ((current = type.last), null !== current - ? (current.sibling = cache$170) - : (workInProgress.child = cache$170), - (type.last = cache$170)); + ? (current.sibling = cache$169) + : (workInProgress.child = cache$169), + (type.last = cache$169)); } if (null !== type.tail) return ( @@ -11949,8 +11839,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$191) { - handleThrow(root, thrownValue$191); + } catch (thrownValue$190) { + handleThrow(root, thrownValue$190); } while (1); lanes && root.shellSuspendCounter++; @@ -12071,8 +11961,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$193) { - handleThrow(root, thrownValue$193); + } catch (thrownValue$192) { + handleThrow(root, thrownValue$192); } while (1); resetContextDependencies(); @@ -12431,7 +12321,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$197 = rootWithPendingPassiveEffects, + var root$196 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12481,7 +12371,7 @@ function flushPassiveEffects() { } finally { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$197, remainingLanes); + releaseRootPooledCache(root$196, remainingLanes); } } return !1; @@ -12648,14 +12538,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$199 = firstScheduledRoot; null !== root$199; ) { - if (!onlyLegacy || 0 === root$199.tag) + for (var root$198 = firstScheduledRoot; null !== root$198; ) { + if (!onlyLegacy || 0 === root$198.tag) if (0 !== syncTransitionLanes) { - var pendingLanes = root$199.pendingLanes; + var pendingLanes = root$198.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$199.suspendedLanes, - pingedLanes = root$199.pingedLanes; + var suspendedLanes = root$198.suspendedLanes, + pingedLanes = root$198.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12669,18 +12559,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$199, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$198, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$199, - root$199 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$198, + root$198 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$199, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$198, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$199, JSCompiler_inline_result)); - root$199 = root$199.next; + performSyncWorkOnRoot(root$198, JSCompiler_inline_result)); + root$198 = root$198.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -12912,20 +12802,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1553 = 0; - i$jscomp$inline_1553 < simpleEventPluginEvents.length; - i$jscomp$inline_1553++ + var i$jscomp$inline_1530 = 0; + i$jscomp$inline_1530 < simpleEventPluginEvents.length; + i$jscomp$inline_1530++ ) { - var eventName$jscomp$inline_1554 = - simpleEventPluginEvents[i$jscomp$inline_1553], - domEventName$jscomp$inline_1555 = - eventName$jscomp$inline_1554.toLowerCase(), - capitalizedEvent$jscomp$inline_1556 = - eventName$jscomp$inline_1554[0].toUpperCase() + - eventName$jscomp$inline_1554.slice(1); + var eventName$jscomp$inline_1531 = + simpleEventPluginEvents[i$jscomp$inline_1530], + domEventName$jscomp$inline_1532 = + eventName$jscomp$inline_1531.toLowerCase(), + capitalizedEvent$jscomp$inline_1533 = + eventName$jscomp$inline_1531[0].toUpperCase() + + eventName$jscomp$inline_1531.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1555, - "on" + capitalizedEvent$jscomp$inline_1556 + domEventName$jscomp$inline_1532, + "on" + capitalizedEvent$jscomp$inline_1533 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14108,34 +13998,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$213 = props[hasSrc]; - if (null != propValue$213) + var propValue$212 = props[hasSrc]; + if (null != propValue$212) switch (hasSrc) { case "name": - hasSrcSet = propValue$213; + hasSrcSet = propValue$212; break; case "type": - propValue = propValue$213; + propValue = propValue$212; break; case "checked": - checked = propValue$213; + checked = propValue$212; break; case "defaultChecked": - defaultChecked = propValue$213; + defaultChecked = propValue$212; break; case "value": - propKey = propValue$213; + propKey = propValue$212; break; case "defaultValue": - defaultValue = propValue$213; + defaultValue = propValue$212; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$213) + if (null != propValue$212) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$213, props, null); + setProp(domElement, tag, hasSrc, propValue$212, props, null); } } initInput( @@ -14272,14 +14162,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$213 in props) - props.hasOwnProperty(propValue$213) && - ((hasSrc = props[propValue$213]), + for (propValue$212 in props) + props.hasOwnProperty(propValue$212) && + ((hasSrc = props[propValue$212]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$213, + propValue$212, hasSrc, props, void 0 @@ -14327,14 +14217,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$230 in nextProps) { - var propKey = nextProps[propKey$230]; - lastProp = lastProps[propKey$230]; + for (var propKey$229 in nextProps) { + var propKey = nextProps[propKey$229]; + lastProp = lastProps[propKey$229]; if ( - nextProps.hasOwnProperty(propKey$230) && + nextProps.hasOwnProperty(propKey$229) && (null != propKey || null != lastProp) ) - switch (propKey$230) { + switch (propKey$229) { case "type": type = propKey; break; @@ -14363,7 +14253,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$230, + propKey$229, propKey, nextProps, lastProp @@ -14382,7 +14272,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$230 = null; + propKey = value = defaultValue = propKey$229 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14413,7 +14303,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$230 = type; + propKey$229 = type; break; case "defaultValue": defaultValue = type; @@ -14434,15 +14324,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$230 - ? updateOptions(domElement, !!lastProps, propKey$230, !1) + null != propKey$229 + ? updateOptions(domElement, !!lastProps, propKey$229, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$230 = null; + propKey = propKey$229 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -14466,7 +14356,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$230 = name; + propKey$229 = name; break; case "defaultValue": propKey = name; @@ -14480,17 +14370,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$230, propKey); + updateTextarea(domElement, propKey$229, propKey); return; case "option": - for (var propKey$246 in lastProps) + for (var propKey$245 in lastProps) if ( - ((propKey$230 = lastProps[propKey$246]), - lastProps.hasOwnProperty(propKey$246) && - null != propKey$230 && - !nextProps.hasOwnProperty(propKey$246)) + ((propKey$229 = lastProps[propKey$245]), + lastProps.hasOwnProperty(propKey$245) && + null != propKey$229 && + !nextProps.hasOwnProperty(propKey$245)) ) - switch (propKey$246) { + switch (propKey$245) { case "selected": domElement.selected = !1; break; @@ -14498,33 +14388,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$246, + propKey$245, null, nextProps, - propKey$230 + propKey$229 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$230 = nextProps[lastDefaultValue]), + ((propKey$229 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$230 !== propKey && - (null != propKey$230 || null != propKey)) + propKey$229 !== propKey && + (null != propKey$229 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$230 && - "function" !== typeof propKey$230 && - "symbol" !== typeof propKey$230; + propKey$229 && + "function" !== typeof propKey$229 && + "symbol" !== typeof propKey$229; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$230, + propKey$229, nextProps, propKey ); @@ -14545,24 +14435,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$251 in lastProps) - (propKey$230 = lastProps[propKey$251]), - lastProps.hasOwnProperty(propKey$251) && - null != propKey$230 && - !nextProps.hasOwnProperty(propKey$251) && - setProp(domElement, tag, propKey$251, null, nextProps, propKey$230); + for (var propKey$250 in lastProps) + (propKey$229 = lastProps[propKey$250]), + lastProps.hasOwnProperty(propKey$250) && + null != propKey$229 && + !nextProps.hasOwnProperty(propKey$250) && + setProp(domElement, tag, propKey$250, null, nextProps, propKey$229); for (checked in nextProps) if ( - ((propKey$230 = nextProps[checked]), + ((propKey$229 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$230 !== propKey && - (null != propKey$230 || null != propKey)) + propKey$229 !== propKey && + (null != propKey$229 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$230) + if (null != propKey$229) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -14570,7 +14460,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$230, + propKey$229, nextProps, propKey ); @@ -14578,49 +14468,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$256 in lastProps) - (propKey$230 = lastProps[propKey$256]), - lastProps.hasOwnProperty(propKey$256) && - void 0 !== propKey$230 && - !nextProps.hasOwnProperty(propKey$256) && + for (var propKey$255 in lastProps) + (propKey$229 = lastProps[propKey$255]), + lastProps.hasOwnProperty(propKey$255) && + void 0 !== propKey$229 && + !nextProps.hasOwnProperty(propKey$255) && setPropOnCustomElement( domElement, tag, - propKey$256, + propKey$255, void 0, nextProps, - propKey$230 + propKey$229 ); for (defaultChecked in nextProps) - (propKey$230 = nextProps[defaultChecked]), + (propKey$229 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$230 === propKey || - (void 0 === propKey$230 && void 0 === propKey) || + propKey$229 === propKey || + (void 0 === propKey$229 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$230, + propKey$229, nextProps, propKey ); return; } } - for (var propKey$261 in lastProps) - (propKey$230 = lastProps[propKey$261]), - lastProps.hasOwnProperty(propKey$261) && - null != propKey$230 && - !nextProps.hasOwnProperty(propKey$261) && - setProp(domElement, tag, propKey$261, null, nextProps, propKey$230); + for (var propKey$260 in lastProps) + (propKey$229 = lastProps[propKey$260]), + lastProps.hasOwnProperty(propKey$260) && + null != propKey$229 && + !nextProps.hasOwnProperty(propKey$260) && + setProp(domElement, tag, propKey$260, null, nextProps, propKey$229); for (lastProp in nextProps) - (propKey$230 = nextProps[lastProp]), + (propKey$229 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$230 === propKey || - (null == propKey$230 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$230, nextProps, propKey); + propKey$229 === propKey || + (null == propKey$229 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$229, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15160,26 +15050,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$269 = getResourcesFromRoot( + var styles$268 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$270 = styles$269.get(type); - resource$270 || + resource$269 = styles$268.get(type); + resource$269 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$270 = { + (resource$269 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$269.set(type, resource$270), - (styles$269 = JSCompiler_inline_result.querySelector( + styles$268.set(type, resource$269), + (styles$268 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$269._p && - ((resource$270.instance = styles$269), - (resource$270.state.loading = 5)), + !styles$268._p && + ((resource$269.instance = styles$268), + (resource$269.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15192,16 +15082,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$269 || + styles$268 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$270.state + resource$269.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$270; + return resource$269; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15298,37 +15188,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$275 = hoistableRoot.querySelector( + var instance$274 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$275) + if (instance$274) return ( (resource.state.loading |= 4), - (resource.instance = instance$275), - markNodeAsHoistable(instance$275), - instance$275 + (resource.instance = instance$274), + markNodeAsHoistable(instance$274), + instance$274 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$275 = ( + instance$274 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$275); - var linkInstance = instance$275; + markNodeAsHoistable(instance$274); + var linkInstance = instance$274; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$275, "link", instance); + setInitialProperties(instance$274, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$275, props.precedence, hoistableRoot); - return (resource.instance = instance$275); + insertStylesheet(instance$274, props.precedence, hoistableRoot); + return (resource.instance = instance$274); case "script": - instance$275 = getScriptKey(props.src); + instance$274 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$275) + getScriptSelectorFromKey(instance$274) )) ) return ( @@ -15337,7 +15227,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$275))) + if ((styleProps = preloadPropsMap.get(instance$274))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16403,16 +16293,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1798 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1775 = React.version; if ( - "19.0.0-native-fb-d66fa02a-20240926" !== - isomorphicReactPackageVersion$jscomp$inline_1798 + "19.0.0-native-fb-60b1420f-20240926" !== + isomorphicReactPackageVersion$jscomp$inline_1775 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1798, - "19.0.0-native-fb-d66fa02a-20240926" + isomorphicReactPackageVersion$jscomp$inline_1775, + "19.0.0-native-fb-60b1420f-20240926" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -16432,18 +16322,18 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_1805 = { +var internals$jscomp$inline_1782 = { bundleType: 0, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926", + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926", getLaneLabelMap: function () { for ( - var map = new Map(), lane = 1, index$292 = 0; - 31 > index$292; - index$292++ + var map = new Map(), lane = 1, index$291 = 0; + 31 > index$291; + index$291++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -16456,16 +16346,16 @@ var internals$jscomp$inline_1805 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2203 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2190 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2203.isDisabled && - hook$jscomp$inline_2203.supportsFiber + !hook$jscomp$inline_2190.isDisabled && + hook$jscomp$inline_2190.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2203.inject( - internals$jscomp$inline_1805 + (rendererID = hook$jscomp$inline_2190.inject( + internals$jscomp$inline_1782 )), - (injectedHook = hook$jscomp$inline_2203); + (injectedHook = hook$jscomp$inline_2190); } catch (err) {} } exports.createRoot = function (container, options) { @@ -16557,4 +16447,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.0.0-native-fb-d66fa02a-20240926"; +exports.version = "19.0.0-native-fb-60b1420f-20240926"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js index cd6366d367e71..7bd84754dfedb 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8c15d4eb3be49fe903be47b5a2def320>> + * @generated SignedSource<<504f0e353606a91012ebe9bf945a5536>> */ /* @@ -4832,7 +4832,7 @@ __DEV__ && if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -4913,7 +4913,7 @@ __DEV__ && return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -5010,7 +5010,7 @@ __DEV__ && existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -5495,7 +5495,7 @@ __DEV__ && return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -5948,9 +5948,8 @@ __DEV__ && throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." ); - enableLazyContextPropagation && - null !== current && - !didReceiveUpdate && + null === current || + didReceiveUpdate || ((current = current.dependencies), null !== current && checkIfContextChanged(current) && @@ -8027,16 +8026,14 @@ __DEV__ && "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); currentSourceFiber = sourceFiber.tag; (sourceFiber.mode & ConcurrentMode) !== NoMode || (0 !== currentSourceFiber && @@ -8259,7 +8256,7 @@ __DEV__ && for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); nextProps = renderWithHooks( current, @@ -8466,8 +8463,7 @@ __DEV__ && null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(workInProgress); pushOffscreenSuspenseHandler(workInProgress); - enableLazyContextPropagation && - null !== current && + null !== current && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } @@ -8525,7 +8521,7 @@ __DEV__ && ? previousContext : contextStackCursor.current; componentName = getMaskedContext(workInProgress, componentName); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); Component = renderWithHooks( current, @@ -8555,7 +8551,7 @@ __DEV__ && secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); hookTypesUpdateIndexDev = -1; ignorePreviousDependencies = @@ -8619,7 +8615,7 @@ __DEV__ && isContextProvider(Component) ? ((_instance = !0), pushContextProvider(workInProgress)) : (_instance = !1); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -8746,8 +8742,7 @@ __DEV__ && unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && @@ -8769,8 +8764,7 @@ __DEV__ && newState, oldContext ) || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || @@ -8962,32 +8956,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2329; - var JSCompiler_object_inline_stack_2330 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2317; + var JSCompiler_object_inline_stack_2318 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2331 = !1; + var JSCompiler_object_inline_componentStack_2319 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2329 = didSuspend) || - (JSCompiler_object_inline_digest_2329 = + (JSCompiler_object_inline_digest_2317 = didSuspend) || + (JSCompiler_object_inline_digest_2317 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2329 && - ((JSCompiler_object_inline_componentStack_2331 = !0), + JSCompiler_object_inline_digest_2317 && + ((JSCompiler_object_inline_componentStack_2319 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2329 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2317 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2331 + JSCompiler_object_inline_componentStack_2319 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2328 = nextHydratableInstance; + var JSCompiler_object_inline_message_2316 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2328)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2316)) { c: { - var instance = JSCompiler_object_inline_message_2328; + var instance = JSCompiler_object_inline_message_2316; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -9028,19 +9022,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2328 + JSCompiler_object_inline_message_2316 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2328 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2316 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2328 && - ((JSCompiler_object_inline_message_2328 = - JSCompiler_object_inline_message_2328.dehydrated), - null !== JSCompiler_object_inline_message_2328) + null !== JSCompiler_object_inline_message_2316 && + ((JSCompiler_object_inline_message_2316 = + JSCompiler_object_inline_message_2316.dehydrated), + null !== JSCompiler_object_inline_message_2316) ) return ( - JSCompiler_object_inline_message_2328.data === + JSCompiler_object_inline_message_2316.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9048,70 +9042,70 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2328 = - JSCompiler_object_inline_stack_2330.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2330.fallback; - if (JSCompiler_object_inline_componentStack_2331) + JSCompiler_object_inline_message_2316 = + JSCompiler_object_inline_stack_2318.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2318.fallback; + if (JSCompiler_object_inline_componentStack_2319) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2330 = + (JSCompiler_object_inline_stack_2318 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2328, + JSCompiler_object_inline_message_2316, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2331 = + (JSCompiler_object_inline_componentStack_2319 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2331.memoizedState = + (JSCompiler_object_inline_componentStack_2319.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2331.childLanes = + (JSCompiler_object_inline_componentStack_2319.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2329, + JSCompiler_object_inline_digest_2317, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2330 + JSCompiler_object_inline_stack_2318 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2330.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2318.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2330 = + (JSCompiler_object_inline_stack_2318 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2328, + JSCompiler_object_inline_message_2316, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2331 = + (JSCompiler_object_inline_componentStack_2319 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2331.memoizedState = + (JSCompiler_object_inline_componentStack_2319.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2331.childLanes = + (JSCompiler_object_inline_componentStack_2319.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2329, + JSCompiler_object_inline_digest_2317, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2330 + JSCompiler_object_inline_stack_2318 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2328 + JSCompiler_object_inline_message_2316 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2328 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2328) + ((JSCompiler_object_inline_message_2316 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2316) ) { if (didSuspend) workInProgress.flags & 256 @@ -9128,32 +9122,32 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2331 = - JSCompiler_object_inline_stack_2330.fallback), - (JSCompiler_object_inline_message_2328 = workInProgress.mode), - (JSCompiler_object_inline_stack_2330 = createFiberFromOffscreen( + (JSCompiler_object_inline_componentStack_2319 = + JSCompiler_object_inline_stack_2318.fallback), + (JSCompiler_object_inline_message_2316 = workInProgress.mode), + (JSCompiler_object_inline_stack_2318 = createFiberFromOffscreen( { mode: "visible", - children: JSCompiler_object_inline_stack_2330.children + children: JSCompiler_object_inline_stack_2318.children }, - JSCompiler_object_inline_message_2328, + JSCompiler_object_inline_message_2316, 0, null )), - (JSCompiler_object_inline_componentStack_2331 = + (JSCompiler_object_inline_componentStack_2319 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2331, - JSCompiler_object_inline_message_2328, + JSCompiler_object_inline_componentStack_2319, + JSCompiler_object_inline_message_2316, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2331.flags |= 2), - (JSCompiler_object_inline_stack_2330.return = workInProgress), - (JSCompiler_object_inline_componentStack_2331.return = + (JSCompiler_object_inline_componentStack_2319.flags |= 2), + (JSCompiler_object_inline_stack_2318.return = workInProgress), + (JSCompiler_object_inline_componentStack_2319.return = workInProgress), - (JSCompiler_object_inline_stack_2330.sibling = - JSCompiler_object_inline_componentStack_2331), - (workInProgress.child = JSCompiler_object_inline_stack_2330), + (JSCompiler_object_inline_stack_2318.sibling = + JSCompiler_object_inline_componentStack_2319), + (workInProgress.child = JSCompiler_object_inline_stack_2318), (workInProgress.mode & ConcurrentMode) !== NoMode && reconcileChildFibers( workInProgress, @@ -9161,63 +9155,63 @@ __DEV__ && null, renderLanes ), - (JSCompiler_object_inline_stack_2330 = workInProgress.child), - (JSCompiler_object_inline_stack_2330.memoizedState = + (JSCompiler_object_inline_stack_2318 = workInProgress.child), + (JSCompiler_object_inline_stack_2318.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2330.childLanes = + (JSCompiler_object_inline_stack_2318.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2329, + JSCompiler_object_inline_digest_2317, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2331)); + JSCompiler_object_inline_componentStack_2319)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_message_2328.data === + JSCompiler_object_inline_message_2316.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2329 = - JSCompiler_object_inline_message_2328.nextSibling && - JSCompiler_object_inline_message_2328.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2329) { - JSCompiler_temp = JSCompiler_object_inline_digest_2329.dgst; - var message = JSCompiler_object_inline_digest_2329.msg; - instance = JSCompiler_object_inline_digest_2329.stck; - var componentStack = JSCompiler_object_inline_digest_2329.cstck; + JSCompiler_object_inline_digest_2317 = + JSCompiler_object_inline_message_2316.nextSibling && + JSCompiler_object_inline_message_2316.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2317) { + JSCompiler_temp = JSCompiler_object_inline_digest_2317.dgst; + var message = JSCompiler_object_inline_digest_2317.msg; + instance = JSCompiler_object_inline_digest_2317.stck; + var componentStack = JSCompiler_object_inline_digest_2317.cstck; } - JSCompiler_object_inline_message_2328 = message; - JSCompiler_object_inline_digest_2329 = JSCompiler_temp; - JSCompiler_object_inline_stack_2330 = instance; - JSCompiler_object_inline_componentStack_2331 = componentStack; - JSCompiler_object_inline_message_2328 = - JSCompiler_object_inline_message_2328 - ? Error(JSCompiler_object_inline_message_2328) + JSCompiler_object_inline_message_2316 = message; + JSCompiler_object_inline_digest_2317 = JSCompiler_temp; + JSCompiler_object_inline_stack_2318 = instance; + JSCompiler_object_inline_componentStack_2319 = componentStack; + JSCompiler_object_inline_message_2316 = + JSCompiler_object_inline_message_2316 + ? Error(JSCompiler_object_inline_message_2316) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2328.stack = - JSCompiler_object_inline_stack_2330 || ""; - JSCompiler_object_inline_message_2328.digest = - JSCompiler_object_inline_digest_2329; - JSCompiler_object_inline_digest_2329 = - void 0 === JSCompiler_object_inline_componentStack_2331 + JSCompiler_object_inline_message_2316.stack = + JSCompiler_object_inline_stack_2318 || ""; + JSCompiler_object_inline_message_2316.digest = + JSCompiler_object_inline_digest_2317; + JSCompiler_object_inline_digest_2317 = + void 0 === JSCompiler_object_inline_componentStack_2319 ? null - : JSCompiler_object_inline_componentStack_2331; - "string" === typeof JSCompiler_object_inline_digest_2329 && + : JSCompiler_object_inline_componentStack_2319; + "string" === typeof JSCompiler_object_inline_digest_2317 && CapturedStacks.set( - JSCompiler_object_inline_message_2328, - JSCompiler_object_inline_digest_2329 + JSCompiler_object_inline_message_2316, + JSCompiler_object_inline_digest_2317 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2328, + value: JSCompiler_object_inline_message_2316, source: null, - stack: JSCompiler_object_inline_digest_2329 + stack: JSCompiler_object_inline_digest_2317 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9225,33 +9219,32 @@ __DEV__ && renderLanes ); } else if ( - (enableLazyContextPropagation && - !didReceiveUpdate && + (didReceiveUpdate || propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (JSCompiler_object_inline_digest_2329 = + (JSCompiler_object_inline_digest_2317 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2329) + didReceiveUpdate || JSCompiler_object_inline_digest_2317) ) { - JSCompiler_object_inline_digest_2329 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2329) { - JSCompiler_object_inline_stack_2330 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2330 & 42)) - JSCompiler_object_inline_stack_2330 = 1; + JSCompiler_object_inline_digest_2317 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2317) { + JSCompiler_object_inline_stack_2318 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2318 & 42)) + JSCompiler_object_inline_stack_2318 = 1; else - switch (JSCompiler_object_inline_stack_2330) { + switch (JSCompiler_object_inline_stack_2318) { case 2: - JSCompiler_object_inline_stack_2330 = 1; + JSCompiler_object_inline_stack_2318 = 1; break; case 8: - JSCompiler_object_inline_stack_2330 = 4; + JSCompiler_object_inline_stack_2318 = 4; break; case 32: - JSCompiler_object_inline_stack_2330 = 16; + JSCompiler_object_inline_stack_2318 = 16; break; case 128: case 256: @@ -9272,40 +9265,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2330 = 64; + JSCompiler_object_inline_stack_2318 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2330 = 134217728; + JSCompiler_object_inline_stack_2318 = 134217728; break; default: - JSCompiler_object_inline_stack_2330 = 0; + JSCompiler_object_inline_stack_2318 = 0; } - JSCompiler_object_inline_stack_2330 = + JSCompiler_object_inline_stack_2318 = 0 !== - (JSCompiler_object_inline_stack_2330 & - (JSCompiler_object_inline_digest_2329.suspendedLanes | + (JSCompiler_object_inline_stack_2318 & + (JSCompiler_object_inline_digest_2317.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2330; + : JSCompiler_object_inline_stack_2318; if ( - 0 !== JSCompiler_object_inline_stack_2330 && - JSCompiler_object_inline_stack_2330 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2318 && + JSCompiler_object_inline_stack_2318 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2330), + ((prevState.retryLane = JSCompiler_object_inline_stack_2318), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2330 + JSCompiler_object_inline_stack_2318 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2329, + JSCompiler_object_inline_digest_2317, current, - JSCompiler_object_inline_stack_2330 + JSCompiler_object_inline_stack_2318 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2328.data === + JSCompiler_object_inline_message_2316.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9313,7 +9306,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2328.data === + JSCompiler_object_inline_message_2316.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9321,12 +9314,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2328._reactRetry = + (JSCompiler_object_inline_message_2316._reactRetry = workInProgress), (workInProgress = null)) : ((renderLanes = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2328.nextSibling + JSCompiler_object_inline_message_2316.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9344,72 +9337,72 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2330.children + JSCompiler_object_inline_stack_2318.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2331) + if (JSCompiler_object_inline_componentStack_2319) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2331 = - JSCompiler_object_inline_stack_2330.fallback), - (JSCompiler_object_inline_message_2328 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2319 = + JSCompiler_object_inline_stack_2318.fallback), + (JSCompiler_object_inline_message_2316 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), (componentStack = { mode: "hidden", - children: JSCompiler_object_inline_stack_2330.children + children: JSCompiler_object_inline_stack_2318.children }), - (JSCompiler_object_inline_message_2328 & ConcurrentMode) === NoMode && + (JSCompiler_object_inline_message_2316 & ConcurrentMode) === NoMode && workInProgress.child !== JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2330 = workInProgress.child), - (JSCompiler_object_inline_stack_2330.childLanes = 0), - (JSCompiler_object_inline_stack_2330.pendingProps = + ? ((JSCompiler_object_inline_stack_2318 = workInProgress.child), + (JSCompiler_object_inline_stack_2318.childLanes = 0), + (JSCompiler_object_inline_stack_2318.pendingProps = componentStack), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2330.actualDuration = -0), - (JSCompiler_object_inline_stack_2330.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2330.selfBaseDuration = + ((JSCompiler_object_inline_stack_2318.actualDuration = -0), + (JSCompiler_object_inline_stack_2318.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2318.selfBaseDuration = JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2330.treeBaseDuration = + (JSCompiler_object_inline_stack_2318.treeBaseDuration = JSCompiler_temp.treeBaseDuration)), (workInProgress.deletions = null)) - : ((JSCompiler_object_inline_stack_2330 = createWorkInProgress( + : ((JSCompiler_object_inline_stack_2318 = createWorkInProgress( JSCompiler_temp, componentStack )), - (JSCompiler_object_inline_stack_2330.subtreeFlags = + (JSCompiler_object_inline_stack_2318.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280)), null !== instance - ? (JSCompiler_object_inline_componentStack_2331 = + ? (JSCompiler_object_inline_componentStack_2319 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2331 + JSCompiler_object_inline_componentStack_2319 )) - : ((JSCompiler_object_inline_componentStack_2331 = + : ((JSCompiler_object_inline_componentStack_2319 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2331, - JSCompiler_object_inline_message_2328, + JSCompiler_object_inline_componentStack_2319, + JSCompiler_object_inline_message_2316, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2331.flags |= 2)), - (JSCompiler_object_inline_componentStack_2331.return = + (JSCompiler_object_inline_componentStack_2319.flags |= 2)), + (JSCompiler_object_inline_componentStack_2319.return = workInProgress), - (JSCompiler_object_inline_stack_2330.return = workInProgress), - (JSCompiler_object_inline_stack_2330.sibling = - JSCompiler_object_inline_componentStack_2331), - (workInProgress.child = JSCompiler_object_inline_stack_2330), - (JSCompiler_object_inline_stack_2330 = - JSCompiler_object_inline_componentStack_2331), - (JSCompiler_object_inline_componentStack_2331 = workInProgress.child), - (JSCompiler_object_inline_message_2328 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2328 - ? (JSCompiler_object_inline_message_2328 = + (JSCompiler_object_inline_stack_2318.return = workInProgress), + (JSCompiler_object_inline_stack_2318.sibling = + JSCompiler_object_inline_componentStack_2319), + (workInProgress.child = JSCompiler_object_inline_stack_2318), + (JSCompiler_object_inline_stack_2318 = + JSCompiler_object_inline_componentStack_2319), + (JSCompiler_object_inline_componentStack_2319 = workInProgress.child), + (JSCompiler_object_inline_message_2316 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2316 + ? (JSCompiler_object_inline_message_2316 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2328.cachePool), + JSCompiler_object_inline_message_2316.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9417,45 +9410,45 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2328 = { + (JSCompiler_object_inline_message_2316 = { baseLanes: - JSCompiler_object_inline_message_2328.baseLanes | renderLanes, + JSCompiler_object_inline_message_2316.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2331.memoizedState = - JSCompiler_object_inline_message_2328), - (JSCompiler_object_inline_componentStack_2331.childLanes = + (JSCompiler_object_inline_componentStack_2319.memoizedState = + JSCompiler_object_inline_message_2316), + (JSCompiler_object_inline_componentStack_2319.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2329, + JSCompiler_object_inline_digest_2317, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2330 + JSCompiler_object_inline_stack_2318 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2329 = current.child; - current = JSCompiler_object_inline_digest_2329.sibling; - JSCompiler_object_inline_digest_2329 = createWorkInProgress( - JSCompiler_object_inline_digest_2329, + JSCompiler_object_inline_digest_2317 = current.child; + current = JSCompiler_object_inline_digest_2317.sibling; + JSCompiler_object_inline_digest_2317 = createWorkInProgress( + JSCompiler_object_inline_digest_2317, { mode: "visible", - children: JSCompiler_object_inline_stack_2330.children + children: JSCompiler_object_inline_stack_2318.children } ); (workInProgress.mode & ConcurrentMode) === NoMode && - (JSCompiler_object_inline_digest_2329.lanes = renderLanes); - JSCompiler_object_inline_digest_2329.return = workInProgress; - JSCompiler_object_inline_digest_2329.sibling = null; + (JSCompiler_object_inline_digest_2317.lanes = renderLanes); + JSCompiler_object_inline_digest_2317.return = workInProgress; + JSCompiler_object_inline_digest_2317.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2329; + workInProgress.child = JSCompiler_object_inline_digest_2317; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2329; + return JSCompiler_object_inline_digest_2317; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = createFiberFromOffscreen( @@ -9752,7 +9745,7 @@ __DEV__ && profilerStartTime = -1; workInProgressRootSkippedLanes |= workInProgress.lanes; if (0 === (renderLanes & workInProgress.childLanes)) - if (enableLazyContextPropagation && null !== current) { + if (null !== current) { if ( (propagateParentContextChanges( current, @@ -9780,12 +9773,9 @@ __DEV__ && return workInProgress.child; } function checkScheduledUpdateOrContext(current, renderLanes) { - return 0 !== (current.lanes & renderLanes) || - (enableLazyContextPropagation && - ((current = current.dependencies), - null !== current && checkIfContextChanged(current))) - ? !0 - : !1; + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; } function attemptEarlyBailoutIfNoScheduledUpdate( current, @@ -9859,8 +9849,7 @@ __DEV__ && case 19: var didSuspendBefore = 0 !== (current.flags & 128); stateNode = 0 !== (renderLanes & workInProgress.childLanes); - enableLazyContextPropagation && - !stateNode && + stateNode || (propagateParentContextChanges( current, workInProgress, @@ -10092,7 +10081,12 @@ __DEV__ && nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); nextProps !== prevSibling.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); nextProps = nextState.element; if (prevSibling.isDehydrated) @@ -10312,16 +10306,7 @@ __DEV__ && null, renderLanes )), - (HostTransitionContext._currentValue = prevSibling), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== prevSibling && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), + (HostTransitionContext._currentValue = prevSibling)), markRef(current, workInProgress), reconcileChildren( current, @@ -10429,46 +10414,25 @@ __DEV__ && workInProgress.child ); case 10: - a: { - returnFiber = workInProgress.type; - prevSibling = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextState = prevSibling.value; + return ( + (returnFiber = workInProgress.type), + (prevSibling = workInProgress.pendingProps), + (nextProps = prevSibling.value), "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), error$jscomp$0( "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" - )); - pushProvider(workInProgress, returnFiber, nextState); - if (!enableLazyContextPropagation && null !== nextProps) - if (objectIs(nextProps.value, nextState)) { - if ( - nextProps.children === prevSibling.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange( - workInProgress, - returnFiber, - renderLanes - ); + )), + pushProvider(workInProgress, returnFiber, nextProps), reconcileChildren( current, workInProgress, prevSibling.children, renderLanes - ); - workInProgress = workInProgress.child; - } - return workInProgress; + ), + workInProgress.child + ); case 9: return ( (prevSibling = workInProgress.type._context), @@ -10477,7 +10441,7 @@ __DEV__ && error$jscomp$0( "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." ), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (prevSibling = readContext(prevSibling)), markComponentRenderStarted(workInProgress), (returnFiber = callComponentInDEV( @@ -10523,7 +10487,7 @@ __DEV__ && isContextProvider(returnFiber) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, returnFiber, prevSibling), mountClassInstance( workInProgress, @@ -10567,7 +10531,7 @@ __DEV__ && return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (returnFiber = readContext(CacheContext)), null === current ? ((prevSibling = peekCacheFromPool()), @@ -10605,10 +10569,11 @@ __DEV__ && : ((returnFiber = nextProps.cache), pushProvider(workInProgress, CacheContext, returnFiber), returnFiber !== prevSibling.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -10674,147 +10639,69 @@ __DEV__ && "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." ); } - function propagateContextChange(workInProgress, context, renderLanes) { - if (enableLazyContextPropagation) - propagateContextChanges(workInProgress, [context], renderLanes, !0); - else if (!enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = ForceUpdate; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } - } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); scheduleContextWorkOnParentPath( - fiber.return, + list.return, renderLanes, workInProgress ); - list.lanes |= renderLanes; - break; + forcePropagateEntireTree || (nextFiber = null); + break a; } - dependency = dependency.next; - } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." ); - nextFiber = fiber.sibling; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - if (enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; } - fiber = nextFiber; - } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } function propagateParentContextChanges( @@ -10823,56 +10710,49 @@ __DEV__ && renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error( - "Should have a current fiber. This is a bug in React." - ); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error( - "Should have a current fiber. This is a bug in React." - ); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); + ? current.push(context) + : (current = [context])); } - parent = parent.return; + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } function checkIfContextChanged(currentDependencies) { - if (!enableLazyContextPropagation) return !1; for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; @@ -10889,17 +10769,11 @@ __DEV__ && } return !1; } - function prepareToReadContext(workInProgress, renderLanes) { + function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - (enableLazyContextPropagation - ? (workInProgress.firstContext = null) - : null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && - (didReceiveUpdate = !0), - (workInProgress.firstContext = null))); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { isDisallowedContextReadInDEV && @@ -10908,9 +10782,8 @@ __DEV__ && ); return readContextForConsumer(currentlyRenderingFiber, context); } - function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -10930,7 +10803,7 @@ __DEV__ && firstContext: context, _debugThenableState: null }; - enableLazyContextPropagation && (consumer.flags |= 524288); + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -21901,8 +21774,6 @@ __DEV__ && enableObjectFiber = dynamicFlagsUntyped.enableObjectFiber, enablePersistedModeClonedFlag = dynamicFlagsUntyped.enablePersistedModeClonedFlag, - enableLazyContextPropagation = - dynamicFlagsUntyped.enableLazyContextPropagation, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE, @@ -25533,11 +25404,11 @@ __DEV__ && }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-native-fb-d66fa02a-20240926" !== isomorphicReactPackageVersion) + if ("19.0.0-native-fb-60b1420f-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-native-fb-d66fa02a-20240926\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-native-fb-60b1420f-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -25574,11 +25445,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926" + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -26038,7 +25909,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-native-fb-d66fa02a-20240926"; + exports.version = "19.0.0-native-fb-60b1420f-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js index b506bf64d5eb9..681a480ebe19e 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<7f6e01bcfc6180fc72882ab81f548447>> + * @generated SignedSource<<4e94c53aca4ef55308a33b8ba34c11bc>> */ /* @@ -39,8 +39,6 @@ var alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries, enableObjectFiber = dynamicFlagsUntyped.enableObjectFiber, enablePersistedModeClonedFlag = dynamicFlagsUntyped.enablePersistedModeClonedFlag, - enableLazyContextPropagation = - dynamicFlagsUntyped.enableLazyContextPropagation, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering; function isValidContainer(node) { return !( @@ -2066,19 +2064,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$295; + var JSCompiler_inline_result$jscomp$294; if (canUseDOM) { - var isSupported$jscomp$inline_429 = "oninput" in document; - if (!isSupported$jscomp$inline_429) { - var element$jscomp$inline_430 = document.createElement("div"); - element$jscomp$inline_430.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_429 = - "function" === typeof element$jscomp$inline_430.oninput; + var isSupported$jscomp$inline_428 = "oninput" in document; + if (!isSupported$jscomp$inline_428) { + var element$jscomp$inline_429 = document.createElement("div"); + element$jscomp$inline_429.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_428 = + "function" === typeof element$jscomp$inline_429.oninput; } - JSCompiler_inline_result$jscomp$295 = isSupported$jscomp$inline_429; - } else JSCompiler_inline_result$jscomp$295 = !1; + JSCompiler_inline_result$jscomp$294 = isSupported$jscomp$inline_428; + } else JSCompiler_inline_result$jscomp$294 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$295 && + JSCompiler_inline_result$jscomp$294 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -3084,7 +3082,7 @@ function createChildReconciler(shouldTrackSideEffects) { if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3133,7 +3131,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3203,7 +3201,7 @@ function createChildReconciler(shouldTrackSideEffects) { existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3535,7 +3533,7 @@ function createChildReconciler(shouldTrackSideEffects) { return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3857,9 +3855,8 @@ function finishRenderingHooks(current) { thenableIndexCounter = 0; thenableState = null; if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300)); - enableLazyContextPropagation && - null !== current && - !didReceiveUpdate && + null === current || + didReceiveUpdate || ((current = current.dependencies), null !== current && checkIfContextChanged(current) && @@ -5502,16 +5499,14 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); currentSourceFiber = sourceFiber.tag; 0 !== (sourceFiber.mode & 1) || (0 !== currentSourceFiber && @@ -5707,7 +5702,7 @@ function updateForwardRef( for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); nextProps = renderWithHooks( current, workInProgress, @@ -5893,8 +5888,7 @@ function deferHiddenOffscreenComponent( null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(); pushOffscreenSuspenseHandler(workInProgress); - enableLazyContextPropagation && - null !== current && + null !== current && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } @@ -5922,7 +5916,7 @@ function updateFunctionComponent( ? previousContext : contextStackCursor.current; context = getMaskedContext(workInProgress, context); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); Component = renderWithHooks( current, workInProgress, @@ -5950,7 +5944,7 @@ function replayFunctionComponent( secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); workInProgress.updateQueue = null; nextProps = renderWithHooksAgain( workInProgress, @@ -5981,7 +5975,7 @@ function updateClassComponent( var hasContext = !0; pushContextProvider(workInProgress); } else hasContext = !1; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -6102,8 +6096,7 @@ function updateClassComponent( unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && @@ -6125,8 +6118,7 @@ function updateClassComponent( newState, oldContext ) || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || @@ -6447,8 +6439,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes ); } else if ( - (enableLazyContextPropagation && - !didReceiveUpdate && + (didReceiveUpdate || propagateParentContextChanges(current, workInProgress, renderLanes, !1), (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), didReceiveUpdate || JSCompiler_temp) @@ -6805,7 +6796,7 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { null !== current && (workInProgress.dependencies = current.dependencies); workInProgressRootSkippedLanes |= workInProgress.lanes; if (0 === (renderLanes & workInProgress.childLanes)) - if (enableLazyContextPropagation && null !== current) { + if (null !== current) { if ( (propagateParentContextChanges( current, @@ -6833,12 +6824,9 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { return workInProgress.child; } function checkScheduledUpdateOrContext(current, renderLanes) { - return 0 !== (current.lanes & renderLanes) || - (enableLazyContextPropagation && - ((current = current.dependencies), - null !== current && checkIfContextChanged(current))) - ? !0 - : !1; + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; } function attemptEarlyBailoutIfNoScheduledUpdate( current, @@ -6893,8 +6881,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 19: var didSuspendBefore = 0 !== (current.flags & 128); state = 0 !== (renderLanes & workInProgress.childLanes); - enableLazyContextPropagation && - !state && + state || (propagateParentContextChanges( current, workInProgress, @@ -7052,7 +7039,12 @@ function beginWork(current, workInProgress, renderLanes) { nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); nextProps !== init.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); nextProps = nextState.element; if (init.isDehydrated) @@ -7217,16 +7209,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = init), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== init && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))); + (HostTransitionContext._currentValue = init)); markRef(current, workInProgress); reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; @@ -7310,36 +7293,22 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - a: { - elementType = workInProgress.type; - init = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextState = init.value; - pushProvider(workInProgress, elementType, nextState); - if (!enableLazyContextPropagation && null !== nextProps) - if (objectIs(nextProps.value, nextState)) { - if ( - nextProps.children === init.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); - workInProgress = workInProgress.child; - } - return workInProgress; + return ( + (elementType = workInProgress.pendingProps), + pushProvider(workInProgress, workInProgress.type, elementType.value), + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ), + workInProgress.child + ); case 9: return ( (init = workInProgress.type._context), (elementType = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (init = readContext(init)), (elementType = elementType(init)), (workInProgress.flags |= 1), @@ -7374,7 +7343,7 @@ function beginWork(current, workInProgress, renderLanes) { isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, elementType, init), mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( @@ -7409,7 +7378,7 @@ function beginWork(current, workInProgress, renderLanes) { return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), @@ -7443,10 +7412,11 @@ function beginWork(current, workInProgress, renderLanes) { : ((elementType = nextProps.cache), pushProvider(workInProgress, CacheContext, elementType), elementType !== init.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -7492,133 +7462,62 @@ function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { parent = parent.return; } } -function propagateContextChange(workInProgress, context, renderLanes) { - if (enableLazyContextPropagation) - propagateContextChanges(workInProgress, [context], renderLanes, !0); - else if (!enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = 2; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } - } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - fiber.return, - renderLanes, - workInProgress - ); - list.lanes |= renderLanes; - break; - } - dependency = dependency.next; - } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = fiber.sibling; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } -} function propagateContextChanges( workInProgress, contexts, renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; } - nextFiber = nextFiber.return; + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; } - fiber = nextFiber; - } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } function propagateParentContextChanges( @@ -7627,48 +7526,45 @@ function propagateParentContextChanges( renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); } - parent = parent.return; + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } function checkIfContextChanged(currentDependencies) { - if (!enableLazyContextPropagation) return !1; for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; @@ -7685,23 +7581,17 @@ function checkIfContextChanged(currentDependencies) { } return !1; } -function prepareToReadContext(workInProgress, renderLanes) { +function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - (enableLazyContextPropagation - ? (workInProgress.firstContext = null) - : null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0), - (workInProgress.firstContext = null))); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { return readContextForConsumer(currentlyRenderingFiber, context); } -function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -7714,7 +7604,7 @@ function readContextForConsumer(consumer, context) { if (null === consumer) throw Error(formatProdErrorMessage(308)); lastContextDependency = context; consumer.dependencies = { lanes: 0, firstContext: context }; - enableLazyContextPropagation && (consumer.flags |= 524288); + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -8087,8 +7977,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$123) { - captureCommitPhaseError(current, nearestMountedAncestor, error$123); + } catch (error$122) { + captureCommitPhaseError(current, nearestMountedAncestor, error$122); } else ref.current = null; } @@ -8384,11 +8274,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$122) { + } catch (error$121) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$122 + error$121 ); } } @@ -8547,7 +8437,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$130 = hostParentIsContainer; + var prevHostParentIsContainer$129 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -8555,7 +8445,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$130; + hostParentIsContainer = prevHostParentIsContainer$129; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9229,21 +9119,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$124 = JSCompiler_inline_result.stateNode; + var parent$123 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$124, ""), + (setTextContent(parent$123, ""), (JSCompiler_inline_result.flags &= -33)); - var before$125 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$125, parent$124); + var before$124 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$124, parent$123); break; case 3: case 4: - var parent$126 = JSCompiler_inline_result.stateNode.containerInfo, - before$127 = getHostSibling(finishedWork); + var parent$125 = JSCompiler_inline_result.stateNode.containerInfo, + before$126 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$127, - parent$126 + before$126, + parent$125 ); break; default: @@ -10210,14 +10100,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$142 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$142 = lastTailNode), + for (var lastTailNode$141 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$141 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$142 + null === lastTailNode$141 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$142.sibling = null); + : (lastTailNode$141.sibling = null); } } function bubbleProperties(completedWork) { @@ -10227,19 +10117,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$143 = completedWork.child; null !== child$143; ) - (newChildLanes |= child$143.lanes | child$143.childLanes), - (subtreeFlags |= child$143.subtreeFlags & 31457280), - (subtreeFlags |= child$143.flags & 31457280), - (child$143.return = completedWork), - (child$143 = child$143.sibling); + for (var child$142 = completedWork.child; null !== child$142; ) + (newChildLanes |= child$142.lanes | child$142.childLanes), + (subtreeFlags |= child$142.subtreeFlags & 31457280), + (subtreeFlags |= child$142.flags & 31457280), + (child$142.return = completedWork), + (child$142 = child$142.sibling); else - for (child$143 = completedWork.child; null !== child$143; ) - (newChildLanes |= child$143.lanes | child$143.childLanes), - (subtreeFlags |= child$143.subtreeFlags), - (subtreeFlags |= child$143.flags), - (child$143.return = completedWork), - (child$143 = child$143.sibling); + for (child$142 = completedWork.child; null !== child$142; ) + (newChildLanes |= child$142.lanes | child$142.childLanes), + (subtreeFlags |= child$142.subtreeFlags), + (subtreeFlags |= child$142.flags), + (child$142.return = completedWork), + (child$142 = child$142.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -10523,11 +10413,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 && renderLanes && @@ -10561,8 +10451,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 ( @@ -10570,11 +10460,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; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -10599,7 +10489,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), @@ -10609,7 +10499,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; @@ -10622,13 +10512,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); 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 ( @@ -11372,8 +11262,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$176) { - handleThrow(root, thrownValue$176); + } catch (thrownValue$175) { + handleThrow(root, thrownValue$175); } while (1); lanes && root.shellSuspendCounter++; @@ -11486,8 +11376,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$178) { - handleThrow(root, thrownValue$178); + } catch (thrownValue$177) { + handleThrow(root, thrownValue$177); } while (1); resetContextDependencies(); @@ -11808,7 +11698,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$182 = rootWithPendingPassiveEffects, + var root$181 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11847,7 +11737,7 @@ function flushPassiveEffects() { } finally { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$182, remainingLanes); + releaseRootPooledCache(root$181, remainingLanes); } } return !1; @@ -12007,14 +11897,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$184 = firstScheduledRoot; null !== root$184; ) { - if (!onlyLegacy || 0 === root$184.tag) + for (var root$183 = firstScheduledRoot; null !== root$183; ) { + if (!onlyLegacy || 0 === root$183.tag) if (0 !== syncTransitionLanes) { - var pendingLanes = root$184.pendingLanes; + var pendingLanes = root$183.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$184.suspendedLanes, - pingedLanes = root$184.pingedLanes; + var suspendedLanes = root$183.suspendedLanes, + pingedLanes = root$183.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12028,18 +11918,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$184, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$183, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$184, - root$184 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$183, + root$183 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$184, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$183, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$184, JSCompiler_inline_result)); - root$184 = root$184.next; + performSyncWorkOnRoot(root$183, JSCompiler_inline_result)); + root$183 = root$183.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -12268,20 +12158,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1466 = 0; - i$jscomp$inline_1466 < simpleEventPluginEvents.length; - i$jscomp$inline_1466++ + var i$jscomp$inline_1443 = 0; + i$jscomp$inline_1443 < simpleEventPluginEvents.length; + i$jscomp$inline_1443++ ) { - var eventName$jscomp$inline_1467 = - simpleEventPluginEvents[i$jscomp$inline_1466], - domEventName$jscomp$inline_1468 = - eventName$jscomp$inline_1467.toLowerCase(), - capitalizedEvent$jscomp$inline_1469 = - eventName$jscomp$inline_1467[0].toUpperCase() + - eventName$jscomp$inline_1467.slice(1); + var eventName$jscomp$inline_1444 = + simpleEventPluginEvents[i$jscomp$inline_1443], + domEventName$jscomp$inline_1445 = + eventName$jscomp$inline_1444.toLowerCase(), + capitalizedEvent$jscomp$inline_1446 = + eventName$jscomp$inline_1444[0].toUpperCase() + + eventName$jscomp$inline_1444.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1468, - "on" + capitalizedEvent$jscomp$inline_1469 + domEventName$jscomp$inline_1445, + "on" + capitalizedEvent$jscomp$inline_1446 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -13464,34 +13354,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$198 = props[hasSrc]; - if (null != propValue$198) + var propValue$197 = props[hasSrc]; + if (null != propValue$197) switch (hasSrc) { case "name": - hasSrcSet = propValue$198; + hasSrcSet = propValue$197; break; case "type": - propValue = propValue$198; + propValue = propValue$197; break; case "checked": - checked = propValue$198; + checked = propValue$197; break; case "defaultChecked": - defaultChecked = propValue$198; + defaultChecked = propValue$197; break; case "value": - propKey = propValue$198; + propKey = propValue$197; break; case "defaultValue": - defaultValue = propValue$198; + defaultValue = propValue$197; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$198) + if (null != propValue$197) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$198, props, null); + setProp(domElement, tag, hasSrc, propValue$197, props, null); } } initInput( @@ -13628,14 +13518,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$198 in props) - props.hasOwnProperty(propValue$198) && - ((hasSrc = props[propValue$198]), + for (propValue$197 in props) + props.hasOwnProperty(propValue$197) && + ((hasSrc = props[propValue$197]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$198, + propValue$197, hasSrc, props, void 0 @@ -13683,14 +13573,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$215 in nextProps) { - var propKey = nextProps[propKey$215]; - lastProp = lastProps[propKey$215]; + for (var propKey$214 in nextProps) { + var propKey = nextProps[propKey$214]; + lastProp = lastProps[propKey$214]; if ( - nextProps.hasOwnProperty(propKey$215) && + nextProps.hasOwnProperty(propKey$214) && (null != propKey || null != lastProp) ) - switch (propKey$215) { + switch (propKey$214) { case "type": type = propKey; break; @@ -13719,7 +13609,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$215, + propKey$214, propKey, nextProps, lastProp @@ -13738,7 +13628,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$215 = null; + propKey = value = defaultValue = propKey$214 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -13769,7 +13659,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$215 = type; + propKey$214 = type; break; case "defaultValue": defaultValue = type; @@ -13790,15 +13680,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$215 - ? updateOptions(domElement, !!lastProps, propKey$215, !1) + null != propKey$214 + ? updateOptions(domElement, !!lastProps, propKey$214, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$215 = null; + propKey = propKey$214 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -13822,7 +13712,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$215 = name; + propKey$214 = name; break; case "defaultValue": propKey = name; @@ -13836,17 +13726,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$215, propKey); + updateTextarea(domElement, propKey$214, propKey); return; case "option": - for (var propKey$231 in lastProps) + for (var propKey$230 in lastProps) if ( - ((propKey$215 = lastProps[propKey$231]), - lastProps.hasOwnProperty(propKey$231) && - null != propKey$215 && - !nextProps.hasOwnProperty(propKey$231)) + ((propKey$214 = lastProps[propKey$230]), + lastProps.hasOwnProperty(propKey$230) && + null != propKey$214 && + !nextProps.hasOwnProperty(propKey$230)) ) - switch (propKey$231) { + switch (propKey$230) { case "selected": domElement.selected = !1; break; @@ -13854,33 +13744,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$231, + propKey$230, null, nextProps, - propKey$215 + propKey$214 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$215 = nextProps[lastDefaultValue]), + ((propKey$214 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$215 !== propKey && - (null != propKey$215 || null != propKey)) + propKey$214 !== propKey && + (null != propKey$214 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$215 && - "function" !== typeof propKey$215 && - "symbol" !== typeof propKey$215; + propKey$214 && + "function" !== typeof propKey$214 && + "symbol" !== typeof propKey$214; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$215, + propKey$214, nextProps, propKey ); @@ -13901,24 +13791,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$236 in lastProps) - (propKey$215 = lastProps[propKey$236]), - lastProps.hasOwnProperty(propKey$236) && - null != propKey$215 && - !nextProps.hasOwnProperty(propKey$236) && - setProp(domElement, tag, propKey$236, null, nextProps, propKey$215); + for (var propKey$235 in lastProps) + (propKey$214 = lastProps[propKey$235]), + lastProps.hasOwnProperty(propKey$235) && + null != propKey$214 && + !nextProps.hasOwnProperty(propKey$235) && + setProp(domElement, tag, propKey$235, null, nextProps, propKey$214); for (checked in nextProps) if ( - ((propKey$215 = nextProps[checked]), + ((propKey$214 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$215 !== propKey && - (null != propKey$215 || null != propKey)) + propKey$214 !== propKey && + (null != propKey$214 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$215) + if (null != propKey$214) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -13926,7 +13816,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$215, + propKey$214, nextProps, propKey ); @@ -13934,49 +13824,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$241 in lastProps) - (propKey$215 = lastProps[propKey$241]), - lastProps.hasOwnProperty(propKey$241) && - void 0 !== propKey$215 && - !nextProps.hasOwnProperty(propKey$241) && + for (var propKey$240 in lastProps) + (propKey$214 = lastProps[propKey$240]), + lastProps.hasOwnProperty(propKey$240) && + void 0 !== propKey$214 && + !nextProps.hasOwnProperty(propKey$240) && setPropOnCustomElement( domElement, tag, - propKey$241, + propKey$240, void 0, nextProps, - propKey$215 + propKey$214 ); for (defaultChecked in nextProps) - (propKey$215 = nextProps[defaultChecked]), + (propKey$214 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$215 === propKey || - (void 0 === propKey$215 && void 0 === propKey) || + propKey$214 === propKey || + (void 0 === propKey$214 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$215, + propKey$214, nextProps, propKey ); return; } } - for (var propKey$246 in lastProps) - (propKey$215 = lastProps[propKey$246]), - lastProps.hasOwnProperty(propKey$246) && - null != propKey$215 && - !nextProps.hasOwnProperty(propKey$246) && - setProp(domElement, tag, propKey$246, null, nextProps, propKey$215); + for (var propKey$245 in lastProps) + (propKey$214 = lastProps[propKey$245]), + lastProps.hasOwnProperty(propKey$245) && + null != propKey$214 && + !nextProps.hasOwnProperty(propKey$245) && + setProp(domElement, tag, propKey$245, null, nextProps, propKey$214); for (lastProp in nextProps) - (propKey$215 = nextProps[lastProp]), + (propKey$214 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$215 === propKey || - (null == propKey$215 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$215, nextProps, propKey); + propKey$214 === propKey || + (null == propKey$214 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$214, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -14516,26 +14406,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$254 = getResourcesFromRoot( + var styles$253 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$255 = styles$254.get(type); - resource$255 || + resource$254 = styles$253.get(type); + resource$254 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$255 = { + (resource$254 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$254.set(type, resource$255), - (styles$254 = JSCompiler_inline_result.querySelector( + styles$253.set(type, resource$254), + (styles$253 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$254._p && - ((resource$255.instance = styles$254), - (resource$255.state.loading = 5)), + !styles$253._p && + ((resource$254.instance = styles$253), + (resource$254.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -14548,16 +14438,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$254 || + styles$253 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$255.state + resource$254.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$255; + return resource$254; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -14654,37 +14544,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$260 = hoistableRoot.querySelector( + var instance$259 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$260) + if (instance$259) return ( (resource.state.loading |= 4), - (resource.instance = instance$260), - markNodeAsHoistable(instance$260), - instance$260 + (resource.instance = instance$259), + markNodeAsHoistable(instance$259), + instance$259 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$260 = ( + instance$259 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$260); - var linkInstance = instance$260; + markNodeAsHoistable(instance$259); + var linkInstance = instance$259; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$260, "link", instance); + setInitialProperties(instance$259, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$260, props.precedence, hoistableRoot); - return (resource.instance = instance$260); + insertStylesheet(instance$259, props.precedence, hoistableRoot); + return (resource.instance = instance$259); case "script": - instance$260 = getScriptKey(props.src); + instance$259 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$260) + getScriptSelectorFromKey(instance$259) )) ) return ( @@ -14693,7 +14583,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$260))) + if ((styleProps = preloadPropsMap.get(instance$259))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -15762,16 +15652,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1709 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1686 = React.version; if ( - "19.0.0-native-fb-d66fa02a-20240926" !== - isomorphicReactPackageVersion$jscomp$inline_1709 + "19.0.0-native-fb-60b1420f-20240926" !== + isomorphicReactPackageVersion$jscomp$inline_1686 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1709, - "19.0.0-native-fb-d66fa02a-20240926" + isomorphicReactPackageVersion$jscomp$inline_1686, + "19.0.0-native-fb-60b1420f-20240926" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15791,25 +15681,25 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2154 = { +var internals$jscomp$inline_2141 = { bundleType: 0, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926" + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2155 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2142 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2155.isDisabled && - hook$jscomp$inline_2155.supportsFiber + !hook$jscomp$inline_2142.isDisabled && + hook$jscomp$inline_2142.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2155.inject( - internals$jscomp$inline_2154 + (rendererID = hook$jscomp$inline_2142.inject( + internals$jscomp$inline_2141 )), - (injectedHook = hook$jscomp$inline_2155); + (injectedHook = hook$jscomp$inline_2142); } catch (err) {} } function noop() {} @@ -16055,4 +15945,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-native-fb-d66fa02a-20240926"; +exports.version = "19.0.0-native-fb-60b1420f-20240926"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js index 85866c3fb872a..5797d54984a3c 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<69ce8346e39ef9afc32e5fd40a790fcd>> + * @generated SignedSource<<72badea7ca7269fa02f3356cfee18121>> */ /* @@ -43,8 +43,6 @@ var alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries, enableObjectFiber = dynamicFlagsUntyped.enableObjectFiber, enablePersistedModeClonedFlag = dynamicFlagsUntyped.enablePersistedModeClonedFlag, - enableLazyContextPropagation = - dynamicFlagsUntyped.enableLazyContextPropagation, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering; function isValidContainer(node) { return !( @@ -2165,19 +2163,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$311; + var JSCompiler_inline_result$jscomp$310; if (canUseDOM) { - var isSupported$jscomp$inline_445 = "oninput" in document; - if (!isSupported$jscomp$inline_445) { - var element$jscomp$inline_446 = document.createElement("div"); - element$jscomp$inline_446.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_445 = - "function" === typeof element$jscomp$inline_446.oninput; + var isSupported$jscomp$inline_444 = "oninput" in document; + if (!isSupported$jscomp$inline_444) { + var element$jscomp$inline_445 = document.createElement("div"); + element$jscomp$inline_445.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_444 = + "function" === typeof element$jscomp$inline_445.oninput; } - JSCompiler_inline_result$jscomp$311 = isSupported$jscomp$inline_445; - } else JSCompiler_inline_result$jscomp$311 = !1; + JSCompiler_inline_result$jscomp$310 = isSupported$jscomp$inline_444; + } else JSCompiler_inline_result$jscomp$310 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$311 && + JSCompiler_inline_result$jscomp$310 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -3237,7 +3235,7 @@ function createChildReconciler(shouldTrackSideEffects) { if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3286,7 +3284,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3356,7 +3354,7 @@ function createChildReconciler(shouldTrackSideEffects) { existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3688,7 +3686,7 @@ function createChildReconciler(shouldTrackSideEffects) { return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -4010,9 +4008,8 @@ function finishRenderingHooks(current) { thenableIndexCounter = 0; thenableState = null; if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300)); - enableLazyContextPropagation && - null !== current && - !didReceiveUpdate && + null === current || + didReceiveUpdate || ((current = current.dependencies), null !== current && checkIfContextChanged(current) && @@ -5664,16 +5661,14 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); currentSourceFiber = sourceFiber.tag; 0 !== (sourceFiber.mode & 1) || (0 !== currentSourceFiber && @@ -5869,7 +5864,7 @@ function updateForwardRef( for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); nextProps = renderWithHooks( current, @@ -6057,8 +6052,7 @@ function deferHiddenOffscreenComponent( null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(); pushOffscreenSuspenseHandler(workInProgress); - enableLazyContextPropagation && - null !== current && + null !== current && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } @@ -6086,7 +6080,7 @@ function updateFunctionComponent( ? previousContext : contextStackCursor.current; context = getMaskedContext(workInProgress, context); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); Component = renderWithHooks( current, @@ -6116,7 +6110,7 @@ function replayFunctionComponent( secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); workInProgress.updateQueue = null; nextProps = renderWithHooksAgain( @@ -6149,7 +6143,7 @@ function updateClassComponent( var hasContext = !0; pushContextProvider(workInProgress); } else hasContext = !1; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -6270,8 +6264,7 @@ function updateClassComponent( unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && @@ -6293,8 +6286,7 @@ function updateClassComponent( newState, oldContext ) || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || @@ -6622,8 +6614,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes ); } else if ( - (enableLazyContextPropagation && - !didReceiveUpdate && + (didReceiveUpdate || propagateParentContextChanges(current, workInProgress, renderLanes, !1), (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), didReceiveUpdate || JSCompiler_temp) @@ -6993,7 +6984,7 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { profilerStartTime = -1; workInProgressRootSkippedLanes |= workInProgress.lanes; if (0 === (renderLanes & workInProgress.childLanes)) - if (enableLazyContextPropagation && null !== current) { + if (null !== current) { if ( (propagateParentContextChanges( current, @@ -7021,12 +7012,9 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { return workInProgress.child; } function checkScheduledUpdateOrContext(current, renderLanes) { - return 0 !== (current.lanes & renderLanes) || - (enableLazyContextPropagation && - ((current = current.dependencies), - null !== current && checkIfContextChanged(current))) - ? !0 - : !1; + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; } function attemptEarlyBailoutIfNoScheduledUpdate( current, @@ -7089,8 +7077,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 19: var didSuspendBefore = 0 !== (current.flags & 128); stateNode = 0 !== (renderLanes & workInProgress.childLanes); - enableLazyContextPropagation && - !stateNode && + stateNode || (propagateParentContextChanges( current, workInProgress, @@ -7248,7 +7235,12 @@ function beginWork(current, workInProgress, renderLanes) { nextProps = nextState.cache; pushProvider(workInProgress, CacheContext, nextProps); nextProps !== init.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); nextProps = nextState.element; if (init.isDehydrated) @@ -7413,16 +7405,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = init), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== init && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))); + (HostTransitionContext._currentValue = init)); markRef(current, workInProgress); reconcileChildren(current, workInProgress, elementType, renderLanes); return workInProgress.child; @@ -7511,36 +7494,22 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - a: { - elementType = workInProgress.type; - init = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextState = init.value; - pushProvider(workInProgress, elementType, nextState); - if (!enableLazyContextPropagation && null !== nextProps) - if (objectIs(nextProps.value, nextState)) { - if ( - nextProps.children === init.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); - workInProgress = workInProgress.child; - } - return workInProgress; + return ( + (elementType = workInProgress.pendingProps), + pushProvider(workInProgress, workInProgress.type, elementType.value), + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ), + workInProgress.child + ); case 9: return ( (init = workInProgress.type._context), (elementType = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (init = readContext(init)), markComponentRenderStarted(workInProgress), (elementType = elementType(init)), @@ -7577,7 +7546,7 @@ function beginWork(current, workInProgress, renderLanes) { isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, elementType, init), mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( @@ -7612,7 +7581,7 @@ function beginWork(current, workInProgress, renderLanes) { return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), @@ -7646,10 +7615,11 @@ function beginWork(current, workInProgress, renderLanes) { : ((elementType = nextProps.cache), pushProvider(workInProgress, CacheContext, elementType), elementType !== init.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -7695,133 +7665,62 @@ function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { parent = parent.return; } } -function propagateContextChange(workInProgress, context, renderLanes) { - if (enableLazyContextPropagation) - propagateContextChanges(workInProgress, [context], renderLanes, !0); - else if (!enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = 2; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } - } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - fiber.return, - renderLanes, - workInProgress - ); - list.lanes |= renderLanes; - break; - } - dependency = dependency.next; - } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = fiber.sibling; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } -} function propagateContextChanges( workInProgress, contexts, renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; } - nextFiber = nextFiber.return; + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; } - fiber = nextFiber; - } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } function propagateParentContextChanges( @@ -7830,48 +7729,45 @@ function propagateParentContextChanges( renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); } - parent = parent.return; + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } function checkIfContextChanged(currentDependencies) { - if (!enableLazyContextPropagation) return !1; for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; @@ -7888,23 +7784,17 @@ function checkIfContextChanged(currentDependencies) { } return !1; } -function prepareToReadContext(workInProgress, renderLanes) { +function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - (enableLazyContextPropagation - ? (workInProgress.firstContext = null) - : null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0), - (workInProgress.firstContext = null))); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { return readContextForConsumer(currentlyRenderingFiber, context); } -function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -7917,7 +7807,7 @@ function readContextForConsumer(consumer, context) { if (null === consumer) throw Error(formatProdErrorMessage(308)); lastContextDependency = context; consumer.dependencies = { lanes: 0, firstContext: context }; - enableLazyContextPropagation && (consumer.flags |= 524288); + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -8359,8 +8249,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$128) { - captureCommitPhaseError(current, nearestMountedAncestor, error$128); + } catch (error$127) { + captureCommitPhaseError(current, nearestMountedAncestor, error$127); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -8420,8 +8310,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$129) { - captureCommitPhaseError(current, nearestMountedAncestor, error$129); + } catch (error$128) { + captureCommitPhaseError(current, nearestMountedAncestor, error$128); } else ref.current = null; } @@ -8746,11 +8636,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$125) { + } catch (error$124) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$125 + error$124 ); } else { @@ -8767,11 +8657,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$126) { + } catch (error$125) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$126 + error$125 ); } recordEffectDuration(); @@ -8782,11 +8672,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$127) { + } catch (error$126) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$127 + error$126 ); } } @@ -8958,7 +8848,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$137 = hostParentIsContainer; + var prevHostParentIsContainer$136 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -8966,7 +8856,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$137; + hostParentIsContainer = prevHostParentIsContainer$136; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9653,21 +9543,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$130 = JSCompiler_inline_result.stateNode; + var parent$129 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$130, ""), + (setTextContent(parent$129, ""), (JSCompiler_inline_result.flags &= -33)); - var before$131 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$131, parent$130); + var before$130 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$130, parent$129); break; case 3: case 4: - var parent$132 = JSCompiler_inline_result.stateNode.containerInfo, - before$133 = getHostSibling(finishedWork); + var parent$131 = JSCompiler_inline_result.stateNode.containerInfo, + before$132 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$133, - parent$132 + before$132, + parent$131 ); break; default: @@ -10685,14 +10575,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$152 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$152 = lastTailNode), + for (var lastTailNode$151 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$151 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$152 + null === lastTailNode$151 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$152.sibling = null); + : (lastTailNode$151.sibling = null); } } function bubbleProperties(completedWork) { @@ -10704,53 +10594,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$154 = completedWork.selfBaseDuration, - child$155 = completedWork.child; - null !== child$155; + var treeBaseDuration$153 = completedWork.selfBaseDuration, + child$154 = completedWork.child; + null !== child$154; ) - (newChildLanes |= child$155.lanes | child$155.childLanes), - (subtreeFlags |= child$155.subtreeFlags & 31457280), - (subtreeFlags |= child$155.flags & 31457280), - (treeBaseDuration$154 += child$155.treeBaseDuration), - (child$155 = child$155.sibling); - completedWork.treeBaseDuration = treeBaseDuration$154; + (newChildLanes |= child$154.lanes | child$154.childLanes), + (subtreeFlags |= child$154.subtreeFlags & 31457280), + (subtreeFlags |= child$154.flags & 31457280), + (treeBaseDuration$153 += child$154.treeBaseDuration), + (child$154 = child$154.sibling); + completedWork.treeBaseDuration = treeBaseDuration$153; } else for ( - treeBaseDuration$154 = completedWork.child; - null !== treeBaseDuration$154; + treeBaseDuration$153 = completedWork.child; + null !== treeBaseDuration$153; ) (newChildLanes |= - treeBaseDuration$154.lanes | treeBaseDuration$154.childLanes), - (subtreeFlags |= treeBaseDuration$154.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$154.flags & 31457280), - (treeBaseDuration$154.return = completedWork), - (treeBaseDuration$154 = treeBaseDuration$154.sibling); + treeBaseDuration$153.lanes | treeBaseDuration$153.childLanes), + (subtreeFlags |= treeBaseDuration$153.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$153.flags & 31457280), + (treeBaseDuration$153.return = completedWork), + (treeBaseDuration$153 = treeBaseDuration$153.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$154 = completedWork.actualDuration; - child$155 = completedWork.selfBaseDuration; + treeBaseDuration$153 = completedWork.actualDuration; + child$154 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$154 += child.actualDuration), - (child$155 += child.treeBaseDuration), + (treeBaseDuration$153 += child.actualDuration), + (child$154 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$154; - completedWork.treeBaseDuration = child$155; + completedWork.actualDuration = treeBaseDuration$153; + completedWork.treeBaseDuration = child$154; } else for ( - treeBaseDuration$154 = completedWork.child; - null !== treeBaseDuration$154; + treeBaseDuration$153 = completedWork.child; + null !== treeBaseDuration$153; ) (newChildLanes |= - treeBaseDuration$154.lanes | treeBaseDuration$154.childLanes), - (subtreeFlags |= treeBaseDuration$154.subtreeFlags), - (subtreeFlags |= treeBaseDuration$154.flags), - (treeBaseDuration$154.return = completedWork), - (treeBaseDuration$154 = treeBaseDuration$154.sibling); + treeBaseDuration$153.lanes | treeBaseDuration$153.childLanes), + (subtreeFlags |= treeBaseDuration$153.subtreeFlags), + (subtreeFlags |= treeBaseDuration$153.flags), + (treeBaseDuration$153.return = completedWork), + (treeBaseDuration$153 = treeBaseDuration$153.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -11050,11 +10940,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$170 = null; + var cache$169 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$170 = newProps.memoizedState.cachePool.pool); - cache$170 !== type && (newProps.flags |= 2048); + (cache$169 = newProps.memoizedState.cachePool.pool); + cache$169 !== type && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -11093,8 +10983,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$170 = type.rendering; - if (null === cache$170) + cache$169 = type.rendering; + if (null === cache$169) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -11102,11 +10992,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$170 = findFirstSuspended(current); - if (null !== cache$170) { + cache$169 = findFirstSuspended(current); + if (null !== cache$169) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$170.updateQueue; + current = cache$169.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -11131,7 +11021,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$170)), null !== current)) { + if (((current = findFirstSuspended(cache$169)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -11141,7 +11031,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$170.alternate && + !cache$169.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -11154,13 +11044,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$170.sibling = workInProgress.child), - (workInProgress.child = cache$170)) + ? ((cache$169.sibling = workInProgress.child), + (workInProgress.child = cache$169)) : ((current = type.last), null !== current - ? (current.sibling = cache$170) - : (workInProgress.child = cache$170), - (type.last = cache$170)); + ? (current.sibling = cache$169) + : (workInProgress.child = cache$169), + (type.last = cache$169)); } if (null !== type.tail) return ( @@ -11953,8 +11843,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$191) { - handleThrow(root, thrownValue$191); + } catch (thrownValue$190) { + handleThrow(root, thrownValue$190); } while (1); lanes && root.shellSuspendCounter++; @@ -12075,8 +11965,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$193) { - handleThrow(root, thrownValue$193); + } catch (thrownValue$192) { + handleThrow(root, thrownValue$192); } while (1); resetContextDependencies(); @@ -12435,7 +12325,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$197 = rootWithPendingPassiveEffects, + var root$196 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12485,7 +12375,7 @@ function flushPassiveEffects() { } finally { (ReactDOMSharedInternals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$197, remainingLanes); + releaseRootPooledCache(root$196, remainingLanes); } } return !1; @@ -12652,14 +12542,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$199 = firstScheduledRoot; null !== root$199; ) { - if (!onlyLegacy || 0 === root$199.tag) + for (var root$198 = firstScheduledRoot; null !== root$198; ) { + if (!onlyLegacy || 0 === root$198.tag) if (0 !== syncTransitionLanes) { - var pendingLanes = root$199.pendingLanes; + var pendingLanes = root$198.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$199.suspendedLanes, - pingedLanes = root$199.pingedLanes; + var suspendedLanes = root$198.suspendedLanes, + pingedLanes = root$198.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12673,18 +12563,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$199, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$198, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$199, - root$199 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$198, + root$198 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$199, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$198, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$199, JSCompiler_inline_result)); - root$199 = root$199.next; + performSyncWorkOnRoot(root$198, JSCompiler_inline_result)); + root$198 = root$198.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -12916,20 +12806,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1554 = 0; - i$jscomp$inline_1554 < simpleEventPluginEvents.length; - i$jscomp$inline_1554++ + var i$jscomp$inline_1531 = 0; + i$jscomp$inline_1531 < simpleEventPluginEvents.length; + i$jscomp$inline_1531++ ) { - var eventName$jscomp$inline_1555 = - simpleEventPluginEvents[i$jscomp$inline_1554], - domEventName$jscomp$inline_1556 = - eventName$jscomp$inline_1555.toLowerCase(), - capitalizedEvent$jscomp$inline_1557 = - eventName$jscomp$inline_1555[0].toUpperCase() + - eventName$jscomp$inline_1555.slice(1); + var eventName$jscomp$inline_1532 = + simpleEventPluginEvents[i$jscomp$inline_1531], + domEventName$jscomp$inline_1533 = + eventName$jscomp$inline_1532.toLowerCase(), + capitalizedEvent$jscomp$inline_1534 = + eventName$jscomp$inline_1532[0].toUpperCase() + + eventName$jscomp$inline_1532.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1556, - "on" + capitalizedEvent$jscomp$inline_1557 + domEventName$jscomp$inline_1533, + "on" + capitalizedEvent$jscomp$inline_1534 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14112,34 +14002,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$213 = props[hasSrc]; - if (null != propValue$213) + var propValue$212 = props[hasSrc]; + if (null != propValue$212) switch (hasSrc) { case "name": - hasSrcSet = propValue$213; + hasSrcSet = propValue$212; break; case "type": - propValue = propValue$213; + propValue = propValue$212; break; case "checked": - checked = propValue$213; + checked = propValue$212; break; case "defaultChecked": - defaultChecked = propValue$213; + defaultChecked = propValue$212; break; case "value": - propKey = propValue$213; + propKey = propValue$212; break; case "defaultValue": - defaultValue = propValue$213; + defaultValue = propValue$212; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$213) + if (null != propValue$212) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$213, props, null); + setProp(domElement, tag, hasSrc, propValue$212, props, null); } } initInput( @@ -14276,14 +14166,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$213 in props) - props.hasOwnProperty(propValue$213) && - ((hasSrc = props[propValue$213]), + for (propValue$212 in props) + props.hasOwnProperty(propValue$212) && + ((hasSrc = props[propValue$212]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$213, + propValue$212, hasSrc, props, void 0 @@ -14331,14 +14221,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$230 in nextProps) { - var propKey = nextProps[propKey$230]; - lastProp = lastProps[propKey$230]; + for (var propKey$229 in nextProps) { + var propKey = nextProps[propKey$229]; + lastProp = lastProps[propKey$229]; if ( - nextProps.hasOwnProperty(propKey$230) && + nextProps.hasOwnProperty(propKey$229) && (null != propKey || null != lastProp) ) - switch (propKey$230) { + switch (propKey$229) { case "type": type = propKey; break; @@ -14367,7 +14257,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$230, + propKey$229, propKey, nextProps, lastProp @@ -14386,7 +14276,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$230 = null; + propKey = value = defaultValue = propKey$229 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14417,7 +14307,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$230 = type; + propKey$229 = type; break; case "defaultValue": defaultValue = type; @@ -14438,15 +14328,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$230 - ? updateOptions(domElement, !!lastProps, propKey$230, !1) + null != propKey$229 + ? updateOptions(domElement, !!lastProps, propKey$229, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$230 = null; + propKey = propKey$229 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -14470,7 +14360,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$230 = name; + propKey$229 = name; break; case "defaultValue": propKey = name; @@ -14484,17 +14374,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$230, propKey); + updateTextarea(domElement, propKey$229, propKey); return; case "option": - for (var propKey$246 in lastProps) + for (var propKey$245 in lastProps) if ( - ((propKey$230 = lastProps[propKey$246]), - lastProps.hasOwnProperty(propKey$246) && - null != propKey$230 && - !nextProps.hasOwnProperty(propKey$246)) + ((propKey$229 = lastProps[propKey$245]), + lastProps.hasOwnProperty(propKey$245) && + null != propKey$229 && + !nextProps.hasOwnProperty(propKey$245)) ) - switch (propKey$246) { + switch (propKey$245) { case "selected": domElement.selected = !1; break; @@ -14502,33 +14392,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$246, + propKey$245, null, nextProps, - propKey$230 + propKey$229 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$230 = nextProps[lastDefaultValue]), + ((propKey$229 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$230 !== propKey && - (null != propKey$230 || null != propKey)) + propKey$229 !== propKey && + (null != propKey$229 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$230 && - "function" !== typeof propKey$230 && - "symbol" !== typeof propKey$230; + propKey$229 && + "function" !== typeof propKey$229 && + "symbol" !== typeof propKey$229; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$230, + propKey$229, nextProps, propKey ); @@ -14549,24 +14439,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$251 in lastProps) - (propKey$230 = lastProps[propKey$251]), - lastProps.hasOwnProperty(propKey$251) && - null != propKey$230 && - !nextProps.hasOwnProperty(propKey$251) && - setProp(domElement, tag, propKey$251, null, nextProps, propKey$230); + for (var propKey$250 in lastProps) + (propKey$229 = lastProps[propKey$250]), + lastProps.hasOwnProperty(propKey$250) && + null != propKey$229 && + !nextProps.hasOwnProperty(propKey$250) && + setProp(domElement, tag, propKey$250, null, nextProps, propKey$229); for (checked in nextProps) if ( - ((propKey$230 = nextProps[checked]), + ((propKey$229 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$230 !== propKey && - (null != propKey$230 || null != propKey)) + propKey$229 !== propKey && + (null != propKey$229 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$230) + if (null != propKey$229) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -14574,7 +14464,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$230, + propKey$229, nextProps, propKey ); @@ -14582,49 +14472,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$256 in lastProps) - (propKey$230 = lastProps[propKey$256]), - lastProps.hasOwnProperty(propKey$256) && - void 0 !== propKey$230 && - !nextProps.hasOwnProperty(propKey$256) && + for (var propKey$255 in lastProps) + (propKey$229 = lastProps[propKey$255]), + lastProps.hasOwnProperty(propKey$255) && + void 0 !== propKey$229 && + !nextProps.hasOwnProperty(propKey$255) && setPropOnCustomElement( domElement, tag, - propKey$256, + propKey$255, void 0, nextProps, - propKey$230 + propKey$229 ); for (defaultChecked in nextProps) - (propKey$230 = nextProps[defaultChecked]), + (propKey$229 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$230 === propKey || - (void 0 === propKey$230 && void 0 === propKey) || + propKey$229 === propKey || + (void 0 === propKey$229 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$230, + propKey$229, nextProps, propKey ); return; } } - for (var propKey$261 in lastProps) - (propKey$230 = lastProps[propKey$261]), - lastProps.hasOwnProperty(propKey$261) && - null != propKey$230 && - !nextProps.hasOwnProperty(propKey$261) && - setProp(domElement, tag, propKey$261, null, nextProps, propKey$230); + for (var propKey$260 in lastProps) + (propKey$229 = lastProps[propKey$260]), + lastProps.hasOwnProperty(propKey$260) && + null != propKey$229 && + !nextProps.hasOwnProperty(propKey$260) && + setProp(domElement, tag, propKey$260, null, nextProps, propKey$229); for (lastProp in nextProps) - (propKey$230 = nextProps[lastProp]), + (propKey$229 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$230 === propKey || - (null == propKey$230 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$230, nextProps, propKey); + propKey$229 === propKey || + (null == propKey$229 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$229, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15164,26 +15054,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$269 = getResourcesFromRoot( + var styles$268 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$270 = styles$269.get(type); - resource$270 || + resource$269 = styles$268.get(type); + resource$269 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$270 = { + (resource$269 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$269.set(type, resource$270), - (styles$269 = JSCompiler_inline_result.querySelector( + styles$268.set(type, resource$269), + (styles$268 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$269._p && - ((resource$270.instance = styles$269), - (resource$270.state.loading = 5)), + !styles$268._p && + ((resource$269.instance = styles$268), + (resource$269.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15196,16 +15086,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$269 || + styles$268 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$270.state + resource$269.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$270; + return resource$269; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15302,37 +15192,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$275 = hoistableRoot.querySelector( + var instance$274 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$275) + if (instance$274) return ( (resource.state.loading |= 4), - (resource.instance = instance$275), - markNodeAsHoistable(instance$275), - instance$275 + (resource.instance = instance$274), + markNodeAsHoistable(instance$274), + instance$274 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$275 = ( + instance$274 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$275); - var linkInstance = instance$275; + markNodeAsHoistable(instance$274); + var linkInstance = instance$274; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$275, "link", instance); + setInitialProperties(instance$274, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$275, props.precedence, hoistableRoot); - return (resource.instance = instance$275); + insertStylesheet(instance$274, props.precedence, hoistableRoot); + return (resource.instance = instance$274); case "script": - instance$275 = getScriptKey(props.src); + instance$274 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$275) + getScriptSelectorFromKey(instance$274) )) ) return ( @@ -15341,7 +15231,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$275))) + if ((styleProps = preloadPropsMap.get(instance$274))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16418,16 +16308,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1799 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1776 = React.version; if ( - "19.0.0-native-fb-d66fa02a-20240926" !== - isomorphicReactPackageVersion$jscomp$inline_1799 + "19.0.0-native-fb-60b1420f-20240926" !== + isomorphicReactPackageVersion$jscomp$inline_1776 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1799, - "19.0.0-native-fb-d66fa02a-20240926" + isomorphicReactPackageVersion$jscomp$inline_1776, + "19.0.0-native-fb-60b1420f-20240926" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -16447,18 +16337,18 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_1806 = { +var internals$jscomp$inline_1783 = { bundleType: 0, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926", + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926", getLaneLabelMap: function () { for ( - var map = new Map(), lane = 1, index$292 = 0; - 31 > index$292; - index$292++ + var map = new Map(), lane = 1, index$291 = 0; + 31 > index$291; + index$291++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -16471,16 +16361,16 @@ var internals$jscomp$inline_1806 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2206 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2193 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2206.isDisabled && - hook$jscomp$inline_2206.supportsFiber + !hook$jscomp$inline_2193.isDisabled && + hook$jscomp$inline_2193.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2206.inject( - internals$jscomp$inline_1806 + (rendererID = hook$jscomp$inline_2193.inject( + internals$jscomp$inline_1783 )), - (injectedHook = hook$jscomp$inline_2206); + (injectedHook = hook$jscomp$inline_2193); } catch (err) {} } function noop() {} @@ -16726,7 +16616,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-native-fb-d66fa02a-20240926"; +exports.version = "19.0.0-native-fb-60b1420f-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js index ae15018139073..f1b3f19fac8c5 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,13 +7,13 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<6b5cedf736b6f7fe7edbe580662c4ec9>> + * @generated SignedSource<<6b0de2481632ce6ba8fbd24924f320fc>> */ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1102() { + function JSCompiler_object_inline_createNodeMock_1082() { return null; } function findHook(fiber, id) { @@ -2814,7 +2814,7 @@ __DEV__ && if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -2895,7 +2895,7 @@ __DEV__ && return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -2992,7 +2992,7 @@ __DEV__ && existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3469,7 +3469,7 @@ __DEV__ && return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3809,6 +3809,12 @@ __DEV__ && throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." ); + null === current || + didReceiveUpdate || + ((current = current.dependencies), + null !== current && + checkIfContextChanged(current) && + (didReceiveUpdate = !0)); needsToResetSuspendedThenableDEV ? ((needsToResetSuspendedThenableDEV = !1), (current = !0)) : (current = !1); @@ -5659,31 +5665,41 @@ __DEV__ && "object" === typeof value && "function" === typeof value.then ) { - var tag = sourceFiber.tag; + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); + currentSourceFiber = sourceFiber.tag; 0 !== (sourceFiber.mode & 1) || - (0 !== tag && 11 !== tag && 15 !== tag) || - ((tag = sourceFiber.alternate) - ? ((sourceFiber.updateQueue = tag.updateQueue), - (sourceFiber.memoizedState = tag.memoizedState), - (sourceFiber.lanes = tag.lanes)) + (0 !== currentSourceFiber && + 11 !== currentSourceFiber && + 15 !== currentSourceFiber) || + ((currentSourceFiber = sourceFiber.alternate) + ? ((sourceFiber.updateQueue = currentSourceFiber.updateQueue), + (sourceFiber.memoizedState = currentSourceFiber.memoizedState), + (sourceFiber.lanes = currentSourceFiber.lanes)) : ((sourceFiber.updateQueue = null), (sourceFiber.memoizedState = null))); - tag = suspenseHandlerStackCursor.current; - if (null !== tag) { - switch (tag.tag) { + currentSourceFiber = suspenseHandlerStackCursor.current; + if (null !== currentSourceFiber) { + switch (currentSourceFiber.tag) { case 13: return ( sourceFiber.mode & 1 && (null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === tag.alternate && + : null === currentSourceFiber.alternate && workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootSuspended)), - (tag.flags &= -257), - 0 === (tag.mode & 1) - ? tag === returnFiber - ? (tag.flags |= 65536) - : ((tag.flags |= 128), + (currentSourceFiber.flags &= -257), + 0 === (currentSourceFiber.mode & 1) + ? currentSourceFiber === returnFiber + ? (currentSourceFiber.flags |= 65536) + : ((currentSourceFiber.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), 1 === sourceFiber.tag @@ -5696,31 +5712,32 @@ __DEV__ && null === sourceFiber.alternate && (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)) - : ((tag.flags |= 65536), (tag.lanes = rootRenderLanes)), + : ((currentSourceFiber.flags |= 65536), + (currentSourceFiber.lanes = rootRenderLanes)), value === noopSuspenseyCommitThenable - ? (tag.flags |= 16384) - : ((returnFiber = tag.updateQueue), + ? (currentSourceFiber.flags |= 16384) + : ((returnFiber = currentSourceFiber.updateQueue), null === returnFiber - ? (tag.updateQueue = new Set([value])) + ? (currentSourceFiber.updateQueue = new Set([value])) : returnFiber.add(value), - tag.mode & 1 && + currentSourceFiber.mode & 1 && attachPingListener(root, value, rootRenderLanes)), !1 ); case 22: - if (tag.mode & 1) + if (currentSourceFiber.mode & 1) return ( - (tag.flags |= 65536), + (currentSourceFiber.flags |= 65536), value === noopSuspenseyCommitThenable - ? (tag.flags |= 16384) - : ((returnFiber = tag.updateQueue), + ? (currentSourceFiber.flags |= 16384) + : ((returnFiber = currentSourceFiber.updateQueue), null === returnFiber ? ((returnFiber = { transitions: null, markerInstances: null, retryQueue: new Set([value]) }), - (tag.updateQueue = returnFiber)) + (currentSourceFiber.updateQueue = returnFiber)) : ((sourceFiber = returnFiber.retryQueue), null === sourceFiber ? (returnFiber.retryQueue = new Set([value])) @@ -5731,7 +5748,7 @@ __DEV__ && } throw Error( "Unexpected Suspense handler tag (" + - tag.tag + + currentSourceFiber.tag + "). This is a bug in React." ); } @@ -5745,7 +5762,7 @@ __DEV__ && "A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition." ); } - tag = createCapturedValueAtFiber( + currentSourceFiber = createCapturedValueAtFiber( Error( "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.", { cause: value } @@ -5753,8 +5770,8 @@ __DEV__ && sourceFiber ); null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [tag]) - : workInProgressRootConcurrentErrors.push(tag); + ? (workInProgressRootConcurrentErrors = [currentSourceFiber]) + : workInProgressRootConcurrentErrors.push(currentSourceFiber); workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored); if (null === returnFiber) return !0; @@ -5777,13 +5794,16 @@ __DEV__ && case 1: if ( ((sourceFiber = returnFiber.type), - (tag = returnFiber.stateNode), + (currentSourceFiber = returnFiber.stateNode), 0 === (returnFiber.flags & 128) && ("function" === typeof sourceFiber.getDerivedStateFromError || - (null !== tag && - "function" === typeof tag.componentDidCatch && + (null !== currentSourceFiber && + "function" === + typeof currentSourceFiber.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has(tag))))) + !legacyErrorBoundariesThatAlreadyFailed.has( + currentSourceFiber + ))))) ) return ( (returnFiber.flags |= 65536), @@ -5834,7 +5854,7 @@ __DEV__ && for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); nextProps = renderWithHooks( current, @@ -5895,7 +5915,7 @@ __DEV__ && return (workInProgress.child = current); } type = current.child; - if (0 === (current.lanes & renderLanes)) { + if (!checkScheduledUpdateOrContext(current, renderLanes)) { var prevProps = type.memoizedProps; Component = Component.compare; Component = null !== Component ? Component : shallowEqual; @@ -5932,7 +5952,7 @@ __DEV__ && if ( ((didReceiveUpdate = !1), (workInProgress.pendingProps = nextProps = prevProps), - 0 !== (current.lanes & renderLanes)) + checkScheduledUpdateOrContext(current, renderLanes)) ) 0 !== (current.flags & 131072) && (didReceiveUpdate = !0); else @@ -5958,21 +5978,22 @@ __DEV__ && markRef(current, workInProgress); if ("hidden" === nextProps.mode || nextIsDetached) { if (0 !== (workInProgress.flags & 128)) { - renderLanes = + nextProps = null !== prevState ? prevState.baseLanes | renderLanes : renderLanes; if (null !== current) { - nextProps = workInProgress.child = current.child; - for (nextChildren = 0; null !== nextProps; ) - (nextChildren = - nextChildren | nextProps.lanes | nextProps.childLanes), - (nextProps = nextProps.sibling); - workInProgress.childLanes = nextChildren & ~renderLanes; + nextChildren = workInProgress.child = current.child; + for (nextIsDetached = 0; null !== nextChildren; ) + (nextIsDetached = + nextIsDetached | nextChildren.lanes | nextChildren.childLanes), + (nextChildren = nextChildren.sibling); + workInProgress.childLanes = nextIsDetached & ~nextProps; } else (workInProgress.childLanes = 0), (workInProgress.child = null); return deferHiddenOffscreenComponent( current, workInProgress, + nextProps, renderLanes ); } @@ -6000,7 +6021,8 @@ __DEV__ && workInProgress, null !== prevState ? prevState.baseLanes | renderLanes - : renderLanes + : renderLanes, + renderLanes ) ); } else @@ -6018,7 +6040,8 @@ __DEV__ && function deferHiddenOffscreenComponent( current, workInProgress, - nextBaseLanes + nextBaseLanes, + renderLanes ) { var JSCompiler_inline_result = peekCacheFromPool(); JSCompiler_inline_result = @@ -6035,6 +6058,8 @@ __DEV__ && null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(workInProgress); pushOffscreenSuspenseHandler(workInProgress); + null !== current && + propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } function markRef(current, workInProgress) { @@ -6091,7 +6116,7 @@ __DEV__ && ? previousContext : contextStackCursor$1.current; componentName = getMaskedContext(workInProgress, componentName); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); Component = renderWithHooks( current, @@ -6119,7 +6144,7 @@ __DEV__ && secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); hookTypesUpdateIndexDev = -1; ignorePreviousDependencies = @@ -6181,7 +6206,7 @@ __DEV__ && isContextProvider(Component) ? ((_instance = !0), pushContextProvider(workInProgress)) : (_instance = !1); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -6307,7 +6332,10 @@ __DEV__ && lane !== hasNewLifecycles || unresolvedOldProps !== newState || didPerformWorkStackCursor.current || - hasForceUpdate + hasForceUpdate || + (null !== current && + null !== current.dependencies && + checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, @@ -6327,7 +6355,9 @@ __DEV__ && newState, oldContext ) || - !1) + (null !== current && + null !== current.dependencies && + checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || ("function" !== typeof state.UNSAFE_componentWillUpdate && "function" !== typeof state.componentWillUpdate) || @@ -6649,7 +6679,14 @@ __DEV__ && renderLanes )); else if ( - ((JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), + (didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; @@ -7103,7 +7140,19 @@ __DEV__ && null !== current && (workInProgress.dependencies = current.dependencies); profilerStartTime = -1; workInProgressRootSkippedLanes |= workInProgress.lanes; - if (0 === (renderLanes & workInProgress.childLanes)) return null; + if (0 === (renderLanes & workInProgress.childLanes)) + if (null !== current) { + if ( + (propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + 0 === (renderLanes & workInProgress.childLanes)) + ) + return null; + } else return null; if (null !== current && workInProgress.child !== current.child) throw Error("Resuming work not yet implemented."); if (null !== workInProgress.child) { @@ -7119,6 +7168,11 @@ __DEV__ && } return workInProgress.child; } + function checkScheduledUpdateOrContext(current, renderLanes) { + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; + } function attemptEarlyBailoutIfNoScheduledUpdate( current, workInProgress, @@ -7188,8 +7242,17 @@ __DEV__ && pushPrimaryTreeSuspenseHandler(workInProgress); break; case 19: + var didSuspendBefore = 0 !== (current.flags & 128); stateNode = 0 !== (renderLanes & workInProgress.childLanes); - if (0 !== (current.flags & 128)) { + stateNode || + (propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (stateNode = 0 !== (renderLanes & workInProgress.childLanes))); + if (didSuspendBefore) { if (stateNode) return updateSuspenseListComponent( current, @@ -7198,11 +7261,11 @@ __DEV__ && ); workInProgress.flags |= 128; } - var renderState = workInProgress.memoizedState; - null !== renderState && - ((renderState.rendering = null), - (renderState.tail = null), - (renderState.lastEffect = null)); + didSuspendBefore = workInProgress.memoizedState; + null !== didSuspendBefore && + ((didSuspendBefore.rendering = null), + (didSuspendBefore.tail = null), + (didSuspendBefore.lastEffect = null)); push( suspenseStackCursor, suspenseStackCursor.current, @@ -7271,7 +7334,7 @@ __DEV__ && didReceiveUpdate = !0; else { if ( - 0 === (current.lanes & renderLanes) && + !checkScheduledUpdateOrContext(current, renderLanes) && 0 === (workInProgress.flags & 128) ) return ( @@ -7401,7 +7464,12 @@ __DEV__ && var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); nextCache !== prevSibling.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); prevSibling = nextProps.element; prevSibling === returnFiber @@ -7433,15 +7501,7 @@ __DEV__ && null, renderLanes )), - (HostTransitionContext._currentValue2 = prevSibling), - didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== prevSibling && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - )), + (HostTransitionContext._currentValue2 = prevSibling)), markRef(current, workInProgress), reconcileChildren( current, @@ -7521,46 +7581,25 @@ __DEV__ && workInProgress.child ); case 10: - a: { - returnFiber = workInProgress.type; - prevSibling = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextCache = prevSibling.value; + return ( + (returnFiber = workInProgress.type), + (prevSibling = workInProgress.pendingProps), + (nextProps = prevSibling.value), "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), error$jscomp$0( "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" - )); - pushProvider(workInProgress, returnFiber, nextCache); - if (null !== nextProps) - if (objectIs(nextProps.value, nextCache)) { - if ( - nextProps.children === prevSibling.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange( - workInProgress, - returnFiber, - renderLanes - ); + )), + pushProvider(workInProgress, returnFiber, nextProps), reconcileChildren( current, workInProgress, prevSibling.children, renderLanes - ); - workInProgress = workInProgress.child; - } - return workInProgress; + ), + workInProgress.child + ); case 9: return ( (prevSibling = workInProgress.type._context), @@ -7569,7 +7608,7 @@ __DEV__ && error$jscomp$0( "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." ), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (prevSibling = readContext(prevSibling)), markComponentRenderStarted(workInProgress), (returnFiber = callComponentInDEV( @@ -7615,7 +7654,7 @@ __DEV__ && isContextProvider(returnFiber) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, returnFiber, prevSibling), mountClassInstance( workInProgress, @@ -7659,7 +7698,7 @@ __DEV__ && return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (returnFiber = readContext(CacheContext)), null === current ? ((prevSibling = peekCacheFromPool()), @@ -7697,10 +7736,11 @@ __DEV__ && : ((returnFiber = nextProps.cache), pushProvider(workInProgress, CacheContext, returnFiber), returnFiber !== prevSibling.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -7766,45 +7806,38 @@ __DEV__ && "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." ); } - function propagateContextChange(workInProgress, context, renderLanes) { + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { var fiber = workInProgress.child; null !== fiber && (fiber.return = workInProgress); for (; null !== fiber; ) { var list = fiber.dependencies; if (null !== list) { var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = ForceUpdate; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - fiber.return, - renderLanes, - workInProgress - ); - list.lanes |= renderLanes; - break; - } - dependency = dependency.next; + list = dependency.next; } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { + } else if (18 === fiber.tag) { nextFiber = fiber.return; if (null === nextFiber) throw Error( @@ -7818,7 +7851,7 @@ __DEV__ && renderLanes, workInProgress ); - nextFiber = fiber.sibling; + nextFiber = null; } else nextFiber = fiber.child; if (null !== nextFiber) nextFiber.return = fiber; else @@ -7838,14 +7871,76 @@ __DEV__ && fiber = nextFiber; } } - function prepareToReadContext(workInProgress, renderLanes) { + function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree + ) { + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; + + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current + ? current.push(context) + : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); + } + parent = parent.return; + } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; + } + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue2, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; + } + function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0), - (workInProgress.firstContext = null)); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { isDisallowedContextReadInDEV && @@ -7854,9 +7949,8 @@ __DEV__ && ); return readContextForConsumer(currentlyRenderingFiber, context); } - function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -7876,6 +7970,7 @@ __DEV__ && firstContext: context, _debugThenableState: null }; + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -15022,11 +15117,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926" + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15048,7 +15143,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1102, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1082, isConcurrent = !1, isStrictMode = !1; "object" === typeof options && @@ -15171,5 +15266,5 @@ __DEV__ && flushSyncWorkAcrossRoots_impl(0, !0)); } }; - exports.version = "19.0.0-native-fb-d66fa02a-20240926"; + exports.version = "19.0.0-native-fb-60b1420f-20240926"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js index 94b8f8c89616c..5329cae97bab3 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8166d4dfafe72a6712057618ae207625>> + * @generated SignedSource<<7217a732f0fc6dec87d4d6642f8bf925>> */ "use strict"; @@ -1767,7 +1767,7 @@ function createChildReconciler(shouldTrackSideEffects) { if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -1816,7 +1816,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -1886,7 +1886,7 @@ function createChildReconciler(shouldTrackSideEffects) { existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -2213,7 +2213,7 @@ function createChildReconciler(shouldTrackSideEffects) { return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -2382,19 +2382,19 @@ function renderWithHooks( ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; shouldDoubleInvokeUserFnsInHooksDEV = !1; - current = Component(props, secondArg); + nextRenderLanes = Component(props, secondArg); shouldDoubleInvokeUserFnsInHooksDEV = !1; didScheduleRenderPhaseUpdateDuringThisPass && - (current = renderWithHooksAgain( + (nextRenderLanes = renderWithHooksAgain( workInProgress, Component, props, secondArg )); - finishRenderingHooks(); - return current; + finishRenderingHooks(current); + return nextRenderLanes; } -function finishRenderingHooks() { +function finishRenderingHooks(current) { ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; @@ -2406,6 +2406,12 @@ function finishRenderingHooks() { throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." ); + null === current || + didReceiveUpdate || + ((current = current.dependencies), + null !== current && + checkIfContextChanged(current) && + (didReceiveUpdate = !0)); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { currentlyRenderingFiber$1 = workInProgress; @@ -3866,31 +3872,41 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - var tag = sourceFiber.tag; + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); + currentSourceFiber = sourceFiber.tag; 0 !== (sourceFiber.mode & 1) || - (0 !== tag && 11 !== tag && 15 !== tag) || - ((tag = sourceFiber.alternate) - ? ((sourceFiber.updateQueue = tag.updateQueue), - (sourceFiber.memoizedState = tag.memoizedState), - (sourceFiber.lanes = tag.lanes)) + (0 !== currentSourceFiber && + 11 !== currentSourceFiber && + 15 !== currentSourceFiber) || + ((currentSourceFiber = sourceFiber.alternate) + ? ((sourceFiber.updateQueue = currentSourceFiber.updateQueue), + (sourceFiber.memoizedState = currentSourceFiber.memoizedState), + (sourceFiber.lanes = currentSourceFiber.lanes)) : ((sourceFiber.updateQueue = null), (sourceFiber.memoizedState = null))); - tag = suspenseHandlerStackCursor.current; - if (null !== tag) { - switch (tag.tag) { + currentSourceFiber = suspenseHandlerStackCursor.current; + if (null !== currentSourceFiber) { + switch (currentSourceFiber.tag) { case 13: return ( sourceFiber.mode & 1 && (null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === tag.alternate && + : null === currentSourceFiber.alternate && 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 3)), - (tag.flags &= -257), - 0 === (tag.mode & 1) - ? tag === returnFiber - ? (tag.flags |= 65536) - : ((tag.flags |= 128), + (currentSourceFiber.flags &= -257), + 0 === (currentSourceFiber.mode & 1) + ? currentSourceFiber === returnFiber + ? (currentSourceFiber.flags |= 65536) + : ((currentSourceFiber.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), 1 === sourceFiber.tag @@ -3903,31 +3919,32 @@ function throwException( null === sourceFiber.alternate && (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)) - : ((tag.flags |= 65536), (tag.lanes = rootRenderLanes)), + : ((currentSourceFiber.flags |= 65536), + (currentSourceFiber.lanes = rootRenderLanes)), value === noopSuspenseyCommitThenable - ? (tag.flags |= 16384) - : ((returnFiber = tag.updateQueue), + ? (currentSourceFiber.flags |= 16384) + : ((returnFiber = currentSourceFiber.updateQueue), null === returnFiber - ? (tag.updateQueue = new Set([value])) + ? (currentSourceFiber.updateQueue = new Set([value])) : returnFiber.add(value), - tag.mode & 1 && + currentSourceFiber.mode & 1 && attachPingListener(root, value, rootRenderLanes)), !1 ); case 22: - if (tag.mode & 1) + if (currentSourceFiber.mode & 1) return ( - (tag.flags |= 65536), + (currentSourceFiber.flags |= 65536), value === noopSuspenseyCommitThenable - ? (tag.flags |= 16384) - : ((returnFiber = tag.updateQueue), + ? (currentSourceFiber.flags |= 16384) + : ((returnFiber = currentSourceFiber.updateQueue), null === returnFiber ? ((returnFiber = { transitions: null, markerInstances: null, retryQueue: new Set([value]) }), - (tag.updateQueue = returnFiber)) + (currentSourceFiber.updateQueue = returnFiber)) : ((sourceFiber = returnFiber.retryQueue), null === sourceFiber ? (returnFiber.retryQueue = new Set([value])) @@ -3938,7 +3955,7 @@ function throwException( } throw Error( "Unexpected Suspense handler tag (" + - tag.tag + + currentSourceFiber.tag + "). This is a bug in React." ); } @@ -3952,7 +3969,7 @@ function throwException( "A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition." ); } - tag = createCapturedValueAtFiber( + currentSourceFiber = createCapturedValueAtFiber( Error( "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.", { cause: value } @@ -3960,8 +3977,8 @@ function throwException( sourceFiber ); null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [tag]) - : workInProgressRootConcurrentErrors.push(tag); + ? (workInProgressRootConcurrentErrors = [currentSourceFiber]) + : workInProgressRootConcurrentErrors.push(currentSourceFiber); 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); if (null === returnFiber) return !0; value = createCapturedValueAtFiber(value, sourceFiber); @@ -3979,13 +3996,15 @@ function throwException( case 1: if ( ((sourceFiber = returnFiber.type), - (tag = returnFiber.stateNode), + (currentSourceFiber = returnFiber.stateNode), 0 === (returnFiber.flags & 128) && ("function" === typeof sourceFiber.getDerivedStateFromError || - (null !== tag && - "function" === typeof tag.componentDidCatch && + (null !== currentSourceFiber && + "function" === typeof currentSourceFiber.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has(tag))))) + !legacyErrorBoundariesThatAlreadyFailed.has( + currentSourceFiber + ))))) ) return ( (returnFiber.flags |= 65536), @@ -4035,7 +4054,7 @@ function updateForwardRef( for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); nextProps = renderWithHooks( current, workInProgress, @@ -4092,7 +4111,7 @@ function updateMemoComponent( return (workInProgress.child = current); } type = current.child; - if (0 === (current.lanes & renderLanes)) { + if (!checkScheduledUpdateOrContext(current, renderLanes)) { var prevProps = type.memoizedProps; Component = Component.compare; Component = null !== Component ? Component : shallowEqual; @@ -4121,7 +4140,7 @@ function updateSimpleMemoComponent( if ( ((didReceiveUpdate = !1), (workInProgress.pendingProps = nextProps = prevProps), - 0 !== (current.lanes & renderLanes)) + checkScheduledUpdateOrContext(current, renderLanes)) ) 0 !== (current.flags & 131072) && (didReceiveUpdate = !0); else @@ -4146,19 +4165,20 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) { markRef(current, workInProgress); if ("hidden" === nextProps.mode || nextIsDetached) { if (0 !== (workInProgress.flags & 128)) { - renderLanes = + nextProps = null !== prevState ? prevState.baseLanes | renderLanes : renderLanes; if (null !== current) { - nextProps = workInProgress.child = current.child; - for (nextChildren = 0; null !== nextProps; ) - (nextChildren = - nextChildren | nextProps.lanes | nextProps.childLanes), - (nextProps = nextProps.sibling); - workInProgress.childLanes = nextChildren & ~renderLanes; + nextChildren = workInProgress.child = current.child; + for (nextIsDetached = 0; null !== nextChildren; ) + (nextIsDetached = + nextIsDetached | nextChildren.lanes | nextChildren.childLanes), + (nextChildren = nextChildren.sibling); + workInProgress.childLanes = nextIsDetached & ~nextProps; } else (workInProgress.childLanes = 0), (workInProgress.child = null); return deferHiddenOffscreenComponent( current, workInProgress, + nextProps, renderLanes ); } @@ -4184,7 +4204,8 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) { deferHiddenOffscreenComponent( current, workInProgress, - null !== prevState ? prevState.baseLanes | renderLanes : renderLanes + null !== prevState ? prevState.baseLanes | renderLanes : renderLanes, + renderLanes ) ); } else @@ -4199,7 +4220,12 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) { reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } -function deferHiddenOffscreenComponent(current, workInProgress, nextBaseLanes) { +function deferHiddenOffscreenComponent( + current, + workInProgress, + nextBaseLanes, + renderLanes +) { var JSCompiler_inline_result = peekCacheFromPool(); JSCompiler_inline_result = null === JSCompiler_inline_result @@ -4212,6 +4238,8 @@ function deferHiddenOffscreenComponent(current, workInProgress, nextBaseLanes) { null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(); pushOffscreenSuspenseHandler(workInProgress); + null !== current && + propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } function markRef(current, workInProgress) { @@ -4240,7 +4268,7 @@ function updateFunctionComponent( ? previousContext : contextStackCursor$1.current; context = getMaskedContext(workInProgress, context); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); Component = renderWithHooks( current, workInProgress, @@ -4266,7 +4294,7 @@ function replayFunctionComponent( secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); workInProgress.updateQueue = null; nextProps = renderWithHooksAgain( workInProgress, @@ -4274,7 +4302,7 @@ function replayFunctionComponent( nextProps, secondArg ); - finishRenderingHooks(); + finishRenderingHooks(current); if (null !== current && !didReceiveUpdate) return ( bailoutHooks(current, workInProgress, renderLanes), @@ -4295,7 +4323,7 @@ function updateClassComponent( var hasContext = !0; pushContextProvider(workInProgress); } else hasContext = !1; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -4415,7 +4443,10 @@ function updateClassComponent( oldProps !== hasNewLifecycles || unresolvedOldProps !== newState || didPerformWorkStackCursor.current || - hasForceUpdate + hasForceUpdate || + (null !== current && + null !== current.dependencies && + checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, @@ -4435,7 +4466,9 @@ function updateClassComponent( newState, oldContext ) || - !1) + (null !== current && + null !== current.dependencies && + checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || ("function" !== typeof instance.UNSAFE_componentWillUpdate && "function" !== typeof instance.componentWillUpdate) || @@ -4678,7 +4711,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )); else if ( - ((JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), + (didReceiveUpdate || + propagateParentContextChanges(current, workInProgress, renderLanes, !1), + (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; @@ -5014,7 +5049,19 @@ function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) { function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { null !== current && (workInProgress.dependencies = current.dependencies); workInProgressRootSkippedLanes |= workInProgress.lanes; - if (0 === (renderLanes & workInProgress.childLanes)) return null; + if (0 === (renderLanes & workInProgress.childLanes)) + if (null !== current) { + if ( + (propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + 0 === (renderLanes & workInProgress.childLanes)) + ) + return null; + } else return null; if (null !== current && workInProgress.child !== current.child) throw Error("Resuming work not yet implemented."); if (null !== workInProgress.child) { @@ -5030,6 +5077,11 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { } return workInProgress.child; } +function checkScheduledUpdateOrContext(current, renderLanes) { + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; +} function attemptEarlyBailoutIfNoScheduledUpdate( current, workInProgress, @@ -5080,8 +5132,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( pushPrimaryTreeSuspenseHandler(workInProgress); break; case 19: + var didSuspendBefore = 0 !== (current.flags & 128); state = 0 !== (renderLanes & workInProgress.childLanes); - if (0 !== (current.flags & 128)) { + state || + (propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (state = 0 !== (renderLanes & workInProgress.childLanes))); + if (didSuspendBefore) { if (state) return updateSuspenseListComponent( current, @@ -5090,11 +5151,11 @@ function attemptEarlyBailoutIfNoScheduledUpdate( ); workInProgress.flags |= 128; } - var renderState = workInProgress.memoizedState; - null !== renderState && - ((renderState.rendering = null), - (renderState.tail = null), - (renderState.lastEffect = null)); + didSuspendBefore = workInProgress.memoizedState; + null !== didSuspendBefore && + ((didSuspendBefore.rendering = null), + (didSuspendBefore.tail = null), + (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); if (state) break; else return null; @@ -5118,7 +5179,7 @@ function beginWork(current, workInProgress, renderLanes) { didReceiveUpdate = !0; else { if ( - 0 === (current.lanes & renderLanes) && + !checkScheduledUpdateOrContext(current, renderLanes) && 0 === (workInProgress.flags & 128) ) return ( @@ -5231,7 +5292,12 @@ function beginWork(current, workInProgress, renderLanes) { var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); nextCache !== init.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); init = nextProps.element; init === elementType @@ -5258,15 +5324,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue2 = init), - didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== init && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - )), + (HostTransitionContext._currentValue2 = init)), markRef(current, workInProgress), reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child @@ -5336,36 +5394,22 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - a: { - elementType = workInProgress.type; - init = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextCache = init.value; - pushProvider(workInProgress, elementType, nextCache); - if (null !== nextProps) - if (objectIs(nextProps.value, nextCache)) { - if ( - nextProps.children === init.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); - workInProgress = workInProgress.child; - } - return workInProgress; + return ( + (elementType = workInProgress.pendingProps), + pushProvider(workInProgress, workInProgress.type, elementType.value), + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ), + workInProgress.child + ); case 9: return ( (init = workInProgress.type._context), (elementType = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (init = readContext(init)), (elementType = elementType(init)), (workInProgress.flags |= 1), @@ -5400,7 +5444,7 @@ function beginWork(current, workInProgress, renderLanes) { isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, elementType, init), mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( @@ -5435,7 +5479,7 @@ function beginWork(current, workInProgress, renderLanes) { return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), @@ -5469,10 +5513,11 @@ function beginWork(current, workInProgress, renderLanes) { : ((elementType = nextProps.cache), pushProvider(workInProgress, CacheContext, elementType), elementType !== init.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -5522,45 +5567,38 @@ function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { parent = parent.return; } } -function propagateContextChange(workInProgress, context, renderLanes) { +function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree +) { var fiber = workInProgress.child; null !== fiber && (fiber.return = workInProgress); for (; null !== fiber; ) { var list = fiber.dependencies; if (null !== list) { var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = 2; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - fiber.return, - renderLanes, - workInProgress - ); - list.lanes |= renderLanes; - break; - } - dependency = dependency.next; + list = dependency.next; } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { + } else if (18 === fiber.tag) { nextFiber = fiber.return; if (null === nextFiber) throw Error( @@ -5570,7 +5608,7 @@ function propagateContextChange(workInProgress, context, renderLanes) { list = nextFiber.alternate; null !== list && (list.lanes |= renderLanes); scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = fiber.sibling; + nextFiber = null; } else nextFiber = fiber.child; if (null !== nextFiber) nextFiber.return = fiber; else @@ -5590,21 +5628,80 @@ function propagateContextChange(workInProgress, context, renderLanes) { fiber = nextFiber; } } -function prepareToReadContext(workInProgress, renderLanes) { +function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree +) { + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; + + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); + } + parent = parent.return; + } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; +} +function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue2, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; +} +function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0), - (workInProgress.firstContext = null)); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { return readContextForConsumer(currentlyRenderingFiber, context); } -function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -5620,6 +5717,7 @@ function readContextForConsumer(consumer, context) { ); lastContextDependency = context; consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -5713,14 +5811,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$86 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$86 = lastTailNode), + for (var lastTailNode$87 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$87 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$86 + null === lastTailNode$87 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$86.sibling = null); + : (lastTailNode$87.sibling = null); } } function bubbleProperties(completedWork) { @@ -5730,19 +5828,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$87 = completedWork.child; null !== child$87; ) - (newChildLanes |= child$87.lanes | child$87.childLanes), - (subtreeFlags |= child$87.subtreeFlags & 31457280), - (subtreeFlags |= child$87.flags & 31457280), - (child$87.return = completedWork), - (child$87 = child$87.sibling); + for (var child$88 = completedWork.child; null !== child$88; ) + (newChildLanes |= child$88.lanes | child$88.childLanes), + (subtreeFlags |= child$88.subtreeFlags & 31457280), + (subtreeFlags |= child$88.flags & 31457280), + (child$88.return = completedWork), + (child$88 = child$88.sibling); else - 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); + 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); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -5905,11 +6003,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (index = newProps.alternate.memoizedState.cachePool.pool); - var cache$91 = null; + var cache$92 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$91 = newProps.memoizedState.cachePool.pool); - cache$91 !== index && (newProps.flags |= 2048); + (cache$92 = newProps.memoizedState.cachePool.pool); + cache$92 !== index && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -5934,8 +6032,8 @@ function completeWork(current, workInProgress, renderLanes) { index = workInProgress.memoizedState; if (null === index) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$91 = index.rendering; - if (null === cache$91) + cache$92 = index.rendering; + if (null === cache$92) if (newProps) cutOffTailIfNeeded(index, !1); else { if ( @@ -5943,11 +6041,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$91 = findFirstSuspended(current); - if (null !== cache$91) { + cache$92 = findFirstSuspended(current); + if (null !== cache$92) { workInProgress.flags |= 128; cutOffTailIfNeeded(index, !1); - current = cache$91.updateQueue; + current = cache$92.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -5972,7 +6070,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$91)), null !== current)) { + if (((current = findFirstSuspended(cache$92)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -5982,7 +6080,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !0), null === index.tail && "hidden" === index.tailMode && - !cache$91.alternate) + !cache$92.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -5994,13 +6092,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !1), (workInProgress.lanes = 4194304)); index.isBackwards - ? ((cache$91.sibling = workInProgress.child), - (workInProgress.child = cache$91)) + ? ((cache$92.sibling = workInProgress.child), + (workInProgress.child = cache$92)) : ((current = index.last), null !== current - ? (current.sibling = cache$91) - : (workInProgress.child = cache$91), - (index.last = cache$91)); + ? (current.sibling = cache$92) + : (workInProgress.child = cache$92), + (index.last = cache$92)); } if (null !== index.tail) return ( @@ -6182,9 +6280,9 @@ function commitHookEffectListMount(flags, finishedWork) { do { if ((updateQueue.tag & flags) === flags) { lastEffect = void 0; - var create$107 = updateQueue.create, + var create$108 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$107(); + lastEffect = create$108(); inst.destroy = lastEffect; } updateQueue = updateQueue.next; @@ -6297,8 +6395,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$109) { - captureCommitPhaseError(current, nearestMountedAncestor, error$109); + } catch (error$110) { + captureCommitPhaseError(current, nearestMountedAncestor, error$110); } else ref.current = null; } @@ -6462,11 +6560,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$108) { + } catch (error$109) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$108 + error$109 ); } } @@ -7002,12 +7100,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$110 = JSCompiler_inline_result.stateNode.containerInfo, - before$111 = getHostSibling(finishedWork); + var parent$111 = JSCompiler_inline_result.stateNode.containerInfo, + before$112 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$111, - parent$110 + before$112, + parent$111 ); break; default: @@ -8164,8 +8262,8 @@ function renderRootSync(root, lanes) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$122) { - handleThrow(root, thrownValue$122); + } catch (thrownValue$123) { + handleThrow(root, thrownValue$123); } while (1); lanes && root.shellSuspendCounter++; @@ -8275,8 +8373,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$124) { - handleThrow(root, thrownValue$124); + } catch (thrownValue$125) { + handleThrow(root, thrownValue$125); } while (1); resetContextDependencies(); @@ -9395,28 +9493,28 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var internals$jscomp$inline_1320 = { +var internals$jscomp$inline_1334 = { bundleType: 0, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function (mockNode) { mockNode = nodeToInstanceMap.get(mockNode); return void 0 !== mockNode ? mockNode.internalInstanceHandle : null; }, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926" + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1321 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1335 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1321.isDisabled && - hook$jscomp$inline_1321.supportsFiber + !hook$jscomp$inline_1335.isDisabled && + hook$jscomp$inline_1335.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1321.inject( - internals$jscomp$inline_1320 + (rendererID = hook$jscomp$inline_1335.inject( + internals$jscomp$inline_1334 )), - (injectedHook = hook$jscomp$inline_1321); + (injectedHook = hook$jscomp$inline_1335); } catch (err) {} } exports._Scheduler = Scheduler; @@ -9540,4 +9638,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.0.0-native-fb-d66fa02a-20240926"; +exports.version = "19.0.0-native-fb-60b1420f-20240926"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js index a69132227866d..7af24903db275 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<427b900de20781d359352e3beb207a16>> + * @generated SignedSource<<4a6bb4cea4fa95e0fd7e8b6e9ea369db>> */ "use strict"; @@ -1889,7 +1889,7 @@ function createChildReconciler(shouldTrackSideEffects) { if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -1938,7 +1938,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -2008,7 +2008,7 @@ function createChildReconciler(shouldTrackSideEffects) { existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -2335,7 +2335,7 @@ function createChildReconciler(shouldTrackSideEffects) { return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -2504,19 +2504,19 @@ function renderWithHooks( ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; shouldDoubleInvokeUserFnsInHooksDEV = !1; - current = Component(props, secondArg); + nextRenderLanes = Component(props, secondArg); shouldDoubleInvokeUserFnsInHooksDEV = !1; didScheduleRenderPhaseUpdateDuringThisPass && - (current = renderWithHooksAgain( + (nextRenderLanes = renderWithHooksAgain( workInProgress, Component, props, secondArg )); - finishRenderingHooks(); - return current; + finishRenderingHooks(current); + return nextRenderLanes; } -function finishRenderingHooks() { +function finishRenderingHooks(current) { ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; @@ -2528,6 +2528,12 @@ function finishRenderingHooks() { throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." ); + null === current || + didReceiveUpdate || + ((current = current.dependencies), + null !== current && + checkIfContextChanged(current) && + (didReceiveUpdate = !0)); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { currentlyRenderingFiber$1 = workInProgress; @@ -3996,31 +4002,41 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - var tag = sourceFiber.tag; + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); + currentSourceFiber = sourceFiber.tag; 0 !== (sourceFiber.mode & 1) || - (0 !== tag && 11 !== tag && 15 !== tag) || - ((tag = sourceFiber.alternate) - ? ((sourceFiber.updateQueue = tag.updateQueue), - (sourceFiber.memoizedState = tag.memoizedState), - (sourceFiber.lanes = tag.lanes)) + (0 !== currentSourceFiber && + 11 !== currentSourceFiber && + 15 !== currentSourceFiber) || + ((currentSourceFiber = sourceFiber.alternate) + ? ((sourceFiber.updateQueue = currentSourceFiber.updateQueue), + (sourceFiber.memoizedState = currentSourceFiber.memoizedState), + (sourceFiber.lanes = currentSourceFiber.lanes)) : ((sourceFiber.updateQueue = null), (sourceFiber.memoizedState = null))); - tag = suspenseHandlerStackCursor.current; - if (null !== tag) { - switch (tag.tag) { + currentSourceFiber = suspenseHandlerStackCursor.current; + if (null !== currentSourceFiber) { + switch (currentSourceFiber.tag) { case 13: return ( sourceFiber.mode & 1 && (null === shellBoundary ? renderDidSuspendDelayIfPossible() - : null === tag.alternate && + : null === currentSourceFiber.alternate && 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 3)), - (tag.flags &= -257), - 0 === (tag.mode & 1) - ? tag === returnFiber - ? (tag.flags |= 65536) - : ((tag.flags |= 128), + (currentSourceFiber.flags &= -257), + 0 === (currentSourceFiber.mode & 1) + ? currentSourceFiber === returnFiber + ? (currentSourceFiber.flags |= 65536) + : ((currentSourceFiber.flags |= 128), (sourceFiber.flags |= 131072), (sourceFiber.flags &= -52805), 1 === sourceFiber.tag @@ -4033,31 +4049,32 @@ function throwException( null === sourceFiber.alternate && (sourceFiber.tag = 28), (sourceFiber.lanes |= 2)) - : ((tag.flags |= 65536), (tag.lanes = rootRenderLanes)), + : ((currentSourceFiber.flags |= 65536), + (currentSourceFiber.lanes = rootRenderLanes)), value === noopSuspenseyCommitThenable - ? (tag.flags |= 16384) - : ((returnFiber = tag.updateQueue), + ? (currentSourceFiber.flags |= 16384) + : ((returnFiber = currentSourceFiber.updateQueue), null === returnFiber - ? (tag.updateQueue = new Set([value])) + ? (currentSourceFiber.updateQueue = new Set([value])) : returnFiber.add(value), - tag.mode & 1 && + currentSourceFiber.mode & 1 && attachPingListener(root, value, rootRenderLanes)), !1 ); case 22: - if (tag.mode & 1) + if (currentSourceFiber.mode & 1) return ( - (tag.flags |= 65536), + (currentSourceFiber.flags |= 65536), value === noopSuspenseyCommitThenable - ? (tag.flags |= 16384) - : ((returnFiber = tag.updateQueue), + ? (currentSourceFiber.flags |= 16384) + : ((returnFiber = currentSourceFiber.updateQueue), null === returnFiber ? ((returnFiber = { transitions: null, markerInstances: null, retryQueue: new Set([value]) }), - (tag.updateQueue = returnFiber)) + (currentSourceFiber.updateQueue = returnFiber)) : ((sourceFiber = returnFiber.retryQueue), null === sourceFiber ? (returnFiber.retryQueue = new Set([value])) @@ -4068,7 +4085,7 @@ function throwException( } throw Error( "Unexpected Suspense handler tag (" + - tag.tag + + currentSourceFiber.tag + "). This is a bug in React." ); } @@ -4082,7 +4099,7 @@ function throwException( "A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition." ); } - tag = createCapturedValueAtFiber( + currentSourceFiber = createCapturedValueAtFiber( Error( "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.", { cause: value } @@ -4090,8 +4107,8 @@ function throwException( sourceFiber ); null === workInProgressRootConcurrentErrors - ? (workInProgressRootConcurrentErrors = [tag]) - : workInProgressRootConcurrentErrors.push(tag); + ? (workInProgressRootConcurrentErrors = [currentSourceFiber]) + : workInProgressRootConcurrentErrors.push(currentSourceFiber); 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); if (null === returnFiber) return !0; value = createCapturedValueAtFiber(value, sourceFiber); @@ -4109,13 +4126,15 @@ function throwException( case 1: if ( ((sourceFiber = returnFiber.type), - (tag = returnFiber.stateNode), + (currentSourceFiber = returnFiber.stateNode), 0 === (returnFiber.flags & 128) && ("function" === typeof sourceFiber.getDerivedStateFromError || - (null !== tag && - "function" === typeof tag.componentDidCatch && + (null !== currentSourceFiber && + "function" === typeof currentSourceFiber.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || - !legacyErrorBoundariesThatAlreadyFailed.has(tag))))) + !legacyErrorBoundariesThatAlreadyFailed.has( + currentSourceFiber + ))))) ) return ( (returnFiber.flags |= 65536), @@ -4165,7 +4184,7 @@ function updateForwardRef( for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); nextProps = renderWithHooks( current, @@ -4224,7 +4243,7 @@ function updateMemoComponent( return (workInProgress.child = current); } type = current.child; - if (0 === (current.lanes & renderLanes)) { + if (!checkScheduledUpdateOrContext(current, renderLanes)) { var prevProps = type.memoizedProps; Component = Component.compare; Component = null !== Component ? Component : shallowEqual; @@ -4253,7 +4272,7 @@ function updateSimpleMemoComponent( if ( ((didReceiveUpdate = !1), (workInProgress.pendingProps = nextProps = prevProps), - 0 !== (current.lanes & renderLanes)) + checkScheduledUpdateOrContext(current, renderLanes)) ) 0 !== (current.flags & 131072) && (didReceiveUpdate = !0); else @@ -4278,19 +4297,20 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) { markRef(current, workInProgress); if ("hidden" === nextProps.mode || nextIsDetached) { if (0 !== (workInProgress.flags & 128)) { - renderLanes = + nextProps = null !== prevState ? prevState.baseLanes | renderLanes : renderLanes; if (null !== current) { - nextProps = workInProgress.child = current.child; - for (nextChildren = 0; null !== nextProps; ) - (nextChildren = - nextChildren | nextProps.lanes | nextProps.childLanes), - (nextProps = nextProps.sibling); - workInProgress.childLanes = nextChildren & ~renderLanes; + nextChildren = workInProgress.child = current.child; + for (nextIsDetached = 0; null !== nextChildren; ) + (nextIsDetached = + nextIsDetached | nextChildren.lanes | nextChildren.childLanes), + (nextChildren = nextChildren.sibling); + workInProgress.childLanes = nextIsDetached & ~nextProps; } else (workInProgress.childLanes = 0), (workInProgress.child = null); return deferHiddenOffscreenComponent( current, workInProgress, + nextProps, renderLanes ); } @@ -4316,7 +4336,8 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) { deferHiddenOffscreenComponent( current, workInProgress, - null !== prevState ? prevState.baseLanes | renderLanes : renderLanes + null !== prevState ? prevState.baseLanes | renderLanes : renderLanes, + renderLanes ) ); } else @@ -4331,7 +4352,12 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) { reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } -function deferHiddenOffscreenComponent(current, workInProgress, nextBaseLanes) { +function deferHiddenOffscreenComponent( + current, + workInProgress, + nextBaseLanes, + renderLanes +) { var JSCompiler_inline_result = peekCacheFromPool(); JSCompiler_inline_result = null === JSCompiler_inline_result @@ -4344,6 +4370,8 @@ function deferHiddenOffscreenComponent(current, workInProgress, nextBaseLanes) { null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(); pushOffscreenSuspenseHandler(workInProgress); + null !== current && + propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } function markRef(current, workInProgress) { @@ -4372,7 +4400,7 @@ function updateFunctionComponent( ? previousContext : contextStackCursor$1.current; context = getMaskedContext(workInProgress, context); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); Component = renderWithHooks( current, @@ -4400,7 +4428,7 @@ function replayFunctionComponent( secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); workInProgress.updateQueue = null; nextProps = renderWithHooksAgain( @@ -4409,7 +4437,7 @@ function replayFunctionComponent( nextProps, secondArg ); - finishRenderingHooks(); + finishRenderingHooks(current); markComponentRenderStopped(); if (null !== current && !didReceiveUpdate) return ( @@ -4431,7 +4459,7 @@ function updateClassComponent( var hasContext = !0; pushContextProvider(workInProgress); } else hasContext = !1; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -4551,7 +4579,10 @@ function updateClassComponent( oldProps !== hasNewLifecycles || unresolvedOldProps !== newState || didPerformWorkStackCursor.current || - hasForceUpdate + hasForceUpdate || + (null !== current && + null !== current.dependencies && + checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, @@ -4571,7 +4602,9 @@ function updateClassComponent( newState, oldContext ) || - !1) + (null !== current && + null !== current.dependencies && + checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || ("function" !== typeof instance.UNSAFE_componentWillUpdate && "function" !== typeof instance.componentWillUpdate) || @@ -4821,7 +4854,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )); else if ( - ((JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), + (didReceiveUpdate || + propagateParentContextChanges(current, workInProgress, renderLanes, !1), + (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; @@ -5168,7 +5203,19 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { null !== current && (workInProgress.dependencies = current.dependencies); profilerStartTime = -1; workInProgressRootSkippedLanes |= workInProgress.lanes; - if (0 === (renderLanes & workInProgress.childLanes)) return null; + if (0 === (renderLanes & workInProgress.childLanes)) + if (null !== current) { + if ( + (propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + 0 === (renderLanes & workInProgress.childLanes)) + ) + return null; + } else return null; if (null !== current && workInProgress.child !== current.child) throw Error("Resuming work not yet implemented."); if (null !== workInProgress.child) { @@ -5184,6 +5231,11 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { } return workInProgress.child; } +function checkScheduledUpdateOrContext(current, renderLanes) { + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; +} function attemptEarlyBailoutIfNoScheduledUpdate( current, workInProgress, @@ -5242,8 +5294,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( pushPrimaryTreeSuspenseHandler(workInProgress); break; case 19: + var didSuspendBefore = 0 !== (current.flags & 128); stateNode = 0 !== (renderLanes & workInProgress.childLanes); - if (0 !== (current.flags & 128)) { + stateNode || + (propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (stateNode = 0 !== (renderLanes & workInProgress.childLanes))); + if (didSuspendBefore) { if (stateNode) return updateSuspenseListComponent( current, @@ -5252,11 +5313,11 @@ function attemptEarlyBailoutIfNoScheduledUpdate( ); workInProgress.flags |= 128; } - var renderState = workInProgress.memoizedState; - null !== renderState && - ((renderState.rendering = null), - (renderState.tail = null), - (renderState.lastEffect = null)); + didSuspendBefore = workInProgress.memoizedState; + null !== didSuspendBefore && + ((didSuspendBefore.rendering = null), + (didSuspendBefore.tail = null), + (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); if (stateNode) break; else return null; @@ -5280,7 +5341,7 @@ function beginWork(current, workInProgress, renderLanes) { didReceiveUpdate = !0; else { if ( - 0 === (current.lanes & renderLanes) && + !checkScheduledUpdateOrContext(current, renderLanes) && 0 === (workInProgress.flags & 128) ) return ( @@ -5393,7 +5454,12 @@ function beginWork(current, workInProgress, renderLanes) { var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); nextCache !== init.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); init = nextProps.element; init === elementType @@ -5420,15 +5486,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue2 = init), - didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== init && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - )), + (HostTransitionContext._currentValue2 = init)), markRef(current, workInProgress), reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child @@ -5503,36 +5561,22 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - a: { - elementType = workInProgress.type; - init = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextCache = init.value; - pushProvider(workInProgress, elementType, nextCache); - if (null !== nextProps) - if (objectIs(nextProps.value, nextCache)) { - if ( - nextProps.children === init.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); - workInProgress = workInProgress.child; - } - return workInProgress; + return ( + (elementType = workInProgress.pendingProps), + pushProvider(workInProgress, workInProgress.type, elementType.value), + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ), + workInProgress.child + ); case 9: return ( (init = workInProgress.type._context), (elementType = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (init = readContext(init)), markComponentRenderStarted(workInProgress), (elementType = elementType(init)), @@ -5569,7 +5613,7 @@ function beginWork(current, workInProgress, renderLanes) { isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, elementType, init), mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( @@ -5604,7 +5648,7 @@ function beginWork(current, workInProgress, renderLanes) { return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), @@ -5638,10 +5682,11 @@ function beginWork(current, workInProgress, renderLanes) { : ((elementType = nextProps.cache), pushProvider(workInProgress, CacheContext, elementType), elementType !== init.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -5691,45 +5736,38 @@ function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { parent = parent.return; } } -function propagateContextChange(workInProgress, context, renderLanes) { +function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree +) { var fiber = workInProgress.child; null !== fiber && (fiber.return = workInProgress); for (; null !== fiber; ) { var list = fiber.dependencies; if (null !== list) { var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = 2; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - fiber.return, - renderLanes, - workInProgress - ); - list.lanes |= renderLanes; - break; - } - dependency = dependency.next; + list = dependency.next; } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { + } else if (18 === fiber.tag) { nextFiber = fiber.return; if (null === nextFiber) throw Error( @@ -5739,7 +5777,7 @@ function propagateContextChange(workInProgress, context, renderLanes) { list = nextFiber.alternate; null !== list && (list.lanes |= renderLanes); scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = fiber.sibling; + nextFiber = null; } else nextFiber = fiber.child; if (null !== nextFiber) nextFiber.return = fiber; else @@ -5759,21 +5797,80 @@ function propagateContextChange(workInProgress, context, renderLanes) { fiber = nextFiber; } } -function prepareToReadContext(workInProgress, renderLanes) { +function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree +) { + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; + + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); + } + parent = parent.return; + } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; +} +function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue2, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; +} +function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0), - (workInProgress.firstContext = null)); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { return readContextForConsumer(currentlyRenderingFiber, context); } -function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -5789,6 +5886,7 @@ function readContextForConsumer(consumer, context) { ); lastContextDependency = context; consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -5882,14 +5980,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$88 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$88 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$87 + null === lastTailNode$88 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$87.sibling = null); + : (lastTailNode$88.sibling = null); } } function bubbleProperties(completedWork) { @@ -5901,53 +5999,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$89 = completedWork.selfBaseDuration, - child$90 = completedWork.child; - null !== child$90; + var treeBaseDuration$90 = completedWork.selfBaseDuration, + child$91 = completedWork.child; + null !== child$91; ) - (newChildLanes |= child$90.lanes | child$90.childLanes), - (subtreeFlags |= child$90.subtreeFlags & 31457280), - (subtreeFlags |= child$90.flags & 31457280), - (treeBaseDuration$89 += child$90.treeBaseDuration), - (child$90 = child$90.sibling); - completedWork.treeBaseDuration = treeBaseDuration$89; + (newChildLanes |= child$91.lanes | child$91.childLanes), + (subtreeFlags |= child$91.subtreeFlags & 31457280), + (subtreeFlags |= child$91.flags & 31457280), + (treeBaseDuration$90 += child$91.treeBaseDuration), + (child$91 = child$91.sibling); + completedWork.treeBaseDuration = treeBaseDuration$90; } else for ( - treeBaseDuration$89 = completedWork.child; - null !== treeBaseDuration$89; + treeBaseDuration$90 = completedWork.child; + null !== treeBaseDuration$90; ) (newChildLanes |= - treeBaseDuration$89.lanes | treeBaseDuration$89.childLanes), - (subtreeFlags |= treeBaseDuration$89.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$89.flags & 31457280), - (treeBaseDuration$89.return = completedWork), - (treeBaseDuration$89 = treeBaseDuration$89.sibling); + treeBaseDuration$90.lanes | treeBaseDuration$90.childLanes), + (subtreeFlags |= treeBaseDuration$90.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$90.flags & 31457280), + (treeBaseDuration$90.return = completedWork), + (treeBaseDuration$90 = treeBaseDuration$90.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$89 = completedWork.actualDuration; - child$90 = completedWork.selfBaseDuration; + treeBaseDuration$90 = completedWork.actualDuration; + child$91 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$89 += child.actualDuration), - (child$90 += child.treeBaseDuration), + (treeBaseDuration$90 += child.actualDuration), + (child$91 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$89; - completedWork.treeBaseDuration = child$90; + completedWork.actualDuration = treeBaseDuration$90; + completedWork.treeBaseDuration = child$91; } else for ( - treeBaseDuration$89 = completedWork.child; - null !== treeBaseDuration$89; + treeBaseDuration$90 = completedWork.child; + null !== treeBaseDuration$90; ) (newChildLanes |= - treeBaseDuration$89.lanes | treeBaseDuration$89.childLanes), - (subtreeFlags |= treeBaseDuration$89.subtreeFlags), - (subtreeFlags |= treeBaseDuration$89.flags), - (treeBaseDuration$89.return = completedWork), - (treeBaseDuration$89 = treeBaseDuration$89.sibling); + treeBaseDuration$90.lanes | treeBaseDuration$90.childLanes), + (subtreeFlags |= treeBaseDuration$90.subtreeFlags), + (subtreeFlags |= treeBaseDuration$90.flags), + (treeBaseDuration$90.return = completedWork), + (treeBaseDuration$90 = treeBaseDuration$90.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6120,11 +6218,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (index = newProps.alternate.memoizedState.cachePool.pool); - var cache$97 = null; + var cache$98 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$97 = newProps.memoizedState.cachePool.pool); - cache$97 !== index && (newProps.flags |= 2048); + (cache$98 = newProps.memoizedState.cachePool.pool); + cache$98 !== index && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -6154,8 +6252,8 @@ function completeWork(current, workInProgress, renderLanes) { index = workInProgress.memoizedState; if (null === index) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$97 = index.rendering; - if (null === cache$97) + cache$98 = index.rendering; + if (null === cache$98) if (newProps) cutOffTailIfNeeded(index, !1); else { if ( @@ -6163,11 +6261,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$97 = findFirstSuspended(current); - if (null !== cache$97) { + cache$98 = findFirstSuspended(current); + if (null !== cache$98) { workInProgress.flags |= 128; cutOffTailIfNeeded(index, !1); - current = cache$97.updateQueue; + current = cache$98.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6192,7 +6290,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$97)), null !== current)) { + if (((current = findFirstSuspended(cache$98)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6202,7 +6300,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !0), null === index.tail && "hidden" === index.tailMode && - !cache$97.alternate) + !cache$98.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6214,13 +6312,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !1), (workInProgress.lanes = 4194304)); index.isBackwards - ? ((cache$97.sibling = workInProgress.child), - (workInProgress.child = cache$97)) + ? ((cache$98.sibling = workInProgress.child), + (workInProgress.child = cache$98)) : ((current = index.last), null !== current - ? (current.sibling = cache$97) - : (workInProgress.child = cache$97), - (index.last = cache$97)); + ? (current.sibling = cache$98) + : (workInProgress.child = cache$98), + (index.last = cache$98)); } if (null !== index.tail) return ( @@ -6454,9 +6552,9 @@ function commitHookEffectListMount(flags, finishedWork) { finishedWork ); lastEffect = void 0; - var create$113 = updateQueue.create, + var create$114 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$113(); + lastEffect = create$114(); inst.destroy = lastEffect; 0 !== (flags & 8) ? null !== injectedProfilingHooks && @@ -6595,8 +6693,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$117) { - captureCommitPhaseError(current, nearestMountedAncestor, error$117); + } catch (error$118) { + captureCommitPhaseError(current, nearestMountedAncestor, error$118); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -6656,8 +6754,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$118) { - captureCommitPhaseError(current, nearestMountedAncestor, error$118); + } catch (error$119) { + captureCommitPhaseError(current, nearestMountedAncestor, error$119); } else ref.current = null; } @@ -6848,11 +6946,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$114) { + } catch (error$115) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$114 + error$115 ); } else { @@ -6869,11 +6967,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$115) { + } catch (error$116) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$115 + error$116 ); } recordEffectDuration(); @@ -6884,11 +6982,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$116) { + } catch (error$117) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$116 + error$117 ); } } @@ -7442,12 +7540,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$119 = JSCompiler_inline_result.stateNode.containerInfo, - before$120 = getHostSibling(finishedWork); + var parent$120 = JSCompiler_inline_result.stateNode.containerInfo, + before$121 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$120, - parent$119 + before$121, + parent$120 ); break; default: @@ -8663,8 +8761,8 @@ function renderRootSync(root, lanes) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$135) { - handleThrow(root, thrownValue$135); + } catch (thrownValue$136) { + handleThrow(root, thrownValue$136); } while (1); lanes && root.shellSuspendCounter++; @@ -8776,8 +8874,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$137) { - handleThrow(root, thrownValue$137); + } catch (thrownValue$138) { + handleThrow(root, thrownValue$138); } while (1); resetContextDependencies(); @@ -9961,21 +10059,21 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var internals$jscomp$inline_1168 = { +var internals$jscomp$inline_1149 = { bundleType: 0, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function (mockNode) { mockNode = nodeToInstanceMap.get(mockNode); return void 0 !== mockNode ? mockNode.internalInstanceHandle : null; }, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926", + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926", getLaneLabelMap: function () { for ( - var map = new Map(), lane = 1, index$141 = 0; - 31 > index$141; - index$141++ + var map = new Map(), lane = 1, index$142 = 0; + 31 > index$142; + index$142++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -9988,16 +10086,16 @@ var internals$jscomp$inline_1168 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1377 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1391 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1377.isDisabled && - hook$jscomp$inline_1377.supportsFiber + !hook$jscomp$inline_1391.isDisabled && + hook$jscomp$inline_1391.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1377.inject( - internals$jscomp$inline_1168 + (rendererID = hook$jscomp$inline_1391.inject( + internals$jscomp$inline_1149 )), - (injectedHook = hook$jscomp$inline_1377); + (injectedHook = hook$jscomp$inline_1391); } catch (err) {} } exports._Scheduler = Scheduler; @@ -10121,4 +10219,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.0.0-native-fb-d66fa02a-20240926"; +exports.version = "19.0.0-native-fb-60b1420f-20240926"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js index 261eae8968b69..b190482993b5b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<4f33856e9cd9a7cc6053b43b4ce56c2b>> + * @generated SignedSource<> */ "use strict"; @@ -1021,7 +1021,6 @@ __DEV__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); - require("ReactNativeInternalFeatureFlags"); var REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), @@ -1704,7 +1703,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-native-fb-d66fa02a-20240926"; + exports.version = "19.0.0-native-fb-60b1420f-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js index 0509392471bac..12dd0aba4c469 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js @@ -7,11 +7,10 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<08a2861c55ebf9050c53e2836ea70433>> */ "use strict"; -require("ReactNativeInternalFeatureFlags"); var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), @@ -580,4 +579,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-native-fb-d66fa02a-20240926"; +exports.version = "19.0.0-native-fb-60b1420f-20240926"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js index 2fce8c6a6a5b9..034d04228d890 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<99cd51350691926416582898d95364f0>> + * @generated SignedSource<<512f59122bd9e498c0c8c21825c11f55>> */ "use strict"; @@ -15,7 +15,6 @@ "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); -require("ReactNativeInternalFeatureFlags"); var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), @@ -584,7 +583,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-native-fb-d66fa02a-20240926"; +exports.version = "19.0.0-native-fb-60b1420f-20240926"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index c439836d594a2..a78e809c67ead 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -d66fa02a303fc53d901bdb0d7bbdaec3e6774b19 +60b1420f18e9473230f23f88fdc7b89fea3dbbfd diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index b6dd33587b1db..4a43ba9997920 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<98cea4503264412fc27962778251491b>> + * @generated SignedSource<<4a18af43ebbe43a20a549e4be697ea2c>> */ "use strict"; @@ -3703,7 +3703,7 @@ __DEV__ && if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3784,7 +3784,7 @@ __DEV__ && return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3881,7 +3881,7 @@ __DEV__ && existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -4358,7 +4358,7 @@ __DEV__ && return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -4712,9 +4712,8 @@ __DEV__ && throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." ); - enableLazyContextPropagation && - null !== current && - !didReceiveUpdate && + null === current || + didReceiveUpdate || ((current = current.dependencies), null !== current && checkIfContextChanged(current) && @@ -6600,16 +6599,14 @@ __DEV__ && "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); currentSourceFiber = sourceFiber.tag; 0 !== (sourceFiber.mode & 1) || (0 !== currentSourceFiber && @@ -6791,7 +6788,7 @@ __DEV__ && for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); nextProps = renderWithHooks( current, @@ -6995,8 +6992,7 @@ __DEV__ && null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(workInProgress); pushOffscreenSuspenseHandler(workInProgress); - enableLazyContextPropagation && - null !== current && + null !== current && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } @@ -7054,7 +7050,7 @@ __DEV__ && ? previousContext : contextStackCursor$1.current; componentName = getMaskedContext(workInProgress, componentName); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); Component = renderWithHooks( current, @@ -7082,7 +7078,7 @@ __DEV__ && secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); hookTypesUpdateIndexDev = -1; ignorePreviousDependencies = @@ -7144,7 +7140,7 @@ __DEV__ && isContextProvider(Component) ? ((_instance = !0), pushContextProvider(workInProgress)) : (_instance = !1); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -7271,8 +7267,7 @@ __DEV__ && unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && @@ -7294,8 +7289,7 @@ __DEV__ && newState, oldContext ) || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || @@ -7628,8 +7622,7 @@ __DEV__ && renderLanes )); else if ( - (enableLazyContextPropagation && - !didReceiveUpdate && + (didReceiveUpdate || propagateParentContextChanges( current, workInProgress, @@ -8091,7 +8084,7 @@ __DEV__ && profilerStartTime = -1; workInProgressRootSkippedLanes |= workInProgress.lanes; if (0 === (renderLanes & workInProgress.childLanes)) - if (enableLazyContextPropagation && null !== current) { + if (null !== current) { if ( (propagateParentContextChanges( current, @@ -8119,12 +8112,9 @@ __DEV__ && return workInProgress.child; } function checkScheduledUpdateOrContext(current, renderLanes) { - return 0 !== (current.lanes & renderLanes) || - (enableLazyContextPropagation && - ((current = current.dependencies), - null !== current && checkIfContextChanged(current))) - ? !0 - : !1; + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; } function attemptEarlyBailoutIfNoScheduledUpdate( current, @@ -8197,8 +8187,7 @@ __DEV__ && case 19: var didSuspendBefore = 0 !== (current.flags & 128); stateNode = 0 !== (renderLanes & workInProgress.childLanes); - enableLazyContextPropagation && - !stateNode && + stateNode || (propagateParentContextChanges( current, workInProgress, @@ -8418,7 +8407,12 @@ __DEV__ && var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); nextCache !== prevSibling.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); prevSibling = nextProps.element; prevSibling === returnFiber @@ -8450,16 +8444,7 @@ __DEV__ && null, renderLanes )), - (HostTransitionContext._currentValue2 = prevSibling), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== prevSibling && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), + (HostTransitionContext._currentValue2 = prevSibling)), markRef(current, workInProgress), reconcileChildren( current, @@ -8539,46 +8524,25 @@ __DEV__ && workInProgress.child ); case 10: - a: { - returnFiber = workInProgress.type; - prevSibling = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextCache = prevSibling.value; + return ( + (returnFiber = workInProgress.type), + (prevSibling = workInProgress.pendingProps), + (nextProps = prevSibling.value), "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), error$jscomp$0( "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" - )); - pushProvider(workInProgress, returnFiber, nextCache); - if (!enableLazyContextPropagation && null !== nextProps) - if (objectIs(nextProps.value, nextCache)) { - if ( - nextProps.children === prevSibling.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange( - workInProgress, - returnFiber, - renderLanes - ); + )), + pushProvider(workInProgress, returnFiber, nextProps), reconcileChildren( current, workInProgress, prevSibling.children, renderLanes - ); - workInProgress = workInProgress.child; - } - return workInProgress; + ), + workInProgress.child + ); case 9: return ( (prevSibling = workInProgress.type._context), @@ -8587,7 +8551,7 @@ __DEV__ && error$jscomp$0( "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." ), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (prevSibling = readContext(prevSibling)), markComponentRenderStarted(workInProgress), (returnFiber = callComponentInDEV( @@ -8633,7 +8597,7 @@ __DEV__ && isContextProvider(returnFiber) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, returnFiber, prevSibling), mountClassInstance( workInProgress, @@ -8677,7 +8641,7 @@ __DEV__ && return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (returnFiber = readContext(CacheContext)), null === current ? ((prevSibling = peekCacheFromPool()), @@ -8715,10 +8679,11 @@ __DEV__ && : ((returnFiber = nextProps.cache), pushProvider(workInProgress, CacheContext, returnFiber), returnFiber !== prevSibling.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -8784,147 +8749,69 @@ __DEV__ && "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." ); } - function propagateContextChange(workInProgress, context, renderLanes) { - if (enableLazyContextPropagation) - propagateContextChanges(workInProgress, [context], renderLanes, !0); - else if (!enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = ForceUpdate; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } - } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); scheduleContextWorkOnParentPath( - fiber.return, + list.return, renderLanes, workInProgress ); - list.lanes |= renderLanes; - break; + forcePropagateEntireTree || (nextFiber = null); + break a; } - dependency = dependency.next; - } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." ); - nextFiber = fiber.sibling; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - if (enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; } - fiber = nextFiber; - } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } function propagateParentContextChanges( @@ -8933,56 +8820,49 @@ __DEV__ && renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error( - "Should have a current fiber. This is a bug in React." - ); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error( - "Should have a current fiber. This is a bug in React." - ); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); + ? current.push(context) + : (current = [context])); } - parent = parent.return; + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } function checkIfContextChanged(currentDependencies) { - if (!enableLazyContextPropagation) return !1; for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; @@ -8999,17 +8879,11 @@ __DEV__ && } return !1; } - function prepareToReadContext(workInProgress, renderLanes) { + function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - (enableLazyContextPropagation - ? (workInProgress.firstContext = null) - : null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && - (didReceiveUpdate = !0), - (workInProgress.firstContext = null))); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { isDisallowedContextReadInDEV && @@ -9018,9 +8892,8 @@ __DEV__ && ); return readContextForConsumer(currentlyRenderingFiber, context); } - function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -9040,7 +8913,7 @@ __DEV__ && firstContext: context, _debugThenableState: null }; - enableLazyContextPropagation && (consumer.flags |= 524288); + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -14356,8 +14229,6 @@ __DEV__ && enableShallowPropDiffing = dynamicFlagsUntyped.enableShallowPropDiffing, passChildrenWhenCloningPersistedNodes = dynamicFlagsUntyped.passChildrenWhenCloningPersistedNodes, - enableLazyContextPropagation = - dynamicFlagsUntyped.enableLazyContextPropagation, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE, @@ -17094,11 +16965,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926" + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index 8548c614f14de..12e12e410c419 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<67480e2bc247379a155ba78313ed5216>> */ "use strict"; @@ -29,8 +29,6 @@ var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/R enableShallowPropDiffing = dynamicFlagsUntyped.enableShallowPropDiffing, passChildrenWhenCloningPersistedNodes = dynamicFlagsUntyped.passChildrenWhenCloningPersistedNodes, - enableLazyContextPropagation = - dynamicFlagsUntyped.enableLazyContextPropagation, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering, ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, @@ -1233,7 +1231,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_288 = { +var injectedNamesToPlugins$jscomp$inline_287 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -1279,32 +1277,32 @@ var injectedNamesToPlugins$jscomp$inline_288 = { } } }, - isOrderingDirty$jscomp$inline_289 = !1, - pluginName$jscomp$inline_290; -for (pluginName$jscomp$inline_290 in injectedNamesToPlugins$jscomp$inline_288) + isOrderingDirty$jscomp$inline_288 = !1, + pluginName$jscomp$inline_289; +for (pluginName$jscomp$inline_289 in injectedNamesToPlugins$jscomp$inline_287) if ( - injectedNamesToPlugins$jscomp$inline_288.hasOwnProperty( - pluginName$jscomp$inline_290 + injectedNamesToPlugins$jscomp$inline_287.hasOwnProperty( + pluginName$jscomp$inline_289 ) ) { - var pluginModule$jscomp$inline_291 = - injectedNamesToPlugins$jscomp$inline_288[pluginName$jscomp$inline_290]; + var pluginModule$jscomp$inline_290 = + injectedNamesToPlugins$jscomp$inline_287[pluginName$jscomp$inline_289]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_290) || - namesToPlugins[pluginName$jscomp$inline_290] !== - pluginModule$jscomp$inline_291 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_289) || + namesToPlugins[pluginName$jscomp$inline_289] !== + pluginModule$jscomp$inline_290 ) { - if (namesToPlugins[pluginName$jscomp$inline_290]) + if (namesToPlugins[pluginName$jscomp$inline_289]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_290 + "`.") + (pluginName$jscomp$inline_289 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_290] = - pluginModule$jscomp$inline_291; - isOrderingDirty$jscomp$inline_289 = !0; + namesToPlugins[pluginName$jscomp$inline_289] = + pluginModule$jscomp$inline_290; + isOrderingDirty$jscomp$inline_288 = !0; } } -isOrderingDirty$jscomp$inline_289 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_288 && recomputePluginOrdering(); var emptyObject$1 = {}, removedKeys = null, removedKeyCount = 0, @@ -3064,7 +3062,7 @@ function createChildReconciler(shouldTrackSideEffects) { if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3113,7 +3111,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3183,7 +3181,7 @@ function createChildReconciler(shouldTrackSideEffects) { existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3510,7 +3508,7 @@ function createChildReconciler(shouldTrackSideEffects) { return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3703,9 +3701,8 @@ function finishRenderingHooks(current) { throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." ); - enableLazyContextPropagation && - null !== current && - !didReceiveUpdate && + null === current || + didReceiveUpdate || ((current = current.dependencies), null !== current && checkIfContextChanged(current) && @@ -5176,16 +5173,14 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); currentSourceFiber = sourceFiber.tag; 0 !== (sourceFiber.mode & 1) || (0 !== currentSourceFiber && @@ -5360,7 +5355,7 @@ function updateForwardRef( for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); nextProps = renderWithHooks( current, workInProgress, @@ -5544,8 +5539,7 @@ function deferHiddenOffscreenComponent( null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(); pushOffscreenSuspenseHandler(workInProgress); - enableLazyContextPropagation && - null !== current && + null !== current && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } @@ -5575,7 +5569,7 @@ function updateFunctionComponent( ? previousContext : contextStackCursor$1.current; context = getMaskedContext(workInProgress, context); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); Component = renderWithHooks( current, workInProgress, @@ -5601,7 +5595,7 @@ function replayFunctionComponent( secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); workInProgress.updateQueue = null; nextProps = renderWithHooksAgain( workInProgress, @@ -5630,7 +5624,7 @@ function updateClassComponent( var hasContext = !0; pushContextProvider(workInProgress); } else hasContext = !1; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -5751,8 +5745,7 @@ function updateClassComponent( unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && @@ -5774,8 +5767,7 @@ function updateClassComponent( newState, oldContext ) || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || @@ -6020,8 +6012,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )); else if ( - (enableLazyContextPropagation && - !didReceiveUpdate && + (didReceiveUpdate || propagateParentContextChanges(current, workInProgress, renderLanes, !1), (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), didReceiveUpdate || JSCompiler_temp) @@ -6360,7 +6351,7 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { null !== current && (workInProgress.dependencies = current.dependencies); workInProgressRootSkippedLanes |= workInProgress.lanes; if (0 === (renderLanes & workInProgress.childLanes)) - if (enableLazyContextPropagation && null !== current) { + if (null !== current) { if ( (propagateParentContextChanges( current, @@ -6388,12 +6379,9 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { return workInProgress.child; } function checkScheduledUpdateOrContext(current, renderLanes) { - return 0 !== (current.lanes & renderLanes) || - (enableLazyContextPropagation && - ((current = current.dependencies), - null !== current && checkIfContextChanged(current))) - ? !0 - : !1; + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; } function attemptEarlyBailoutIfNoScheduledUpdate( current, @@ -6447,8 +6435,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 19: var didSuspendBefore = 0 !== (current.flags & 128); state = 0 !== (renderLanes & workInProgress.childLanes); - enableLazyContextPropagation && - !state && + state || (propagateParentContextChanges( current, workInProgress, @@ -6606,7 +6593,12 @@ function beginWork(current, workInProgress, renderLanes) { var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); nextCache !== init.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); init = nextProps.element; init === elementType @@ -6633,16 +6625,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue2 = init), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== init && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), + (HostTransitionContext._currentValue2 = init)), markRef(current, workInProgress), reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child @@ -6712,36 +6695,22 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - a: { - elementType = workInProgress.type; - init = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextCache = init.value; - pushProvider(workInProgress, elementType, nextCache); - if (!enableLazyContextPropagation && null !== nextProps) - if (objectIs(nextProps.value, nextCache)) { - if ( - nextProps.children === init.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); - workInProgress = workInProgress.child; - } - return workInProgress; + return ( + (elementType = workInProgress.pendingProps), + pushProvider(workInProgress, workInProgress.type, elementType.value), + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ), + workInProgress.child + ); case 9: return ( (init = workInProgress.type._context), (elementType = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (init = readContext(init)), (elementType = elementType(init)), (workInProgress.flags |= 1), @@ -6776,7 +6745,7 @@ function beginWork(current, workInProgress, renderLanes) { isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, elementType, init), mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( @@ -6811,7 +6780,7 @@ function beginWork(current, workInProgress, renderLanes) { return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), @@ -6845,10 +6814,11 @@ function beginWork(current, workInProgress, renderLanes) { : ((elementType = nextProps.cache), pushProvider(workInProgress, CacheContext, elementType), elementType !== init.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -6898,139 +6868,65 @@ function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { parent = parent.return; } } -function propagateContextChange(workInProgress, context, renderLanes) { - if (enableLazyContextPropagation) - propagateContextChanges(workInProgress, [context], renderLanes, !0); - else if (!enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = 2; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } - } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - fiber.return, - renderLanes, - workInProgress - ); - list.lanes |= renderLanes; - break; - } - dependency = dependency.next; - } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = fiber.sibling; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } -} function propagateContextChanges( workInProgress, contexts, renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; } - nextFiber = nextFiber.return; + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; } - fiber = nextFiber; - } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } function propagateParentContextChanges( @@ -7039,50 +6935,47 @@ function propagateParentContextChanges( renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); } - parent = parent.return; + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } function checkIfContextChanged(currentDependencies) { - if (!enableLazyContextPropagation) return !1; for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; @@ -7099,23 +6992,17 @@ function checkIfContextChanged(currentDependencies) { } return !1; } -function prepareToReadContext(workInProgress, renderLanes) { +function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - (enableLazyContextPropagation - ? (workInProgress.firstContext = null) - : null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0), - (workInProgress.firstContext = null))); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { return readContextForConsumer(currentlyRenderingFiber, context); } -function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -7131,7 +7018,7 @@ function readContextForConsumer(consumer, context) { ); lastContextDependency = context; consumer.dependencies = { lanes: 0, firstContext: context }; - enableLazyContextPropagation && (consumer.flags |= 524288); + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -7346,14 +7233,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$95 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$95 = lastTailNode), + for (var lastTailNode$94 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$94 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$95 + null === lastTailNode$94 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$95.sibling = null); + : (lastTailNode$94.sibling = null); } } function bubbleProperties(completedWork) { @@ -7363,19 +7250,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$96 = completedWork.child; null !== child$96; ) - (newChildLanes |= child$96.lanes | child$96.childLanes), - (subtreeFlags |= child$96.subtreeFlags & 31457280), - (subtreeFlags |= child$96.flags & 31457280), - (child$96.return = completedWork), - (child$96 = child$96.sibling); + for (var child$95 = completedWork.child; null !== child$95; ) + (newChildLanes |= child$95.lanes | child$95.childLanes), + (subtreeFlags |= child$95.subtreeFlags & 31457280), + (subtreeFlags |= child$95.flags & 31457280), + (child$95.return = completedWork), + (child$95 = child$95.sibling); else - for (child$96 = completedWork.child; null !== child$96; ) - (newChildLanes |= child$96.lanes | child$96.childLanes), - (subtreeFlags |= child$96.subtreeFlags), - (subtreeFlags |= child$96.flags), - (child$96.return = completedWork), - (child$96 = child$96.sibling); + for (child$95 = completedWork.child; null !== child$95; ) + (newChildLanes |= child$95.lanes | child$95.childLanes), + (subtreeFlags |= child$95.subtreeFlags), + (subtreeFlags |= child$95.flags), + (child$95.return = completedWork), + (child$95 = child$95.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7885,9 +7772,9 @@ function commitHookEffectListMount(flags, finishedWork) { do { if ((updateQueue.tag & flags) === flags) { lastEffect = void 0; - var create$118 = updateQueue.create, + var create$117 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$118(); + lastEffect = create$117(); inst.destroy = lastEffect; } updateQueue = updateQueue.next; @@ -8000,8 +7887,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$120) { - captureCommitPhaseError(current, nearestMountedAncestor, error$120); + } catch (error$119) { + captureCommitPhaseError(current, nearestMountedAncestor, error$119); } else ref.current = null; } @@ -8135,11 +8022,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$119) { + } catch (error$118) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$119 + error$118 ); } } @@ -9728,8 +9615,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$133) { - handleThrow(root, thrownValue$133); + } catch (thrownValue$132) { + handleThrow(root, thrownValue$132); } while (1); lanes && root.shellSuspendCounter++; @@ -9842,8 +9729,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$135) { - handleThrow(root, thrownValue$135); + } catch (thrownValue$134) { + handleThrow(root, thrownValue$134); } while (1); resetContextDependencies(); @@ -11023,27 +10910,27 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1190 = { + internals$jscomp$inline_1167 = { bundleType: 0, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926" + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1190.rendererConfig = extraDevToolsConfig); + (internals$jscomp$inline_1167.rendererConfig = extraDevToolsConfig); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1487 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1474 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1487.isDisabled && - hook$jscomp$inline_1487.supportsFiber + !hook$jscomp$inline_1474.isDisabled && + hook$jscomp$inline_1474.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1487.inject( - internals$jscomp$inline_1190 + (rendererID = hook$jscomp$inline_1474.inject( + internals$jscomp$inline_1167 )), - (injectedHook = hook$jscomp$inline_1487); + (injectedHook = hook$jscomp$inline_1474); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index 1de87467705e3..f8c3c58a594e3 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<7b98758431b6dfa1e1e8ef49463c3242>> + * @generated SignedSource<> */ "use strict"; @@ -33,8 +33,6 @@ var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/R enableShallowPropDiffing = dynamicFlagsUntyped.enableShallowPropDiffing, passChildrenWhenCloningPersistedNodes = dynamicFlagsUntyped.passChildrenWhenCloningPersistedNodes, - enableLazyContextPropagation = - dynamicFlagsUntyped.enableLazyContextPropagation, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering, ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, @@ -1237,7 +1235,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_304 = { +var injectedNamesToPlugins$jscomp$inline_303 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -1283,32 +1281,32 @@ var injectedNamesToPlugins$jscomp$inline_304 = { } } }, - isOrderingDirty$jscomp$inline_305 = !1, - pluginName$jscomp$inline_306; -for (pluginName$jscomp$inline_306 in injectedNamesToPlugins$jscomp$inline_304) + isOrderingDirty$jscomp$inline_304 = !1, + pluginName$jscomp$inline_305; +for (pluginName$jscomp$inline_305 in injectedNamesToPlugins$jscomp$inline_303) if ( - injectedNamesToPlugins$jscomp$inline_304.hasOwnProperty( - pluginName$jscomp$inline_306 + injectedNamesToPlugins$jscomp$inline_303.hasOwnProperty( + pluginName$jscomp$inline_305 ) ) { - var pluginModule$jscomp$inline_307 = - injectedNamesToPlugins$jscomp$inline_304[pluginName$jscomp$inline_306]; + var pluginModule$jscomp$inline_306 = + injectedNamesToPlugins$jscomp$inline_303[pluginName$jscomp$inline_305]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_306) || - namesToPlugins[pluginName$jscomp$inline_306] !== - pluginModule$jscomp$inline_307 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_305) || + namesToPlugins[pluginName$jscomp$inline_305] !== + pluginModule$jscomp$inline_306 ) { - if (namesToPlugins[pluginName$jscomp$inline_306]) + if (namesToPlugins[pluginName$jscomp$inline_305]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_306 + "`.") + (pluginName$jscomp$inline_305 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_306] = - pluginModule$jscomp$inline_307; - isOrderingDirty$jscomp$inline_305 = !0; + namesToPlugins[pluginName$jscomp$inline_305] = + pluginModule$jscomp$inline_306; + isOrderingDirty$jscomp$inline_304 = !0; } } -isOrderingDirty$jscomp$inline_305 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_304 && recomputePluginOrdering(); var emptyObject$1 = {}, removedKeys = null, removedKeyCount = 0, @@ -3220,7 +3218,7 @@ function createChildReconciler(shouldTrackSideEffects) { if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3269,7 +3267,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3339,7 +3337,7 @@ function createChildReconciler(shouldTrackSideEffects) { existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3666,7 +3664,7 @@ function createChildReconciler(shouldTrackSideEffects) { return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3859,9 +3857,8 @@ function finishRenderingHooks(current) { throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." ); - enableLazyContextPropagation && - null !== current && - !didReceiveUpdate && + null === current || + didReceiveUpdate || ((current = current.dependencies), null !== current && checkIfContextChanged(current) && @@ -5341,16 +5338,14 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); currentSourceFiber = sourceFiber.tag; 0 !== (sourceFiber.mode & 1) || (0 !== currentSourceFiber && @@ -5525,7 +5520,7 @@ function updateForwardRef( for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); nextProps = renderWithHooks( current, @@ -5711,8 +5706,7 @@ function deferHiddenOffscreenComponent( null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(); pushOffscreenSuspenseHandler(workInProgress); - enableLazyContextPropagation && - null !== current && + null !== current && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } @@ -5742,7 +5736,7 @@ function updateFunctionComponent( ? previousContext : contextStackCursor$1.current; context = getMaskedContext(workInProgress, context); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); Component = renderWithHooks( current, @@ -5770,7 +5764,7 @@ function replayFunctionComponent( secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); workInProgress.updateQueue = null; nextProps = renderWithHooksAgain( @@ -5801,7 +5795,7 @@ function updateClassComponent( var hasContext = !0; pushContextProvider(workInProgress); } else hasContext = !1; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -5922,8 +5916,7 @@ function updateClassComponent( unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && @@ -5945,8 +5938,7 @@ function updateClassComponent( newState, oldContext ) || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || @@ -6198,8 +6190,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )); else if ( - (enableLazyContextPropagation && - !didReceiveUpdate && + (didReceiveUpdate || propagateParentContextChanges(current, workInProgress, renderLanes, !1), (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), didReceiveUpdate || JSCompiler_temp) @@ -6549,7 +6540,7 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { profilerStartTime = -1; workInProgressRootSkippedLanes |= workInProgress.lanes; if (0 === (renderLanes & workInProgress.childLanes)) - if (enableLazyContextPropagation && null !== current) { + if (null !== current) { if ( (propagateParentContextChanges( current, @@ -6577,12 +6568,9 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { return workInProgress.child; } function checkScheduledUpdateOrContext(current, renderLanes) { - return 0 !== (current.lanes & renderLanes) || - (enableLazyContextPropagation && - ((current = current.dependencies), - null !== current && checkIfContextChanged(current))) - ? !0 - : !1; + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; } function attemptEarlyBailoutIfNoScheduledUpdate( current, @@ -6644,8 +6632,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 19: var didSuspendBefore = 0 !== (current.flags & 128); stateNode = 0 !== (renderLanes & workInProgress.childLanes); - enableLazyContextPropagation && - !stateNode && + stateNode || (propagateParentContextChanges( current, workInProgress, @@ -6803,7 +6790,12 @@ function beginWork(current, workInProgress, renderLanes) { var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); nextCache !== init.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); init = nextProps.element; init === elementType @@ -6830,16 +6822,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue2 = init), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== init && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), + (HostTransitionContext._currentValue2 = init)), markRef(current, workInProgress), reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child @@ -6914,36 +6897,22 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - a: { - elementType = workInProgress.type; - init = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextCache = init.value; - pushProvider(workInProgress, elementType, nextCache); - if (!enableLazyContextPropagation && null !== nextProps) - if (objectIs(nextProps.value, nextCache)) { - if ( - nextProps.children === init.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); - workInProgress = workInProgress.child; - } - return workInProgress; + return ( + (elementType = workInProgress.pendingProps), + pushProvider(workInProgress, workInProgress.type, elementType.value), + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ), + workInProgress.child + ); case 9: return ( (init = workInProgress.type._context), (elementType = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (init = readContext(init)), markComponentRenderStarted(workInProgress), (elementType = elementType(init)), @@ -6980,7 +6949,7 @@ function beginWork(current, workInProgress, renderLanes) { isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, elementType, init), mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( @@ -7015,7 +6984,7 @@ function beginWork(current, workInProgress, renderLanes) { return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), @@ -7049,10 +7018,11 @@ function beginWork(current, workInProgress, renderLanes) { : ((elementType = nextProps.cache), pushProvider(workInProgress, CacheContext, elementType), elementType !== init.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -7102,139 +7072,65 @@ function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { parent = parent.return; } } -function propagateContextChange(workInProgress, context, renderLanes) { - if (enableLazyContextPropagation) - propagateContextChanges(workInProgress, [context], renderLanes, !0); - else if (!enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = 2; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } - } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - fiber.return, - renderLanes, - workInProgress - ); - list.lanes |= renderLanes; - break; - } - dependency = dependency.next; - } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = fiber.sibling; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } -} function propagateContextChanges( workInProgress, contexts, renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; } - nextFiber = nextFiber.return; + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; } - fiber = nextFiber; - } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } function propagateParentContextChanges( @@ -7243,50 +7139,47 @@ function propagateParentContextChanges( renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); } - parent = parent.return; + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } function checkIfContextChanged(currentDependencies) { - if (!enableLazyContextPropagation) return !1; for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; @@ -7303,23 +7196,17 @@ function checkIfContextChanged(currentDependencies) { } return !1; } -function prepareToReadContext(workInProgress, renderLanes) { +function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - (enableLazyContextPropagation - ? (workInProgress.firstContext = null) - : null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0), - (workInProgress.firstContext = null))); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { return readContextForConsumer(currentlyRenderingFiber, context); } -function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -7335,7 +7222,7 @@ function readContextForConsumer(consumer, context) { ); lastContextDependency = context; consumer.dependencies = { lanes: 0, firstContext: context }; - enableLazyContextPropagation && (consumer.flags |= 524288); + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -7550,14 +7437,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$98 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$98 = lastTailNode), + for (var lastTailNode$97 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$97 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$98 + null === lastTailNode$97 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$98.sibling = null); + : (lastTailNode$97.sibling = null); } } function bubbleProperties(completedWork) { @@ -7569,53 +7456,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$100 = completedWork.selfBaseDuration, - child$101 = completedWork.child; - null !== child$101; + var treeBaseDuration$99 = completedWork.selfBaseDuration, + child$100 = completedWork.child; + null !== child$100; ) - (newChildLanes |= child$101.lanes | child$101.childLanes), - (subtreeFlags |= child$101.subtreeFlags & 31457280), - (subtreeFlags |= child$101.flags & 31457280), - (treeBaseDuration$100 += child$101.treeBaseDuration), - (child$101 = child$101.sibling); - completedWork.treeBaseDuration = treeBaseDuration$100; + (newChildLanes |= child$100.lanes | child$100.childLanes), + (subtreeFlags |= child$100.subtreeFlags & 31457280), + (subtreeFlags |= child$100.flags & 31457280), + (treeBaseDuration$99 += child$100.treeBaseDuration), + (child$100 = child$100.sibling); + completedWork.treeBaseDuration = treeBaseDuration$99; } else for ( - treeBaseDuration$100 = completedWork.child; - null !== treeBaseDuration$100; + treeBaseDuration$99 = completedWork.child; + null !== treeBaseDuration$99; ) (newChildLanes |= - treeBaseDuration$100.lanes | treeBaseDuration$100.childLanes), - (subtreeFlags |= treeBaseDuration$100.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$100.flags & 31457280), - (treeBaseDuration$100.return = completedWork), - (treeBaseDuration$100 = treeBaseDuration$100.sibling); + treeBaseDuration$99.lanes | treeBaseDuration$99.childLanes), + (subtreeFlags |= treeBaseDuration$99.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$99.flags & 31457280), + (treeBaseDuration$99.return = completedWork), + (treeBaseDuration$99 = treeBaseDuration$99.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$100 = completedWork.actualDuration; - child$101 = completedWork.selfBaseDuration; + treeBaseDuration$99 = completedWork.actualDuration; + child$100 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$100 += child.actualDuration), - (child$101 += child.treeBaseDuration), + (treeBaseDuration$99 += child.actualDuration), + (child$100 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$100; - completedWork.treeBaseDuration = child$101; + completedWork.actualDuration = treeBaseDuration$99; + completedWork.treeBaseDuration = child$100; } else for ( - treeBaseDuration$100 = completedWork.child; - null !== treeBaseDuration$100; + treeBaseDuration$99 = completedWork.child; + null !== treeBaseDuration$99; ) (newChildLanes |= - treeBaseDuration$100.lanes | treeBaseDuration$100.childLanes), - (subtreeFlags |= treeBaseDuration$100.subtreeFlags), - (subtreeFlags |= treeBaseDuration$100.flags), - (treeBaseDuration$100.return = completedWork), - (treeBaseDuration$100 = treeBaseDuration$100.sibling); + treeBaseDuration$99.lanes | treeBaseDuration$99.childLanes), + (subtreeFlags |= treeBaseDuration$99.subtreeFlags), + (subtreeFlags |= treeBaseDuration$99.flags), + (treeBaseDuration$99.return = completedWork), + (treeBaseDuration$99 = treeBaseDuration$99.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8192,9 +8079,9 @@ function commitHookEffectListMount(flags, finishedWork) { finishedWork ); lastEffect = void 0; - var create$126 = updateQueue.create, + var create$125 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$126(); + lastEffect = create$125(); inst.destroy = lastEffect; 0 !== (flags & 8) ? null !== injectedProfilingHooks && @@ -8333,8 +8220,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$130) { - captureCommitPhaseError(current, nearestMountedAncestor, error$130); + } catch (error$129) { + captureCommitPhaseError(current, nearestMountedAncestor, error$129); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -8394,8 +8281,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$131) { - captureCommitPhaseError(current, nearestMountedAncestor, error$131); + } catch (error$130) { + captureCommitPhaseError(current, nearestMountedAncestor, error$130); } else ref.current = null; } @@ -8558,11 +8445,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$127) { + } catch (error$126) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$127 + error$126 ); } else { @@ -8579,11 +8466,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$128) { + } catch (error$127) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$128 + error$127 ); } recordEffectDuration(); @@ -8594,11 +8481,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$129) { + } catch (error$128) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$129 + error$128 ); } } @@ -10297,8 +10184,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$148) { - handleThrow(root, thrownValue$148); + } catch (thrownValue$147) { + handleThrow(root, thrownValue$147); } while (1); lanes && root.shellSuspendCounter++; @@ -10419,8 +10306,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$150) { - handleThrow(root, thrownValue$150); + } catch (thrownValue$149) { + handleThrow(root, thrownValue$149); } while (1); resetContextDependencies(); @@ -11679,21 +11566,21 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1278 = { + internals$jscomp$inline_1255 = { bundleType: 0, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926" + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1278.rendererConfig = extraDevToolsConfig); -internals$jscomp$inline_1278.getLaneLabelMap = function () { + (internals$jscomp$inline_1255.rendererConfig = extraDevToolsConfig); +internals$jscomp$inline_1255.getLaneLabelMap = function () { for ( - var map = new Map(), lane = 1, index$154 = 0; - 31 > index$154; - index$154++ + var map = new Map(), lane = 1, index$153 = 0; + 31 > index$153; + index$153++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -11701,20 +11588,20 @@ internals$jscomp$inline_1278.getLaneLabelMap = function () { } return map; }; -internals$jscomp$inline_1278.injectProfilingHooks = function (profilingHooks) { +internals$jscomp$inline_1255.injectProfilingHooks = function (profilingHooks) { injectedProfilingHooks = profilingHooks; }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1538 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1525 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1538.isDisabled && - hook$jscomp$inline_1538.supportsFiber + !hook$jscomp$inline_1525.isDisabled && + hook$jscomp$inline_1525.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1538.inject( - internals$jscomp$inline_1278 + (rendererID = hook$jscomp$inline_1525.inject( + internals$jscomp$inline_1255 )), - (injectedHook = hook$jscomp$inline_1538); + (injectedHook = hook$jscomp$inline_1525); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index 307a1c1ef2d1c..ac6129b07d09e 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<0dc549af86c7d2d7c6a05e3de1aa1620>> + * @generated SignedSource<<973a17312d1a99f4bbeef896b14f67d3>> */ "use strict"; @@ -3927,7 +3927,7 @@ __DEV__ && if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -4008,7 +4008,7 @@ __DEV__ && return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -4105,7 +4105,7 @@ __DEV__ && existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -4582,7 +4582,7 @@ __DEV__ && return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -4936,9 +4936,8 @@ __DEV__ && throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." ); - enableLazyContextPropagation && - null !== current && - !didReceiveUpdate && + null === current || + didReceiveUpdate || ((current = current.dependencies), null !== current && checkIfContextChanged(current) && @@ -6824,16 +6823,14 @@ __DEV__ && "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); currentSourceFiber = sourceFiber.tag; 0 !== (sourceFiber.mode & 1) || (0 !== currentSourceFiber && @@ -7015,7 +7012,7 @@ __DEV__ && for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); nextProps = renderWithHooks( current, @@ -7219,8 +7216,7 @@ __DEV__ && null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(workInProgress); pushOffscreenSuspenseHandler(workInProgress); - enableLazyContextPropagation && - null !== current && + null !== current && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } @@ -7278,7 +7274,7 @@ __DEV__ && ? previousContext : contextStackCursor$1.current; componentName = getMaskedContext(workInProgress, componentName); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); Component = renderWithHooks( current, @@ -7306,7 +7302,7 @@ __DEV__ && secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); hookTypesUpdateIndexDev = -1; ignorePreviousDependencies = @@ -7368,7 +7364,7 @@ __DEV__ && isContextProvider(Component) ? ((_instance = !0), pushContextProvider(workInProgress)) : (_instance = !1); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -7495,8 +7491,7 @@ __DEV__ && unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && @@ -7518,8 +7513,7 @@ __DEV__ && newState, oldContext ) || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || @@ -7852,8 +7846,7 @@ __DEV__ && renderLanes )); else if ( - (enableLazyContextPropagation && - !didReceiveUpdate && + (didReceiveUpdate || propagateParentContextChanges( current, workInProgress, @@ -8315,7 +8308,7 @@ __DEV__ && profilerStartTime = -1; workInProgressRootSkippedLanes |= workInProgress.lanes; if (0 === (renderLanes & workInProgress.childLanes)) - if (enableLazyContextPropagation && null !== current) { + if (null !== current) { if ( (propagateParentContextChanges( current, @@ -8343,12 +8336,9 @@ __DEV__ && return workInProgress.child; } function checkScheduledUpdateOrContext(current, renderLanes) { - return 0 !== (current.lanes & renderLanes) || - (enableLazyContextPropagation && - ((current = current.dependencies), - null !== current && checkIfContextChanged(current))) - ? !0 - : !1; + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; } function attemptEarlyBailoutIfNoScheduledUpdate( current, @@ -8421,8 +8411,7 @@ __DEV__ && case 19: var didSuspendBefore = 0 !== (current.flags & 128); stateNode = 0 !== (renderLanes & workInProgress.childLanes); - enableLazyContextPropagation && - !stateNode && + stateNode || (propagateParentContextChanges( current, workInProgress, @@ -8642,7 +8631,12 @@ __DEV__ && var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); nextCache !== prevSibling.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); prevSibling = nextProps.element; prevSibling === returnFiber @@ -8674,16 +8668,7 @@ __DEV__ && null, renderLanes )), - (HostTransitionContext._currentValue = prevSibling), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== prevSibling && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), + (HostTransitionContext._currentValue = prevSibling)), markRef(current, workInProgress), reconcileChildren( current, @@ -8763,46 +8748,25 @@ __DEV__ && workInProgress.child ); case 10: - a: { - returnFiber = workInProgress.type; - prevSibling = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextCache = prevSibling.value; + return ( + (returnFiber = workInProgress.type), + (prevSibling = workInProgress.pendingProps), + (nextProps = prevSibling.value), "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), error$jscomp$0( "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" - )); - pushProvider(workInProgress, returnFiber, nextCache); - if (!enableLazyContextPropagation && null !== nextProps) - if (objectIs(nextProps.value, nextCache)) { - if ( - nextProps.children === prevSibling.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange( - workInProgress, - returnFiber, - renderLanes - ); + )), + pushProvider(workInProgress, returnFiber, nextProps), reconcileChildren( current, workInProgress, prevSibling.children, renderLanes - ); - workInProgress = workInProgress.child; - } - return workInProgress; + ), + workInProgress.child + ); case 9: return ( (prevSibling = workInProgress.type._context), @@ -8811,7 +8775,7 @@ __DEV__ && error$jscomp$0( "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." ), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (prevSibling = readContext(prevSibling)), markComponentRenderStarted(workInProgress), (returnFiber = callComponentInDEV( @@ -8857,7 +8821,7 @@ __DEV__ && isContextProvider(returnFiber) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, returnFiber, prevSibling), mountClassInstance( workInProgress, @@ -8901,7 +8865,7 @@ __DEV__ && return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (returnFiber = readContext(CacheContext)), null === current ? ((prevSibling = peekCacheFromPool()), @@ -8939,10 +8903,11 @@ __DEV__ && : ((returnFiber = nextProps.cache), pushProvider(workInProgress, CacheContext, returnFiber), returnFiber !== prevSibling.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -9008,147 +8973,69 @@ __DEV__ && "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." ); } - function propagateContextChange(workInProgress, context, renderLanes) { - if (enableLazyContextPropagation) - propagateContextChanges(workInProgress, [context], renderLanes, !0); - else if (!enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = ForceUpdate; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } - } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); scheduleContextWorkOnParentPath( - fiber.return, + list.return, renderLanes, workInProgress ); - list.lanes |= renderLanes; - break; + forcePropagateEntireTree || (nextFiber = null); + break a; } - dependency = dependency.next; - } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." ); - nextFiber = fiber.sibling; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - if (enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; } - fiber = nextFiber; - } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } function propagateParentContextChanges( @@ -9157,56 +9044,49 @@ __DEV__ && renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error( - "Should have a current fiber. This is a bug in React." - ); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error( - "Should have a current fiber. This is a bug in React." - ); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); + ? current.push(context) + : (current = [context])); } - parent = parent.return; + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } function checkIfContextChanged(currentDependencies) { - if (!enableLazyContextPropagation) return !1; for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; @@ -9223,17 +9103,11 @@ __DEV__ && } return !1; } - function prepareToReadContext(workInProgress, renderLanes) { + function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - (enableLazyContextPropagation - ? (workInProgress.firstContext = null) - : null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && - (didReceiveUpdate = !0), - (workInProgress.firstContext = null))); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { isDisallowedContextReadInDEV && @@ -9242,9 +9116,8 @@ __DEV__ && ); return readContextForConsumer(currentlyRenderingFiber, context); } - function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -9264,7 +9137,7 @@ __DEV__ && firstContext: context, _debugThenableState: null }; - enableLazyContextPropagation && (consumer.flags |= 524288); + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -14495,8 +14368,6 @@ __DEV__ && enableObjectFiber = dynamicFlagsUntyped.enableObjectFiber, enablePersistedModeClonedFlag = dynamicFlagsUntyped.enablePersistedModeClonedFlag, - enableLazyContextPropagation = - dynamicFlagsUntyped.enableLazyContextPropagation, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE, @@ -17310,11 +17181,11 @@ __DEV__ && shouldSuspendImpl = newShouldSuspendImpl; }; var isomorphicReactPackageVersion = React.version; - if ("19.0.0-native-fb-d66fa02a-20240926" !== isomorphicReactPackageVersion) + if ("19.0.0-native-fb-60b1420f-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-native-fb-d66fa02a-20240926\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-native-fb-60b1420f-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -17340,11 +17211,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromTag, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926" + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index f52ccb2ada8b3..098fec206ec7b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<60dfc81558ce7508722776ed488c0c22>> */ "use strict"; @@ -23,8 +23,6 @@ var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/R enableObjectFiber = dynamicFlagsUntyped.enableObjectFiber, enablePersistedModeClonedFlag = dynamicFlagsUntyped.enablePersistedModeClonedFlag, - enableLazyContextPropagation = - dynamicFlagsUntyped.enableLazyContextPropagation, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering, ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, @@ -1227,7 +1225,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_295 = { +var injectedNamesToPlugins$jscomp$inline_294 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -1273,32 +1271,32 @@ var injectedNamesToPlugins$jscomp$inline_295 = { } } }, - isOrderingDirty$jscomp$inline_296 = !1, - pluginName$jscomp$inline_297; -for (pluginName$jscomp$inline_297 in injectedNamesToPlugins$jscomp$inline_295) + isOrderingDirty$jscomp$inline_295 = !1, + pluginName$jscomp$inline_296; +for (pluginName$jscomp$inline_296 in injectedNamesToPlugins$jscomp$inline_294) if ( - injectedNamesToPlugins$jscomp$inline_295.hasOwnProperty( - pluginName$jscomp$inline_297 + injectedNamesToPlugins$jscomp$inline_294.hasOwnProperty( + pluginName$jscomp$inline_296 ) ) { - var pluginModule$jscomp$inline_298 = - injectedNamesToPlugins$jscomp$inline_295[pluginName$jscomp$inline_297]; + var pluginModule$jscomp$inline_297 = + injectedNamesToPlugins$jscomp$inline_294[pluginName$jscomp$inline_296]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_297) || - namesToPlugins[pluginName$jscomp$inline_297] !== - pluginModule$jscomp$inline_298 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_296) || + namesToPlugins[pluginName$jscomp$inline_296] !== + pluginModule$jscomp$inline_297 ) { - if (namesToPlugins[pluginName$jscomp$inline_297]) + if (namesToPlugins[pluginName$jscomp$inline_296]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_297 + "`.") + (pluginName$jscomp$inline_296 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_297] = - pluginModule$jscomp$inline_298; - isOrderingDirty$jscomp$inline_296 = !0; + namesToPlugins[pluginName$jscomp$inline_296] = + pluginModule$jscomp$inline_297; + isOrderingDirty$jscomp$inline_295 = !0; } } -isOrderingDirty$jscomp$inline_296 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_295 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -3353,7 +3351,7 @@ function createChildReconciler(shouldTrackSideEffects) { if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3402,7 +3400,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3472,7 +3470,7 @@ function createChildReconciler(shouldTrackSideEffects) { existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3799,7 +3797,7 @@ function createChildReconciler(shouldTrackSideEffects) { return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3992,9 +3990,8 @@ function finishRenderingHooks(current) { throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." ); - enableLazyContextPropagation && - null !== current && - !didReceiveUpdate && + null === current || + didReceiveUpdate || ((current = current.dependencies), null !== current && checkIfContextChanged(current) && @@ -5465,16 +5462,14 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); currentSourceFiber = sourceFiber.tag; 0 !== (sourceFiber.mode & 1) || (0 !== currentSourceFiber && @@ -5649,7 +5644,7 @@ function updateForwardRef( for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); nextProps = renderWithHooks( current, workInProgress, @@ -5833,8 +5828,7 @@ function deferHiddenOffscreenComponent( null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(); pushOffscreenSuspenseHandler(workInProgress); - enableLazyContextPropagation && - null !== current && + null !== current && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } @@ -5864,7 +5858,7 @@ function updateFunctionComponent( ? previousContext : contextStackCursor$1.current; context = getMaskedContext(workInProgress, context); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); Component = renderWithHooks( current, workInProgress, @@ -5890,7 +5884,7 @@ function replayFunctionComponent( secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); workInProgress.updateQueue = null; nextProps = renderWithHooksAgain( workInProgress, @@ -5919,7 +5913,7 @@ function updateClassComponent( var hasContext = !0; pushContextProvider(workInProgress); } else hasContext = !1; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -6040,8 +6034,7 @@ function updateClassComponent( unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && @@ -6063,8 +6056,7 @@ function updateClassComponent( newState, oldContext ) || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || @@ -6309,8 +6301,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )); else if ( - (enableLazyContextPropagation && - !didReceiveUpdate && + (didReceiveUpdate || propagateParentContextChanges(current, workInProgress, renderLanes, !1), (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), didReceiveUpdate || JSCompiler_temp) @@ -6649,7 +6640,7 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { null !== current && (workInProgress.dependencies = current.dependencies); workInProgressRootSkippedLanes |= workInProgress.lanes; if (0 === (renderLanes & workInProgress.childLanes)) - if (enableLazyContextPropagation && null !== current) { + if (null !== current) { if ( (propagateParentContextChanges( current, @@ -6677,12 +6668,9 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { return workInProgress.child; } function checkScheduledUpdateOrContext(current, renderLanes) { - return 0 !== (current.lanes & renderLanes) || - (enableLazyContextPropagation && - ((current = current.dependencies), - null !== current && checkIfContextChanged(current))) - ? !0 - : !1; + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; } function attemptEarlyBailoutIfNoScheduledUpdate( current, @@ -6736,8 +6724,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 19: var didSuspendBefore = 0 !== (current.flags & 128); state = 0 !== (renderLanes & workInProgress.childLanes); - enableLazyContextPropagation && - !state && + state || (propagateParentContextChanges( current, workInProgress, @@ -6895,7 +6882,12 @@ function beginWork(current, workInProgress, renderLanes) { var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); nextCache !== init.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); init = nextProps.element; init === elementType @@ -6922,16 +6914,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = init), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== init && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), + (HostTransitionContext._currentValue = init)), markRef(current, workInProgress), reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child @@ -7001,36 +6984,22 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - a: { - elementType = workInProgress.type; - init = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextCache = init.value; - pushProvider(workInProgress, elementType, nextCache); - if (!enableLazyContextPropagation && null !== nextProps) - if (objectIs(nextProps.value, nextCache)) { - if ( - nextProps.children === init.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); - workInProgress = workInProgress.child; - } - return workInProgress; + return ( + (elementType = workInProgress.pendingProps), + pushProvider(workInProgress, workInProgress.type, elementType.value), + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ), + workInProgress.child + ); case 9: return ( (init = workInProgress.type._context), (elementType = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (init = readContext(init)), (elementType = elementType(init)), (workInProgress.flags |= 1), @@ -7065,7 +7034,7 @@ function beginWork(current, workInProgress, renderLanes) { isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, elementType, init), mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( @@ -7100,7 +7069,7 @@ function beginWork(current, workInProgress, renderLanes) { return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), @@ -7134,10 +7103,11 @@ function beginWork(current, workInProgress, renderLanes) { : ((elementType = nextProps.cache), pushProvider(workInProgress, CacheContext, elementType), elementType !== init.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -7187,139 +7157,65 @@ function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { parent = parent.return; } } -function propagateContextChange(workInProgress, context, renderLanes) { - if (enableLazyContextPropagation) - propagateContextChanges(workInProgress, [context], renderLanes, !0); - else if (!enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = 2; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } - } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - fiber.return, - renderLanes, - workInProgress - ); - list.lanes |= renderLanes; - break; - } - dependency = dependency.next; - } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = fiber.sibling; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } -} function propagateContextChanges( workInProgress, contexts, renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; } - nextFiber = nextFiber.return; + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; } - fiber = nextFiber; - } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } function propagateParentContextChanges( @@ -7328,50 +7224,47 @@ function propagateParentContextChanges( renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); } - parent = parent.return; + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } function checkIfContextChanged(currentDependencies) { - if (!enableLazyContextPropagation) return !1; for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; @@ -7388,23 +7281,17 @@ function checkIfContextChanged(currentDependencies) { } return !1; } -function prepareToReadContext(workInProgress, renderLanes) { +function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - (enableLazyContextPropagation - ? (workInProgress.firstContext = null) - : null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0), - (workInProgress.firstContext = null))); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { return readContextForConsumer(currentlyRenderingFiber, context); } -function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -7420,7 +7307,7 @@ function readContextForConsumer(consumer, context) { ); lastContextDependency = context; consumer.dependencies = { lanes: 0, firstContext: context }; - enableLazyContextPropagation && (consumer.flags |= 524288); + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -7516,14 +7403,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$95 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$95 = lastTailNode), + for (var lastTailNode$94 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$94 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$95 + null === lastTailNode$94 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$95.sibling = null); + : (lastTailNode$94.sibling = null); } } function bubbleProperties(completedWork) { @@ -7533,19 +7420,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$96 = completedWork.child; null !== child$96; ) - (newChildLanes |= child$96.lanes | child$96.childLanes), - (subtreeFlags |= child$96.subtreeFlags & 31457280), - (subtreeFlags |= child$96.flags & 31457280), - (child$96.return = completedWork), - (child$96 = child$96.sibling); + for (var child$95 = completedWork.child; null !== child$95; ) + (newChildLanes |= child$95.lanes | child$95.childLanes), + (subtreeFlags |= child$95.subtreeFlags & 31457280), + (subtreeFlags |= child$95.flags & 31457280), + (child$95.return = completedWork), + (child$95 = child$95.sibling); else - for (child$96 = completedWork.child; null !== child$96; ) - (newChildLanes |= child$96.lanes | child$96.childLanes), - (subtreeFlags |= child$96.subtreeFlags), - (subtreeFlags |= child$96.flags), - (child$96.return = completedWork), - (child$96 = child$96.sibling); + for (child$95 = completedWork.child; null !== child$95; ) + (newChildLanes |= child$95.lanes | child$95.childLanes), + (subtreeFlags |= child$95.subtreeFlags), + (subtreeFlags |= child$95.flags), + (child$95.return = completedWork), + (child$95 = child$95.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8006,9 +7893,9 @@ function commitHookEffectListMount(flags, finishedWork) { do { if ((updateQueue.tag & flags) === flags) { lastEffect = void 0; - var create$118 = updateQueue.create, + var create$117 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$118(); + lastEffect = create$117(); inst.destroy = lastEffect; } updateQueue = updateQueue.next; @@ -8121,8 +8008,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$120) { - captureCommitPhaseError(current, nearestMountedAncestor, error$120); + } catch (error$119) { + captureCommitPhaseError(current, nearestMountedAncestor, error$119); } else ref.current = null; } @@ -8336,11 +8223,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$119) { + } catch (error$118) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$119 + error$118 ); } } @@ -8969,12 +8856,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$121 = JSCompiler_inline_result.stateNode.containerInfo, - before$122 = getHostSibling(finishedWork); + var parent$120 = JSCompiler_inline_result.stateNode.containerInfo, + before$121 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$122, - parent$121 + before$121, + parent$120 ); break; default: @@ -10160,8 +10047,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$137) { - handleThrow(root, thrownValue$137); + } catch (thrownValue$136) { + handleThrow(root, thrownValue$136); } while (1); lanes && root.shellSuspendCounter++; @@ -10274,8 +10161,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$139) { - handleThrow(root, thrownValue$139); + } catch (thrownValue$138) { + handleThrow(root, thrownValue$138); } while (1); resetContextDependencies(); @@ -11155,11 +11042,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.0.0-native-fb-d66fa02a-20240926" !== isomorphicReactPackageVersion) +if ("19.0.0-native-fb-60b1420f-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-native-fb-d66fa02a-20240926\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-native-fb-60b1420f-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11206,27 +11093,27 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1256 = { + internals$jscomp$inline_1233 = { bundleType: 0, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromTag, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926" + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1256.rendererConfig = extraDevToolsConfig); + (internals$jscomp$inline_1233.rendererConfig = extraDevToolsConfig); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1578 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1565 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1578.isDisabled && - hook$jscomp$inline_1578.supportsFiber + !hook$jscomp$inline_1565.isDisabled && + hook$jscomp$inline_1565.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1578.inject( - internals$jscomp$inline_1256 + (rendererID = hook$jscomp$inline_1565.inject( + internals$jscomp$inline_1233 )), - (injectedHook = hook$jscomp$inline_1578); + (injectedHook = hook$jscomp$inline_1565); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index c5d55d9f60588..9c28c3389a3db 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<1e38f4594b748f26e8273d0f84779342>> */ "use strict"; @@ -27,8 +27,6 @@ var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/R enableObjectFiber = dynamicFlagsUntyped.enableObjectFiber, enablePersistedModeClonedFlag = dynamicFlagsUntyped.enablePersistedModeClonedFlag, - enableLazyContextPropagation = - dynamicFlagsUntyped.enableLazyContextPropagation, enableSiblingPrerendering = dynamicFlagsUntyped.enableSiblingPrerendering, ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, @@ -1231,7 +1229,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_311 = { +var injectedNamesToPlugins$jscomp$inline_310 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -1277,32 +1275,32 @@ var injectedNamesToPlugins$jscomp$inline_311 = { } } }, - isOrderingDirty$jscomp$inline_312 = !1, - pluginName$jscomp$inline_313; -for (pluginName$jscomp$inline_313 in injectedNamesToPlugins$jscomp$inline_311) + isOrderingDirty$jscomp$inline_311 = !1, + pluginName$jscomp$inline_312; +for (pluginName$jscomp$inline_312 in injectedNamesToPlugins$jscomp$inline_310) if ( - injectedNamesToPlugins$jscomp$inline_311.hasOwnProperty( - pluginName$jscomp$inline_313 + injectedNamesToPlugins$jscomp$inline_310.hasOwnProperty( + pluginName$jscomp$inline_312 ) ) { - var pluginModule$jscomp$inline_314 = - injectedNamesToPlugins$jscomp$inline_311[pluginName$jscomp$inline_313]; + var pluginModule$jscomp$inline_313 = + injectedNamesToPlugins$jscomp$inline_310[pluginName$jscomp$inline_312]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_313) || - namesToPlugins[pluginName$jscomp$inline_313] !== - pluginModule$jscomp$inline_314 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_312) || + namesToPlugins[pluginName$jscomp$inline_312] !== + pluginModule$jscomp$inline_313 ) { - if (namesToPlugins[pluginName$jscomp$inline_313]) + if (namesToPlugins[pluginName$jscomp$inline_312]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_313 + "`.") + (pluginName$jscomp$inline_312 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_313] = - pluginModule$jscomp$inline_314; - isOrderingDirty$jscomp$inline_312 = !0; + namesToPlugins[pluginName$jscomp$inline_312] = + pluginModule$jscomp$inline_313; + isOrderingDirty$jscomp$inline_311 = !0; } } -isOrderingDirty$jscomp$inline_312 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_311 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -3509,7 +3507,7 @@ function createChildReconciler(shouldTrackSideEffects) { if (newChild.$$typeof === REACT_CONTEXT_TYPE) return createChild( returnFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3558,7 +3556,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateSlot( returnFiber, oldFiber, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3628,7 +3626,7 @@ function createChildReconciler(shouldTrackSideEffects) { existingChildren, returnFiber, newIdx, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -3955,7 +3953,7 @@ function createChildReconciler(shouldTrackSideEffects) { return reconcileChildFibersImpl( returnFiber, currentFirstChild, - readContextDuringReconciliation(returnFiber, newChild, lanes), + readContextDuringReconciliation(returnFiber, newChild), lanes ); throwOnInvalidObjectType(returnFiber, newChild); @@ -4148,9 +4146,8 @@ function finishRenderingHooks(current) { throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." ); - enableLazyContextPropagation && - null !== current && - !didReceiveUpdate && + null === current || + didReceiveUpdate || ((current = current.dependencies), null !== current && checkIfContextChanged(current) && @@ -5630,16 +5627,14 @@ function throwException( "object" === typeof value && "function" === typeof value.then ) { - if (enableLazyContextPropagation) { - var currentSourceFiber = sourceFiber.alternate; - null !== currentSourceFiber && - propagateParentContextChanges( - currentSourceFiber, - sourceFiber, - rootRenderLanes, - !0 - ); - } + var currentSourceFiber = sourceFiber.alternate; + null !== currentSourceFiber && + propagateParentContextChanges( + currentSourceFiber, + sourceFiber, + rootRenderLanes, + !0 + ); currentSourceFiber = sourceFiber.tag; 0 !== (sourceFiber.mode & 1) || (0 !== currentSourceFiber && @@ -5814,7 +5809,7 @@ function updateForwardRef( for (var key in nextProps) "ref" !== key && (propsWithoutRef[key] = nextProps[key]); } else propsWithoutRef = nextProps; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); nextProps = renderWithHooks( current, @@ -6000,8 +5995,7 @@ function deferHiddenOffscreenComponent( null !== current && pushTransition(workInProgress, null); reuseHiddenContextOnStack(); pushOffscreenSuspenseHandler(workInProgress); - enableLazyContextPropagation && - null !== current && + null !== current && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } @@ -6031,7 +6025,7 @@ function updateFunctionComponent( ? previousContext : contextStackCursor$1.current; context = getMaskedContext(workInProgress, context); - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); Component = renderWithHooks( current, @@ -6059,7 +6053,7 @@ function replayFunctionComponent( secondArg, renderLanes ) { - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); markComponentRenderStarted(workInProgress); workInProgress.updateQueue = null; nextProps = renderWithHooksAgain( @@ -6090,7 +6084,7 @@ function updateClassComponent( var hasContext = !0; pushContextProvider(workInProgress); } else hasContext = !1; - prepareToReadContext(workInProgress, renderLanes); + prepareToReadContext(workInProgress); if (null === workInProgress.stateNode) resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), constructClassInstance(workInProgress, Component, nextProps), @@ -6211,8 +6205,7 @@ function updateClassComponent( unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies)) ? ("function" === typeof oldState && @@ -6234,8 +6227,7 @@ function updateClassComponent( newState, oldContext ) || - (enableLazyContextPropagation && - null !== current && + (null !== current && null !== current.dependencies && checkIfContextChanged(current.dependencies))) ? (getDerivedStateFromProps || @@ -6487,8 +6479,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )); else if ( - (enableLazyContextPropagation && - !didReceiveUpdate && + (didReceiveUpdate || propagateParentContextChanges(current, workInProgress, renderLanes, !1), (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)), didReceiveUpdate || JSCompiler_temp) @@ -6838,7 +6829,7 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { profilerStartTime = -1; workInProgressRootSkippedLanes |= workInProgress.lanes; if (0 === (renderLanes & workInProgress.childLanes)) - if (enableLazyContextPropagation && null !== current) { + if (null !== current) { if ( (propagateParentContextChanges( current, @@ -6866,12 +6857,9 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { return workInProgress.child; } function checkScheduledUpdateOrContext(current, renderLanes) { - return 0 !== (current.lanes & renderLanes) || - (enableLazyContextPropagation && - ((current = current.dependencies), - null !== current && checkIfContextChanged(current))) - ? !0 - : !1; + if (0 !== (current.lanes & renderLanes)) return !0; + current = current.dependencies; + return null !== current && checkIfContextChanged(current) ? !0 : !1; } function attemptEarlyBailoutIfNoScheduledUpdate( current, @@ -6933,8 +6921,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 19: var didSuspendBefore = 0 !== (current.flags & 128); stateNode = 0 !== (renderLanes & workInProgress.childLanes); - enableLazyContextPropagation && - !stateNode && + stateNode || (propagateParentContextChanges( current, workInProgress, @@ -7092,7 +7079,12 @@ function beginWork(current, workInProgress, renderLanes) { var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); nextCache !== init.cache && - propagateContextChange(workInProgress, CacheContext, renderLanes); + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); suspendIfUpdateReadFromEntangledAsyncAction(); init = nextProps.element; init === elementType @@ -7119,16 +7111,7 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue = init), - enableLazyContextPropagation || - (didReceiveUpdate && - null !== current && - current.memoizedState.memoizedState !== init && - propagateContextChange( - workInProgress, - HostTransitionContext, - renderLanes - ))), + (HostTransitionContext._currentValue = init)), markRef(current, workInProgress), reconcileChildren(current, workInProgress, elementType, renderLanes), workInProgress.child @@ -7203,36 +7186,22 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress.child ); case 10: - a: { - elementType = workInProgress.type; - init = workInProgress.pendingProps; - nextProps = workInProgress.memoizedProps; - nextCache = init.value; - pushProvider(workInProgress, elementType, nextCache); - if (!enableLazyContextPropagation && null !== nextProps) - if (objectIs(nextProps.value, nextCache)) { - if ( - nextProps.children === init.children && - !didPerformWorkStackCursor.current - ) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); - break a; - } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); - workInProgress = workInProgress.child; - } - return workInProgress; + return ( + (elementType = workInProgress.pendingProps), + pushProvider(workInProgress, workInProgress.type, elementType.value), + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ), + workInProgress.child + ); case 9: return ( (init = workInProgress.type._context), (elementType = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (init = readContext(init)), markComponentRenderStarted(workInProgress), (elementType = elementType(init)), @@ -7269,7 +7238,7 @@ function beginWork(current, workInProgress, renderLanes) { isContextProvider(elementType) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), constructClassInstance(workInProgress, elementType, init), mountClassInstance(workInProgress, elementType, init, renderLanes), finishClassComponent( @@ -7304,7 +7273,7 @@ function beginWork(current, workInProgress, renderLanes) { return updateOffscreenComponent(current, workInProgress, renderLanes); case 24: return ( - prepareToReadContext(workInProgress, renderLanes), + prepareToReadContext(workInProgress), (elementType = readContext(CacheContext)), null === current ? ((init = peekCacheFromPool()), @@ -7338,10 +7307,11 @@ function beginWork(current, workInProgress, renderLanes) { : ((elementType = nextProps.cache), pushProvider(workInProgress, CacheContext, elementType), elementType !== init.cache && - propagateContextChange( + propagateContextChanges( workInProgress, - CacheContext, - renderLanes + [CacheContext], + renderLanes, + !0 ))), reconcileChildren( current, @@ -7391,139 +7361,65 @@ function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { parent = parent.return; } } -function propagateContextChange(workInProgress, context, renderLanes) { - if (enableLazyContextPropagation) - propagateContextChanges(workInProgress, [context], renderLanes, !0); - else if (!enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - for (var dependency = list.firstContext; null !== dependency; ) { - if (dependency.context === context) { - if (1 === fiber.tag) { - dependency = createUpdate(renderLanes & -renderLanes); - dependency.tag = 2; - var updateQueue = fiber.updateQueue; - if (null !== updateQueue) { - updateQueue = updateQueue.shared; - var pending = updateQueue.pending; - null === pending - ? (dependency.next = dependency) - : ((dependency.next = pending.next), - (pending.next = dependency)); - updateQueue.pending = dependency; - } - } - fiber.lanes |= renderLanes; - dependency = fiber.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - fiber.return, - renderLanes, - workInProgress - ); - list.lanes |= renderLanes; - break; - } - dependency = dependency.next; - } - } else if (10 === fiber.tag) - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = fiber.sibling; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } -} function propagateContextChanges( workInProgress, contexts, renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; } - nextFiber = nextFiber.return; + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; } - fiber = nextFiber; - } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } function propagateParentContextChanges( @@ -7532,50 +7428,47 @@ function propagateParentContextChanges( renderLanes, forcePropagateEntireTree ) { - if (enableLazyContextPropagation) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); } - parent = parent.return; + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } function checkIfContextChanged(currentDependencies) { - if (!enableLazyContextPropagation) return !1; for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; @@ -7592,23 +7485,17 @@ function checkIfContextChanged(currentDependencies) { } return !1; } -function prepareToReadContext(workInProgress, renderLanes) { +function prepareToReadContext(workInProgress) { currentlyRenderingFiber = workInProgress; lastFullyObservedContext = lastContextDependency = null; workInProgress = workInProgress.dependencies; - null !== workInProgress && - (enableLazyContextPropagation - ? (workInProgress.firstContext = null) - : null !== workInProgress.firstContext && - (0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0), - (workInProgress.firstContext = null))); + null !== workInProgress && (workInProgress.firstContext = null); } function readContext(context) { return readContextForConsumer(currentlyRenderingFiber, context); } -function readContextDuringReconciliation(consumer, context, renderLanes) { - null === currentlyRenderingFiber && - prepareToReadContext(consumer, renderLanes); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber && prepareToReadContext(consumer); return readContextForConsumer(consumer, context); } function readContextForConsumer(consumer, context) { @@ -7624,7 +7511,7 @@ function readContextForConsumer(consumer, context) { ); lastContextDependency = context; consumer.dependencies = { lanes: 0, firstContext: context }; - enableLazyContextPropagation && (consumer.flags |= 524288); + consumer.flags |= 524288; } else lastContextDependency = lastContextDependency.next = context; return value; } @@ -7720,14 +7607,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$98 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$98 = lastTailNode), + for (var lastTailNode$97 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$97 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$98 + null === lastTailNode$97 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$98.sibling = null); + : (lastTailNode$97.sibling = null); } } function bubbleProperties(completedWork) { @@ -7739,53 +7626,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$100 = completedWork.selfBaseDuration, - child$101 = completedWork.child; - null !== child$101; + var treeBaseDuration$99 = completedWork.selfBaseDuration, + child$100 = completedWork.child; + null !== child$100; ) - (newChildLanes |= child$101.lanes | child$101.childLanes), - (subtreeFlags |= child$101.subtreeFlags & 31457280), - (subtreeFlags |= child$101.flags & 31457280), - (treeBaseDuration$100 += child$101.treeBaseDuration), - (child$101 = child$101.sibling); - completedWork.treeBaseDuration = treeBaseDuration$100; + (newChildLanes |= child$100.lanes | child$100.childLanes), + (subtreeFlags |= child$100.subtreeFlags & 31457280), + (subtreeFlags |= child$100.flags & 31457280), + (treeBaseDuration$99 += child$100.treeBaseDuration), + (child$100 = child$100.sibling); + completedWork.treeBaseDuration = treeBaseDuration$99; } else for ( - treeBaseDuration$100 = completedWork.child; - null !== treeBaseDuration$100; + treeBaseDuration$99 = completedWork.child; + null !== treeBaseDuration$99; ) (newChildLanes |= - treeBaseDuration$100.lanes | treeBaseDuration$100.childLanes), - (subtreeFlags |= treeBaseDuration$100.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$100.flags & 31457280), - (treeBaseDuration$100.return = completedWork), - (treeBaseDuration$100 = treeBaseDuration$100.sibling); + treeBaseDuration$99.lanes | treeBaseDuration$99.childLanes), + (subtreeFlags |= treeBaseDuration$99.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$99.flags & 31457280), + (treeBaseDuration$99.return = completedWork), + (treeBaseDuration$99 = treeBaseDuration$99.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$100 = completedWork.actualDuration; - child$101 = completedWork.selfBaseDuration; + treeBaseDuration$99 = completedWork.actualDuration; + child$100 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$100 += child.actualDuration), - (child$101 += child.treeBaseDuration), + (treeBaseDuration$99 += child.actualDuration), + (child$100 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$100; - completedWork.treeBaseDuration = child$101; + completedWork.actualDuration = treeBaseDuration$99; + completedWork.treeBaseDuration = child$100; } else for ( - treeBaseDuration$100 = completedWork.child; - null !== treeBaseDuration$100; + treeBaseDuration$99 = completedWork.child; + null !== treeBaseDuration$99; ) (newChildLanes |= - treeBaseDuration$100.lanes | treeBaseDuration$100.childLanes), - (subtreeFlags |= treeBaseDuration$100.subtreeFlags), - (subtreeFlags |= treeBaseDuration$100.flags), - (treeBaseDuration$100.return = completedWork), - (treeBaseDuration$100 = treeBaseDuration$100.sibling); + treeBaseDuration$99.lanes | treeBaseDuration$99.childLanes), + (subtreeFlags |= treeBaseDuration$99.subtreeFlags), + (subtreeFlags |= treeBaseDuration$99.flags), + (treeBaseDuration$99.return = completedWork), + (treeBaseDuration$99 = treeBaseDuration$99.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8313,9 +8200,9 @@ function commitHookEffectListMount(flags, finishedWork) { finishedWork ); lastEffect = void 0; - var create$126 = updateQueue.create, + var create$125 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$126(); + lastEffect = create$125(); inst.destroy = lastEffect; 0 !== (flags & 8) ? null !== injectedProfilingHooks && @@ -8454,8 +8341,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$130) { - captureCommitPhaseError(current, nearestMountedAncestor, error$130); + } catch (error$129) { + captureCommitPhaseError(current, nearestMountedAncestor, error$129); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -8515,8 +8402,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$131) { - captureCommitPhaseError(current, nearestMountedAncestor, error$131); + } catch (error$130) { + captureCommitPhaseError(current, nearestMountedAncestor, error$130); } else ref.current = null; } @@ -8759,11 +8646,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$127) { + } catch (error$126) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$127 + error$126 ); } else { @@ -8780,11 +8667,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$128) { + } catch (error$127) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$128 + error$127 ); } recordEffectDuration(); @@ -8795,11 +8682,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$129) { + } catch (error$128) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$129 + error$128 ); } } @@ -9461,12 +9348,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$132 = JSCompiler_inline_result.stateNode.containerInfo, - before$133 = getHostSibling(finishedWork); + var parent$131 = JSCompiler_inline_result.stateNode.containerInfo, + before$132 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$133, - parent$132 + before$132, + parent$131 ); break; default: @@ -10728,8 +10615,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$152) { - handleThrow(root, thrownValue$152); + } catch (thrownValue$151) { + handleThrow(root, thrownValue$151); } while (1); lanes && root.shellSuspendCounter++; @@ -10850,8 +10737,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$154) { - handleThrow(root, thrownValue$154); + } catch (thrownValue$153) { + handleThrow(root, thrownValue$153); } while (1); resetContextDependencies(); @@ -11810,11 +11697,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.0.0-native-fb-d66fa02a-20240926" !== isomorphicReactPackageVersion) +if ("19.0.0-native-fb-60b1420f-20240926" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-native-fb-d66fa02a-20240926\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-native-fb-60b1420f-20240926\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11861,21 +11748,21 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1344 = { + internals$jscomp$inline_1321 = { bundleType: 0, - version: "19.0.0-native-fb-d66fa02a-20240926", + version: "19.0.0-native-fb-60b1420f-20240926", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromTag, - reconcilerVersion: "19.0.0-native-fb-d66fa02a-20240926" + reconcilerVersion: "19.0.0-native-fb-60b1420f-20240926" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1344.rendererConfig = extraDevToolsConfig); -internals$jscomp$inline_1344.getLaneLabelMap = function () { + (internals$jscomp$inline_1321.rendererConfig = extraDevToolsConfig); +internals$jscomp$inline_1321.getLaneLabelMap = function () { for ( - var map = new Map(), lane = 1, index$158 = 0; - 31 > index$158; - index$158++ + var map = new Map(), lane = 1, index$157 = 0; + 31 > index$157; + index$157++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -11883,20 +11770,20 @@ internals$jscomp$inline_1344.getLaneLabelMap = function () { } return map; }; -internals$jscomp$inline_1344.injectProfilingHooks = function (profilingHooks) { +internals$jscomp$inline_1321.injectProfilingHooks = function (profilingHooks) { injectedProfilingHooks = profilingHooks; }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1629 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1616 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1629.isDisabled && - hook$jscomp$inline_1629.supportsFiber + !hook$jscomp$inline_1616.isDisabled && + hook$jscomp$inline_1616.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1629.inject( - internals$jscomp$inline_1344 + (rendererID = hook$jscomp$inline_1616.inject( + internals$jscomp$inline_1321 )), - (injectedHook = hook$jscomp$inline_1629); + (injectedHook = hook$jscomp$inline_1616); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {