diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 7c964f0061694..38ba8aec4e512 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -e06c72fcf4632ad3117add713a25f6354631f037 +d42872588282b9eef56b8fa02441b33d596fd197 diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index 7c964f0061694..38ba8aec4e512 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -e06c72fcf4632ad3117add713a25f6354631f037 +d42872588282b9eef56b8fa02441b33d596fd197 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 9fd515c008f3a..fbc99ddb3b35c 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -1870,14 +1870,6 @@ __DEV__ && exports.unstable_useCacheRefresh = function () { return resolveDispatcher().useCacheRefresh(); }; - exports.unstable_useContextWithBailout = function (context, select) { - var dispatcher = resolveDispatcher(); - context.$$typeof === REACT_CONSUMER_TYPE && - error$jscomp$0( - "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?" - ); - return dispatcher.unstable_useContextWithBailout(context, select); - }; exports.unstable_useMemoCache = useMemoCache; exports.use = function (usable) { return resolveDispatcher().use(usable); @@ -1950,7 +1942,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.1.0-www-classic-e06c72fc-20241215"; + exports.version = "19.1.0-www-classic-d4287258-20241217"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index 5d31ae7e5159f..7c0085ea7dc60 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -1870,14 +1870,6 @@ __DEV__ && exports.unstable_useCacheRefresh = function () { return resolveDispatcher().useCacheRefresh(); }; - exports.unstable_useContextWithBailout = function (context, select) { - var dispatcher = resolveDispatcher(); - context.$$typeof === REACT_CONSUMER_TYPE && - error$jscomp$0( - "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?" - ); - return dispatcher.unstable_useContextWithBailout(context, select); - }; exports.unstable_useMemoCache = useMemoCache; exports.use = function (usable) { return resolveDispatcher().use(usable); @@ -1950,7 +1942,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.1.0-www-modern-e06c72fc-20241215"; + exports.version = "19.1.0-www-modern-d4287258-20241217"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index b2c83059ae8f8..f393f48328a92 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -569,9 +569,6 @@ exports.unstable_getCacheForType = function (resourceType) { exports.unstable_useCacheRefresh = function () { return ReactSharedInternals.H.useCacheRefresh(); }; -exports.unstable_useContextWithBailout = function (context, select) { - return ReactSharedInternals.H.unstable_useContextWithBailout(context, select); -}; exports.unstable_useMemoCache = useMemoCache; exports.use = function (usable) { return ReactSharedInternals.H.use(usable); @@ -633,4 +630,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-classic-e06c72fc-20241215"; +exports.version = "19.1.0-www-classic-d4287258-20241217"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 004dcabb47340..88dc24c88a8b4 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -569,9 +569,6 @@ exports.unstable_getCacheForType = function (resourceType) { exports.unstable_useCacheRefresh = function () { return ReactSharedInternals.H.useCacheRefresh(); }; -exports.unstable_useContextWithBailout = function (context, select) { - return ReactSharedInternals.H.unstable_useContextWithBailout(context, select); -}; exports.unstable_useMemoCache = useMemoCache; exports.use = function (usable) { return ReactSharedInternals.H.use(usable); @@ -633,4 +630,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-modern-e06c72fc-20241215"; +exports.version = "19.1.0-www-modern-d4287258-20241217"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 32ea20bcdc6f5..523867ddd2807 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -573,9 +573,6 @@ exports.unstable_getCacheForType = function (resourceType) { exports.unstable_useCacheRefresh = function () { return ReactSharedInternals.H.useCacheRefresh(); }; -exports.unstable_useContextWithBailout = function (context, select) { - return ReactSharedInternals.H.unstable_useContextWithBailout(context, select); -}; exports.unstable_useMemoCache = useMemoCache; exports.use = function (usable) { return ReactSharedInternals.H.use(usable); @@ -637,7 +634,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-classic-e06c72fc-20241215"; +exports.version = "19.1.0-www-classic-d4287258-20241217"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index 138deb786ee21..6115cc4048f3a 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -573,9 +573,6 @@ exports.unstable_getCacheForType = function (resourceType) { exports.unstable_useCacheRefresh = function () { return ReactSharedInternals.H.useCacheRefresh(); }; -exports.unstable_useContextWithBailout = function (context, select) { - return ReactSharedInternals.H.unstable_useContextWithBailout(context, select); -}; exports.unstable_useMemoCache = useMemoCache; exports.use = function (usable) { return ReactSharedInternals.H.use(usable); @@ -637,7 +634,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-modern-e06c72fc-20241215"; +exports.version = "19.1.0-www-modern-d4287258-20241217"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index e861864ea124a..364b48a469f23 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -3146,35 +3146,6 @@ __DEV__ && } return workInProgressHook; } - function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue2; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - JSCompiler_temp.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; - } function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -8611,19 +8582,8 @@ __DEV__ && a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue2) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -8721,37 +8681,19 @@ __DEV__ && ); workInProgress.flags |= 262144; } - function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue - ) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error("Compared context values must be arrays"); - return !1; - } function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue2, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue2, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -15150,8 +15092,6 @@ __DEV__ && ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); - ContextOnlyDispatcher.unstable_useContextWithBailout = - throwInvalidHookError; var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, @@ -15317,14 +15257,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnMountWithHookTypesInDEV = { readContext: function (context) { return readContext(context); @@ -15469,12 +15401,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountWithHookTypesInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnUpdateInDEV = { readContext: function (context) { return readContext(context); @@ -15621,14 +15547,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnRerenderInDEV = { readContext: function (context) { return readContext(context); @@ -15775,14 +15693,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnMountInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -15953,13 +15863,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnMountInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnUpdateInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -16132,13 +16035,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnRerenderInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -16306,13 +16202,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; var callComponent = { "react-stack-bottom-frame": function (Component, props, secondArg) { var wasRendering = isRendering; @@ -17015,10 +16904,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-classic-e06c72fc-20241215", + version: "19.1.0-www-classic-d4287258-20241217", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -17052,7 +16941,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.1.0-www-classic-e06c72fc-20241215"; + exports.version = "19.1.0-www-classic-d4287258-20241217"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 3cb379ceae3be..baf3017bf20ec 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -3038,35 +3038,6 @@ __DEV__ && } return workInProgressHook; } - function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue2; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - JSCompiler_temp.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; - } function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -8429,19 +8400,8 @@ __DEV__ && a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue2) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -8539,37 +8499,19 @@ __DEV__ && ); workInProgress.flags |= 262144; } - function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue - ) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error("Compared context values must be arrays"); - return !1; - } function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue2, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue2, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -14903,8 +14845,6 @@ __DEV__ && ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); - ContextOnlyDispatcher.unstable_useContextWithBailout = - throwInvalidHookError; var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, @@ -15070,14 +15010,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnMountWithHookTypesInDEV = { readContext: function (context) { return readContext(context); @@ -15222,12 +15154,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountWithHookTypesInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnUpdateInDEV = { readContext: function (context) { return readContext(context); @@ -15374,14 +15300,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnRerenderInDEV = { readContext: function (context) { return readContext(context); @@ -15528,14 +15446,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnMountInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -15706,13 +15616,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnMountInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnUpdateInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -15885,13 +15788,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnRerenderInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -16059,13 +15955,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; var callComponent = { "react-stack-bottom-frame": function (Component, props, secondArg) { var wasRendering = isRendering; @@ -16778,10 +16667,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-modern-e06c72fc-20241215", + version: "19.1.0-www-modern-d4287258-20241217", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -16815,7 +16704,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.1.0-www-modern-e06c72fc-20241215"; + exports.version = "19.1.0-www-modern-d4287258-20241217"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 930bdb06a05c1..b168691167c58 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -1963,28 +1963,6 @@ function updateWorkInProgressHook() { } return workInProgressHook; } -function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue2; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - JSCompiler_temp.dependencies = { lanes: 0, firstContext: context }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; -} function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -2954,7 +2932,6 @@ var ContextOnlyDispatcher = { ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); -ContextOnlyDispatcher.unstable_useContextWithBailout = throwInvalidHookError; var HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -3128,8 +3105,6 @@ var HooksDispatcherOnMount = { }; enableUseResourceEffectHook && (HooksDispatcherOnMount.useResourceEffect = mountResourceEffect); -HooksDispatcherOnMount.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnUpdate = { readContext: readContext, use: use, @@ -3180,8 +3155,6 @@ var HooksDispatcherOnUpdate = { HooksDispatcherOnUpdate.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect); -HooksDispatcherOnUpdate.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnRerender = { readContext: readContext, use: use, @@ -3237,8 +3210,6 @@ var HooksDispatcherOnRerender = { HooksDispatcherOnRerender.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect); -HooksDispatcherOnRerender.unstable_useContextWithBailout = - unstable_useContextWithBailout; var thenableState = null, thenableIndexCounter = 0; function unwrapThenable(thenable) { @@ -6157,19 +6128,8 @@ function propagateContextChanges( a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue2) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -6256,37 +6216,19 @@ function propagateParentContextChanges( ); workInProgress.flags |= 262144; } -function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue -) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error(formatProdErrorMessage(541)); - return !1; -} function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue2, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue2, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -10815,24 +10757,24 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1500 = { +var internals$jscomp$inline_1493 = { bundleType: 0, - version: "19.1.0-www-classic-e06c72fc-20241215", + version: "19.1.0-www-classic-d4287258-20241217", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1501 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1494 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1501.isDisabled && - hook$jscomp$inline_1501.supportsFiber + !hook$jscomp$inline_1494.isDisabled && + hook$jscomp$inline_1494.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1501.inject( - internals$jscomp$inline_1500 + (rendererID = hook$jscomp$inline_1494.inject( + internals$jscomp$inline_1493 )), - (injectedHook = hook$jscomp$inline_1501); + (injectedHook = hook$jscomp$inline_1494); } catch (err) {} } var Path = Mode$1.Path; @@ -10846,4 +10788,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.1.0-www-classic-e06c72fc-20241215"; +exports.version = "19.1.0-www-classic-d4287258-20241217"; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 279ffd5c02fba..47746cb983f55 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -1810,28 +1810,6 @@ function updateWorkInProgressHook() { } return workInProgressHook; } -function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue2; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - JSCompiler_temp.dependencies = { lanes: 0, firstContext: context }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; -} function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -2801,7 +2779,6 @@ var ContextOnlyDispatcher = { ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); -ContextOnlyDispatcher.unstable_useContextWithBailout = throwInvalidHookError; var HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -2975,8 +2952,6 @@ var HooksDispatcherOnMount = { }; enableUseResourceEffectHook && (HooksDispatcherOnMount.useResourceEffect = mountResourceEffect); -HooksDispatcherOnMount.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnUpdate = { readContext: readContext, use: use, @@ -3027,8 +3002,6 @@ var HooksDispatcherOnUpdate = { HooksDispatcherOnUpdate.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect); -HooksDispatcherOnUpdate.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnRerender = { readContext: readContext, use: use, @@ -3084,8 +3057,6 @@ var HooksDispatcherOnRerender = { HooksDispatcherOnRerender.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect); -HooksDispatcherOnRerender.unstable_useContextWithBailout = - unstable_useContextWithBailout; var thenableState = null, thenableIndexCounter = 0; function unwrapThenable(thenable) { @@ -5936,19 +5907,8 @@ function propagateContextChanges( a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue2) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -6035,37 +5995,19 @@ function propagateParentContextChanges( ); workInProgress.flags |= 262144; } -function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue -) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error(formatProdErrorMessage(541)); - return !1; -} function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue2, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue2, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -10531,24 +10473,24 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1479 = { +var internals$jscomp$inline_1472 = { bundleType: 0, - version: "19.1.0-www-modern-e06c72fc-20241215", + version: "19.1.0-www-modern-d4287258-20241217", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1480 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1473 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1480.isDisabled && - hook$jscomp$inline_1480.supportsFiber + !hook$jscomp$inline_1473.isDisabled && + hook$jscomp$inline_1473.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1480.inject( - internals$jscomp$inline_1479 + (rendererID = hook$jscomp$inline_1473.inject( + internals$jscomp$inline_1472 )), - (injectedHook = hook$jscomp$inline_1480); + (injectedHook = hook$jscomp$inline_1473); } catch (err) {} } var Path = Mode$1.Path; @@ -10562,4 +10504,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.1.0-www-modern-e06c72fc-20241215"; +exports.version = "19.1.0-www-modern-d4287258-20241217"; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index b4741790217e1..0aca5e4c3b1c8 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -4949,35 +4949,6 @@ __DEV__ && } return workInProgressHook; } - function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - JSCompiler_temp.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; - } function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -9304,32 +9275,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2491; - var JSCompiler_object_inline_stack_2492 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2484; + var JSCompiler_object_inline_stack_2485 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2493 = !1; + var JSCompiler_object_inline_componentStack_2486 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2491 = didSuspend) || - (JSCompiler_object_inline_digest_2491 = + (JSCompiler_object_inline_digest_2484 = didSuspend) || + (JSCompiler_object_inline_digest_2484 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2491 && - ((JSCompiler_object_inline_componentStack_2493 = !0), + JSCompiler_object_inline_digest_2484 && + ((JSCompiler_object_inline_componentStack_2486 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2491 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2484 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2493 + JSCompiler_object_inline_componentStack_2486 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2490 = nextHydratableInstance; + var JSCompiler_object_inline_message_2483 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2490)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2483)) { c: { - var instance = JSCompiler_object_inline_message_2490; + var instance = JSCompiler_object_inline_message_2483; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9370,46 +9341,46 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2490 + JSCompiler_object_inline_message_2483 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2490 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2483 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2490 && - ((JSCompiler_object_inline_message_2490 = - JSCompiler_object_inline_message_2490.dehydrated), - null !== JSCompiler_object_inline_message_2490) + null !== JSCompiler_object_inline_message_2483 && + ((JSCompiler_object_inline_message_2483 = + JSCompiler_object_inline_message_2483.dehydrated), + null !== JSCompiler_object_inline_message_2483) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2490) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2483) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2490 = - JSCompiler_object_inline_stack_2492.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2492.fallback; - if (JSCompiler_object_inline_componentStack_2493) + JSCompiler_object_inline_message_2483 = + JSCompiler_object_inline_stack_2485.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2485.fallback; + if (JSCompiler_object_inline_componentStack_2486) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2492 = + (JSCompiler_object_inline_stack_2485 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2490, + JSCompiler_object_inline_message_2483, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2493 = + (JSCompiler_object_inline_componentStack_2486 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2493.memoizedState = + (JSCompiler_object_inline_componentStack_2486.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2493.childLanes = + (JSCompiler_object_inline_componentStack_2486.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2491, + JSCompiler_object_inline_digest_2484, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9422,9 +9393,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2493.updateQueue), + JSCompiler_object_inline_componentStack_2486.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2493.updateQueue = + ? (JSCompiler_object_inline_componentStack_2486.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9432,46 +9403,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2492 + JSCompiler_object_inline_stack_2485 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2492.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2485.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2492 = + (JSCompiler_object_inline_stack_2485 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2490, + JSCompiler_object_inline_message_2483, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2493 = + (JSCompiler_object_inline_componentStack_2486 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2493.memoizedState = + (JSCompiler_object_inline_componentStack_2486.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2493.childLanes = + (JSCompiler_object_inline_componentStack_2486.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2491, + JSCompiler_object_inline_digest_2484, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2492 + JSCompiler_object_inline_stack_2485 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2490 + JSCompiler_object_inline_message_2483 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2490 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2490) + ((JSCompiler_object_inline_message_2483 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2483) ) { if (didSuspend) workInProgress.flags & 256 @@ -9488,94 +9459,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2493 = - JSCompiler_object_inline_stack_2492.fallback), - (JSCompiler_object_inline_message_2490 = workInProgress.mode), - (JSCompiler_object_inline_stack_2492 = + (JSCompiler_object_inline_componentStack_2486 = + JSCompiler_object_inline_stack_2485.fallback), + (JSCompiler_object_inline_message_2483 = workInProgress.mode), + (JSCompiler_object_inline_stack_2485 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2492.children + children: JSCompiler_object_inline_stack_2485.children }, - JSCompiler_object_inline_message_2490 + JSCompiler_object_inline_message_2483 )), - (JSCompiler_object_inline_componentStack_2493 = + (JSCompiler_object_inline_componentStack_2486 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2493, - JSCompiler_object_inline_message_2490, + JSCompiler_object_inline_componentStack_2486, + JSCompiler_object_inline_message_2483, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2493.flags |= 2), - (JSCompiler_object_inline_stack_2492.return = workInProgress), - (JSCompiler_object_inline_componentStack_2493.return = + (JSCompiler_object_inline_componentStack_2486.flags |= 2), + (JSCompiler_object_inline_stack_2485.return = workInProgress), + (JSCompiler_object_inline_componentStack_2486.return = workInProgress), - (JSCompiler_object_inline_stack_2492.sibling = - JSCompiler_object_inline_componentStack_2493), - (workInProgress.child = JSCompiler_object_inline_stack_2492), + (JSCompiler_object_inline_stack_2485.sibling = + JSCompiler_object_inline_componentStack_2486), + (workInProgress.child = JSCompiler_object_inline_stack_2485), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2492 = workInProgress.child), - (JSCompiler_object_inline_stack_2492.memoizedState = + (JSCompiler_object_inline_stack_2485 = workInProgress.child), + (JSCompiler_object_inline_stack_2485.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2492.childLanes = + (JSCompiler_object_inline_stack_2485.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2491, + JSCompiler_object_inline_digest_2484, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2493)); + JSCompiler_object_inline_componentStack_2486)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2490)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2483)) ) { - JSCompiler_object_inline_digest_2491 = - JSCompiler_object_inline_message_2490.nextSibling && - JSCompiler_object_inline_message_2490.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2491) { - JSCompiler_temp = JSCompiler_object_inline_digest_2491.dgst; - var message = JSCompiler_object_inline_digest_2491.msg; - instance = JSCompiler_object_inline_digest_2491.stck; - var componentStack = JSCompiler_object_inline_digest_2491.cstck; + JSCompiler_object_inline_digest_2484 = + JSCompiler_object_inline_message_2483.nextSibling && + JSCompiler_object_inline_message_2483.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2484) { + JSCompiler_temp = JSCompiler_object_inline_digest_2484.dgst; + var message = JSCompiler_object_inline_digest_2484.msg; + instance = JSCompiler_object_inline_digest_2484.stck; + var componentStack = JSCompiler_object_inline_digest_2484.cstck; } - JSCompiler_object_inline_message_2490 = message; - JSCompiler_object_inline_digest_2491 = JSCompiler_temp; - JSCompiler_object_inline_stack_2492 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2493 = + JSCompiler_object_inline_message_2483 = message; + JSCompiler_object_inline_digest_2484 = JSCompiler_temp; + JSCompiler_object_inline_stack_2485 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2486 = componentStack; - JSCompiler_object_inline_componentStack_2493 = - JSCompiler_object_inline_message_2490 - ? Error(JSCompiler_object_inline_message_2490) + JSCompiler_object_inline_componentStack_2486 = + JSCompiler_object_inline_message_2483 + ? Error(JSCompiler_object_inline_message_2483) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2493.stack = - JSCompiler_object_inline_stack_2492 || ""; - JSCompiler_object_inline_componentStack_2493.digest = - JSCompiler_object_inline_digest_2491; - JSCompiler_object_inline_digest_2491 = + JSCompiler_object_inline_componentStack_2486.stack = + JSCompiler_object_inline_stack_2485 || ""; + JSCompiler_object_inline_componentStack_2486.digest = + JSCompiler_object_inline_digest_2484; + JSCompiler_object_inline_digest_2484 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2492 = { - value: JSCompiler_object_inline_componentStack_2493, + JSCompiler_object_inline_stack_2485 = { + value: JSCompiler_object_inline_componentStack_2486, source: null, - stack: JSCompiler_object_inline_digest_2491 + stack: JSCompiler_object_inline_digest_2484 }; - "string" === typeof JSCompiler_object_inline_digest_2491 && + "string" === typeof JSCompiler_object_inline_digest_2484 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2493, - JSCompiler_object_inline_stack_2492 + JSCompiler_object_inline_componentStack_2486, + JSCompiler_object_inline_stack_2485 ); - queueHydrationError(JSCompiler_object_inline_stack_2492); + queueHydrationError(JSCompiler_object_inline_stack_2485); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9589,44 +9560,44 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2491 = + (JSCompiler_object_inline_digest_2484 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2491) + didReceiveUpdate || JSCompiler_object_inline_digest_2484) ) { - JSCompiler_object_inline_digest_2491 = workInProgressRoot; + JSCompiler_object_inline_digest_2484 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_digest_2491 && - ((JSCompiler_object_inline_stack_2492 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2492 = - 0 !== (JSCompiler_object_inline_stack_2492 & 42) + null !== JSCompiler_object_inline_digest_2484 && + ((JSCompiler_object_inline_stack_2485 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2485 = + 0 !== (JSCompiler_object_inline_stack_2485 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2492 + JSCompiler_object_inline_stack_2485 )), - (JSCompiler_object_inline_stack_2492 = + (JSCompiler_object_inline_stack_2485 = 0 !== - (JSCompiler_object_inline_stack_2492 & - (JSCompiler_object_inline_digest_2491.suspendedLanes | + (JSCompiler_object_inline_stack_2485 & + (JSCompiler_object_inline_digest_2484.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2492), - 0 !== JSCompiler_object_inline_stack_2492 && - JSCompiler_object_inline_stack_2492 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2485), + 0 !== JSCompiler_object_inline_stack_2485 && + JSCompiler_object_inline_stack_2485 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2492), + ((prevState.retryLane = JSCompiler_object_inline_stack_2485), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2492 + JSCompiler_object_inline_stack_2485 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2491, + JSCompiler_object_inline_digest_2484, current, - JSCompiler_object_inline_stack_2492 + JSCompiler_object_inline_stack_2485 ), SelectiveHydrationException) ); - JSCompiler_object_inline_message_2490.data === + JSCompiler_object_inline_message_2483.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9634,14 +9605,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2490.data === + JSCompiler_object_inline_message_2483.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2490.nextSibling + JSCompiler_object_inline_message_2483.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9659,57 +9630,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2492.children + JSCompiler_object_inline_stack_2485.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2493) + if (JSCompiler_object_inline_componentStack_2486) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2493 = - JSCompiler_object_inline_stack_2492.fallback), - (JSCompiler_object_inline_message_2490 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2486 = + JSCompiler_object_inline_stack_2485.fallback), + (JSCompiler_object_inline_message_2483 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2492 = createWorkInProgress( + (JSCompiler_object_inline_stack_2485 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2492.children + children: JSCompiler_object_inline_stack_2485.children } )), - (JSCompiler_object_inline_stack_2492.subtreeFlags = + (JSCompiler_object_inline_stack_2485.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2493 = + ? (JSCompiler_object_inline_componentStack_2486 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2493 + JSCompiler_object_inline_componentStack_2486 )) - : ((JSCompiler_object_inline_componentStack_2493 = + : ((JSCompiler_object_inline_componentStack_2486 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2493, - JSCompiler_object_inline_message_2490, + JSCompiler_object_inline_componentStack_2486, + JSCompiler_object_inline_message_2483, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2493.flags |= 2)), - (JSCompiler_object_inline_componentStack_2493.return = + (JSCompiler_object_inline_componentStack_2486.flags |= 2)), + (JSCompiler_object_inline_componentStack_2486.return = workInProgress), - (JSCompiler_object_inline_stack_2492.return = workInProgress), - (JSCompiler_object_inline_stack_2492.sibling = - JSCompiler_object_inline_componentStack_2493), - (workInProgress.child = JSCompiler_object_inline_stack_2492), - (JSCompiler_object_inline_stack_2492 = - JSCompiler_object_inline_componentStack_2493), - (JSCompiler_object_inline_componentStack_2493 = workInProgress.child), - (JSCompiler_object_inline_message_2490 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2490 - ? (JSCompiler_object_inline_message_2490 = + (JSCompiler_object_inline_stack_2485.return = workInProgress), + (JSCompiler_object_inline_stack_2485.sibling = + JSCompiler_object_inline_componentStack_2486), + (workInProgress.child = JSCompiler_object_inline_stack_2485), + (JSCompiler_object_inline_stack_2485 = + JSCompiler_object_inline_componentStack_2486), + (JSCompiler_object_inline_componentStack_2486 = workInProgress.child), + (JSCompiler_object_inline_message_2483 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2483 + ? (JSCompiler_object_inline_message_2483 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2490.cachePool), + JSCompiler_object_inline_message_2483.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9717,34 +9688,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2490 = { + (JSCompiler_object_inline_message_2483 = { baseLanes: - JSCompiler_object_inline_message_2490.baseLanes | renderLanes, + JSCompiler_object_inline_message_2483.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2493.memoizedState = - JSCompiler_object_inline_message_2490), + (JSCompiler_object_inline_componentStack_2486.memoizedState = + JSCompiler_object_inline_message_2483), enableTransitionTracing && - ((JSCompiler_object_inline_message_2490 = enableTransitionTracing + ((JSCompiler_object_inline_message_2483 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2490 && + null !== JSCompiler_object_inline_message_2483 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2493.updateQueue), + JSCompiler_object_inline_componentStack_2486.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2493.updateQueue = { - transitions: JSCompiler_object_inline_message_2490, + ? (JSCompiler_object_inline_componentStack_2486.updateQueue = { + transitions: JSCompiler_object_inline_message_2483, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2493.updateQueue = + ? (JSCompiler_object_inline_componentStack_2486.updateQueue = { - transitions: JSCompiler_object_inline_message_2490, + transitions: JSCompiler_object_inline_message_2483, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9752,32 +9723,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2490), + JSCompiler_object_inline_message_2483), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2493.childLanes = + (JSCompiler_object_inline_componentStack_2486.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2491, + JSCompiler_object_inline_digest_2484, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2492 + JSCompiler_object_inline_stack_2485 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2492.children + children: JSCompiler_object_inline_stack_2485.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2491 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2491 + ((JSCompiler_object_inline_digest_2484 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2484 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2491.push(current)); + : JSCompiler_object_inline_digest_2484.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -11059,19 +11030,8 @@ __DEV__ && a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -11169,37 +11129,19 @@ __DEV__ && ); workInProgress.flags |= 262144; } - function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue - ) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error("Compared context values must be arrays"); - return !1; - } function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -24961,8 +24903,6 @@ __DEV__ && ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); - ContextOnlyDispatcher.unstable_useContextWithBailout = - throwInvalidHookError; var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, @@ -25136,14 +25076,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnMountWithHookTypesInDEV = { readContext: function (context) { return readContext(context); @@ -25296,12 +25228,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountWithHookTypesInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnUpdateInDEV = { readContext: function (context) { return readContext(context); @@ -25456,14 +25382,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnRerenderInDEV = { readContext: function (context) { return readContext(context); @@ -25618,14 +25536,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnMountInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -25804,13 +25714,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnMountInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnUpdateInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -25991,13 +25894,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnRerenderInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -26173,13 +26069,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; var callComponent = { "react-stack-bottom-frame": function (Component, props, secondArg) { var wasRendering = isRendering; @@ -27490,11 +27379,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.1.0-www-classic-e06c72fc-20241215" !== isomorphicReactPackageVersion) + if ("19.1.0-www-classic-d4287258-20241217" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.1.0-www-classic-e06c72fc-20241215\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.1.0-www-classic-d4287258-20241217\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27537,10 +27426,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.1.0-www-classic-e06c72fc-20241215", + version: "19.1.0-www-classic-d4287258-20241217", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28147,7 +28036,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.1.0-www-classic-e06c72fc-20241215"; + exports.version = "19.1.0-www-classic-d4287258-20241217"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index bc0f6e49d0912..ca64082a6e6c0 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -4836,35 +4836,6 @@ __DEV__ && } return workInProgressHook; } - function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - JSCompiler_temp.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; - } function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -9116,32 +9087,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2483; - var JSCompiler_object_inline_stack_2484 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2476; + var JSCompiler_object_inline_stack_2477 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2485 = !1; + var JSCompiler_object_inline_componentStack_2478 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2483 = didSuspend) || - (JSCompiler_object_inline_digest_2483 = + (JSCompiler_object_inline_digest_2476 = didSuspend) || + (JSCompiler_object_inline_digest_2476 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2483 && - ((JSCompiler_object_inline_componentStack_2485 = !0), + JSCompiler_object_inline_digest_2476 && + ((JSCompiler_object_inline_componentStack_2478 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2483 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2476 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2485 + JSCompiler_object_inline_componentStack_2478 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2482 = nextHydratableInstance; + var JSCompiler_object_inline_message_2475 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2482)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2475)) { c: { - var instance = JSCompiler_object_inline_message_2482; + var instance = JSCompiler_object_inline_message_2475; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9182,46 +9153,46 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2482 + JSCompiler_object_inline_message_2475 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2482 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2475 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2482 && - ((JSCompiler_object_inline_message_2482 = - JSCompiler_object_inline_message_2482.dehydrated), - null !== JSCompiler_object_inline_message_2482) + null !== JSCompiler_object_inline_message_2475 && + ((JSCompiler_object_inline_message_2475 = + JSCompiler_object_inline_message_2475.dehydrated), + null !== JSCompiler_object_inline_message_2475) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2482) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2475) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2482 = - JSCompiler_object_inline_stack_2484.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2484.fallback; - if (JSCompiler_object_inline_componentStack_2485) + JSCompiler_object_inline_message_2475 = + JSCompiler_object_inline_stack_2477.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2477.fallback; + if (JSCompiler_object_inline_componentStack_2478) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2484 = + (JSCompiler_object_inline_stack_2477 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2482, + JSCompiler_object_inline_message_2475, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2485 = + (JSCompiler_object_inline_componentStack_2478 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2485.memoizedState = + (JSCompiler_object_inline_componentStack_2478.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2485.childLanes = + (JSCompiler_object_inline_componentStack_2478.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2483, + JSCompiler_object_inline_digest_2476, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9234,9 +9205,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2485.updateQueue), + JSCompiler_object_inline_componentStack_2478.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2485.updateQueue = + ? (JSCompiler_object_inline_componentStack_2478.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9244,46 +9215,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2484 + JSCompiler_object_inline_stack_2477 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2484.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2477.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2484 = + (JSCompiler_object_inline_stack_2477 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2482, + JSCompiler_object_inline_message_2475, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2485 = + (JSCompiler_object_inline_componentStack_2478 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2485.memoizedState = + (JSCompiler_object_inline_componentStack_2478.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2485.childLanes = + (JSCompiler_object_inline_componentStack_2478.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2483, + JSCompiler_object_inline_digest_2476, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2484 + JSCompiler_object_inline_stack_2477 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2482 + JSCompiler_object_inline_message_2475 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2482 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2482) + ((JSCompiler_object_inline_message_2475 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2475) ) { if (didSuspend) workInProgress.flags & 256 @@ -9300,94 +9271,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2485 = - JSCompiler_object_inline_stack_2484.fallback), - (JSCompiler_object_inline_message_2482 = workInProgress.mode), - (JSCompiler_object_inline_stack_2484 = + (JSCompiler_object_inline_componentStack_2478 = + JSCompiler_object_inline_stack_2477.fallback), + (JSCompiler_object_inline_message_2475 = workInProgress.mode), + (JSCompiler_object_inline_stack_2477 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2484.children + children: JSCompiler_object_inline_stack_2477.children }, - JSCompiler_object_inline_message_2482 + JSCompiler_object_inline_message_2475 )), - (JSCompiler_object_inline_componentStack_2485 = + (JSCompiler_object_inline_componentStack_2478 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2485, - JSCompiler_object_inline_message_2482, + JSCompiler_object_inline_componentStack_2478, + JSCompiler_object_inline_message_2475, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2485.flags |= 2), - (JSCompiler_object_inline_stack_2484.return = workInProgress), - (JSCompiler_object_inline_componentStack_2485.return = + (JSCompiler_object_inline_componentStack_2478.flags |= 2), + (JSCompiler_object_inline_stack_2477.return = workInProgress), + (JSCompiler_object_inline_componentStack_2478.return = workInProgress), - (JSCompiler_object_inline_stack_2484.sibling = - JSCompiler_object_inline_componentStack_2485), - (workInProgress.child = JSCompiler_object_inline_stack_2484), + (JSCompiler_object_inline_stack_2477.sibling = + JSCompiler_object_inline_componentStack_2478), + (workInProgress.child = JSCompiler_object_inline_stack_2477), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2484 = workInProgress.child), - (JSCompiler_object_inline_stack_2484.memoizedState = + (JSCompiler_object_inline_stack_2477 = workInProgress.child), + (JSCompiler_object_inline_stack_2477.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2484.childLanes = + (JSCompiler_object_inline_stack_2477.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2483, + JSCompiler_object_inline_digest_2476, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2485)); + JSCompiler_object_inline_componentStack_2478)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2482)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2475)) ) { - JSCompiler_object_inline_digest_2483 = - JSCompiler_object_inline_message_2482.nextSibling && - JSCompiler_object_inline_message_2482.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2483) { - JSCompiler_temp = JSCompiler_object_inline_digest_2483.dgst; - var message = JSCompiler_object_inline_digest_2483.msg; - instance = JSCompiler_object_inline_digest_2483.stck; - var componentStack = JSCompiler_object_inline_digest_2483.cstck; + JSCompiler_object_inline_digest_2476 = + JSCompiler_object_inline_message_2475.nextSibling && + JSCompiler_object_inline_message_2475.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2476) { + JSCompiler_temp = JSCompiler_object_inline_digest_2476.dgst; + var message = JSCompiler_object_inline_digest_2476.msg; + instance = JSCompiler_object_inline_digest_2476.stck; + var componentStack = JSCompiler_object_inline_digest_2476.cstck; } - JSCompiler_object_inline_message_2482 = message; - JSCompiler_object_inline_digest_2483 = JSCompiler_temp; - JSCompiler_object_inline_stack_2484 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2485 = + JSCompiler_object_inline_message_2475 = message; + JSCompiler_object_inline_digest_2476 = JSCompiler_temp; + JSCompiler_object_inline_stack_2477 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2478 = componentStack; - JSCompiler_object_inline_componentStack_2485 = - JSCompiler_object_inline_message_2482 - ? Error(JSCompiler_object_inline_message_2482) + JSCompiler_object_inline_componentStack_2478 = + JSCompiler_object_inline_message_2475 + ? Error(JSCompiler_object_inline_message_2475) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2485.stack = - JSCompiler_object_inline_stack_2484 || ""; - JSCompiler_object_inline_componentStack_2485.digest = - JSCompiler_object_inline_digest_2483; - JSCompiler_object_inline_digest_2483 = + JSCompiler_object_inline_componentStack_2478.stack = + JSCompiler_object_inline_stack_2477 || ""; + JSCompiler_object_inline_componentStack_2478.digest = + JSCompiler_object_inline_digest_2476; + JSCompiler_object_inline_digest_2476 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2484 = { - value: JSCompiler_object_inline_componentStack_2485, + JSCompiler_object_inline_stack_2477 = { + value: JSCompiler_object_inline_componentStack_2478, source: null, - stack: JSCompiler_object_inline_digest_2483 + stack: JSCompiler_object_inline_digest_2476 }; - "string" === typeof JSCompiler_object_inline_digest_2483 && + "string" === typeof JSCompiler_object_inline_digest_2476 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2485, - JSCompiler_object_inline_stack_2484 + JSCompiler_object_inline_componentStack_2478, + JSCompiler_object_inline_stack_2477 ); - queueHydrationError(JSCompiler_object_inline_stack_2484); + queueHydrationError(JSCompiler_object_inline_stack_2477); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9401,44 +9372,44 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2483 = + (JSCompiler_object_inline_digest_2476 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2483) + didReceiveUpdate || JSCompiler_object_inline_digest_2476) ) { - JSCompiler_object_inline_digest_2483 = workInProgressRoot; + JSCompiler_object_inline_digest_2476 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_digest_2483 && - ((JSCompiler_object_inline_stack_2484 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2484 = - 0 !== (JSCompiler_object_inline_stack_2484 & 42) + null !== JSCompiler_object_inline_digest_2476 && + ((JSCompiler_object_inline_stack_2477 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2477 = + 0 !== (JSCompiler_object_inline_stack_2477 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2484 + JSCompiler_object_inline_stack_2477 )), - (JSCompiler_object_inline_stack_2484 = + (JSCompiler_object_inline_stack_2477 = 0 !== - (JSCompiler_object_inline_stack_2484 & - (JSCompiler_object_inline_digest_2483.suspendedLanes | + (JSCompiler_object_inline_stack_2477 & + (JSCompiler_object_inline_digest_2476.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2484), - 0 !== JSCompiler_object_inline_stack_2484 && - JSCompiler_object_inline_stack_2484 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2477), + 0 !== JSCompiler_object_inline_stack_2477 && + JSCompiler_object_inline_stack_2477 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2484), + ((prevState.retryLane = JSCompiler_object_inline_stack_2477), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2484 + JSCompiler_object_inline_stack_2477 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2483, + JSCompiler_object_inline_digest_2476, current, - JSCompiler_object_inline_stack_2484 + JSCompiler_object_inline_stack_2477 ), SelectiveHydrationException) ); - JSCompiler_object_inline_message_2482.data === + JSCompiler_object_inline_message_2475.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9446,14 +9417,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2482.data === + JSCompiler_object_inline_message_2475.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2482.nextSibling + JSCompiler_object_inline_message_2475.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9471,57 +9442,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2484.children + JSCompiler_object_inline_stack_2477.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2485) + if (JSCompiler_object_inline_componentStack_2478) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2485 = - JSCompiler_object_inline_stack_2484.fallback), - (JSCompiler_object_inline_message_2482 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2478 = + JSCompiler_object_inline_stack_2477.fallback), + (JSCompiler_object_inline_message_2475 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2484 = createWorkInProgress( + (JSCompiler_object_inline_stack_2477 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2484.children + children: JSCompiler_object_inline_stack_2477.children } )), - (JSCompiler_object_inline_stack_2484.subtreeFlags = + (JSCompiler_object_inline_stack_2477.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2485 = + ? (JSCompiler_object_inline_componentStack_2478 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2485 + JSCompiler_object_inline_componentStack_2478 )) - : ((JSCompiler_object_inline_componentStack_2485 = + : ((JSCompiler_object_inline_componentStack_2478 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2485, - JSCompiler_object_inline_message_2482, + JSCompiler_object_inline_componentStack_2478, + JSCompiler_object_inline_message_2475, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2485.flags |= 2)), - (JSCompiler_object_inline_componentStack_2485.return = + (JSCompiler_object_inline_componentStack_2478.flags |= 2)), + (JSCompiler_object_inline_componentStack_2478.return = workInProgress), - (JSCompiler_object_inline_stack_2484.return = workInProgress), - (JSCompiler_object_inline_stack_2484.sibling = - JSCompiler_object_inline_componentStack_2485), - (workInProgress.child = JSCompiler_object_inline_stack_2484), - (JSCompiler_object_inline_stack_2484 = - JSCompiler_object_inline_componentStack_2485), - (JSCompiler_object_inline_componentStack_2485 = workInProgress.child), - (JSCompiler_object_inline_message_2482 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2482 - ? (JSCompiler_object_inline_message_2482 = + (JSCompiler_object_inline_stack_2477.return = workInProgress), + (JSCompiler_object_inline_stack_2477.sibling = + JSCompiler_object_inline_componentStack_2478), + (workInProgress.child = JSCompiler_object_inline_stack_2477), + (JSCompiler_object_inline_stack_2477 = + JSCompiler_object_inline_componentStack_2478), + (JSCompiler_object_inline_componentStack_2478 = workInProgress.child), + (JSCompiler_object_inline_message_2475 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2475 + ? (JSCompiler_object_inline_message_2475 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2482.cachePool), + JSCompiler_object_inline_message_2475.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9529,34 +9500,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2482 = { + (JSCompiler_object_inline_message_2475 = { baseLanes: - JSCompiler_object_inline_message_2482.baseLanes | renderLanes, + JSCompiler_object_inline_message_2475.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2485.memoizedState = - JSCompiler_object_inline_message_2482), + (JSCompiler_object_inline_componentStack_2478.memoizedState = + JSCompiler_object_inline_message_2475), enableTransitionTracing && - ((JSCompiler_object_inline_message_2482 = enableTransitionTracing + ((JSCompiler_object_inline_message_2475 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2482 && + null !== JSCompiler_object_inline_message_2475 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2485.updateQueue), + JSCompiler_object_inline_componentStack_2478.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2485.updateQueue = { - transitions: JSCompiler_object_inline_message_2482, + ? (JSCompiler_object_inline_componentStack_2478.updateQueue = { + transitions: JSCompiler_object_inline_message_2475, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2485.updateQueue = + ? (JSCompiler_object_inline_componentStack_2478.updateQueue = { - transitions: JSCompiler_object_inline_message_2482, + transitions: JSCompiler_object_inline_message_2475, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9564,32 +9535,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2482), + JSCompiler_object_inline_message_2475), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2485.childLanes = + (JSCompiler_object_inline_componentStack_2478.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2483, + JSCompiler_object_inline_digest_2476, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2484 + JSCompiler_object_inline_stack_2477 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2484.children + children: JSCompiler_object_inline_stack_2477.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2483 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2483 + ((JSCompiler_object_inline_digest_2476 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2476 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2483.push(current)); + : JSCompiler_object_inline_digest_2476.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10872,19 +10843,8 @@ __DEV__ && a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -10982,37 +10942,19 @@ __DEV__ && ); workInProgress.flags |= 262144; } - function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue - ) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error("Compared context values must be arrays"); - return !1; - } function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -24742,8 +24684,6 @@ __DEV__ && ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); - ContextOnlyDispatcher.unstable_useContextWithBailout = - throwInvalidHookError; var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, @@ -24917,14 +24857,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnMountWithHookTypesInDEV = { readContext: function (context) { return readContext(context); @@ -25077,12 +25009,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountWithHookTypesInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnUpdateInDEV = { readContext: function (context) { return readContext(context); @@ -25237,14 +25163,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnRerenderInDEV = { readContext: function (context) { return readContext(context); @@ -25399,14 +25317,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnMountInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -25585,13 +25495,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnMountInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnUpdateInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -25772,13 +25675,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnRerenderInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -25954,13 +25850,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; var callComponent = { "react-stack-bottom-frame": function (Component, props, secondArg) { var wasRendering = isRendering; @@ -27269,11 +27158,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.1.0-www-modern-e06c72fc-20241215" !== isomorphicReactPackageVersion) + if ("19.1.0-www-modern-d4287258-20241217" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.1.0-www-modern-e06c72fc-20241215\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.1.0-www-modern-d4287258-20241217\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27316,10 +27205,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.1.0-www-modern-e06c72fc-20241215", + version: "19.1.0-www-modern-d4287258-20241217", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27926,7 +27815,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.1.0-www-modern-e06c72fc-20241215"; + exports.version = "19.1.0-www-modern-d4287258-20241217"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index 40c82c29e8a25..dbcd478783adc 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -2765,28 +2765,6 @@ function updateWorkInProgressHook() { } return workInProgressHook; } -function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - JSCompiler_temp.dependencies = { lanes: 0, firstContext: context }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; -} function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -3870,7 +3848,6 @@ var ContextOnlyDispatcher = { ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); -ContextOnlyDispatcher.unstable_useContextWithBailout = throwInvalidHookError; var HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -4074,8 +4051,6 @@ var HooksDispatcherOnMount = { }; enableUseResourceEffectHook && (HooksDispatcherOnMount.useResourceEffect = mountResourceEffect); -HooksDispatcherOnMount.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnUpdate = { readContext: readContext, use: use, @@ -4126,8 +4101,6 @@ var HooksDispatcherOnUpdate = { HooksDispatcherOnUpdate.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect); -HooksDispatcherOnUpdate.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnRerender = { readContext: readContext, use: use, @@ -4183,8 +4156,6 @@ var HooksDispatcherOnRerender = { HooksDispatcherOnRerender.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect); -HooksDispatcherOnRerender.unstable_useContextWithBailout = - unstable_useContextWithBailout; var thenableState = null, thenableIndexCounter = 0; function unwrapThenable(thenable) { @@ -7365,19 +7336,8 @@ function propagateContextChanges( a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -7464,37 +7424,19 @@ function propagateParentContextChanges( ); workInProgress.flags |= 262144; } -function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue -) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error(formatProdErrorMessage(541)); - return !1; -} function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -17274,14 +17216,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1765 = React.version; if ( - "19.1.0-www-classic-e06c72fc-20241215" !== + "19.1.0-www-classic-d4287258-20241217" !== isomorphicReactPackageVersion$jscomp$inline_1765 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1765, - "19.1.0-www-classic-e06c72fc-20241215" + "19.1.0-www-classic-d4287258-20241217" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17297,24 +17239,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2306 = { +var internals$jscomp$inline_2299 = { bundleType: 0, - version: "19.1.0-www-classic-e06c72fc-20241215", + version: "19.1.0-www-classic-d4287258-20241217", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2307 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2300 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2307.isDisabled && - hook$jscomp$inline_2307.supportsFiber + !hook$jscomp$inline_2300.isDisabled && + hook$jscomp$inline_2300.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2307.inject( - internals$jscomp$inline_2306 + (rendererID = hook$jscomp$inline_2300.inject( + internals$jscomp$inline_2299 )), - (injectedHook = hook$jscomp$inline_2307); + (injectedHook = hook$jscomp$inline_2300); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17667,4 +17609,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-classic-e06c72fc-20241215"; +exports.version = "19.1.0-www-classic-d4287258-20241217"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 413bb1faf0e41..9ca8f9b630f29 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -2616,28 +2616,6 @@ function updateWorkInProgressHook() { } return workInProgressHook; } -function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - JSCompiler_temp.dependencies = { lanes: 0, firstContext: context }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; -} function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -3721,7 +3699,6 @@ var ContextOnlyDispatcher = { ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); -ContextOnlyDispatcher.unstable_useContextWithBailout = throwInvalidHookError; var HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -3925,8 +3902,6 @@ var HooksDispatcherOnMount = { }; enableUseResourceEffectHook && (HooksDispatcherOnMount.useResourceEffect = mountResourceEffect); -HooksDispatcherOnMount.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnUpdate = { readContext: readContext, use: use, @@ -3977,8 +3952,6 @@ var HooksDispatcherOnUpdate = { HooksDispatcherOnUpdate.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect); -HooksDispatcherOnUpdate.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnRerender = { readContext: readContext, use: use, @@ -4034,8 +4007,6 @@ var HooksDispatcherOnRerender = { HooksDispatcherOnRerender.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect); -HooksDispatcherOnRerender.unstable_useContextWithBailout = - unstable_useContextWithBailout; var thenableState = null, thenableIndexCounter = 0; function unwrapThenable(thenable) { @@ -7135,19 +7106,8 @@ function propagateContextChanges( a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -7234,37 +7194,19 @@ function propagateParentContextChanges( ); workInProgress.flags |= 262144; } -function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue -) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error(formatProdErrorMessage(541)); - return !1; -} function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -17005,14 +16947,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1755 = React.version; if ( - "19.1.0-www-modern-e06c72fc-20241215" !== + "19.1.0-www-modern-d4287258-20241217" !== isomorphicReactPackageVersion$jscomp$inline_1755 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1755, - "19.1.0-www-modern-e06c72fc-20241215" + "19.1.0-www-modern-d4287258-20241217" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17028,24 +16970,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2288 = { +var internals$jscomp$inline_2281 = { bundleType: 0, - version: "19.1.0-www-modern-e06c72fc-20241215", + version: "19.1.0-www-modern-d4287258-20241217", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2289 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2282 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2289.isDisabled && - hook$jscomp$inline_2289.supportsFiber + !hook$jscomp$inline_2282.isDisabled && + hook$jscomp$inline_2282.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2289.inject( - internals$jscomp$inline_2288 + (rendererID = hook$jscomp$inline_2282.inject( + internals$jscomp$inline_2281 )), - (injectedHook = hook$jscomp$inline_2289); + (injectedHook = hook$jscomp$inline_2282); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17398,4 +17340,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-modern-e06c72fc-20241215"; +exports.version = "19.1.0-www-modern-d4287258-20241217"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index dec6bb7938b34..c0e8d9e275a74 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -2933,28 +2933,6 @@ function updateWorkInProgressHook() { } return workInProgressHook; } -function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - JSCompiler_temp.dependencies = { lanes: 0, firstContext: context }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; -} function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -4041,7 +4019,6 @@ var ContextOnlyDispatcher = { ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); -ContextOnlyDispatcher.unstable_useContextWithBailout = throwInvalidHookError; var HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -4245,8 +4222,6 @@ var HooksDispatcherOnMount = { }; enableUseResourceEffectHook && (HooksDispatcherOnMount.useResourceEffect = mountResourceEffect); -HooksDispatcherOnMount.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnUpdate = { readContext: readContext, use: use, @@ -4297,8 +4272,6 @@ var HooksDispatcherOnUpdate = { HooksDispatcherOnUpdate.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect); -HooksDispatcherOnUpdate.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnRerender = { readContext: readContext, use: use, @@ -4354,8 +4327,6 @@ var HooksDispatcherOnRerender = { HooksDispatcherOnRerender.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect); -HooksDispatcherOnRerender.unstable_useContextWithBailout = - unstable_useContextWithBailout; var thenableState = null, thenableIndexCounter = 0; function unwrapThenable(thenable) { @@ -7569,19 +7540,8 @@ function propagateContextChanges( a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -7668,37 +7628,19 @@ function propagateParentContextChanges( ); workInProgress.flags |= 262144; } -function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue -) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error(formatProdErrorMessage(541)); - return !1; -} function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -17963,14 +17905,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1858 = React.version; if ( - "19.1.0-www-classic-e06c72fc-20241215" !== + "19.1.0-www-classic-d4287258-20241217" !== isomorphicReactPackageVersion$jscomp$inline_1858 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1858, - "19.1.0-www-classic-e06c72fc-20241215" + "19.1.0-www-classic-d4287258-20241217" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17988,25 +17930,25 @@ Internals.Events = [ ]; var internals$jscomp$inline_1860 = { bundleType: 0, - version: "19.1.0-www-classic-e06c72fc-20241215", + version: "19.1.0-www-classic-d4287258-20241217", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" }; enableSchedulingProfiler && ((internals$jscomp$inline_1860.getLaneLabelMap = getLaneLabelMap), (internals$jscomp$inline_1860.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2358 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2351 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2358.isDisabled && - hook$jscomp$inline_2358.supportsFiber + !hook$jscomp$inline_2351.isDisabled && + hook$jscomp$inline_2351.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2358.inject( + (rendererID = hook$jscomp$inline_2351.inject( internals$jscomp$inline_1860 )), - (injectedHook = hook$jscomp$inline_2358); + (injectedHook = hook$jscomp$inline_2351); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18359,7 +18301,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-classic-e06c72fc-20241215"; +exports.version = "19.1.0-www-classic-d4287258-20241217"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index 5f44a806c8cac..0373846558cee 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -2784,28 +2784,6 @@ function updateWorkInProgressHook() { } return workInProgressHook; } -function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - JSCompiler_temp.dependencies = { lanes: 0, firstContext: context }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; -} function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -3892,7 +3870,6 @@ var ContextOnlyDispatcher = { ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); -ContextOnlyDispatcher.unstable_useContextWithBailout = throwInvalidHookError; var HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -4096,8 +4073,6 @@ var HooksDispatcherOnMount = { }; enableUseResourceEffectHook && (HooksDispatcherOnMount.useResourceEffect = mountResourceEffect); -HooksDispatcherOnMount.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnUpdate = { readContext: readContext, use: use, @@ -4148,8 +4123,6 @@ var HooksDispatcherOnUpdate = { HooksDispatcherOnUpdate.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect); -HooksDispatcherOnUpdate.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnRerender = { readContext: readContext, use: use, @@ -4205,8 +4178,6 @@ var HooksDispatcherOnRerender = { HooksDispatcherOnRerender.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect); -HooksDispatcherOnRerender.unstable_useContextWithBailout = - unstable_useContextWithBailout; var thenableState = null, thenableIndexCounter = 0; function unwrapThenable(thenable) { @@ -7338,19 +7309,8 @@ function propagateContextChanges( a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -7437,37 +7397,19 @@ function propagateParentContextChanges( ); workInProgress.flags |= 262144; } -function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue -) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error(formatProdErrorMessage(541)); - return !1; -} function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -17693,14 +17635,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1848 = React.version; if ( - "19.1.0-www-modern-e06c72fc-20241215" !== + "19.1.0-www-modern-d4287258-20241217" !== isomorphicReactPackageVersion$jscomp$inline_1848 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1848, - "19.1.0-www-modern-e06c72fc-20241215" + "19.1.0-www-modern-d4287258-20241217" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17718,25 +17660,25 @@ Internals.Events = [ ]; var internals$jscomp$inline_1850 = { bundleType: 0, - version: "19.1.0-www-modern-e06c72fc-20241215", + version: "19.1.0-www-modern-d4287258-20241217", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" }; enableSchedulingProfiler && ((internals$jscomp$inline_1850.getLaneLabelMap = getLaneLabelMap), (internals$jscomp$inline_1850.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2340 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2333 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2340.isDisabled && - hook$jscomp$inline_2340.supportsFiber + !hook$jscomp$inline_2333.isDisabled && + hook$jscomp$inline_2333.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2340.inject( + (rendererID = hook$jscomp$inline_2333.inject( internals$jscomp$inline_1850 )), - (injectedHook = hook$jscomp$inline_2340); + (injectedHook = hook$jscomp$inline_2333); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18089,7 +18031,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-modern-e06c72fc-20241215"; +exports.version = "19.1.0-www-modern-d4287258-20241217"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index 6a4947496346e..a792d9536e0ee 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -9150,5 +9150,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.1.0-www-classic-e06c72fc-20241215"; + exports.version = "19.1.0-www-classic-d4287258-20241217"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 81ca0822e99ec..5c26d0999436e 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -8976,5 +8976,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.1.0-www-modern-e06c72fc-20241215"; + exports.version = "19.1.0-www-modern-d4287258-20241217"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 61a45fb2b6860..8413be7e7ef2f 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -5898,4 +5898,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.1.0-www-classic-e06c72fc-20241215"; +exports.version = "19.1.0-www-classic-d4287258-20241217"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 83a061a3f4df2..fb523933f7332 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -5810,4 +5810,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.1.0-www-modern-e06c72fc-20241215"; +exports.version = "19.1.0-www-modern-d4287258-20241217"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index b76fe672bf00d..d6d844bfcf393 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -4990,35 +4990,6 @@ __DEV__ && } return workInProgressHook; } - function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - JSCompiler_temp.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; - } function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -9345,32 +9316,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2525; - var JSCompiler_object_inline_stack_2526 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2518; + var JSCompiler_object_inline_stack_2519 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2527 = !1; + var JSCompiler_object_inline_componentStack_2520 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2525 = didSuspend) || - (JSCompiler_object_inline_digest_2525 = + (JSCompiler_object_inline_digest_2518 = didSuspend) || + (JSCompiler_object_inline_digest_2518 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2525 && - ((JSCompiler_object_inline_componentStack_2527 = !0), + JSCompiler_object_inline_digest_2518 && + ((JSCompiler_object_inline_componentStack_2520 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2525 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2518 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2527 + JSCompiler_object_inline_componentStack_2520 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2524 = nextHydratableInstance; + var JSCompiler_object_inline_message_2517 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2524)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2517)) { c: { - var instance = JSCompiler_object_inline_message_2524; + var instance = JSCompiler_object_inline_message_2517; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9411,46 +9382,46 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2524 + JSCompiler_object_inline_message_2517 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2524 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2517 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2524 && - ((JSCompiler_object_inline_message_2524 = - JSCompiler_object_inline_message_2524.dehydrated), - null !== JSCompiler_object_inline_message_2524) + null !== JSCompiler_object_inline_message_2517 && + ((JSCompiler_object_inline_message_2517 = + JSCompiler_object_inline_message_2517.dehydrated), + null !== JSCompiler_object_inline_message_2517) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2524) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2517) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2524 = - JSCompiler_object_inline_stack_2526.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2526.fallback; - if (JSCompiler_object_inline_componentStack_2527) + JSCompiler_object_inline_message_2517 = + JSCompiler_object_inline_stack_2519.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2519.fallback; + if (JSCompiler_object_inline_componentStack_2520) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2526 = + (JSCompiler_object_inline_stack_2519 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2524, + JSCompiler_object_inline_message_2517, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2527 = + (JSCompiler_object_inline_componentStack_2520 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2527.memoizedState = + (JSCompiler_object_inline_componentStack_2520.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2527.childLanes = + (JSCompiler_object_inline_componentStack_2520.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2525, + JSCompiler_object_inline_digest_2518, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9463,9 +9434,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2527.updateQueue), + JSCompiler_object_inline_componentStack_2520.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2527.updateQueue = + ? (JSCompiler_object_inline_componentStack_2520.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9473,46 +9444,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2526 + JSCompiler_object_inline_stack_2519 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2526.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2519.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2526 = + (JSCompiler_object_inline_stack_2519 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2524, + JSCompiler_object_inline_message_2517, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2527 = + (JSCompiler_object_inline_componentStack_2520 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2527.memoizedState = + (JSCompiler_object_inline_componentStack_2520.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2527.childLanes = + (JSCompiler_object_inline_componentStack_2520.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2525, + JSCompiler_object_inline_digest_2518, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2526 + JSCompiler_object_inline_stack_2519 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2524 + JSCompiler_object_inline_message_2517 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2524 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2524) + ((JSCompiler_object_inline_message_2517 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2517) ) { if (didSuspend) workInProgress.flags & 256 @@ -9529,94 +9500,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2527 = - JSCompiler_object_inline_stack_2526.fallback), - (JSCompiler_object_inline_message_2524 = workInProgress.mode), - (JSCompiler_object_inline_stack_2526 = + (JSCompiler_object_inline_componentStack_2520 = + JSCompiler_object_inline_stack_2519.fallback), + (JSCompiler_object_inline_message_2517 = workInProgress.mode), + (JSCompiler_object_inline_stack_2519 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2526.children + children: JSCompiler_object_inline_stack_2519.children }, - JSCompiler_object_inline_message_2524 + JSCompiler_object_inline_message_2517 )), - (JSCompiler_object_inline_componentStack_2527 = + (JSCompiler_object_inline_componentStack_2520 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2527, - JSCompiler_object_inline_message_2524, + JSCompiler_object_inline_componentStack_2520, + JSCompiler_object_inline_message_2517, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2527.flags |= 2), - (JSCompiler_object_inline_stack_2526.return = workInProgress), - (JSCompiler_object_inline_componentStack_2527.return = + (JSCompiler_object_inline_componentStack_2520.flags |= 2), + (JSCompiler_object_inline_stack_2519.return = workInProgress), + (JSCompiler_object_inline_componentStack_2520.return = workInProgress), - (JSCompiler_object_inline_stack_2526.sibling = - JSCompiler_object_inline_componentStack_2527), - (workInProgress.child = JSCompiler_object_inline_stack_2526), + (JSCompiler_object_inline_stack_2519.sibling = + JSCompiler_object_inline_componentStack_2520), + (workInProgress.child = JSCompiler_object_inline_stack_2519), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2526 = workInProgress.child), - (JSCompiler_object_inline_stack_2526.memoizedState = + (JSCompiler_object_inline_stack_2519 = workInProgress.child), + (JSCompiler_object_inline_stack_2519.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2526.childLanes = + (JSCompiler_object_inline_stack_2519.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2525, + JSCompiler_object_inline_digest_2518, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2527)); + JSCompiler_object_inline_componentStack_2520)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2524)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2517)) ) { - JSCompiler_object_inline_digest_2525 = - JSCompiler_object_inline_message_2524.nextSibling && - JSCompiler_object_inline_message_2524.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2525) { - JSCompiler_temp = JSCompiler_object_inline_digest_2525.dgst; - var message = JSCompiler_object_inline_digest_2525.msg; - instance = JSCompiler_object_inline_digest_2525.stck; - var componentStack = JSCompiler_object_inline_digest_2525.cstck; + JSCompiler_object_inline_digest_2518 = + JSCompiler_object_inline_message_2517.nextSibling && + JSCompiler_object_inline_message_2517.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2518) { + JSCompiler_temp = JSCompiler_object_inline_digest_2518.dgst; + var message = JSCompiler_object_inline_digest_2518.msg; + instance = JSCompiler_object_inline_digest_2518.stck; + var componentStack = JSCompiler_object_inline_digest_2518.cstck; } - JSCompiler_object_inline_message_2524 = message; - JSCompiler_object_inline_digest_2525 = JSCompiler_temp; - JSCompiler_object_inline_stack_2526 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2527 = + JSCompiler_object_inline_message_2517 = message; + JSCompiler_object_inline_digest_2518 = JSCompiler_temp; + JSCompiler_object_inline_stack_2519 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2520 = componentStack; - JSCompiler_object_inline_componentStack_2527 = - JSCompiler_object_inline_message_2524 - ? Error(JSCompiler_object_inline_message_2524) + JSCompiler_object_inline_componentStack_2520 = + JSCompiler_object_inline_message_2517 + ? Error(JSCompiler_object_inline_message_2517) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2527.stack = - JSCompiler_object_inline_stack_2526 || ""; - JSCompiler_object_inline_componentStack_2527.digest = - JSCompiler_object_inline_digest_2525; - JSCompiler_object_inline_digest_2525 = + JSCompiler_object_inline_componentStack_2520.stack = + JSCompiler_object_inline_stack_2519 || ""; + JSCompiler_object_inline_componentStack_2520.digest = + JSCompiler_object_inline_digest_2518; + JSCompiler_object_inline_digest_2518 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2526 = { - value: JSCompiler_object_inline_componentStack_2527, + JSCompiler_object_inline_stack_2519 = { + value: JSCompiler_object_inline_componentStack_2520, source: null, - stack: JSCompiler_object_inline_digest_2525 + stack: JSCompiler_object_inline_digest_2518 }; - "string" === typeof JSCompiler_object_inline_digest_2525 && + "string" === typeof JSCompiler_object_inline_digest_2518 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2527, - JSCompiler_object_inline_stack_2526 + JSCompiler_object_inline_componentStack_2520, + JSCompiler_object_inline_stack_2519 ); - queueHydrationError(JSCompiler_object_inline_stack_2526); + queueHydrationError(JSCompiler_object_inline_stack_2519); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9630,44 +9601,44 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2525 = + (JSCompiler_object_inline_digest_2518 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2525) + didReceiveUpdate || JSCompiler_object_inline_digest_2518) ) { - JSCompiler_object_inline_digest_2525 = workInProgressRoot; + JSCompiler_object_inline_digest_2518 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_digest_2525 && - ((JSCompiler_object_inline_stack_2526 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2526 = - 0 !== (JSCompiler_object_inline_stack_2526 & 42) + null !== JSCompiler_object_inline_digest_2518 && + ((JSCompiler_object_inline_stack_2519 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2519 = + 0 !== (JSCompiler_object_inline_stack_2519 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2526 + JSCompiler_object_inline_stack_2519 )), - (JSCompiler_object_inline_stack_2526 = + (JSCompiler_object_inline_stack_2519 = 0 !== - (JSCompiler_object_inline_stack_2526 & - (JSCompiler_object_inline_digest_2525.suspendedLanes | + (JSCompiler_object_inline_stack_2519 & + (JSCompiler_object_inline_digest_2518.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2526), - 0 !== JSCompiler_object_inline_stack_2526 && - JSCompiler_object_inline_stack_2526 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2519), + 0 !== JSCompiler_object_inline_stack_2519 && + JSCompiler_object_inline_stack_2519 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2526), + ((prevState.retryLane = JSCompiler_object_inline_stack_2519), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2526 + JSCompiler_object_inline_stack_2519 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2525, + JSCompiler_object_inline_digest_2518, current, - JSCompiler_object_inline_stack_2526 + JSCompiler_object_inline_stack_2519 ), SelectiveHydrationException) ); - JSCompiler_object_inline_message_2524.data === + JSCompiler_object_inline_message_2517.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9675,14 +9646,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2524.data === + JSCompiler_object_inline_message_2517.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2524.nextSibling + JSCompiler_object_inline_message_2517.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9700,57 +9671,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2526.children + JSCompiler_object_inline_stack_2519.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2527) + if (JSCompiler_object_inline_componentStack_2520) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2527 = - JSCompiler_object_inline_stack_2526.fallback), - (JSCompiler_object_inline_message_2524 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2520 = + JSCompiler_object_inline_stack_2519.fallback), + (JSCompiler_object_inline_message_2517 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2526 = createWorkInProgress( + (JSCompiler_object_inline_stack_2519 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2526.children + children: JSCompiler_object_inline_stack_2519.children } )), - (JSCompiler_object_inline_stack_2526.subtreeFlags = + (JSCompiler_object_inline_stack_2519.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2527 = + ? (JSCompiler_object_inline_componentStack_2520 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2527 + JSCompiler_object_inline_componentStack_2520 )) - : ((JSCompiler_object_inline_componentStack_2527 = + : ((JSCompiler_object_inline_componentStack_2520 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2527, - JSCompiler_object_inline_message_2524, + JSCompiler_object_inline_componentStack_2520, + JSCompiler_object_inline_message_2517, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2527.flags |= 2)), - (JSCompiler_object_inline_componentStack_2527.return = + (JSCompiler_object_inline_componentStack_2520.flags |= 2)), + (JSCompiler_object_inline_componentStack_2520.return = workInProgress), - (JSCompiler_object_inline_stack_2526.return = workInProgress), - (JSCompiler_object_inline_stack_2526.sibling = - JSCompiler_object_inline_componentStack_2527), - (workInProgress.child = JSCompiler_object_inline_stack_2526), - (JSCompiler_object_inline_stack_2526 = - JSCompiler_object_inline_componentStack_2527), - (JSCompiler_object_inline_componentStack_2527 = workInProgress.child), - (JSCompiler_object_inline_message_2524 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2524 - ? (JSCompiler_object_inline_message_2524 = + (JSCompiler_object_inline_stack_2519.return = workInProgress), + (JSCompiler_object_inline_stack_2519.sibling = + JSCompiler_object_inline_componentStack_2520), + (workInProgress.child = JSCompiler_object_inline_stack_2519), + (JSCompiler_object_inline_stack_2519 = + JSCompiler_object_inline_componentStack_2520), + (JSCompiler_object_inline_componentStack_2520 = workInProgress.child), + (JSCompiler_object_inline_message_2517 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2517 + ? (JSCompiler_object_inline_message_2517 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2524.cachePool), + JSCompiler_object_inline_message_2517.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9758,34 +9729,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2524 = { + (JSCompiler_object_inline_message_2517 = { baseLanes: - JSCompiler_object_inline_message_2524.baseLanes | renderLanes, + JSCompiler_object_inline_message_2517.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2527.memoizedState = - JSCompiler_object_inline_message_2524), + (JSCompiler_object_inline_componentStack_2520.memoizedState = + JSCompiler_object_inline_message_2517), enableTransitionTracing && - ((JSCompiler_object_inline_message_2524 = enableTransitionTracing + ((JSCompiler_object_inline_message_2517 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2524 && + null !== JSCompiler_object_inline_message_2517 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2527.updateQueue), + JSCompiler_object_inline_componentStack_2520.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2527.updateQueue = { - transitions: JSCompiler_object_inline_message_2524, + ? (JSCompiler_object_inline_componentStack_2520.updateQueue = { + transitions: JSCompiler_object_inline_message_2517, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2527.updateQueue = + ? (JSCompiler_object_inline_componentStack_2520.updateQueue = { - transitions: JSCompiler_object_inline_message_2524, + transitions: JSCompiler_object_inline_message_2517, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9793,32 +9764,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2524), + JSCompiler_object_inline_message_2517), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2527.childLanes = + (JSCompiler_object_inline_componentStack_2520.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2525, + JSCompiler_object_inline_digest_2518, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2526 + JSCompiler_object_inline_stack_2519 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2526.children + children: JSCompiler_object_inline_stack_2519.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2525 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2525 + ((JSCompiler_object_inline_digest_2518 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2518 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2525.push(current)); + : JSCompiler_object_inline_digest_2518.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -11100,19 +11071,8 @@ __DEV__ && a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -11210,37 +11170,19 @@ __DEV__ && ); workInProgress.flags |= 262144; } - function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue - ) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error("Compared context values must be arrays"); - return !1; - } function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -25290,8 +25232,6 @@ __DEV__ && ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); - ContextOnlyDispatcher.unstable_useContextWithBailout = - throwInvalidHookError; var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, @@ -25465,14 +25405,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnMountWithHookTypesInDEV = { readContext: function (context) { return readContext(context); @@ -25625,12 +25557,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountWithHookTypesInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnUpdateInDEV = { readContext: function (context) { return readContext(context); @@ -25785,14 +25711,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnRerenderInDEV = { readContext: function (context) { return readContext(context); @@ -25947,14 +25865,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnMountInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -26133,13 +26043,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnMountInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnUpdateInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -26320,13 +26223,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnRerenderInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -26502,13 +26398,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; var callComponent = { "react-stack-bottom-frame": function (Component, props, secondArg) { var wasRendering = isRendering; @@ -27824,11 +27713,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.1.0-www-classic-e06c72fc-20241215" !== isomorphicReactPackageVersion) + if ("19.1.0-www-classic-d4287258-20241217" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.1.0-www-classic-e06c72fc-20241215\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.1.0-www-classic-d4287258-20241217\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27871,10 +27760,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.1.0-www-classic-e06c72fc-20241215", + version: "19.1.0-www-classic-d4287258-20241217", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28647,5 +28536,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.1.0-www-classic-e06c72fc-20241215"; + exports.version = "19.1.0-www-classic-d4287258-20241217"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 3495d094c3a52..321a3efe7f59b 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -4877,35 +4877,6 @@ __DEV__ && } return workInProgressHook; } - function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - JSCompiler_temp.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; - } function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -9157,32 +9128,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2517; - var JSCompiler_object_inline_stack_2518 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2510; + var JSCompiler_object_inline_stack_2511 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2519 = !1; + var JSCompiler_object_inline_componentStack_2512 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2517 = didSuspend) || - (JSCompiler_object_inline_digest_2517 = + (JSCompiler_object_inline_digest_2510 = didSuspend) || + (JSCompiler_object_inline_digest_2510 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2517 && - ((JSCompiler_object_inline_componentStack_2519 = !0), + JSCompiler_object_inline_digest_2510 && + ((JSCompiler_object_inline_componentStack_2512 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2517 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2510 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2519 + JSCompiler_object_inline_componentStack_2512 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2516 = nextHydratableInstance; + var JSCompiler_object_inline_message_2509 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2516)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2509)) { c: { - var instance = JSCompiler_object_inline_message_2516; + var instance = JSCompiler_object_inline_message_2509; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9223,46 +9194,46 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2516 + JSCompiler_object_inline_message_2509 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2516 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2509 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2516 && - ((JSCompiler_object_inline_message_2516 = - JSCompiler_object_inline_message_2516.dehydrated), - null !== JSCompiler_object_inline_message_2516) + null !== JSCompiler_object_inline_message_2509 && + ((JSCompiler_object_inline_message_2509 = + JSCompiler_object_inline_message_2509.dehydrated), + null !== JSCompiler_object_inline_message_2509) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2516) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2509) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2516 = - JSCompiler_object_inline_stack_2518.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2518.fallback; - if (JSCompiler_object_inline_componentStack_2519) + JSCompiler_object_inline_message_2509 = + JSCompiler_object_inline_stack_2511.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2511.fallback; + if (JSCompiler_object_inline_componentStack_2512) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2518 = + (JSCompiler_object_inline_stack_2511 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2516, + JSCompiler_object_inline_message_2509, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2519 = + (JSCompiler_object_inline_componentStack_2512 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2519.memoizedState = + (JSCompiler_object_inline_componentStack_2512.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2519.childLanes = + (JSCompiler_object_inline_componentStack_2512.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2517, + JSCompiler_object_inline_digest_2510, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9275,9 +9246,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2519.updateQueue), + JSCompiler_object_inline_componentStack_2512.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2519.updateQueue = + ? (JSCompiler_object_inline_componentStack_2512.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9285,46 +9256,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2518 + JSCompiler_object_inline_stack_2511 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2518.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2511.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2518 = + (JSCompiler_object_inline_stack_2511 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2516, + JSCompiler_object_inline_message_2509, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2519 = + (JSCompiler_object_inline_componentStack_2512 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2519.memoizedState = + (JSCompiler_object_inline_componentStack_2512.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2519.childLanes = + (JSCompiler_object_inline_componentStack_2512.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2517, + JSCompiler_object_inline_digest_2510, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2518 + JSCompiler_object_inline_stack_2511 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2516 + JSCompiler_object_inline_message_2509 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2516 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2516) + ((JSCompiler_object_inline_message_2509 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2509) ) { if (didSuspend) workInProgress.flags & 256 @@ -9341,94 +9312,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2519 = - JSCompiler_object_inline_stack_2518.fallback), - (JSCompiler_object_inline_message_2516 = workInProgress.mode), - (JSCompiler_object_inline_stack_2518 = + (JSCompiler_object_inline_componentStack_2512 = + JSCompiler_object_inline_stack_2511.fallback), + (JSCompiler_object_inline_message_2509 = workInProgress.mode), + (JSCompiler_object_inline_stack_2511 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2518.children + children: JSCompiler_object_inline_stack_2511.children }, - JSCompiler_object_inline_message_2516 + JSCompiler_object_inline_message_2509 )), - (JSCompiler_object_inline_componentStack_2519 = + (JSCompiler_object_inline_componentStack_2512 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2519, - JSCompiler_object_inline_message_2516, + JSCompiler_object_inline_componentStack_2512, + JSCompiler_object_inline_message_2509, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2519.flags |= 2), - (JSCompiler_object_inline_stack_2518.return = workInProgress), - (JSCompiler_object_inline_componentStack_2519.return = + (JSCompiler_object_inline_componentStack_2512.flags |= 2), + (JSCompiler_object_inline_stack_2511.return = workInProgress), + (JSCompiler_object_inline_componentStack_2512.return = workInProgress), - (JSCompiler_object_inline_stack_2518.sibling = - JSCompiler_object_inline_componentStack_2519), - (workInProgress.child = JSCompiler_object_inline_stack_2518), + (JSCompiler_object_inline_stack_2511.sibling = + JSCompiler_object_inline_componentStack_2512), + (workInProgress.child = JSCompiler_object_inline_stack_2511), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2518 = workInProgress.child), - (JSCompiler_object_inline_stack_2518.memoizedState = + (JSCompiler_object_inline_stack_2511 = workInProgress.child), + (JSCompiler_object_inline_stack_2511.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2518.childLanes = + (JSCompiler_object_inline_stack_2511.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2517, + JSCompiler_object_inline_digest_2510, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2519)); + JSCompiler_object_inline_componentStack_2512)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2516)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2509)) ) { - JSCompiler_object_inline_digest_2517 = - JSCompiler_object_inline_message_2516.nextSibling && - JSCompiler_object_inline_message_2516.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2517) { - JSCompiler_temp = JSCompiler_object_inline_digest_2517.dgst; - var message = JSCompiler_object_inline_digest_2517.msg; - instance = JSCompiler_object_inline_digest_2517.stck; - var componentStack = JSCompiler_object_inline_digest_2517.cstck; + JSCompiler_object_inline_digest_2510 = + JSCompiler_object_inline_message_2509.nextSibling && + JSCompiler_object_inline_message_2509.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2510) { + JSCompiler_temp = JSCompiler_object_inline_digest_2510.dgst; + var message = JSCompiler_object_inline_digest_2510.msg; + instance = JSCompiler_object_inline_digest_2510.stck; + var componentStack = JSCompiler_object_inline_digest_2510.cstck; } - JSCompiler_object_inline_message_2516 = message; - JSCompiler_object_inline_digest_2517 = JSCompiler_temp; - JSCompiler_object_inline_stack_2518 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2519 = + JSCompiler_object_inline_message_2509 = message; + JSCompiler_object_inline_digest_2510 = JSCompiler_temp; + JSCompiler_object_inline_stack_2511 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2512 = componentStack; - JSCompiler_object_inline_componentStack_2519 = - JSCompiler_object_inline_message_2516 - ? Error(JSCompiler_object_inline_message_2516) + JSCompiler_object_inline_componentStack_2512 = + JSCompiler_object_inline_message_2509 + ? Error(JSCompiler_object_inline_message_2509) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2519.stack = - JSCompiler_object_inline_stack_2518 || ""; - JSCompiler_object_inline_componentStack_2519.digest = - JSCompiler_object_inline_digest_2517; - JSCompiler_object_inline_digest_2517 = + JSCompiler_object_inline_componentStack_2512.stack = + JSCompiler_object_inline_stack_2511 || ""; + JSCompiler_object_inline_componentStack_2512.digest = + JSCompiler_object_inline_digest_2510; + JSCompiler_object_inline_digest_2510 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2518 = { - value: JSCompiler_object_inline_componentStack_2519, + JSCompiler_object_inline_stack_2511 = { + value: JSCompiler_object_inline_componentStack_2512, source: null, - stack: JSCompiler_object_inline_digest_2517 + stack: JSCompiler_object_inline_digest_2510 }; - "string" === typeof JSCompiler_object_inline_digest_2517 && + "string" === typeof JSCompiler_object_inline_digest_2510 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2519, - JSCompiler_object_inline_stack_2518 + JSCompiler_object_inline_componentStack_2512, + JSCompiler_object_inline_stack_2511 ); - queueHydrationError(JSCompiler_object_inline_stack_2518); + queueHydrationError(JSCompiler_object_inline_stack_2511); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9442,44 +9413,44 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2517 = + (JSCompiler_object_inline_digest_2510 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2517) + didReceiveUpdate || JSCompiler_object_inline_digest_2510) ) { - JSCompiler_object_inline_digest_2517 = workInProgressRoot; + JSCompiler_object_inline_digest_2510 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_digest_2517 && - ((JSCompiler_object_inline_stack_2518 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2518 = - 0 !== (JSCompiler_object_inline_stack_2518 & 42) + null !== JSCompiler_object_inline_digest_2510 && + ((JSCompiler_object_inline_stack_2511 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2511 = + 0 !== (JSCompiler_object_inline_stack_2511 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2518 + JSCompiler_object_inline_stack_2511 )), - (JSCompiler_object_inline_stack_2518 = + (JSCompiler_object_inline_stack_2511 = 0 !== - (JSCompiler_object_inline_stack_2518 & - (JSCompiler_object_inline_digest_2517.suspendedLanes | + (JSCompiler_object_inline_stack_2511 & + (JSCompiler_object_inline_digest_2510.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2518), - 0 !== JSCompiler_object_inline_stack_2518 && - JSCompiler_object_inline_stack_2518 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2511), + 0 !== JSCompiler_object_inline_stack_2511 && + JSCompiler_object_inline_stack_2511 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2518), + ((prevState.retryLane = JSCompiler_object_inline_stack_2511), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2518 + JSCompiler_object_inline_stack_2511 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2517, + JSCompiler_object_inline_digest_2510, current, - JSCompiler_object_inline_stack_2518 + JSCompiler_object_inline_stack_2511 ), SelectiveHydrationException) ); - JSCompiler_object_inline_message_2516.data === + JSCompiler_object_inline_message_2509.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9487,14 +9458,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2516.data === + JSCompiler_object_inline_message_2509.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2516.nextSibling + JSCompiler_object_inline_message_2509.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9512,57 +9483,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2518.children + JSCompiler_object_inline_stack_2511.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2519) + if (JSCompiler_object_inline_componentStack_2512) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2519 = - JSCompiler_object_inline_stack_2518.fallback), - (JSCompiler_object_inline_message_2516 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2512 = + JSCompiler_object_inline_stack_2511.fallback), + (JSCompiler_object_inline_message_2509 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2518 = createWorkInProgress( + (JSCompiler_object_inline_stack_2511 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2518.children + children: JSCompiler_object_inline_stack_2511.children } )), - (JSCompiler_object_inline_stack_2518.subtreeFlags = + (JSCompiler_object_inline_stack_2511.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2519 = + ? (JSCompiler_object_inline_componentStack_2512 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2519 + JSCompiler_object_inline_componentStack_2512 )) - : ((JSCompiler_object_inline_componentStack_2519 = + : ((JSCompiler_object_inline_componentStack_2512 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2519, - JSCompiler_object_inline_message_2516, + JSCompiler_object_inline_componentStack_2512, + JSCompiler_object_inline_message_2509, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2519.flags |= 2)), - (JSCompiler_object_inline_componentStack_2519.return = + (JSCompiler_object_inline_componentStack_2512.flags |= 2)), + (JSCompiler_object_inline_componentStack_2512.return = workInProgress), - (JSCompiler_object_inline_stack_2518.return = workInProgress), - (JSCompiler_object_inline_stack_2518.sibling = - JSCompiler_object_inline_componentStack_2519), - (workInProgress.child = JSCompiler_object_inline_stack_2518), - (JSCompiler_object_inline_stack_2518 = - JSCompiler_object_inline_componentStack_2519), - (JSCompiler_object_inline_componentStack_2519 = workInProgress.child), - (JSCompiler_object_inline_message_2516 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2516 - ? (JSCompiler_object_inline_message_2516 = + (JSCompiler_object_inline_stack_2511.return = workInProgress), + (JSCompiler_object_inline_stack_2511.sibling = + JSCompiler_object_inline_componentStack_2512), + (workInProgress.child = JSCompiler_object_inline_stack_2511), + (JSCompiler_object_inline_stack_2511 = + JSCompiler_object_inline_componentStack_2512), + (JSCompiler_object_inline_componentStack_2512 = workInProgress.child), + (JSCompiler_object_inline_message_2509 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2509 + ? (JSCompiler_object_inline_message_2509 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2516.cachePool), + JSCompiler_object_inline_message_2509.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9570,34 +9541,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2516 = { + (JSCompiler_object_inline_message_2509 = { baseLanes: - JSCompiler_object_inline_message_2516.baseLanes | renderLanes, + JSCompiler_object_inline_message_2509.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2519.memoizedState = - JSCompiler_object_inline_message_2516), + (JSCompiler_object_inline_componentStack_2512.memoizedState = + JSCompiler_object_inline_message_2509), enableTransitionTracing && - ((JSCompiler_object_inline_message_2516 = enableTransitionTracing + ((JSCompiler_object_inline_message_2509 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2516 && + null !== JSCompiler_object_inline_message_2509 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2519.updateQueue), + JSCompiler_object_inline_componentStack_2512.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2519.updateQueue = { - transitions: JSCompiler_object_inline_message_2516, + ? (JSCompiler_object_inline_componentStack_2512.updateQueue = { + transitions: JSCompiler_object_inline_message_2509, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2519.updateQueue = + ? (JSCompiler_object_inline_componentStack_2512.updateQueue = { - transitions: JSCompiler_object_inline_message_2516, + transitions: JSCompiler_object_inline_message_2509, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9605,32 +9576,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2516), + JSCompiler_object_inline_message_2509), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2519.childLanes = + (JSCompiler_object_inline_componentStack_2512.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2517, + JSCompiler_object_inline_digest_2510, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2518 + JSCompiler_object_inline_stack_2511 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2518.children + children: JSCompiler_object_inline_stack_2511.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2517 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2517 + ((JSCompiler_object_inline_digest_2510 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2510 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2517.push(current)); + : JSCompiler_object_inline_digest_2510.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10913,19 +10884,8 @@ __DEV__ && a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -11023,37 +10983,19 @@ __DEV__ && ); workInProgress.flags |= 262144; } - function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue - ) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error("Compared context values must be arrays"); - return !1; - } function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -25071,8 +25013,6 @@ __DEV__ && ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); - ContextOnlyDispatcher.unstable_useContextWithBailout = - throwInvalidHookError; var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, @@ -25246,14 +25186,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnMountWithHookTypesInDEV = { readContext: function (context) { return readContext(context); @@ -25406,12 +25338,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountWithHookTypesInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnUpdateInDEV = { readContext: function (context) { return readContext(context); @@ -25566,14 +25492,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnRerenderInDEV = { readContext: function (context) { return readContext(context); @@ -25728,14 +25646,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnMountInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -25914,13 +25824,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnMountInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnUpdateInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -26101,13 +26004,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnRerenderInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -26283,13 +26179,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; var callComponent = { "react-stack-bottom-frame": function (Component, props, secondArg) { var wasRendering = isRendering; @@ -27603,11 +27492,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.1.0-www-modern-e06c72fc-20241215" !== isomorphicReactPackageVersion) + if ("19.1.0-www-modern-d4287258-20241217" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.1.0-www-modern-e06c72fc-20241215\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.1.0-www-modern-d4287258-20241217\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27650,10 +27539,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.1.0-www-modern-e06c72fc-20241215", + version: "19.1.0-www-modern-d4287258-20241217", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28426,5 +28315,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.1.0-www-modern-e06c72fc-20241215"; + exports.version = "19.1.0-www-modern-d4287258-20241217"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 345d84914a2a2..32ef6b2f0d588 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -2851,28 +2851,6 @@ function updateWorkInProgressHook() { } return workInProgressHook; } -function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - JSCompiler_temp.dependencies = { lanes: 0, firstContext: context }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; -} function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -3956,7 +3934,6 @@ var ContextOnlyDispatcher = { ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); -ContextOnlyDispatcher.unstable_useContextWithBailout = throwInvalidHookError; var HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -4160,8 +4137,6 @@ var HooksDispatcherOnMount = { }; enableUseResourceEffectHook && (HooksDispatcherOnMount.useResourceEffect = mountResourceEffect); -HooksDispatcherOnMount.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnUpdate = { readContext: readContext, use: use, @@ -4212,8 +4187,6 @@ var HooksDispatcherOnUpdate = { HooksDispatcherOnUpdate.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect); -HooksDispatcherOnUpdate.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnRerender = { readContext: readContext, use: use, @@ -4269,8 +4242,6 @@ var HooksDispatcherOnRerender = { HooksDispatcherOnRerender.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect); -HooksDispatcherOnRerender.unstable_useContextWithBailout = - unstable_useContextWithBailout; var thenableState = null, thenableIndexCounter = 0; function unwrapThenable(thenable) { @@ -7451,19 +7422,8 @@ function propagateContextChanges( a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -7550,37 +7510,19 @@ function propagateParentContextChanges( ); workInProgress.flags |= 262144; } -function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue -) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error(formatProdErrorMessage(541)); - return !1; -} function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -17603,14 +17545,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1794 = React.version; if ( - "19.1.0-www-classic-e06c72fc-20241215" !== + "19.1.0-www-classic-d4287258-20241217" !== isomorphicReactPackageVersion$jscomp$inline_1794 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1794, - "19.1.0-www-classic-e06c72fc-20241215" + "19.1.0-www-classic-d4287258-20241217" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17626,24 +17568,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2340 = { +var internals$jscomp$inline_2333 = { bundleType: 0, - version: "19.1.0-www-classic-e06c72fc-20241215", + version: "19.1.0-www-classic-d4287258-20241217", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2341 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2334 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2341.isDisabled && - hook$jscomp$inline_2341.supportsFiber + !hook$jscomp$inline_2334.isDisabled && + hook$jscomp$inline_2334.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2341.inject( - internals$jscomp$inline_2340 + (rendererID = hook$jscomp$inline_2334.inject( + internals$jscomp$inline_2333 )), - (injectedHook = hook$jscomp$inline_2341); + (injectedHook = hook$jscomp$inline_2334); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18147,4 +18089,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-classic-e06c72fc-20241215"; +exports.version = "19.1.0-www-classic-d4287258-20241217"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 4a73280063fb2..080f4a5f15f1a 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -2702,28 +2702,6 @@ function updateWorkInProgressHook() { } return workInProgressHook; } -function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = context._currentValue; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - JSCompiler_temp.dependencies = { lanes: 0, firstContext: context }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; -} function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -3807,7 +3785,6 @@ var ContextOnlyDispatcher = { ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); -ContextOnlyDispatcher.unstable_useContextWithBailout = throwInvalidHookError; var HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -4011,8 +3988,6 @@ var HooksDispatcherOnMount = { }; enableUseResourceEffectHook && (HooksDispatcherOnMount.useResourceEffect = mountResourceEffect); -HooksDispatcherOnMount.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnUpdate = { readContext: readContext, use: use, @@ -4063,8 +4038,6 @@ var HooksDispatcherOnUpdate = { HooksDispatcherOnUpdate.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect); -HooksDispatcherOnUpdate.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnRerender = { readContext: readContext, use: use, @@ -4120,8 +4093,6 @@ var HooksDispatcherOnRerender = { HooksDispatcherOnRerender.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect); -HooksDispatcherOnRerender.unstable_useContextWithBailout = - unstable_useContextWithBailout; var thenableState = null, thenableIndexCounter = 0; function unwrapThenable(thenable) { @@ -7221,19 +7192,8 @@ function propagateContextChanges( a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select(dependency.context._currentValue) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -7320,37 +7280,19 @@ function propagateParentContextChanges( ); workInProgress.flags |= 262144; } -function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue -) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error(formatProdErrorMessage(541)); - return !1; -} function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) { - var newValue = currentDependencies.context._currentValue, - oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(newValue) - ) + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(newValue, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -17334,14 +17276,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1784 = React.version; if ( - "19.1.0-www-modern-e06c72fc-20241215" !== + "19.1.0-www-modern-d4287258-20241217" !== isomorphicReactPackageVersion$jscomp$inline_1784 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1784, - "19.1.0-www-modern-e06c72fc-20241215" + "19.1.0-www-modern-d4287258-20241217" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17357,24 +17299,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2322 = { +var internals$jscomp$inline_2315 = { bundleType: 0, - version: "19.1.0-www-modern-e06c72fc-20241215", + version: "19.1.0-www-modern-d4287258-20241217", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2323 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2316 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2323.isDisabled && - hook$jscomp$inline_2323.supportsFiber + !hook$jscomp$inline_2316.isDisabled && + hook$jscomp$inline_2316.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2323.inject( - internals$jscomp$inline_2322 + (rendererID = hook$jscomp$inline_2316.inject( + internals$jscomp$inline_2315 )), - (injectedHook = hook$jscomp$inline_2323); + (injectedHook = hook$jscomp$inline_2316); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17878,4 +17820,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-modern-e06c72fc-20241215"; +exports.version = "19.1.0-www-modern-d4287258-20241217"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index 850700d57f94b..34d8b3d8cf506 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -3320,37 +3320,6 @@ __DEV__ && } return workInProgressHook; } - function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - JSCompiler_temp.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; - } function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -9234,23 +9203,8 @@ __DEV__ && a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select( - isPrimaryRenderer - ? dependency.context._currentValue - : dependency.context._currentValue2 - ) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -9348,17 +9302,6 @@ __DEV__ && ); workInProgress.flags |= 262144; } - function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue - ) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error("Compared context values must be arrays"); - return !1; - } function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; @@ -9366,22 +9309,13 @@ __DEV__ && ) { var context = currentDependencies.context; - context = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; - var oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(context) - ) + !objectIs( + isPrimaryRenderer ? context._currentValue : context._currentValue2, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(context, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -16905,8 +16839,6 @@ __DEV__ && ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); - ContextOnlyDispatcher.unstable_useContextWithBailout = - throwInvalidHookError; var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, @@ -17080,14 +17012,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnMountWithHookTypesInDEV = { readContext: function (context) { return readContext(context); @@ -17240,12 +17164,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountWithHookTypesInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnUpdateInDEV = { readContext: function (context) { return readContext(context); @@ -17400,14 +17318,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnRerenderInDEV = { readContext: function (context) { return readContext(context); @@ -17562,14 +17472,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnMountInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -17748,13 +17650,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnMountInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnUpdateInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -17935,13 +17830,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnRerenderInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -18117,13 +18005,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; var callComponent = { "react-stack-bottom-frame": function (Component, props, secondArg) { var wasRendering = isRendering; @@ -19179,7 +19060,7 @@ __DEV__ && version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index 9a9922ae9b29f..e8d5a0864793d 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -3226,37 +3226,6 @@ __DEV__ && } return workInProgressHook; } - function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - JSCompiler_temp.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; - } function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -9066,23 +9035,8 @@ __DEV__ && a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select( - isPrimaryRenderer - ? dependency.context._currentValue - : dependency.context._currentValue2 - ) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -9180,17 +9134,6 @@ __DEV__ && ); workInProgress.flags |= 262144; } - function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue - ) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error("Compared context values must be arrays"); - return !1; - } function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; @@ -9198,22 +9141,13 @@ __DEV__ && ) { var context = currentDependencies.context; - context = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; - var oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(context) - ) + !objectIs( + isPrimaryRenderer ? context._currentValue : context._currentValue2, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(context, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -16680,8 +16614,6 @@ __DEV__ && ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); - ContextOnlyDispatcher.unstable_useContextWithBailout = - throwInvalidHookError; var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, @@ -16855,14 +16787,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnMountWithHookTypesInDEV = { readContext: function (context) { return readContext(context); @@ -17015,12 +16939,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnMountWithHookTypesInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnUpdateInDEV = { readContext: function (context) { return readContext(context); @@ -17175,14 +17093,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; HooksDispatcherOnRerenderInDEV = { readContext: function (context) { return readContext(context); @@ -17337,14 +17247,6 @@ __DEV__ && destroy ); }); - HooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = function ( - context, - select - ) { - currentHookNameInDev = "useContext"; - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnMountInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -17523,13 +17425,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnMountInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - mountHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnUpdateInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -17710,13 +17605,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnUpdateInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; InvalidNestedHooksDispatcherOnRerenderInDEV = { readContext: function (context) { warnInvalidContextAccess(); @@ -17892,13 +17780,6 @@ __DEV__ && destroy ); }); - InvalidNestedHooksDispatcherOnRerenderInDEV.unstable_useContextWithBailout = - function (context, select) { - currentHookNameInDev = "useContext"; - warnInvalidHookAccess(); - updateHookTypesDev(); - return unstable_useContextWithBailout(context, select); - }; var callComponent = { "react-stack-bottom-frame": function (Component, props, secondArg) { var wasRendering = isRendering; @@ -18953,7 +18834,7 @@ __DEV__ && version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index 9730c33265e55..230c7591e1c43 100644 --- a/compiled/facebook-www/ReactReconciler-prod.classic.js +++ b/compiled/facebook-www/ReactReconciler-prod.classic.js @@ -1914,30 +1914,6 @@ module.exports = function ($$$config) { } return workInProgressHook; } - function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - JSCompiler_temp.dependencies = { lanes: 0, firstContext: context }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; - } function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -6163,23 +6139,8 @@ module.exports = function ($$$config) { a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select( - isPrimaryRenderer - ? dependency.context._currentValue - : dependency.context._currentValue2 - ) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -6266,17 +6227,6 @@ module.exports = function ($$$config) { ); workInProgress.flags |= 262144; } - function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue - ) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error(formatProdErrorMessage(541)); - return !1; - } function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; @@ -6284,22 +6234,13 @@ module.exports = function ($$$config) { ) { var context = currentDependencies.context; - context = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; - var oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(context) - ) + !objectIs( + isPrimaryRenderer ? context._currentValue : context._currentValue2, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(context, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -11975,7 +11916,6 @@ module.exports = function ($$$config) { ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); - ContextOnlyDispatcher.unstable_useContextWithBailout = throwInvalidHookError; var HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -12184,8 +12124,6 @@ module.exports = function ($$$config) { }; enableUseResourceEffectHook && (HooksDispatcherOnMount.useResourceEffect = mountResourceEffect); - HooksDispatcherOnMount.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnUpdate = { readContext: readContext, use: use, @@ -12236,8 +12174,6 @@ module.exports = function ($$$config) { HooksDispatcherOnUpdate.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect); - HooksDispatcherOnUpdate.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnRerender = { readContext: readContext, use: use, @@ -12293,8 +12229,6 @@ module.exports = function ($$$config) { HooksDispatcherOnRerender.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect); - HooksDispatcherOnRerender.unstable_useContextWithBailout = - unstable_useContextWithBailout; var thenableState = null, thenableIndexCounter = 0, reconcileChildFibers = createChildReconciler(!0), @@ -12847,7 +12781,7 @@ module.exports = function ($$$config) { version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js index 994734cd097ac..c2d44c1a82ba7 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -1780,30 +1780,6 @@ module.exports = function ($$$config) { } return workInProgressHook; } - function unstable_useContextWithBailout(context, select) { - if (null === select) var JSCompiler_temp = readContext(context); - else { - JSCompiler_temp = currentlyRenderingFiber; - var value = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; - context = { - context: context, - memoizedValue: value, - next: null, - select: select, - lastSelectedValue: select(value) - }; - if (null === lastContextDependency) { - if (null === JSCompiler_temp) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - JSCompiler_temp.dependencies = { lanes: 0, firstContext: context }; - JSCompiler_temp.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - JSCompiler_temp = value; - } - return JSCompiler_temp; - } function createFunctionComponentUpdateQueue() { return { lastEffect: null, events: null, stores: null, memoCache: null }; } @@ -5944,23 +5920,8 @@ module.exports = function ($$$config) { a: for (; null !== list; ) { var dependency = list; list = fiber; - var i = 0; - b: for (; i < contexts.length; i++) + for (var i = 0; i < contexts.length; i++) if (dependency.context === contexts[i]) { - var select = dependency.select; - if ( - null != select && - null != dependency.lastSelectedValue && - !checkIfSelectedContextValuesChanged( - dependency.lastSelectedValue, - select( - isPrimaryRenderer - ? dependency.context._currentValue - : dependency.context._currentValue2 - ) - ) - ) - continue b; list.lanes |= renderLanes; dependency = list.alternate; null !== dependency && (dependency.lanes |= renderLanes); @@ -6047,17 +6008,6 @@ module.exports = function ($$$config) { ); workInProgress.flags |= 262144; } - function checkIfSelectedContextValuesChanged( - oldComparedValue, - newComparedValue - ) { - if (isArrayImpl(oldComparedValue) && isArrayImpl(newComparedValue)) { - if (oldComparedValue.length !== newComparedValue.length) return !0; - for (var i = 0; i < oldComparedValue.length; i++) - if (!objectIs(newComparedValue[i], oldComparedValue[i])) return !0; - } else throw Error(formatProdErrorMessage(541)); - return !1; - } function checkIfContextChanged(currentDependencies) { for ( currentDependencies = currentDependencies.firstContext; @@ -6065,22 +6015,13 @@ module.exports = function ($$$config) { ) { var context = currentDependencies.context; - context = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; - var oldValue = currentDependencies.memoizedValue; if ( - null != currentDependencies.select && - null != currentDependencies.lastSelectedValue - ) { - if ( - checkIfSelectedContextValuesChanged( - currentDependencies.lastSelectedValue, - currentDependencies.select(context) - ) + !objectIs( + isPrimaryRenderer ? context._currentValue : context._currentValue2, + currentDependencies.memoizedValue ) - return !0; - } else if (!objectIs(context, oldValue)) return !0; + ) + return !0; currentDependencies = currentDependencies.next; } return !1; @@ -11694,7 +11635,6 @@ module.exports = function ($$$config) { ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError; enableUseResourceEffectHook && (ContextOnlyDispatcher.useResourceEffect = throwInvalidHookError); - ContextOnlyDispatcher.unstable_useContextWithBailout = throwInvalidHookError; var HooksDispatcherOnMount = { readContext: readContext, use: use, @@ -11903,8 +11843,6 @@ module.exports = function ($$$config) { }; enableUseResourceEffectHook && (HooksDispatcherOnMount.useResourceEffect = mountResourceEffect); - HooksDispatcherOnMount.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnUpdate = { readContext: readContext, use: use, @@ -11955,8 +11893,6 @@ module.exports = function ($$$config) { HooksDispatcherOnUpdate.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnUpdate.useResourceEffect = updateResourceEffect); - HooksDispatcherOnUpdate.unstable_useContextWithBailout = - unstable_useContextWithBailout; var HooksDispatcherOnRerender = { readContext: readContext, use: use, @@ -12012,8 +11948,6 @@ module.exports = function ($$$config) { HooksDispatcherOnRerender.useEffectEvent = updateEvent; enableUseResourceEffectHook && (HooksDispatcherOnRerender.useResourceEffect = updateResourceEffect); - HooksDispatcherOnRerender.unstable_useContextWithBailout = - unstable_useContextWithBailout; var thenableState = null, thenableIndexCounter = 0, reconcileChildFibers = createChildReconciler(!0), @@ -12566,7 +12500,7 @@ module.exports = function ($$$config) { version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index e7905e09e74c2..ea435294231ae 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -13,7 +13,7 @@ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1109() { + function JSCompiler_object_inline_createNodeMock_1094() { return null; } function findHook(fiber, id) { @@ -2236,13 +2236,13 @@ __DEV__ && } } function processUpdateQueue( - workInProgress$jscomp$0, + workInProgress, props, instance$jscomp$0, renderLanes ) { didReadFromEntangledAsyncAction = !1; - var queue = workInProgress$jscomp$0.updateQueue; + var queue = workInProgress.updateQueue; hasForceUpdate = !1; currentlyProcessingQueue = queue.shared; var firstBaseUpdate = queue.firstBaseUpdate, @@ -2257,7 +2257,7 @@ __DEV__ && ? (firstBaseUpdate = firstPendingUpdate) : (lastBaseUpdate.next = firstPendingUpdate); lastBaseUpdate = lastPendingUpdate; - var current = workInProgress$jscomp$0.alternate; + var current = workInProgress.alternate; null !== current && ((current = current.updateQueue), (pendingQueue = current.lastBaseUpdate), @@ -2293,40 +2293,57 @@ __DEV__ && next: null }); a: { - var workInProgress = workInProgress$jscomp$0, - update = pendingQueue; - updateLane = props; - var instance = instance$jscomp$0; - switch (update.tag) { + updateLane = workInProgress; + var partialState = pendingQueue; + var nextProps = props, + instance = instance$jscomp$0; + switch (partialState.tag) { case ReplaceState: - workInProgress = update.payload; - if ("function" === typeof workInProgress) { + partialState = partialState.payload; + if ("function" === typeof partialState) { isDisallowedContextReadInDEV = !0; - newState = workInProgress.call( + var nextState = partialState.call( instance, newState, - updateLane + nextProps ); + if (updateLane.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + partialState.call(instance, newState, nextProps); + } finally { + setIsStrictModeForDevtools(!1); + } + } isDisallowedContextReadInDEV = !1; + newState = nextState; break a; } - newState = workInProgress; + newState = partialState; break a; case CaptureUpdate: - workInProgress.flags = (workInProgress.flags & -65537) | 128; + updateLane.flags = (updateLane.flags & -65537) | 128; case UpdateState: - workInProgress = update.payload; - "function" === typeof workInProgress - ? ((isDisallowedContextReadInDEV = !0), - (updateLane = workInProgress.call( - instance, - newState, - updateLane - )), - (isDisallowedContextReadInDEV = !1)) - : (updateLane = workInProgress); - if (null === updateLane || void 0 === updateLane) break a; - newState = assign({}, newState, updateLane); + nextState = partialState.payload; + if ("function" === typeof nextState) { + isDisallowedContextReadInDEV = !0; + partialState = nextState.call( + instance, + newState, + nextProps + ); + if (updateLane.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + nextState.call(instance, newState, nextProps); + } finally { + setIsStrictModeForDevtools(!1); + } + } + isDisallowedContextReadInDEV = !1; + } else partialState = nextState; + if (null === partialState || void 0 === partialState) break a; + newState = assign({}, newState, partialState); break a; case ForceUpdate: hasForceUpdate = !0; @@ -2334,8 +2351,8 @@ __DEV__ && } updateLane = pendingQueue.callback; null !== updateLane && - ((workInProgress$jscomp$0.flags |= 64), - isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), + ((workInProgress.flags |= 64), + isHiddenUpdate && (workInProgress.flags |= 8192), (isHiddenUpdate = queue.callbacks), null === isHiddenUpdate ? (queue.callbacks = [updateLane]) @@ -2370,8 +2387,8 @@ __DEV__ && queue.lastBaseUpdate = current; null === firstBaseUpdate && (queue.shared.lanes = 0); workInProgressRootSkippedLanes |= lastBaseUpdate; - workInProgress$jscomp$0.lanes = lastBaseUpdate; - workInProgress$jscomp$0.memoizedState = newState; + workInProgress.lanes = lastBaseUpdate; + workInProgress.memoizedState = newState; } currentlyProcessingQueue = null; } @@ -2664,18 +2681,32 @@ __DEV__ && : null !== hookTypesDev ? HooksDispatcherOnMountWithHookTypesInDEV : HooksDispatcherOnMountInDEV; - shouldDoubleInvokeUserFnsInHooksDEV = !1; - nextRenderLanes = callComponentInDEV(Component, props, secondArg); + shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = + 0 !== (workInProgress.mode & 8); + var children = callComponentInDEV(Component, props, secondArg); shouldDoubleInvokeUserFnsInHooksDEV = !1; didScheduleRenderPhaseUpdateDuringThisPass && - (nextRenderLanes = renderWithHooksAgain( + (children = renderWithHooksAgain( workInProgress, Component, props, secondArg )); + if (nextRenderLanes) { + setIsStrictModeForDevtools(!0); + try { + children = renderWithHooksAgain( + workInProgress, + Component, + props, + secondArg + ); + } finally { + setIsStrictModeForDevtools(!1); + } + } finishRenderingHooks(current, workInProgress); - return nextRenderLanes; + return children; } function finishRenderingHooks(current, workInProgress) { workInProgress._debugHookTypes = hookTypesDev; @@ -5150,9 +5181,17 @@ __DEV__ && getDerivedStateFromProps, nextProps ) { - var prevState = workInProgress.memoizedState; - getDerivedStateFromProps = getDerivedStateFromProps(nextProps, prevState); - void 0 === getDerivedStateFromProps && + var prevState = workInProgress.memoizedState, + partialState = getDerivedStateFromProps(nextProps, prevState); + if (workInProgress.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + partialState = getDerivedStateFromProps(nextProps, prevState); + } finally { + setIsStrictModeForDevtools(!1); + } + } + void 0 === partialState && ((ctor = getComponentNameFromType(ctor) || "Component"), didWarnAboutUndefinedDerivedState.has(ctor) || (didWarnAboutUndefinedDerivedState.add(ctor), @@ -5161,9 +5200,9 @@ __DEV__ && ctor ))); prevState = - null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps + null === partialState || void 0 === partialState ? prevState - : assign({}, prevState, getDerivedStateFromProps); + : assign({}, prevState, partialState); workInProgress.memoizedState = prevState; 0 === workInProgress.lanes && (workInProgress.updateQueue.baseState = prevState); @@ -5177,23 +5216,35 @@ __DEV__ && newState, nextContext ) { - workInProgress = workInProgress.stateNode; - return "function" === typeof workInProgress.shouldComponentUpdate - ? ((oldProps = workInProgress.shouldComponentUpdate( - newProps, - newState, - nextContext - )), - void 0 === oldProps && - error$jscomp$0( - "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.", - getComponentNameFromType(ctor) || "Component" - ), - oldProps) - : ctor.prototype && ctor.prototype.isPureReactComponent - ? !shallowEqual(oldProps, newProps) || - !shallowEqual(oldState, newState) - : !0; + var instance = workInProgress.stateNode; + if ("function" === typeof instance.shouldComponentUpdate) { + oldProps = instance.shouldComponentUpdate( + newProps, + newState, + nextContext + ); + if (workInProgress.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + oldProps = instance.shouldComponentUpdate( + newProps, + newState, + nextContext + ); + } finally { + setIsStrictModeForDevtools(!1); + } + } + void 0 === oldProps && + error$jscomp$0( + "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.", + getComponentNameFromType(ctor) || "Component" + ); + return oldProps; + } + return ctor.prototype && ctor.prototype.isPureReactComponent + ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) + : !0; } function callComponentWillReceiveProps( workInProgress, @@ -5221,21 +5272,14 @@ __DEV__ && null )); } - function resolveClassComponentProps( - Component, - baseProps, - alreadyResolvedDefaultProps - ) { + function resolveClassComponentProps(Component, baseProps) { var newProps = baseProps; if ("ref" in baseProps) { newProps = {}; for (var propName in baseProps) "ref" !== propName && (newProps[propName] = baseProps[propName]); } - if ( - (Component = Component.defaultProps) && - !alreadyResolvedDefaultProps - ) { + if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); for (var _propName in Component) void 0 === newProps[_propName] && @@ -5243,17 +5287,6 @@ __DEV__ && } return newProps; } - function resolveDefaultPropsOnNonClassComponent(Component, baseProps) { - if (Component && Component.defaultProps) { - baseProps = assign({}, baseProps); - Component = Component.defaultProps; - for (var propName in Component) - void 0 === baseProps[propName] && - (baseProps[propName] = Component[propName]); - return baseProps; - } - return baseProps; - } function defaultOnUncaughtError(error, errorInfo) { reportGlobalError(error); error = componentName @@ -5602,8 +5635,7 @@ __DEV__ && "function" === typeof type && !shouldConstruct(type) && void 0 === type.defaultProps && - null === Component.compare && - void 0 === Component.defaultProps + null === Component.compare ) return ( (Component = resolveFunctionForHotReloading(type)), @@ -5618,15 +5650,7 @@ __DEV__ && renderLanes ) ); - void 0 !== Component.defaultProps && - ((current = getComponentNameFromType(type) || "Unknown"), - didWarnAboutDefaultPropsOnFunctionComponent[current] || - (error$jscomp$0( - "%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.", - current - ), - (didWarnAboutDefaultPropsOnFunctionComponent[current] = !0))); - nextProps = createFiberFromTypeAndProps( + current = createFiberFromTypeAndProps( Component.type, null, nextProps, @@ -5634,9 +5658,9 @@ __DEV__ && workInProgress.mode, renderLanes ); - nextProps.ref = workInProgress.ref; - nextProps.return = workInProgress; - return (workInProgress.child = nextProps); + current.ref = workInProgress.ref; + current.return = workInProgress; + return (workInProgress.child = current); } type = current.child; if (!checkScheduledUpdateOrContext(current, renderLanes)) { @@ -5654,10 +5678,10 @@ __DEV__ && ); } workInProgress.flags |= 1; - nextProps = createWorkInProgress(type, nextProps); - nextProps.ref = workInProgress.ref; - nextProps.return = workInProgress; - return (workInProgress.child = nextProps); + current = createWorkInProgress(type, nextProps); + current.ref = workInProgress.ref; + current.return = workInProgress; + return (workInProgress.child = current); } function updateSimpleMemoComponent( current, @@ -5959,6 +5983,14 @@ __DEV__ && ? getMaskedContext(workInProgress, state) : emptyContextObject)); addendum = new Component(nextProps, context); + if (workInProgress.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + addendum = new Component(nextProps, context); + } finally { + setIsStrictModeForDevtools(!1); + } + } var state$jscomp$0 = (workInProgress.memoizedState = null !== addendum.state && void 0 !== addendum.state ? addendum.state @@ -6231,11 +6263,7 @@ __DEV__ && } else if (null === current$jscomp$0) (state = workInProgress.stateNode), (foundWillUpdateName = workInProgress.memoizedProps), - (lane = resolveClassComponentProps( - Component, - foundWillUpdateName, - workInProgress.type === workInProgress.elementType - )), + (lane = resolveClassComponentProps(Component, foundWillUpdateName)), (state.props = lane), (state$jscomp$0 = state.context), (context = Component.contextType), @@ -6320,11 +6348,7 @@ __DEV__ && state = workInProgress.stateNode; cloneUpdateQueue(current$jscomp$0, workInProgress); lane = workInProgress.memoizedProps; - context = resolveClassComponentProps( - Component, - lane, - workInProgress.type === workInProgress.elementType - ); + context = resolveClassComponentProps(Component, lane); state.props = context; addendum = workInProgress.pendingProps; foundWillUpdateName = state.context; @@ -6432,46 +6456,55 @@ __DEV__ && context = state; markRef(current$jscomp$0, workInProgress); lane = 0 !== (workInProgress.flags & 128); - context || lane - ? ((context = workInProgress.stateNode), - (ReactSharedInternals.getCurrentStack = - null === workInProgress ? null : getCurrentFiberStackInDev), - (isRendering = !1), - (current = workInProgress), - lane && "function" !== typeof Component.getDerivedStateFromError - ? ((addendum = null), (profilerStartTime = -1)) - : (addendum = callRenderInDEV(context)), - (workInProgress.flags |= 1), - null !== current$jscomp$0 && lane - ? ((lane = addendum), - (workInProgress.child = reconcileChildFibers( - workInProgress, - current$jscomp$0.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - lane, - renderLanes - ))) - : reconcileChildren( - current$jscomp$0, - workInProgress, - addendum, - renderLanes - ), - (workInProgress.memoizedState = context.state), - _instance && invalidateContextProvider(workInProgress, Component, !0), - (current$jscomp$0 = workInProgress.child)) - : (_instance && - invalidateContextProvider(workInProgress, Component, !1), + if (context || lane) { + context = workInProgress.stateNode; + ReactSharedInternals.getCurrentStack = + null === workInProgress ? null : getCurrentFiberStackInDev; + isRendering = !1; + current = workInProgress; + if (lane && "function" !== typeof Component.getDerivedStateFromError) + (addendum = null), (profilerStartTime = -1); + else if ( + ((addendum = callRenderInDEV(context)), workInProgress.mode & 8) + ) { + setIsStrictModeForDevtools(!0); + try { + callRenderInDEV(context); + } finally { + setIsStrictModeForDevtools(!1); + } + } + workInProgress.flags |= 1; + null !== current$jscomp$0 && lane + ? ((lane = addendum), + (workInProgress.child = reconcileChildFibers( + workInProgress, + current$jscomp$0.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + lane, + renderLanes + ))) + : reconcileChildren( + current$jscomp$0, + workInProgress, + addendum, + renderLanes + ); + workInProgress.memoizedState = context.state; + _instance && invalidateContextProvider(workInProgress, Component, !0); + current$jscomp$0 = workInProgress.child; + } else + _instance && invalidateContextProvider(workInProgress, Component, !1), (current$jscomp$0 = bailoutOnAlreadyFinishedWork( current$jscomp$0, workInProgress, renderLanes - ))); + )); Component = workInProgress.stateNode; state && Component.props !== nextProps && @@ -6502,14 +6535,6 @@ __DEV__ && "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...", Component.displayName || Component.name || "Component" ); - void 0 !== Component.defaultProps && - ((workInProgress = getComponentNameFromType(Component) || "Unknown"), - didWarnAboutDefaultPropsOnFunctionComponent[workInProgress] || - (error$jscomp$0( - "%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.", - workInProgress - ), - (didWarnAboutDefaultPropsOnFunctionComponent[workInProgress] = !0))); "function" === typeof Component.getDerivedStateFromProps && ((workInProgress = getComponentNameFromType(Component) || "Unknown"), didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] || @@ -7306,8 +7331,7 @@ __DEV__ && shouldConstruct(current) ? ((returnFiber = resolveClassComponentProps( current, - returnFiber, - !1 + returnFiber )), (workInProgress.tag = 1), (workInProgress.type = current = @@ -7319,11 +7343,7 @@ __DEV__ && returnFiber, renderLanes ))) - : ((returnFiber = resolveDefaultPropsOnNonClassComponent( - current, - returnFiber - )), - (workInProgress.tag = 0), + : ((workInProgress.tag = 0), validateFunctionComponentInDev(workInProgress, current), (workInProgress.type = current = resolveFunctionForHotReloading(current)), @@ -7340,10 +7360,6 @@ __DEV__ && ((prevSibling = current.$$typeof), prevSibling === REACT_FORWARD_REF_TYPE) ) { - returnFiber = resolveDefaultPropsOnNonClassComponent( - current, - returnFiber - ); workInProgress.tag = 11; workInProgress.type = current = resolveForwardRefForHotReloading(current); @@ -7356,19 +7372,12 @@ __DEV__ && ); break a; } else if (prevSibling === REACT_MEMO_TYPE) { - returnFiber = resolveDefaultPropsOnNonClassComponent( - current, - returnFiber - ); workInProgress.tag = 14; workInProgress = updateMemoComponent( null, workInProgress, current, - resolveDefaultPropsOnNonClassComponent( - current.type, - returnFiber - ), + returnFiber, renderLanes ); break a; @@ -7379,41 +7388,29 @@ __DEV__ && current.$$typeof === REACT_LAZY_TYPE && (workInProgress = " Did you wrap a component in React.lazy() more than once?"); - renderLanes = getComponentNameFromType(current) || current; + current = getComponentNameFromType(current) || current; throw Error( "Element type is invalid. Received a promise that resolves to: " + - renderLanes + + current + ". Lazy element type must resolve to a class or function." + workInProgress ); } return workInProgress; case 0: - return ( - (returnFiber = workInProgress.type), - (prevSibling = workInProgress.pendingProps), - (prevSibling = - workInProgress.elementType === returnFiber - ? prevSibling - : resolveDefaultPropsOnNonClassComponent( - returnFiber, - prevSibling - )), - updateFunctionComponent( - current, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) + return updateFunctionComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes ); case 1: return ( (returnFiber = workInProgress.type), (prevSibling = resolveClassComponentProps( returnFiber, - workInProgress.pendingProps, - workInProgress.elementType === returnFiber + workInProgress.pendingProps )), updateClassComponent( current, @@ -7510,23 +7507,12 @@ __DEV__ && workInProgress.child ); case 11: - return ( - (returnFiber = workInProgress.type), - (prevSibling = workInProgress.pendingProps), - (prevSibling = - workInProgress.elementType === returnFiber - ? prevSibling - : resolveDefaultPropsOnNonClassComponent( - returnFiber, - prevSibling - )), - updateForwardRef( - current, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) + return updateForwardRef( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes ); case 7: return ( @@ -7610,23 +7596,12 @@ __DEV__ && workInProgress.child ); case 14: - return ( - (returnFiber = workInProgress.type), - (prevSibling = resolveDefaultPropsOnNonClassComponent( - returnFiber, - workInProgress.pendingProps - )), - (prevSibling = resolveDefaultPropsOnNonClassComponent( - returnFiber.type, - prevSibling - )), - updateMemoComponent( - current, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) + return updateMemoComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes ); case 15: return updateSimpleMemoComponent( @@ -8829,16 +8804,6 @@ __DEV__ && nearestMountedAncestor ); } - function commitClassDidMount(finishedWork) { - var instance = finishedWork.stateNode; - "function" === typeof instance.componentDidMount && - runWithFiberInDEV( - finishedWork, - callComponentDidMountInDEV, - finishedWork, - instance - ); - } function commitClassCallbacks(finishedWork) { var updateQueue = finishedWork.updateQueue; if (null !== updateQueue) { @@ -8923,8 +8888,7 @@ __DEV__ && ) { instance.props = resolveClassComponentProps( current.type, - current.memoizedProps, - current.elementType === current.type + current.memoizedProps ); instance.state = current.memoizedState; shouldProfile(current) @@ -9276,8 +9240,7 @@ __DEV__ && else { var prevProps = resolveClassComponentProps( finishedWork.type, - current.memoizedProps, - finishedWork.elementType === finishedWork.type + current.memoizedProps ); current = current.memoizedState; finishedWork.type.defaultProps || @@ -10032,175 +9995,193 @@ __DEV__ && commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber), (parentFiber = parentFiber.sibling); } - function recursivelyTraverseDisappearLayoutEffects(parentFiber) { - for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var finishedWork = parentFiber; - switch (finishedWork.tag) { - case 0: - case 11: - case 14: - case 15: - commitHookLayoutUnmountEffects( + function disappearLayoutEffects(finishedWork) { + switch (finishedWork.tag) { + case 0: + case 11: + case 14: + case 15: + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout + ); + recursivelyTraverseDisappearLayoutEffects(finishedWork); + break; + case 1: + safelyDetachRef(finishedWork, finishedWork.return); + var instance = finishedWork.stateNode; + "function" === typeof instance.componentWillUnmount && + safelyCallComponentWillUnmount( finishedWork, finishedWork.return, - Layout + instance ); + recursivelyTraverseDisappearLayoutEffects(finishedWork); + break; + case 26: + case 27: + case 5: + safelyDetachRef(finishedWork, finishedWork.return); + recursivelyTraverseDisappearLayoutEffects(finishedWork); + break; + case 22: + safelyDetachRef(finishedWork, finishedWork.return); + null === finishedWork.memoizedState && recursivelyTraverseDisappearLayoutEffects(finishedWork); - break; - case 1: - safelyDetachRef(finishedWork, finishedWork.return); - var instance = finishedWork.stateNode; - "function" === typeof instance.componentWillUnmount && - safelyCallComponentWillUnmount( - finishedWork, - finishedWork.return, - instance - ); - recursivelyTraverseDisappearLayoutEffects(finishedWork); - break; - case 26: - case 27: - case 5: - safelyDetachRef(finishedWork, finishedWork.return); - recursivelyTraverseDisappearLayoutEffects(finishedWork); - break; - case 22: - safelyDetachRef(finishedWork, finishedWork.return); - null === finishedWork.memoizedState && - recursivelyTraverseDisappearLayoutEffects(finishedWork); - break; - default: - recursivelyTraverseDisappearLayoutEffects(finishedWork); - } - parentFiber = parentFiber.sibling; + break; + default: + recursivelyTraverseDisappearLayoutEffects(finishedWork); } } - function recursivelyTraverseReappearLayoutEffects( - finishedRoot$jscomp$0, - parentFiber, - includeWorkInProgressEffects$jscomp$0 + function recursivelyTraverseDisappearLayoutEffects(parentFiber) { + for (parentFiber = parentFiber.child; null !== parentFiber; ) + disappearLayoutEffects(parentFiber), + (parentFiber = parentFiber.sibling); + } + function reappearLayoutEffects( + finishedRoot, + current, + finishedWork, + includeWorkInProgressEffects ) { - includeWorkInProgressEffects$jscomp$0 = - includeWorkInProgressEffects$jscomp$0 && - 0 !== (parentFiber.subtreeFlags & 8772); - for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var finishedRoot = finishedRoot$jscomp$0, - current = parentFiber.alternate, - finishedWork = parentFiber, - includeWorkInProgressEffects = includeWorkInProgressEffects$jscomp$0, - flags = finishedWork.flags; - switch (finishedWork.tag) { - case 0: - case 11: - case 15: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, + var flags = finishedWork.flags; + switch (finishedWork.tag) { + case 0: + case 11: + case 15: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + commitHookLayoutEffects(finishedWork, Layout); + break; + case 1: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + current = finishedWork.stateNode; + "function" === typeof current.componentDidMount && + runWithFiberInDEV( finishedWork, - includeWorkInProgressEffects - ); - commitHookLayoutEffects(finishedWork, Layout); - break; - case 1: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, + callComponentDidMountInDEV, finishedWork, - includeWorkInProgressEffects + current ); - commitClassDidMount(finishedWork); - current = finishedWork; - finishedRoot = current.updateQueue; - if (null !== finishedRoot) { - var instance = current.stateNode; - try { - runWithFiberInDEV( - current, - commitHiddenCallbacks, - finishedRoot, - instance - ); - } catch (error$14) { - captureCommitPhaseError(current, current.return, error$14); - } - } - includeWorkInProgressEffects && - flags & 64 && - commitClassCallbacks(finishedWork); - safelyAttachRef(finishedWork, finishedWork.return); - break; - case 26: - case 27: - case 5: + current = finishedWork.updateQueue; + if (null !== current) { + finishedRoot = finishedWork.stateNode; + try { + runWithFiberInDEV( + finishedWork, + commitHiddenCallbacks, + current, + finishedRoot + ); + } catch (error$14) { + captureCommitPhaseError( + finishedWork, + finishedWork.return, + error$14 + ); + } + } + includeWorkInProgressEffects && + flags & 64 && + commitClassCallbacks(finishedWork); + safelyAttachRef(finishedWork, finishedWork.return); + break; + case 26: + case 27: + case 5: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + null === current && + flags & 4 && + commitHostMount(finishedWork); + safelyAttachRef(finishedWork, finishedWork.return); + break; + case 12: + if (includeWorkInProgressEffects && flags & 4) { + flags = pushNestedEffectDurations(); recursivelyTraverseReappearLayoutEffects( finishedRoot, finishedWork, includeWorkInProgressEffects ); - includeWorkInProgressEffects && - null === current && - flags & 4 && - commitHostMount(finishedWork); - safelyAttachRef(finishedWork, finishedWork.return); - break; - case 12: - if (includeWorkInProgressEffects && flags & 4) { - flags = pushNestedEffectDurations(); - recursivelyTraverseReappearLayoutEffects( - finishedRoot, + includeWorkInProgressEffects = finishedWork.stateNode; + includeWorkInProgressEffects.effectDuration += + bubbleNestedEffectDurations(flags); + try { + runWithFiberInDEV( finishedWork, - includeWorkInProgressEffects + commitProfiler, + finishedWork, + current, + commitStartTime, + includeWorkInProgressEffects.effectDuration ); - includeWorkInProgressEffects = finishedWork.stateNode; - includeWorkInProgressEffects.effectDuration += - bubbleNestedEffectDurations(flags); - try { - runWithFiberInDEV( - finishedWork, - commitProfiler, - finishedWork, - current, - commitStartTime, - includeWorkInProgressEffects.effectDuration - ); - } catch (error$20) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$20 - ); - } - } else - recursivelyTraverseReappearLayoutEffects( - finishedRoot, + } catch (error$20) { + captureCommitPhaseError( finishedWork, - includeWorkInProgressEffects + finishedWork.return, + error$20 ); - break; - case 13: + } + } else recursivelyTraverseReappearLayoutEffects( finishedRoot, finishedWork, includeWorkInProgressEffects ); - break; - case 22: - null === finishedWork.memoizedState && - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); - safelyAttachRef(finishedWork, finishedWork.return); - break; - default: + break; + case 13: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; + case 22: + null === finishedWork.memoizedState && recursivelyTraverseReappearLayoutEffects( finishedRoot, finishedWork, includeWorkInProgressEffects ); - } - parentFiber = parentFiber.sibling; + safelyAttachRef(finishedWork, finishedWork.return); + break; + default: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); } } + function recursivelyTraverseReappearLayoutEffects( + finishedRoot, + parentFiber, + includeWorkInProgressEffects + ) { + includeWorkInProgressEffects = + includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); + for (parentFiber = parentFiber.child; null !== parentFiber; ) + reappearLayoutEffects( + finishedRoot, + parentFiber.alternate, + parentFiber, + includeWorkInProgressEffects + ), + (parentFiber = parentFiber.sibling); + } function commitOffscreenPassiveMountEffects(current, finishedWork) { var previousCache = null; null !== current && @@ -10371,92 +10352,98 @@ __DEV__ && } } function recursivelyTraverseReconnectPassiveEffects( - finishedRoot$jscomp$0, + finishedRoot, parentFiber, - committedLanes$jscomp$0, - committedTransitions$jscomp$0, - includeWorkInProgressEffects$jscomp$0 + committedLanes, + committedTransitions, + includeWorkInProgressEffects ) { - includeWorkInProgressEffects$jscomp$0 = - includeWorkInProgressEffects$jscomp$0 && + includeWorkInProgressEffects = + includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 10256); - for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var finishedRoot = finishedRoot$jscomp$0, - finishedWork = parentFiber, - committedLanes = committedLanes$jscomp$0, - committedTransitions = committedTransitions$jscomp$0, - includeWorkInProgressEffects = includeWorkInProgressEffects$jscomp$0, - flags = finishedWork.flags; - switch (finishedWork.tag) { - case 0: - case 11: - case 15: - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - ); - commitHookPassiveMountEffects(finishedWork, Passive); - break; - case 23: - break; - case 22: - var _instance2 = finishedWork.stateNode; - null !== finishedWork.memoizedState - ? _instance2._visibility & 4 - ? recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - ) - : recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((_instance2._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( + for (parentFiber = parentFiber.child; null !== parentFiber; ) + reconnectPassiveEffects( + finishedRoot, + parentFiber, + committedLanes, + committedTransitions, + includeWorkInProgressEffects + ), + (parentFiber = parentFiber.sibling); + } + function reconnectPassiveEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + includeWorkInProgressEffects + ) { + var flags = finishedWork.flags; + switch (finishedWork.tag) { + case 0: + case 11: + case 15: + recursivelyTraverseReconnectPassiveEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + includeWorkInProgressEffects + ); + commitHookPassiveMountEffects(finishedWork, Passive); + break; + case 23: + break; + case 22: + var _instance2 = finishedWork.stateNode; + null !== finishedWork.memoizedState + ? _instance2._visibility & 4 + ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects - )); - includeWorkInProgressEffects && - flags & 2048 && - commitOffscreenPassiveMountEffects( - finishedWork.alternate, - finishedWork - ); - break; - case 24: - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - ); - includeWorkInProgressEffects && - flags & 2048 && - commitCachePassiveMountEffect( - finishedWork.alternate, - finishedWork - ); - break; - default: - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects + ) + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) + : ((_instance2._visibility |= 4), + recursivelyTraverseReconnectPassiveEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + includeWorkInProgressEffects + )); + includeWorkInProgressEffects && + flags & 2048 && + commitOffscreenPassiveMountEffects( + finishedWork.alternate, + finishedWork ); - } - parentFiber = parentFiber.sibling; + break; + case 24: + recursivelyTraverseReconnectPassiveEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 2048 && + commitCachePassiveMountEffect(finishedWork.alternate, finishedWork); + break; + default: + recursivelyTraverseReconnectPassiveEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + includeWorkInProgressEffects + ); } } function recursivelyTraverseAtomicPassiveEffects( @@ -10621,29 +10608,30 @@ __DEV__ && } detachAlternateSiblings(parentFiber); } - for (parentFiber = parentFiber.child; null !== parentFiber; ) { - deletions = parentFiber; - switch (deletions.tag) { - case 0: - case 11: - case 15: - commitHookPassiveUnmountEffects( - deletions, - deletions.return, - Passive - ); - recursivelyTraverseDisconnectPassiveEffects(deletions); - break; - case 22: - i = deletions.stateNode; - i._visibility & 4 && - ((i._visibility &= -5), - recursivelyTraverseDisconnectPassiveEffects(deletions)); - break; - default: - recursivelyTraverseDisconnectPassiveEffects(deletions); - } - parentFiber = parentFiber.sibling; + for (parentFiber = parentFiber.child; null !== parentFiber; ) + disconnectPassiveEffect(parentFiber), + (parentFiber = parentFiber.sibling); + } + function disconnectPassiveEffect(finishedWork) { + switch (finishedWork.tag) { + case 0: + case 11: + case 15: + commitHookPassiveUnmountEffects( + finishedWork, + finishedWork.return, + Passive + ); + recursivelyTraverseDisconnectPassiveEffects(finishedWork); + break; + case 22: + var instance = finishedWork.stateNode; + instance._visibility & 4 && + ((instance._visibility &= -5), + recursivelyTraverseDisconnectPassiveEffects(finishedWork)); + break; + default: + recursivelyTraverseDisconnectPassiveEffects(finishedWork); } } function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( @@ -10694,46 +10682,6 @@ __DEV__ && } } } - function invokeLayoutEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListMount(Layout | HasEffect, fiber); - break; - case 1: - commitClassDidMount(fiber); - } - } - function invokePassiveEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListMount(Passive | HasEffect, fiber); - } - } - function invokeLayoutEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return); - break; - case 1: - var instance = fiber.stateNode; - "function" === typeof instance.componentWillUnmount && - safelyCallComponentWillUnmount(fiber, fiber.return, instance); - } - } - function invokePassiveEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListUnmount(Passive | HasEffect, fiber, fiber.return); - } - } function isConcurrentActEnvironment() { var isReactActEnvironmentGlobal = "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT @@ -11544,14 +11492,7 @@ __DEV__ && case 15: case 0: var Component = unitOfWork.type, - unresolvedProps = unitOfWork.pendingProps; - unresolvedProps = - unitOfWork.elementType === Component - ? unresolvedProps - : resolveDefaultPropsOnNonClassComponent( - Component, - unresolvedProps - ); + resolvedProps = unitOfWork.pendingProps; var context = isContextProvider(Component) ? previousContext : contextStackCursor$1.current; @@ -11559,27 +11500,18 @@ __DEV__ && current = replayFunctionComponent( current, unitOfWork, - unresolvedProps, + resolvedProps, Component, context, workInProgressRootRenderLanes ); break; case 11: - Component = unitOfWork.type.render; - unresolvedProps = unitOfWork.pendingProps; - unresolvedProps = - unitOfWork.elementType === Component - ? unresolvedProps - : resolveDefaultPropsOnNonClassComponent( - Component, - unresolvedProps - ); current = replayFunctionComponent( current, unitOfWork, - unresolvedProps, - Component, + unitOfWork.pendingProps, + unitOfWork.type.render, unitOfWork.ref, workInProgressRootRenderLanes ); @@ -11807,13 +11739,7 @@ __DEV__ && (rootWithPassiveNestedUpdates = null)); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || - runWithFiberInDEV( - root.current, - legacyCommitDoubleInvokeEffectsInDEV, - root.current, - !1 - ); + transitions || commitDoubleInvokeEffectsInDEV(root); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); ensureRootIsScheduled(root); if (null !== recoverableErrors) @@ -11901,12 +11827,7 @@ __DEV__ && lanes, priority ); - runWithFiberInDEV( - root$jscomp$0.current, - legacyCommitDoubleInvokeEffectsInDEV, - root$jscomp$0.current, - !0 - ); + commitDoubleInvokeEffectsInDEV(root$jscomp$0); executionContext = prevExecutionContext; flushSyncWorkAcrossRoots_impl(0, !1); didScheduleUpdateDuringPassiveEffects @@ -12077,29 +11998,74 @@ __DEV__ && null !== retryCache && retryCache.delete(wakeable); retryTimedOutBoundary(boundaryFiber, retryLane); } - function legacyCommitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) { - invokeEffectsInDev(fiber, 67108864, invokeLayoutEffectUnmountInDEV); - hasPassiveEffects && - invokeEffectsInDev(fiber, 134217728, invokePassiveEffectUnmountInDEV); - invokeEffectsInDev(fiber, 67108864, invokeLayoutEffectMountInDEV); - hasPassiveEffects && - invokeEffectsInDev(fiber, 134217728, invokePassiveEffectMountInDEV); - } - function invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) { - for (var subtreeRoot = null; null != firstChild; ) { - var primarySubtreeFlag = firstChild.subtreeFlags & fiberFlags; - firstChild !== subtreeRoot && - null != firstChild.child && - 0 !== primarySubtreeFlag - ? (firstChild = firstChild.child) - : (0 !== (firstChild.flags & fiberFlags) && - invokeEffectFn(firstChild), - (firstChild = - null !== firstChild.sibling - ? firstChild.sibling - : (subtreeRoot = firstChild.return))); + function recursivelyTraverseAndDoubleInvokeEffectsInDEV( + root$jscomp$0, + parentFiber, + isInStrictMode + ) { + if (0 !== (parentFiber.subtreeFlags & 33562624)) + for (parentFiber = parentFiber.child; null !== parentFiber; ) { + var root = root$jscomp$0, + fiber = parentFiber, + isStrictModeFiber = fiber.type === REACT_STRICT_MODE_TYPE; + isStrictModeFiber = isInStrictMode || isStrictModeFiber; + 22 !== fiber.tag + ? fiber.flags & 33554432 + ? isStrictModeFiber && + runWithFiberInDEV( + fiber, + doubleInvokeEffectsOnFiber, + root, + fiber, + 0 === (fiber.mode & 64) + ) + : recursivelyTraverseAndDoubleInvokeEffectsInDEV( + root, + fiber, + isStrictModeFiber + ) + : null === fiber.memoizedState && + (isStrictModeFiber && fiber.flags & 8192 + ? runWithFiberInDEV( + fiber, + doubleInvokeEffectsOnFiber, + root, + fiber + ) + : fiber.subtreeFlags & 33554432 && + runWithFiberInDEV( + fiber, + recursivelyTraverseAndDoubleInvokeEffectsInDEV, + root, + fiber, + isStrictModeFiber + )); + parentFiber = parentFiber.sibling; + } + } + function doubleInvokeEffectsOnFiber(root, fiber) { + var shouldDoubleInvokePassiveEffects = + 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : !0; + setIsStrictModeForDevtools(!0); + try { + disappearLayoutEffects(fiber), + shouldDoubleInvokePassiveEffects && disconnectPassiveEffect(fiber), + reappearLayoutEffects(root, fiber.alternate, fiber, !1), + shouldDoubleInvokePassiveEffects && + reconnectPassiveEffects(root, fiber, 0, null, !1); + } finally { + setIsStrictModeForDevtools(!1); } } + function commitDoubleInvokeEffectsInDEV(root) { + var doubleInvokeEffects = !0; + root.current.mode & 24 || (doubleInvokeEffects = !1); + recursivelyTraverseAndDoubleInvokeEffectsInDEV( + root, + root.current, + doubleInvokeEffects + ); + } function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) { if ((executionContext & RenderContext) === NoContext) { var tag = fiber.tag; @@ -14639,7 +14605,6 @@ __DEV__ && var didWarnAboutReassigningProps = !1; var didWarnAboutRevealOrder = {}; var didWarnAboutTailOptions = {}; - var didWarnAboutDefaultPropsOnFunctionComponent = {}; var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, @@ -15003,10 +14968,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-classic-e06c72fc-20241215", + version: "19.1.0-www-classic-d4287258-20241217", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15026,7 +14991,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1109, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1094, isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT, isConcurrent = isConcurrentOnly, isStrictMode = !1; @@ -15141,5 +15106,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.1.0-www-classic-e06c72fc-20241215"; + exports.version = "19.1.0-www-classic-d4287258-20241217"; })(); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index 3b42a1f4ca52d..9596d7513e2d6 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -13,7 +13,7 @@ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1109() { + function JSCompiler_object_inline_createNodeMock_1094() { return null; } function findHook(fiber, id) { @@ -2236,13 +2236,13 @@ __DEV__ && } } function processUpdateQueue( - workInProgress$jscomp$0, + workInProgress, props, instance$jscomp$0, renderLanes ) { didReadFromEntangledAsyncAction = !1; - var queue = workInProgress$jscomp$0.updateQueue; + var queue = workInProgress.updateQueue; hasForceUpdate = !1; currentlyProcessingQueue = queue.shared; var firstBaseUpdate = queue.firstBaseUpdate, @@ -2257,7 +2257,7 @@ __DEV__ && ? (firstBaseUpdate = firstPendingUpdate) : (lastBaseUpdate.next = firstPendingUpdate); lastBaseUpdate = lastPendingUpdate; - var current = workInProgress$jscomp$0.alternate; + var current = workInProgress.alternate; null !== current && ((current = current.updateQueue), (pendingQueue = current.lastBaseUpdate), @@ -2293,40 +2293,57 @@ __DEV__ && next: null }); a: { - var workInProgress = workInProgress$jscomp$0, - update = pendingQueue; - updateLane = props; - var instance = instance$jscomp$0; - switch (update.tag) { + updateLane = workInProgress; + var partialState = pendingQueue; + var nextProps = props, + instance = instance$jscomp$0; + switch (partialState.tag) { case ReplaceState: - workInProgress = update.payload; - if ("function" === typeof workInProgress) { + partialState = partialState.payload; + if ("function" === typeof partialState) { isDisallowedContextReadInDEV = !0; - newState = workInProgress.call( + var nextState = partialState.call( instance, newState, - updateLane + nextProps ); + if (updateLane.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + partialState.call(instance, newState, nextProps); + } finally { + setIsStrictModeForDevtools(!1); + } + } isDisallowedContextReadInDEV = !1; + newState = nextState; break a; } - newState = workInProgress; + newState = partialState; break a; case CaptureUpdate: - workInProgress.flags = (workInProgress.flags & -65537) | 128; + updateLane.flags = (updateLane.flags & -65537) | 128; case UpdateState: - workInProgress = update.payload; - "function" === typeof workInProgress - ? ((isDisallowedContextReadInDEV = !0), - (updateLane = workInProgress.call( - instance, - newState, - updateLane - )), - (isDisallowedContextReadInDEV = !1)) - : (updateLane = workInProgress); - if (null === updateLane || void 0 === updateLane) break a; - newState = assign({}, newState, updateLane); + nextState = partialState.payload; + if ("function" === typeof nextState) { + isDisallowedContextReadInDEV = !0; + partialState = nextState.call( + instance, + newState, + nextProps + ); + if (updateLane.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + nextState.call(instance, newState, nextProps); + } finally { + setIsStrictModeForDevtools(!1); + } + } + isDisallowedContextReadInDEV = !1; + } else partialState = nextState; + if (null === partialState || void 0 === partialState) break a; + newState = assign({}, newState, partialState); break a; case ForceUpdate: hasForceUpdate = !0; @@ -2334,8 +2351,8 @@ __DEV__ && } updateLane = pendingQueue.callback; null !== updateLane && - ((workInProgress$jscomp$0.flags |= 64), - isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), + ((workInProgress.flags |= 64), + isHiddenUpdate && (workInProgress.flags |= 8192), (isHiddenUpdate = queue.callbacks), null === isHiddenUpdate ? (queue.callbacks = [updateLane]) @@ -2370,8 +2387,8 @@ __DEV__ && queue.lastBaseUpdate = current; null === firstBaseUpdate && (queue.shared.lanes = 0); workInProgressRootSkippedLanes |= lastBaseUpdate; - workInProgress$jscomp$0.lanes = lastBaseUpdate; - workInProgress$jscomp$0.memoizedState = newState; + workInProgress.lanes = lastBaseUpdate; + workInProgress.memoizedState = newState; } currentlyProcessingQueue = null; } @@ -2664,18 +2681,32 @@ __DEV__ && : null !== hookTypesDev ? HooksDispatcherOnMountWithHookTypesInDEV : HooksDispatcherOnMountInDEV; - shouldDoubleInvokeUserFnsInHooksDEV = !1; - nextRenderLanes = callComponentInDEV(Component, props, secondArg); + shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = + 0 !== (workInProgress.mode & 8); + var children = callComponentInDEV(Component, props, secondArg); shouldDoubleInvokeUserFnsInHooksDEV = !1; didScheduleRenderPhaseUpdateDuringThisPass && - (nextRenderLanes = renderWithHooksAgain( + (children = renderWithHooksAgain( workInProgress, Component, props, secondArg )); + if (nextRenderLanes) { + setIsStrictModeForDevtools(!0); + try { + children = renderWithHooksAgain( + workInProgress, + Component, + props, + secondArg + ); + } finally { + setIsStrictModeForDevtools(!1); + } + } finishRenderingHooks(current, workInProgress); - return nextRenderLanes; + return children; } function finishRenderingHooks(current, workInProgress) { workInProgress._debugHookTypes = hookTypesDev; @@ -5150,9 +5181,17 @@ __DEV__ && getDerivedStateFromProps, nextProps ) { - var prevState = workInProgress.memoizedState; - getDerivedStateFromProps = getDerivedStateFromProps(nextProps, prevState); - void 0 === getDerivedStateFromProps && + var prevState = workInProgress.memoizedState, + partialState = getDerivedStateFromProps(nextProps, prevState); + if (workInProgress.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + partialState = getDerivedStateFromProps(nextProps, prevState); + } finally { + setIsStrictModeForDevtools(!1); + } + } + void 0 === partialState && ((ctor = getComponentNameFromType(ctor) || "Component"), didWarnAboutUndefinedDerivedState.has(ctor) || (didWarnAboutUndefinedDerivedState.add(ctor), @@ -5161,9 +5200,9 @@ __DEV__ && ctor ))); prevState = - null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps + null === partialState || void 0 === partialState ? prevState - : assign({}, prevState, getDerivedStateFromProps); + : assign({}, prevState, partialState); workInProgress.memoizedState = prevState; 0 === workInProgress.lanes && (workInProgress.updateQueue.baseState = prevState); @@ -5177,23 +5216,35 @@ __DEV__ && newState, nextContext ) { - workInProgress = workInProgress.stateNode; - return "function" === typeof workInProgress.shouldComponentUpdate - ? ((oldProps = workInProgress.shouldComponentUpdate( - newProps, - newState, - nextContext - )), - void 0 === oldProps && - error$jscomp$0( - "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.", - getComponentNameFromType(ctor) || "Component" - ), - oldProps) - : ctor.prototype && ctor.prototype.isPureReactComponent - ? !shallowEqual(oldProps, newProps) || - !shallowEqual(oldState, newState) - : !0; + var instance = workInProgress.stateNode; + if ("function" === typeof instance.shouldComponentUpdate) { + oldProps = instance.shouldComponentUpdate( + newProps, + newState, + nextContext + ); + if (workInProgress.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + oldProps = instance.shouldComponentUpdate( + newProps, + newState, + nextContext + ); + } finally { + setIsStrictModeForDevtools(!1); + } + } + void 0 === oldProps && + error$jscomp$0( + "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.", + getComponentNameFromType(ctor) || "Component" + ); + return oldProps; + } + return ctor.prototype && ctor.prototype.isPureReactComponent + ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) + : !0; } function callComponentWillReceiveProps( workInProgress, @@ -5221,21 +5272,14 @@ __DEV__ && null )); } - function resolveClassComponentProps( - Component, - baseProps, - alreadyResolvedDefaultProps - ) { + function resolveClassComponentProps(Component, baseProps) { var newProps = baseProps; if ("ref" in baseProps) { newProps = {}; for (var propName in baseProps) "ref" !== propName && (newProps[propName] = baseProps[propName]); } - if ( - (Component = Component.defaultProps) && - !alreadyResolvedDefaultProps - ) { + if ((Component = Component.defaultProps)) { newProps === baseProps && (newProps = assign({}, newProps)); for (var _propName in Component) void 0 === newProps[_propName] && @@ -5243,17 +5287,6 @@ __DEV__ && } return newProps; } - function resolveDefaultPropsOnNonClassComponent(Component, baseProps) { - if (Component && Component.defaultProps) { - baseProps = assign({}, baseProps); - Component = Component.defaultProps; - for (var propName in Component) - void 0 === baseProps[propName] && - (baseProps[propName] = Component[propName]); - return baseProps; - } - return baseProps; - } function defaultOnUncaughtError(error, errorInfo) { reportGlobalError(error); error = componentName @@ -5602,8 +5635,7 @@ __DEV__ && "function" === typeof type && !shouldConstruct(type) && void 0 === type.defaultProps && - null === Component.compare && - void 0 === Component.defaultProps + null === Component.compare ) return ( (Component = resolveFunctionForHotReloading(type)), @@ -5618,15 +5650,7 @@ __DEV__ && renderLanes ) ); - void 0 !== Component.defaultProps && - ((current = getComponentNameFromType(type) || "Unknown"), - didWarnAboutDefaultPropsOnFunctionComponent[current] || - (error$jscomp$0( - "%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.", - current - ), - (didWarnAboutDefaultPropsOnFunctionComponent[current] = !0))); - nextProps = createFiberFromTypeAndProps( + current = createFiberFromTypeAndProps( Component.type, null, nextProps, @@ -5634,9 +5658,9 @@ __DEV__ && workInProgress.mode, renderLanes ); - nextProps.ref = workInProgress.ref; - nextProps.return = workInProgress; - return (workInProgress.child = nextProps); + current.ref = workInProgress.ref; + current.return = workInProgress; + return (workInProgress.child = current); } type = current.child; if (!checkScheduledUpdateOrContext(current, renderLanes)) { @@ -5654,10 +5678,10 @@ __DEV__ && ); } workInProgress.flags |= 1; - nextProps = createWorkInProgress(type, nextProps); - nextProps.ref = workInProgress.ref; - nextProps.return = workInProgress; - return (workInProgress.child = nextProps); + current = createWorkInProgress(type, nextProps); + current.ref = workInProgress.ref; + current.return = workInProgress; + return (workInProgress.child = current); } function updateSimpleMemoComponent( current, @@ -5959,6 +5983,14 @@ __DEV__ && ? getMaskedContext(workInProgress, state) : emptyContextObject)); addendum = new Component(nextProps, context); + if (workInProgress.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + addendum = new Component(nextProps, context); + } finally { + setIsStrictModeForDevtools(!1); + } + } var state$jscomp$0 = (workInProgress.memoizedState = null !== addendum.state && void 0 !== addendum.state ? addendum.state @@ -6231,11 +6263,7 @@ __DEV__ && } else if (null === current$jscomp$0) (state = workInProgress.stateNode), (foundWillUpdateName = workInProgress.memoizedProps), - (lane = resolveClassComponentProps( - Component, - foundWillUpdateName, - workInProgress.type === workInProgress.elementType - )), + (lane = resolveClassComponentProps(Component, foundWillUpdateName)), (state.props = lane), (state$jscomp$0 = state.context), (context = Component.contextType), @@ -6320,11 +6348,7 @@ __DEV__ && state = workInProgress.stateNode; cloneUpdateQueue(current$jscomp$0, workInProgress); lane = workInProgress.memoizedProps; - context = resolveClassComponentProps( - Component, - lane, - workInProgress.type === workInProgress.elementType - ); + context = resolveClassComponentProps(Component, lane); state.props = context; addendum = workInProgress.pendingProps; foundWillUpdateName = state.context; @@ -6432,46 +6456,55 @@ __DEV__ && context = state; markRef(current$jscomp$0, workInProgress); lane = 0 !== (workInProgress.flags & 128); - context || lane - ? ((context = workInProgress.stateNode), - (ReactSharedInternals.getCurrentStack = - null === workInProgress ? null : getCurrentFiberStackInDev), - (isRendering = !1), - (current = workInProgress), - lane && "function" !== typeof Component.getDerivedStateFromError - ? ((addendum = null), (profilerStartTime = -1)) - : (addendum = callRenderInDEV(context)), - (workInProgress.flags |= 1), - null !== current$jscomp$0 && lane - ? ((lane = addendum), - (workInProgress.child = reconcileChildFibers( - workInProgress, - current$jscomp$0.child, - null, - renderLanes - )), - (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - lane, - renderLanes - ))) - : reconcileChildren( - current$jscomp$0, - workInProgress, - addendum, - renderLanes - ), - (workInProgress.memoizedState = context.state), - _instance && invalidateContextProvider(workInProgress, Component, !0), - (current$jscomp$0 = workInProgress.child)) - : (_instance && - invalidateContextProvider(workInProgress, Component, !1), + if (context || lane) { + context = workInProgress.stateNode; + ReactSharedInternals.getCurrentStack = + null === workInProgress ? null : getCurrentFiberStackInDev; + isRendering = !1; + current = workInProgress; + if (lane && "function" !== typeof Component.getDerivedStateFromError) + (addendum = null), (profilerStartTime = -1); + else if ( + ((addendum = callRenderInDEV(context)), workInProgress.mode & 8) + ) { + setIsStrictModeForDevtools(!0); + try { + callRenderInDEV(context); + } finally { + setIsStrictModeForDevtools(!1); + } + } + workInProgress.flags |= 1; + null !== current$jscomp$0 && lane + ? ((lane = addendum), + (workInProgress.child = reconcileChildFibers( + workInProgress, + current$jscomp$0.child, + null, + renderLanes + )), + (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + lane, + renderLanes + ))) + : reconcileChildren( + current$jscomp$0, + workInProgress, + addendum, + renderLanes + ); + workInProgress.memoizedState = context.state; + _instance && invalidateContextProvider(workInProgress, Component, !0); + current$jscomp$0 = workInProgress.child; + } else + _instance && invalidateContextProvider(workInProgress, Component, !1), (current$jscomp$0 = bailoutOnAlreadyFinishedWork( current$jscomp$0, workInProgress, renderLanes - ))); + )); Component = workInProgress.stateNode; state && Component.props !== nextProps && @@ -6502,14 +6535,6 @@ __DEV__ && "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...", Component.displayName || Component.name || "Component" ); - void 0 !== Component.defaultProps && - ((workInProgress = getComponentNameFromType(Component) || "Unknown"), - didWarnAboutDefaultPropsOnFunctionComponent[workInProgress] || - (error$jscomp$0( - "%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.", - workInProgress - ), - (didWarnAboutDefaultPropsOnFunctionComponent[workInProgress] = !0))); "function" === typeof Component.getDerivedStateFromProps && ((workInProgress = getComponentNameFromType(Component) || "Unknown"), didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] || @@ -7306,8 +7331,7 @@ __DEV__ && shouldConstruct(current) ? ((returnFiber = resolveClassComponentProps( current, - returnFiber, - !1 + returnFiber )), (workInProgress.tag = 1), (workInProgress.type = current = @@ -7319,11 +7343,7 @@ __DEV__ && returnFiber, renderLanes ))) - : ((returnFiber = resolveDefaultPropsOnNonClassComponent( - current, - returnFiber - )), - (workInProgress.tag = 0), + : ((workInProgress.tag = 0), validateFunctionComponentInDev(workInProgress, current), (workInProgress.type = current = resolveFunctionForHotReloading(current)), @@ -7340,10 +7360,6 @@ __DEV__ && ((prevSibling = current.$$typeof), prevSibling === REACT_FORWARD_REF_TYPE) ) { - returnFiber = resolveDefaultPropsOnNonClassComponent( - current, - returnFiber - ); workInProgress.tag = 11; workInProgress.type = current = resolveForwardRefForHotReloading(current); @@ -7356,19 +7372,12 @@ __DEV__ && ); break a; } else if (prevSibling === REACT_MEMO_TYPE) { - returnFiber = resolveDefaultPropsOnNonClassComponent( - current, - returnFiber - ); workInProgress.tag = 14; workInProgress = updateMemoComponent( null, workInProgress, current, - resolveDefaultPropsOnNonClassComponent( - current.type, - returnFiber - ), + returnFiber, renderLanes ); break a; @@ -7379,41 +7388,29 @@ __DEV__ && current.$$typeof === REACT_LAZY_TYPE && (workInProgress = " Did you wrap a component in React.lazy() more than once?"); - renderLanes = getComponentNameFromType(current) || current; + current = getComponentNameFromType(current) || current; throw Error( "Element type is invalid. Received a promise that resolves to: " + - renderLanes + + current + ". Lazy element type must resolve to a class or function." + workInProgress ); } return workInProgress; case 0: - return ( - (returnFiber = workInProgress.type), - (prevSibling = workInProgress.pendingProps), - (prevSibling = - workInProgress.elementType === returnFiber - ? prevSibling - : resolveDefaultPropsOnNonClassComponent( - returnFiber, - prevSibling - )), - updateFunctionComponent( - current, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) + return updateFunctionComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes ); case 1: return ( (returnFiber = workInProgress.type), (prevSibling = resolveClassComponentProps( returnFiber, - workInProgress.pendingProps, - workInProgress.elementType === returnFiber + workInProgress.pendingProps )), updateClassComponent( current, @@ -7510,23 +7507,12 @@ __DEV__ && workInProgress.child ); case 11: - return ( - (returnFiber = workInProgress.type), - (prevSibling = workInProgress.pendingProps), - (prevSibling = - workInProgress.elementType === returnFiber - ? prevSibling - : resolveDefaultPropsOnNonClassComponent( - returnFiber, - prevSibling - )), - updateForwardRef( - current, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) + return updateForwardRef( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes ); case 7: return ( @@ -7610,23 +7596,12 @@ __DEV__ && workInProgress.child ); case 14: - return ( - (returnFiber = workInProgress.type), - (prevSibling = resolveDefaultPropsOnNonClassComponent( - returnFiber, - workInProgress.pendingProps - )), - (prevSibling = resolveDefaultPropsOnNonClassComponent( - returnFiber.type, - prevSibling - )), - updateMemoComponent( - current, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) + return updateMemoComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes ); case 15: return updateSimpleMemoComponent( @@ -8829,16 +8804,6 @@ __DEV__ && nearestMountedAncestor ); } - function commitClassDidMount(finishedWork) { - var instance = finishedWork.stateNode; - "function" === typeof instance.componentDidMount && - runWithFiberInDEV( - finishedWork, - callComponentDidMountInDEV, - finishedWork, - instance - ); - } function commitClassCallbacks(finishedWork) { var updateQueue = finishedWork.updateQueue; if (null !== updateQueue) { @@ -8923,8 +8888,7 @@ __DEV__ && ) { instance.props = resolveClassComponentProps( current.type, - current.memoizedProps, - current.elementType === current.type + current.memoizedProps ); instance.state = current.memoizedState; shouldProfile(current) @@ -9276,8 +9240,7 @@ __DEV__ && else { var prevProps = resolveClassComponentProps( finishedWork.type, - current.memoizedProps, - finishedWork.elementType === finishedWork.type + current.memoizedProps ); current = current.memoizedState; finishedWork.type.defaultProps || @@ -10032,175 +9995,193 @@ __DEV__ && commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber), (parentFiber = parentFiber.sibling); } - function recursivelyTraverseDisappearLayoutEffects(parentFiber) { - for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var finishedWork = parentFiber; - switch (finishedWork.tag) { - case 0: - case 11: - case 14: - case 15: - commitHookLayoutUnmountEffects( + function disappearLayoutEffects(finishedWork) { + switch (finishedWork.tag) { + case 0: + case 11: + case 14: + case 15: + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout + ); + recursivelyTraverseDisappearLayoutEffects(finishedWork); + break; + case 1: + safelyDetachRef(finishedWork, finishedWork.return); + var instance = finishedWork.stateNode; + "function" === typeof instance.componentWillUnmount && + safelyCallComponentWillUnmount( finishedWork, finishedWork.return, - Layout + instance ); + recursivelyTraverseDisappearLayoutEffects(finishedWork); + break; + case 26: + case 27: + case 5: + safelyDetachRef(finishedWork, finishedWork.return); + recursivelyTraverseDisappearLayoutEffects(finishedWork); + break; + case 22: + safelyDetachRef(finishedWork, finishedWork.return); + null === finishedWork.memoizedState && recursivelyTraverseDisappearLayoutEffects(finishedWork); - break; - case 1: - safelyDetachRef(finishedWork, finishedWork.return); - var instance = finishedWork.stateNode; - "function" === typeof instance.componentWillUnmount && - safelyCallComponentWillUnmount( - finishedWork, - finishedWork.return, - instance - ); - recursivelyTraverseDisappearLayoutEffects(finishedWork); - break; - case 26: - case 27: - case 5: - safelyDetachRef(finishedWork, finishedWork.return); - recursivelyTraverseDisappearLayoutEffects(finishedWork); - break; - case 22: - safelyDetachRef(finishedWork, finishedWork.return); - null === finishedWork.memoizedState && - recursivelyTraverseDisappearLayoutEffects(finishedWork); - break; - default: - recursivelyTraverseDisappearLayoutEffects(finishedWork); - } - parentFiber = parentFiber.sibling; + break; + default: + recursivelyTraverseDisappearLayoutEffects(finishedWork); } } - function recursivelyTraverseReappearLayoutEffects( - finishedRoot$jscomp$0, - parentFiber, - includeWorkInProgressEffects$jscomp$0 + function recursivelyTraverseDisappearLayoutEffects(parentFiber) { + for (parentFiber = parentFiber.child; null !== parentFiber; ) + disappearLayoutEffects(parentFiber), + (parentFiber = parentFiber.sibling); + } + function reappearLayoutEffects( + finishedRoot, + current, + finishedWork, + includeWorkInProgressEffects ) { - includeWorkInProgressEffects$jscomp$0 = - includeWorkInProgressEffects$jscomp$0 && - 0 !== (parentFiber.subtreeFlags & 8772); - for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var finishedRoot = finishedRoot$jscomp$0, - current = parentFiber.alternate, - finishedWork = parentFiber, - includeWorkInProgressEffects = includeWorkInProgressEffects$jscomp$0, - flags = finishedWork.flags; - switch (finishedWork.tag) { - case 0: - case 11: - case 15: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, + var flags = finishedWork.flags; + switch (finishedWork.tag) { + case 0: + case 11: + case 15: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + commitHookLayoutEffects(finishedWork, Layout); + break; + case 1: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + current = finishedWork.stateNode; + "function" === typeof current.componentDidMount && + runWithFiberInDEV( finishedWork, - includeWorkInProgressEffects - ); - commitHookLayoutEffects(finishedWork, Layout); - break; - case 1: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, + callComponentDidMountInDEV, finishedWork, - includeWorkInProgressEffects + current ); - commitClassDidMount(finishedWork); - current = finishedWork; - finishedRoot = current.updateQueue; - if (null !== finishedRoot) { - var instance = current.stateNode; - try { - runWithFiberInDEV( - current, - commitHiddenCallbacks, - finishedRoot, - instance - ); - } catch (error$14) { - captureCommitPhaseError(current, current.return, error$14); - } - } - includeWorkInProgressEffects && - flags & 64 && - commitClassCallbacks(finishedWork); - safelyAttachRef(finishedWork, finishedWork.return); - break; - case 26: - case 27: - case 5: + current = finishedWork.updateQueue; + if (null !== current) { + finishedRoot = finishedWork.stateNode; + try { + runWithFiberInDEV( + finishedWork, + commitHiddenCallbacks, + current, + finishedRoot + ); + } catch (error$14) { + captureCommitPhaseError( + finishedWork, + finishedWork.return, + error$14 + ); + } + } + includeWorkInProgressEffects && + flags & 64 && + commitClassCallbacks(finishedWork); + safelyAttachRef(finishedWork, finishedWork.return); + break; + case 26: + case 27: + case 5: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + null === current && + flags & 4 && + commitHostMount(finishedWork); + safelyAttachRef(finishedWork, finishedWork.return); + break; + case 12: + if (includeWorkInProgressEffects && flags & 4) { + flags = pushNestedEffectDurations(); recursivelyTraverseReappearLayoutEffects( finishedRoot, finishedWork, includeWorkInProgressEffects ); - includeWorkInProgressEffects && - null === current && - flags & 4 && - commitHostMount(finishedWork); - safelyAttachRef(finishedWork, finishedWork.return); - break; - case 12: - if (includeWorkInProgressEffects && flags & 4) { - flags = pushNestedEffectDurations(); - recursivelyTraverseReappearLayoutEffects( - finishedRoot, + includeWorkInProgressEffects = finishedWork.stateNode; + includeWorkInProgressEffects.effectDuration += + bubbleNestedEffectDurations(flags); + try { + runWithFiberInDEV( finishedWork, - includeWorkInProgressEffects + commitProfiler, + finishedWork, + current, + commitStartTime, + includeWorkInProgressEffects.effectDuration ); - includeWorkInProgressEffects = finishedWork.stateNode; - includeWorkInProgressEffects.effectDuration += - bubbleNestedEffectDurations(flags); - try { - runWithFiberInDEV( - finishedWork, - commitProfiler, - finishedWork, - current, - commitStartTime, - includeWorkInProgressEffects.effectDuration - ); - } catch (error$20) { - captureCommitPhaseError( - finishedWork, - finishedWork.return, - error$20 - ); - } - } else - recursivelyTraverseReappearLayoutEffects( - finishedRoot, + } catch (error$20) { + captureCommitPhaseError( finishedWork, - includeWorkInProgressEffects + finishedWork.return, + error$20 ); - break; - case 13: + } + } else recursivelyTraverseReappearLayoutEffects( finishedRoot, finishedWork, includeWorkInProgressEffects ); - break; - case 22: - null === finishedWork.memoizedState && - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); - safelyAttachRef(finishedWork, finishedWork.return); - break; - default: + break; + case 13: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; + case 22: + null === finishedWork.memoizedState && recursivelyTraverseReappearLayoutEffects( finishedRoot, finishedWork, includeWorkInProgressEffects ); - } - parentFiber = parentFiber.sibling; + safelyAttachRef(finishedWork, finishedWork.return); + break; + default: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); } } + function recursivelyTraverseReappearLayoutEffects( + finishedRoot, + parentFiber, + includeWorkInProgressEffects + ) { + includeWorkInProgressEffects = + includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); + for (parentFiber = parentFiber.child; null !== parentFiber; ) + reappearLayoutEffects( + finishedRoot, + parentFiber.alternate, + parentFiber, + includeWorkInProgressEffects + ), + (parentFiber = parentFiber.sibling); + } function commitOffscreenPassiveMountEffects(current, finishedWork) { var previousCache = null; null !== current && @@ -10371,92 +10352,98 @@ __DEV__ && } } function recursivelyTraverseReconnectPassiveEffects( - finishedRoot$jscomp$0, + finishedRoot, parentFiber, - committedLanes$jscomp$0, - committedTransitions$jscomp$0, - includeWorkInProgressEffects$jscomp$0 + committedLanes, + committedTransitions, + includeWorkInProgressEffects ) { - includeWorkInProgressEffects$jscomp$0 = - includeWorkInProgressEffects$jscomp$0 && + includeWorkInProgressEffects = + includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 10256); - for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var finishedRoot = finishedRoot$jscomp$0, - finishedWork = parentFiber, - committedLanes = committedLanes$jscomp$0, - committedTransitions = committedTransitions$jscomp$0, - includeWorkInProgressEffects = includeWorkInProgressEffects$jscomp$0, - flags = finishedWork.flags; - switch (finishedWork.tag) { - case 0: - case 11: - case 15: - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - ); - commitHookPassiveMountEffects(finishedWork, Passive); - break; - case 23: - break; - case 22: - var _instance2 = finishedWork.stateNode; - null !== finishedWork.memoizedState - ? _instance2._visibility & 4 - ? recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - ) - : recursivelyTraverseAtomicPassiveEffects( - finishedRoot, - finishedWork - ) - : ((_instance2._visibility |= 4), - recursivelyTraverseReconnectPassiveEffects( + for (parentFiber = parentFiber.child; null !== parentFiber; ) + reconnectPassiveEffects( + finishedRoot, + parentFiber, + committedLanes, + committedTransitions, + includeWorkInProgressEffects + ), + (parentFiber = parentFiber.sibling); + } + function reconnectPassiveEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + includeWorkInProgressEffects + ) { + var flags = finishedWork.flags; + switch (finishedWork.tag) { + case 0: + case 11: + case 15: + recursivelyTraverseReconnectPassiveEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + includeWorkInProgressEffects + ); + commitHookPassiveMountEffects(finishedWork, Passive); + break; + case 23: + break; + case 22: + var _instance2 = finishedWork.stateNode; + null !== finishedWork.memoizedState + ? _instance2._visibility & 4 + ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects - )); - includeWorkInProgressEffects && - flags & 2048 && - commitOffscreenPassiveMountEffects( - finishedWork.alternate, - finishedWork - ); - break; - case 24: - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects - ); - includeWorkInProgressEffects && - flags & 2048 && - commitCachePassiveMountEffect( - finishedWork.alternate, - finishedWork - ); - break; - default: - recursivelyTraverseReconnectPassiveEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions, - includeWorkInProgressEffects + ) + : recursivelyTraverseAtomicPassiveEffects( + finishedRoot, + finishedWork + ) + : ((_instance2._visibility |= 4), + recursivelyTraverseReconnectPassiveEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + includeWorkInProgressEffects + )); + includeWorkInProgressEffects && + flags & 2048 && + commitOffscreenPassiveMountEffects( + finishedWork.alternate, + finishedWork ); - } - parentFiber = parentFiber.sibling; + break; + case 24: + recursivelyTraverseReconnectPassiveEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 2048 && + commitCachePassiveMountEffect(finishedWork.alternate, finishedWork); + break; + default: + recursivelyTraverseReconnectPassiveEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions, + includeWorkInProgressEffects + ); } } function recursivelyTraverseAtomicPassiveEffects( @@ -10621,29 +10608,30 @@ __DEV__ && } detachAlternateSiblings(parentFiber); } - for (parentFiber = parentFiber.child; null !== parentFiber; ) { - deletions = parentFiber; - switch (deletions.tag) { - case 0: - case 11: - case 15: - commitHookPassiveUnmountEffects( - deletions, - deletions.return, - Passive - ); - recursivelyTraverseDisconnectPassiveEffects(deletions); - break; - case 22: - i = deletions.stateNode; - i._visibility & 4 && - ((i._visibility &= -5), - recursivelyTraverseDisconnectPassiveEffects(deletions)); - break; - default: - recursivelyTraverseDisconnectPassiveEffects(deletions); - } - parentFiber = parentFiber.sibling; + for (parentFiber = parentFiber.child; null !== parentFiber; ) + disconnectPassiveEffect(parentFiber), + (parentFiber = parentFiber.sibling); + } + function disconnectPassiveEffect(finishedWork) { + switch (finishedWork.tag) { + case 0: + case 11: + case 15: + commitHookPassiveUnmountEffects( + finishedWork, + finishedWork.return, + Passive + ); + recursivelyTraverseDisconnectPassiveEffects(finishedWork); + break; + case 22: + var instance = finishedWork.stateNode; + instance._visibility & 4 && + ((instance._visibility &= -5), + recursivelyTraverseDisconnectPassiveEffects(finishedWork)); + break; + default: + recursivelyTraverseDisconnectPassiveEffects(finishedWork); } } function commitPassiveUnmountEffectsInsideOfDeletedTree_begin( @@ -10694,46 +10682,6 @@ __DEV__ && } } } - function invokeLayoutEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListMount(Layout | HasEffect, fiber); - break; - case 1: - commitClassDidMount(fiber); - } - } - function invokePassiveEffectMountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListMount(Passive | HasEffect, fiber); - } - } - function invokeLayoutEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return); - break; - case 1: - var instance = fiber.stateNode; - "function" === typeof instance.componentWillUnmount && - safelyCallComponentWillUnmount(fiber, fiber.return, instance); - } - } - function invokePassiveEffectUnmountInDEV(fiber) { - switch (fiber.tag) { - case 0: - case 11: - case 15: - commitHookEffectListUnmount(Passive | HasEffect, fiber, fiber.return); - } - } function isConcurrentActEnvironment() { var isReactActEnvironmentGlobal = "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT @@ -11544,14 +11492,7 @@ __DEV__ && case 15: case 0: var Component = unitOfWork.type, - unresolvedProps = unitOfWork.pendingProps; - unresolvedProps = - unitOfWork.elementType === Component - ? unresolvedProps - : resolveDefaultPropsOnNonClassComponent( - Component, - unresolvedProps - ); + resolvedProps = unitOfWork.pendingProps; var context = isContextProvider(Component) ? previousContext : contextStackCursor$1.current; @@ -11559,27 +11500,18 @@ __DEV__ && current = replayFunctionComponent( current, unitOfWork, - unresolvedProps, + resolvedProps, Component, context, workInProgressRootRenderLanes ); break; case 11: - Component = unitOfWork.type.render; - unresolvedProps = unitOfWork.pendingProps; - unresolvedProps = - unitOfWork.elementType === Component - ? unresolvedProps - : resolveDefaultPropsOnNonClassComponent( - Component, - unresolvedProps - ); current = replayFunctionComponent( current, unitOfWork, - unresolvedProps, - Component, + unitOfWork.pendingProps, + unitOfWork.type.render, unitOfWork.ref, workInProgressRootRenderLanes ); @@ -11807,13 +11739,7 @@ __DEV__ && (rootWithPassiveNestedUpdates = null)); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || - runWithFiberInDEV( - root.current, - legacyCommitDoubleInvokeEffectsInDEV, - root.current, - !1 - ); + transitions || commitDoubleInvokeEffectsInDEV(root); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); ensureRootIsScheduled(root); if (null !== recoverableErrors) @@ -11901,12 +11827,7 @@ __DEV__ && lanes, priority ); - runWithFiberInDEV( - root$jscomp$0.current, - legacyCommitDoubleInvokeEffectsInDEV, - root$jscomp$0.current, - !0 - ); + commitDoubleInvokeEffectsInDEV(root$jscomp$0); executionContext = prevExecutionContext; flushSyncWorkAcrossRoots_impl(0, !1); didScheduleUpdateDuringPassiveEffects @@ -12077,29 +11998,74 @@ __DEV__ && null !== retryCache && retryCache.delete(wakeable); retryTimedOutBoundary(boundaryFiber, retryLane); } - function legacyCommitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) { - invokeEffectsInDev(fiber, 67108864, invokeLayoutEffectUnmountInDEV); - hasPassiveEffects && - invokeEffectsInDev(fiber, 134217728, invokePassiveEffectUnmountInDEV); - invokeEffectsInDev(fiber, 67108864, invokeLayoutEffectMountInDEV); - hasPassiveEffects && - invokeEffectsInDev(fiber, 134217728, invokePassiveEffectMountInDEV); - } - function invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) { - for (var subtreeRoot = null; null != firstChild; ) { - var primarySubtreeFlag = firstChild.subtreeFlags & fiberFlags; - firstChild !== subtreeRoot && - null != firstChild.child && - 0 !== primarySubtreeFlag - ? (firstChild = firstChild.child) - : (0 !== (firstChild.flags & fiberFlags) && - invokeEffectFn(firstChild), - (firstChild = - null !== firstChild.sibling - ? firstChild.sibling - : (subtreeRoot = firstChild.return))); + function recursivelyTraverseAndDoubleInvokeEffectsInDEV( + root$jscomp$0, + parentFiber, + isInStrictMode + ) { + if (0 !== (parentFiber.subtreeFlags & 33562624)) + for (parentFiber = parentFiber.child; null !== parentFiber; ) { + var root = root$jscomp$0, + fiber = parentFiber, + isStrictModeFiber = fiber.type === REACT_STRICT_MODE_TYPE; + isStrictModeFiber = isInStrictMode || isStrictModeFiber; + 22 !== fiber.tag + ? fiber.flags & 33554432 + ? isStrictModeFiber && + runWithFiberInDEV( + fiber, + doubleInvokeEffectsOnFiber, + root, + fiber, + 0 === (fiber.mode & 64) + ) + : recursivelyTraverseAndDoubleInvokeEffectsInDEV( + root, + fiber, + isStrictModeFiber + ) + : null === fiber.memoizedState && + (isStrictModeFiber && fiber.flags & 8192 + ? runWithFiberInDEV( + fiber, + doubleInvokeEffectsOnFiber, + root, + fiber + ) + : fiber.subtreeFlags & 33554432 && + runWithFiberInDEV( + fiber, + recursivelyTraverseAndDoubleInvokeEffectsInDEV, + root, + fiber, + isStrictModeFiber + )); + parentFiber = parentFiber.sibling; + } + } + function doubleInvokeEffectsOnFiber(root, fiber) { + var shouldDoubleInvokePassiveEffects = + 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : !0; + setIsStrictModeForDevtools(!0); + try { + disappearLayoutEffects(fiber), + shouldDoubleInvokePassiveEffects && disconnectPassiveEffect(fiber), + reappearLayoutEffects(root, fiber.alternate, fiber, !1), + shouldDoubleInvokePassiveEffects && + reconnectPassiveEffects(root, fiber, 0, null, !1); + } finally { + setIsStrictModeForDevtools(!1); } } + function commitDoubleInvokeEffectsInDEV(root) { + var doubleInvokeEffects = !0; + root.current.mode & 24 || (doubleInvokeEffects = !1); + recursivelyTraverseAndDoubleInvokeEffectsInDEV( + root, + root.current, + doubleInvokeEffects + ); + } function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) { if ((executionContext & RenderContext) === NoContext) { var tag = fiber.tag; @@ -14639,7 +14605,6 @@ __DEV__ && var didWarnAboutReassigningProps = !1; var didWarnAboutRevealOrder = {}; var didWarnAboutTailOptions = {}; - var didWarnAboutDefaultPropsOnFunctionComponent = {}; var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, @@ -15003,10 +14968,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-modern-e06c72fc-20241215", + version: "19.1.0-www-modern-d4287258-20241217", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-e06c72fc-20241215" + reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15026,7 +14991,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1109, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1094, isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT, isConcurrent = isConcurrentOnly, isStrictMode = !1; @@ -15141,5 +15106,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.1.0-www-modern-e06c72fc-20241215"; + exports.version = "19.1.0-www-modern-d4287258-20241217"; })(); diff --git a/compiled/facebook-www/Scheduler-dev.classic.js b/compiled/facebook-www/Scheduler-dev.classic.js index b9b44d3d03de7..8ed077262214c 100644 --- a/compiled/facebook-www/Scheduler-dev.classic.js +++ b/compiled/facebook-www/Scheduler-dev.classic.js @@ -14,7 +14,7 @@ __DEV__ && (function () { function performWorkUntilDeadline() { - needsPaint = !1; + enableRequestPaint && (needsPaint = !1); if (isMessageLoopRunning) { var currentTime = exports.unstable_now(); startTime = currentTime; @@ -36,11 +36,10 @@ __DEV__ && advanceTimers(currentTime); for ( currentTask = peek(taskQueue); + null !== currentTask && !( - null === currentTask || - isSchedulerPaused || - (currentTask.expirationTime > currentTime && - shouldYieldToHost()) + currentTask.expirationTime > currentTime && + shouldYieldToHost() ); ) { @@ -229,7 +228,7 @@ __DEV__ && } } function shouldYieldToHost() { - return needsPaint + return enableRequestPaint && needsPaint ? !0 : exports.unstable_now() - startTime < frameInterval ? !1 @@ -248,11 +247,8 @@ __DEV__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); - var dynamicFeatureFlags = require("SchedulerFeatureFlags"), - userBlockingPriorityTimeout = - dynamicFeatureFlags.userBlockingPriorityTimeout, - normalPriorityTimeout = dynamicFeatureFlags.normalPriorityTimeout, - lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout, + var enableRequestPaint = + require("SchedulerFeatureFlags").enableRequestPaint, runIdCounter = 0, mainThreadIdCounter = 0, eventLogSize = 0, @@ -278,7 +274,6 @@ __DEV__ && var taskQueue = [], timerQueue = [], taskIdCounter = 1, - isSchedulerPaused = !1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, @@ -299,9 +294,9 @@ __DEV__ && localSetImmediate(performWorkUntilDeadline); }; else if ("undefined" !== typeof MessageChannel) { - dynamicFeatureFlags = new MessageChannel(); - var port = dynamicFeatureFlags.port2; - dynamicFeatureFlags.port1.onmessage = performWorkUntilDeadline; + var channel = new MessageChannel(), + port = channel.port2; + channel.port1.onmessage = performWorkUntilDeadline; schedulePerformWorkUntilDeadline = function () { port.postMessage(null); }; @@ -309,7 +304,7 @@ __DEV__ && schedulePerformWorkUntilDeadline = function () { localSetTimeout(performWorkUntilDeadline, 0); }; - dynamicFeatureFlags = { + channel = { startLoggingProfilingEvents: function () { eventLogSize = 131072; eventLogBuffer = new ArrayBuffer(4 * eventLogSize); @@ -322,7 +317,7 @@ __DEV__ && exports.unstable_ImmediatePriority = 1; exports.unstable_LowPriority = 4; exports.unstable_NormalPriority = 3; - exports.unstable_Profiling = dynamicFeatureFlags; + exports.unstable_Profiling = channel; exports.unstable_UserBlockingPriority = 2; exports.unstable_cancelCallback = function (task) { if (task.isQueued) { @@ -333,7 +328,6 @@ __DEV__ && task.callback = null; }; exports.unstable_continueExecution = function () { - isSchedulerPaused = !1; isHostCallbackScheduled || isPerformingWork || ((isHostCallbackScheduled = !0), requestHostCallback()); @@ -369,11 +363,9 @@ __DEV__ && currentPriorityLevel = previousPriorityLevel; } }; - exports.unstable_pauseExecution = function () { - isSchedulerPaused = !0; - }; + exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { - needsPaint = !0; + enableRequestPaint && (needsPaint = !0); }; exports.unstable_runWithPriority = function (priorityLevel, eventHandler) { switch (priorityLevel) { @@ -412,16 +404,16 @@ __DEV__ && var timeout = -1; break; case 2: - timeout = userBlockingPriorityTimeout; + timeout = 250; break; case 5: timeout = 1073741823; break; case 4: - timeout = lowPriorityTimeout; + timeout = 1e4; break; default: - timeout = normalPriorityTimeout; + timeout = 5e3; } timeout = options + timeout; priorityLevel = { diff --git a/compiled/facebook-www/Scheduler-dev.modern.js b/compiled/facebook-www/Scheduler-dev.modern.js index b9b44d3d03de7..8ed077262214c 100644 --- a/compiled/facebook-www/Scheduler-dev.modern.js +++ b/compiled/facebook-www/Scheduler-dev.modern.js @@ -14,7 +14,7 @@ __DEV__ && (function () { function performWorkUntilDeadline() { - needsPaint = !1; + enableRequestPaint && (needsPaint = !1); if (isMessageLoopRunning) { var currentTime = exports.unstable_now(); startTime = currentTime; @@ -36,11 +36,10 @@ __DEV__ && advanceTimers(currentTime); for ( currentTask = peek(taskQueue); + null !== currentTask && !( - null === currentTask || - isSchedulerPaused || - (currentTask.expirationTime > currentTime && - shouldYieldToHost()) + currentTask.expirationTime > currentTime && + shouldYieldToHost() ); ) { @@ -229,7 +228,7 @@ __DEV__ && } } function shouldYieldToHost() { - return needsPaint + return enableRequestPaint && needsPaint ? !0 : exports.unstable_now() - startTime < frameInterval ? !1 @@ -248,11 +247,8 @@ __DEV__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); - var dynamicFeatureFlags = require("SchedulerFeatureFlags"), - userBlockingPriorityTimeout = - dynamicFeatureFlags.userBlockingPriorityTimeout, - normalPriorityTimeout = dynamicFeatureFlags.normalPriorityTimeout, - lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout, + var enableRequestPaint = + require("SchedulerFeatureFlags").enableRequestPaint, runIdCounter = 0, mainThreadIdCounter = 0, eventLogSize = 0, @@ -278,7 +274,6 @@ __DEV__ && var taskQueue = [], timerQueue = [], taskIdCounter = 1, - isSchedulerPaused = !1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, @@ -299,9 +294,9 @@ __DEV__ && localSetImmediate(performWorkUntilDeadline); }; else if ("undefined" !== typeof MessageChannel) { - dynamicFeatureFlags = new MessageChannel(); - var port = dynamicFeatureFlags.port2; - dynamicFeatureFlags.port1.onmessage = performWorkUntilDeadline; + var channel = new MessageChannel(), + port = channel.port2; + channel.port1.onmessage = performWorkUntilDeadline; schedulePerformWorkUntilDeadline = function () { port.postMessage(null); }; @@ -309,7 +304,7 @@ __DEV__ && schedulePerformWorkUntilDeadline = function () { localSetTimeout(performWorkUntilDeadline, 0); }; - dynamicFeatureFlags = { + channel = { startLoggingProfilingEvents: function () { eventLogSize = 131072; eventLogBuffer = new ArrayBuffer(4 * eventLogSize); @@ -322,7 +317,7 @@ __DEV__ && exports.unstable_ImmediatePriority = 1; exports.unstable_LowPriority = 4; exports.unstable_NormalPriority = 3; - exports.unstable_Profiling = dynamicFeatureFlags; + exports.unstable_Profiling = channel; exports.unstable_UserBlockingPriority = 2; exports.unstable_cancelCallback = function (task) { if (task.isQueued) { @@ -333,7 +328,6 @@ __DEV__ && task.callback = null; }; exports.unstable_continueExecution = function () { - isSchedulerPaused = !1; isHostCallbackScheduled || isPerformingWork || ((isHostCallbackScheduled = !0), requestHostCallback()); @@ -369,11 +363,9 @@ __DEV__ && currentPriorityLevel = previousPriorityLevel; } }; - exports.unstable_pauseExecution = function () { - isSchedulerPaused = !0; - }; + exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { - needsPaint = !0; + enableRequestPaint && (needsPaint = !0); }; exports.unstable_runWithPriority = function (priorityLevel, eventHandler) { switch (priorityLevel) { @@ -412,16 +404,16 @@ __DEV__ && var timeout = -1; break; case 2: - timeout = userBlockingPriorityTimeout; + timeout = 250; break; case 5: timeout = 1073741823; break; case 4: - timeout = lowPriorityTimeout; + timeout = 1e4; break; default: - timeout = normalPriorityTimeout; + timeout = 5e3; } timeout = options + timeout; priorityLevel = { diff --git a/compiled/facebook-www/Scheduler-prod.classic.js b/compiled/facebook-www/Scheduler-prod.classic.js index 3448ad1f7e2d4..7754d6b8b4f7c 100644 --- a/compiled/facebook-www/Scheduler-prod.classic.js +++ b/compiled/facebook-www/Scheduler-prod.classic.js @@ -11,10 +11,7 @@ */ "use strict"; -var dynamicFeatureFlags = require("SchedulerFeatureFlags"), - userBlockingPriorityTimeout = dynamicFeatureFlags.userBlockingPriorityTimeout, - normalPriorityTimeout = dynamicFeatureFlags.normalPriorityTimeout, - lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout; +var enableRequestPaint = require("SchedulerFeatureFlags").enableRequestPaint; function push(heap, node) { var index = heap.length; heap.push(node); @@ -79,7 +76,6 @@ if ("object" === typeof performance && "function" === typeof performance.now) { var taskQueue = [], timerQueue = [], taskIdCounter = 1, - isSchedulerPaused = !1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, @@ -117,14 +113,14 @@ var isMessageLoopRunning = !1, frameInterval = 10, startTime = -1; function shouldYieldToHost() { - return needsPaint + return enableRequestPaint && needsPaint ? !0 : exports.unstable_now() - startTime < frameInterval ? !1 : !0; } function performWorkUntilDeadline() { - needsPaint = !1; + enableRequestPaint && (needsPaint = !1); if (isMessageLoopRunning) { var currentTime = exports.unstable_now(); startTime = currentTime; @@ -143,11 +139,9 @@ function performWorkUntilDeadline() { advanceTimers(currentTime); for ( currentTask = peek(taskQueue); + null !== currentTask && !( - null === currentTask || - isSchedulerPaused || - (currentTask.expirationTime > currentTime && - shouldYieldToHost()) + currentTask.expirationTime > currentTime && shouldYieldToHost() ); ) { @@ -231,7 +225,6 @@ exports.unstable_cancelCallback = function (task) { task.callback = null; }; exports.unstable_continueExecution = function () { - isSchedulerPaused = !1; isHostCallbackScheduled || isPerformingWork || ((isHostCallbackScheduled = !0), requestHostCallback()); @@ -267,11 +260,9 @@ exports.unstable_next = function (eventHandler) { currentPriorityLevel = previousPriorityLevel; } }; -exports.unstable_pauseExecution = function () { - isSchedulerPaused = !0; -}; +exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { - needsPaint = !0; + enableRequestPaint && (needsPaint = !0); }; exports.unstable_runWithPriority = function (priorityLevel, eventHandler) { switch (priorityLevel) { @@ -310,16 +301,16 @@ exports.unstable_scheduleCallback = function ( var timeout = -1; break; case 2: - timeout = userBlockingPriorityTimeout; + timeout = 250; break; case 5: timeout = 1073741823; break; case 4: - timeout = lowPriorityTimeout; + timeout = 1e4; break; default: - timeout = normalPriorityTimeout; + timeout = 5e3; } timeout = options + timeout; priorityLevel = { diff --git a/compiled/facebook-www/Scheduler-prod.modern.js b/compiled/facebook-www/Scheduler-prod.modern.js index 3448ad1f7e2d4..7754d6b8b4f7c 100644 --- a/compiled/facebook-www/Scheduler-prod.modern.js +++ b/compiled/facebook-www/Scheduler-prod.modern.js @@ -11,10 +11,7 @@ */ "use strict"; -var dynamicFeatureFlags = require("SchedulerFeatureFlags"), - userBlockingPriorityTimeout = dynamicFeatureFlags.userBlockingPriorityTimeout, - normalPriorityTimeout = dynamicFeatureFlags.normalPriorityTimeout, - lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout; +var enableRequestPaint = require("SchedulerFeatureFlags").enableRequestPaint; function push(heap, node) { var index = heap.length; heap.push(node); @@ -79,7 +76,6 @@ if ("object" === typeof performance && "function" === typeof performance.now) { var taskQueue = [], timerQueue = [], taskIdCounter = 1, - isSchedulerPaused = !1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, @@ -117,14 +113,14 @@ var isMessageLoopRunning = !1, frameInterval = 10, startTime = -1; function shouldYieldToHost() { - return needsPaint + return enableRequestPaint && needsPaint ? !0 : exports.unstable_now() - startTime < frameInterval ? !1 : !0; } function performWorkUntilDeadline() { - needsPaint = !1; + enableRequestPaint && (needsPaint = !1); if (isMessageLoopRunning) { var currentTime = exports.unstable_now(); startTime = currentTime; @@ -143,11 +139,9 @@ function performWorkUntilDeadline() { advanceTimers(currentTime); for ( currentTask = peek(taskQueue); + null !== currentTask && !( - null === currentTask || - isSchedulerPaused || - (currentTask.expirationTime > currentTime && - shouldYieldToHost()) + currentTask.expirationTime > currentTime && shouldYieldToHost() ); ) { @@ -231,7 +225,6 @@ exports.unstable_cancelCallback = function (task) { task.callback = null; }; exports.unstable_continueExecution = function () { - isSchedulerPaused = !1; isHostCallbackScheduled || isPerformingWork || ((isHostCallbackScheduled = !0), requestHostCallback()); @@ -267,11 +260,9 @@ exports.unstable_next = function (eventHandler) { currentPriorityLevel = previousPriorityLevel; } }; -exports.unstable_pauseExecution = function () { - isSchedulerPaused = !0; -}; +exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { - needsPaint = !0; + enableRequestPaint && (needsPaint = !0); }; exports.unstable_runWithPriority = function (priorityLevel, eventHandler) { switch (priorityLevel) { @@ -310,16 +301,16 @@ exports.unstable_scheduleCallback = function ( var timeout = -1; break; case 2: - timeout = userBlockingPriorityTimeout; + timeout = 250; break; case 5: timeout = 1073741823; break; case 4: - timeout = lowPriorityTimeout; + timeout = 1e4; break; default: - timeout = normalPriorityTimeout; + timeout = 5e3; } timeout = options + timeout; priorityLevel = { diff --git a/compiled/facebook-www/Scheduler-profiling.classic.js b/compiled/facebook-www/Scheduler-profiling.classic.js index 2095a84f8da1f..734df5b3e114c 100644 --- a/compiled/facebook-www/Scheduler-profiling.classic.js +++ b/compiled/facebook-www/Scheduler-profiling.classic.js @@ -15,10 +15,7 @@ "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); -var dynamicFeatureFlags = require("SchedulerFeatureFlags"), - userBlockingPriorityTimeout = dynamicFeatureFlags.userBlockingPriorityTimeout, - normalPriorityTimeout = dynamicFeatureFlags.normalPriorityTimeout, - lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout; +var enableRequestPaint = require("SchedulerFeatureFlags").enableRequestPaint; function push(heap, node) { var index = heap.length; heap.push(node); @@ -83,7 +80,6 @@ if ("object" === typeof performance && "function" === typeof performance.now) { var taskQueue = [], timerQueue = [], taskIdCounter = 1, - isSchedulerPaused = !1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, @@ -121,14 +117,14 @@ var isMessageLoopRunning = !1, frameInterval = 10, startTime = -1; function shouldYieldToHost() { - return needsPaint + return enableRequestPaint && needsPaint ? !0 : exports.unstable_now() - startTime < frameInterval ? !1 : !0; } function performWorkUntilDeadline() { - needsPaint = !1; + enableRequestPaint && (needsPaint = !1); if (isMessageLoopRunning) { var currentTime = exports.unstable_now(); startTime = currentTime; @@ -147,11 +143,9 @@ function performWorkUntilDeadline() { advanceTimers(currentTime); for ( currentTask = peek(taskQueue); + null !== currentTask && !( - null === currentTask || - isSchedulerPaused || - (currentTask.expirationTime > currentTime && - shouldYieldToHost()) + currentTask.expirationTime > currentTime && shouldYieldToHost() ); ) { @@ -235,7 +229,6 @@ exports.unstable_cancelCallback = function (task) { task.callback = null; }; exports.unstable_continueExecution = function () { - isSchedulerPaused = !1; isHostCallbackScheduled || isPerformingWork || ((isHostCallbackScheduled = !0), requestHostCallback()); @@ -271,11 +264,9 @@ exports.unstable_next = function (eventHandler) { currentPriorityLevel = previousPriorityLevel; } }; -exports.unstable_pauseExecution = function () { - isSchedulerPaused = !0; -}; +exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { - needsPaint = !0; + enableRequestPaint && (needsPaint = !0); }; exports.unstable_runWithPriority = function (priorityLevel, eventHandler) { switch (priorityLevel) { @@ -314,16 +305,16 @@ exports.unstable_scheduleCallback = function ( var timeout = -1; break; case 2: - timeout = userBlockingPriorityTimeout; + timeout = 250; break; case 5: timeout = 1073741823; break; case 4: - timeout = lowPriorityTimeout; + timeout = 1e4; break; default: - timeout = normalPriorityTimeout; + timeout = 5e3; } timeout = options + timeout; priorityLevel = { diff --git a/compiled/facebook-www/Scheduler-profiling.modern.js b/compiled/facebook-www/Scheduler-profiling.modern.js index 2095a84f8da1f..734df5b3e114c 100644 --- a/compiled/facebook-www/Scheduler-profiling.modern.js +++ b/compiled/facebook-www/Scheduler-profiling.modern.js @@ -15,10 +15,7 @@ "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); -var dynamicFeatureFlags = require("SchedulerFeatureFlags"), - userBlockingPriorityTimeout = dynamicFeatureFlags.userBlockingPriorityTimeout, - normalPriorityTimeout = dynamicFeatureFlags.normalPriorityTimeout, - lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout; +var enableRequestPaint = require("SchedulerFeatureFlags").enableRequestPaint; function push(heap, node) { var index = heap.length; heap.push(node); @@ -83,7 +80,6 @@ if ("object" === typeof performance && "function" === typeof performance.now) { var taskQueue = [], timerQueue = [], taskIdCounter = 1, - isSchedulerPaused = !1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, @@ -121,14 +117,14 @@ var isMessageLoopRunning = !1, frameInterval = 10, startTime = -1; function shouldYieldToHost() { - return needsPaint + return enableRequestPaint && needsPaint ? !0 : exports.unstable_now() - startTime < frameInterval ? !1 : !0; } function performWorkUntilDeadline() { - needsPaint = !1; + enableRequestPaint && (needsPaint = !1); if (isMessageLoopRunning) { var currentTime = exports.unstable_now(); startTime = currentTime; @@ -147,11 +143,9 @@ function performWorkUntilDeadline() { advanceTimers(currentTime); for ( currentTask = peek(taskQueue); + null !== currentTask && !( - null === currentTask || - isSchedulerPaused || - (currentTask.expirationTime > currentTime && - shouldYieldToHost()) + currentTask.expirationTime > currentTime && shouldYieldToHost() ); ) { @@ -235,7 +229,6 @@ exports.unstable_cancelCallback = function (task) { task.callback = null; }; exports.unstable_continueExecution = function () { - isSchedulerPaused = !1; isHostCallbackScheduled || isPerformingWork || ((isHostCallbackScheduled = !0), requestHostCallback()); @@ -271,11 +264,9 @@ exports.unstable_next = function (eventHandler) { currentPriorityLevel = previousPriorityLevel; } }; -exports.unstable_pauseExecution = function () { - isSchedulerPaused = !0; -}; +exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { - needsPaint = !0; + enableRequestPaint && (needsPaint = !0); }; exports.unstable_runWithPriority = function (priorityLevel, eventHandler) { switch (priorityLevel) { @@ -314,16 +305,16 @@ exports.unstable_scheduleCallback = function ( var timeout = -1; break; case 2: - timeout = userBlockingPriorityTimeout; + timeout = 250; break; case 5: timeout = 1073741823; break; case 4: - timeout = lowPriorityTimeout; + timeout = 1e4; break; default: - timeout = normalPriorityTimeout; + timeout = 5e3; } timeout = options + timeout; priorityLevel = { diff --git a/compiled/facebook-www/SchedulerMock-dev.classic.js b/compiled/facebook-www/SchedulerMock-dev.classic.js index 3bb4b0ed9ffe0..a6e6ba4bab727 100644 --- a/compiled/facebook-www/SchedulerMock-dev.classic.js +++ b/compiled/facebook-www/SchedulerMock-dev.classic.js @@ -137,12 +137,9 @@ __DEV__ && advanceTimers(initialTime); for ( currentTask = peek(taskQueue); - !( - null === currentTask || - isSchedulerPaused || - (currentTask.expirationTime > initialTime && - (!hasTimeRemaining || shouldYieldToHost())) - ); + null !== currentTask && + (!(currentTask.expirationTime > initialTime) || + (hasTimeRemaining && !shouldYieldToHost())); ) { var callback = currentTask.callback; @@ -249,7 +246,6 @@ __DEV__ && taskQueue = [], timerQueue = [], taskIdCounter = 1, - isSchedulerPaused = !1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, @@ -322,7 +318,6 @@ __DEV__ && return values; }; exports.unstable_continueExecution = function () { - isSchedulerPaused = !1; isHostCallbackScheduled || isPerformingWork || ((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)); @@ -416,9 +411,7 @@ __DEV__ && exports.unstable_now = function () { return currentMockTime; }; - exports.unstable_pauseExecution = function () { - isSchedulerPaused = !0; - }; + exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { needsPaint = !0; }; diff --git a/compiled/facebook-www/SchedulerMock-dev.modern.js b/compiled/facebook-www/SchedulerMock-dev.modern.js index 3bb4b0ed9ffe0..a6e6ba4bab727 100644 --- a/compiled/facebook-www/SchedulerMock-dev.modern.js +++ b/compiled/facebook-www/SchedulerMock-dev.modern.js @@ -137,12 +137,9 @@ __DEV__ && advanceTimers(initialTime); for ( currentTask = peek(taskQueue); - !( - null === currentTask || - isSchedulerPaused || - (currentTask.expirationTime > initialTime && - (!hasTimeRemaining || shouldYieldToHost())) - ); + null !== currentTask && + (!(currentTask.expirationTime > initialTime) || + (hasTimeRemaining && !shouldYieldToHost())); ) { var callback = currentTask.callback; @@ -249,7 +246,6 @@ __DEV__ && taskQueue = [], timerQueue = [], taskIdCounter = 1, - isSchedulerPaused = !1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, @@ -322,7 +318,6 @@ __DEV__ && return values; }; exports.unstable_continueExecution = function () { - isSchedulerPaused = !1; isHostCallbackScheduled || isPerformingWork || ((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)); @@ -416,9 +411,7 @@ __DEV__ && exports.unstable_now = function () { return currentMockTime; }; - exports.unstable_pauseExecution = function () { - isSchedulerPaused = !0; - }; + exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { needsPaint = !0; }; diff --git a/compiled/facebook-www/SchedulerMock-prod.classic.js b/compiled/facebook-www/SchedulerMock-prod.classic.js index 03c58b2405bd5..dab82b06cb255 100644 --- a/compiled/facebook-www/SchedulerMock-prod.classic.js +++ b/compiled/facebook-www/SchedulerMock-prod.classic.js @@ -63,7 +63,6 @@ function compare(a, b) { var taskQueue = [], timerQueue = [], taskIdCounter = 1, - isSchedulerPaused = !1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, @@ -118,12 +117,9 @@ function flushWork(hasTimeRemaining, initialTime) { advanceTimers(initialTime); for ( currentTask = peek(taskQueue); - !( - null === currentTask || - isSchedulerPaused || - (currentTask.expirationTime > initialTime && - (!hasTimeRemaining || shouldYieldToHost())) - ); + null !== currentTask && + (!(currentTask.expirationTime > initialTime) || + (hasTimeRemaining && !shouldYieldToHost())); ) { var callback = currentTask.callback; @@ -234,7 +230,6 @@ exports.unstable_clearLog = function () { return values; }; exports.unstable_continueExecution = function () { - isSchedulerPaused = !1; isHostCallbackScheduled || isPerformingWork || ((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)); @@ -327,9 +322,7 @@ exports.unstable_next = function (eventHandler) { exports.unstable_now = function () { return currentMockTime; }; -exports.unstable_pauseExecution = function () { - isSchedulerPaused = !0; -}; +exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { needsPaint = !0; }; diff --git a/compiled/facebook-www/SchedulerMock-prod.modern.js b/compiled/facebook-www/SchedulerMock-prod.modern.js index 03c58b2405bd5..dab82b06cb255 100644 --- a/compiled/facebook-www/SchedulerMock-prod.modern.js +++ b/compiled/facebook-www/SchedulerMock-prod.modern.js @@ -63,7 +63,6 @@ function compare(a, b) { var taskQueue = [], timerQueue = [], taskIdCounter = 1, - isSchedulerPaused = !1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, @@ -118,12 +117,9 @@ function flushWork(hasTimeRemaining, initialTime) { advanceTimers(initialTime); for ( currentTask = peek(taskQueue); - !( - null === currentTask || - isSchedulerPaused || - (currentTask.expirationTime > initialTime && - (!hasTimeRemaining || shouldYieldToHost())) - ); + null !== currentTask && + (!(currentTask.expirationTime > initialTime) || + (hasTimeRemaining && !shouldYieldToHost())); ) { var callback = currentTask.callback; @@ -234,7 +230,6 @@ exports.unstable_clearLog = function () { return values; }; exports.unstable_continueExecution = function () { - isSchedulerPaused = !1; isHostCallbackScheduled || isPerformingWork || ((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)); @@ -327,9 +322,7 @@ exports.unstable_next = function (eventHandler) { exports.unstable_now = function () { return currentMockTime; }; -exports.unstable_pauseExecution = function () { - isSchedulerPaused = !0; -}; +exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { needsPaint = !0; }; diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC index 594ab288417d0..5fce29989657a 100644 --- a/compiled/facebook-www/VERSION_CLASSIC +++ b/compiled/facebook-www/VERSION_CLASSIC @@ -1 +1 @@ -19.1.0-www-classic-e06c72fc-20241215 \ No newline at end of file +19.1.0-www-classic-d4287258-20241217 \ No newline at end of file diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN index 031d5a7251686..f885ee12837ae 100644 --- a/compiled/facebook-www/VERSION_MODERN +++ b/compiled/facebook-www/VERSION_MODERN @@ -1 +1 @@ -19.1.0-www-modern-e06c72fc-20241215 \ No newline at end of file +19.1.0-www-modern-d4287258-20241217 \ No newline at end of file